@marimo-team/frontend 0.23.16-dev9 → 0.23.17-dev0

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 (706) hide show
  1. package/dist/assets/{CellStatus-BwCqFeIT.js → CellStatus-BYH-DZdr.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-CMaZapRd.js → ConnectedDataExplorerComponent-C4zEgCZh.js} +1 -1
  3. package/dist/assets/JsonOutput-D2UI9WX5.js +53 -0
  4. package/dist/assets/LazyAnyLanguageCodeMirror-A-Ant1Ad.js +2 -0
  5. package/dist/assets/{MarimoErrorOutput-2CXbNUBb.js → MarimoErrorOutput-Cu5WMawt.js} +4 -4
  6. package/dist/assets/RenderHTML-C1rWkDWe.js +1 -0
  7. package/dist/assets/{RunButton-DLoWn_Jd.js → RunButton-BO02PdVH.js} +1 -1
  8. package/dist/assets/__vite-browser-external-mTzvI0UM.js +1 -0
  9. package/dist/assets/{add-cell-with-ai-C1L7x0xr.js → add-cell-with-ai-PVABTCGt.js} +35 -35
  10. package/dist/assets/add-connection-dialog-GskQAyZw.js +178 -0
  11. package/dist/assets/{agent-panel-D3_CUvz_.js → agent-panel-BitNk-Gl.js} +5 -5
  12. package/dist/assets/ai-model-dropdown-DzobPTdx.js +5 -0
  13. package/dist/assets/{any-language-editor--tRHs8C_.js → any-language-editor-BIeaxtdD.js} +1 -1
  14. package/dist/assets/apl-BnIcQcjL.js +1 -0
  15. package/dist/assets/app-config-button-D_JaIWhO.js +1 -0
  16. package/dist/assets/{arc-CfUZAQDm.js → arc-DPwkj0YX.js} +1 -1
  17. package/dist/assets/{architecture-7HQA4BMR-Bvqj37EA.js → architecture-7HQA4BMR-CzgzqOCD.js} +1 -1
  18. package/dist/assets/{architectureDiagram-VXUJARFQ-sx_yisiZ.js → architectureDiagram-VXUJARFQ-BMZxefa_.js} +1 -1
  19. package/dist/assets/arrow-left-pVgT2h-8.js +1 -0
  20. package/dist/assets/asciiarmor-VNkYxCrW.js +1 -0
  21. package/dist/assets/asn1-DHaiamxN.js +1 -0
  22. package/dist/assets/blob-BNTWOaI9.js +1 -0
  23. package/dist/assets/{blockDiagram-VD42YOAC-KexI-fgH.js → blockDiagram-VD42YOAC-O9sd6I0b.js} +1 -1
  24. package/dist/assets/brainfuck-B7OQ4qXM.js +1 -0
  25. package/dist/assets/{c4Diagram-YG6GDRKO-d8NrlxRF.js → c4Diagram-YG6GDRKO-CJ4NJdbh.js} +1 -1
  26. package/dist/assets/{cache-panel-DcQUeUpg.js → cache-panel-B2B1ePao.js} +1 -1
  27. package/dist/assets/cell-editor-BuU4BDSk.js +27 -0
  28. package/dist/assets/cell-link-CWQ4BYr-.js +1 -0
  29. package/dist/assets/cells-CJLUCcQg.js +235 -0
  30. package/dist/assets/channel-DELDOomM.js +1 -0
  31. package/dist/assets/{chat-display-DomMe89U.js → chat-display-CfiA-GdA.js} +1 -1
  32. package/dist/assets/{chat-panel-DzLbxcWT.js → chat-panel-DghO5Y6C.js} +3 -3
  33. package/dist/assets/{chat-ui-BpWZ6JeY.js → chat-ui-CNXmMUI1.js} +1 -1
  34. package/dist/assets/{chunk-4BX2VUAB-fhh1HlXH.js → chunk-4BX2VUAB-BCgdxLTg.js} +1 -1
  35. package/dist/assets/chunk-55IACEB6-DnPXlz-P.js +1 -0
  36. package/dist/assets/{chunk-5FQGJX7Z-Cp0LZT-a.js → chunk-5FQGJX7Z-CYQpNADu.js} +2 -2
  37. package/dist/assets/{chunk-ABZYJK2D-BtK4zInQ.js → chunk-ABZYJK2D-M8yn2N69.js} +3 -3
  38. package/dist/assets/{chunk-ATLVNIR6-YZDenslF.js → chunk-ATLVNIR6-CY4Q_7DV.js} +1 -1
  39. package/dist/assets/{chunk-B4BG7PRW-DYIZwDbt.js → chunk-B4BG7PRW-0izjR6gH.js} +1 -1
  40. package/dist/assets/{chunk-CVBHYZKI-CIyHeK0Q.js → chunk-CVBHYZKI-Dtb0_R-R.js} +1 -1
  41. package/dist/assets/{chunk-DI55MBZ5-TodwBGEN.js → chunk-DI55MBZ5-CeYy94Hv.js} +1 -1
  42. package/dist/assets/{chunk-EXTU4WIE-C76bF1UD.js → chunk-EXTU4WIE-CZBftw0u.js} +1 -1
  43. package/dist/assets/{chunk-FMBD7UC4-Yq65IDPA.js → chunk-FMBD7UC4-BTonlpoo.js} +1 -1
  44. package/dist/assets/{chunk-HN2XXSSU-CcbN4n6W.js → chunk-HN2XXSSU-Bqib0VeJ.js} +1 -1
  45. package/dist/assets/{chunk-JA3XYJ7Z-CPXEu7AX.js → chunk-JA3XYJ7Z-CMnBpyzd.js} +1 -1
  46. package/dist/assets/{chunk-JZLCHNYA-D8q1z6Py.js → chunk-JZLCHNYA-BWjnV_v7.js} +1 -1
  47. package/dist/assets/{chunk-MI3HLSF2-bmomnexd.js → chunk-MI3HLSF2-CA3zpyGZ.js} +1 -1
  48. package/dist/assets/{chunk-N4CR4FBY-BhsjB2qn.js → chunk-N4CR4FBY-CZmndviH.js} +2 -2
  49. package/dist/assets/{chunk-QN33PNHL-ngvPqyQ0.js → chunk-QN33PNHL-B5rSVblq.js} +1 -1
  50. package/dist/assets/{chunk-QXUST7PY-C4c0Sjmn.js → chunk-QXUST7PY-Cz8b__fX.js} +1 -1
  51. package/dist/assets/{chunk-QZHKN3VN-CkbwBDOS.js → chunk-QZHKN3VN-B7nq9C0W.js} +1 -1
  52. package/dist/assets/{chunk-S3R3BYOJ-Bt2NnquF.js → chunk-S3R3BYOJ-CUGnLh1o.js} +1 -1
  53. package/dist/assets/{chunk-TZMSLE5B-Dysko1OC.js → chunk-TZMSLE5B-CXQovw1I.js} +1 -1
  54. package/dist/assets/classDiagram-2ON5EDUG-B3IKXY7k.js +1 -0
  55. package/dist/assets/classDiagram-v2-WZHVMYZB-C0Db1CRa.js +1 -0
  56. package/dist/assets/{clike-DKPr2D1_.js → clike-CcPLlJ3-.js} +1 -1
  57. package/dist/assets/clojure-DK3HqqeG.js +1 -0
  58. package/dist/assets/cmake-Bnhxe81D.js +1 -0
  59. package/dist/assets/cobol-ISPch7J4.js +1 -0
  60. package/dist/assets/{code-block-37QAKDTI-DlENujeV.js → code-block-37QAKDTI-21cPxSHu.js} +1 -1
  61. package/dist/assets/coffeescript-B3cS2ooz.js +1 -0
  62. package/dist/assets/{column-preview-D5Btj8aG.js → column-preview-DREOGG_c.js} +1 -1
  63. package/dist/assets/{command-palette-CNp7T2c5.js → command-palette-C95r8rOd.js} +1 -1
  64. package/dist/assets/{common-BrPgvCtD.js → common-DCWeeUhr.js} +1 -1
  65. package/dist/assets/commonlisp-DH0yllOU.js +1 -0
  66. package/dist/assets/components-BGqqoLEG.js +1 -0
  67. package/dist/assets/components-K_Mi0vdC.js +1 -0
  68. package/dist/assets/config-B-Q7J_6d.js +1 -0
  69. package/dist/assets/{cose-bilkent-S5V4N54A-BlMw4-M9.js → cose-bilkent-S5V4N54A-DK9gIUQX.js} +1 -1
  70. package/dist/assets/crystal-CfSxbewa.js +1 -0
  71. package/dist/assets/{css-DsUcFZz8.js → css-IVPzYP6l.js} +1 -1
  72. package/dist/assets/cypher-DqUctVOg.js +1 -0
  73. package/dist/assets/d-DYRkEHFy.js +1 -0
  74. package/dist/assets/{dagre-6UL2VRFP-kJ4x17JK.js → dagre-6UL2VRFP-DQFoIrK8.js} +1 -1
  75. package/dist/assets/{data-grid-overlay-editor-DbobQcVo.js → data-grid-overlay-editor-CVM5ufb4.js} +1 -1
  76. package/dist/assets/{datasource-wn1PTlXA.js → datasource-DbljozeY.js} +2 -2
  77. package/dist/assets/{dependency-graph-panel-B8Q8RQNh.js → dependency-graph-panel-Bg9bLMXq.js} +4 -4
  78. package/dist/assets/{diagram-PSM6KHXK-d-5aQNHk.js → diagram-PSM6KHXK-DIXxW5au.js} +1 -1
  79. package/dist/assets/{diagram-QEK2KX5R-CO-PXq75.js → diagram-QEK2KX5R-B8KoKZCY.js} +1 -1
  80. package/dist/assets/{diagram-S2PKOQOG-Dv7pcvYC.js → diagram-S2PKOQOG-D0bjlYXx.js} +1 -1
  81. package/dist/assets/diff-Cd5HBT58.js +1 -0
  82. package/dist/assets/dist-B99-E4qp.js +1 -0
  83. package/dist/assets/{dist-BsphJPAV.js → dist-BiwuSVkx.js} +1 -1
  84. package/dist/assets/{dist-CECF_J8y.js → dist-BrZjJXDA.js} +1 -1
  85. package/dist/assets/{dist-Du-wcJyR.js → dist-By4rFZwg.js} +1 -1
  86. package/dist/assets/dist-CaZf6AoY.js +1 -0
  87. package/dist/assets/{dist-BMOD2Pyh.js → dist-Cgoy5550.js} +1 -1
  88. package/dist/assets/{dist-6c4zOh78.js → dist-D6WgndTj.js} +1 -1
  89. package/dist/assets/dist-DcXy-1eJ.js +1 -0
  90. package/dist/assets/{dist-0QUuSoRx.js → dist-DtbtRAqz.js} +1 -1
  91. package/dist/assets/dist-I3qeQWuP.js +1 -0
  92. package/dist/assets/{dist-sPfKr-vH.js → dist-aeKlrIMv.js} +1 -1
  93. package/dist/assets/{dist-CDUl-YL4.js → dist-gDi2I7IJ.js} +1 -1
  94. package/dist/assets/{dist-CRrIf3gB.js → dist-miDa4-cz.js} +1 -1
  95. package/dist/assets/{dist-R1kU4nzJ.js → dist-nDEBxpL6.js} +1 -1
  96. package/dist/assets/{dist-DQNaXfK1.js → dist-oUL4XFdB.js} +1 -1
  97. package/dist/assets/{dockerfile-C2PznFWk.js → dockerfile-CLtE40Sb.js} +1 -1
  98. package/dist/assets/{documentation-panel-hFyikugH.js → documentation-panel-BhtY-lKF.js} +1 -1
  99. package/dist/assets/download-DwYUg-o4.js +9 -0
  100. package/dist/assets/dtd-C24SyIVW.js +1 -0
  101. package/dist/assets/dylan-CrkzDmc1.js +1 -0
  102. package/dist/assets/ecl-DSuYw2WY.js +1 -0
  103. package/dist/assets/{edit-page-jUsez4HZ.js → edit-page-D_hRRfNq.js} +6 -6
  104. package/dist/assets/eiffel-D60uMU52.js +1 -0
  105. package/dist/assets/elm-pYZdVh3P.js +1 -0
  106. package/dist/assets/{erDiagram-Q2GNP2WA-BQ8HfnRu.js → erDiagram-Q2GNP2WA-D7EuT99Y.js} +1 -1
  107. package/dist/assets/erlang-D9MlcoAb.js +1 -0
  108. package/dist/assets/error-entries-4LYRQSOP.js +8 -0
  109. package/dist/assets/{error-panel-DAseRhAS.js → error-panel-FG7tsVQ_.js} +1 -1
  110. package/dist/assets/{esm-Cmv0Nuxi.js → esm-BDGraAqp.js} +1 -1
  111. package/dist/assets/factor-gTHEdNEJ.js +1 -0
  112. package/dist/assets/{factor-DMrXrOH8.js → factor-xSp9WnN7.js} +1 -1
  113. package/dist/assets/file-explorer-panel-CpUlOt1N.js +26 -0
  114. package/dist/assets/{file-icons-Chripuk-.js → file-icons-CODNoWOy.js} +1 -1
  115. package/dist/assets/{file-name-input-B1NJd3KY.js → file-name-input-DyvZhLvk.js} +1 -1
  116. package/dist/assets/{fileToBase64-C2Yy-YXq.js → fileToBase64-hLJmVjNJ.js} +1 -1
  117. package/dist/assets/floating-outline-DBlzcHYf.js +1 -0
  118. package/dist/assets/{flowDiagram-NV44I4VS-xBOzhlfg.js → flowDiagram-NV44I4VS-Bz3PhSZq.js} +1 -1
  119. package/dist/assets/focus-B6HBbAwF.js +1 -0
  120. package/dist/assets/form-BYlqbYKI.js +2 -0
  121. package/dist/assets/form-W6ZZMHnc.js +1 -0
  122. package/dist/assets/forth-CWZXTLFs.js +1 -0
  123. package/dist/assets/fortran-B8kNpt8O.js +1 -0
  124. package/dist/assets/{gallery-page-CJ3ms1Hn.js → gallery-page-DbuxknAw.js} +1 -1
  125. package/dist/assets/{ganttDiagram-JELNMOA3-D2O_k-Zg.js → ganttDiagram-JELNMOA3-DaS60lKW.js} +1 -1
  126. package/dist/assets/gas-DxuMSeqj.js +1 -0
  127. package/dist/assets/gherkin-ZkKEDs6K.js +1 -0
  128. package/dist/assets/{gitGraph-G5XIXVHT-8HJwNcdU.js → gitGraph-G5XIXVHT-Cd5ecvAE.js} +1 -1
  129. package/dist/assets/{gitGraphDiagram-V2S2FVAM-Nk4Ll9GY.js → gitGraphDiagram-V2S2FVAM-D7jUmjBw.js} +1 -1
  130. package/dist/assets/{glide-data-editor-j2igs9Y_.js → glide-data-editor-CejKKgnN.js} +4 -4
  131. package/dist/assets/globe-Dwo3iXzC.js +1 -0
  132. package/dist/assets/groovy-CqQZm41C.js +1 -0
  133. package/dist/assets/haskell-DWF-arrK.js +1 -0
  134. package/dist/assets/haxe-LmdIWMMr.js +1 -0
  135. package/dist/assets/home-page-DYaHMq8Q.js +4 -0
  136. package/dist/assets/{html-to-image-B-nAUvDC.js → html-to-image-CN9yTa5s.js} +2 -2
  137. package/dist/assets/idl-DEd51qv-.js +1 -0
  138. package/dist/assets/index-8Nlyq3mV.css +2 -0
  139. package/dist/assets/index-Gv23EHlE.js +38 -0
  140. package/dist/assets/{info-VBDWY6EO-rfe3WPvd.js → info-VBDWY6EO-BTT52JaO.js} +1 -1
  141. package/dist/assets/infoDiagram-HS3SLOUP-GkG80Qxa.js +2 -0
  142. package/dist/assets/javascript-BFIOGZ-j.js +1 -0
  143. package/dist/assets/{journeyDiagram-XKPGCS4Q-D61FGivn.js → journeyDiagram-XKPGCS4Q-DwL-PxSb.js} +1 -1
  144. package/dist/assets/julia-Chs3F4Sv.js +1 -0
  145. package/dist/assets/{kanban-definition-3W4ZIXB7-Bnv0X0Tu.js → kanban-definition-3W4ZIXB7-DiBaV6eK.js} +1 -1
  146. package/dist/assets/katex-12J11HuB.js +1 -0
  147. package/dist/assets/kiosk-mode-Di-gTPu2.js +1 -0
  148. package/dist/assets/{layout-1Z2AhO6k.js → layout-B6D_84rz.js} +5 -5
  149. package/dist/assets/{line-DNm2phYo.js → line-BDmwHhfs.js} +1 -1
  150. package/dist/assets/{linear-CTQqNbVX.js → linear-BPv4krGt.js} +1 -1
  151. package/dist/assets/livescript-CZOCkk31.js +1 -0
  152. package/dist/assets/logs-panel-V4PsZD48.js +1 -0
  153. package/dist/assets/{loro_wasm_bg-Duqr-kJ2.js → loro_wasm_bg-CjrUicyy.js} +1 -1
  154. package/dist/assets/lua-DK4FKJLN.js +1 -0
  155. package/dist/assets/{markdown-renderer-Cs1sISb9.js → markdown-renderer-CzJx-MnJ.js} +3 -3
  156. package/dist/assets/mathematica-BoEJU8On.js +1 -0
  157. package/dist/assets/mbox-1WJcoGln.js +1 -0
  158. package/dist/assets/{mermaid-4DMBBIKO-CDGmT6YQ.js → mermaid-4DMBBIKO-3ntkrgCA.js} +1 -1
  159. package/dist/assets/{mermaid-CYN0wOyG.js → mermaid-B8gNHyGy.js} +3 -3
  160. package/dist/assets/{mermaid-parser.core-Dz2GMGqQ.js → mermaid-parser.core-Ddjs6Jmy.js} +2 -2
  161. package/dist/assets/{mhchem-CIWniJp4.js → mhchem-Cnt1CrAX.js} +1 -1
  162. package/dist/assets/{mindmap-definition-VGOIOE7T-C-YaKmEU.js → mindmap-definition-VGOIOE7T-DKJd1wuU.js} +1 -1
  163. package/dist/assets/mirc-OXxqihhx.js +1 -0
  164. package/dist/assets/mllike-fFPa49Ft.js +1 -0
  165. package/dist/assets/modelica-B2hOO40U.js +1 -0
  166. package/dist/assets/mscgen-BUm8DSPh.js +1 -0
  167. package/dist/assets/mumps-BUUE1QKi.js +1 -0
  168. package/dist/assets/{name-cell-input-2sM8a_OS.js → name-cell-input-Bq1sljc2.js} +1 -1
  169. package/dist/assets/node-sql-parser-CAudyJSw.js +68 -0
  170. package/dist/assets/nsis-CQPY661e.js +1 -0
  171. package/dist/assets/{nsis-Ccvd1gbp.js → nsis-SCfsPq8M.js} +1 -1
  172. package/dist/assets/ntriples-CtWbsB7O.js +1 -0
  173. package/dist/assets/{number-overlay-editor-BQ9P6yP7.js → number-overlay-editor-KHf1PkHr.js} +1 -1
  174. package/dist/assets/octave-D4HWE405.js +1 -0
  175. package/dist/assets/{ordinal-DyTNGK17.js → ordinal-BSXHDD5k.js} +1 -1
  176. package/dist/assets/{outline-panel-BXWCkGu_.js → outline-panel-Tn3DVuNl.js} +1 -1
  177. package/dist/assets/oz-Cp-6fXH5.js +1 -0
  178. package/dist/assets/{packages-panel-CJfHGfax.js → packages-panel-er2ghj4m.js} +1 -1
  179. package/dist/assets/{packet-DYOGHKS2-DTVloLa7.js → packet-DYOGHKS2-pYSTMj1G.js} +1 -1
  180. package/dist/assets/pair-with-agent-modal-CVYH-Guh.js +4 -0
  181. package/dist/assets/panel-accordion-state-DN1hLusu.js +1 -0
  182. package/dist/assets/panels-oc6cK0j0.js +4 -0
  183. package/dist/assets/pascal-B2F20-Dq.js +1 -0
  184. package/dist/assets/perl-C8I4my72.js +1 -0
  185. package/dist/assets/{pie-VRWISCQL-Bmght6JF.js → pie-VRWISCQL-BtGe15Zk.js} +1 -1
  186. package/dist/assets/{pieDiagram-ADFJNKIX-DlFYL0BN.js → pieDiagram-ADFJNKIX-BdWIv6Xr.js} +1 -1
  187. package/dist/assets/pig-Dg7z9udE.js +1 -0
  188. package/dist/assets/powershell-BjupwEXi.js +1 -0
  189. package/dist/assets/process-output-DXnqTuGm.js +1 -0
  190. package/dist/assets/properties-CWyPUxmr.js +1 -0
  191. package/dist/assets/protobuf-B2dHC-BL.js +1 -0
  192. package/dist/assets/pug-B-MnYZUt.js +1 -0
  193. package/dist/assets/{pug-BtXi5KiX.js → pug-D81S7inS.js} +1 -1
  194. package/dist/assets/puppet-CeBQQ4Li.js +1 -0
  195. package/dist/assets/python-DgHNYu_r.js +1 -0
  196. package/dist/assets/q-wSguJrTU.js +1 -0
  197. package/dist/assets/{quadrantDiagram-AYHSOK5B-BpJug2BH.js → quadrantDiagram-AYHSOK5B-DJuGB95-.js} +1 -1
  198. package/dist/assets/r-BoIJ2Zve.js +1 -0
  199. package/dist/assets/{radar-ZZBFDIW7-CYwWzRgW.js → radar-ZZBFDIW7-DyFu57RV.js} +1 -1
  200. package/dist/assets/{radio-group-PT0_zVHo.js → radio-group-CcU5wNVj.js} +1 -1
  201. package/dist/assets/{react-vega-TNCk_eWj.js → react-vega-BLc5RhC7.js} +1 -1
  202. package/dist/assets/{readonly-code-display-CFbCSGms.js → readonly-code-display-DoQFa0ET.js} +1 -1
  203. package/dist/assets/{readonly-python-code-DB23yd7T.js → readonly-python-code-CYfbPYQ0.js} +1 -1
  204. package/dist/assets/{requirementDiagram-UZGBJVZJ-Bd-1eny8.js → requirementDiagram-UZGBJVZJ-aWGJtWy2.js} +1 -1
  205. package/dist/assets/{reveal-component-fwTDxf5N.js → reveal-component-CZgRCMe1.js} +42 -42
  206. package/dist/assets/rpm-DmyUNIkv.js +1 -0
  207. package/dist/assets/{ecl-B6UC4tME.js → ruby-Djlw6kjU.js} +1 -1
  208. package/dist/assets/run-page-Dxm4ltqq.js +1 -0
  209. package/dist/assets/{sankeyDiagram-TZEHDZUN-CDWAE6GV.js → sankeyDiagram-TZEHDZUN-nJIZ3_NQ.js} +1 -1
  210. package/dist/assets/sas-B8AwxLVS.js +1 -0
  211. package/dist/assets/scheme-o4lPnt7c.js +1 -0
  212. package/dist/assets/{scratchpad-panel-BLC2oQ_3.js → scratchpad-panel-pQP0zGxD.js} +1 -1
  213. package/dist/assets/{secrets-panel-6J6wcuVR.js → secrets-panel-Cz17_MLf.js} +1 -1
  214. package/dist/assets/{sequenceDiagram-WL72ISMW-B6hjDGBF.js → sequenceDiagram-WL72ISMW-Bvkxl3m4.js} +1 -1
  215. package/dist/assets/session-panel-C-y42nqB.js +1 -0
  216. package/dist/assets/shell-DJuOhLmg.js +1 -0
  217. package/dist/assets/sieve-BBDbJOX3.js +1 -0
  218. package/dist/assets/{skeleton-xuR254Kw.js → skeleton-Bd78PcP9.js} +1 -1
  219. package/dist/assets/slides-DkEgzTJB.css +1 -0
  220. package/dist/assets/smalltalk-CmTnbqu4.js +1 -0
  221. package/dist/assets/{snippets-panel-DwAjNUqR.js → snippets-panel-BRtH_9R3.js} +1 -1
  222. package/dist/assets/sparql-BQuPdHqO.js +1 -0
  223. package/dist/assets/{src-CIOdyciO.js → src-xYaLe_3f.js} +1 -1
  224. package/dist/assets/state-C4kiwedg.js +1 -0
  225. package/dist/assets/state-CsGOoEZv.js +3 -0
  226. package/dist/assets/{state-Tc7pRohh.js → state-Rxc-B11B.js} +1 -1
  227. package/dist/assets/{stateDiagram-FKZM4ZOC-Bzv6j99z.js → stateDiagram-FKZM4ZOC-CVF8M4di.js} +1 -1
  228. package/dist/assets/stateDiagram-v2-4FDKWEC3-Dj-G9wuu.js +1 -0
  229. package/dist/assets/{step-CDlhJj9-.js → step-DkIPWA0m.js} +1 -1
  230. package/dist/assets/stylus-DrNz1BCZ.js +1 -0
  231. package/dist/assets/swift-UQ24LctC.js +1 -0
  232. package/dist/assets/switch-OVajJBPR.js +1 -0
  233. package/dist/assets/tcl-BBEwSttz.js +1 -0
  234. package/dist/assets/{terminal-DaLxAnKx.js → terminal-Cdd3rO1L.js} +1 -1
  235. package/dist/assets/textarea-DtCcemo9.js +1 -0
  236. package/dist/assets/textile-CYG_qV_5.js +1 -0
  237. package/dist/assets/{time-BuRlxEhE.js → time-p47i6wvp.js} +1 -1
  238. package/dist/assets/{timeline-definition-IT6M3QCI-DXwdU1og.js → timeline-definition-IT6M3QCI-D1XRbH5P.js} +1 -1
  239. package/dist/assets/toml-DB6lKkvi.js +1 -0
  240. package/dist/assets/{tracing-BmBBYynL.js → tracing-CdeezhIN.js} +1 -1
  241. package/dist/assets/{tracing-panel-AReiFUol.js → tracing-panel-Dl3MlGyG.js} +2 -2
  242. package/dist/assets/{tree-actions-Bz3fJ7p-.js → tree-actions-BiQ4VzX-.js} +1 -1
  243. package/dist/assets/{treemap-GDKQZRPO-4Cm6HMmj.js → treemap-GDKQZRPO-Z4m-KHQY.js} +1 -1
  244. package/dist/assets/troff-WrtaE-DW.js +1 -0
  245. package/dist/assets/ttcn-DNOLsGjD.js +1 -0
  246. package/dist/assets/ttcn-cfg-D2oRz-8W.js +1 -0
  247. package/dist/assets/turtle-hoYUNcbl.js +1 -0
  248. package/dist/assets/{useBoolean-CA7K8rap.js → useBoolean-CFj86iac.js} +1 -1
  249. package/dist/assets/useCellActionButton-B5wkKtv1.js +1 -0
  250. package/dist/assets/{useDeleteCell-DQP-NBq2.js → useDeleteCell-BfKWOHfk.js} +1 -1
  251. package/dist/assets/{useDependencyPanelTab-BrkWlCTP.js → useDependencyPanelTab-BTipqN67.js} +1 -1
  252. package/dist/assets/useNotebookActions-CCwjICU_.js +12 -0
  253. package/dist/assets/useRunCells-DZ4glj3f.js +1 -0
  254. package/dist/assets/{useSplitCell-jH70A2Sz.js → useSplitCell-DXzfZTCe.js} +1 -1
  255. package/dist/assets/vb-CSArj0Ox.js +1 -0
  256. package/dist/assets/vbscript-Cy_b6RxB.js +1 -0
  257. package/dist/assets/{vega-component-DSvWLXIy.js → vega-component-VDedA5Cd.js} +1 -1
  258. package/dist/assets/{vega-embed-container-hDAVOOba.js → vega-embed-container-DxSqUOCK.js} +1 -1
  259. package/dist/assets/velocity-8fvVYgdA.js +1 -0
  260. package/dist/assets/verilog-BPXnWs06.js +1 -0
  261. package/dist/assets/vhdl-C4JSE7Sd.js +1 -0
  262. package/dist/assets/webidl-uP8WR81M.js +1 -0
  263. package/dist/assets/{worker-BQo2bijx.js → worker-BM73L67p.js} +3 -6
  264. package/dist/assets/write-secret-modal-Dtm66yVf.js +2 -0
  265. package/dist/assets/xquery-C8ppAT5Z.js +1 -0
  266. package/dist/assets/{xychartDiagram-PRI3JC2R-Cb0exSKs.js → xychartDiagram-PRI3JC2R-B8A0hi-Q.js} +1 -1
  267. package/dist/assets/yacas-CnXhtfs7.js +1 -0
  268. package/dist/assets/z80-B0aL_Tnf.js +1 -0
  269. package/dist/index.html +36 -34
  270. package/package.json +3 -4
  271. package/src/__mocks__/requests.ts +56 -4
  272. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
  273. package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
  274. package/src/components/data-table/__tests__/columns.test.tsx +9 -1
  275. package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
  276. package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
  277. package/src/components/data-table/column-summary/utils.ts +26 -7
  278. package/src/components/data-table/columns.tsx +11 -1
  279. package/src/components/data-table/types.ts +1 -1
  280. package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
  281. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
  282. package/src/components/editor/actions/__tests__/pdf-export.test.ts +32 -13
  283. package/src/components/editor/actions/pair-with-agent-commands.ts +21 -10
  284. package/src/components/editor/actions/pair-with-agent-modal.tsx +2 -2
  285. package/src/components/editor/actions/pdf-export.ts +11 -14
  286. package/src/components/editor/actions/useNotebookActions.tsx +28 -19
  287. package/src/components/editor/cell/code/__tests__/cell-editor-activity-lifecycle.test.ts +250 -0
  288. package/src/components/editor/cell/code/cell-editor.tsx +13 -7
  289. package/src/components/editor/chrome/__tests__/state.test.ts +7 -1
  290. package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
  291. package/src/components/editor/chrome/panels/__tests__/panel-accordion-state.test.ts +42 -0
  292. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +6 -17
  293. package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
  294. package/src/components/editor/chrome/panels/panel-accordion-state.ts +51 -0
  295. package/src/components/editor/chrome/panels/session-panel.tsx +5 -16
  296. package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
  297. package/src/components/editor/chrome/state.ts +10 -0
  298. package/src/components/editor/connections/__tests__/json-credentials.test.ts +114 -0
  299. package/src/components/editor/connections/__tests__/paths.test.ts +39 -0
  300. package/src/components/editor/connections/__tests__/quick-add-data-sources.test.tsx +113 -0
  301. package/src/components/editor/connections/add-connection-dialog.tsx +2 -0
  302. package/src/components/editor/connections/components.tsx +6 -2
  303. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +27 -5
  304. package/src/components/editor/connections/database/__tests__/as-code.test.ts +33 -0
  305. package/src/components/editor/connections/database/as-code.ts +37 -13
  306. package/src/components/editor/connections/database/schemas.ts +6 -5
  307. package/src/components/editor/connections/form-renderers.tsx +99 -1
  308. package/src/components/editor/connections/json-credentials.ts +57 -0
  309. package/src/components/editor/connections/paths.ts +21 -0
  310. package/src/components/editor/connections/quick-add-data-sources.tsx +106 -0
  311. package/src/components/editor/connections/secret-combobox.tsx +41 -20
  312. package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +88 -2
  313. package/src/components/editor/connections/storage/__tests__/as-code.test.ts +128 -8
  314. package/src/components/editor/connections/storage/as-code.ts +79 -36
  315. package/src/components/editor/connections/storage/schemas.ts +85 -44
  316. package/src/components/editor/file-tree/__tests__/renderers.test.ts +31 -0
  317. package/src/components/editor/file-tree/file-viewer.tsx +11 -7
  318. package/src/components/editor/file-tree/renderers.tsx +21 -0
  319. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +2 -2
  320. package/src/components/editor/viewer-banner.tsx +6 -1
  321. package/src/components/forms/form.tsx +59 -24
  322. package/src/components/forms/options.ts +2 -1
  323. package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
  324. package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
  325. package/src/components/slides/reveal-component.tsx +22 -17
  326. package/src/components/slides/slide-cell-view.tsx +1 -1
  327. package/src/components/slides/slides.css +4 -2
  328. package/src/components/static-html/share-modal.tsx +1 -1
  329. package/src/core/ai/context/providers/file.ts +8 -29
  330. package/src/core/cells/__tests__/cells.test.ts +12 -2
  331. package/src/core/cells/__tests__/logs.test.ts +5 -5
  332. package/src/core/cells/cells.ts +17 -4
  333. package/src/core/cells/document-changes.ts +1 -0
  334. package/src/core/cells/logs.ts +14 -4
  335. package/src/core/codemirror/cm.ts +3 -0
  336. package/src/core/codemirror/code-lens/__tests__/actions.test.ts +68 -0
  337. package/src/core/codemirror/code-lens/__tests__/analyzer.test.ts +224 -0
  338. package/src/core/codemirror/code-lens/__tests__/entities.test.ts +175 -0
  339. package/src/core/codemirror/code-lens/__tests__/extension.test.ts +325 -0
  340. package/src/core/codemirror/code-lens/__tests__/perf.test.ts +121 -0
  341. package/src/core/codemirror/code-lens/__tests__/popover.test.ts +93 -0
  342. package/src/core/codemirror/code-lens/actions.ts +33 -0
  343. package/src/core/codemirror/code-lens/analyzer.ts +284 -0
  344. package/src/core/codemirror/code-lens/entities.ts +123 -0
  345. package/src/core/codemirror/code-lens/extension.ts +298 -0
  346. package/src/core/codemirror/code-lens/icons.ts +36 -0
  347. package/src/core/codemirror/code-lens/popover.tsx +240 -0
  348. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
  349. package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
  350. package/src/core/codemirror/copilot/language-server.ts +182 -70
  351. package/src/core/codemirror/copilot/transport.ts +15 -207
  352. package/src/core/codemirror/copilot/types.ts +9 -2
  353. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
  354. package/src/core/codemirror/find-replace/navigate.ts +2 -0
  355. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
  356. package/src/core/codemirror/go-to-definition/commands.ts +93 -90
  357. package/src/core/codemirror/language/__tests__/sql.test.ts +627 -61
  358. package/src/core/codemirror/language/languages/python.ts +23 -11
  359. package/src/core/codemirror/language/languages/sql/completion-store.ts +5 -1
  360. package/src/core/codemirror/language/languages/sql/renderers.tsx +3 -3
  361. package/src/core/codemirror/language/languages/sql/sql.ts +251 -16
  362. package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
  363. package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
  364. package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
  365. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
  366. package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
  367. package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
  368. package/src/core/codemirror/lsp/log-messages.ts +37 -0
  369. package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
  370. package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
  371. package/src/core/codemirror/lsp/transports.ts +8 -1
  372. package/src/core/codemirror/lsp/types.ts +68 -8
  373. package/src/core/codemirror/lsp/utils.ts +14 -0
  374. package/src/core/codemirror/python-node-names.ts +90 -0
  375. package/src/core/codemirror/reactive-references/analyzer.ts +52 -57
  376. package/src/core/codemirror/utils.ts +28 -0
  377. package/src/core/config/feature-flag.tsx +3 -1
  378. package/src/core/datasets/data-source-discovery.ts +5 -0
  379. package/src/core/datasets/request-registry.ts +11 -0
  380. package/src/core/edit-app.tsx +1 -2
  381. package/src/core/export/__tests__/hooks.test.ts +2 -4
  382. package/src/core/export/hooks.ts +4 -3
  383. package/src/core/islands/__tests__/bridge.test.ts +107 -0
  384. package/src/core/islands/bootstrap.ts +1 -0
  385. package/src/core/islands/bridge.ts +18 -0
  386. package/src/core/kernel/messages.ts +2 -0
  387. package/src/core/lsp/__tests__/transport.test.ts +509 -337
  388. package/src/core/lsp/transport.ts +304 -132
  389. package/src/core/mode.ts +10 -0
  390. package/src/core/network/__tests__/api.test.ts +42 -0
  391. package/src/core/network/__tests__/connection.test.ts +45 -0
  392. package/src/core/network/__tests__/requests-lazy.test.ts +47 -1
  393. package/src/core/network/__tests__/requests-network.test.ts +48 -0
  394. package/src/core/network/api.ts +27 -0
  395. package/src/core/network/connection.ts +15 -0
  396. package/src/core/network/requests-lazy.ts +3 -0
  397. package/src/core/network/requests-network.ts +31 -8
  398. package/src/core/network/requests-static.ts +3 -0
  399. package/src/core/network/requests-toasting.tsx +3 -0
  400. package/src/core/network/types.ts +27 -6
  401. package/src/core/rtc/state.ts +9 -0
  402. package/src/core/static/download-html.ts +5 -14
  403. package/src/core/wasm/__tests__/bridge.test.ts +99 -5
  404. package/src/core/wasm/bridge.ts +42 -9
  405. package/src/core/wasm/worker/types.ts +10 -3
  406. package/src/core/wasm/worker/worker.ts +7 -8
  407. package/src/core/websocket/useMarimoKernelConnection.tsx +4 -0
  408. package/src/css/app/codemirror.css +16 -2
  409. package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +80 -0
  410. package/src/hooks/useDataSourceDiscovery.ts +18 -0
  411. package/src/plugins/impl/DataTablePlugin.tsx +4 -1
  412. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +158 -0
  413. package/src/plugins/impl/anywidget/__tests__/model.test.ts +55 -0
  414. package/src/plugins/impl/anywidget/model.ts +20 -5
  415. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +33 -21
  416. package/src/plugins/impl/data-frames/forms/renderers.tsx +11 -8
  417. package/src/stories/log-viewer.stories.tsx +12 -6
  418. package/src/utils/__tests__/blob.test.ts +27 -1
  419. package/src/utils/__tests__/download.test.tsx +44 -4
  420. package/src/utils/blob.ts +24 -1
  421. package/src/utils/download.ts +14 -15
  422. package/dist/assets/JsonOutput-B0aYK7up.js +0 -53
  423. package/dist/assets/LazyAnyLanguageCodeMirror-B2JvSXP-.js +0 -2
  424. package/dist/assets/RenderHTML-uBc4LkCP.js +0 -1
  425. package/dist/assets/__vite-browser-external-BkrtI7wJ.js +0 -1
  426. package/dist/assets/add-connection-dialog-BgQ7HuWu.js +0 -170
  427. package/dist/assets/ai-model-dropdown-C7iiWBqP.js +0 -5
  428. package/dist/assets/apl-DTwRFDps.js +0 -1
  429. package/dist/assets/app-config-button-DhmeKMjL.js +0 -1
  430. package/dist/assets/asciiarmor-CiqkDK0s.js +0 -1
  431. package/dist/assets/asn1-RTvH5MEs.js +0 -1
  432. package/dist/assets/blob-C3EfaMOb.js +0 -1
  433. package/dist/assets/brainfuck-szH_VGzd.js +0 -1
  434. package/dist/assets/cell-editor-DD0zaU_N.js +0 -27
  435. package/dist/assets/cell-link-C0hhYyNu.js +0 -1
  436. package/dist/assets/cells-aqfX084m.js +0 -229
  437. package/dist/assets/channel-D-k8o3T1.js +0 -1
  438. package/dist/assets/chunk-55IACEB6-xhaY4LU6.js +0 -1
  439. package/dist/assets/classDiagram-2ON5EDUG-C-rIg7EQ.js +0 -1
  440. package/dist/assets/classDiagram-v2-WZHVMYZB-MBAsRLae.js +0 -1
  441. package/dist/assets/clojure-CyEbLmch.js +0 -1
  442. package/dist/assets/cmake-Dk8f7QuI.js +0 -1
  443. package/dist/assets/cobol-BJJRqW1D.js +0 -1
  444. package/dist/assets/coffeescript-BDuWJ9WO.js +0 -1
  445. package/dist/assets/commonlisp-CVHm2VSp.js +0 -1
  446. package/dist/assets/components-1i9OlkxM.js +0 -1
  447. package/dist/assets/config-CR3KxW53.js +0 -1
  448. package/dist/assets/crystal-C2Fgr79A.js +0 -1
  449. package/dist/assets/cypher-CUlCm6vR.js +0 -1
  450. package/dist/assets/d-4ANEHA6q.js +0 -1
  451. package/dist/assets/diff-C-W-5V8L.js +0 -1
  452. package/dist/assets/dist-CCAhuqF-.js +0 -1
  453. package/dist/assets/dist-DGhK0kPE.js +0 -1
  454. package/dist/assets/dist-SVDIDTM2.js +0 -1
  455. package/dist/assets/dist-xSLg7wNV.js +0 -1
  456. package/dist/assets/download-CkMUlfM3.js +0 -9
  457. package/dist/assets/dtd-D9h-tL8G.js +0 -1
  458. package/dist/assets/dylan-D3MC56xy.js +0 -1
  459. package/dist/assets/eiffel-CjvEov4k.js +0 -1
  460. package/dist/assets/elm-DvSbvRWe.js +0 -1
  461. package/dist/assets/erlang-DJYaGXyq.js +0 -1
  462. package/dist/assets/error-entries-NXVkubuN.js +0 -8
  463. package/dist/assets/factor-CUQCrkTo.js +0 -1
  464. package/dist/assets/file-explorer-panel-D7VHUIPp.js +0 -26
  465. package/dist/assets/floating-outline-BOqWJRw_.js +0 -1
  466. package/dist/assets/focus-tOmGbv38.js +0 -1
  467. package/dist/assets/form-CIXAzTfC.js +0 -2
  468. package/dist/assets/forth-D9xegiCO.js +0 -1
  469. package/dist/assets/fortran-B0Oe0U8s.js +0 -1
  470. package/dist/assets/gas-jLjj-PIq.js +0 -1
  471. package/dist/assets/gherkin-3Ig8Crit.js +0 -1
  472. package/dist/assets/groovy-NKpNVJ-n.js +0 -1
  473. package/dist/assets/haskell-OPE4bAjk.js +0 -1
  474. package/dist/assets/haxe-DEAZF8L3.js +0 -1
  475. package/dist/assets/home-page-DO_MqQAB.js +0 -4
  476. package/dist/assets/idl-BM6265Xl.js +0 -1
  477. package/dist/assets/index-wLUfvfaV.js +0 -38
  478. package/dist/assets/index-xs-zSSrX.css +0 -2
  479. package/dist/assets/infoDiagram-HS3SLOUP-DQnMjKYJ.js +0 -2
  480. package/dist/assets/javascript-CZ9vDpAy.js +0 -1
  481. package/dist/assets/julia-BrY9TQnt.js +0 -1
  482. package/dist/assets/katex-C-lfa1AM.js +0 -1
  483. package/dist/assets/kiosk-mode-QsYGYiC8.js +0 -1
  484. package/dist/assets/livescript-CNahkUp5.js +0 -1
  485. package/dist/assets/logs-panel-B6AfYQb6.js +0 -1
  486. package/dist/assets/lua-Skr4TVu_.js +0 -1
  487. package/dist/assets/mathematica-BXxhrpeY.js +0 -1
  488. package/dist/assets/mbox-BRrQCVe9.js +0 -1
  489. package/dist/assets/mirc-CffYPE4R.js +0 -1
  490. package/dist/assets/mllike-C1DLZhEI.js +0 -1
  491. package/dist/assets/modelica-CvAyRRNV.js +0 -1
  492. package/dist/assets/mscgen-uMZWtMZv.js +0 -1
  493. package/dist/assets/mumps-DFJehEx7.js +0 -1
  494. package/dist/assets/node-sql-parser-BWgUjcfV.js +0 -68
  495. package/dist/assets/nsis-BVI9YULz.js +0 -1
  496. package/dist/assets/ntriples-Bcdh7b2H.js +0 -1
  497. package/dist/assets/octave-CdAKz6YS.js +0 -1
  498. package/dist/assets/oz-DSySeR-W.js +0 -1
  499. package/dist/assets/pair-with-agent-modal-C9nKHvCp.js +0 -4
  500. package/dist/assets/panels-Ch_sUzTx.js +0 -4
  501. package/dist/assets/pascal-DefziIUN.js +0 -1
  502. package/dist/assets/perl-BOOloBPk.js +0 -1
  503. package/dist/assets/pig-f0nBb-5x.js +0 -1
  504. package/dist/assets/powershell-DToQjbK9.js +0 -1
  505. package/dist/assets/process-output-BFSCpqNt.js +0 -1
  506. package/dist/assets/properties-BRob-nyj.js +0 -1
  507. package/dist/assets/protobuf-DZyC6051.js +0 -1
  508. package/dist/assets/pug-pVoM8FRt.js +0 -1
  509. package/dist/assets/puppet-9fuYG07F.js +0 -1
  510. package/dist/assets/python-_Mr8fyXP.js +0 -1
  511. package/dist/assets/q-D73s4Y77.js +0 -1
  512. package/dist/assets/r-BOEjz92e.js +0 -1
  513. package/dist/assets/rpm-LpXWTM5t.js +0 -1
  514. package/dist/assets/ruby-DodgSDfF.js +0 -1
  515. package/dist/assets/run-page-D9-9chbw.js +0 -1
  516. package/dist/assets/sas-D9KCtUmL.js +0 -1
  517. package/dist/assets/scheme-p8UJxmJw.js +0 -1
  518. package/dist/assets/session-panel-Dz-DQDeV.js +0 -1
  519. package/dist/assets/shell-BWdqyqwL.js +0 -1
  520. package/dist/assets/sieve-CLwJmtiQ.js +0 -1
  521. package/dist/assets/slides-MCbMDtlY.css +0 -1
  522. package/dist/assets/smalltalk-D3KV-Qah.js +0 -1
  523. package/dist/assets/sparql-D9Jz2mBw.js +0 -1
  524. package/dist/assets/state-BpkJVsmT.js +0 -3
  525. package/dist/assets/state-DDag0B_B.js +0 -1
  526. package/dist/assets/stateDiagram-v2-4FDKWEC3-CA1l0rNa.js +0 -1
  527. package/dist/assets/stylus-ClN4l_XO.js +0 -1
  528. package/dist/assets/swift-Dvd_9xBv.js +0 -1
  529. package/dist/assets/switch-DLGijIXN.js +0 -1
  530. package/dist/assets/tcl-DR2p8cyi.js +0 -1
  531. package/dist/assets/textarea-aocYW9hl.js +0 -1
  532. package/dist/assets/textile-D6S27_J2.js +0 -1
  533. package/dist/assets/toml-B-YuQ2Id.js +0 -1
  534. package/dist/assets/troff-HSk8AoRF.js +0 -1
  535. package/dist/assets/ttcn-CehzlVdx.js +0 -1
  536. package/dist/assets/ttcn-cfg-CLEPwk1s.js +0 -1
  537. package/dist/assets/turtle-DQLHkbOu.js +0 -1
  538. package/dist/assets/useCellActionButton-BG7n5b0H.js +0 -1
  539. package/dist/assets/useNotebookActions-COdGI2fR.js +0 -12
  540. package/dist/assets/useRunCells-BtSwerrU.js +0 -1
  541. package/dist/assets/vb-o1EHrS4z.js +0 -1
  542. package/dist/assets/vbscript-BS8yUFpf.js +0 -1
  543. package/dist/assets/velocity-u_oGPFaA.js +0 -1
  544. package/dist/assets/verilog-CSmDH7su.js +0 -1
  545. package/dist/assets/vhdl-BCaWLcjw.js +0 -1
  546. package/dist/assets/webidl-Bf6dokXM.js +0 -1
  547. package/dist/assets/write-secret-modal-3-v-dHVj.js +0 -1
  548. package/dist/assets/xquery-Di0kkiXg.js +0 -1
  549. package/dist/assets/yacas-DB8tPtyp.js +0 -1
  550. package/dist/assets/z80-DFUvlWxk.js +0 -1
  551. /package/dist/assets/{ImageComparisonComponent-Cz3xVDLH.js → ImageComparisonComponent-COvcNAUu.js} +0 -0
  552. /package/dist/assets/{Inputs-B8-VCb_j.js → Inputs-BmtHnGKp.js} +0 -0
  553. /package/dist/assets/{Plot-X2G47XHf.js → Plot-CB_5AR7d.js} +0 -0
  554. /package/dist/assets/{apl-DVqFAlEd.js → apl-Cp4QYSh2.js} +0 -0
  555. /package/dist/assets/{array-Ddg9CgJT.js → array-BuhHwWF4.js} +0 -0
  556. /package/dist/assets/{asciiarmor-B45BhOLj.js → asciiarmor-BUxo-e6o.js} +0 -0
  557. /package/dist/assets/{asn1-C4T2ctU6.js → asn1-Cp_b5sxr.js} +0 -0
  558. /package/dist/assets/{asterisk-9U_4Kgke.js → asterisk-BKEE609E.js} +0 -0
  559. /package/dist/assets/{azure-nN8APleF.js → azure-t5-hyIQ1.js} +0 -0
  560. /package/dist/assets/{brainfuck-kVh8Eud4.js → brainfuck-DmRCaE-Q.js} +0 -0
  561. /package/dist/assets/{card-VUBaYDpT.js → card-P_NJTnTd.js} +0 -0
  562. /package/dist/assets/{chunk-4F5CHEZ2-ClSh5rxG.js → chunk-4F5CHEZ2-D6n-cT3v.js} +0 -0
  563. /package/dist/assets/{chunk-B2363JML-cit0ouFv.js → chunk-B2363JML-kkXnm2Yp.js} +0 -0
  564. /package/dist/assets/{chunk-DR5Q36YT-Bsu9Glc0.js → chunk-DR5Q36YT-DZQANAzH.js} +0 -0
  565. /package/dist/assets/{chunk-FRFDVMJY--Re1QfFE.js → chunk-FRFDVMJY-MdHMrSks.js} +0 -0
  566. /package/dist/assets/{chunk-PL6DKKU2-CAwRAr-p.js → chunk-PL6DKKU2-BPi2wKR3.js} +0 -0
  567. /package/dist/assets/{chunk-SJTYNZTY-G1spWesO.js → chunk-SJTYNZTY-BcV9dsih.js} +0 -0
  568. /package/dist/assets/{chunk-TQ3KTPDO-DBwra5xv.js → chunk-TQ3KTPDO-XDjkQ8Xj.js} +0 -0
  569. /package/dist/assets/{chunk-UMXZTB3W-A5RvYDPE.js → chunk-UMXZTB3W-C-xu4f6g.js} +0 -0
  570. /package/dist/assets/{clear-button-DQtvx6eq.js → clear-button-clPKQb-5.js} +0 -0
  571. /package/dist/assets/{click-outside-container-CrWZsAF5.js → click-outside-container-BU5ChL3W.js} +0 -0
  572. /package/dist/assets/{clike-O0gwXilc.js → clike--wVFVJzz.js} +0 -0
  573. /package/dist/assets/{clojure-CsbMWxp9.js → clojure-xvpMtcD1.js} +0 -0
  574. /package/dist/assets/{cmake-FpJvOdyj.js → cmake-ChD_WVwL.js} +0 -0
  575. /package/dist/assets/{cobol-Duxbpsru.js → cobol-B5K8KXv5.js} +0 -0
  576. /package/dist/assets/{coffeescript-D-Unz9IP.js → coffeescript-EMaA6sFP.js} +0 -0
  577. /package/dist/assets/{colors-C_0lIznd.js → colors-CQfhPUa2.js} +0 -0
  578. /package/dist/assets/{common-keywords-PqH2GDfH.js → common-keywords-DdCmdKox.js} +0 -0
  579. /package/dist/assets/{commonlisp-_nR12oc7.js → commonlisp-BTUt7Wms.js} +0 -0
  580. /package/dist/assets/{crystal-dj3W4b1A.js → crystal-CaYGQjnj.js} +0 -0
  581. /package/dist/assets/{css-0BG6A_BC.js → css-Ci5CSFmt.js} +0 -0
  582. /package/dist/assets/{cypher-CKPokaoH.js → cypher-Bt0cHBYq.js} +0 -0
  583. /package/dist/assets/{cytoscape.esm-DzUNSF80.js → cytoscape.esm-CbUmcCyd.js} +0 -0
  584. /package/dist/assets/{d-BrbqzVa2.js → d-Y6y0yT7l.js} +0 -0
  585. /package/dist/assets/{diff-BmdR9FsO.js → diff-DWzGHZfz.js} +0 -0
  586. /package/dist/assets/{dist-CpbbK4-I.js → dist-8SH6SWEG.js} +0 -0
  587. /package/dist/assets/{dist-DzAAhYcW.js → dist-9o0Xjd5v.js} +0 -0
  588. /package/dist/assets/{dist-DNGKAtWk.js → dist-BKgHjzML.js} +0 -0
  589. /package/dist/assets/{dist-98K4fusX.js → dist-BP4hpPAE.js} +0 -0
  590. /package/dist/assets/{dist-D35OyUMQ.js → dist-C-3FVUQA.js} +0 -0
  591. /package/dist/assets/{dist-OgwOt8T2.js → dist-C6_DArtj.js} +0 -0
  592. /package/dist/assets/{dist-O5-NiN3f.js → dist-CLyRge8R.js} +0 -0
  593. /package/dist/assets/{dist-D5ToCtv8.js → dist-CZvbHnyT.js} +0 -0
  594. /package/dist/assets/{dist-DrtRBAn8.js → dist-CrKffqgx.js} +0 -0
  595. /package/dist/assets/{dist-B8g3pNYJ.js → dist-Cros4IAo.js} +0 -0
  596. /package/dist/assets/{dist-3N7-WLqi.js → dist-D47O3FBX.js} +0 -0
  597. /package/dist/assets/{dist-BaKJ0-Tb.js → dist-DJuRuTXr.js} +0 -0
  598. /package/dist/assets/{dist-CM-lWxt3.js → dist-DQl27SFq.js} +0 -0
  599. /package/dist/assets/{dist-DokId-qM.js → dist-DeJBvhAc.js} +0 -0
  600. /package/dist/assets/{dist-C5kf6g-d.js → dist-fLBYOt9R.js} +0 -0
  601. /package/dist/assets/{dist-56ul6-mm.js → dist-kLs0VbW_.js} +0 -0
  602. /package/dist/assets/{dist-ByK00N0T.js → dist-l4RTzHX-.js} +0 -0
  603. /package/dist/assets/{dist-D9sE1udr.js → dist-ut5UbaRH.js} +0 -0
  604. /package/dist/assets/{dtd-DbCXDVgi.js → dtd-CkphQXbR.js} +0 -0
  605. /package/dist/assets/{duckdb-keywords-mPlR0SxW.js → duckdb-keywords-D9ZiGTTc.js} +0 -0
  606. /package/dist/assets/{dylan-CLLzL2Js.js → dylan-CPyS5Usd.js} +0 -0
  607. /package/dist/assets/{ebnf-Cnws41cu.js → ebnf-C4SDYpAu.js} +0 -0
  608. /package/dist/assets/{ecl-BC7x2nzk.js → ecl-Dy8k_w5N.js} +0 -0
  609. /package/dist/assets/{eiffel-CDU836rz.js → eiffel-DZMtnEo6.js} +0 -0
  610. /package/dist/assets/{elm-D-_bXARs.js → elm-CkuOc7z-.js} +0 -0
  611. /package/dist/assets/{empty-state-CqJvEFRk.js → empty-state-JOk_hLQe.js} +0 -0
  612. /package/dist/assets/{erlang-CwDZk2zM.js → erlang-CSyJ5dU6.js} +0 -0
  613. /package/dist/assets/{esm-D6WfbcL3.js → esm-7r3G8FZG.js} +0 -0
  614. /package/dist/assets/{fcl-CwkPc-_9.js → fcl-Px-Zskiw.js} +0 -0
  615. /package/dist/assets/{formatting-CDf6w1Kt.js → formatting-COz4XEaB.js} +0 -0
  616. /package/dist/assets/{forth-D6FsO_8x.js → forth-HHM4VU-4.js} +0 -0
  617. /package/dist/assets/{fortran-D4BMbIkG.js → fortran-D_hdoGUs.js} +0 -0
  618. /package/dist/assets/{gas-JFjzcgdY.js → gas-DwXUGevO.js} +0 -0
  619. /package/dist/assets/{gherkin-Cyu-qGaF.js → gherkin-6UjduaeQ.js} +0 -0
  620. /package/dist/assets/{github-_JH-0hIO.js → github-A_zUd4Uj.js} +0 -0
  621. /package/dist/assets/{groovy-CZaE9eN-.js → groovy-BMSTiLIi.js} +0 -0
  622. /package/dist/assets/{haskell-Dc6o0IGr.js → haskell-CwQPWeas.js} +0 -0
  623. /package/dist/assets/{haxe-Bsf0tzqs.js → haxe-BwgB7edi.js} +0 -0
  624. /package/dist/assets/{http-BQNSD-HR.js → http-CqevOCDe.js} +0 -0
  625. /package/dist/assets/{idl-1W91kQ8_.js → idl-DaVQAS85.js} +0 -0
  626. /package/dist/assets/{init-nx27Zb9l.js → init-D5qG588s.js} +0 -0
  627. /package/dist/assets/{javascript-BZ81-2rO.js → javascript-DgYFgf02.js} +0 -0
  628. /package/dist/assets/{julia-BZOsq0r_.js → julia-ZzackTsi.js} +0 -0
  629. /package/dist/assets/{katex-CvZ3kCGk.js → katex-Di-siZEY.js} +0 -0
  630. /package/dist/assets/{links-CZr5bjvo.js → links-ClNQSIal.js} +0 -0
  631. /package/dist/assets/{livescript-CNZfmikk.js → livescript-fyjJd0Zu.js} +0 -0
  632. /package/dist/assets/{loro_wasm_bg-RNUly1SE.js → loro_wasm_bg-BPjF1TWb.js} +0 -0
  633. /package/dist/assets/{lua-DXGRliwd.js → lua-Cx9isc8d.js} +0 -0
  634. /package/dist/assets/{marimo-icons-C_nFooxr.js → marimo-icons-yD_pAOm9.js} +0 -0
  635. /package/dist/assets/{math-CLO4uoaP.js → math-7EMdGNhR.js} +0 -0
  636. /package/dist/assets/{mathematica-BoUj8M7D.js → mathematica-BJvaPi1-.js} +0 -0
  637. /package/dist/assets/{mbox-DLVP8LAe.js → mbox-43z3jriT.js} +0 -0
  638. /package/dist/assets/{mirc-kI4d5fMu.js → mirc-B1ZSd8Bn.js} +0 -0
  639. /package/dist/assets/{mllike-CD9vBc_2.js → mllike-DZwCuWJi.js} +0 -0
  640. /package/dist/assets/{modelica-DgfsLJuF.js → modelica-DJJ2ie2z.js} +0 -0
  641. /package/dist/assets/{mscgen-B1HDwshJ.js → mscgen-CKYpxNp_.js} +0 -0
  642. /package/dist/assets/{multi-icon-nrKPWjDU.js → multi-icon-DVD1luis.js} +0 -0
  643. /package/dist/assets/{mumps-D_-b9TZD.js → mumps-DYGlTYd1.js} +0 -0
  644. /package/dist/assets/{nginx-Cm282mo8.js → nginx-D6Zlgok6.js} +0 -0
  645. /package/dist/assets/{ntriples-COX9JFZ8.js → ntriples-DizNPLuO.js} +0 -0
  646. /package/dist/assets/{octave-BejycR79.js → octave-DdwI7gwd.js} +0 -0
  647. /package/dist/assets/{oz-CFFivrGn.js → oz-DMPAJRti.js} +0 -0
  648. /package/dist/assets/{panel-context-CH75ubGG.js → panel-context-CckkyW-1.js} +0 -0
  649. /package/dist/assets/{pascal-B_p9jkCs.js → pascal-Do0zihr_.js} +0 -0
  650. /package/dist/assets/{path-Bz_hIzg5.js → path-WJo29M9I.js} +0 -0
  651. /package/dist/assets/{pathUtils-Bfcp5m-a.js → pathUtils-icFgkNy9.js} +0 -0
  652. /package/dist/assets/{perl-C-SFBTly.js → perl-t4XY-5wj.js} +0 -0
  653. /package/dist/assets/{pig-BhxDMp2k.js → pig-CgweiC6M.js} +0 -0
  654. /package/dist/assets/{powershell-c59M-9N2.js → powershell-OQGwpWeH.js} +0 -0
  655. /package/dist/assets/{properties-D1JNwCKy.js → properties-BU4KenKz.js} +0 -0
  656. /package/dist/assets/{protobuf-DQS7ex8R.js → protobuf--IbBPde2.js} +0 -0
  657. /package/dist/assets/{puppet-DaQvhvew.js → puppet-DkR_zpq4.js} +0 -0
  658. /package/dist/assets/{python-XHl3eRTS.js → python-PdpM9cxt.js} +0 -0
  659. /package/dist/assets/{q-DppnoRE3.js → q-BmGsZsKc.js} +0 -0
  660. /package/dist/assets/{r-D8-F_FWj.js → r-D1cPebaP.js} +0 -0
  661. /package/dist/assets/{request-registry-DHocQ_4I.js → request-registry-Dpk9hQrX.js} +0 -0
  662. /package/dist/assets/{requests-DYeT4CEe.js → requests-BMphPdzB.js} +0 -0
  663. /package/dist/assets/{rpm-CegJhNNO.js → rpm-CG3vlu2-.js} +0 -0
  664. /package/dist/assets/{ruby-YMIxufV1.js → ruby-BU2XuRQM.js} +0 -0
  665. /package/dist/assets/{runs-DBTXqJHS.js → runs-s9t2f_Tg.js} +0 -0
  666. /package/dist/assets/{sas-wTtX9UIQ.js → sas-ig9j_2iC.js} +0 -0
  667. /package/dist/assets/{scheme-BGenom3k.js → scheme-9DZXzBKN.js} +0 -0
  668. /package/dist/assets/{semaphore-DtBYRzWS.js → semaphore-C-Nli4KG.js} +0 -0
  669. /package/dist/assets/{shell-Bu1sLaiP.js → shell-BtigxJqY.js} +0 -0
  670. /package/dist/assets/{sieve-ffe6rUQh.js → sieve-DJ-mn8HY.js} +0 -0
  671. /package/dist/assets/{simple-mode-DBSzUJLA.js → simple-mode-lTjyt9i9.js} +0 -0
  672. /package/dist/assets/{smalltalk-NU5EGjHp.js → smalltalk-Bn53uNk6.js} +0 -0
  673. /package/dist/assets/{solr-ptw1yIqO.js → solr-BenHzQuB.js} +0 -0
  674. /package/dist/assets/{sparql-uqVktnwO.js → sparql-mdFRPSSw.js} +0 -0
  675. /package/dist/assets/{spreadsheet-VEzeu_mb.js → spreadsheet-CIIID0RN.js} +0 -0
  676. /package/dist/assets/{sql-tYjnWETe.js → sql-BJS8pfHr.js} +0 -0
  677. /package/dist/assets/{src-BshXgZd4.js → src-C042FyXq.js} +0 -0
  678. /package/dist/assets/{state-D10U2MwA.js → state-DCtLlFJq.js} +0 -0
  679. /package/dist/assets/{stylus-B2E6Ulaz.js → stylus-CUXYXPeL.js} +0 -0
  680. /package/dist/assets/{swift-Rmnn7ATv.js → swift-BgwlI0GN.js} +0 -0
  681. /package/dist/assets/{swiper-component-Che9MNs4.js → swiper-component-DXW8snlt.js} +0 -0
  682. /package/dist/assets/{tcl-ZPWCn2nn.js → tcl-B8Khjzwl.js} +0 -0
  683. /package/dist/assets/{textile-uhA33kFk.js → textile-DmfgOrXO.js} +0 -0
  684. /package/dist/assets/{tiddlywiki-CPkGLyXH.js → tiddlywiki-mgaN9k7_.js} +0 -0
  685. /package/dist/assets/{tiki-BtjLo8OF.js → tiki-B8Sxh4ZA.js} +0 -0
  686. /package/dist/assets/{timer-VYMLXPue.js → timer-Bt8Z3SQI.js} +0 -0
  687. /package/dist/assets/{toml-BFZv2Mv7.js → toml-CPrwnn25.js} +0 -0
  688. /package/dist/assets/{treemap-Bca0xNNq.js → treemap-CshYMgJw.js} +0 -0
  689. /package/dist/assets/{troff-B5eayHop.js → troff-Cb-2hp0t.js} +0 -0
  690. /package/dist/assets/{ttcn-cfg-CfbkL3Q_.js → ttcn-cfg-O0cle81j.js} +0 -0
  691. /package/dist/assets/{ttcn-BM0Yp8NY.js → ttcn-mp3DV9SP.js} +0 -0
  692. /package/dist/assets/{turtle-DvetLxrv.js → turtle-Bo_IjRT-.js} +0 -0
  693. /package/dist/assets/{types-Da7lA5YC.js → types-Bn-E0Dh-.js} +0 -0
  694. /package/dist/assets/{use-vega-container-remeasure-CbKTb_jy.js → use-vega-container-remeasure-C52OJt1l.js} +0 -0
  695. /package/dist/assets/{useInterval-CWBTUy5W.js → useInterval-CnQfyMa9.js} +0 -0
  696. /package/dist/assets/{vb-i5Z8scch.js → vb-B84py4l9.js} +0 -0
  697. /package/dist/assets/{vbscript-BiPYgIyi.js → vbscript-DCWGTF8B.js} +0 -0
  698. /package/dist/assets/{velocity-Dw3R3YoX.js → velocity-COls9qbE.js} +0 -0
  699. /package/dist/assets/{verilog-B8FhJcX6.js → verilog-Dn4JRpb3.js} +0 -0
  700. /package/dist/assets/{vhdl-BqPEoXdJ.js → vhdl-DxQ-aNCu.js} +0 -0
  701. /package/dist/assets/{web-vitals-CwE0GGzl.js → web-vitals-DBq6CjRf.js} +0 -0
  702. /package/dist/assets/{webidl-mMO-qW5Q.js → webidl-IlD_Nbdp.js} +0 -0
  703. /package/dist/assets/{ws-BmTnbVEi.js → ws-Dj1iZVFK.js} +0 -0
  704. /package/dist/assets/{xquery-DvqNwq7L.js → xquery-DwkwsYYE.js} +0 -0
  705. /package/dist/assets/{yacas-Dku9Z6Kf.js → yacas-CR27GINL.js} +0 -0
  706. /package/dist/assets/{z80-DvazU5Tr.js → z80-DDujbhXi.js} +0 -0
