3 lines
28 KiB
JavaScript
3 lines
28 KiB
JavaScript
|
|
import{m as e}from"./chunk-EYG76IYJ-BW_kWavW.js";import{Z as n,T as r,N as t,b as o,D as i,d as a,l as d,J as u,a as s,s as c,y as f,f as h,c as g,Q as l,O as v,t as p,K as w,e as m,X as b,R as y,g as k,n as E,h as x,i as N,j as O}from"./chunk-OMTJKCYW-D0VGaEv2.js";import{m as I,aX as C,aY as L,aZ as _}from"./index-BDq3hoFe.js";function P(e,n,r,t){var o;do{o=d(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function R(r){var t=(new e).setGraph(r.graph());return n(r.nodes(),function(e){t.setNode(e,r.node(e))}),n(r.edges(),function(e){var n=t.edge(e.v,e.w)||{weight:0,minlen:1},o=r.edge(e);t.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),t}function T(r){var t=new e({multigraph:r.isMultigraph()}).setGraph(r.graph());return n(r.nodes(),function(e){r.children(e).length||t.setNode(e,r.node(e))}),n(r.edges(),function(e){t.setEdge(e,r.edge(e))}),t}function j(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,d=n.y-i,u=e.width/2,s=e.height/2;if(!a&&!d)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(d)*u>Math.abs(a)*s?(d<0&&(s=-s),r=s*a/d,t=s):(a<0&&(u=-u),r=u,t=u*d/a),{x:o+r,y:i+t}}function S(e){var r=u(s(F(e)+1),function(){return[]});return n(e.nodes(),function(n){var t=e.node(n),o=t.rank;c(o)||(r[o][t.order]=n)}),r}function M(e){var r=f(u(e.nodes(),function(n){return e.node(n).rank}));n(e.nodes(),function(n){var t=e.node(n);h(t,"rank")&&(t.rank-=r)})}function G(e){var r=f(u(e.nodes(),function(n){return e.node(n).rank})),t=[];n(e.nodes(),function(n){var o=e.node(n).rank-r;t[o]||(t[o]=[]),t[o].push(n)});var o=0,i=e.graph().nodeRankFactor;n(t,function(r,t){c(r)&&t%i!==0?--o:o&&n(r,function(n){e.node(n).rank+=o})})}function B(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),P(e,"border",o,n)}function F(e){return o(u(e.nodes(),function(n){var r=e.node(n).rank;if(!c(r))return r}))}function Y(e,r){var t={lhs:[],rhs:[]};return n(e,function(e){r(e)?t.lhs.push(e):t.rhs.push(e)}),t}function V(e,n){var r=g();try{return n()}finally{console.log(e+" time: "+(g()-r)+"ms")}}function z(e,n){return n()}function A(e){function r(t){var o=e.children(t),i=e.node(t);if(o.length&&n(o,r),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,d=i.maxRank+1;a<d;++a)D(e,"borderLeft","_bl",t,i,a),D(e,"borderRight","_br",t,i,a)}}I(r,"dfs"),n(e.children(),r)}function D(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},d=o[n][i-1],u=P(e,"border",a,r);o[n][i]=u,e.setParent(u,t),d&&e.setEdge(d,u,{weight:1})}function q(e){var n=e.graph().rankdir.toLowerCase();("lr"===n||"rl"===n)&&X(e)}function W(e){var n=e.graph().rankdir.toLowerCase();("bt"===n||"rl"===n)&&H(e),("lr"===n||"rl"===n)&&(Z(e),X(e))}function X(e){n(e.nodes(),function(n){J(e.node(n))}),n(e.edges(),function(n){J(e.edge(n))})}function J(e){var n=e.width;e.width=e.height,e.height=n}function H(e){n(e.nodes(),function(n){K(e.node(n))}),n(e.edges(),function(r){var t=e.edge(r);n(t.points,K),Object.prototype.hasOwnProperty.call(t,"y")&&K(t)})}function K(e){e.y=-e.y}function Z(e){n(e.nodes(),function(n){Q(e.node(n))}),n(e.edges(),function(r){var t=e.edge(r);n(t.points,Q),Object.prototype.hasOwnProperty.call(t,"x")&&Q(t)})}function Q(e){var n=e.x;e.x=e.y,e.y=n}I(P,"addDummyNode"),I(R,"simplify"),I(T,"asNonCompoundGraph"),I(j,"intersectRect"),I(S,"buildLayerMatrix"),I(M,"normalizeRanks"),I(G,"removeEmptyRanks"),I(B,"addBorderNode"),I(F,"maxRank"),I(Y,"partition"),I(V,"time"),I(z,"notime"),I(A,"addBorderSegments"),I(D,"addBorderNode"),I(q,"adjust"),I(W,"undo"),I(X,"swapWidthHeight"),I(J,"swapWidthHeightOne"),I(H,"reverseY"),I(K,"reverseYOne"),I(Z,"swapXY"),I(Q,"swapXYOne");var U=class{static{I(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return $(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&$(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,ee)),r=r._prev;return"["+e.join(", ")+"]"}}
|
||
|
|
//# sourceMappingURL=chunk-CCU7O4O5-DDF7LoPN.js.map
|