@marimo-team/islands 0.15.1 → 0.15.3

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 (189) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DIy_POzQ.js → ConnectedDataExplorerComponent-DfvW3rBn.js} +323 -328
  2. package/dist/{ImageComparisonComponent-4ehfWTqN.js → ImageComparisonComponent-XaJshw7d.js} +13 -13
  3. package/dist/{_baseUniq-Duh9chhg.js → _baseUniq-dN9WKF9m.js} +67 -67
  4. package/dist/any-language-editor-CpFniVi-.js +27 -0
  5. package/dist/{arc-BXrety1g.js → arc-BOhn-m2C.js} +1 -1
  6. package/dist/{architectureDiagram-KFL7JDKH-3xVup6Z2.js → architectureDiagram-W76B3OCA-Bpg85ZKv.js} +144 -144
  7. package/dist/assets/{worker-COGufAQn.js → worker-Y-Q4G-N2.js} +30 -26
  8. package/dist/asterisk-DS281yxp.js +271 -0
  9. package/dist/{blockDiagram-ZYB65J3Q-eEZ6LTIH.js → blockDiagram-QIGZ2CNN-DS1kOHlW.js} +10 -10
  10. package/dist/{c4Diagram-AAMF2YG6-BqjOo55d.js → c4Diagram-FPNF74CW-CyRVKssw.js} +8 -8
  11. package/dist/{channel-BkhHQVue.js → channel-BilGXox7.js} +1 -1
  12. package/dist/{chunk-ANTBXLJU-BkLYh6ot.js → chunk-4BX2VUAB-CZR39zCO.js} +1 -1
  13. package/dist/{chunk-WVR4S24B-DpdvazVp.js → chunk-55IACEB6-BIH-MYov.js} +1 -1
  14. package/dist/{chunk-GLLZNHP4-BGaltx6Q.js → chunk-FMBD7UC4-4PZXFZE8.js} +1 -1
  15. package/dist/{chunk-JBRWN2VN-BZ3JgjiU.js → chunk-K7UQS3LO-CEvWKznk.js} +117 -117
  16. package/dist/{chunk-NRVI72HA-XO3jKXGr.js → chunk-QN33PNHL-D5LO5Jq_.js} +1 -1
  17. package/dist/{chunk-FHKO5MBM-BqvR49qe.js → chunk-QZHKN3VN-6gwUonWI.js} +1 -1
  18. package/dist/{chunk-LXBSTHXV-CJgOmuuc.js → chunk-TVAH2DTR-3gm06QdU.js} +7 -7
  19. package/dist/{chunk-OMD6QJNC-1rwXYaVn.js → chunk-TZMSLE5B-Cm8Iy9bO.js} +1 -1
  20. package/dist/{classDiagram-v2-QTMF73CY-_BeLc0pY.js → classDiagram-KNZD7YFC-DC529O_z.js} +2 -2
  21. package/dist/{classDiagram-3BZAVTQC-_BeLc0pY.js → classDiagram-v2-RKCZMP56-DC529O_z.js} +2 -2
  22. package/dist/{clone-DhXjmfNH.js → clone-CLoRX3j6.js} +1 -1
  23. package/dist/cose-bilkent-S5V4N54A-qf5DlS6Y.js +2609 -0
  24. package/dist/{cytoscape.esm-BYnVVhJX.js → cytoscape.esm-DfdJODL8.js} +34 -34
  25. package/dist/{dagre-2BBEFEWP-DoebA2zc.js → dagre-5GWH7T2D-Ceocls0m.js} +6 -6
  26. package/dist/{data-grid-overlay-editor-DYmc5v9I.js → data-grid-overlay-editor-AqDS_UKe.js} +11 -11
  27. package/dist/{diagram-4IRLE6MV-CxnJ439S.js → diagram-N5W7TBWH-CP66oSiv.js} +59 -60
  28. package/dist/{diagram-RP2FKANI-C-v51IXB.js → diagram-QEK2KX5R-_YD4kxxi.js} +15 -15
  29. package/dist/{diagram-GUPCWM2R-B7MLfHE7.js → diagram-S2PKOQOG-Cnj8T-OP.js} +10 -10
  30. package/dist/dockerfile-Cm8cRYCN.js +194 -0
  31. package/dist/ebnf-DUPDuY4r.js +78 -0
  32. package/dist/{erDiagram-HZWUO2LU-Cv1Slpwd.js → erDiagram-AWTI2OKA-CGnvoHx6.js} +8 -8
  33. package/dist/fcl-CPC2WYrI.js +103 -0
  34. package/dist/{flowDiagram-THRYKUMA-CnjAkcKg.js → flowDiagram-PVAE7QVJ-DG-pr9R9.js} +9 -9
  35. package/dist/{ganttDiagram-WV7ZQ7D5-CRQQ5cqP.js → ganttDiagram-OWAHRB6G-JmChtxvn.js} +34 -34
  36. package/dist/{gitGraphDiagram-OJR772UL-a7Wl_pP8.js → gitGraphDiagram-NY62KEGX-D8wLfOPd.js} +4 -4
  37. package/dist/{glide-data-editor-DrSTYUHP.js → glide-data-editor-9nC3iCIZ.js} +33 -33
  38. package/dist/{graph-Dq4lx1WI.js → graph-CoRe7vAN.js} +3 -3
  39. package/dist/http-D9LttvKF.js +44 -0
  40. package/dist/{index-B_t2cVfJ.js → index-6qYeHHjQ.js} +33090 -32892
  41. package/dist/{index-BhnWrXVh.js → index-BpzLh4Qe.js} +7711 -7711
  42. package/dist/{index-DSAnCCyV.js → index-BthgsgYX.js} +6 -6
  43. package/dist/{index-pBmAzQJl.js → index-MCx5v1x0.js} +2 -2
  44. package/dist/index-jkm77Jrz.js +98 -0
  45. package/dist/{infoDiagram-6WOFNB3A-B4pr_cke.js → infoDiagram-STP46IZ2-BlXxvOrR.js} +2 -2
  46. package/dist/{journeyDiagram-FFXJYRFH-CF8H9tcV.js → journeyDiagram-BIP6EPQ6-CNRYs_Fc.js} +24 -26
  47. package/dist/{kanban-definition-KOZQBZVT-BYfBCo4W.js → kanban-definition-6OIFK2YF-B9HeMAuP.js} +14 -14
  48. package/dist/{layout-D8_YOjKz.js → layout-m2vOUiW1.js} +81 -81
  49. package/dist/{linear-Be5SurQB.js → linear-DU6Q5CX3.js} +35 -35
  50. package/dist/{main-8IC_V2L6.js → main-BD2KGFpU.js} +74594 -68034
  51. package/dist/main.js +1 -1
  52. package/dist/{mermaid-B4v-qVXz.js → mermaid-HVCtvbyx.js} +6160 -7493
  53. package/dist/min-DcGMA4e_.js +80 -0
  54. package/dist/mindmap-definition-Q6HEUPPD-BW8UmIDQ.js +785 -0
  55. package/dist/nginx-zDPm3Z74.js +89 -0
  56. package/dist/{number-overlay-editor-XASk1ikZ.js → number-overlay-editor-D8Hl0Syo.js} +19 -19
  57. package/dist/{pieDiagram-DBDJKBY4-DhPX65dy.js → pieDiagram-ADFJNKIX-Bg-3zg5U.js} +17 -17
  58. package/dist/{quadrantDiagram-YPSRARAO-BjPa8bg5.js → quadrantDiagram-LMRXKWRM-BO4IG6Yz.js} +6 -6
  59. package/dist/{react-plotly-C_6SNkG9.js → react-plotly-dkvHVuRb.js} +3577 -3577
  60. package/dist/{requirementDiagram-EGVEC5DT-CtN_U9bI.js → requirementDiagram-4UW4RH46-5sdTguSM.js} +7 -7
  61. package/dist/{sankeyDiagram-HRAUVNP4-DVi73SZP.js → sankeyDiagram-GR3RE2ED-Buhlv9OI.js} +5 -5
  62. package/dist/sequenceDiagram-C3RYC4MD-C3qsM2UP.js +2519 -0
  63. package/dist/{slides-component-ML7vxRcD.js → slides-component-D209A0-s.js} +66 -66
  64. package/dist/solr-BNlsLglM.js +41 -0
  65. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  66. package/dist/{stateDiagram-UUKSUZ4H-qZ62tNIz.js → stateDiagram-KXAO66HF-CopJ7G6P.js} +5 -5
  67. package/dist/{stateDiagram-v2-EYPG3UTE-BZEyTMgl.js → stateDiagram-v2-UMBNRL4Z-CejL8AKf.js} +2 -2
  68. package/dist/style.css +1 -1
  69. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  70. package/dist/tiki-__Kn3CeS.js +181 -0
  71. package/dist/{time-CZ2vTSO2.js → time-BwSBitlN.js} +58 -58
  72. package/dist/{timeline-definition-3HZDQTIS-DbWMwd1x.js → timeline-definition-XQNQX7LJ-DzMNTX-C.js} +10 -12
  73. package/dist/{timer-BYwnU4DF.js → timer-B0-z63CM.js} +16 -16
  74. package/dist/{treemap-75Q7IDZK-CocR-oAZ.js → treemap-75Q7IDZK-zeJG07dk.js} +14 -14
  75. package/dist/{vega-component-BrYek_kz.js → vega-component-CUkiTayd.js} +30 -30
  76. package/dist/{xychartDiagram-FDP5SA34-CYiUdiy5.js → xychartDiagram-6GGTOJPD-DiENNXMS.js} +7 -7
  77. package/package.json +39 -39
  78. package/src/__mocks__/notebook.ts +3 -0
  79. package/src/__mocks__/requests.ts +3 -0
  80. package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +12 -12
  81. package/src/__tests__/chat-utils.test.ts +26 -211
  82. package/src/components/ai/ai-model-dropdown.tsx +25 -9
  83. package/src/components/app-config/ai-config.tsx +7 -0
  84. package/src/components/chat/chat-components.tsx +71 -0
  85. package/src/components/chat/chat-panel.tsx +481 -291
  86. package/src/components/chat/chat-utils.ts +50 -0
  87. package/src/components/chat/markdown-renderer.tsx +3 -7
  88. package/src/components/chat/tool-call-accordion.tsx +5 -5
  89. package/src/components/datasources/__tests__/utils.test.ts +6 -0
  90. package/src/components/datasources/column-preview.tsx +1 -3
  91. package/src/components/editor/actions/useNotebookActions.tsx +1 -1
  92. package/src/components/editor/ai/add-cell-with-ai.tsx +20 -15
  93. package/src/components/editor/ai/ai-completion-editor.tsx +22 -3
  94. package/src/components/editor/ai/completion-handlers.tsx +2 -4
  95. package/src/components/editor/ai/completion-utils.ts +85 -11
  96. package/src/components/editor/alerts/startup-logs-alert.tsx +72 -0
  97. package/src/components/editor/chrome/panels/datasources-panel.tsx +3 -1
  98. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +3 -1
  99. package/src/components/editor/chrome/panels/documentation-panel.tsx +3 -1
  100. package/src/components/editor/chrome/panels/error-panel.tsx +3 -1
  101. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +3 -1
  102. package/src/components/editor/chrome/panels/logs-panel.tsx +3 -1
  103. package/src/components/editor/chrome/panels/outline-panel.tsx +3 -1
  104. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -2
  105. package/src/components/editor/chrome/panels/scratchpad-panel.tsx +3 -1
  106. package/src/components/editor/chrome/panels/secrets-panel.tsx +3 -1
  107. package/src/components/editor/chrome/panels/snippets-panel.tsx +3 -1
  108. package/src/components/editor/chrome/panels/tracing-panel.tsx +3 -1
  109. package/src/components/editor/chrome/panels/variable-panel.tsx +3 -1
  110. package/src/components/editor/chrome/wrapper/app-chrome.tsx +38 -28
  111. package/src/components/editor/controls/command-palette-button.tsx +1 -1
  112. package/src/components/editor/controls/command-palette.tsx +5 -4
  113. package/src/components/editor/controls/state.ts +4 -0
  114. package/src/components/editor/package-alert.tsx +108 -58
  115. package/src/components/editor/renderers/CellArray.tsx +2 -0
  116. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +0 -1
  117. package/src/components/pages/edit-page.tsx +7 -3
  118. package/src/core/ai/chat-utils.ts +26 -43
  119. package/src/core/ai/config.ts +1 -1
  120. package/src/core/ai/context/__tests__/registry.test.ts +277 -3
  121. package/src/core/ai/context/context.ts +11 -1
  122. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +378 -0
  123. package/src/core/ai/context/providers/__tests__/error.test.ts +3 -2
  124. package/src/core/ai/context/providers/__tests__/file.test.ts +119 -0
  125. package/src/core/ai/context/providers/cell-output.ts +349 -0
  126. package/src/core/ai/context/providers/common.ts +5 -1
  127. package/src/core/ai/context/providers/file.ts +287 -0
  128. package/src/core/ai/context/registry.ts +79 -0
  129. package/src/core/ai/state.ts +22 -5
  130. package/src/core/alerts/state.ts +71 -3
  131. package/src/core/cells/cell.ts +2 -2
  132. package/src/core/cells/cells.ts +1 -1
  133. package/src/core/cells/logs.ts +1 -1
  134. package/src/core/cells/runs.ts +6 -5
  135. package/src/core/codemirror/ai/resources.ts +47 -5
  136. package/src/core/codemirror/ai/state.ts +12 -0
  137. package/src/core/codemirror/language/__tests__/sql.test.ts +45 -0
  138. package/src/core/codemirror/markdown/__tests__/commands.test.ts +1 -0
  139. package/src/core/codemirror/theme/dark.ts +1 -1
  140. package/src/core/config/capabilities.ts +1 -1
  141. package/src/core/datasets/__tests__/data-source.test.ts +24 -0
  142. package/src/core/errors/__tests__/errors.test.ts +2 -0
  143. package/src/core/islands/bridge.ts +1 -0
  144. package/src/core/islands/main.ts +1 -0
  145. package/src/core/kernel/messages.ts +12 -6
  146. package/src/core/layout/layout.ts +3 -3
  147. package/src/core/network/requests-network.ts +8 -0
  148. package/src/core/network/requests-static.ts +1 -0
  149. package/src/core/network/requests-toasting.ts +1 -0
  150. package/src/core/network/types.ts +4 -1
  151. package/src/core/wasm/bridge.ts +18 -2
  152. package/src/core/wasm/worker/bootstrap.ts +3 -1
  153. package/src/core/wasm/worker/getMarimoWheel.ts +3 -8
  154. package/src/core/wasm/worker/types.ts +3 -0
  155. package/src/core/websocket/useMarimoWebSocket.tsx +7 -1
  156. package/src/css/app/Cell.css +42 -21
  157. package/src/css/app/codemirror.css +5 -1
  158. package/src/css/globals.css +3 -0
  159. package/src/css/md.css +1 -1
  160. package/src/plugins/impl/MicrophonePlugin.tsx +2 -2
  161. package/src/plugins/impl/chat/ChatPlugin.tsx +2 -9
  162. package/src/plugins/impl/chat/chat-ui.tsx +129 -110
  163. package/src/plugins/impl/chat/types.ts +5 -8
  164. package/src/plugins/impl/code/__tests__/language.test.ts +15 -0
  165. package/src/plugins/impl/code/any-language-editor.tsx +11 -8
  166. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -6
  167. package/src/stories/cell.stories.tsx +6 -0
  168. package/src/stories/layout/vertical/one-column.stories.tsx +215 -0
  169. package/src/theme/useTheme.ts +11 -6
  170. package/src/utils/__tests__/blob.test.ts +37 -0
  171. package/src/utils/arrays.ts +13 -0
  172. package/src/utils/fileToBase64.ts +21 -6
  173. package/src/utils/json/base64.ts +5 -2
  174. package/src/utils/numbers.ts +9 -7
  175. package/dist/any-language-editor-Cvakxnzg.js +0 -45
  176. package/dist/asn1-jKiBa2Ya.js +0 -95
  177. package/dist/clojure-CCKyeQKf.js +0 -800
  178. package/dist/css-BkF-NPzE.js +0 -1553
  179. package/dist/index-CfrpOVe5.js +0 -341
  180. package/dist/index-DIFrY2JV.js +0 -288
  181. package/dist/javascript-C2yteZeJ.js +0 -691
  182. package/dist/min-Q4QXsXWR.js +0 -80
  183. package/dist/mindmap-definition-LNHGMQRG-CebaDS3t.js +0 -3234
  184. package/dist/mllike-BSnXJBGA.js +0 -272
  185. package/dist/pug-CwAQJzGR.js +0 -248
  186. package/dist/python-BkR3uSy8.js +0 -313
  187. package/dist/rpm-IznJm2Xc.js +0 -57
  188. package/dist/sequenceDiagram-WFGC7UMF-C8jImRwI.js +0 -2284
  189. package/dist/ttcn-cfg-Bac_acMi.js +0 -88