@@ -1 +1 @@
1
- import{s as q}from"./chunk-LvLJmgfZ.js";import{u as F}from"./useEvent-D91BmmQi.js";import{t as R}from"./react-Bj1aDYRI.js";import{$r as $,E as G,Jr as H,Qr as D}from"./cells-aqfX084m.js";import{t as K}from"./compiler-runtime-B3qBwwSJ.js";import{c as U}from"./utils-BWBBpCkT.js";import{t as V}from"./jsx-runtime-Blw4afVn.js";import{_t as W,c as X,d as Y}from"./JsonOutput-B0aYK7up.js";import{t as L}from"./tooltip-4bZlU7jl.js";import{r as A,t as I}from"./button-DDGiD1NW.js";import{r as Z}from"./requests-9-v2bhoi.js";import{t as ee}from"./createLucideIcon-w-Qo9n0R.js";import{t as te}from"./useLifecycle-lLOBhc-1.js";import{t as ae}from"./spinner-D-V4psAa.js";import{r as re}from"./useTheme-Bxv9B31g.js";import{t as se}from"./copy-icon-neDQUo4Q.js";import{t as oe}from"./context-BFPaAUK_.js";import{i as ne}from"./numbers-rmawRqQP.js";import{n as ce}from"./html-to-image-B-nAUvDC.js";import{o as le}from"./focus-tOmGbv38.js";var P=ee("square-plus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),M=K(),ie=q(R(),1),s=q(V(),1);const me=i=>{let e=(0,M.c)(53),{table:t,column:a,preview:r,onAddColumnChart:c,sqlTableContext:n}=i,{theme:u}=re(),{previewDatasetColumn:l}=Z(),{locale:d}=oe(),m;e[0]!==a.name||e[1]!==l||e[2]!==n||e[3]!==t.name||e[4]!==t.source||e[5]!==t.source_type?(m=()=>{l({source:t.source,tableName:t.name,columnName:a.name,sourceType:t.source_type,fullyQualifiedTableName:$(n,t.name)})},e[0]=a.name,e[1]=l,e[2]=n,e[3]=t.name,e[4]=t.source,e[5]=t.source_type,e[6]=m):m=e[6];let p=m,h;if(e[7]!==r||e[8]!==p||e[9]!==t.source_type?(h=()=>{r||t.source_type==="connection"||t.source_type==="catalog"||p()},e[7]=r,e[8]=p,e[9]=t.source_type,e[10]=h):h=e[10],te(h),t.source_type==="connection"){let o=a.name,B=a.external_type,x;e[11]!==a.name||e[12]!==c||e[13]!==n||e[14]!==t?(x=A.stopPropagation(()=>{c(D({table:t,columnName:a.name,sqlTableContext:n}))}),e[11]=a.name,e[12]=c,e[13]=n,e[14]=t,e[15]=x):x=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=(0,s.jsx)(P,{className:"h-3 w-3 mr-1"}),e[16]=C):C=e[16];let f;e[17]===x?f=e[18]:(f=(0,s.jsxs)(I,{variant:"outline",size:"xs",onClick:x,children:[C," Add SQL cell"]}),e[17]=x,e[18]=f);let S;return e[19]!==a.external_type||e[20]!==a.name||e[21]!==f?(S=(0,s.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[o," (",B,")",f]}),e[19]=a.external_type,e[20]=a.name,e[21]=f,e[22]=S):S=e[22],S}if(t.source_type==="catalog"){let o;return e[23]!==a.external_type||e[24]!==a.name?(o=(0,s.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[a.name," (",a.external_type,")"]}),e[23]=a.external_type,e[24]=a.name,e[25]=o):o=e[25],o}if(!r){let o;return e[26]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loading..."}),e[26]=o):o=e[26],o}let g;e[27]!==r.error||e[28]!==r.missing_packages||e[29]!==p?(g=r.error&&O({error:r.error,missingPackages:r.missing_packages,refetchPreview:p}),e[27]=r.error,e[28]=r.missing_packages,e[29]=p,e[30]=g):g=e[30];let y=g,_;e[31]!==a.type||e[32]!==d||e[33]!==r.stats?(_=r.stats&&Q({stats:r.stats,dataType:a.type,locale:d}),e[31]=a.type,e[32]=d,e[33]=r.stats,e[34]=_):_=e[34];let b=_,j;e[35]!==r.chart_spec||e[36]!==u?(j=r.chart_spec&&E(r.chart_spec,u),e[35]=r.chart_spec,e[36]=u,e[37]=j):j=e[37];let N=j,k;e[38]!==r.chart_code||e[39]!==t.source_type?(k=r.chart_code&&t.source_type==="local"&&(0,s.jsx)(J,{chartCode:r.chart_code}),e[38]=r.chart_code,e[39]=t.source_type,e[40]=k):k=e[40];let T=k,w;e[41]!==a.name||e[42]!==c||e[43]!==n||e[44]!==t?(w=t.source_type==="duckdb"&&(0,s.jsx)(L,{content:"Add SQL cell",delayDuration:400,children:(0,s.jsx)(I,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-1",onClick:A.stopPropagation(()=>{c(D({table:t,columnName:a.name,sqlTableContext:n}))}),children:(0,s.jsx)(P,{className:"h-3 w-3"})})}),e[41]=a.name,e[42]=c,e[43]=n,e[44]=t,e[45]=w):w=e[45];let z=w;if(!y&&!b&&!N){let o;return e[46]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"No data"}),e[46]=o):o=e[46],o}let v;return e[47]!==T||e[48]!==z||e[49]!==N||e[50]!==y||e[51]!==b?(v=(0,s.jsxs)(Y,{children:[y,T,z,N,b]}),e[47]=T,e[48]=z,e[49]=N,e[50]=y,e[51]=b,e[52]=v):v=e[52],v};function O({error:i,missingPackages:e,refetchPreview:t}){return(0,s.jsxs)("div",{className:"text-xs text-muted-foreground p-2 border border-border rounded flex items-center justify-between",children:[(0,s.jsx)("span",{children:i}),e&&(0,s.jsx)(X,{packages:e,showMaxPackages:1,className:"w-32",onInstall:t})]})}function Q({stats:i,dataType:e,locale:t}){return(0,s.jsx)("div",{className:"gap-x-16 gap-y-1 grid grid-cols-2-fit border rounded p-2 empty:hidden",children:Object.entries(i).map(([a,r])=>r==null?null:(0,s.jsxs)("div",{className:"flex items-center gap-1 group",children:[(0,s.jsx)("span",{className:"text-xs min-w-[60px] capitalize",children:H(a,e)}),(0,s.jsx)("span",{className:"text-xs font-bold text-muted-foreground tracking-wide",children:ne(r,t)}),(0,s.jsx)(se,{className:"h-3 w-3 invisible group-hover:visible",value:String(r)})]},a))})}var pe=(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(ae,{className:"size-4"})});function E(i,e){let t=a=>({...a,background:"transparent",config:{...a.config,background:"transparent"}});return(0,s.jsx)(ie.Suspense,{fallback:pe,children:(0,s.jsx)(W,{"data-container-width":"container",spec:t(JSON.parse(i)),options:{theme:e==="dark"?"dark":"vox",height:100,width:"container",actions:!1,renderer:"canvas"}})})}const J=i=>{let e=(0,M.c)(10),{chartCode:t}=i,a=F(U),r=le(),{createNewCell:c}=G(),n;e[0]!==a||e[1]!==c||e[2]!==r?(n=p=>{p.includes("alt")&&ce({autoInstantiate:a,createNewCell:c,fromCellId:r}),c({code:p,before:!1,cellId:r??"__end__"})},e[0]=a,e[1]=c,e[2]=r,e[3]=n):n=e[3];let u=n,l;e[4]!==t||e[5]!==u?(l=A.stopPropagation(()=>u(t)),e[4]=t,e[5]=u,e[6]=l):l=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)(P,{className:"h-3 w-3"}),e[7]=d):d=e[7];let m;return e[8]===l?m=e[9]:(m=(0,s.jsx)(L,{content:"Add chart to notebook",delayDuration:400,children:(0,s.jsx)(I,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-0.5",onClick:l,children:d})}),e[8]=l,e[9]=m),m};export{Q as a,O as i,me as n,P as o,E as r,J as t};
1
+ import{s as q}from"./chunk-LvLJmgfZ.js";import{u as J}from"./useEvent-D91BmmQi.js";import{t as R}from"./react-Bj1aDYRI.js";import{E as G,di as H,oi as K,ui as D}from"./cells-CJLUCcQg.js";import{t as U}from"./compiler-runtime-B3qBwwSJ.js";import{c as V}from"./utils-BWBBpCkT.js";import{t as W}from"./jsx-runtime-Blw4afVn.js";import{f as X,l as Y,vt as Z}from"./JsonOutput-D2UI9WX5.js";import{t as L}from"./tooltip-4bZlU7jl.js";import{r as A,t as I}from"./button-DDGiD1NW.js";import{r as $}from"./requests-9-v2bhoi.js";import{t as ee}from"./createLucideIcon-w-Qo9n0R.js";import{t as te}from"./useLifecycle-lLOBhc-1.js";import{t as ae}from"./spinner-D-V4psAa.js";import{r as re}from"./useTheme-Bxv9B31g.js";import{t as se}from"./copy-icon-neDQUo4Q.js";import{t as oe}from"./context-BFPaAUK_.js";import{i as ne}from"./numbers-rmawRqQP.js";import{n as ce}from"./html-to-image-CN9yTa5s.js";import{o as le}from"./focus-B6HBbAwF.js";var P=ee("square-plus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),M=U(),ie=q(R(),1),s=q(W(),1);const me=i=>{let e=(0,M.c)(53),{table:t,column:a,preview:r,onAddColumnChart:c,sqlTableContext:n}=i,{theme:u}=re(),{previewDatasetColumn:l}=$(),{locale:d}=oe(),m;e[0]!==a.name||e[1]!==l||e[2]!==n||e[3]!==t.name||e[4]!==t.source||e[5]!==t.source_type?(m=()=>{l({source:t.source,tableName:t.name,columnName:a.name,sourceType:t.source_type,fullyQualifiedTableName:H(n,t.name)})},e[0]=a.name,e[1]=l,e[2]=n,e[3]=t.name,e[4]=t.source,e[5]=t.source_type,e[6]=m):m=e[6];let p=m,h;if(e[7]!==r||e[8]!==p||e[9]!==t.source_type?(h=()=>{r||t.source_type==="connection"||t.source_type==="catalog"||p()},e[7]=r,e[8]=p,e[9]=t.source_type,e[10]=h):h=e[10],te(h),t.source_type==="connection"){let o=a.name,F=a.external_type,x;e[11]!==a.name||e[12]!==c||e[13]!==n||e[14]!==t?(x=A.stopPropagation(()=>{c(D({table:t,columnName:a.name,sqlTableContext:n}))}),e[11]=a.name,e[12]=c,e[13]=n,e[14]=t,e[15]=x):x=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=(0,s.jsx)(P,{className:"h-3 w-3 mr-1"}),e[16]=C):C=e[16];let f;e[17]===x?f=e[18]:(f=(0,s.jsxs)(I,{variant:"outline",size:"xs",onClick:x,children:[C," Add SQL cell"]}),e[17]=x,e[18]=f);let S;return e[19]!==a.external_type||e[20]!==a.name||e[21]!==f?(S=(0,s.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[o," (",F,")",f]}),e[19]=a.external_type,e[20]=a.name,e[21]=f,e[22]=S):S=e[22],S}if(t.source_type==="catalog"){let o;return e[23]!==a.external_type||e[24]!==a.name?(o=(0,s.jsxs)("span",{className:"text-xs text-muted-foreground gap-2 flex items-center justify-between pl-7",children:[a.name," (",a.external_type,")"]}),e[23]=a.external_type,e[24]=a.name,e[25]=o):o=e[25],o}if(!r){let o;return e[26]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loading..."}),e[26]=o):o=e[26],o}let g;e[27]!==r.error||e[28]!==r.missing_packages||e[29]!==p?(g=r.error&&O({error:r.error,missingPackages:r.missing_packages,refetchPreview:p}),e[27]=r.error,e[28]=r.missing_packages,e[29]=p,e[30]=g):g=e[30];let y=g,_;e[31]!==a.type||e[32]!==d||e[33]!==r.stats?(_=r.stats&&Q({stats:r.stats,dataType:a.type,locale:d}),e[31]=a.type,e[32]=d,e[33]=r.stats,e[34]=_):_=e[34];let b=_,j;e[35]!==r.chart_spec||e[36]!==u?(j=r.chart_spec&&E(r.chart_spec,u),e[35]=r.chart_spec,e[36]=u,e[37]=j):j=e[37];let N=j,k;e[38]!==r.chart_code||e[39]!==t.source_type?(k=r.chart_code&&t.source_type==="local"&&(0,s.jsx)(B,{chartCode:r.chart_code}),e[38]=r.chart_code,e[39]=t.source_type,e[40]=k):k=e[40];let T=k,v;e[41]!==a.name||e[42]!==c||e[43]!==n||e[44]!==t?(v=t.source_type==="duckdb"&&(0,s.jsx)(L,{content:"Add SQL cell",delayDuration:400,children:(0,s.jsx)(I,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-1",onClick:A.stopPropagation(()=>{c(D({table:t,columnName:a.name,sqlTableContext:n}))}),children:(0,s.jsx)(P,{className:"h-3 w-3"})})}),e[41]=a.name,e[42]=c,e[43]=n,e[44]=t,e[45]=v):v=e[45];let z=v;if(!y&&!b&&!N){let o;return e[46]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"No data"}),e[46]=o):o=e[46],o}let w;return e[47]!==T||e[48]!==z||e[49]!==N||e[50]!==y||e[51]!==b?(w=(0,s.jsxs)(X,{children:[y,T,z,N,b]}),e[47]=T,e[48]=z,e[49]=N,e[50]=y,e[51]=b,e[52]=w):w=e[52],w};function O({error:i,missingPackages:e,refetchPreview:t}){return(0,s.jsxs)("div",{className:"text-xs text-muted-foreground p-2 border border-border rounded flex items-center justify-between",children:[(0,s.jsx)("span",{children:i}),e&&(0,s.jsx)(Y,{packages:e,showMaxPackages:1,className:"w-32",onInstall:t})]})}function Q({stats:i,dataType:e,locale:t}){return(0,s.jsx)("div",{className:"gap-x-16 gap-y-1 grid grid-cols-2-fit border rounded p-2 empty:hidden",children:Object.entries(i).map(([a,r])=>r==null?null:(0,s.jsxs)("div",{className:"flex items-center gap-1 group",children:[(0,s.jsx)("span",{className:"text-xs min-w-[60px] capitalize",children:K(a,e)}),(0,s.jsx)("span",{className:"text-xs font-bold text-muted-foreground tracking-wide",children:ne(r,t)}),(0,s.jsx)(se,{className:"h-3 w-3 invisible group-hover:visible",value:String(r)})]},a))})}var pe=(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(ae,{className:"size-4"})});function E(i,e){let t=a=>({...a,background:"transparent",config:{...a.config,background:"transparent"}});return(0,s.jsx)(ie.Suspense,{fallback:pe,children:(0,s.jsx)(Z,{"data-container-width":"container",spec:t(JSON.parse(i)),options:{theme:e==="dark"?"dark":"vox",height:100,width:"container",actions:!1,renderer:"canvas"}})})}const B=i=>{let e=(0,M.c)(10),{chartCode:t}=i,a=J(V),r=le(),{createNewCell:c}=G(),n;e[0]!==a||e[1]!==c||e[2]!==r?(n=p=>{p.includes("alt")&&ce({autoInstantiate:a,createNewCell:c,fromCellId:r}),c({code:p,before:!1,cellId:r??"__end__"})},e[0]=a,e[1]=c,e[2]=r,e[3]=n):n=e[3];let u=n,l;e[4]!==t||e[5]!==u?(l=A.stopPropagation(()=>u(t)),e[4]=t,e[5]=u,e[6]=l):l=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)(P,{className:"h-3 w-3"}),e[7]=d):d=e[7];let m;return e[8]===l?m=e[9]:(m=(0,s.jsx)(L,{content:"Add chart to notebook",delayDuration:400,children:(0,s.jsx)(I,{variant:"outline",size:"icon",className:"z-10 bg-background absolute right-1 -top-0.5",onClick:l,children:d})}),e[8]=l,e[9]=m),m};export{Q as a,O as i,me as n,P as o,E as r,B as t};
@@ -1 +1 @@
1
- import{s as W}from"./chunk-LvLJmgfZ.js";import{l as X,u as V}from"./useEvent-D91BmmQi.js";import"./react-Bj1aDYRI.js";import"./cells-aqfX084m.js";import"./react-dom-CSu739Rf.js";import{t as U}from"./compiler-runtime-B3qBwwSJ.js";import{S as Y}from"./ai-model-dropdown-C7iiWBqP.js";import{m as Z,t as ee,u as le}from"./useEventListener-C0195JsF.js";import{t as te}from"./objects-BlG0ZrO0.js";import{C as ie,S as ae,g as oe}from"./utils-BWBBpCkT.js";import"./readonly-python-code-DB23yd7T.js";import{t as re}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import"./JsonOutput-B0aYK7up.js";import"./download-CkMUlfM3.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as ne}from"./requests-9-v2bhoi.js";import"./layout-1Z2AhO6k.js";import{t as de}from"./useCellActionButton-BG7n5b0H.js";import"./markdown-renderer-Cs1sISb9.js";import{a as pe,c as se,t as me}from"./useNotebookActions-COdGI2fR.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import"./purify.es-CWmnYhGI.js";import"./dates-C2LWzsCZ.js";import{n as he}from"./useHotkey-DLZvrRZT.js";import"./share-852X_cqy.js";import"./tooltip-B7U4xkIN.js";import"./vega-loader.browser-Dun7Qe4B.js";import"./defaultLocale-DOVIEEPN.js";import"./defaultLocale-BUCH2FMc.js";import"./chunk-5FQGJX7Z-Cp0LZT-a.js";import"./html-to-image-B-nAUvDC.js";import{r as ce}from"./focus-tOmGbv38.js";import"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import{a as ye,c as fe,i as B,l as z,n as ue,o as J,r as be,s as ge}from"./command-Dqxie4gq.js";import{t as L}from"./renderShortcut-Bl8_FVn8.js";import"./esm-B30N1GS0.js";import"./name-cell-input-2sM8a_OS.js";import"./multi-icon-nrKPWjDU.js";import"./dist-D5ToCtv8.js";import"./dist-D35OyUMQ.js";import"./dist-ByK00N0T.js";import"./dist-C5kf6g-d.js";import"./dist-BaKJ0-Tb.js";import"./dist-DNGKAtWk.js";import"./dist-56ul6-mm.js";import"./dist-3N7-WLqi.js";import"./dist-CM-lWxt3.js";import"./esm-Cmv0Nuxi.js";var ke=U(),we=3;function Ce(){let e=(0,ke.c)(7),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let[o,d]=se("marimo:commands",l),s;e[1]!==o||e[2]!==d?(s=u=>{d(xe([u,...o]).slice(0,we))},e[1]=o,e[2]=d,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==s?(r={recentCommands:o,addRecentCommand:s},e[4]=o,e[5]=s,e[6]=r):r=e[6],r}function xe(e){return[...new Set(e)]}function Q(e){return e.dropdown!==void 0}function T(e,l=""){return e.flatMap(o=>o.label?Q(o)?T(o.dropdown,`${l+o.label} > `):{...o,label:l+o.label,additionalKeywords:o.additionalKeywords}:[])}var je=U();function Se(){let e=(0,je.c)(75),[l,o]=ie(),[d,s]=ae(),{saveAppConfig:r,saveUserConfig:u}=ne(),D;e[0]!==u||e[1]!==o?(D=async p=>{await u({config:p}).then(()=>{o(m=>({...m,...p}))})},e[0]=u,e[1]=o,e[2]=D):D=e[2];let t=D,F;e[3]!==r||e[4]!==s?(F=async p=>{await r({config:p}).then(()=>{s(p)})},e[3]=r,e[4]=s,e[5]=F):F=e[5];let N=F,G;if(e[6]!==d||e[7]!==l.completion||e[8]!==l.display||e[9]!==l.keymap||e[10]!==N||e[11]!==t){let p;e[13]===d?p=e[14]:(p=q=>q!==d.width,e[13]=d,e[14]=p);let m;e[15]!==d||e[16]!==N?(m=q=>({label:`App config > Set width=${q}`,handle:()=>{N({...d,width:q})}}),e[15]=d,e[16]=N,e[17]=m):m=e[17];let j;e[18]!==l.display||e[19]!==t?(j={label:"Config > Set theme: dark",handle:()=>{t({display:{...l.display,theme:"dark"}})}},e[18]=l.display,e[19]=t,e[20]=j):j=e[20];let b;e[21]!==l.display||e[22]!==t?(b={label:"Config > Set theme: light",handle:()=>{t({display:{...l.display,theme:"light"}})}},e[21]=l.display,e[22]=t,e[23]=b):b=e[23];let S;e[24]!==l.display||e[25]!==t?(S={label:"Config > Set theme: system",handle:()=>{t({display:{...l.display,theme:"system"}})}},e[24]=l.display,e[25]=t,e[26]=S):S=e[26];let R=l.keymap.preset==="vim",_;e[27]!==l.keymap||e[28]!==t?(_=()=>{t({keymap:{...l.keymap,preset:"vim"}})},e[27]=l.keymap,e[28]=t,e[29]=_):_=e[29];let v;e[30]!==R||e[31]!==_?(v={label:"Config > Switch keymap to VIM",hidden:R,handle:_},e[30]=R,e[31]=_,e[32]=v):v=e[32];let K=l.keymap.preset==="default",g;e[33]!==l.keymap||e[34]!==t?(g=()=>{t({keymap:{...l.keymap,preset:"default"}})},e[33]=l.keymap,e[34]=t,e[35]=g):g=e[35];let c;e[36]!==K||e[37]!==g?(c={label:"Config > Switch keymap to default (current: VIM)",hidden:K,handle:g},e[36]=K,e[37]=g,e[38]=c):c=e[38];let k;e[39]!==l.completion||e[40]!==t?(k=()=>{t({completion:{...l.completion,copilot:!1}})},e[39]=l.completion,e[40]=t,e[41]=k):k=e[41];let w=l.completion.copilot!=="github",E;e[42]!==k||e[43]!==w?(E={label:"Config > Disable GitHub Copilot",handle:k,hidden:w},e[42]=k,e[43]=w,e[44]=E):E=e[44];let C;e[45]!==l.completion||e[46]!==t?(C=()=>{t({completion:{...l.completion,copilot:"github"}})},e[45]=l.completion,e[46]=t,e[47]=C):C=e[47];let O=l.completion.copilot==="github",I;e[48]!==C||e[49]!==O?(I={label:"Config > Enable GitHub Copilot",handle:C,hidden:O},e[48]=C,e[49]=O,e[50]=I):I=e[50];let $=!l.display.reference_highlighting,x;e[51]!==l.display||e[52]!==t?(x=()=>{t({display:{...l.display,reference_highlighting:!1}})},e[51]=l.display,e[52]=t,e[53]=x):x=e[53];let y;e[54]!==$||e[55]!==x?(y={label:"Config > Disable reference highlighting",hidden:$,handle:x},e[54]=$,e[55]=x,e[56]=y):y=e[56];let h;e[57]!==l.display||e[58]!==t?(h=()=>{t({display:{...l.display,reference_highlighting:!0}})},e[57]=l.display,e[58]=t,e[59]=h):h=e[59];let H;e[60]!==l.display.reference_highlighting||e[61]!==h?(H={label:"Config > Enable reference highlighting",hidden:l.display.reference_highlighting,handle:h},e[60]=l.display.reference_highlighting,e[61]=h,e[62]=H):H=e[62];let i=l.display.cell_output==="above",a;e[63]!==l.display||e[64]!==t?(a=()=>{t({display:{...l.display,cell_output:"above"}})},e[63]=l.display,e[64]=t,e[65]=a):a=e[65];let A;e[66]!==i||e[67]!==a?(A={label:"Config > Set cell output area: above",hidden:i,handle:a},e[66]=i,e[67]=a,e[68]=A):A=e[68];let f=l.display.cell_output==="below",M;e[69]!==l.display||e[70]!==t?(M=()=>{t({display:{...l.display,cell_output:"below"}})},e[69]=l.display,e[70]=t,e[71]=M):M=e[71];let P;e[72]!==f||e[73]!==M?(P={label:"Config > Set cell output area: below",hidden:f,handle:M},e[72]=f,e[73]=M,e[74]=P):P=e[74],G=[...Y().filter(p).map(m),j,b,S,v,c,E,I,y,H,A,P].filter(_e),e[6]=d,e[7]=l.completion,e[8]=l.display,e[9]=l.keymap,e[10]=N,e[11]=t,e[12]=G}else G=e[12];return G}function _e(e){return!e.hidden}var ve=U(),n=W(re(),1),Ke=()=>{let e=(0,ve.c)(37),[l,o]=X(pe),d=he(),s=V(ce),r=V(oe),u;e[0]===s?u=e[1]:(u={cell:s},e[0]=s,e[1]=u);let D=de(u).flat();D=T(D);let t=Se(),F=me();F=[...T(F),...T(t)];let N=F.filter(He),G=te.keyBy(N,Ae),{recentCommands:p,addRecentCommand:m}=Ce(),j;e[2]===p?j=e[3]:(j=new Set(p),e[2]=p,e[3]=j);let b=j,S;e[4]!==r||e[5]!==o?(S=i=>{Z(r.getHotkey("global.commandPalette").key)(i)&&(i.preventDefault(),o(Me))},e[4]=r,e[5]=o,e[6]=S):S=e[6],ee(document,"keydown",S);let R;e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==o?(R=(i,a)=>{let A=d[i];if(!A)return null;let f=r.getHotkey(i);return(0,n.jsxs)(J,{disabled:a.disabled,keywords:f.additionalKeywords,onSelect:()=>{m(i),o(!1),requestAnimationFrame(()=>{A()})},value:f.name,children:[(0,n.jsxs)("span",{children:[f.name,a.tooltip&&(0,n.jsx)("span",{className:"ml-2",children:a.tooltip})]}),(0,n.jsx)(z,{children:(0,n.jsx)(L,{shortcut:f.key})})]},i)},e[7]=m,e[8]=r,e[9]=d,e[10]=o,e[11]=R):R=e[11];let _=R,v;e[12]!==m||e[13]!==r||e[14]!==o?(v=i=>{let{label:a,handle:A,props:f,hotkey:M,additionalKeywords:P}=i,q=f===void 0?{}:f;return(0,n.jsxs)(J,{disabled:q.disabled,keywords:P,onSelect:()=>{m(a),o(!1),requestAnimationFrame(()=>{A()})},value:a,children:[(0,n.jsxs)("span",{children:[a,q.tooltip&&(0,n.jsxs)("span",{className:"ml-2",children:["(",q.tooltip,")"]})]}),M&&(0,n.jsx)(z,{children:(0,n.jsx)(L,{shortcut:r.getHotkey(M).key})})]},a)},e[12]=m,e[13]=r,e[14]=o,e[15]=v):v=e[15];let K=v,g=ue,c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)(ye,{placeholder:"Type to search..."}),e[16]=c):c=e[16];let k=ge,w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=(0,n.jsx)(be,{children:"No results found."}),e[17]=w):w=e[17];let E=p.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(B,{heading:"Recently Used",children:p.map(i=>{let a=G[i];return le(i)?_(i,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip}):a&&!Q(a)?K({label:a.label,handle:a.handleHeadless||a.handle,props:{disabled:a.disabled,tooltip:a.tooltip},additionalKeywords:a.additionalKeywords}):null})}),(0,n.jsx)(fe,{})]}),C=B,O=r.iterate().map(i=>{if(b.has(i))return null;let a=G[i];return _(i,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip})}),I=N.map(i=>b.has(i.label)?null:K({label:i.label,handle:i.handleHeadless||i.handle,props:{disabled:i.disabled,tooltip:i.tooltip},additionalKeywords:i.additionalKeywords})),$;e[18]!==b||e[19]!==K?($=i=>b.has(i.label)?null:K({label:`Cell > ${i.label}`,handle:i.handleHeadless||i.handle,props:{disabled:i.disabled,tooltip:i.tooltip},additionalKeywords:i.additionalKeywords}),e[18]=b,e[19]=K,e[20]=$):$=e[20];let x=D.map($),y;e[21]!==C||e[22]!==I||e[23]!==x||e[24]!==O?(y=(0,n.jsxs)(C,{heading:"Commands",children:[O,I,x]}),e[21]=C,e[22]=I,e[23]=x,e[24]=O,e[25]=y):y=e[25];let h;e[26]!==k||e[27]!==y||e[28]!==w||e[29]!==E?(h=(0,n.jsxs)(k,{children:[w,E,y]}),e[26]=k,e[27]=y,e[28]=w,e[29]=E,e[30]=h):h=e[30];let H;return e[31]!==g||e[32]!==l||e[33]!==o||e[34]!==h||e[35]!==c?(H=(0,n.jsxs)(g,{open:l,onOpenChange:o,children:[c,h]}),e[31]=g,e[32]=l,e[33]=o,e[34]=h,e[35]=c,e[36]=H):H=e[36],H};function He(e){return!e.hotkey}function Ae(e){return e.label}function Me(e){return!e}export{Ke as default};
1
+ import{s as W}from"./chunk-LvLJmgfZ.js";import{l as X,u as V}from"./useEvent-D91BmmQi.js";import"./react-Bj1aDYRI.js";import"./cells-CJLUCcQg.js";import"./react-dom-CSu739Rf.js";import{t as U}from"./compiler-runtime-B3qBwwSJ.js";import{S as Y}from"./ai-model-dropdown-DzobPTdx.js";import{m as Z,t as ee,u as le}from"./useEventListener-C0195JsF.js";import{t as te}from"./objects-BlG0ZrO0.js";import{C as ie,S as ae,g as oe}from"./utils-BWBBpCkT.js";import"./readonly-python-code-CYfbPYQ0.js";import{t as re}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import"./JsonOutput-D2UI9WX5.js";import"./download-DwYUg-o4.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as ne}from"./requests-9-v2bhoi.js";import"./layout-B6D_84rz.js";import{t as de}from"./useCellActionButton-B5wkKtv1.js";import"./markdown-renderer-CzJx-MnJ.js";import{a as pe,c as se,t as me}from"./useNotebookActions-CCwjICU_.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import"./purify.es-CWmnYhGI.js";import"./dates-C2LWzsCZ.js";import{n as he}from"./useHotkey-DLZvrRZT.js";import"./share-852X_cqy.js";import"./tooltip-B7U4xkIN.js";import"./vega-loader.browser-Dun7Qe4B.js";import"./defaultLocale-DOVIEEPN.js";import"./defaultLocale-BUCH2FMc.js";import"./chunk-5FQGJX7Z-CYQpNADu.js";import"./html-to-image-CN9yTa5s.js";import{r as ce}from"./focus-B6HBbAwF.js";import"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import{a as ye,c as fe,i as B,l as z,n as ue,o as J,r as be,s as ge}from"./command-Dqxie4gq.js";import{t as L}from"./renderShortcut-Bl8_FVn8.js";import"./esm-B30N1GS0.js";import"./name-cell-input-Bq1sljc2.js";import"./multi-icon-DVD1luis.js";import"./dist-CZvbHnyT.js";import"./dist-C-3FVUQA.js";import"./dist-l4RTzHX-.js";import"./dist-fLBYOt9R.js";import"./dist-DJuRuTXr.js";import"./dist-BKgHjzML.js";import"./dist-kLs0VbW_.js";import"./dist-D47O3FBX.js";import"./dist-DQl27SFq.js";import"./esm-BDGraAqp.js";var ke=U(),we=3;function Ce(){let e=(0,ke.c)(7),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];let[o,d]=se("marimo:commands",l),s;e[1]!==o||e[2]!==d?(s=u=>{d(xe([u,...o]).slice(0,we))},e[1]=o,e[2]=d,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==s?(r={recentCommands:o,addRecentCommand:s},e[4]=o,e[5]=s,e[6]=r):r=e[6],r}function xe(e){return[...new Set(e)]}function Q(e){return e.dropdown!==void 0}function T(e,l=""){return e.flatMap(o=>o.label?Q(o)?T(o.dropdown,`${l+o.label} > `):{...o,label:l+o.label,additionalKeywords:o.additionalKeywords}:[])}var je=U();function Se(){let e=(0,je.c)(75),[l,o]=ie(),[d,s]=ae(),{saveAppConfig:r,saveUserConfig:u}=ne(),D;e[0]!==u||e[1]!==o?(D=async p=>{await u({config:p}).then(()=>{o(m=>({...m,...p}))})},e[0]=u,e[1]=o,e[2]=D):D=e[2];let t=D,F;e[3]!==r||e[4]!==s?(F=async p=>{await r({config:p}).then(()=>{s(p)})},e[3]=r,e[4]=s,e[5]=F):F=e[5];let N=F,G;if(e[6]!==d||e[7]!==l.completion||e[8]!==l.display||e[9]!==l.keymap||e[10]!==N||e[11]!==t){let p;e[13]===d?p=e[14]:(p=q=>q!==d.width,e[13]=d,e[14]=p);let m;e[15]!==d||e[16]!==N?(m=q=>({label:`App config > Set width=${q}`,handle:()=>{N({...d,width:q})}}),e[15]=d,e[16]=N,e[17]=m):m=e[17];let j;e[18]!==l.display||e[19]!==t?(j={label:"Config > Set theme: dark",handle:()=>{t({display:{...l.display,theme:"dark"}})}},e[18]=l.display,e[19]=t,e[20]=j):j=e[20];let b;e[21]!==l.display||e[22]!==t?(b={label:"Config > Set theme: light",handle:()=>{t({display:{...l.display,theme:"light"}})}},e[21]=l.display,e[22]=t,e[23]=b):b=e[23];let S;e[24]!==l.display||e[25]!==t?(S={label:"Config > Set theme: system",handle:()=>{t({display:{...l.display,theme:"system"}})}},e[24]=l.display,e[25]=t,e[26]=S):S=e[26];let R=l.keymap.preset==="vim",_;e[27]!==l.keymap||e[28]!==t?(_=()=>{t({keymap:{...l.keymap,preset:"vim"}})},e[27]=l.keymap,e[28]=t,e[29]=_):_=e[29];let v;e[30]!==R||e[31]!==_?(v={label:"Config > Switch keymap to VIM",hidden:R,handle:_},e[30]=R,e[31]=_,e[32]=v):v=e[32];let K=l.keymap.preset==="default",g;e[33]!==l.keymap||e[34]!==t?(g=()=>{t({keymap:{...l.keymap,preset:"default"}})},e[33]=l.keymap,e[34]=t,e[35]=g):g=e[35];let c;e[36]!==K||e[37]!==g?(c={label:"Config > Switch keymap to default (current: VIM)",hidden:K,handle:g},e[36]=K,e[37]=g,e[38]=c):c=e[38];let k;e[39]!==l.completion||e[40]!==t?(k=()=>{t({completion:{...l.completion,copilot:!1}})},e[39]=l.completion,e[40]=t,e[41]=k):k=e[41];let w=l.completion.copilot!=="github",E;e[42]!==k||e[43]!==w?(E={label:"Config > Disable GitHub Copilot",handle:k,hidden:w},e[42]=k,e[43]=w,e[44]=E):E=e[44];let C;e[45]!==l.completion||e[46]!==t?(C=()=>{t({completion:{...l.completion,copilot:"github"}})},e[45]=l.completion,e[46]=t,e[47]=C):C=e[47];let O=l.completion.copilot==="github",I;e[48]!==C||e[49]!==O?(I={label:"Config > Enable GitHub Copilot",handle:C,hidden:O},e[48]=C,e[49]=O,e[50]=I):I=e[50];let $=!l.display.reference_highlighting,x;e[51]!==l.display||e[52]!==t?(x=()=>{t({display:{...l.display,reference_highlighting:!1}})},e[51]=l.display,e[52]=t,e[53]=x):x=e[53];let y;e[54]!==$||e[55]!==x?(y={label:"Config > Disable reference highlighting",hidden:$,handle:x},e[54]=$,e[55]=x,e[56]=y):y=e[56];let h;e[57]!==l.display||e[58]!==t?(h=()=>{t({display:{...l.display,reference_highlighting:!0}})},e[57]=l.display,e[58]=t,e[59]=h):h=e[59];let H;e[60]!==l.display.reference_highlighting||e[61]!==h?(H={label:"Config > Enable reference highlighting",hidden:l.display.reference_highlighting,handle:h},e[60]=l.display.reference_highlighting,e[61]=h,e[62]=H):H=e[62];let i=l.display.cell_output==="above",a;e[63]!==l.display||e[64]!==t?(a=()=>{t({display:{...l.display,cell_output:"above"}})},e[63]=l.display,e[64]=t,e[65]=a):a=e[65];let A;e[66]!==i||e[67]!==a?(A={label:"Config > Set cell output area: above",hidden:i,handle:a},e[66]=i,e[67]=a,e[68]=A):A=e[68];let f=l.display.cell_output==="below",M;e[69]!==l.display||e[70]!==t?(M=()=>{t({display:{...l.display,cell_output:"below"}})},e[69]=l.display,e[70]=t,e[71]=M):M=e[71];let P;e[72]!==f||e[73]!==M?(P={label:"Config > Set cell output area: below",hidden:f,handle:M},e[72]=f,e[73]=M,e[74]=P):P=e[74],G=[...Y().filter(p).map(m),j,b,S,v,c,E,I,y,H,A,P].filter(_e),e[6]=d,e[7]=l.completion,e[8]=l.display,e[9]=l.keymap,e[10]=N,e[11]=t,e[12]=G}else G=e[12];return G}function _e(e){return!e.hidden}var ve=U(),n=W(re(),1),Ke=()=>{let e=(0,ve.c)(37),[l,o]=X(pe),d=he(),s=V(ce),r=V(oe),u;e[0]===s?u=e[1]:(u={cell:s},e[0]=s,e[1]=u);let D=de(u).flat();D=T(D);let t=Se(),F=me();F=[...T(F),...T(t)];let N=F.filter(He),G=te.keyBy(N,Ae),{recentCommands:p,addRecentCommand:m}=Ce(),j;e[2]===p?j=e[3]:(j=new Set(p),e[2]=p,e[3]=j);let b=j,S;e[4]!==r||e[5]!==o?(S=i=>{Z(r.getHotkey("global.commandPalette").key)(i)&&(i.preventDefault(),o(Me))},e[4]=r,e[5]=o,e[6]=S):S=e[6],ee(document,"keydown",S);let R;e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==o?(R=(i,a)=>{let A=d[i];if(!A)return null;let f=r.getHotkey(i);return(0,n.jsxs)(J,{disabled:a.disabled,keywords:f.additionalKeywords,onSelect:()=>{m(i),o(!1),requestAnimationFrame(()=>{A()})},value:f.name,children:[(0,n.jsxs)("span",{children:[f.name,a.tooltip&&(0,n.jsx)("span",{className:"ml-2",children:a.tooltip})]}),(0,n.jsx)(z,{children:(0,n.jsx)(L,{shortcut:f.key})})]},i)},e[7]=m,e[8]=r,e[9]=d,e[10]=o,e[11]=R):R=e[11];let _=R,v;e[12]!==m||e[13]!==r||e[14]!==o?(v=i=>{let{label:a,handle:A,props:f,hotkey:M,additionalKeywords:P}=i,q=f===void 0?{}:f;return(0,n.jsxs)(J,{disabled:q.disabled,keywords:P,onSelect:()=>{m(a),o(!1),requestAnimationFrame(()=>{A()})},value:a,children:[(0,n.jsxs)("span",{children:[a,q.tooltip&&(0,n.jsxs)("span",{className:"ml-2",children:["(",q.tooltip,")"]})]}),M&&(0,n.jsx)(z,{children:(0,n.jsx)(L,{shortcut:r.getHotkey(M).key})})]},a)},e[12]=m,e[13]=r,e[14]=o,e[15]=v):v=e[15];let K=v,g=ue,c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)(ye,{placeholder:"Type to search..."}),e[16]=c):c=e[16];let k=ge,w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=(0,n.jsx)(be,{children:"No results found."}),e[17]=w):w=e[17];let E=p.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(B,{heading:"Recently Used",children:p.map(i=>{let a=G[i];return le(i)?_(i,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip}):a&&!Q(a)?K({label:a.label,handle:a.handleHeadless||a.handle,props:{disabled:a.disabled,tooltip:a.tooltip},additionalKeywords:a.additionalKeywords}):null})}),(0,n.jsx)(fe,{})]}),C=B,O=r.iterate().map(i=>{if(b.has(i))return null;let a=G[i];return _(i,{disabled:a==null?void 0:a.disabled,tooltip:a==null?void 0:a.tooltip})}),I=N.map(i=>b.has(i.label)?null:K({label:i.label,handle:i.handleHeadless||i.handle,props:{disabled:i.disabled,tooltip:i.tooltip},additionalKeywords:i.additionalKeywords})),$;e[18]!==b||e[19]!==K?($=i=>b.has(i.label)?null:K({label:`Cell > ${i.label}`,handle:i.handleHeadless||i.handle,props:{disabled:i.disabled,tooltip:i.tooltip},additionalKeywords:i.additionalKeywords}),e[18]=b,e[19]=K,e[20]=$):$=e[20];let x=D.map($),y;e[21]!==C||e[22]!==I||e[23]!==x||e[24]!==O?(y=(0,n.jsxs)(C,{heading:"Commands",children:[O,I,x]}),e[21]=C,e[22]=I,e[23]=x,e[24]=O,e[25]=y):y=e[25];let h;e[26]!==k||e[27]!==y||e[28]!==w||e[29]!==E?(h=(0,n.jsxs)(k,{children:[w,E,y]}),e[26]=k,e[27]=y,e[28]=w,e[29]=E,e[30]=h):h=e[30];let H;return e[31]!==g||e[32]!==l||e[33]!==o||e[34]!==h||e[35]!==c?(H=(0,n.jsxs)(g,{open:l,onOpenChange:o,children:[c,h]}),e[31]=g,e[32]=l,e[33]=o,e[34]=h,e[35]=c,e[36]=H):H=e[36],H};function He(e){return!e.hotkey}function Ae(e){return e.label}function Me(e){return!e}export{Ke as default};
@@ -1 +1 @@
1
- import{s as v}from"./chunk-LvLJmgfZ.js";import{t as w}from"./react-Bj1aDYRI.js";import{j as k}from"./cells-aqfX084m.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as N}from"./jsx-runtime-Blw4afVn.js";import{i as y,r as C,t as _}from"./popover-Bcz1Zikb.js";import{t as b}from"./badge-B92a4ePY.js";import{t as S}from"./use-toast-BwJoaaDM.js";import{n as I}from"./copy-Bxb1_Gtw.js";import{t as j}from"./cell-link-C0hhYyNu.js";var O=g(),i=v(N(),1);const B=p=>{let e=(0,O.c)(18),{maxCount:n,cellIds:r,onClick:t,skipScroll:o}=p,m=k(),l,a,c;if(e[0]!==r||e[1]!==m||e[2]!==n||e[3]!==t||e[4]!==o){c=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===m?f=e[9]:(f=(s,x)=>m.inOrderIds.indexOf(s)-m.inOrderIds.indexOf(x),e[8]=m,e[9]=f);let u=r.toSorted(f);if(r.length===0){let s;e[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("div",{className:"text-muted-foreground",children:"--"}),e[10]=s):s=e[10],c=s;break e}let h;e[11]!==r.length||e[12]!==t||e[13]!==o?(h=(s,x)=>(0,i.jsxs)("span",{className:"truncate",children:[(0,i.jsx)(j,{variant:"focus",cellId:s,skipScroll:o,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s),x<r.length-1&&", "]},s),e[11]=r.length,e[12]=t,e[13]=o,e[14]=h):h=e[14],l=u.slice(0,n).map(h),a=r.length>n&&(0,i.jsxs)(_,{children:[(0,i.jsx)(y,{asChild:!0,children:(0,i.jsxs)("span",{className:"whitespace-nowrap text-muted-foreground text-xs hover:underline cursor-pointer",children:["+",r.length-n," more"]})}),(0,i.jsx)(C,{className:"w-auto",children:(0,i.jsx)("div",{className:"flex flex-col gap-1 py-1",children:u.slice(n).map(s=>(0,i.jsx)(j,{variant:"focus",cellId:s,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s))})})]})}e[0]=r,e[1]=m,e[2]=n,e[3]=t,e[4]=o,e[5]=l,e[6]=a,e[7]=c}else l=e[5],a=e[6],c=e[7];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[15]!==l||e[16]!==a?(d=(0,i.jsxs)(i.Fragment,{children:[l,a]}),e[15]=l,e[16]=a,e[17]=d):d=e[17],d};var F=g();w();const q=p=>{let e=(0,F.c)(15),n,r,t,o;e[0]===p?(n=e[1],r=e[2],t=e[3],o=e[4]):({name:r,declaredBy:n,onClick:t,...o}=p,e[0]=p,e[1]=n,e[2]=r,e[3]=t,e[4]=o);let m=n.length>1?"destructive":"outline",l;e[5]!==r||e[6]!==t?(l=async d=>{if(t){t(d);return}await I(r),S({title:"Copied to clipboard"})},e[5]=r,e[6]=t,e[7]=l):l=e[7];let a;e[8]!==r||e[9]!==m||e[10]!==l?(a=(0,i.jsx)(b,{title:r,variant:m,className:"rounded-sm text-ellipsis block overflow-hidden max-w-fit cursor-pointer font-medium",onClick:l,children:r}),e[8]=r,e[9]=m,e[10]=l,e[11]=a):a=e[11];let c;return e[12]!==o||e[13]!==a?(c=(0,i.jsx)("div",{className:"max-w-[130px]",...o,children:a}),e[12]=o,e[13]=a,e[14]=c):c=e[14],c};export{B as n,q as t};
1
+ import{s as v}from"./chunk-LvLJmgfZ.js";import{t as w}from"./react-Bj1aDYRI.js";import{j as k}from"./cells-CJLUCcQg.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as N}from"./jsx-runtime-Blw4afVn.js";import{i as y,r as C,t as _}from"./popover-Bcz1Zikb.js";import{t as b}from"./badge-B92a4ePY.js";import{t as S}from"./use-toast-BwJoaaDM.js";import{n as I}from"./copy-Bxb1_Gtw.js";import{t as j}from"./cell-link-CWQ4BYr-.js";var O=g(),i=v(N(),1);const B=p=>{let e=(0,O.c)(18),{maxCount:n,cellIds:r,onClick:t,skipScroll:o}=p,m=k(),l,a,c;if(e[0]!==r||e[1]!==m||e[2]!==n||e[3]!==t||e[4]!==o){c=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===m?f=e[9]:(f=(s,x)=>m.inOrderIds.indexOf(s)-m.inOrderIds.indexOf(x),e[8]=m,e[9]=f);let u=r.toSorted(f);if(r.length===0){let s;e[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("div",{className:"text-muted-foreground",children:"--"}),e[10]=s):s=e[10],c=s;break e}let h;e[11]!==r.length||e[12]!==t||e[13]!==o?(h=(s,x)=>(0,i.jsxs)("span",{className:"truncate",children:[(0,i.jsx)(j,{variant:"focus",cellId:s,skipScroll:o,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s),x<r.length-1&&", "]},s),e[11]=r.length,e[12]=t,e[13]=o,e[14]=h):h=e[14],l=u.slice(0,n).map(h),a=r.length>n&&(0,i.jsxs)(_,{children:[(0,i.jsx)(y,{asChild:!0,children:(0,i.jsxs)("span",{className:"whitespace-nowrap text-muted-foreground text-xs hover:underline cursor-pointer",children:["+",r.length-n," more"]})}),(0,i.jsx)(C,{className:"w-auto",children:(0,i.jsx)("div",{className:"flex flex-col gap-1 py-1",children:u.slice(n).map(s=>(0,i.jsx)(j,{variant:"focus",cellId:s,className:"whitespace-nowrap",onClick:t?()=>t(s):void 0},s))})})]})}e[0]=r,e[1]=m,e[2]=n,e[3]=t,e[4]=o,e[5]=l,e[6]=a,e[7]=c}else l=e[5],a=e[6],c=e[7];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[15]!==l||e[16]!==a?(d=(0,i.jsxs)(i.Fragment,{children:[l,a]}),e[15]=l,e[16]=a,e[17]=d):d=e[17],d};var F=g();w();const q=p=>{let e=(0,F.c)(15),n,r,t,o;e[0]===p?(n=e[1],r=e[2],t=e[3],o=e[4]):({name:r,declaredBy:n,onClick:t,...o}=p,e[0]=p,e[1]=n,e[2]=r,e[3]=t,e[4]=o);let m=n.length>1?"destructive":"outline",l;e[5]!==r||e[6]!==t?(l=async d=>{if(t){t(d);return}await I(r),S({title:"Copied to clipboard"})},e[5]=r,e[6]=t,e[7]=l):l=e[7];let a;e[8]!==r||e[9]!==m||e[10]!==l?(a=(0,i.jsx)(b,{title:r,variant:m,className:"rounded-sm text-ellipsis block overflow-hidden max-w-fit cursor-pointer font-medium",onClick:l,children:r}),e[8]=r,e[9]=m,e[10]=l,e[11]=a):a=e[11];let c;return e[12]!==o||e[13]!==a?(c=(0,i.jsx)("div",{className:"max-w-[130px]",...o,children:a}),e[12]=o,e[13]=a,e[14]=c):c=e[14],c};export{B as n,q as t};
@@ -0,0 +1 @@
1
+ import{t as o}from"./commonlisp-BTUt7Wms.js";export{o as commonLisp};
@@ -0,0 +1 @@
1
+ import{s as x}from"./chunk-LvLJmgfZ.js";import{i as b}from"./useEvent-D91BmmQi.js";import{t as j}from"./react-Bj1aDYRI.js";import{Yn as w,d as P,pn as C}from"./cells-CJLUCcQg.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{t as c}from"./cn-DYvqRARy.js";import{t as k}from"./jsx-runtime-Blw4afVn.js";import{a as A,i as R,o as B}from"./config-BJVx3eBW.js";import{t as I}from"./badge-B92a4ePY.js";var S=N(),m=x(k(),1);const T=o=>{let r=(0,S.c)(8),{variableName:a,className:e}=o,t;r[0]===a?t=r[1]:(t=i=>{i.stopPropagation();let f=Y(a);if(!f)return;let u=P(f);u&&C(u,a)},r[0]=a,r[1]=t);let s=t,l;r[2]===e?l=r[3]:(l=c("text-link opacity-80 hover:opacity-100 hover:underline",e),r[2]=e,r[3]=l);let n;return r[4]!==s||r[5]!==l||r[6]!==a?(n=(0,m.jsx)("button",{type:"button",onClick:s,className:l,children:a}),r[4]=s,r[5]=l,r[6]=a,r[7]=n):n=r[7],n};function Y(o){let r=b.get(w)[o];if(r)return r.declaredBy[0]}var p=N(),d=x(j(),1),y=d.forwardRef((o,r)=>{let a=(0,p.c)(11),e,t,s;a[0]===o?(e=a[1],t=a[2],s=a[3]):({className:e,lastItem:t,...s}=o,a[0]=o,a[1]=e,a[2]=t,a[3]=s);let l=t&&"border-b-0",n;a[4]!==e||a[5]!==l?(n=c(l,e),a[4]=e,a[5]=l,a[6]=n):n=a[6];let i;return a[7]!==s||a[8]!==r||a[9]!==n?(i=(0,m.jsx)(A,{ref:r,className:n,...s}),a[7]=s,a[8]=r,a[9]=n,a[10]=i):i=a[10],i});y.displayName="PanelAccordionItem";var v=d.forwardRef((o,r)=>{let a=(0,p.c)(13),e,t,s;a[0]===o?(e=a[1],t=a[2],s=a[3]):({className:t,children:e,...s}=o,a[0]=o,a[1]=e,a[2]=t,a[3]=s);let l;a[4]===t?l=a[5]:(l=c("px-3 py-2 text-xs font-semibold uppercase tracking-wide hover:no-underline",t),a[4]=t,a[5]=l);let n;a[6]===e?n=a[7]:(n=(0,m.jsx)("span",{className:"flex items-center gap-2",children:e}),a[6]=e,a[7]=n);let i;return a[8]!==s||a[9]!==r||a[10]!==l||a[11]!==n?(i=(0,m.jsx)(B,{ref:r,className:l,...s,children:n}),a[8]=s,a[9]=r,a[10]=l,a[11]=n,a[12]=i):i=a[12],i});v.displayName="PanelAccordionTrigger";var g=d.forwardRef((o,r)=>{let a=(0,p.c)(9),e,t;a[0]===o?(e=a[1],t=a[2]):({wrapperClassName:t,...e}=o,a[0]=o,a[1]=e,a[2]=t);let s;a[3]===t?s=a[4]:(s=c("p-0",t),a[3]=t,a[4]=s);let l;return a[5]!==e||a[6]!==r||a[7]!==s?(l=(0,m.jsx)(R,{ref:r,wrapperClassName:s,...e}),a[5]=e,a[6]=r,a[7]=s,a[8]=l):l=a[8],l});g.displayName="PanelAccordionContent";var h=o=>{let r=(0,p.c)(8),a,e;r[0]===o?(a=r[1],e=r[2]):({className:a,...e}=o,r[0]=o,r[1]=a,r[2]=e);let t;r[3]===a?t=r[4]:(t=c("py-0 px-1.5 text-[10px]",a),r[3]=a,r[4]=t);let s;return r[5]!==e||r[6]!==t?(s=(0,m.jsx)(I,{variant:"secondary",className:t,...e}),r[5]=e,r[6]=t,r[7]=s):s=r[7],s};h.displayName="PanelBadge";export{T as a,h as i,y as n,v as r,g as t};
@@ -0,0 +1 @@
1
+ import{s as n}from"./chunk-LvLJmgfZ.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{t as v}from"./cn-DYvqRARy.js";import{t as y}from"./jsx-runtime-Blw4afVn.js";import{t as M}from"./createLucideIcon-w-Qo9n0R.js";import{t as u}from"./database-zap-CKO8g4BU.js";import{t as k}from"./globe-Dwo3iXzC.js";import{r as Z}from"./useTheme-Bxv9B31g.js";import{n as z,t as b}from"./azure-t5-hyIQ1.js";import{t as B}from"./github-A_zUd4Uj.js";var o=M("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),L="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20id='Layer_1'%20x='0'%20y='0'%20version='1.1'%20viewBox='0.02%20102.6%20511.9%20306.4'%3e%3cstyle%3e.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23f90}%3c/style%3e%3cpath%20d='M144.3%20214.1c0%206.3.7%2011.4%201.9%2015.2%201.4%203.7%203.1%207.8%205.4%2012.3.9%201.4%201.2%202.7%201.2%203.9%200%201.7-1%203.4-3.2%205.1l-10.7%207.2c-1.5%201-3.1%201.5-4.4%201.5-1.7%200-3.4-.9-5.1-2.4-2.4-2.6-4.4-5.3-6.1-8-1.7-2.9-3.4-6.1-5.3-10-13.3%2015.7-30%2023.5-50.1%2023.5-14.3%200-25.7-4.1-34.1-12.3-8.3-8.2-12.6-19.1-12.6-32.7%200-14.5%205.1-26.2%2015.5-35.1S60.8%20169%2078.4%20169c5.8%200%2011.7.5%2018.1%201.4s12.8%202.2%2019.6%203.7v-12.4c0-12.9-2.7-22-8-27.2-5.4-5.3-14.6-7.8-27.8-7.8-6%200-12.1.7-18.4%202.2s-12.4%203.4-18.4%205.8c-2.7%201.2-4.8%201.9-6%202.2s-2%20.5-2.7.5c-2.4%200-3.6-1.7-3.6-5.3v-8.3c0-2.7.3-4.8%201.2-6s2.4-2.4%204.8-3.6c6-3.1%2013.1-5.6%2021.5-7.7%208.3-2.2%2017.2-3.2%2026.6-3.2%2020.3%200%2035.1%204.6%2044.6%2013.8%209.4%209.2%2014.1%2023.2%2014.1%2041.9v55.2h.3zM75.2%20240c5.6%200%2011.4-1%2017.5-3.1%206.1-2%2011.6-5.8%2016.2-10.9%202.7-3.2%204.8-6.8%205.8-10.9s1.7-9%201.7-14.8v-7.2c-4.9-1.2-10.2-2.2-15.7-2.9-5.4-.7-10.7-1-16-1-11.4%200-19.8%202.2-25.4%206.8S51%20207.1%2051%20215.6c0%208%202%2014%206.3%2018.1%204.1%204.2%2010%206.3%2017.9%206.3m136.7%2018.4c-3.1%200-5.1-.5-6.5-1.7-1.4-1-2.6-3.4-3.6-6.6l-40-131.6c-1-3.4-1.5-5.6-1.5-6.8%200-2.7%201.4-4.3%204.1-4.3h16.7c3.2%200%205.4.5%206.6%201.7%201.4%201%202.4%203.4%203.4%206.6l28.6%20112.7%2026.6-112.7c.9-3.4%201.9-5.6%203.2-6.6%201.4-1%203.7-1.7%206.8-1.7H270c3.2%200%205.4.5%206.8%201.7%201.4%201%202.6%203.4%203.2%206.6l26.9%20114.1%2029.5-114.1c1-3.4%202.2-5.6%203.4-6.6%201.4-1%203.6-1.7%206.6-1.7h15.8c2.7%200%204.3%201.4%204.3%204.3%200%20.9-.2%201.7-.3%202.7-.2%201-.5%202.4-1.2%204.3l-41%20131.6q-1.5%205.1-3.6%206.6c-1.4%201-3.6%201.7-6.5%201.7h-14.6c-3.2%200-5.4-.5-6.8-1.7s-2.6-3.4-3.2-6.8l-26.4-109.8L236.7%20250c-.9%203.4-1.9%205.6-3.2%206.8-1.4%201.2-3.7%201.7-6.8%201.7h-14.8zm218.8%204.6c-8.9%200-17.7-1-26.2-3.1-8.5-2-15.2-4.3-19.6-6.8-2.7-1.5-4.6-3.2-5.3-4.8s-1-3.2-1-4.8v-8.7c0-3.6%201.4-5.3%203.9-5.3%201%200%202%20.2%203.1.5%201%20.3%202.6%201%204.3%201.7%205.8%202.6%2012.1%204.6%2018.7%206%206.8%201.4%2013.5%202%2020.3%202%2010.7%200%2019.1-1.9%2024.9-5.6s8.9-9.2%208.9-16.2c0-4.8-1.5-8.7-4.6-11.9s-8.9-6.1-17.2-8.9l-24.7-7.7c-12.4-3.9-21.6-9.7-27.2-17.4-5.6-7.5-8.5-15.8-8.5-24.7%200-7.2%201.5-13.5%204.6-18.9s7.2-10.2%2012.3-14c5.1-3.9%2010.9-6.8%2017.7-8.9%206.8-2%2014-2.9%2021.5-2.9%203.7%200%207.7.2%2011.4.7%203.9.5%207.5%201.2%2011.1%201.9%203.4.9%206.6%201.7%209.7%202.7s5.4%202%207.2%203.1c2.4%201.4%204.1%202.7%205.1%204.3%201%201.4%201.5%203.2%201.5%205.6v8c0%203.6-1.4%205.4-3.9%205.4-1.4%200-3.6-.7-6.5-2q-14.55-6.6-32.7-6.6c-9.7%200-17.4%201.5-22.6%204.8s-8%208.2-8%2015.2c0%204.8%201.7%208.9%205.1%2012.1s9.7%206.5%2018.7%209.4l24.2%207.7c12.3%203.9%2021.1%209.4%2026.4%2016.3s7.8%2015%207.8%2023.8c0%207.3-1.5%2014-4.4%2019.8-3.1%205.8-7.2%2010.9-12.4%2015-5.3%204.3-11.6%207.3-18.9%209.5-8%202.5-16%203.7-24.7%203.7'%20style='fill:%23fff'/%3e%3cpath%20fill='%23fff'%20d='M462.9%20345.7c-56%2041.4-137.4%2063.3-207.4%2063.3-98.1%200-186.5-36.3-253.2-96.6-5.3-4.8-.5-11.2%205.8-7.5%2072.2%2041.9%20161.3%2067.3%20253.4%2067.3%2062.2%200%20130.4-12.9%20193.3-39.5%209.3-4.2%2017.3%206.2%208.1%2013'%20class='st1'/%3e%3cpath%20fill='%23fff'%20d='M486.2%20319.2c-7.2-9.2-47.3-4.4-65.6-2.2-5.4.7-6.3-4.1-1.4-7.7%2032-22.5%2084.6-16%2090.8-8.5%206.1%207.7-1.7%2060.3-31.7%2085.5-4.6%203.9-9%201.9-7-3.2%206.9-16.9%2022.1-54.9%2014.9-63.9'%20class='st1'/%3e%3c/svg%3e",_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3cpath%20fill='%23FFF'%20d='m115.679%2069.288-15.591-8.94-2.689-1.163-63.781.436v32.381h82.061z'/%3e%3cpath%20fill='%23F38020'%20d='M87.295%2089.022c.763-2.617.472-5.015-.8-6.796-1.163-1.635-3.125-2.58-5.488-2.689l-44.737-.581c-.291%200-.545-.145-.691-.363s-.182-.509-.109-.8c.145-.436.581-.763%201.054-.8l45.137-.581c5.342-.254%2011.157-4.579%2013.192-9.885l2.58-6.723c.109-.291.145-.581.073-.872-2.906-13.158-14.644-22.97-28.672-22.97-12.938%200-23.913%208.359-27.838%2019.952a13.35%2013.35%200%200%200-9.267-2.58c-6.215.618-11.193%205.597-11.811%2011.811-.145%201.599-.036%203.162.327%204.615C10.104%2070.051%202%2078.337%202%2088.549c0%20.909.073%201.817.182%202.726a.895.895%200%200%200%20.872.763h82.57c.472%200%20.909-.327%201.054-.8l.617-2.216z'/%3e%3cpath%20fill='%23FAAE40'%20d='M101.542%2060.275c-.4%200-.836%200-1.236.036-.291%200-.545.218-.654.509l-1.744%206.069c-.763%202.617-.472%205.015.8%206.796%201.163%201.635%203.125%202.58%205.488%202.689l9.522.581c.291%200%20.545.145.691.363.145.218.182.545.109.8-.145.436-.581.763-1.054.8l-9.924.582c-5.379.254-11.157%204.579-13.192%209.885l-.727%201.853c-.145.363.109.727.509.727h34.089c.4%200%20.763-.254.872-.654.581-2.108.909-4.325.909-6.614%200-13.447-10.975-24.422-24.458-24.422'/%3e%3c/svg%3e",F="data:image/svg+xml,%3csvg%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns='http://www.w3.org/2000/svg'%20id='Layer_1'%20data-name='Layer%201'%20viewBox='0%200%20224.09%20161.1'%20width='224.09'%20height='161.1'%20%3e%3cdefs%3e%3cstyle%3e%20.cls-1,%20.cls-2%20{%20fill:%20%23000;%20stroke-width:%200px;%20}%20.cls-2%20{%20fill-rule:%20evenodd;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='cls-2'%20d='M92.1,112.3h-27.07c-1.65,0-3.3-.99-4.29-2.64l-12.55-22.47c-.66-1.65-.66-3.3,0-4.62l12.55-22.47c.99-1.65,2.64-2.64,4.29-2.64h15.52c1.65,0,3.3-.99,4.29-2.64l11.23-20.16c.99-1.65-.33-3.63-1.98-3.63h-41.6c-3.63,0-6.6,1.98-8.58,4.96l-24.76,44.28c-1.65,2.97-1.65,6.61,0,9.58l24.76,43.94c1.65,2.97,4.95,4.96,8.58,4.96h53.15c1.98,0,2.97-1.98,1.98-3.64l-11.55-20.49c-.33-1.65-1.98-2.31-3.96-2.31Z'/%3e%3cpath%20class='cls-1'%20d='M165.4,50.51l-10.57-17.84c-.99-1.65-3.3-1.65-4.29,0l-44.57,79.3c-.66,1.65-.66,3.3,0,4.63l11.55,20.82c.99,1.65,3.3,1.65,4.29,0l43.58-77.32c1.65-2.97,1.65-6.61,0-9.58Z'/%3e%3cpath%20class='cls-2'%20d='M111.58,86.86l13.21-23.46c.66-1.32.66-3.3,0-4.96l-15.19-26.1c-.99-1.65-3.3-1.65-4.29,0l-12.88,22.8c-.66,1.32-.66,3.3,0,4.63l14.86,26.76c.99,1.98,3.63,1.98,4.29.33Z'/%3e%3cpath%20class='cls-1'%20d='M204.35,50.51l-10.57-17.84c-.99-1.65-3.3-1.65-4.29,0l-44.57,79.3c-.66,1.65-.66,3.3,0,4.63l11.89,20.82c.99,1.65,3.3,1.65,4.29,0l43.58-77.32c1.65-2.97,1.65-6.61-.33-9.58Z'/%3e%3c/svg%3e",H="data:image/svg+xml,%3csvg%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns='http://www.w3.org/2000/svg'%20id='Layer_1'%20data-name='Layer%201'%20viewBox='0%200%20224.09%20161.1'%20width='224.09'%20height='161.1'%3e%3cdefs%3e%3cstyle%3e%20.cls-1,%20.cls-2%20{%20fill:%20%23fff;%20stroke-width:%200px;%20}%20.cls-2%20{%20fill-rule:%20evenodd;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='cls-2'%20d='M92.1,112.3h-27.07c-1.65,0-3.3-.99-4.29-2.64l-12.55-22.47c-.66-1.65-.66-3.3,0-4.62l12.55-22.47c.99-1.65,2.64-2.64,4.29-2.64h15.52c1.65,0,3.3-.99,4.29-2.64l11.23-20.16c.99-1.65-.33-3.63-1.98-3.63h-41.6c-3.63,0-6.6,1.98-8.58,4.96l-24.76,44.28c-1.65,2.97-1.65,6.61,0,9.58l24.76,43.94c1.65,2.97,4.95,4.96,8.58,4.96h53.15c1.98,0,2.97-1.98,1.98-3.64l-11.55-20.49c-.33-1.65-1.98-2.31-3.96-2.31Z'%3e%3c/path%3e%3cpath%20class='cls-1'%20d='M165.4,50.51l-10.57-17.84c-.99-1.65-3.3-1.65-4.29,0l-44.57,79.3c-.66,1.65-.66,3.3,0,4.63l11.55,20.82c.99,1.65,3.3,1.65,4.29,0l43.58-77.32c1.65-2.97,1.65-6.61,0-9.58Z'%3e%3c/path%3e%3cpath%20class='cls-2'%20d='M111.58,86.86l13.21-23.46c.66-1.32.66-3.3,0-4.96l-15.19-26.1c-.99-1.65-3.3-1.65-4.29,0l-12.88,22.8c-.66,1.32-.66,3.3,0,4.63l14.86,26.76c.99,1.98,3.63,1.98,4.29.33Z'%3e%3c/path%3e%3cpath%20class='cls-1'%20d='M204.35,50.51l-10.57-17.84c-.99-1.65-3.3-1.65-4.29,0l-44.57,79.3c-.66,1.65-.66,3.3,0,4.63l11.89,20.82c.99,1.65,3.3,1.65,4.29,0l43.58-77.32c1.65-2.97,1.65-6.61-.33-9.58Z'%3e%3c/path%3e%3c/svg%3e",V="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='standard_product_icon'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20512%20512'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20142)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20none;%20}%20.st1%20{%20fill:%20%234285f4;%20}%20.st2%20{%20fill:%20%2334a853;%20}%20.st3%20{%20fill:%20%23fbbc04;%20}%20.st4%20{%20fill:%20%23ea4335;%20}%20%3c/style%3e%3c/defs%3e%3cg%20id='bounding_box'%3e%3crect%20class='st0'%20width='512'%20height='512'/%3e%3c/g%3e%3cg%20id='art'%3e%3cpath%20class='st2'%20d='M442,277.9H70c-8.8,0-16,7.2-16,16v148.1c0,8.8,7.2,16,16,16h107.2c1.5.5,3.1.7,4.8.7s3.3-.3,4.8-.7h255.2c8.8,0,16-7.2,16-16v-148.1c0-8.8-7.2-16-16-16ZM86,309.9h80v116.1h-80v-116.1ZM426,425.9h-228v-116.1h228v116.1Z'/%3e%3cpath%20class='st3'%20d='M442,54H70c-8.8,0-16,7.2-16,16v148.8c0,8.8,7.2,16,16,16h372c8.8,0,16-7.2,16-16V70c0-8.8-7.2-16-16-16ZM86,86h80v116.8h-80v-116.8ZM426,202.8h-228v-116.8h228v116.8Z'/%3e%3cpath%20class='st4'%20d='M442,234.8h-16V86H54v-16c0-8.8,7.2-16,16-16h372c8.8,0,16,7.2,16,16v148.8c0,8.8-7.2,16-16,16Z'/%3e%3cpath%20class='st1'%20d='M442,457.9h-16v-148.1H54v-16c0-8.8,7.2-16,16-16h372c8.8,0,16,7.2,16,16v148.1c0,8.8-7.2,16-16,16Z'/%3e%3ccircle%20class='st4'%20cx='349'%20cy='144.4'%20r='37'/%3e%3ccircle%20class='st1'%20cx='349'%20cy='367.9'%20r='37'/%3e%3c/g%3e%3c/svg%3e",A="data:image/svg+xml,%3csvg%20viewBox='0%200%2087.3%2078'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m6.6%2066.85%203.85%206.65c.8%201.4%201.95%202.5%203.3%203.3l13.75-23.8h-27.5c0%201.55.4%203.1%201.2%204.5z'%20fill='%230066da'/%3e%3cpath%20d='m43.65%2025-13.75-23.8c-1.35.8-2.5%201.9-3.3%203.3l-25.4%2044a9.06%209.06%200%200%200%20-1.2%204.5h27.5z'%20fill='%2300ac47'/%3e%3cpath%20d='m73.55%2076.8c1.35-.8%202.5-1.9%203.3-3.3l1.6-2.75%207.65-13.25c.8-1.4%201.2-2.95%201.2-4.5h-27.502l5.852%2011.5z'%20fill='%23ea4335'/%3e%3cpath%20d='m43.65%2025%2013.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6%200-3.15.45-4.5%201.2z'%20fill='%2300832d'/%3e%3cpath%20d='m59.8%2053h-32.3l-13.75%2023.8c1.35.8%202.9%201.2%204.5%201.2h50.8c1.6%200%203.15-.45%204.5-1.2z'%20fill='%232684fc'/%3e%3cpath%20d='m73.4%2026.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75%2023.8%2016.15%2028h27.45c0-1.55-.4-3.1-1.2-4.5z'%20fill='%23ffba00'/%3e%3c/svg%3e",S=x(),f=n(y(),1),G={s3:{src:z,dark:L},coreweave:{src:F,dark:H},cloudflare:{src:_},azure:{src:b},gcs:{src:V},http:k,file:o,"in-memory":u,gdrive:{src:A},github:B};const N=m=>{let c=(0,S.c)(11),{protocol:a,forceDark:p,className:l}=m,{theme:g}=Z(),t=G[a.toLowerCase()]??o;if("src"in t){let r=t.src;t.dark&&(p||g==="dark")&&(r=t.dark);let w=r,e;c[0]===l?e=c[1]:(e=v("h-3.5 w-3.5",l),c[0]=l,c[1]=e);let i;return c[2]!==a||c[3]!==r||c[4]!==e?(i=(0,f.jsx)("img",{src:w,alt:a,className:e}),c[2]=a,c[3]=r,c[4]=e,c[5]=i):i=c[5],i}let d=t,s;c[6]===l?s=c[7]:(s=v("h-3.5 w-3.5",l),c[6]=l,c[7]=s);let h;return c[8]!==d||c[9]!==s?(h=(0,f.jsx)(d,{className:s}),c[8]=d,c[9]=s,c[10]=h):h=c[10],h};export{o as n,N as t};
@@ -0,0 +1 @@
1
+ var b=Object.defineProperty;var v=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var R=(t,e,r)=>v(t,typeof e!="symbol"?e+"":e,r);import{i as f,l as I,n as D,o as _,p as s,u as d}from"./useEvent-D91BmmQi.js";import{t as H}from"./compiler-runtime-B3qBwwSJ.js";import{g as c}from"./useEventListener-C0195JsF.js";import{t as g}from"./invariant-CkiqGLcK.js";import{t as L}from"./utils-BWBBpCkT.js";import{r as u}from"./constants-CDyU_g2F.js";import{t as $}from"./Deferred-D2igisxY.js";import{t as N}from"./session-BmukRjSi.js";function S(t,e){if(t==null)throw Error(e||`Expected value but got ${t}`)}function T(){return typeof document<"u"&&document.querySelector("marimo-wasm")!==null}function W(){let t=f.get(m);return S(t,"internal-error: initial mode not found"),g(t!=="present","internal-error: initial mode cannot be 'present'"),t}function G(t){return t==="read"||t==="home"||t==="gallery"?t:t==="edit"?"present":"edit"}const E=s({mode:L()?"read":"not-set",cellAnchor:null}),m=s(void 0);function M(){let t=f.get(m);return t!=="home"&&t!=="gallery"}const z=s(!1);function K(){let{mode:t}=d(E);return t!=="read"}const a={NOT_STARTED:"NOT_STARTED",CONNECTING:"CONNECTING",OPEN:"OPEN",CLOSING:"CLOSING",CLOSED:"CLOSED"},j={KERNEL_DISCONNECTED:"KERNEL_DISCONNECTED",KERNEL_STARTUP_ERROR:"KERNEL_STARTUP_ERROR"},o=s({state:a.NOT_STARTED});function w(){return _(o,t=>t.state===a.OPEN)}function F(){return M()?w():Promise.resolve()}const x=s(t=>t(o).state===a.CONNECTING);s(t=>t(o).state===a.OPEN);const B=s(t=>{let e=t(o);return e.state===a.OPEN||e.state===a.NOT_STARTED}),Q=s(t=>t(o).state===a.CLOSED),q=s(t=>t(o).state===a.NOT_STARTED);function J(t){return t===a.CLOSED}function V(t){return t===a.CONNECTING}function X(t){return t===a.OPEN}function Y(t){return t===a.CLOSING}function O(t){return t===a.NOT_STARTED}function Z(t){return t===a.CLOSED||t===a.CLOSING||t===a.CONNECTING}function tt(t){switch(t){case a.CLOSED:return"App disconnected";case a.CONNECTING:return"Connecting to a runtime ...";case a.CLOSING:return"App disconnecting...";case a.OPEN:return"";case a.NOT_STARTED:return"Click to connect to a runtime";default:return""}}function et(t){if(typeof t!="object"||!t||Array.isArray(t))return!1;for(let e of Object.values(t))if(typeof e!="string")return!1;return!0}function rt(t){if(typeof t!="object"||!t||Array.isArray(t))return!1;let e=t;return!(!et(e.files)||e.modelNotifications!==void 0&&!Array.isArray(e.modelNotifications))}function p(){let t=typeof window>"u"?void 0:window.__MARIMO_STATIC__;return rt(t)?t:void 0}function U(){return p()!==void 0}function at(){let t=p();return g(t!==void 0,"Not a static notebook"),t.files}function nt(){var t;return(t=p())==null?void 0:t.modelNotifications}var st=class{constructor(t,e=!1){R(this,"initialHealthyCheck",new $);this.config=t,this.lazy=e;try{new URL(this.config.url)}catch(r){throw Error(`Invalid runtime URL: ${this.config.url}. ${r instanceof Error?r.message:"Unknown error"}`,{cause:r})}this.lazy||this.init()}get isLazy(){return this.lazy}get httpURL(){return new URL(this.config.url)}get isSameOrigin(){return this.httpURL.origin===window.location.origin}get isServerless(){return T()||L()||U()}formatHttpURL({path:t="",searchParams:e,restrictToKnownQueryParams:r=!0}){let n=this.httpURL,i=new URLSearchParams(window.location.search);if(e)for(let[h,l]of e.entries())n.searchParams.set(h,l);for(let[h,l]of i.entries())r&&!Object.values(u).includes(h)||n.searchParams.set(h,l);return n.pathname=`${n.pathname.replace(/\/$/,"")}/${t.replace(/^\//,"")}`,n.hash="",n}appendCrossOriginAuth(t){return!this.isSameOrigin&&this.config.authToken&&t.searchParams.set(u.accessToken,this.config.authToken),t}formatNavigableHttpURL(t,e){let r=this.formatHttpURL({path:t,searchParams:e});return r.searchParams.delete(u.accessToken),this.appendCrossOriginAuth(r)}formatWsURL(t,e){let r=this.formatHttpURL({path:t,searchParams:e,restrictToKnownQueryParams:!1});return it(this.appendCrossOriginAuth(r).toString())}getSessionSearchParams(t){let e=new URL(this.config.url),r=new URLSearchParams(e.search);return new URLSearchParams(window.location.search).forEach((n,i)=>{r.has(i)||r.set(i,n)}),r.set(u.sessionId,t),r}getWsURL(t){return this.formatWsURL("/ws",this.getSessionSearchParams(t))}getSseURL(t){let e=this.formatHttpURL({path:"/sse",searchParams:this.getSessionSearchParams(t),restrictToKnownQueryParams:!1});return e.searchParams.delete(u.accessToken),e}getWsSyncURL(t){return this.formatWsURL("/ws_sync",this.getSessionSearchParams(t))}getTerminalWsURL(){return this.formatWsURL("/terminal/ws")}getLSPURL(t){if(t==="copilot"){let e=this.formatWsURL(`/lsp/${t}`),r=e.searchParams.get(u.accessToken);return e.search="",r&&e.searchParams.set(u.accessToken,r),e}return this.formatWsURL(`/lsp/${t}`)}getAiURL(t){return this.formatHttpURL({path:`/api/ai/${t}`})}healthURL(){return this.formatHttpURL({path:"/health"})}async fetchHealth(){try{return await fetch(this.healthURL().toString())}catch(t){return c.error(`Failed to check health: ${t instanceof Error?t.message:"Unknown error"}`,{cause:t}),null}}async reconcileFromHealth(){if(this.isServerless)return!0;let t=await this.fetchHealth();if(!t)return!1;if(t.redirected){c.debug(`Runtime redirected to ${t.url}`);let e=new URL(t.url);e.pathname=e.pathname.replace(/\/health$/,""),this.config.url=e.toString()}return t.ok&&this.setDOMBaseUri(this.config.url),t.ok}async probeHealth(){var t;return this.isServerless?!0:((t=await this.fetchHealth())==null?void 0:t.ok)??!1}setDOMBaseUri(t){t=t.split("?",1)[0],t.endsWith("/")||(t+="/");let e=document.querySelector("base");e?e.setAttribute("href",t):(e=document.createElement("base"),e.setAttribute("href",t),document.head.append(e))}async init(t){c.debug("Initializing runtime...");let e=0;for(;!await this.reconcileFromHealth();){if(e>=25){c.error("Failed to connect after 25 retries"),this.initialHealthyCheck.reject(Error("Failed to connect after 25 retries"));return}if(!(t!=null&&t.disableRetryDelay)){let r=Math.min(100*1.2**e,2e3);await new Promise(n=>setTimeout(n,r))}e++}c.debug("Runtime is healthy"),this.initialHealthyCheck.resolve()}async waitForHealthy(){return this.initialHealthyCheck.promise}headers(){let t={"Marimo-Session-Id":N(),"Marimo-Server-Token":this.config.serverToken??"","x-runtime-url":this.httpURL.toString()};return this.config.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}sessionHeaders(){return{"Marimo-Session-Id":N()}}};function it(t){if(!t.startsWith("http")){c.warn(`URL must start with http: ${t}`);let e=new URL(t);return e.protocol="ws",e}return new URL(t.replace(/^http/,"ws"))}var ot=H();function ct(){let t=new URL(document.baseURI);return t.search="",t.hash="",t.toString()}const y={lazy:!0,url:ct()},C=s(y);var P=s(t=>{let e=t(C);return new st(e,e.lazy)});function A(){return d(P)}function ut(){let t=(0,ot.c)(4),e=A(),[r,n]=I(o),i;return t[0]!==r.state||t[1]!==e||t[2]!==n?(i=async()=>{O(r.state)?(n({state:a.CONNECTING}),await e.init()):c.log("Runtime already started or starting...")},t[0]=r.state,t[1]=e,t[2]=n,t[3]=i):i=t[3],D(i)}function k(){return f.get(P)}function ht(t){if(t.startsWith("http"))return new URL(t);let e=k().httpURL.toString();return e.startsWith("blob:")&&(e=e.replace("blob:","")),new URL(t,e)}export{K as A,F as C,m as D,W as E,T as M,S as N,z as O,w as S,a as T,B as _,ut as a,x as b,at as c,J as d,Y as f,O as g,Z as h,C as i,E as j,G as k,U as l,V as m,ht as n,A as o,X as p,k as r,nt as s,y as t,tt as u,o as v,j as w,q as x,Q as y};
@@ -1 +1 @@
1
- import{s as nt,t as V}from"./chunk-LvLJmgfZ.js";import{u as st}from"./src-CIOdyciO.js";import{n as k,r as j}from"./src-BshXgZd4.js";import{t as z}from"./cytoscape.esm-DzUNSF80.js";var Z=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L():typeof define=="function"&&define.amd?define([],L):typeof C=="object"?C.layoutBase=L():m.layoutBase=L()})(C,function(){return(function(m){var L={};function A(n){if(L[n])return L[n].exports;var i=L[n]={i:n,l:!1,exports:{}};return m[n].call(i.exports,i,i.exports,A),i.l=!0,i.exports}return A.m=m,A.c=L,A.i=function(n){return n},A.d=function(n,i,t){A.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},A.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return A.d(i,"a",i),i},A.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},A.p="",A(A.s=26)})([(function(m,L,A){function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,m.exports=n}),(function(m,L,A){var n=A(2),i=A(8),t=A(9);function e(h,o,N){n.call(this,N),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=N,this.bendpoints=[],this.source=h,this.target=o}for(var r in e.prototype=Object.create(n.prototype),n)e[r]=n[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(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(h,o){for(var N=this.getOtherEnd(h),s=o.getGraphManager().getRoot();;){if(N.getOwner()==o)return N;if(N.getOwner()==s)break;N=N.getOwner().getParent()}return null},e.prototype.updateLength=function(){var h=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=e}),(function(m,L,A){function n(i){this.vGraphObject=i}m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(13),e=A(0),r=A(16),h=A(4);function o(s,g,u,p){u==null&&p==null&&(p=g),n.call(this,p),s.graphManager!=null&&(s=s.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=s,u!=null&&g!=null?this.rect=new t(g.x,g.y,u.width,u.height):this.rect=new t}for(var N in o.prototype=Object.create(n.prototype),n)o[N]=n[N];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(s){this.rect.width=s},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(s){this.rect.height=s},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(s,g){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(s,g){this.rect.x=s-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(s,g){this.rect.x=s,this.rect.y=g},o.prototype.moveBy=function(s,g){this.rect.x+=s,this.rect.y+=g},o.prototype.getEdgeListToNode=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(p.target==s){if(p.source!=u)throw"Incorrect edge source!";g.push(p)}}),g},o.prototype.getEdgesBetween=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(!(p.source==u||p.target==u))throw"Incorrect edge source and/or target";(p.target==s||p.source==s)&&g.push(p)}),g},o.prototype.getNeighborsList=function(){var s=new Set,g=this;return g.edges.forEach(function(u){if(u.source==g)s.add(u.target);else{if(u.target!=g)throw"Incorrect incidency!";s.add(u.source)}}),s},o.prototype.withChildren=function(){var s=new Set,g,u;if(s.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)g=p[y],u=g.withChildren(),u.forEach(function(c){s.add(c)});return s},o.prototype.getNoOfChildren=function(){var s=0,g;if(this.child==null)s=1;else for(var u=this.child.getNodes(),p=0;p<u.length;p++)g=u[p],s+=g.getNoOfChildren();return s==0&&(s=1),s},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.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)},o.prototype.scatter=function(){var s,g,u=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_X+r.nextDouble()*(p-u)+u;var y=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+r.nextDouble()*(c-y)+y,this.rect.x=s,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=s.getRight()-s.getLeft(),u=s.getBottom()-s.getTop();this.labelWidth>g&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>u&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-u)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-u),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(s){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var u=this.rect.y;u>e.WORLD_BOUNDARY?u=e.WORLD_BOUNDARY:u<-e.WORLD_BOUNDARY&&(u=-e.WORLD_BOUNDARY);var p=new h(g,u),y=s.inverseTransformPoint(p);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,L,A){function n(i,t){i==null&&t==null?(this.x=0,this.y=0):(this.x=i,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(0),e=A(6),r=A(3),h=A(1),o=A(13),N=A(12),s=A(11);function g(p,y,c){n.call(this,c),this.estimatedSize=i.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,c){if(y==null&&c==null){var f=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(f)>-1)throw"Node already in graph!";return f.owner=this,this.getNodes().push(f),f}else{var T=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(!(y.owner==c.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner==c.owner?(T.source=y,T.target=c,T.isInterGraph=!1,this.getEdges().push(T),y.edges.push(T),c!=y&&c.edges.push(T),T):null}},g.prototype.remove=function(p){var y=p;if(p instanceof r){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var c=y.edges.slice(),f,T=c.length,E=0;E<T;E++)f=c[E],f.isInterGraph?this.graphManager.remove(f):f.source.owner.remove(f);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof h){var f=p;if(f==null)throw"Edge is null!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.owner!=null&&f.target.owner!=null&&f.source.owner==this&&f.target.owner==this))throw"Source and/or target owner is invalid!";var a=f.source.edges.indexOf(f),d=f.target.edges.indexOf(f);if(!(a>-1&&d>-1))throw"Source and/or target doesn't know this edge!";f.source.edges.splice(a,1),f.target!=f.source&&f.target.edges.splice(d,1);var O=f.source.owner.getEdges().indexOf(f);if(O==-1)throw"Not in owner's edge list!";f.source.owner.getEdges().splice(O,1)}},g.prototype.updateLeftTop=function(){for(var p=i.MAX_VALUE,y=i.MAX_VALUE,c,f,T,E=this.getNodes(),O=E.length,a=0;a<O;a++){var d=E[a];c=d.getTop(),f=d.getLeft(),p>c&&(p=c),y>f&&(y=f)}return p==i.MAX_VALUE?null:(T=E[0].getParent().paddingLeft==null?this.margin:E[0].getParent().paddingLeft,this.left=y-T,this.top=p-T,new N(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l,v=this.nodes,_=v.length,D=0;D<_;D++){var I=v[D];p&&I.child!=null&&I.updateBounds(),E=I.getLeft(),O=I.getRight(),a=I.getTop(),d=I.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}var w=new o(y,f,c-y,T-f);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),l=v[0].getParent().paddingLeft==null?this.margin:v[0].getParent().paddingLeft,this.left=w.x-l,this.right=w.x+w.width+l,this.top=w.y-l,this.bottom=w.y+w.height+l},g.calculateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l=p.length,v=0;v<l;v++){var _=p[v];E=_.getLeft(),O=_.getRight(),a=_.getTop(),d=_.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}return new o(y,f,c-y,T-f)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,c=y.length,f=0;f<c;f++){var T=y[f];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new s,c=new Set,f=this.nodes[0],T,E;for(f.withChildren().forEach(function(l){y.push(l),c.add(l)});y.length!==0;){f=y.shift(),T=f.getEdges();for(var O=T.length,a=0;a<O;a++)E=T[a].getOtherEndInGraph(f,this),E!=null&&!c.has(E)&&E.withChildren().forEach(function(l){y.push(l),c.add(l)})}if(this.isConnected=!1,c.size>=this.nodes.length){var d=0;c.forEach(function(l){l.owner==p&&d++}),d==this.nodes.length&&(this.isConnected=!0)}},m.exports=g}),(function(m,L,A){var n,i=A(1);function t(e){n=A(5),this.layout=e,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),h=this.add(e,r);return this.setRootGraph(h),this.rootGraph},t.prototype.add=function(e,r,h,o,N){if(h==null&&o==null&&N==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{N=h,o=r,h=e;var s=o.getOwner(),g=N.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==g)return h.isInterGraph=!1,s.add(h,o,N);if(h.isInterGraph=!0,h.source=o,h.target=N,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),!(h.source!=null&&h.target!=null))throw"Edge source and/or target is null!";if(!(h.source.edges.indexOf(h)==-1&&h.target.edges.indexOf(h)==-1))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h}},t.prototype.remove=function(e){if(e instanceof n){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 h=[];h=h.concat(r.getEdges());for(var o,N=h.length,s=0;s<N;s++)o=h[s],r.remove(o);var g=[];g=g.concat(r.getNodes());var u;N=g.length;for(var s=0;s<N;s++)u=g[s],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(r);this.graphs.splice(p,1),r.parent=null}else if(e instanceof i){if(o=e,o==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(!(o.source!=null&&o.target!=null))throw"Source and/or target is null!";if(!(o.source.edges.indexOf(o)!=-1&&o.target.edges.indexOf(o)!=-1))throw"Source and/or target doesn't know this edge!";var p=o.source.edges.indexOf(o);if(o.source.edges.splice(p,1),p=o.target.edges.indexOf(o),o.target.edges.splice(p,1),!(o.source.owner!=null&&o.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";var p=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),h=r.length,o=0;o<h;o++)e=e.concat(r[o].getNodes());this.allNodes=e}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var h=0;h<r.length;h++)e=e.concat(r[h].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent??(e.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var h=e.getOwner(),o;do{if(o=h.getParent(),o==null)break;if(o==r)return!0;if(h=o.getOwner(),h==null)break}while(!0);h=r.getOwner();do{if(o=h.getParent(),o==null)break;if(o==e)return!0;if(h=o.getOwner(),h==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var e,r,h,o,N,s=this.getAllEdges(),g=s.length,u=0;u<g;u++){if(e=s[u],r=e.source,h=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=h,r==h){e.lca=r.getOwner();continue}for(o=r.getOwner();e.lca==null;){for(e.targetInLca=h,N=h.getOwner();e.lca==null;){if(N==o){e.lca=N;break}if(N==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=N.getParent(),N=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca??(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var h=e.getOwner();do{if(h==null)break;var o=r.getOwner();do{if(o==null)break;if(o==h)return o;o=o.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},t.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var h,o=e.getNodes(),N=o.length,s=0;s<N;s++)h=o[s],h.inclusionTreeDepth=r,h.child!=null&&this.calcInclusionTreeDepths(h.child,r+1)},t.prototype.includesInvalidEdge=function(){for(var e,r=this.edges.length,h=0;h<r;h++)if(e=this.edges[h],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},m.exports=t}),(function(m,L,A){var n=A(0);function i(){}for(var t in n)i[t]=n[t];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,m.exports=i}),(function(m,L,A){var n=A(12);function i(){}i.calcSeparationAmount=function(t,e,r,h){if(!t.intersects(e))throw"assert failed";var o=[,,];this.decideDirectionsForOverlappingNodes(t,e,o),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var N=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(N=1);var s=N*r[0],g=r[1]/N;r[0]<g?g=r[0]:s=r[1],r[0]=-1*o[0]*(g/2+h),r[1]=-1*o[1]*(s/2+h)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var h=t.getCenterX(),o=t.getCenterY(),N=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=h,r[1]=o,r[2]=N,r[3]=s,!0;var g=t.getX(),u=t.getY(),p=t.getRight(),y=t.getX(),c=t.getBottom(),f=t.getRight(),T=t.getWidthHalf(),E=t.getHeightHalf(),O=e.getX(),a=e.getY(),d=e.getRight(),l=e.getX(),v=e.getBottom(),_=e.getRight(),D=e.getWidthHalf(),I=e.getHeightHalf(),w=!1,R=!1;if(h===N){if(o>s)return r[0]=h,r[1]=u,r[2]=N,r[3]=v,!1;if(o<s)return r[0]=h,r[1]=c,r[2]=N,r[3]=a,!1}else if(o===s){if(h>N)return r[0]=g,r[1]=o,r[2]=d,r[3]=s,!1;if(h<N)return r[0]=p,r[1]=o,r[2]=O,r[3]=s,!1}else{var G=t.height/t.width,x=e.height/e.width,M=(s-o)/(N-h),U=void 0,b=void 0,F=void 0,S=void 0,Y=void 0,X=void 0;if(-G===M?h>N?(r[0]=y,r[1]=c,w=!0):(r[0]=p,r[1]=u,w=!0):G===M&&(h>N?(r[0]=g,r[1]=u,w=!0):(r[0]=f,r[1]=c,w=!0)),-x===M?N>h?(r[2]=l,r[3]=v,R=!0):(r[2]=d,r[3]=a,R=!0):x===M&&(N>h?(r[2]=O,r[3]=a,R=!0):(r[2]=_,r[3]=v,R=!0)),w&&R)return!1;if(h>N?o>s?(U=this.getCardinalDirection(G,M,4),b=this.getCardinalDirection(x,M,2)):(U=this.getCardinalDirection(-G,M,3),b=this.getCardinalDirection(-x,M,1)):o>s?(U=this.getCardinalDirection(-G,M,1),b=this.getCardinalDirection(-x,M,3)):(U=this.getCardinalDirection(G,M,2),b=this.getCardinalDirection(x,M,4)),!w)switch(U){case 1:S=u,F=h+-E/M,r[0]=F,r[1]=S;break;case 2:F=f,S=o+T*M,r[0]=F,r[1]=S;break;case 3:S=c,F=h+E/M,r[0]=F,r[1]=S;break;case 4:F=y,S=o+-T*M,r[0]=F,r[1]=S;break}if(!R)switch(b){case 1:X=a,Y=N+-I/M,r[2]=Y,r[3]=X;break;case 2:Y=_,X=s+D*M,r[2]=Y,r[3]=X;break;case 3:X=v,Y=N+I/M,r[2]=Y,r[3]=X;break;case 4:Y=l,X=s+-D*M,r[2]=Y,r[3]=X;break}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,h){if(h==null)return this.getIntersection2(t,e,r);var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=void 0,T=void 0,E=void 0,O=void 0,a=void 0,d=void 0,l=void 0,v=void 0,_=void 0;return E=g-N,a=o-s,l=s*N-o*g,O=c-p,d=u-y,v=y*p-u*c,_=E*d-O*a,_===0?null:(f=(a*v-d*l)/_,T=(O*l-E*v)/_,new n(f,T))},i.angleOfVector=function(t,e,r,h){var o=void 0;return t===r?o=h<e?this.ONE_AND_HALF_PI:this.HALF_PI:(o=Math.atan((h-e)/(r-t)),r<t?o+=Math.PI:h<e&&(o+=this.TWO_PI)),o},i.doIntersect=function(t,e,r,h){var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=(s-o)*(c-p)-(y-u)*(g-N);if(f===0)return!1;var T=((c-p)*(y-o)+(u-y)*(c-N))/f,E=((N-g)*(y-o)+(s-o)*(c-N))/f;return 0<T&&T<1&&0<E&&E<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,m.exports=i}),(function(m,L,A){function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},m.exports=n}),(function(m,L,A){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,m.exports=n}),(function(m,L,A){var n=(function(){function h(o,N){for(var s=0;s<N.length;s++){var g=N[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,N,s){return N&&h(o.prototype,N),s&&h(o,s),o}})();function i(h,o){if(!(h instanceof o))throw TypeError("Cannot call a class as a function")}var t=function(h){return{value:h,next:null,prev:null}},e=function(h,o,N,s){return h===null?s.head=o:h.next=o,N===null?s.tail=o:N.prev=o,o.prev=h,o.next=N,s.length++,o},r=function(h,o){var N=h.prev,s=h.next;return N===null?o.head=s:N.next=s,s===null?o.tail=N:s.prev=N,h.prev=h.next=null,o.length--,h};m.exports=(function(){function h(o){var N=this;i(this,h),this.length=0,this.head=null,this.tail=null,o==null||o.forEach(function(s){return N.push(s)})}return n(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,N){return e(N.prev,t(o),N,this)}},{key:"insertAfter",value:function(o,N){return e(N,t(o),N.next,this)}},{key:"insertNodeBefore",value:function(o,N){return e(N.prev,o,N,this)}},{key:"insertNodeAfter",value:function(o,N){return e(N,o,N.next,this)}},{key:"push",value:function(o){return e(this.tail,t(o),null,this)}},{key:"unshift",value:function(o){return e(null,t(o),this.head,this)}},{key:"remove",value:function(o){return r(o,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(o){if(o<=this.length()){for(var N=1,s=this.head;N<o;)s=s.next,N++;return s.value}}},{key:"set_object_at",value:function(o,N){if(o<=this.length()){for(var s=1,g=this.head;s<o;)g=g.next,s++;g.value=N}}}]),h})()}),(function(m,L,A){function n(i,t,e){this.x=null,this.y=null,i==null&&t==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof t=="number"&&e==null?(this.x=i,this.y=t):i.constructor.name=="Point"&&t==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,t,e){i.constructor.name=="Point"&&t==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof t=="number"&&e==null&&(parseInt(i)==i&&parseInt(t)==t?this.move(i,t):(this.x=Math.floor(i+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(i,t){this.x=i,this.y=t},n.prototype.translate=function(i,t){this.x+=i,this.y+=t},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var t=i;return this.x==t.x&&this.y==t.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},m.exports=n}),(function(m,L,A){function n(i,t,e,r){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&t!=null&&e!=null&&r!=null&&(this.x=i,this.y=t,this.width=e,this.height=r)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},m.exports=n}),(function(m,L,A){var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(t.uniqueID==null&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return t??(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=t===void 0?"undefined":n(t);return t==null||e!="object"&&e!="function"},m.exports=i}),(function(m,L,A){function n(u){if(Array.isArray(u)){for(var p=0,y=Array(u.length);p<u.length;p++)y[p]=u[p];return y}else return Array.from(u)}var i=A(0),t=A(6),e=A(3),r=A(1),h=A(5),o=A(4),N=A(17),s=A(27);function g(u){s.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,u!=null&&(this.isRemoteUse=u)}g.RANDOM_SEED=1,g.prototype=Object.create(s.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var u=new t(this);return this.graphManager=u,u},g.prototype.newGraph=function(u){return new h(null,this.graphManager,u)},g.prototype.newNode=function(u){return new e(this.graphManager,u)},g.prototype.newEdge=function(u){return new r(null,null,u)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var u=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE==="during"?!1:(u&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,u)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var u=this.graphManager.getAllEdges(),p=0;p<u.length;p++)u[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},g.prototype.update=function(u){if(u==null)this.update2();else if(u instanceof e){var p=u;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),c=0;c<y.length;c++)update(y[c]);p.vGraphObject!=null&&p.vGraphObject.update(p)}else if(u instanceof r){var f=u;f.vGraphObject!=null&&f.vGraphObject.update(f)}else if(u instanceof h){var T=u;T.vGraphObject!=null&&T.vGraphObject.update(T)}},g.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},g.prototype.transform=function(u){if(u==null)this.transform(new o(0,0));else{var p=new N,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(u.x),p.setWorldOrgY(u.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var c=this.getAllNodes(),f,T=0;T<c.length;T++)f=c[T],f.transform(p)}}},g.prototype.positionNodesRandomly=function(u){if(u==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,c=u.getNodes(),f=0;f<c.length;f++)p=c[f],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},g.prototype.getFlatForest=function(){for(var u=[],p=!0,y=this.graphManager.getRoot().getNodes(),c=!0,f=0;f<y.length;f++)y[f].getChild()!=null&&(c=!1);if(!c)return u;var T=new Set,E=[],O=new Map,a=[];for(a=a.concat(y);a.length>0&&p;){for(E.push(a[0]);E.length>0&&p;){var d=E[0];E.splice(0,1),T.add(d);for(var l=d.getEdges(),f=0;f<l.length;f++){var v=l[f].getOtherEnd(d);if(O.get(d)!=v)if(!T.has(v))E.push(v),O.set(v,d);else{p=!1;break}}}if(!p)u=[];else{var _=[].concat(n(T));u.push(_);for(var f=0;f<_.length;f++){var D=_[f],I=a.indexOf(D);I>-1&&a.splice(I,1)}T=new Set,O=new Map}}return u},g.prototype.createDummyNodesForBendpoints=function(u){for(var p=[],y=u.source,c=this.graphManager.calcLowestCommonAncestor(u.source,u.target),f=0;f<u.bendpoints.length;f++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),c.add(T);var E=this.newEdge(null);this.graphManager.add(E,y,T),p.add(T),y=T}var E=this.newEdge(null);return this.graphManager.add(E,y,u.target),this.edgeToDummyNodes.set(u,p),u.isInterGraph()?this.graphManager.remove(u):c.remove(u),p},g.prototype.createBendpointsFromDummyNodes=function(){var u=[];u=u.concat(this.graphManager.getAllEdges()),u=[].concat(n(this.edgeToDummyNodes.keys()),u);for(var p=0;p<u.length;p++){var y=u[p];if(y.bendpoints.length>0){for(var c=this.edgeToDummyNodes.get(y),f=0;f<c.length;f++){var T=c[f],E=new o(T.getCenterX(),T.getCenterY()),O=y.bendpoints.get(f);O.x=E.x,O.y=E.y,T.getOwner().remove(T)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(u,p,y,c){if(y!=null&&c!=null){var f=p;if(u<=50){var T=p/y;f-=(p-T)/50*(50-u)}else{var E=p*c;f+=(E-p)/50*(u-50)}return f}else{var O,a;return u<=50?(O=9*p/500,a=p/10):(O=9*p/50,a=-8*p),O*u+a}},g.findCenterOfTree=function(u){var p=[];p=p.concat(u);var y=[],c=new Map,f=!1,T=null;(p.length==1||p.length==2)&&(f=!0,T=p[0]);for(var E=0;E<p.length;E++){var O=p[E],a=O.getNeighborsList().size;c.set(O,O.getNeighborsList().size),a==1&&y.push(O)}var d=[];for(d=d.concat(y);!f;){var l=[];l=l.concat(d),d=[];for(var E=0;E<p.length;E++){var O=p[E],v=p.indexOf(O);v>=0&&p.splice(v,1),O.getNeighborsList().forEach(function(I){if(y.indexOf(I)<0){var w=c.get(I)-1;w==1&&d.push(I),c.set(I,w)}})}y=y.concat(d),(p.length==1||p.length==2)&&(f=!0,T=p[0])}return T},g.prototype.setGraphManager=function(u){this.graphManager=u},m.exports=g}),(function(m,L,A){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},m.exports=n}),(function(m,L,A){var n=A(4);function i(t,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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},m.exports=i}),(function(m,L,A){function n(s){if(Array.isArray(s)){for(var g=0,u=Array(s.length);g<s.length;g++)u[g]=s[g];return u}else return Array.from(s)}var i=A(15),t=A(7),e=A(0),r=A(8),h=A(9);function o(){i.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var N in o.prototype=Object.create(i.prototype),i)o[N]=i[N];o.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var s,g,u,p,y,c,f=this.getGraphManager().getAllEdges(),T=0;T<f.length;T++)s=f[T],s.idealLength=this.idealEdgeLength,s.isInterGraph&&(u=s.getSource(),p=s.getTarget(),y=s.getSourceInLca().getEstimatedSize(),c=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(s.idealLength+=y+c-2*e.SIMPLE_NODE_SIZE),g=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*g))},o.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;this.incremental?(s>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(s>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var s=this.getAllEdges(),g,u=0;u<s.length;u++)g=s[u],this.calcSpringForce(g,g.idealLength)},o.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u,p,y,c,f=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),T=new Set,u=0;u<f.length;u++)y=f[u],this.calculateRepulsionForceOfANode(y,T,s,g),T.add(y);else for(u=0;u<f.length;u++)for(y=f[u],p=u+1;p<f.length;p++)c=f[p],y.getOwner()==c.getOwner()&&this.calcRepulsionForce(y,c)},o.prototype.calcGravitationalForces=function(){for(var s,g=this.getAllNodesToApplyGravitation(),u=0;u<g.length;u++)s=g[u],this.calcGravitationalForce(s)},o.prototype.moveNodes=function(){for(var s=this.getAllNodes(),g,u=0;u<s.length;u++)g=s[u],g.move()},o.prototype.calcSpringForce=function(s,g){var u=s.getSource(),p=s.getTarget(),y,c,f,T;if(this.uniformLeafNodeSizes&&u.getChild()==null&&p.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;y=s.getLength(),y!=0&&(c=this.springConstant*(y-g),f=c*(s.lengthX/y),T=c*(s.lengthY/y),u.springForceX+=f,u.springForceY+=T,p.springForceX-=f,p.springForceY-=T)},o.prototype.calcRepulsionForce=function(s,g){var u=s.getRect(),p=g.getRect(),y=[,,],c=[,,,,],f,T,E,O,a,d,l;if(u.intersects(p)){r.calcSeparationAmount(u,p,y,t.DEFAULT_EDGE_LENGTH/2),d=2*y[0],l=2*y[1];var v=s.noOfChildren*g.noOfChildren/(s.noOfChildren+g.noOfChildren);s.repulsionForceX-=v*d,s.repulsionForceY-=v*l,g.repulsionForceX+=v*d,g.repulsionForceY+=v*l}else this.uniformLeafNodeSizes&&s.getChild()==null&&g.getChild()==null?(f=p.getCenterX()-u.getCenterX(),T=p.getCenterY()-u.getCenterY()):(r.getIntersection(u,p,c),f=c[2]-c[0],T=c[3]-c[1]),Math.abs(f)<t.MIN_REPULSION_DIST&&(f=h.sign(f)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=h.sign(T)*t.MIN_REPULSION_DIST),E=f*f+T*T,O=Math.sqrt(E),a=this.repulsionConstant*s.noOfChildren*g.noOfChildren/E,d=a*f/O,l=a*T/O,s.repulsionForceX-=d,s.repulsionForceY-=l,g.repulsionForceX+=d,g.repulsionForceY+=l},o.prototype.calcGravitationalForce=function(s){var g=s.getOwner(),u=(g.getRight()+g.getLeft())/2,p=(g.getTop()+g.getBottom())/2,y=s.getCenterX()-u,c=s.getCenterY()-p,f=Math.abs(y)+s.getWidth()/2,T=Math.abs(c)+s.getHeight()/2,E;s.getOwner()==this.graphManager.getRoot()?(E=g.getEstimatedSize()*this.gravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y,s.gravitationForceY=-this.gravityConstant*c)):(E=g.getEstimatedSize()*this.compoundGravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*c*this.compoundGravityConstant))},o.prototype.isConverged=function(){var s,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||g},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var s,g=this.graphManager.getAllNodes(),u=0;u<g.length;u++)s=g[u],s.noOfChildren=s.getNoOfChildren()},o.prototype.calcGrid=function(s){var g=0,u=0;g=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),u=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));for(var p=Array(g),y=0;y<g;y++)p[y]=Array(u);for(var y=0;y<g;y++)for(var c=0;c<u;c++)p[y][c]=[];return p},o.prototype.addNodeToGrid=function(s,g,u){var p=0,y=0,c=0,f=0;p=parseInt(Math.floor((s.getRect().x-g)/this.repulsionRange)),y=parseInt(Math.floor((s.getRect().width+s.getRect().x-g)/this.repulsionRange)),c=parseInt(Math.floor((s.getRect().y-u)/this.repulsionRange)),f=parseInt(Math.floor((s.getRect().height+s.getRect().y-u)/this.repulsionRange));for(var T=p;T<=y;T++)for(var E=c;E<=f;E++)this.grid[T][E].push(s),s.setGridCoordinates(p,y,c,f)},o.prototype.updateGrid=function(){var s,g,u=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),s=0;s<u.length;s++)g=u[s],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(s,g,u,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&u||p){var y=new Set;s.surrounding=[];for(var c,f=this.grid,T=s.startX-1;T<s.finishX+2;T++)for(var E=s.startY-1;E<s.finishY+2;E++)if(!(T<0||E<0||T>=f.length||E>=f[0].length)){for(var O=0;O<f[T][E].length;O++)if(c=f[T][E][O],!(s.getOwner()!=c.getOwner()||s==c)&&!g.has(c)&&!y.has(c)){var a=Math.abs(s.getCenterX()-c.getCenterX())-(s.getWidth()/2+c.getWidth()/2),d=Math.abs(s.getCenterY()-c.getCenterY())-(s.getHeight()/2+c.getHeight()/2);a<=this.repulsionRange&&d<=this.repulsionRange&&y.add(c)}}s.surrounding=[].concat(n(y))}for(T=0;T<s.surrounding.length;T++)this.calcRepulsionForce(s,s.surrounding[T])},o.prototype.calcRepulsionRange=function(){return 0},m.exports=o}),(function(m,L,A){var n=A(1),i=A(7);function t(r,h,o){n.call(this,r,h,o),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var e in t.prototype=Object.create(n.prototype),n)t[e]=n[e];m.exports=t}),(function(m,L,A){var n=A(3);function i(e,r,h,o){n.call(this,e,r,h,o),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=[]}for(var t in i.prototype=Object.create(n.prototype),n)i[t]=n[t];i.prototype.setGridCoordinates=function(e,r,h,o){this.startX=e,this.finishX=r,this.startY=h,this.finishY=o},m.exports=i}),(function(m,L,A){function n(i,t){this.width=0,this.height=0,i!==null&&t!==null&&(this.height=t,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},m.exports=n}),(function(m,L,A){var n=A(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),this.map[t]!=null},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},m.exports=i}),(function(m,L,A){var n=A(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,h=0;h<r;h++)t.push(this.set[e[h]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var h=t[r];this.add(h)}},m.exports=i}),(function(m,L,A){var n=(function(){function e(r,h){for(var o=0;o<h.length;o++){var N=h[o];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(r,N.key,N)}}return function(r,h,o){return h&&e(r.prototype,h),o&&e(r,o),r}})();function i(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}var t=A(11);m.exports=(function(){function e(r,h){i(this,e),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=r instanceof t?r.size():r.length,this._quicksort(r,0,o-1)}return n(e,[{key:"_quicksort",value:function(r,h,o){if(h<o){var N=this._partition(r,h,o);this._quicksort(r,h,N),this._quicksort(r,N+1,o)}}},{key:"_partition",value:function(r,h,o){for(var N=this._get(r,h),s=h,g=o;;){for(;this.compareFunction(N,this._get(r,g));)g--;for(;this.compareFunction(this._get(r,s),N);)s++;if(s<g)this._swap(r,s,g),s++,g--;else return g}}},{key:"_get",value:function(r,h){return r instanceof t?r.get_object_at(h):r[h]}},{key:"_set",value:function(r,h,o){r instanceof t?r.set_object_at(h,o):r[h]=o}},{key:"_swap",value:function(r,h,o){var N=this._get(r,h);this._set(r,h,this._get(r,o)),this._set(r,o,N)}},{key:"_defaultCompareFunction",value:function(r,h){return h>r}}]),e})()}),(function(m,L,A){var n=(function(){function t(e,r){for(var h=0;h<r.length;h++){var o=r[h];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,h){return r&&t(e.prototype,r),h&&t(e,h),e}})();function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}m.exports=(function(){function t(e,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=r,this.match_score=h,this.mismatch_penalty=o,this.gap_penalty=N,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[s][g]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var p=0;p<this.jMax;p++)this.tracebackGrid[u][p]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var o=1;o<this.jMax;o++){var N=void 0;N=this.sequence1[h-1]===this.sequence2[o-1]?this.grid[h-1][o-1]+this.match_score:this.grid[h-1][o-1]+this.mismatch_penalty;var s=this.grid[h-1][o]+this.gap_penalty,g=this.grid[h][o-1]+this.gap_penalty,u=[N,s,g],p=this.arrayAllMaxIndexes(u);this.grid[h][o]=u[p[0]],this.tracebackGrid[h][o]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],h=this.tracebackGrid[r.pos[0]][r.pos[1]];h[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),h[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),h[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var h=[],o=-1;(o=e.indexOf(r,o+1))!==-1;)h.push(o);return h}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),t})()}),(function(m,L,A){var n=function(){};n.FDLayout=A(18),n.FDLayoutConstants=A(7),n.FDLayoutEdge=A(19),n.FDLayoutNode=A(20),n.DimensionD=A(21),n.HashMap=A(22),n.HashSet=A(23),n.IGeometry=A(8),n.IMath=A(9),n.Integer=A(10),n.Point=A(12),n.PointD=A(4),n.RandomSeed=A(16),n.RectangleD=A(13),n.Transform=A(17),n.UniqueIDGeneretor=A(14),n.Quicksort=A(24),n.LinkedList=A(11),n.LGraphObject=A(2),n.LGraph=A(5),n.LEdge=A(1),n.LGraphManager=A(6),n.LNode=A(3),n.Layout=A(15),n.LayoutConstants=A(0),n.NeedlemanWunsch=A(25),m.exports=n}),(function(m,L,A){function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var h=this.listeners[r];h.event===t&&h.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var h=this.listeners[r];t===h.event&&h.callback(e)}},m.exports=n})])})})),Q=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Z()):typeof define=="function"&&define.amd?define(["layout-base"],L):typeof C=="object"?C.coseBase=L(Z()):m.coseBase=L(m.layoutBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=7)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).FDLayoutConstants;function t(){}for(var e in i)t[e]=i[e];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutEdge;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraph;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraphManager;function t(r){i.call(this,r)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutNode,t=n(0).IMath;function e(h,o,N,s){i.call(this,h,o,N,s)}for(var r in e.prototype=Object.create(i.prototype),i)e[r]=i[r];e.prototype.move=function(){var h=this.graphManager.getLayout();this.displacementX=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),h.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},e.prototype.propogateDisplacementToChildren=function(h,o){for(var N=this.getChild().getNodes(),s,g=0;g<N.length;g++)s=N[g],s.getChild()==null?(s.moveBy(h,o),s.displacementX+=h,s.displacementY+=o):s.propogateDisplacementToChildren(h,o)},e.prototype.setPred1=function(h){this.pred1=h},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(h){this.next=h},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(h){this.processed=h},e.prototype.isProcessed=function(){return processed},L.exports=e}),(function(L,A,n){var i=n(0).FDLayout,t=n(4),e=n(3),r=n(5),h=n(2),o=n(1),N=n(0).FDLayoutConstants,s=n(0).LayoutConstants,g=n(0).Point,u=n(0).PointD,p=n(0).Layout,y=n(0).Integer,c=n(0).IGeometry,f=n(0).LGraph,T=n(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var O in E.prototype=Object.create(i.prototype),i)E[O]=i[O];E.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},E.prototype.newGraph=function(a){return new e(null,this.graphManager,a)},E.prototype.newNode=function(a){return new r(this.graphManager,a)},E.prototype.newEdge=function(a){return new h(null,null,a)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return s.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(v){return a.has(v)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var l=this.getFlatForest();if(l.length>0)this.positionNodesRadially(l);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return a.has(D)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.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%N.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-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 a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(_){return a.has(_)});this.graphManager.setAllNodesToApplyGravitation(d),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.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()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var l=!this.isTreeGrowing&&!this.isGrowthFinished,v=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(l,v),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),d={},l=0;l<a.length;l++){var v=a[l].rect,_=a[l].id;d[_]={id:_,x:v.getCenterX(),y:v.getCenterY(),w:v.width,h:v.height}}return d},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(N.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],d,l=this.graphManager.getGraphs(),v=l.length,_;for(_=0;_<v;_++)d=l[_],d.updateConnected(),d.isConnected||(a=a.concat(d.getNodes()));return a},E.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var d=new Set,l;for(l=0;l<a.length;l++){var v=a[l];if(!d.has(v)){var _=v.getSource(),D=v.getTarget();if(_==D)v.getBendpoints().push(new u),v.getBendpoints().push(new u),this.createDummyNodesForBendpoints(v),d.add(v);else{var I=[];if(I=I.concat(_.getEdgeListToNode(D)),I=I.concat(D.getEdgeListToNode(_)),!d.has(I[0])){if(I.length>1){var w;for(w=0;w<I.length;w++){var R=I[w];R.getBendpoints().push(new u),this.createDummyNodesForBendpoints(R)}}I.forEach(function(G){d.add(G)})}}}if(d.size==a.length)break}},E.prototype.positionNodesRadially=function(a){for(var d=new g(0,0),l=Math.ceil(Math.sqrt(a.length)),v=0,_=0,D=0,I=new u(0,0),w=0;w<a.length;w++){w%l==0&&(D=0,_=v,w!=0&&(_+=o.DEFAULT_COMPONENT_SEPERATION),v=0);var R=a[w],G=p.findCenterOfTree(R);d.x=D,d.y=_,I=E.radialLayout(R,G,d),I.y>v&&(v=Math.floor(I.y)),D=Math.floor(I.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(s.WORLD_CENTER_X-I.x/2,s.WORLD_CENTER_Y-I.y/2))},E.radialLayout=function(a,d,l){var v=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(d,null,0,359,0,v);var _=f.calculateBounds(a),D=new T;D.setDeviceOrgX(_.getMinX()),D.setDeviceOrgY(_.getMinY()),D.setWorldOrgX(l.x),D.setWorldOrgY(l.y);for(var I=0;I<a.length;I++)a[I].transform(D);var w=new u(_.getMaxX(),_.getMaxY());return D.inverseTransformPoint(w)},E.branchRadialLayout=function(a,d,l,v,_,D){var I=(v-l+1)/2;I<0&&(I+=180);var w=(I+l)%360*c.TWO_PI/360,R=_*Math.cos(w),G=_*Math.sin(w);a.setCenter(R,G);var x=[];x=x.concat(a.getEdges());var M=x.length;d!=null&&M--;for(var U=0,b=x.length,F,S=a.getEdgesBetween(d);S.length>1;){var Y=S[0];S.splice(0,1);var X=x.indexOf(Y);X>=0&&x.splice(X,1),b--,M--}F=d==null?0:(x.indexOf(S[0])+1)%b;for(var W=Math.abs(v-l)/M,B=F;U!=M;B=++B%b){var H=x[B].getOtherEnd(a);if(H!=d){var q=(l+U*W)%360,ot=(q+W)%360;E.branchRadialLayout(H,a,q,ot,_+D,D),U++}}},E.maxDiagonalInTree=function(a){for(var d=y.MIN_VALUE,l=0;l<a.length;l++){var v=a[l].getDiagonal();v>d&&(d=v)}return d},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var a=this,d={};this.memberGroups={},this.idToDummyNode={};for(var l=[],v=this.graphManager.getAllNodes(),_=0;_<v.length;_++){var D=v[_],I=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(I.id==null||!this.getToBeTiled(I))&&l.push(D)}for(var _=0;_<l.length;_++){var D=l[_],w=D.getParent().id;d[w]===void 0&&(d[w]=[]),d[w]=d[w].concat(D)}Object.keys(d).forEach(function(R){if(d[R].length>1){var G="DummyCompound_"+R;a.memberGroups[G]=d[R];var x=d[R][0].getParent(),M=new r(a.graphManager);M.id=G,M.paddingLeft=x.paddingLeft||0,M.paddingRight=x.paddingRight||0,M.paddingBottom=x.paddingBottom||0,M.paddingTop=x.paddingTop||0,a.idToDummyNode[G]=M;var U=a.getGraphManager().add(a.newGraph(),M),b=x.getChild();b.add(M);for(var F=0;F<d[R].length;F++){var S=d[R][F];b.remove(S),U.add(S)}}})},E.prototype.clearCompounds=function(){var a={},d={};this.performDFSOnCompounds();for(var l=0;l<this.compoundOrder.length;l++)d[this.compoundOrder[l].id]=this.compoundOrder[l],a[this.compoundOrder[l].id]=[].concat(this.compoundOrder[l].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[l].getChild()),this.compoundOrder[l].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,d)},E.prototype.clearZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(l){var v=a.idToDummyNode[l];d[l]=a.tileNodes(a.memberGroups[l],v.paddingLeft+v.paddingRight),v.rect.width=d[l].width,v.rect.height=d[l].height})},E.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var d=this.compoundOrder[a],l=d.id,v=d.paddingLeft,_=d.paddingTop;this.adjustLocations(this.tiledMemberPack[l],d.rect.x,d.rect.y,v,_)}},E.prototype.repopulateZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack;Object.keys(d).forEach(function(l){var v=a.idToDummyNode[l],_=v.paddingLeft,D=v.paddingTop;a.adjustLocations(d[l],v.rect.x,v.rect.y,_,D)})},E.prototype.getToBeTiled=function(a){var d=a.id;if(this.toBeTiled[d]!=null)return this.toBeTiled[d];var l=a.getChild();if(l==null)return this.toBeTiled[d]=!1,!1;for(var v=l.getNodes(),_=0;_<v.length;_++){var D=v[_];if(this.getNodeDegree(D)>0)return this.toBeTiled[d]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[d]=!1,!1}return this.toBeTiled[d]=!0,!0},E.prototype.getNodeDegree=function(a){a.id;for(var d=a.getEdges(),l=0,v=0;v<d.length;v++){var _=d[v];_.getSource().id!==_.getTarget().id&&(l+=1)}return l},E.prototype.getNodeDegreeWithChildren=function(a){var d=this.getNodeDegree(a);if(a.getChild()==null)return d;for(var l=a.getChild().getNodes(),v=0;v<l.length;v++){var _=l[v];d+=this.getNodeDegreeWithChildren(_)}return d},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(a){for(var d=0;d<a.length;d++){var l=a[d];l.getChild()!=null&&this.fillCompexOrderByDFS(l.getChild().getNodes()),this.getToBeTiled(l)&&this.compoundOrder.push(l)}},E.prototype.adjustLocations=function(a,d,l,v,_){d+=v,l+=_;for(var D=d,I=0;I<a.rows.length;I++){var w=a.rows[I];d=D;for(var R=0,G=0;G<w.length;G++){var x=w[G];x.rect.x=d,x.rect.y=l,d+=x.rect.width+a.horizontalPadding,x.rect.height>R&&(R=x.rect.height)}l+=R+a.verticalPadding}},E.prototype.tileCompoundMembers=function(a,d){var l=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(v){var _=d[v];l.tiledMemberPack[v]=l.tileNodes(a[v],_.paddingLeft+_.paddingRight),_.rect.width=l.tiledMemberPack[v].width,_.rect.height=l.tiledMemberPack[v].height})},E.prototype.tileNodes=function(a,d){var l={rows:[],rowWidth:[],rowHeight:[],width:0,height:d,verticalPadding:o.TILING_PADDING_VERTICAL,horizontalPadding:o.TILING_PADDING_HORIZONTAL};a.sort(function(D,I){return D.rect.width*D.rect.height>I.rect.width*I.rect.height?-1:D.rect.width*D.rect.height<I.rect.width*I.rect.height?1:0});for(var v=0;v<a.length;v++){var _=a[v];l.rows.length==0?this.insertNodeToRow(l,_,0,d):this.canAddHorizontal(l,_.rect.width,_.rect.height)?this.insertNodeToRow(l,_,this.getShortestRowIndex(l),d):this.insertNodeToRow(l,_,l.rows.length,d),this.shiftToLastRow(l)}return l},E.prototype.insertNodeToRow=function(a,d,l,v){var _=v;l==a.rows.length&&(a.rows.push([]),a.rowWidth.push(_),a.rowHeight.push(0));var D=a.rowWidth[l]+d.rect.width;a.rows[l].length>0&&(D+=a.horizontalPadding),a.rowWidth[l]=D,a.width<D&&(a.width=D);var I=d.rect.height;l>0&&(I+=a.verticalPadding);var w=0;I>a.rowHeight[l]&&(w=a.rowHeight[l],a.rowHeight[l]=I,w=a.rowHeight[l]-w),a.height+=w,a.rows[l].push(d)},E.prototype.getShortestRowIndex=function(a){for(var d=-1,l=Number.MAX_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]<l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.getLongestRowIndex=function(a){for(var d=-1,l=Number.MIN_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]>l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.canAddHorizontal=function(a,d,l){var v=this.getShortestRowIndex(a);if(v<0)return!0;var _=a.rowWidth[v];if(_+a.horizontalPadding+d<=a.width)return!0;var D=0;a.rowHeight[v]<l&&v>0&&(D=l+a.verticalPadding-a.rowHeight[v]);var I=a.width-_>=d+a.horizontalPadding?(a.height+D)/(_+d+a.horizontalPadding):(a.height+D)/a.width;D=l+a.verticalPadding;var w=a.width<d?(a.height+D)/d:(a.height+D)/a.width;return w<1&&(w=1/w),I<1&&(I=1/I),I<w},E.prototype.shiftToLastRow=function(a){var d=this.getLongestRowIndex(a),l=a.rowWidth.length-1,v=a.rows[d],_=v[v.length-1],D=_.width+a.horizontalPadding;if(a.width-a.rowWidth[l]>D&&d!=l){v.splice(-1,1),a.rows[l].push(_),a.rowWidth[d]=a.rowWidth[d]-D,a.rowWidth[l]=a.rowWidth[l]+D,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,w=0;w<v.length;w++)v[w].height>I&&(I=v[w].height);d>0&&(I+=a.verticalPadding);var R=a.rowHeight[d]+a.rowHeight[l];a.rowHeight[d]=I,a.rowHeight[l]<_.height+a.verticalPadding&&(a.rowHeight[l]=_.height+a.verticalPadding);var G=a.rowHeight[d]+a.rowHeight[l];a.height+=G-R,this.shiftToLastRow(a)}},E.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var a=[],d=!0,l;d;){var v=this.graphManager.getAllNodes(),_=[];d=!1;for(var D=0;D<v.length;D++)l=v[D],l.getEdges().length==1&&!l.getEdges()[0].isInterGraph&&l.getChild()==null&&(_.push([l,l.getEdges()[0],l.getOwner()]),d=!0);if(d==1){for(var I=[],w=0;w<_.length;w++)_[w][0].getEdges().length==1&&(I.push(_[w]),_[w][0].getOwner().remove(_[w][0]));a.push(I),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},E.prototype.growTree=function(a){for(var d=a[a.length-1],l,v=0;v<d.length;v++)l=d[v],this.findPlaceforPrunedNode(l),l[2].add(l[0]),l[2].add(l[1],l[1].source,l[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(a){var d,l,v=a[0];l=v==a[1].source?a[1].target:a[1].source;var _=l.startX,D=l.finishX,I=l.startY,w=l.finishY,R=[0,0,0,0];if(I>0)for(var G=_;G<=D;G++)R[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(D<this.grid.length-1)for(var G=I;G<=w;G++)R[1]+=this.grid[D+1][G].length+this.grid[D][G].length-1;if(w<this.grid[0].length-1)for(var G=_;G<=D;G++)R[2]+=this.grid[G][w+1].length+this.grid[G][w].length-1;if(_>0)for(var G=I;G<=w;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var x=y.MAX_VALUE,M,U,b=0;b<R.length;b++)R[b]<x?(x=R[b],M=1,U=b):R[b]==x&&M++;if(M==3&&x==0)R[0]==0&&R[1]==0&&R[2]==0?d=1:R[0]==0&&R[1]==0&&R[3]==0?d=0:R[0]==0&&R[2]==0&&R[3]==0?d=3:R[1]==0&&R[2]==0&&R[3]==0&&(d=2);else if(M==2&&x==0){var F=Math.floor(Math.random()*2);d=R[0]==0&&R[1]==0?F==0?0:1:R[0]==0&&R[2]==0?F==0?0:2:R[0]==0&&R[3]==0?F==0?0:3:R[1]==0&&R[2]==0?F==0?1:2:R[1]==0&&R[3]==0?F==0?1:3:F==0?2:3}else if(M==4&&x==0){var F=Math.floor(Math.random()*4);d=F}else d=U;d==0?v.setCenter(l.getCenterX(),l.getCenterY()-l.getHeight()/2-N.DEFAULT_EDGE_LENGTH-v.getHeight()/2):d==1?v.setCenter(l.getCenterX()+l.getWidth()/2+N.DEFAULT_EDGE_LENGTH+v.getWidth()/2,l.getCenterY()):d==2?v.setCenter(l.getCenterX(),l.getCenterY()+l.getHeight()/2+N.DEFAULT_EDGE_LENGTH+v.getHeight()/2):v.setCenter(l.getCenterX()-l.getWidth()/2-N.DEFAULT_EDGE_LENGTH-v.getWidth()/2,l.getCenterY())},L.exports=E}),(function(L,A,n){var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),L.exports=i})])})})),at=nt(V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Q()):typeof define=="function"&&define.amd?define(["cose-base"],L):typeof C=="object"?C.cytoscapeCoseBilkent=L(Q()):m.cytoscapeCoseBilkent=L(m.coseBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=1)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,e=n(0).CoSEConstants,r=n(0).CoSELayout,h=n(0).CoSENode,o=n(0).layoutBase.PointD,N=n(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(c,f){var T={};for(var E in c)T[E]=c[E];for(var E in f)T[E]=f[E];return T}function u(c){this.options=g(s,c),p(this.options)}var p=function(c){c.nodeRepulsion!=null&&(e.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(e.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(e.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(e.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(e.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(e.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(e.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?i.QUALITY=0:c.quality=="proof"?i.QUALITY=2:i.QUALITY=1,e.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,e.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,e.ANIMATE=t.ANIMATE=i.ANIMATE=c.animate,e.TILE=c.tile,e.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,e.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};u.prototype.run=function(){var c,f,T=this.options;this.idToLNode={};var E=this.layout=new r,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=E.newGraphManager();this.gm=a;var d=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(d),E);for(var v=0;v<l.length;v++){var _=l[v],D=this.idToLNode[_.data("source")],I=this.idToLNode[_.data("target")];if(D!==I&&D.getEdgesBetween(I).length==0){var w=a.add(E.newEdge(),D,I);w.id=_.id()}}var R=function(x,M){typeof x=="number"&&(x=M);var U=x.data("id"),b=O.idToLNode[U];return{x:b.getRect().getCenterX(),y:b.getRect().getCenterY()}},G=function x(){for(var M=function(){T.fit&&T.cy.fit(T.eles,T.padding),c||(c=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},U=O.options.refresh,b,F=0;F<U&&!b;F++)b=O.stopped||O.layout.tick();if(b){E.checkLayoutSuccess()&&!E.isSubLayout&&E.doPostLayout(),E.tilingPostLayout&&E.tilingPostLayout(),E.isLayoutFinished=!0,O.options.eles.nodes().positions(R),M(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),f&&cancelAnimationFrame(f),c=!1;return}var S=O.layout.getPositionsData();T.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var W=Y.id(),B=S[W],H=Y;B==null&&(B=S[H.data("parent")]||S["DummyCompound_"+H.data("parent")],S[W]=B,H=H.parent()[0],H!=null););return B==null?{x:Y.position("x"),y:Y.position("y")}:{x:B.x,y:B.y}}}),M(),f=requestAnimationFrame(x)};return E.addListener("layoutstarted",function(){O.options.animate==="during"&&(f=requestAnimationFrame(G))}),E.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,R),c=!1),this},u.prototype.getTopMostNodes=function(c){for(var f={},T=0;T<c.length;T++)f[c[T].id()]=!0;return c.filter(function(E,O){typeof E=="number"&&(E=O);for(var a=E.parent()[0];a!=null;){if(f[a.id()])return!1;a=a.parent()[0]}return!0})},u.prototype.processChildrenList=function(c,f,T){for(var E=f.length,O=0;O<E;O++){var a=f[O],d=a.children(),l,v=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(l=a.outerWidth()!=null&&a.outerHeight()!=null?c.add(new h(T.graphManager,new o(a.position("x")-v.w/2,a.position("y")-v.h/2),new N(parseFloat(v.w),parseFloat(v.h)))):c.add(new h(this.graphManager)),l.id=a.data("id"),l.paddingLeft=parseInt(a.css("padding")),l.paddingTop=parseInt(a.css("padding")),l.paddingRight=parseInt(a.css("padding")),l.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var _=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,I=a.css("text-halign");l.labelWidth=_,l.labelHeight=D,l.labelPos=I}if(this.idToLNode[a.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),d!=null&&d.length>0){var w=T.getGraphManager().add(T.newGraph(),l);this.processChildrenList(w,d,T)}}},u.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",u)};typeof cytoscape<"u"&&y(cytoscape),L.exports=y})])})}))(),1);z.use(at.default);function $(C,P){C.forEach(m=>{let L={id:m.id,labelText:m.label,height:m.height,width:m.width,padding:m.padding??0};Object.keys(m).forEach(A=>{["id","label","height","width","padding","x","y"].includes(A)||(L[A]=m[A])}),P.add({group:"nodes",data:L,position:{x:m.x??0,y:m.y??0}})})}k($,"addNodes");function K(C,P){C.forEach(m=>{let L={id:m.id,source:m.start,target:m.end};Object.keys(m).forEach(A=>{["id","start","end"].includes(A)||(L[A]=m[A])}),P.add({group:"edges",data:L})})}k(K,"addEdges");function J(C){return new Promise(P=>{let m=st("body").append("div").attr("id","cy").attr("style","display:none"),L=z({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),$(C.nodes,L),K(C.edges,L),L.nodes().forEach(function(A){A.layoutDimensions=()=>{let n=A.data();return{w:n.width,h:n.height}}}),L.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),L.ready(A=>{j.info("Cytoscape ready",A),P(L)})})}k(J,"createCytoscapeInstance");function tt(C){return C.nodes().map(P=>{let m=P.data(),L=P.position(),A={id:m.id,x:L.x,y:L.y};return Object.keys(m).forEach(n=>{n!=="id"&&(A[n]=m[n])}),A})}k(tt,"extractPositionedNodes");function et(C){return C.edges().map(P=>{let m=P.data(),L=P._private.rscratch,A={id:m.id,source:m.source,target:m.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(m).forEach(n=>{["id","source","target"].includes(n)||(A[n]=m[n])}),A})}k(et,"extractPositionedEdges");async function it(C,P){j.debug("Starting cose-bilkent layout algorithm");try{rt(C);let m=await J(C),L=tt(m),A=et(m);return j.debug(`Layout completed: ${L.length} nodes, ${A.length} edges`),{nodes:L,edges:A}}catch(m){throw j.error("Error in cose-bilkent layout algorithm:",m),m}}k(it,"executeCoseBilkentLayout");function rt(C){if(!C)throw Error("Layout data is required");if(!C.config)throw Error("Configuration is required in layout data");if(!C.rootNode)throw Error("Root node is required");if(!C.nodes||!Array.isArray(C.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(C.edges))throw Error("Edges array is required in layout data");return!0}k(rt,"validateLayoutData");var ht=k(async(C,P,{insertCluster:m,insertEdge:L,insertEdgeLabel:A,insertMarkers:n,insertNode:i,log:t,positionEdgeLabel:e},{algorithm:r})=>{let h={},o={},N=P.select("g");n(N,C.markers,C.type,C.diagramId);let s=N.insert("g").attr("class","subgraphs"),g=N.insert("g").attr("class","edgePaths"),u=N.insert("g").attr("class","edgeLabels"),p=N.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(C.nodes.map(async c=>{if(c.isGroup){let f={...c};o[c.id]=f,h[c.id]=f,await m(s,c)}else{let f={...c};h[c.id]=f;let T=await i(p,c,{config:C.config,dir:C.direction||"TB"}),E=T.node().getBBox();f.width=E.width,f.height=E.height,f.domId=T,t.debug(`Node ${c.id} dimensions: ${E.width}x${E.height}`)}})),t.debug("Running cose-bilkent layout algorithm");let y=await it({...C,nodes:C.nodes.map(c=>{let f=h[c.id];return{...c,width:f.width,height:f.height}})},C.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(c=>{let f=h[c.id];f!=null&&f.domId&&(f.domId.attr("transform",`translate(${c.x}, ${c.y})`),f.x=c.x,f.y=c.y,t.debug(`Positioned node ${f.id} at center (${c.x}, ${c.y})`))}),y.edges.forEach(c=>{let f=C.edges.find(T=>T.id===c.id);f&&(f.points=[{x:c.startX,y:c.startY},{x:c.midX,y:c.midY},{x:c.endX,y:c.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(C.edges.map(async c=>{await A(u,c);let f=h[c.start??""],T=h[c.end??""];if(f&&T){let E=y.edges.find(O=>O.id===c.id);if(E){t.debug("APA01 positionedEdge",E);let O={...c};e(O,L(g,O,o,C.type,f,T,C.diagramId))}else{let O={...c,points:[{x:f.x||0,y:f.y||0},{x:T.x||0,y:T.y||0}]};e(O,L(g,O,o,C.type,f,T,C.diagramId))}}})),t.debug("Cose-bilkent rendering completed")},"render");export{ht as render};
1
+ import{s as nt,t as V}from"./chunk-LvLJmgfZ.js";import{u as st}from"./src-xYaLe_3f.js";import{n as k,r as j}from"./src-C042FyXq.js";import{t as z}from"./cytoscape.esm-CbUmcCyd.js";var Z=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L():typeof define=="function"&&define.amd?define([],L):typeof C=="object"?C.layoutBase=L():m.layoutBase=L()})(C,function(){return(function(m){var L={};function A(n){if(L[n])return L[n].exports;var i=L[n]={i:n,l:!1,exports:{}};return m[n].call(i.exports,i,i.exports,A),i.l=!0,i.exports}return A.m=m,A.c=L,A.i=function(n){return n},A.d=function(n,i,t){A.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},A.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return A.d(i,"a",i),i},A.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},A.p="",A(A.s=26)})([(function(m,L,A){function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,m.exports=n}),(function(m,L,A){var n=A(2),i=A(8),t=A(9);function e(h,o,N){n.call(this,N),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=N,this.bendpoints=[],this.source=h,this.target=o}for(var r in e.prototype=Object.create(n.prototype),n)e[r]=n[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(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(h,o){for(var N=this.getOtherEnd(h),s=o.getGraphManager().getRoot();;){if(N.getOwner()==o)return N;if(N.getOwner()==s)break;N=N.getOwner().getParent()}return null},e.prototype.updateLength=function(){var h=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=e}),(function(m,L,A){function n(i){this.vGraphObject=i}m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(13),e=A(0),r=A(16),h=A(4);function o(s,g,u,p){u==null&&p==null&&(p=g),n.call(this,p),s.graphManager!=null&&(s=s.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=s,u!=null&&g!=null?this.rect=new t(g.x,g.y,u.width,u.height):this.rect=new t}for(var N in o.prototype=Object.create(n.prototype),n)o[N]=n[N];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(s){this.rect.width=s},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(s){this.rect.height=s},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(s,g){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(s,g){this.rect.x=s-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(s,g){this.rect.x=s,this.rect.y=g},o.prototype.moveBy=function(s,g){this.rect.x+=s,this.rect.y+=g},o.prototype.getEdgeListToNode=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(p.target==s){if(p.source!=u)throw"Incorrect edge source!";g.push(p)}}),g},o.prototype.getEdgesBetween=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(!(p.source==u||p.target==u))throw"Incorrect edge source and/or target";(p.target==s||p.source==s)&&g.push(p)}),g},o.prototype.getNeighborsList=function(){var s=new Set,g=this;return g.edges.forEach(function(u){if(u.source==g)s.add(u.target);else{if(u.target!=g)throw"Incorrect incidency!";s.add(u.source)}}),s},o.prototype.withChildren=function(){var s=new Set,g,u;if(s.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)g=p[y],u=g.withChildren(),u.forEach(function(c){s.add(c)});return s},o.prototype.getNoOfChildren=function(){var s=0,g;if(this.child==null)s=1;else for(var u=this.child.getNodes(),p=0;p<u.length;p++)g=u[p],s+=g.getNoOfChildren();return s==0&&(s=1),s},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.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)},o.prototype.scatter=function(){var s,g,u=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_X+r.nextDouble()*(p-u)+u;var y=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+r.nextDouble()*(c-y)+y,this.rect.x=s,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=s.getRight()-s.getLeft(),u=s.getBottom()-s.getTop();this.labelWidth>g&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>u&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-u)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-u),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(s){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var u=this.rect.y;u>e.WORLD_BOUNDARY?u=e.WORLD_BOUNDARY:u<-e.WORLD_BOUNDARY&&(u=-e.WORLD_BOUNDARY);var p=new h(g,u),y=s.inverseTransformPoint(p);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,L,A){function n(i,t){i==null&&t==null?(this.x=0,this.y=0):(this.x=i,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(0),e=A(6),r=A(3),h=A(1),o=A(13),N=A(12),s=A(11);function g(p,y,c){n.call(this,c),this.estimatedSize=i.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,c){if(y==null&&c==null){var f=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(f)>-1)throw"Node already in graph!";return f.owner=this,this.getNodes().push(f),f}else{var T=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(!(y.owner==c.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner==c.owner?(T.source=y,T.target=c,T.isInterGraph=!1,this.getEdges().push(T),y.edges.push(T),c!=y&&c.edges.push(T),T):null}},g.prototype.remove=function(p){var y=p;if(p instanceof r){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var c=y.edges.slice(),f,T=c.length,E=0;E<T;E++)f=c[E],f.isInterGraph?this.graphManager.remove(f):f.source.owner.remove(f);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof h){var f=p;if(f==null)throw"Edge is null!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.owner!=null&&f.target.owner!=null&&f.source.owner==this&&f.target.owner==this))throw"Source and/or target owner is invalid!";var a=f.source.edges.indexOf(f),d=f.target.edges.indexOf(f);if(!(a>-1&&d>-1))throw"Source and/or target doesn't know this edge!";f.source.edges.splice(a,1),f.target!=f.source&&f.target.edges.splice(d,1);var O=f.source.owner.getEdges().indexOf(f);if(O==-1)throw"Not in owner's edge list!";f.source.owner.getEdges().splice(O,1)}},g.prototype.updateLeftTop=function(){for(var p=i.MAX_VALUE,y=i.MAX_VALUE,c,f,T,E=this.getNodes(),O=E.length,a=0;a<O;a++){var d=E[a];c=d.getTop(),f=d.getLeft(),p>c&&(p=c),y>f&&(y=f)}return p==i.MAX_VALUE?null:(T=E[0].getParent().paddingLeft==null?this.margin:E[0].getParent().paddingLeft,this.left=y-T,this.top=p-T,new N(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l,v=this.nodes,_=v.length,D=0;D<_;D++){var I=v[D];p&&I.child!=null&&I.updateBounds(),E=I.getLeft(),O=I.getRight(),a=I.getTop(),d=I.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}var w=new o(y,f,c-y,T-f);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),l=v[0].getParent().paddingLeft==null?this.margin:v[0].getParent().paddingLeft,this.left=w.x-l,this.right=w.x+w.width+l,this.top=w.y-l,this.bottom=w.y+w.height+l},g.calculateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l=p.length,v=0;v<l;v++){var _=p[v];E=_.getLeft(),O=_.getRight(),a=_.getTop(),d=_.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}return new o(y,f,c-y,T-f)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,c=y.length,f=0;f<c;f++){var T=y[f];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new s,c=new Set,f=this.nodes[0],T,E;for(f.withChildren().forEach(function(l){y.push(l),c.add(l)});y.length!==0;){f=y.shift(),T=f.getEdges();for(var O=T.length,a=0;a<O;a++)E=T[a].getOtherEndInGraph(f,this),E!=null&&!c.has(E)&&E.withChildren().forEach(function(l){y.push(l),c.add(l)})}if(this.isConnected=!1,c.size>=this.nodes.length){var d=0;c.forEach(function(l){l.owner==p&&d++}),d==this.nodes.length&&(this.isConnected=!0)}},m.exports=g}),(function(m,L,A){var n,i=A(1);function t(e){n=A(5),this.layout=e,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),h=this.add(e,r);return this.setRootGraph(h),this.rootGraph},t.prototype.add=function(e,r,h,o,N){if(h==null&&o==null&&N==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{N=h,o=r,h=e;var s=o.getOwner(),g=N.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==g)return h.isInterGraph=!1,s.add(h,o,N);if(h.isInterGraph=!0,h.source=o,h.target=N,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),!(h.source!=null&&h.target!=null))throw"Edge source and/or target is null!";if(!(h.source.edges.indexOf(h)==-1&&h.target.edges.indexOf(h)==-1))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h}},t.prototype.remove=function(e){if(e instanceof n){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 h=[];h=h.concat(r.getEdges());for(var o,N=h.length,s=0;s<N;s++)o=h[s],r.remove(o);var g=[];g=g.concat(r.getNodes());var u;N=g.length;for(var s=0;s<N;s++)u=g[s],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(r);this.graphs.splice(p,1),r.parent=null}else if(e instanceof i){if(o=e,o==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(!(o.source!=null&&o.target!=null))throw"Source and/or target is null!";if(!(o.source.edges.indexOf(o)!=-1&&o.target.edges.indexOf(o)!=-1))throw"Source and/or target doesn't know this edge!";var p=o.source.edges.indexOf(o);if(o.source.edges.splice(p,1),p=o.target.edges.indexOf(o),o.target.edges.splice(p,1),!(o.source.owner!=null&&o.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";var p=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),h=r.length,o=0;o<h;o++)e=e.concat(r[o].getNodes());this.allNodes=e}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var h=0;h<r.length;h++)e=e.concat(r[h].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent??(e.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var h=e.getOwner(),o;do{if(o=h.getParent(),o==null)break;if(o==r)return!0;if(h=o.getOwner(),h==null)break}while(!0);h=r.getOwner();do{if(o=h.getParent(),o==null)break;if(o==e)return!0;if(h=o.getOwner(),h==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var e,r,h,o,N,s=this.getAllEdges(),g=s.length,u=0;u<g;u++){if(e=s[u],r=e.source,h=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=h,r==h){e.lca=r.getOwner();continue}for(o=r.getOwner();e.lca==null;){for(e.targetInLca=h,N=h.getOwner();e.lca==null;){if(N==o){e.lca=N;break}if(N==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=N.getParent(),N=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca??(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var h=e.getOwner();do{if(h==null)break;var o=r.getOwner();do{if(o==null)break;if(o==h)return o;o=o.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},t.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var h,o=e.getNodes(),N=o.length,s=0;s<N;s++)h=o[s],h.inclusionTreeDepth=r,h.child!=null&&this.calcInclusionTreeDepths(h.child,r+1)},t.prototype.includesInvalidEdge=function(){for(var e,r=this.edges.length,h=0;h<r;h++)if(e=this.edges[h],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},m.exports=t}),(function(m,L,A){var n=A(0);function i(){}for(var t in n)i[t]=n[t];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,m.exports=i}),(function(m,L,A){var n=A(12);function i(){}i.calcSeparationAmount=function(t,e,r,h){if(!t.intersects(e))throw"assert failed";var o=[,,];this.decideDirectionsForOverlappingNodes(t,e,o),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var N=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(N=1);var s=N*r[0],g=r[1]/N;r[0]<g?g=r[0]:s=r[1],r[0]=-1*o[0]*(g/2+h),r[1]=-1*o[1]*(s/2+h)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var h=t.getCenterX(),o=t.getCenterY(),N=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=h,r[1]=o,r[2]=N,r[3]=s,!0;var g=t.getX(),u=t.getY(),p=t.getRight(),y=t.getX(),c=t.getBottom(),f=t.getRight(),T=t.getWidthHalf(),E=t.getHeightHalf(),O=e.getX(),a=e.getY(),d=e.getRight(),l=e.getX(),v=e.getBottom(),_=e.getRight(),D=e.getWidthHalf(),I=e.getHeightHalf(),w=!1,R=!1;if(h===N){if(o>s)return r[0]=h,r[1]=u,r[2]=N,r[3]=v,!1;if(o<s)return r[0]=h,r[1]=c,r[2]=N,r[3]=a,!1}else if(o===s){if(h>N)return r[0]=g,r[1]=o,r[2]=d,r[3]=s,!1;if(h<N)return r[0]=p,r[1]=o,r[2]=O,r[3]=s,!1}else{var G=t.height/t.width,x=e.height/e.width,M=(s-o)/(N-h),U=void 0,b=void 0,F=void 0,S=void 0,Y=void 0,X=void 0;if(-G===M?h>N?(r[0]=y,r[1]=c,w=!0):(r[0]=p,r[1]=u,w=!0):G===M&&(h>N?(r[0]=g,r[1]=u,w=!0):(r[0]=f,r[1]=c,w=!0)),-x===M?N>h?(r[2]=l,r[3]=v,R=!0):(r[2]=d,r[3]=a,R=!0):x===M&&(N>h?(r[2]=O,r[3]=a,R=!0):(r[2]=_,r[3]=v,R=!0)),w&&R)return!1;if(h>N?o>s?(U=this.getCardinalDirection(G,M,4),b=this.getCardinalDirection(x,M,2)):(U=this.getCardinalDirection(-G,M,3),b=this.getCardinalDirection(-x,M,1)):o>s?(U=this.getCardinalDirection(-G,M,1),b=this.getCardinalDirection(-x,M,3)):(U=this.getCardinalDirection(G,M,2),b=this.getCardinalDirection(x,M,4)),!w)switch(U){case 1:S=u,F=h+-E/M,r[0]=F,r[1]=S;break;case 2:F=f,S=o+T*M,r[0]=F,r[1]=S;break;case 3:S=c,F=h+E/M,r[0]=F,r[1]=S;break;case 4:F=y,S=o+-T*M,r[0]=F,r[1]=S;break}if(!R)switch(b){case 1:X=a,Y=N+-I/M,r[2]=Y,r[3]=X;break;case 2:Y=_,X=s+D*M,r[2]=Y,r[3]=X;break;case 3:X=v,Y=N+I/M,r[2]=Y,r[3]=X;break;case 4:Y=l,X=s+-D*M,r[2]=Y,r[3]=X;break}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,h){if(h==null)return this.getIntersection2(t,e,r);var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=void 0,T=void 0,E=void 0,O=void 0,a=void 0,d=void 0,l=void 0,v=void 0,_=void 0;return E=g-N,a=o-s,l=s*N-o*g,O=c-p,d=u-y,v=y*p-u*c,_=E*d-O*a,_===0?null:(f=(a*v-d*l)/_,T=(O*l-E*v)/_,new n(f,T))},i.angleOfVector=function(t,e,r,h){var o=void 0;return t===r?o=h<e?this.ONE_AND_HALF_PI:this.HALF_PI:(o=Math.atan((h-e)/(r-t)),r<t?o+=Math.PI:h<e&&(o+=this.TWO_PI)),o},i.doIntersect=function(t,e,r,h){var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=(s-o)*(c-p)-(y-u)*(g-N);if(f===0)return!1;var T=((c-p)*(y-o)+(u-y)*(c-N))/f,E=((N-g)*(y-o)+(s-o)*(c-N))/f;return 0<T&&T<1&&0<E&&E<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,m.exports=i}),(function(m,L,A){function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},m.exports=n}),(function(m,L,A){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,m.exports=n}),(function(m,L,A){var n=(function(){function h(o,N){for(var s=0;s<N.length;s++){var g=N[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,N,s){return N&&h(o.prototype,N),s&&h(o,s),o}})();function i(h,o){if(!(h instanceof o))throw TypeError("Cannot call a class as a function")}var t=function(h){return{value:h,next:null,prev:null}},e=function(h,o,N,s){return h===null?s.head=o:h.next=o,N===null?s.tail=o:N.prev=o,o.prev=h,o.next=N,s.length++,o},r=function(h,o){var N=h.prev,s=h.next;return N===null?o.head=s:N.next=s,s===null?o.tail=N:s.prev=N,h.prev=h.next=null,o.length--,h};m.exports=(function(){function h(o){var N=this;i(this,h),this.length=0,this.head=null,this.tail=null,o==null||o.forEach(function(s){return N.push(s)})}return n(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,N){return e(N.prev,t(o),N,this)}},{key:"insertAfter",value:function(o,N){return e(N,t(o),N.next,this)}},{key:"insertNodeBefore",value:function(o,N){return e(N.prev,o,N,this)}},{key:"insertNodeAfter",value:function(o,N){return e(N,o,N.next,this)}},{key:"push",value:function(o){return e(this.tail,t(o),null,this)}},{key:"unshift",value:function(o){return e(null,t(o),this.head,this)}},{key:"remove",value:function(o){return r(o,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(o){if(o<=this.length()){for(var N=1,s=this.head;N<o;)s=s.next,N++;return s.value}}},{key:"set_object_at",value:function(o,N){if(o<=this.length()){for(var s=1,g=this.head;s<o;)g=g.next,s++;g.value=N}}}]),h})()}),(function(m,L,A){function n(i,t,e){this.x=null,this.y=null,i==null&&t==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof t=="number"&&e==null?(this.x=i,this.y=t):i.constructor.name=="Point"&&t==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,t,e){i.constructor.name=="Point"&&t==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof t=="number"&&e==null&&(parseInt(i)==i&&parseInt(t)==t?this.move(i,t):(this.x=Math.floor(i+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(i,t){this.x=i,this.y=t},n.prototype.translate=function(i,t){this.x+=i,this.y+=t},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var t=i;return this.x==t.x&&this.y==t.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},m.exports=n}),(function(m,L,A){function n(i,t,e,r){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&t!=null&&e!=null&&r!=null&&(this.x=i,this.y=t,this.width=e,this.height=r)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},m.exports=n}),(function(m,L,A){var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(t.uniqueID==null&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return t??(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=t===void 0?"undefined":n(t);return t==null||e!="object"&&e!="function"},m.exports=i}),(function(m,L,A){function n(u){if(Array.isArray(u)){for(var p=0,y=Array(u.length);p<u.length;p++)y[p]=u[p];return y}else return Array.from(u)}var i=A(0),t=A(6),e=A(3),r=A(1),h=A(5),o=A(4),N=A(17),s=A(27);function g(u){s.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,u!=null&&(this.isRemoteUse=u)}g.RANDOM_SEED=1,g.prototype=Object.create(s.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var u=new t(this);return this.graphManager=u,u},g.prototype.newGraph=function(u){return new h(null,this.graphManager,u)},g.prototype.newNode=function(u){return new e(this.graphManager,u)},g.prototype.newEdge=function(u){return new r(null,null,u)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var u=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE==="during"?!1:(u&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,u)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var u=this.graphManager.getAllEdges(),p=0;p<u.length;p++)u[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},g.prototype.update=function(u){if(u==null)this.update2();else if(u instanceof e){var p=u;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),c=0;c<y.length;c++)update(y[c]);p.vGraphObject!=null&&p.vGraphObject.update(p)}else if(u instanceof r){var f=u;f.vGraphObject!=null&&f.vGraphObject.update(f)}else if(u instanceof h){var T=u;T.vGraphObject!=null&&T.vGraphObject.update(T)}},g.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},g.prototype.transform=function(u){if(u==null)this.transform(new o(0,0));else{var p=new N,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(u.x),p.setWorldOrgY(u.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var c=this.getAllNodes(),f,T=0;T<c.length;T++)f=c[T],f.transform(p)}}},g.prototype.positionNodesRandomly=function(u){if(u==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,c=u.getNodes(),f=0;f<c.length;f++)p=c[f],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},g.prototype.getFlatForest=function(){for(var u=[],p=!0,y=this.graphManager.getRoot().getNodes(),c=!0,f=0;f<y.length;f++)y[f].getChild()!=null&&(c=!1);if(!c)return u;var T=new Set,E=[],O=new Map,a=[];for(a=a.concat(y);a.length>0&&p;){for(E.push(a[0]);E.length>0&&p;){var d=E[0];E.splice(0,1),T.add(d);for(var l=d.getEdges(),f=0;f<l.length;f++){var v=l[f].getOtherEnd(d);if(O.get(d)!=v)if(!T.has(v))E.push(v),O.set(v,d);else{p=!1;break}}}if(!p)u=[];else{var _=[].concat(n(T));u.push(_);for(var f=0;f<_.length;f++){var D=_[f],I=a.indexOf(D);I>-1&&a.splice(I,1)}T=new Set,O=new Map}}return u},g.prototype.createDummyNodesForBendpoints=function(u){for(var p=[],y=u.source,c=this.graphManager.calcLowestCommonAncestor(u.source,u.target),f=0;f<u.bendpoints.length;f++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),c.add(T);var E=this.newEdge(null);this.graphManager.add(E,y,T),p.add(T),y=T}var E=this.newEdge(null);return this.graphManager.add(E,y,u.target),this.edgeToDummyNodes.set(u,p),u.isInterGraph()?this.graphManager.remove(u):c.remove(u),p},g.prototype.createBendpointsFromDummyNodes=function(){var u=[];u=u.concat(this.graphManager.getAllEdges()),u=[].concat(n(this.edgeToDummyNodes.keys()),u);for(var p=0;p<u.length;p++){var y=u[p];if(y.bendpoints.length>0){for(var c=this.edgeToDummyNodes.get(y),f=0;f<c.length;f++){var T=c[f],E=new o(T.getCenterX(),T.getCenterY()),O=y.bendpoints.get(f);O.x=E.x,O.y=E.y,T.getOwner().remove(T)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(u,p,y,c){if(y!=null&&c!=null){var f=p;if(u<=50){var T=p/y;f-=(p-T)/50*(50-u)}else{var E=p*c;f+=(E-p)/50*(u-50)}return f}else{var O,a;return u<=50?(O=9*p/500,a=p/10):(O=9*p/50,a=-8*p),O*u+a}},g.findCenterOfTree=function(u){var p=[];p=p.concat(u);var y=[],c=new Map,f=!1,T=null;(p.length==1||p.length==2)&&(f=!0,T=p[0]);for(var E=0;E<p.length;E++){var O=p[E],a=O.getNeighborsList().size;c.set(O,O.getNeighborsList().size),a==1&&y.push(O)}var d=[];for(d=d.concat(y);!f;){var l=[];l=l.concat(d),d=[];for(var E=0;E<p.length;E++){var O=p[E],v=p.indexOf(O);v>=0&&p.splice(v,1),O.getNeighborsList().forEach(function(I){if(y.indexOf(I)<0){var w=c.get(I)-1;w==1&&d.push(I),c.set(I,w)}})}y=y.concat(d),(p.length==1||p.length==2)&&(f=!0,T=p[0])}return T},g.prototype.setGraphManager=function(u){this.graphManager=u},m.exports=g}),(function(m,L,A){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},m.exports=n}),(function(m,L,A){var n=A(4);function i(t,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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},m.exports=i}),(function(m,L,A){function n(s){if(Array.isArray(s)){for(var g=0,u=Array(s.length);g<s.length;g++)u[g]=s[g];return u}else return Array.from(s)}var i=A(15),t=A(7),e=A(0),r=A(8),h=A(9);function o(){i.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var N in o.prototype=Object.create(i.prototype),i)o[N]=i[N];o.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var s,g,u,p,y,c,f=this.getGraphManager().getAllEdges(),T=0;T<f.length;T++)s=f[T],s.idealLength=this.idealEdgeLength,s.isInterGraph&&(u=s.getSource(),p=s.getTarget(),y=s.getSourceInLca().getEstimatedSize(),c=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(s.idealLength+=y+c-2*e.SIMPLE_NODE_SIZE),g=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*g))},o.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;this.incremental?(s>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(s>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var s=this.getAllEdges(),g,u=0;u<s.length;u++)g=s[u],this.calcSpringForce(g,g.idealLength)},o.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u,p,y,c,f=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),T=new Set,u=0;u<f.length;u++)y=f[u],this.calculateRepulsionForceOfANode(y,T,s,g),T.add(y);else for(u=0;u<f.length;u++)for(y=f[u],p=u+1;p<f.length;p++)c=f[p],y.getOwner()==c.getOwner()&&this.calcRepulsionForce(y,c)},o.prototype.calcGravitationalForces=function(){for(var s,g=this.getAllNodesToApplyGravitation(),u=0;u<g.length;u++)s=g[u],this.calcGravitationalForce(s)},o.prototype.moveNodes=function(){for(var s=this.getAllNodes(),g,u=0;u<s.length;u++)g=s[u],g.move()},o.prototype.calcSpringForce=function(s,g){var u=s.getSource(),p=s.getTarget(),y,c,f,T;if(this.uniformLeafNodeSizes&&u.getChild()==null&&p.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;y=s.getLength(),y!=0&&(c=this.springConstant*(y-g),f=c*(s.lengthX/y),T=c*(s.lengthY/y),u.springForceX+=f,u.springForceY+=T,p.springForceX-=f,p.springForceY-=T)},o.prototype.calcRepulsionForce=function(s,g){var u=s.getRect(),p=g.getRect(),y=[,,],c=[,,,,],f,T,E,O,a,d,l;if(u.intersects(p)){r.calcSeparationAmount(u,p,y,t.DEFAULT_EDGE_LENGTH/2),d=2*y[0],l=2*y[1];var v=s.noOfChildren*g.noOfChildren/(s.noOfChildren+g.noOfChildren);s.repulsionForceX-=v*d,s.repulsionForceY-=v*l,g.repulsionForceX+=v*d,g.repulsionForceY+=v*l}else this.uniformLeafNodeSizes&&s.getChild()==null&&g.getChild()==null?(f=p.getCenterX()-u.getCenterX(),T=p.getCenterY()-u.getCenterY()):(r.getIntersection(u,p,c),f=c[2]-c[0],T=c[3]-c[1]),Math.abs(f)<t.MIN_REPULSION_DIST&&(f=h.sign(f)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=h.sign(T)*t.MIN_REPULSION_DIST),E=f*f+T*T,O=Math.sqrt(E),a=this.repulsionConstant*s.noOfChildren*g.noOfChildren/E,d=a*f/O,l=a*T/O,s.repulsionForceX-=d,s.repulsionForceY-=l,g.repulsionForceX+=d,g.repulsionForceY+=l},o.prototype.calcGravitationalForce=function(s){var g=s.getOwner(),u=(g.getRight()+g.getLeft())/2,p=(g.getTop()+g.getBottom())/2,y=s.getCenterX()-u,c=s.getCenterY()-p,f=Math.abs(y)+s.getWidth()/2,T=Math.abs(c)+s.getHeight()/2,E;s.getOwner()==this.graphManager.getRoot()?(E=g.getEstimatedSize()*this.gravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y,s.gravitationForceY=-this.gravityConstant*c)):(E=g.getEstimatedSize()*this.compoundGravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*c*this.compoundGravityConstant))},o.prototype.isConverged=function(){var s,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||g},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var s,g=this.graphManager.getAllNodes(),u=0;u<g.length;u++)s=g[u],s.noOfChildren=s.getNoOfChildren()},o.prototype.calcGrid=function(s){var g=0,u=0;g=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),u=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));for(var p=Array(g),y=0;y<g;y++)p[y]=Array(u);for(var y=0;y<g;y++)for(var c=0;c<u;c++)p[y][c]=[];return p},o.prototype.addNodeToGrid=function(s,g,u){var p=0,y=0,c=0,f=0;p=parseInt(Math.floor((s.getRect().x-g)/this.repulsionRange)),y=parseInt(Math.floor((s.getRect().width+s.getRect().x-g)/this.repulsionRange)),c=parseInt(Math.floor((s.getRect().y-u)/this.repulsionRange)),f=parseInt(Math.floor((s.getRect().height+s.getRect().y-u)/this.repulsionRange));for(var T=p;T<=y;T++)for(var E=c;E<=f;E++)this.grid[T][E].push(s),s.setGridCoordinates(p,y,c,f)},o.prototype.updateGrid=function(){var s,g,u=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),s=0;s<u.length;s++)g=u[s],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(s,g,u,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&u||p){var y=new Set;s.surrounding=[];for(var c,f=this.grid,T=s.startX-1;T<s.finishX+2;T++)for(var E=s.startY-1;E<s.finishY+2;E++)if(!(T<0||E<0||T>=f.length||E>=f[0].length)){for(var O=0;O<f[T][E].length;O++)if(c=f[T][E][O],!(s.getOwner()!=c.getOwner()||s==c)&&!g.has(c)&&!y.has(c)){var a=Math.abs(s.getCenterX()-c.getCenterX())-(s.getWidth()/2+c.getWidth()/2),d=Math.abs(s.getCenterY()-c.getCenterY())-(s.getHeight()/2+c.getHeight()/2);a<=this.repulsionRange&&d<=this.repulsionRange&&y.add(c)}}s.surrounding=[].concat(n(y))}for(T=0;T<s.surrounding.length;T++)this.calcRepulsionForce(s,s.surrounding[T])},o.prototype.calcRepulsionRange=function(){return 0},m.exports=o}),(function(m,L,A){var n=A(1),i=A(7);function t(r,h,o){n.call(this,r,h,o),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var e in t.prototype=Object.create(n.prototype),n)t[e]=n[e];m.exports=t}),(function(m,L,A){var n=A(3);function i(e,r,h,o){n.call(this,e,r,h,o),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=[]}for(var t in i.prototype=Object.create(n.prototype),n)i[t]=n[t];i.prototype.setGridCoordinates=function(e,r,h,o){this.startX=e,this.finishX=r,this.startY=h,this.finishY=o},m.exports=i}),(function(m,L,A){function n(i,t){this.width=0,this.height=0,i!==null&&t!==null&&(this.height=t,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},m.exports=n}),(function(m,L,A){var n=A(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),this.map[t]!=null},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},m.exports=i}),(function(m,L,A){var n=A(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,h=0;h<r;h++)t.push(this.set[e[h]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var h=t[r];this.add(h)}},m.exports=i}),(function(m,L,A){var n=(function(){function e(r,h){for(var o=0;o<h.length;o++){var N=h[o];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(r,N.key,N)}}return function(r,h,o){return h&&e(r.prototype,h),o&&e(r,o),r}})();function i(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}var t=A(11);m.exports=(function(){function e(r,h){i(this,e),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=r instanceof t?r.size():r.length,this._quicksort(r,0,o-1)}return n(e,[{key:"_quicksort",value:function(r,h,o){if(h<o){var N=this._partition(r,h,o);this._quicksort(r,h,N),this._quicksort(r,N+1,o)}}},{key:"_partition",value:function(r,h,o){for(var N=this._get(r,h),s=h,g=o;;){for(;this.compareFunction(N,this._get(r,g));)g--;for(;this.compareFunction(this._get(r,s),N);)s++;if(s<g)this._swap(r,s,g),s++,g--;else return g}}},{key:"_get",value:function(r,h){return r instanceof t?r.get_object_at(h):r[h]}},{key:"_set",value:function(r,h,o){r instanceof t?r.set_object_at(h,o):r[h]=o}},{key:"_swap",value:function(r,h,o){var N=this._get(r,h);this._set(r,h,this._get(r,o)),this._set(r,o,N)}},{key:"_defaultCompareFunction",value:function(r,h){return h>r}}]),e})()}),(function(m,L,A){var n=(function(){function t(e,r){for(var h=0;h<r.length;h++){var o=r[h];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,h){return r&&t(e.prototype,r),h&&t(e,h),e}})();function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}m.exports=(function(){function t(e,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=r,this.match_score=h,this.mismatch_penalty=o,this.gap_penalty=N,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[s][g]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var p=0;p<this.jMax;p++)this.tracebackGrid[u][p]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var o=1;o<this.jMax;o++){var N=void 0;N=this.sequence1[h-1]===this.sequence2[o-1]?this.grid[h-1][o-1]+this.match_score:this.grid[h-1][o-1]+this.mismatch_penalty;var s=this.grid[h-1][o]+this.gap_penalty,g=this.grid[h][o-1]+this.gap_penalty,u=[N,s,g],p=this.arrayAllMaxIndexes(u);this.grid[h][o]=u[p[0]],this.tracebackGrid[h][o]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],h=this.tracebackGrid[r.pos[0]][r.pos[1]];h[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),h[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),h[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var h=[],o=-1;(o=e.indexOf(r,o+1))!==-1;)h.push(o);return h}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),t})()}),(function(m,L,A){var n=function(){};n.FDLayout=A(18),n.FDLayoutConstants=A(7),n.FDLayoutEdge=A(19),n.FDLayoutNode=A(20),n.DimensionD=A(21),n.HashMap=A(22),n.HashSet=A(23),n.IGeometry=A(8),n.IMath=A(9),n.Integer=A(10),n.Point=A(12),n.PointD=A(4),n.RandomSeed=A(16),n.RectangleD=A(13),n.Transform=A(17),n.UniqueIDGeneretor=A(14),n.Quicksort=A(24),n.LinkedList=A(11),n.LGraphObject=A(2),n.LGraph=A(5),n.LEdge=A(1),n.LGraphManager=A(6),n.LNode=A(3),n.Layout=A(15),n.LayoutConstants=A(0),n.NeedlemanWunsch=A(25),m.exports=n}),(function(m,L,A){function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var h=this.listeners[r];h.event===t&&h.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var h=this.listeners[r];t===h.event&&h.callback(e)}},m.exports=n})])})})),Q=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Z()):typeof define=="function"&&define.amd?define(["layout-base"],L):typeof C=="object"?C.coseBase=L(Z()):m.coseBase=L(m.layoutBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=7)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).FDLayoutConstants;function t(){}for(var e in i)t[e]=i[e];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutEdge;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraph;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraphManager;function t(r){i.call(this,r)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutNode,t=n(0).IMath;function e(h,o,N,s){i.call(this,h,o,N,s)}for(var r in e.prototype=Object.create(i.prototype),i)e[r]=i[r];e.prototype.move=function(){var h=this.graphManager.getLayout();this.displacementX=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),h.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},e.prototype.propogateDisplacementToChildren=function(h,o){for(var N=this.getChild().getNodes(),s,g=0;g<N.length;g++)s=N[g],s.getChild()==null?(s.moveBy(h,o),s.displacementX+=h,s.displacementY+=o):s.propogateDisplacementToChildren(h,o)},e.prototype.setPred1=function(h){this.pred1=h},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(h){this.next=h},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(h){this.processed=h},e.prototype.isProcessed=function(){return processed},L.exports=e}),(function(L,A,n){var i=n(0).FDLayout,t=n(4),e=n(3),r=n(5),h=n(2),o=n(1),N=n(0).FDLayoutConstants,s=n(0).LayoutConstants,g=n(0).Point,u=n(0).PointD,p=n(0).Layout,y=n(0).Integer,c=n(0).IGeometry,f=n(0).LGraph,T=n(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var O in E.prototype=Object.create(i.prototype),i)E[O]=i[O];E.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},E.prototype.newGraph=function(a){return new e(null,this.graphManager,a)},E.prototype.newNode=function(a){return new r(this.graphManager,a)},E.prototype.newEdge=function(a){return new h(null,null,a)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return s.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(v){return a.has(v)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var l=this.getFlatForest();if(l.length>0)this.positionNodesRadially(l);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return a.has(D)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.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%N.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-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 a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(_){return a.has(_)});this.graphManager.setAllNodesToApplyGravitation(d),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.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()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var l=!this.isTreeGrowing&&!this.isGrowthFinished,v=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(l,v),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),d={},l=0;l<a.length;l++){var v=a[l].rect,_=a[l].id;d[_]={id:_,x:v.getCenterX(),y:v.getCenterY(),w:v.width,h:v.height}}return d},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(N.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],d,l=this.graphManager.getGraphs(),v=l.length,_;for(_=0;_<v;_++)d=l[_],d.updateConnected(),d.isConnected||(a=a.concat(d.getNodes()));return a},E.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var d=new Set,l;for(l=0;l<a.length;l++){var v=a[l];if(!d.has(v)){var _=v.getSource(),D=v.getTarget();if(_==D)v.getBendpoints().push(new u),v.getBendpoints().push(new u),this.createDummyNodesForBendpoints(v),d.add(v);else{var I=[];if(I=I.concat(_.getEdgeListToNode(D)),I=I.concat(D.getEdgeListToNode(_)),!d.has(I[0])){if(I.length>1){var w;for(w=0;w<I.length;w++){var R=I[w];R.getBendpoints().push(new u),this.createDummyNodesForBendpoints(R)}}I.forEach(function(G){d.add(G)})}}}if(d.size==a.length)break}},E.prototype.positionNodesRadially=function(a){for(var d=new g(0,0),l=Math.ceil(Math.sqrt(a.length)),v=0,_=0,D=0,I=new u(0,0),w=0;w<a.length;w++){w%l==0&&(D=0,_=v,w!=0&&(_+=o.DEFAULT_COMPONENT_SEPERATION),v=0);var R=a[w],G=p.findCenterOfTree(R);d.x=D,d.y=_,I=E.radialLayout(R,G,d),I.y>v&&(v=Math.floor(I.y)),D=Math.floor(I.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(s.WORLD_CENTER_X-I.x/2,s.WORLD_CENTER_Y-I.y/2))},E.radialLayout=function(a,d,l){var v=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(d,null,0,359,0,v);var _=f.calculateBounds(a),D=new T;D.setDeviceOrgX(_.getMinX()),D.setDeviceOrgY(_.getMinY()),D.setWorldOrgX(l.x),D.setWorldOrgY(l.y);for(var I=0;I<a.length;I++)a[I].transform(D);var w=new u(_.getMaxX(),_.getMaxY());return D.inverseTransformPoint(w)},E.branchRadialLayout=function(a,d,l,v,_,D){var I=(v-l+1)/2;I<0&&(I+=180);var w=(I+l)%360*c.TWO_PI/360,R=_*Math.cos(w),G=_*Math.sin(w);a.setCenter(R,G);var x=[];x=x.concat(a.getEdges());var M=x.length;d!=null&&M--;for(var U=0,b=x.length,F,S=a.getEdgesBetween(d);S.length>1;){var Y=S[0];S.splice(0,1);var X=x.indexOf(Y);X>=0&&x.splice(X,1),b--,M--}F=d==null?0:(x.indexOf(S[0])+1)%b;for(var W=Math.abs(v-l)/M,B=F;U!=M;B=++B%b){var H=x[B].getOtherEnd(a);if(H!=d){var q=(l+U*W)%360,ot=(q+W)%360;E.branchRadialLayout(H,a,q,ot,_+D,D),U++}}},E.maxDiagonalInTree=function(a){for(var d=y.MIN_VALUE,l=0;l<a.length;l++){var v=a[l].getDiagonal();v>d&&(d=v)}return d},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var a=this,d={};this.memberGroups={},this.idToDummyNode={};for(var l=[],v=this.graphManager.getAllNodes(),_=0;_<v.length;_++){var D=v[_],I=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(I.id==null||!this.getToBeTiled(I))&&l.push(D)}for(var _=0;_<l.length;_++){var D=l[_],w=D.getParent().id;d[w]===void 0&&(d[w]=[]),d[w]=d[w].concat(D)}Object.keys(d).forEach(function(R){if(d[R].length>1){var G="DummyCompound_"+R;a.memberGroups[G]=d[R];var x=d[R][0].getParent(),M=new r(a.graphManager);M.id=G,M.paddingLeft=x.paddingLeft||0,M.paddingRight=x.paddingRight||0,M.paddingBottom=x.paddingBottom||0,M.paddingTop=x.paddingTop||0,a.idToDummyNode[G]=M;var U=a.getGraphManager().add(a.newGraph(),M),b=x.getChild();b.add(M);for(var F=0;F<d[R].length;F++){var S=d[R][F];b.remove(S),U.add(S)}}})},E.prototype.clearCompounds=function(){var a={},d={};this.performDFSOnCompounds();for(var l=0;l<this.compoundOrder.length;l++)d[this.compoundOrder[l].id]=this.compoundOrder[l],a[this.compoundOrder[l].id]=[].concat(this.compoundOrder[l].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[l].getChild()),this.compoundOrder[l].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,d)},E.prototype.clearZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(l){var v=a.idToDummyNode[l];d[l]=a.tileNodes(a.memberGroups[l],v.paddingLeft+v.paddingRight),v.rect.width=d[l].width,v.rect.height=d[l].height})},E.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var d=this.compoundOrder[a],l=d.id,v=d.paddingLeft,_=d.paddingTop;this.adjustLocations(this.tiledMemberPack[l],d.rect.x,d.rect.y,v,_)}},E.prototype.repopulateZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack;Object.keys(d).forEach(function(l){var v=a.idToDummyNode[l],_=v.paddingLeft,D=v.paddingTop;a.adjustLocations(d[l],v.rect.x,v.rect.y,_,D)})},E.prototype.getToBeTiled=function(a){var d=a.id;if(this.toBeTiled[d]!=null)return this.toBeTiled[d];var l=a.getChild();if(l==null)return this.toBeTiled[d]=!1,!1;for(var v=l.getNodes(),_=0;_<v.length;_++){var D=v[_];if(this.getNodeDegree(D)>0)return this.toBeTiled[d]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[d]=!1,!1}return this.toBeTiled[d]=!0,!0},E.prototype.getNodeDegree=function(a){a.id;for(var d=a.getEdges(),l=0,v=0;v<d.length;v++){var _=d[v];_.getSource().id!==_.getTarget().id&&(l+=1)}return l},E.prototype.getNodeDegreeWithChildren=function(a){var d=this.getNodeDegree(a);if(a.getChild()==null)return d;for(var l=a.getChild().getNodes(),v=0;v<l.length;v++){var _=l[v];d+=this.getNodeDegreeWithChildren(_)}return d},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(a){for(var d=0;d<a.length;d++){var l=a[d];l.getChild()!=null&&this.fillCompexOrderByDFS(l.getChild().getNodes()),this.getToBeTiled(l)&&this.compoundOrder.push(l)}},E.prototype.adjustLocations=function(a,d,l,v,_){d+=v,l+=_;for(var D=d,I=0;I<a.rows.length;I++){var w=a.rows[I];d=D;for(var R=0,G=0;G<w.length;G++){var x=w[G];x.rect.x=d,x.rect.y=l,d+=x.rect.width+a.horizontalPadding,x.rect.height>R&&(R=x.rect.height)}l+=R+a.verticalPadding}},E.prototype.tileCompoundMembers=function(a,d){var l=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(v){var _=d[v];l.tiledMemberPack[v]=l.tileNodes(a[v],_.paddingLeft+_.paddingRight),_.rect.width=l.tiledMemberPack[v].width,_.rect.height=l.tiledMemberPack[v].height})},E.prototype.tileNodes=function(a,d){var l={rows:[],rowWidth:[],rowHeight:[],width:0,height:d,verticalPadding:o.TILING_PADDING_VERTICAL,horizontalPadding:o.TILING_PADDING_HORIZONTAL};a.sort(function(D,I){return D.rect.width*D.rect.height>I.rect.width*I.rect.height?-1:D.rect.width*D.rect.height<I.rect.width*I.rect.height?1:0});for(var v=0;v<a.length;v++){var _=a[v];l.rows.length==0?this.insertNodeToRow(l,_,0,d):this.canAddHorizontal(l,_.rect.width,_.rect.height)?this.insertNodeToRow(l,_,this.getShortestRowIndex(l),d):this.insertNodeToRow(l,_,l.rows.length,d),this.shiftToLastRow(l)}return l},E.prototype.insertNodeToRow=function(a,d,l,v){var _=v;l==a.rows.length&&(a.rows.push([]),a.rowWidth.push(_),a.rowHeight.push(0));var D=a.rowWidth[l]+d.rect.width;a.rows[l].length>0&&(D+=a.horizontalPadding),a.rowWidth[l]=D,a.width<D&&(a.width=D);var I=d.rect.height;l>0&&(I+=a.verticalPadding);var w=0;I>a.rowHeight[l]&&(w=a.rowHeight[l],a.rowHeight[l]=I,w=a.rowHeight[l]-w),a.height+=w,a.rows[l].push(d)},E.prototype.getShortestRowIndex=function(a){for(var d=-1,l=Number.MAX_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]<l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.getLongestRowIndex=function(a){for(var d=-1,l=Number.MIN_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]>l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.canAddHorizontal=function(a,d,l){var v=this.getShortestRowIndex(a);if(v<0)return!0;var _=a.rowWidth[v];if(_+a.horizontalPadding+d<=a.width)return!0;var D=0;a.rowHeight[v]<l&&v>0&&(D=l+a.verticalPadding-a.rowHeight[v]);var I=a.width-_>=d+a.horizontalPadding?(a.height+D)/(_+d+a.horizontalPadding):(a.height+D)/a.width;D=l+a.verticalPadding;var w=a.width<d?(a.height+D)/d:(a.height+D)/a.width;return w<1&&(w=1/w),I<1&&(I=1/I),I<w},E.prototype.shiftToLastRow=function(a){var d=this.getLongestRowIndex(a),l=a.rowWidth.length-1,v=a.rows[d],_=v[v.length-1],D=_.width+a.horizontalPadding;if(a.width-a.rowWidth[l]>D&&d!=l){v.splice(-1,1),a.rows[l].push(_),a.rowWidth[d]=a.rowWidth[d]-D,a.rowWidth[l]=a.rowWidth[l]+D,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,w=0;w<v.length;w++)v[w].height>I&&(I=v[w].height);d>0&&(I+=a.verticalPadding);var R=a.rowHeight[d]+a.rowHeight[l];a.rowHeight[d]=I,a.rowHeight[l]<_.height+a.verticalPadding&&(a.rowHeight[l]=_.height+a.verticalPadding);var G=a.rowHeight[d]+a.rowHeight[l];a.height+=G-R,this.shiftToLastRow(a)}},E.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var a=[],d=!0,l;d;){var v=this.graphManager.getAllNodes(),_=[];d=!1;for(var D=0;D<v.length;D++)l=v[D],l.getEdges().length==1&&!l.getEdges()[0].isInterGraph&&l.getChild()==null&&(_.push([l,l.getEdges()[0],l.getOwner()]),d=!0);if(d==1){for(var I=[],w=0;w<_.length;w++)_[w][0].getEdges().length==1&&(I.push(_[w]),_[w][0].getOwner().remove(_[w][0]));a.push(I),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},E.prototype.growTree=function(a){for(var d=a[a.length-1],l,v=0;v<d.length;v++)l=d[v],this.findPlaceforPrunedNode(l),l[2].add(l[0]),l[2].add(l[1],l[1].source,l[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(a){var d,l,v=a[0];l=v==a[1].source?a[1].target:a[1].source;var _=l.startX,D=l.finishX,I=l.startY,w=l.finishY,R=[0,0,0,0];if(I>0)for(var G=_;G<=D;G++)R[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(D<this.grid.length-1)for(var G=I;G<=w;G++)R[1]+=this.grid[D+1][G].length+this.grid[D][G].length-1;if(w<this.grid[0].length-1)for(var G=_;G<=D;G++)R[2]+=this.grid[G][w+1].length+this.grid[G][w].length-1;if(_>0)for(var G=I;G<=w;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var x=y.MAX_VALUE,M,U,b=0;b<R.length;b++)R[b]<x?(x=R[b],M=1,U=b):R[b]==x&&M++;if(M==3&&x==0)R[0]==0&&R[1]==0&&R[2]==0?d=1:R[0]==0&&R[1]==0&&R[3]==0?d=0:R[0]==0&&R[2]==0&&R[3]==0?d=3:R[1]==0&&R[2]==0&&R[3]==0&&(d=2);else if(M==2&&x==0){var F=Math.floor(Math.random()*2);d=R[0]==0&&R[1]==0?F==0?0:1:R[0]==0&&R[2]==0?F==0?0:2:R[0]==0&&R[3]==0?F==0?0:3:R[1]==0&&R[2]==0?F==0?1:2:R[1]==0&&R[3]==0?F==0?1:3:F==0?2:3}else if(M==4&&x==0){var F=Math.floor(Math.random()*4);d=F}else d=U;d==0?v.setCenter(l.getCenterX(),l.getCenterY()-l.getHeight()/2-N.DEFAULT_EDGE_LENGTH-v.getHeight()/2):d==1?v.setCenter(l.getCenterX()+l.getWidth()/2+N.DEFAULT_EDGE_LENGTH+v.getWidth()/2,l.getCenterY()):d==2?v.setCenter(l.getCenterX(),l.getCenterY()+l.getHeight()/2+N.DEFAULT_EDGE_LENGTH+v.getHeight()/2):v.setCenter(l.getCenterX()-l.getWidth()/2-N.DEFAULT_EDGE_LENGTH-v.getWidth()/2,l.getCenterY())},L.exports=E}),(function(L,A,n){var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),L.exports=i})])})})),at=nt(V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Q()):typeof define=="function"&&define.amd?define(["cose-base"],L):typeof C=="object"?C.cytoscapeCoseBilkent=L(Q()):m.cytoscapeCoseBilkent=L(m.coseBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=1)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,e=n(0).CoSEConstants,r=n(0).CoSELayout,h=n(0).CoSENode,o=n(0).layoutBase.PointD,N=n(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(c,f){var T={};for(var E in c)T[E]=c[E];for(var E in f)T[E]=f[E];return T}function u(c){this.options=g(s,c),p(this.options)}var p=function(c){c.nodeRepulsion!=null&&(e.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(e.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(e.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(e.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(e.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(e.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(e.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?i.QUALITY=0:c.quality=="proof"?i.QUALITY=2:i.QUALITY=1,e.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,e.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,e.ANIMATE=t.ANIMATE=i.ANIMATE=c.animate,e.TILE=c.tile,e.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,e.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};u.prototype.run=function(){var c,f,T=this.options;this.idToLNode={};var E=this.layout=new r,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=E.newGraphManager();this.gm=a;var d=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(d),E);for(var v=0;v<l.length;v++){var _=l[v],D=this.idToLNode[_.data("source")],I=this.idToLNode[_.data("target")];if(D!==I&&D.getEdgesBetween(I).length==0){var w=a.add(E.newEdge(),D,I);w.id=_.id()}}var R=function(x,M){typeof x=="number"&&(x=M);var U=x.data("id"),b=O.idToLNode[U];return{x:b.getRect().getCenterX(),y:b.getRect().getCenterY()}},G=function x(){for(var M=function(){T.fit&&T.cy.fit(T.eles,T.padding),c||(c=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},U=O.options.refresh,b,F=0;F<U&&!b;F++)b=O.stopped||O.layout.tick();if(b){E.checkLayoutSuccess()&&!E.isSubLayout&&E.doPostLayout(),E.tilingPostLayout&&E.tilingPostLayout(),E.isLayoutFinished=!0,O.options.eles.nodes().positions(R),M(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),f&&cancelAnimationFrame(f),c=!1;return}var S=O.layout.getPositionsData();T.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var W=Y.id(),B=S[W],H=Y;B==null&&(B=S[H.data("parent")]||S["DummyCompound_"+H.data("parent")],S[W]=B,H=H.parent()[0],H!=null););return B==null?{x:Y.position("x"),y:Y.position("y")}:{x:B.x,y:B.y}}}),M(),f=requestAnimationFrame(x)};return E.addListener("layoutstarted",function(){O.options.animate==="during"&&(f=requestAnimationFrame(G))}),E.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,R),c=!1),this},u.prototype.getTopMostNodes=function(c){for(var f={},T=0;T<c.length;T++)f[c[T].id()]=!0;return c.filter(function(E,O){typeof E=="number"&&(E=O);for(var a=E.parent()[0];a!=null;){if(f[a.id()])return!1;a=a.parent()[0]}return!0})},u.prototype.processChildrenList=function(c,f,T){for(var E=f.length,O=0;O<E;O++){var a=f[O],d=a.children(),l,v=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(l=a.outerWidth()!=null&&a.outerHeight()!=null?c.add(new h(T.graphManager,new o(a.position("x")-v.w/2,a.position("y")-v.h/2),new N(parseFloat(v.w),parseFloat(v.h)))):c.add(new h(this.graphManager)),l.id=a.data("id"),l.paddingLeft=parseInt(a.css("padding")),l.paddingTop=parseInt(a.css("padding")),l.paddingRight=parseInt(a.css("padding")),l.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var _=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,I=a.css("text-halign");l.labelWidth=_,l.labelHeight=D,l.labelPos=I}if(this.idToLNode[a.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),d!=null&&d.length>0){var w=T.getGraphManager().add(T.newGraph(),l);this.processChildrenList(w,d,T)}}},u.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",u)};typeof cytoscape<"u"&&y(cytoscape),L.exports=y})])})}))(),1);z.use(at.default);function $(C,P){C.forEach(m=>{let L={id:m.id,labelText:m.label,height:m.height,width:m.width,padding:m.padding??0};Object.keys(m).forEach(A=>{["id","label","height","width","padding","x","y"].includes(A)||(L[A]=m[A])}),P.add({group:"nodes",data:L,position:{x:m.x??0,y:m.y??0}})})}k($,"addNodes");function K(C,P){C.forEach(m=>{let L={id:m.id,source:m.start,target:m.end};Object.keys(m).forEach(A=>{["id","start","end"].includes(A)||(L[A]=m[A])}),P.add({group:"edges",data:L})})}k(K,"addEdges");function J(C){return new Promise(P=>{let m=st("body").append("div").attr("id","cy").attr("style","display:none"),L=z({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),$(C.nodes,L),K(C.edges,L),L.nodes().forEach(function(A){A.layoutDimensions=()=>{let n=A.data();return{w:n.width,h:n.height}}}),L.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),L.ready(A=>{j.info("Cytoscape ready",A),P(L)})})}k(J,"createCytoscapeInstance");function tt(C){return C.nodes().map(P=>{let m=P.data(),L=P.position(),A={id:m.id,x:L.x,y:L.y};return Object.keys(m).forEach(n=>{n!=="id"&&(A[n]=m[n])}),A})}k(tt,"extractPositionedNodes");function et(C){return C.edges().map(P=>{let m=P.data(),L=P._private.rscratch,A={id:m.id,source:m.source,target:m.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(m).forEach(n=>{["id","source","target"].includes(n)||(A[n]=m[n])}),A})}k(et,"extractPositionedEdges");async function it(C,P){j.debug("Starting cose-bilkent layout algorithm");try{rt(C);let m=await J(C),L=tt(m),A=et(m);return j.debug(`Layout completed: ${L.length} nodes, ${A.length} edges`),{nodes:L,edges:A}}catch(m){throw j.error("Error in cose-bilkent layout algorithm:",m),m}}k(it,"executeCoseBilkentLayout");function rt(C){if(!C)throw Error("Layout data is required");if(!C.config)throw Error("Configuration is required in layout data");if(!C.rootNode)throw Error("Root node is required");if(!C.nodes||!Array.isArray(C.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(C.edges))throw Error("Edges array is required in layout data");return!0}k(rt,"validateLayoutData");var ht=k(async(C,P,{insertCluster:m,insertEdge:L,insertEdgeLabel:A,insertMarkers:n,insertNode:i,log:t,positionEdgeLabel:e},{algorithm:r})=>{let h={},o={},N=P.select("g");n(N,C.markers,C.type,C.diagramId);let s=N.insert("g").attr("class","subgraphs"),g=N.insert("g").attr("class","edgePaths"),u=N.insert("g").attr("class","edgeLabels"),p=N.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(C.nodes.map(async c=>{if(c.isGroup){let f={...c};o[c.id]=f,h[c.id]=f,await m(s,c)}else{let f={...c};h[c.id]=f;let T=await i(p,c,{config:C.config,dir:C.direction||"TB"}),E=T.node().getBBox();f.width=E.width,f.height=E.height,f.domId=T,t.debug(`Node ${c.id} dimensions: ${E.width}x${E.height}`)}})),t.debug("Running cose-bilkent layout algorithm");let y=await it({...C,nodes:C.nodes.map(c=>{let f=h[c.id];return{...c,width:f.width,height:f.height}})},C.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(c=>{let f=h[c.id];f!=null&&f.domId&&(f.domId.attr("transform",`translate(${c.x}, ${c.y})`),f.x=c.x,f.y=c.y,t.debug(`Positioned node ${f.id} at center (${c.x}, ${c.y})`))}),y.edges.forEach(c=>{let f=C.edges.find(T=>T.id===c.id);f&&(f.points=[{x:c.startX,y:c.startY},{x:c.midX,y:c.midY},{x:c.endX,y:c.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(C.edges.map(async c=>{await A(u,c);let f=h[c.start??""],T=h[c.end??""];if(f&&T){let E=y.edges.find(O=>O.id===c.id);if(E){t.debug("APA01 positionedEdge",E);let O={...c};e(O,L(g,O,o,C.type,f,T,C.diagramId))}else{let O={...c,points:[{x:f.x||0,y:f.y||0},{x:T.x||0,y:T.y||0}]};e(O,L(g,O,o,C.type,f,T,C.diagramId))}}})),t.debug("Cose-bilkent rendering completed")},"render");export{ht as render};
@@ -0,0 +1 @@
1
+ import{t as r}from"./crystal-CaYGQjnj.js";export{r as crystal};