mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-26 05:16:29 +08:00
1 line
510 B
JavaScript
1 line
510 B
JavaScript
import{D as i,e as o,s as t}from"./chunk-UEXLG4I5.js";function m(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:u(e),edges:f(e)};return i(e.graph())||(n.value=o(e.graph())),n}function u(e){return t(e.nodes(),function(n){var r=e.node(n),a=e.parent(n),d={v:n};return i(r)||(d.value=r),i(a)||(d.parent=a),d})}function f(e){return t(e.edges(),function(n){var r=e.edge(n),a={v:n.v,w:n.w};return i(n.name)||(a.name=n.name),i(r)||(a.value=r),a})}export{m as a};
|