@@ -1,10 +1,10 @@
1
- import { G as g } from "./graph-Dq4lx1WI.js";
2
- import { b as Re, h as fe, j as ce, d as W, c as f, i as m, f as P, v as x, r as M } from "./_baseUniq-Duh9chhg.js";
3
- import { b as le, a as Te, c as Ie, m as w, d as N, h as he, f as q, l as T, e as Me } from "./min-Q4QXsXWR.js";
4
- import { aU as Se, au as je, aV as Fe, aC as ve, aB as K, ay as F, az as pe, aW as Ve, aX as Be, y as Ae, at as Q, z as Ge, aY as Ye, aZ as De, a_ as _, a$ as E, B as $e, b0 as I, b1 as D } from "./main-8IC_V2L6.js";
5
- var We = 1, qe = 4;
1
+ import { G as g } from "./graph-CoRe7vAN.js";
2
+ import { b as Re, h as fe, j as ce, d as $, c as f, i as m, f as C, v as x, r as M } from "./_baseUniq-dN9WKF9m.js";
3
+ import { b as le, a as Te, c as Ie, m as w, d as N, h as he, f as W, l as T, e as Me } from "./min-DcGMA4e_.js";
4
+ import { aJ as Se, aj as je, aK as Fe, ar as ve, aq as Q, an as F, ao as pe, aL as Ve, aM as Ae, k as Be, ai as Z, m as Ge, aN as Ye, aO as De, aP as _, aQ as E, o as qe, aR as I, aS as D } from "./main-BD2KGFpU.js";
5
+ var $e = 1, We = 4;
6
6
  function ze(e) {
7
- return Re(e, We | qe);
7
+ return Re(e, $e | We);
8
8
  }
