import"./graph-Crh-fQck.js";import{i as r}from"./_baseUniq-DmSpOwc-.js";import{c as e}from"./clone-CV2-s9tE.js";import{m as n}from"./min-BcCd9LO5.js";function o(n){var o={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:a(n),edges:t(n)};return r(n.graph())||(o.value=e(n.graph())),o}function a(e){return n(e.nodes(),(function(n){var o=e.node(n),a=e.parent(n),t={v:n};return r(o)||(t.value=o),r(a)||(t.parent=a),t}))}function t(e){return n(e.edges(),(function(n){var o=e.edge(n),a={v:n.v,w:n.w};return r(n.name)||(a.name=n.name),r(o)||(a.value=o),a}))}export{o as w};