9
9
  function Xe(e, n) {
10
10
  return e == null ? e : Se(e, fe(n), je);
@@ -17,7 +17,7 @@ function He(e, n) {
17
17
  }
18
18
  function S(e, n) {
19
19
  var r = {};
20
- return n = W(n), ce(e, function(t, a, i) {
20
+ return n = $(n), ce(e, function(t, a, i) {
21
21
  Fe(r, a, n(t, a, i));
22
22
  }), r;
23
23
  }
@@ -25,17 +25,17 @@ function y(e) {
25
25
  return e && e.length ? le(e, ve, He) : void 0;
26
26
  }
27
27
  function z(e, n) {
28
- return e && e.length ? le(e, W(n), Te) : void 0;
28
+ return e && e.length ? le(e, $(n), Te) : void 0;
29
29
  }
30
- function Ze(e, n) {
30
+ function Je(e, n) {
31
31
  var r = e.length;
32
32
  for (e.sort(n); r--; )
33
33
  e[r] = e[r].value;
34
34
  return e;
35
35
  }
36
- function Je(e, n) {
36
+ function Ke(e, n) {
37
37
  if (e !== n) {
38
- var r = e !== void 0, t = e === null, a = e === e, i = K(e), o = n !== void 0, u = n === null, d = n === n, s = K(n);
38
+ var r = e !== void 0, t = e === null, a = e === e, i = Q(e), o = n !== void 0, u = n === null, d = n === n, s = Q(n);
39
39
  if (!u && !s && !i && e > n || i && o && d && !u && !s || t && o && d || !r && d || !a)
40
40
  return 1;
41
41
  if (!t && !i && !s && e < n || s && r && a && !t && !i || u && r && a || !o && a || !d)
@@ -43,9 +43,9 @@ function Je(e, n) {
43
43
  }
44
44
  return 0;
45
45
  }
46
- function Ke(e, n, r) {
46
+ function Qe(e, n, r) {
47
47
  for (var t = -1, a = e.criteria, i = n.criteria, o = a.length, u = r.length; ++t < o; ) {
48
- var d = Je(a[t], i[t]);
48
+ var d = Ke(a[t], i[t]);
49
49
  if (d) {
50
50
  if (t >= u)
51
51
  return d;
@@ -55,29 +55,29 @@ function Ke(e, n, r) {
55
55
  }
56
56
  return e.index - n.index;
57
57
  }
58
- function Qe(e, n, r) {
58
+ function Ze(e, n, r) {
59
59
  n.length ? n = F(n, function(i) {
60
60
  return pe(i) ? function(o) {
61
61
  return Ve(o, i.length === 1 ? i[0] : i);
62
62
  } : i;
63
63
  }) : n = [ve];
64
64
  var t = -1;
65
- n = F(n, Be(W));
65
+ n = F(n, Ae($));
66
66
  var a = Ie(e, function(i, o, u) {
67
67
  var d = F(n, function(s) {
68
68
  return s(i);
69
69
  });
70
70
  return { criteria: d, index: ++t, value: i };
71
71
  });
72
- return Ze(a, function(i, o) {
73
- return Ke(i, o, r);
72
+ return Je(a, function(i, o) {
73
+ return Qe(i, o, r);
74
74
  });
75
75
  }
76
- var R = Ae(function(e, n) {
76
+ var R = Be(function(e, n) {
77
77
  if (e == null)
78
78
  return [];
79
79
  var r = n.length;
80
- return r > 1 && Q(e, n[0], n[1]) ? n = [] : r > 2 && Q(n[0], n[1], n[2]) && (n = [n[0]]), Qe(e, Ge(n), []);
80
+ return r > 1 && Z(e, n[0], n[1]) ? n = [] : r > 2 && Z(n[0], n[1], n[2]) && (n = [n[0]]), Ze(e, Ge(n), []);
81
81
  }), en = 0;
82
82
  function X(e) {
83
83
  var n = ++en;
@@ -120,7 +120,7 @@ function an(e, n) {
120
120
  if (e !== "_next" && e !== "_prev")
121
121
  return n;
122
122
  }
123
- var on = $e(1);
123
+ var on = qe(1);
124
124
  function un(e, n) {
125
125
  if (e.nodeCount() <= 1)
126
126
  return [];
@@ -151,10 +151,10 @@ function V(e, n, r, t, a) {
151
151
  var i = a ? [] : void 0;
152
152
  return f(e.inEdges(t.v), function(o) {
153
153
  var u = e.edge(o), d = e.node(o.v);
154
- a && i.push({ v: o.v, w: o.w }), d.out -= u, $(n, r, d);
154
+ a && i.push({ v: o.v, w: o.w }), d.out -= u, q(n, r, d);
155
155
  }), f(e.outEdges(t.v), function(o) {
156
156
  var u = e.edge(o), d = o.w, s = e.node(d);
157
- s.in -= u, $(n, r, s);
157
+ s.in -= u, q(n, r, s);
158
158
  }), e.removeNode(t.v), i;
159
159
  }
160
160
  function sn(e, n) {
@@ -169,10 +169,10 @@ function sn(e, n) {
169
169
  return new tn();
170
170
  }), o = t + 1;
171
171
  return f(r.nodes(), function(u) {
172
- $(i, o, r.node(u));
172
+ q(i, o, r.node(u));
173
173
  }), { graph: r, buckets: i, zeroIdx: o };
174
174
  }
175
- function $(e, n, r) {
175
+ function q(e, n, r) {
176
176
  r.out ? r.in ? e[r.out - r.in + n].enqueue(r) : e[e.length - 1].enqueue(r) : e[0].enqueue(r);
177
177
  }
178
178
  function fn(e) {
@@ -338,24 +338,24 @@ function ae(e) {
338
338
  }
339
339
  function kn(e) {
340
340
  f(e.nodes(), function(n) {
341
- B(e.node(n));
341
+ A(e.node(n));
342
342
  }), f(e.edges(), function(n) {
343
343
  var r = e.edge(n);
344
- f(r.points, B), Object.prototype.hasOwnProperty.call(r, "y") && B(r);
344
+ f(r.points, A), Object.prototype.hasOwnProperty.call(r, "y") && A(r);
345
345
  });
346
346
  }
347
- function B(e) {
347
+ function A(e) {
348
348
  e.y = -e.y;
349
349
  }
350
350
  function xn(e) {
351
351
  f(e.nodes(), function(n) {
352
- A(e.node(n));
352
+ B(e.node(n));
353
353
  }), f(e.edges(), function(n) {
354
354
  var r = e.edge(n);
355
- f(r.points, A), Object.prototype.hasOwnProperty.call(r, "x") && A(r);
355
+ f(r.points, B), Object.prototype.hasOwnProperty.call(r, "x") && B(r);
356
356
  });
357
357
  }
358
- function A(e) {
358
+ function B(e) {
359
359
  var n = e.x;
360
360
  e.x = e.y, e.y = n;
361
361
  }
@@ -405,32 +405,32 @@ function U(e) {
405
405
  }
406
406
  f(e.sources(), r);
407
407
  }
408
- function C(e, n) {
408
+ function P(e, n) {
409
409
  return e.node(n.w).rank - e.node(n.v).rank - e.edge(n).minlen;
410
410
  }
411
411
  function ge(e) {
412
412
  var n = new g({ directed: false }), r = e.nodes()[0], t = e.nodeCount();
413
413
  n.setNode(r, {});
414
414
  for (var a, i; Nn(n, e) < t; )
415
- a = Cn(n, e), i = n.hasNode(a.v) ? C(e, a) : -C(e, a), Pn(n, e, i);
415
+ a = Pn(n, e), i = n.hasNode(a.v) ? P(e, a) : -P(e, a), Cn(n, e, i);
416
416
  return n;
417
417
  }
418
418
  function Nn(e, n) {
419
419
  function r(t) {
420
420
  f(n.nodeEdges(t), function(a) {
421
421
  var i = a.v, o = t === i ? a.w : i;
422
- !e.hasNode(o) && !C(n, a) && (e.setNode(o, {}), e.setEdge(t, o, {}), r(o));
422
+ !e.hasNode(o) && !P(n, a) && (e.setNode(o, {}), e.setEdge(t, o, {}), r(o));
423
423
  });
424
424
  }
425
425
  return f(e.nodes(), r), e.nodeCount();
426
426
  }
427
- function Cn(e, n) {
427
+ function Pn(e, n) {
428
428
  return z(n.edges(), function(r) {
429
429
  if (e.hasNode(r.v) !== e.hasNode(r.w))
430
- return C(n, r);
430
+ return P(n, r);
431
431
  });
432
432
  }
433
- function Pn(e, n, r) {
433
+ function Cn(e, n, r) {
434
434
  f(e.nodes(), function(t) {
435
435
  n.node(t).rank += r;
436
436
  });
@@ -458,7 +458,7 @@ function Rn(e, n) {
458
458
  function Tn(e, n) {
459
459
  return ye(e, n, "pre");
460
460
  }
461
- k.initLowLimValues = Z;
461
+ k.initLowLimValues = J;
462
462
  k.initCutValues = H;
463
463
  k.calcCutValue = xe;
464
464
  k.leaveEdge = Oe;
@@ -467,7 +467,7 @@ k.exchangeEdges = Ne;
467
467
  function k(e) {
468
468
  e = hn(e), U(e);
469
469
  var n = ge(e);
470
- Z(n), H(n, e);
470
+ J(n), H(n, e);
471
471
  for (var r, t; r = Oe(n); )
472
472
  t = Le(n, e, r), Ne(n, e, r, t);
473
473
  }
@@ -494,7 +494,7 @@ function xe(e, n, r) {
494
494
  }
495
495
  }), u;
496
496
  }
497
- function Z(e, n) {
497
+ function J(e, n) {
498
498
  arguments.length < 2 && (n = e.nodes()[0]), Ee(e, {}, 1, n);
499
499
  }
500
500
  function Ee(e, n, r, t, a) {
@@ -504,7 +504,7 @@ function Ee(e, n, r, t, a) {
504
504
  }), o.low = i, o.lim = r++, a ? o.parent = a : delete o.parent, r;
505
505
  }
506
506
  function Oe(e) {
507
- return q(e.edges(), function(n) {
507
+ return W(e.edges(), function(n) {
508
508
  return e.edge(n).cutvalue < 0;
509
509
  });
510
510
  }
@@ -513,19 +513,19 @@ function Le(e, n, r) {
513
513
  n.hasEdge(t, a) || (t = r.w, a = r.v);
514
514
  var i = e.node(t), o = e.node(a), u = i, d = false;
515
515
  i.lim > o.lim && (u = o, d = true);
516
- var s = P(n.edges(), function(c) {
516
+ var s = C(n.edges(), function(c) {
517
517
  return d === ie(e, e.node(c.v), u) && d !== ie(e, e.node(c.w), u);
518
518
  });
519
519
  return z(s, function(c) {
520
- return C(n, c);
520
+ return P(n, c);
521
521
  });
522
522
  }
523
523
  function Ne(e, n, r, t) {
524
524
  var a = r.v, i = r.w;
525
- e.removeEdge(a, i), e.setEdge(t.v, t.w, {}), Z(e), H(e, n), Mn(e, n);
525
+ e.removeEdge(a, i), e.setEdge(t.v, t.w, {}), J(e), H(e, n), Mn(e, n);
526
526
  }
527
527
  function Mn(e, n) {
528
- var r = q(e.nodes(), function(a) {
528
+ var r = W(e.nodes(), function(a) {
529
529
  return !n.node(a).parent;
530
530
  }), t = Tn(e, r);
531
531
  t = t.slice(1), f(t, function(a) {
@@ -561,17 +561,17 @@ function Vn(e) {
561
561
  function oe(e) {
562
562
  k(e);
563
563
  }
564
- function Bn(e) {
565
- var n = O(e, "root", {}, "_root"), r = An(e), t = y(x(r)) - 1, a = 2 * t + 1;
564
+ function An(e) {
565
+ var n = O(e, "root", {}, "_root"), r = Bn(e), t = y(x(r)) - 1, a = 2 * t + 1;
566
566
  e.graph().nestingRoot = n, f(e.edges(), function(o) {
567
567
  e.edge(o).minlen *= a;
568
568
  });
569
569
  var i = Gn(e) + 1;
570
570
  f(e.children(), function(o) {
571
- Ce(e, n, a, i, t, r, o);
571
+ Pe(e, n, a, i, t, r, o);
572
572
  }), e.graph().nodeRankFactor = a;
573
573
  }
574
- function Ce(e, n, r, t, a, i, o) {
574
+ function Pe(e, n, r, t, a, i, o) {
575
575
  var u = e.children(o);
576
576
  if (!u.length) {
577
577
  o !== n && e.setEdge(n, o, { weight: 0, minlen: r });
@@ -579,7 +579,7 @@ function Ce(e, n, r, t, a, i, o) {
579
579
  }
580
580
  var d = re(e, "_bt"), s = re(e, "_bb"), c = e.node(o);
581
581
  e.setParent(d, o), c.borderTop = d, e.setParent(s, o), c.borderBottom = s, f(u, function(l) {
582
- Ce(e, n, r, t, a, i, l);
582
+ Pe(e, n, r, t, a, i, l);
583
583
  var h = e.node(l), v = h.borderTop ? h.borderTop : l, p = h.borderBottom ? h.borderBottom : l, b = h.borderTop ? t : 2 * t, L = v !== p ? 1 : a - i[o] + 1;
584
584
  e.setEdge(d, v, {
585
585
  weight: b,
@@ -592,7 +592,7 @@ function Ce(e, n, r, t, a, i, o) {
592
592
  });
593
593
  }), e.parent(o) || e.setEdge(n, d, { weight: 0, minlen: a + i[o] });
594
594
  }
595
- function An(e) {
595
+ function Bn(e) {
596
596
  var n = {};
597
597
  function r(t, a) {
598
598
  var i = e.children(t);
@@ -632,8 +632,8 @@ function Dn(e, n, r) {
632
632
  }
633
633
  });
634
634
  }
635
- function $n(e, n, r) {
636
- var t = Wn(e), a = new g({ compound: true }).setGraph({ root: t }).setDefaultNodeLabel(function(i) {
635
+ function qn(e, n, r) {
636
+ var t = $n(e), a = new g({ compound: true }).setGraph({ root: t }).setDefaultNodeLabel(function(i) {
637
637
  return e.node(i);
638
638
  });
639
639
  return f(e.nodes(), function(i) {
@@ -647,11 +647,11 @@ function $n(e, n, r) {
647
647
  }));
648
648
  }), a;
649
649
  }
650
- function Wn(e) {
650
+ function $n(e) {
651
651
  for (var n; e.hasNode(n = X("_root")); ) ;
652
652
  return n;
653
653
  }
654
- function qn(e, n) {
654
+ function Wn(e, n) {
655
655
  for (var r = 0, t = 1; t < n.length; ++t)
656
656
  r += zn(e, n[t - 1], n[t]);
657
657
  return r;
@@ -689,7 +689,7 @@ function zn(e, n, r) {
689
689
  ), d;
690
690
  }
691
691
  function Xn(e) {
692
- var n = {}, r = P(e.nodes(), function(u) {
692
+ var n = {}, r = C(e.nodes(), function(u) {
693
693
  return !e.children(u).length;
694
694
  }), t = y(
695
695
  w(r, function(u) {
@@ -749,16 +749,16 @@ function Hn(e, n) {
749
749
  var i = r[a.v], o = r[a.w];
750
750
  !m(i) && !m(o) && (o.indegree++, i.out.push(r[a.w]));
751
751
  });
752
- var t = P(r, function(a) {
752
+ var t = C(r, function(a) {
753
753
  return !a.indegree;
754
754
  });
755
- return Zn(t);
755
+ return Jn(t);
756
756
  }
757
- function Zn(e) {
757
+ function Jn(e) {
758
758
  var n = [];
759
759
  function r(i) {
760
760
  return function(o) {
761
- o.merged || (m(o.barycenter) || m(i.barycenter) || o.barycenter >= i.barycenter) && Jn(i, o);
761
+ o.merged || (m(o.barycenter) || m(i.barycenter) || o.barycenter >= i.barycenter) && Kn(i, o);
762
762
  };
763
763
  }
764
764
  function t(i) {
@@ -771,7 +771,7 @@ function Zn(e) {
771
771
  n.push(a), f(a.in.reverse(), r(a)), f(a.out, t(a));
772
772
  }
773
773
  return w(
774
- P(n, function(i) {
774
+ C(n, function(i) {
775
775
  return !i.merged;
776
776
  }),
777
777
  function(i) {
@@ -779,17 +779,17 @@ function Zn(e) {
779
779
  }
780
780
  );
781
781
  }
782
- function Jn(e, n) {
782
+ function Kn(e, n) {
783
783
  var r = 0, t = 0;
784
784
  e.weight && (r += e.barycenter * e.weight, t += e.weight), n.weight && (r += n.barycenter * n.weight, t += n.weight), e.vs = n.vs.concat(e.vs), e.barycenter = r / t, e.weight = t, e.i = Math.min(n.i, e.i), n.merged = true;
785
785
  }
786
- function Kn(e, n) {
786
+ function Qn(e, n) {
787
787
  var r = wn(e, function(c) {
788
788
  return Object.prototype.hasOwnProperty.call(c, "barycenter");
789
789
  }), t = r.lhs, a = R(r.rhs, function(c) {
790
790
  return -c.i;
791
791
  }), i = [], o = 0, u = 0, d = 0;
792
- t.sort(Qn(!!n)), d = ue(i, a, d), f(t, function(c) {
792
+ t.sort(Zn(!!n)), d = ue(i, a, d), f(t, function(c) {
793
793
  d += c.vs.length, i.push(c.vs), o += c.barycenter * c.weight, u += c.weight, d = ue(i, a, d);
794
794
  });
795
795
  var s = { vs: _(i) };
@@ -800,26 +800,26 @@ function ue(e, n, r) {
800
800
  n.pop(), e.push(t.vs), r++;
801
801
  return r;
802
802
  }
803
- function Qn(e) {
803
+ function Zn(e) {
804
804
  return function(n, r) {
805
805
  return n.barycenter < r.barycenter ? -1 : n.barycenter > r.barycenter ? 1 : e ? r.i - n.i : n.i - r.i;
806
806
  };
807
807
  }
808
- function Pe(e, n, r, t) {
808
+ function Ce(e, n, r, t) {
809
809
  var a = e.children(n), i = e.node(n), o = i ? i.borderLeft : void 0, u = i ? i.borderRight : void 0, d = {};
810
- o && (a = P(a, function(p) {
810
+ o && (a = C(a, function(p) {
811
811
  return p !== o && p !== u;
812
812
  }));
813
813
  var s = Un(e, a);
814
814
  f(s, function(p) {
815
815
  if (e.children(p.v).length) {
816
- var b = Pe(e, p.v, r, t);
816
+ var b = Ce(e, p.v, r, t);
817
817
  d[p.v] = b, Object.prototype.hasOwnProperty.call(b, "barycenter") && nr(p, b);
818
818
  }
819
819
  });
820
820
  var c = Hn(s, r);
821
821
  er(c, d);
822
- var l = Kn(c, t);
822
+ var l = Qn(c, t);
823
823
  if (o && (l.vs = _([o, l.vs, u]), e.predecessors(o).length)) {
824
824
  var h = e.node(e.predecessors(o)[0]), v = e.node(e.predecessors(u)[0]);
825
825
  Object.prototype.hasOwnProperty.call(l, "barycenter") || (l.barycenter = 0, l.weight = 0), l.barycenter = (l.barycenter * l.weight + h.order + v.order) / (l.weight + 2), l.weight += 2;
@@ -843,20 +843,20 @@ function rr(e) {
843
843
  se(e, a);
844
844
  for (var i = Number.POSITIVE_INFINITY, o, u = 0, d = 0; d < 4; ++u, ++d) {
845
845
  tr(u % 2 ? r : t, u % 4 >= 2), a = j(e);
846
- var s = qn(e, a);
846
+ var s = Wn(e, a);
847
847
  s < i && (d = 0, o = ze(a), i = s);
848
848
  }
849
849
  se(e, o);
850
850
  }
851
851
  function de(e, n, r) {
852
852
  return w(n, function(t) {
853
- return $n(e, t, r);
853
+ return qn(e, t, r);
854
854
  });
855
855
  }
856
856
  function tr(e, n) {
857
857
  var r = new g();
858
858
  f(e, function(t) {
859
- var a = t.graph().root, i = Pe(t, a, r, n);
859
+ var a = t.graph().root, i = Ce(t, a, r, n);
860
860
  f(i.vs, function(o, u) {
861
861
  t.node(o).order = u;
862
862
  }), Dn(t, r, i.vs);
@@ -913,8 +913,8 @@ function ur(e, n) {
913
913
  var h = sr(e, c), v = h ? e.node(h).order : d;
914
914
  (h || c === s) && (f(i.slice(u, l + 1), function(p) {
915
915
  f(e.predecessors(p), function(b) {
916
- var L = e.node(b), J = L.order;
917
- (J < o || v < J) && !(L.dummy && e.node(p).dummy) && _e(r, b, p);
916
+ var L = e.node(b), K = L.order;
917
+ (K < o || v < K) && !(L.dummy && e.node(p).dummy) && _e(r, b, p);
918
918
  });
919
919
  }), u = l + 1, o = v);
920
920
  }), i;
@@ -946,7 +946,7 @@ function dr(e, n) {
946
946
  }
947
947
  function sr(e, n) {
948
948
  if (e.node(n).dummy)
949
- return q(e.predecessors(n), function(r) {
949
+ return W(e.predecessors(n), function(r) {
950
950
  return e.node(r).dummy;
951
951
  });
952
952
  }
@@ -1122,7 +1122,7 @@ function Hr(e, n) {
1122
1122
  });
1123
1123
  }
1124
1124
  function xr(e, n) {
1125
- n(" makeSpaceForEdgeLabels", () => Mr(e)), n(" removeSelfEdges", () => Dr(e)), n(" acyclic", () => fn(e)), n(" nestingGraph.run", () => Bn(e)), n(" rank", () => jn(we(e))), n(" injectEdgeLabelProxies", () => Sr(e)), n(" removeEmptyRanks", () => pn(e)), n(" nestingGraph.cleanup", () => Yn(e)), n(" normalizeRanks", () => vn(e)), n(" assignRankMinMax", () => jr(e)), n(" removeEdgeLabelProxies", () => Fr(e)), n(" normalize.run", () => En(e)), n(" parentDummyChains", () => ar(e)), n(" addBorderSegments", () => mn(e)), n(" order", () => rr(e)), n(" insertSelfEdges", () => $r(e)), n(" adjustCoordinateSystem", () => gn(e)), n(" position", () => yr(e)), n(" positionSelfEdges", () => Wr(e)), n(" removeBorderNodes", () => Yr(e)), n(" normalize.undo", () => Ln(e)), n(" fixupEdgeLabelCoords", () => Ar(e)), n(" undoCoordinateSystem", () => yn(e)), n(" translateGraph", () => Vr(e)), n(" assignNodeIntersects", () => Br(e)), n(" reversePoints", () => Gr(e)), n(" acyclic.undo", () => ln(e));
1125
+ n(" makeSpaceForEdgeLabels", () => Mr(e)), n(" removeSelfEdges", () => Dr(e)), n(" acyclic", () => fn(e)), n(" nestingGraph.run", () => An(e)), n(" rank", () => jn(we(e))), n(" injectEdgeLabelProxies", () => Sr(e)), n(" removeEmptyRanks", () => pn(e)), n(" nestingGraph.cleanup", () => Yn(e)), n(" normalizeRanks", () => vn(e)), n(" assignRankMinMax", () => jr(e)), n(" removeEdgeLabelProxies", () => Fr(e)), n(" normalize.run", () => En(e)), n(" parentDummyChains", () => ar(e)), n(" addBorderSegments", () => mn(e)), n(" order", () => rr(e)), n(" insertSelfEdges", () => qr(e)), n(" adjustCoordinateSystem", () => gn(e)), n(" position", () => yr(e)), n(" positionSelfEdges", () => $r(e)), n(" removeBorderNodes", () => Yr(e)), n(" normalize.undo", () => Ln(e)), n(" fixupEdgeLabelCoords", () => Br(e)), n(" undoCoordinateSystem", () => yn(e)), n(" translateGraph", () => Vr(e)), n(" assignNodeIntersects", () => Ar(e)), n(" reversePoints", () => Gr(e)), n(" acyclic.undo", () => ln(e));
1126
1126
  }
1127
1127
  function Er(e, n) {
1128
1128
  f(e.nodes(), function(r) {
@@ -1133,7 +1133,7 @@ function Er(e, n) {
1133
1133
  t.points = a.points, Object.prototype.hasOwnProperty.call(a, "x") && (t.x = a.x, t.y = a.y);
1134
1134
  }), e.graph().width = n.graph().width, e.graph().height = n.graph().height;
1135
1135
  }
1136
- var Or = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Lr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Nr = ["acyclicer", "ranker", "rankdir", "align"], Cr = ["width", "height"], Pr = { width: 0, height: 0 }, _r = ["minlen", "weight", "width", "height", "labeloffset"], Rr = {
1136
+ var Or = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Lr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Nr = ["acyclicer", "ranker", "rankdir", "align"], Pr = ["width", "height"], Cr = { width: 0, height: 0 }, _r = ["minlen", "weight", "width", "height", "labeloffset"], Rr = {
1137
1137
  minlen: 1,
1138
1138
  weight: 1,
1139
1139
  width: 0,
@@ -1147,7 +1147,7 @@ function Ir(e) {
1147
1147
  D({}, Lr, G(r, Or), I(r, Nr))
1148
1148
  ), f(e.nodes(), function(t) {
1149
1149
  var a = Y(e.node(t));
1150
- n.setNode(t, Me(G(a, Cr), Pr)), n.setParent(t, e.parent(t));
1150
+ n.setNode(t, Me(G(a, Pr), Cr)), n.setParent(t, e.parent(t));
1151
1151
  }), f(e.edges(), function(t) {
1152
1152
  var a = Y(e.edge(t));
1153
1153
  n.setEdge(
@@ -1206,13 +1206,13 @@ function Vr(e) {
1206
1206
  }), Object.prototype.hasOwnProperty.call(c, "x") && (c.x -= n), Object.prototype.hasOwnProperty.call(c, "y") && (c.y -= t);
1207
1207
  }), i.width = r - n + o, i.height = a - t + u;
1208
1208
  }
1209
- function Br(e) {
1209
+ function Ar(e) {
1210
1210
  f(e.edges(), function(n) {
1211
1211
  var r = e.edge(n), t = e.node(n.v), a = e.node(n.w), i, o;
1212
1212
  r.points ? (i = r.points[0], o = r.points[r.points.length - 1]) : (r.points = [], i = a, o = t), r.points.unshift(ne(t, i)), r.points.push(ne(a, o));
1213
1213
  });
1214
1214
  }
1215
- function Ar(e) {
1215
+ function Br(e) {
1216
1216
  f(e.edges(), function(n) {
1217
1217
  var r = e.edge(n);
1218
1218
  if (Object.prototype.hasOwnProperty.call(r, "x"))
@@ -1250,7 +1250,7 @@ function Dr(e) {
1250
1250
  }
1251
1251
  });
1252
1252
  }
1253
- function $r(e) {
1253
+ function qr(e) {
1254
1254
  var n = j(e);
1255
1255
  f(n, function(r) {
1256
1256
  var t = 0;
@@ -1274,7 +1274,7 @@ function $r(e) {
1274
1274
  });
1275
1275
  });
1276
1276
  }
1277
- function Wr(e) {
1277
+ function $r(e) {
1278
1278
  f(e.nodes(), function(n) {
1279
1279
  var r = e.node(n);
1280
1280
  if (r.dummy === "selfedge") {