@nocobase/app 2.0.0-beta.9 → 2.0.0
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.
- package/client/.umirc.ts +4 -0
- package/dist/client/{113.736e29a0.async.js → 113.470c21ad.async.js} +1 -1
- package/dist/client/1161.1a2c10e3.async.js +40 -0
- package/dist/client/1442.fd65d046.async.js +5 -0
- package/dist/client/{1595.9f992743.async.js → 1595.6281d837.async.js} +3 -3
- package/dist/client/{1758.eeeacf43.async.js → 1758.404cac6d.async.js} +3 -3
- package/dist/client/{1883.6ee256ab.async.js → 1883.7bf62549.async.js} +4 -4
- package/dist/client/1905.2e6345d8.async.js +12 -0
- package/dist/client/{2042.feb4b9ac.async.js → 2042.7da1cbfb.async.js} +1 -1
- package/dist/client/{2097.919e4d8a.async.js → 2097.469d41dd.async.js} +2 -2
- package/dist/client/{2380.900b7a22.async.js → 2380.ce39cb9d.async.js} +12 -9
- package/dist/client/2612.99f32922.async.js +22 -0
- package/dist/client/{2775.455c3402.async.js → 2775.364c188c.async.js} +8 -8
- package/dist/client/2936.745e500f.async.js +28 -0
- package/dist/client/3357.0dc001fc.async.js +28 -0
- package/dist/client/341.01fc2262.async.js +28 -0
- package/dist/client/{3451.a9466e73.async.js → 3451.29052272.async.js} +6 -6
- package/dist/client/3781.16f1bb74.async.js +1 -0
- package/dist/client/4279.f53ade52.async.js +1 -0
- package/dist/client/{4327.68c0f17b.async.js → 4327.d9c9bdf4.async.js} +5 -5
- package/dist/client/{4351.efe05af2.async.js → 4351.40ef71f0.async.js} +5 -5
- package/dist/client/{4356.d61392c6.async.js → 4356.a3863dfa.async.js} +2 -2
- package/dist/client/4727.09926a61.async.js +1 -0
- package/dist/client/{4750.ce3051f3.async.js → 4750.0863f7b1.async.js} +2 -2
- package/dist/client/{4926.58238954.async.js → 4926.f49ba56d.async.js} +6 -6
- package/dist/client/501.e8db2401.async.js +1 -0
- package/dist/client/{5013.b14730ba.async.js → 5013.eaaaceb4.async.js} +1 -1
- package/dist/client/5501.7bed1ac8.async.js +23 -0
- package/dist/client/5662.3071d144.async.js +26 -0
- package/dist/client/6021.b3ab345b.async.js +22 -0
- package/dist/client/{645.ab5af584.async.js → 645.b70364b3.async.js} +3 -3
- package/dist/client/{6474.49632e37.async.js → 6474.8e54befa.async.js} +1 -1
- package/dist/client/6534.87203710.async.js +33 -0
- package/dist/client/{6747.de538558.async.js → 6747.1009bdb8.async.js} +12 -7
- package/dist/client/{689.4de33d65.async.js → 689.4dc252d6.async.js} +1 -1
- package/dist/client/{6920.497d7e80.async.js → 6920.d29cfa84.async.js} +5 -5
- package/dist/client/6998.e875a954.async.js +62 -0
- package/dist/client/{703.7ad807b0.async.js → 703.8c09e144.async.js} +3 -3
- package/dist/client/7087.e5b68989.async.js +6 -0
- package/dist/client/{7483.546ddcb6.async.js → 7483.c3bd056f.async.js} +4 -4
- package/dist/client/7534.1a42bafc.async.js +36 -0
- package/dist/client/{7764.a3ae7727.async.js → 7764.f7b626cb.async.js} +2 -2
- package/dist/client/816.4e92dc2c.async.js +1 -0
- package/dist/client/{8183.4c6f7e21.async.js → 8183.5418c6c8.async.js} +1 -1
- package/dist/client/{8408.c0ef773c.async.js → 8408.455572b7.async.js} +5 -6
- package/dist/client/{8805.819c4f44.async.js → 8805.00cfa044.async.js} +6 -6
- package/dist/client/{9042.3d21f631.async.js → 9042.9568dd16.async.js} +7 -7
- package/dist/client/{908.0e8c8a54.async.js → 908.4b088a69.async.js} +2 -3
- package/dist/client/{9317.fe6ffa9a.async.js → 9317.7d0009d1.async.js} +2 -2
- package/dist/client/935.63a37ee3.async.js +27 -0
- package/dist/client/{95.24aa76c4.async.js → 95.cf18a56e.async.js} +2 -2
- package/dist/client/{9547.a442df93.async.js → 9547.a9f2ea1d.async.js} +23 -6
- package/dist/client/{9801.34b13a74.async.js → 9801.dacad822.async.js} +1 -1
- package/dist/client/9844.b905f4ce.async.js +37 -0
- package/dist/client/index.html +3 -1
- package/dist/client/index.html.tpl +3 -1
- package/dist/client/{npm._at_ant-design.3d565a45.async.js → npm._at_ant-design.4fb666c7.async.js} +3 -3
- package/dist/client/npm._at_budibase.2d91cea2.async.js +36 -0
- package/dist/client/{npm._at_codemirror.23366286.async.js → npm._at_codemirror.aa828743.async.js} +10 -10
- package/dist/client/{npm.antd.601f2259.async.js → npm.antd.d7898d85.async.js} +13 -13
- package/dist/client/{npm.dagre-d3-es.5506d747.async.js → npm.dagre-d3-es.a13ce21a.async.js} +1 -1
- package/dist/client/{npm.highlight.js.5db864c8.async.js → npm.highlight.js.763ebb2d.async.js} +2 -2
- package/dist/client/{npm.lodash-es.d3d83c5d.async.js → npm.lodash-es.9fd92a41.async.js} +1 -1
- package/dist/client/npm.mathjs.7874451c.async.js +53 -0
- package/dist/client/npm.mermaid.952e77a0.async.js +1556 -0
- package/dist/client/{npm.rc-picker.baba6981.async.js → npm.rc-picker.95a28587.async.js} +1 -1
- package/dist/client/{npm.sanitize-html.506a0a55.async.js → npm.sanitize-html.2df959dd.async.js} +14 -14
- package/dist/client/{npm.slate-react.ef6881ab.async.js → npm.slate-react.f9b7bba3.async.js} +1 -1
- package/dist/client/npm.slate.6a5d16e1.async.js +1 -0
- package/dist/client/npm.typed-function.9df0469b.async.js +1 -0
- package/dist/client/p__index.d0d7bcb9.async.js +2697 -0
- package/dist/client/{umi.67dbd627.js → umi.973c27a2.js} +2 -2
- package/package.json +6 -6
- package/dist/client/1161.0b3b5766.async.js +0 -40
- package/dist/client/1442.be509f94.async.js +0 -5
- package/dist/client/1905.ff0793ff.async.js +0 -12
- package/dist/client/2612.0865e67e.async.js +0 -19
- package/dist/client/2936.902710e4.async.js +0 -28
- package/dist/client/3357.be95167c.async.js +0 -28
- package/dist/client/341.fba65e23.async.js +0 -28
- package/dist/client/3885.fd54a10c.async.js +0 -50
- package/dist/client/4727.0f6df8fb.async.js +0 -1
- package/dist/client/501.72b99d17.async.js +0 -1
- package/dist/client/5501.22d50b3a.async.js +0 -23
- package/dist/client/5662.8c643e63.async.js +0 -26
- package/dist/client/6021.cdefa0d3.async.js +0 -22
- package/dist/client/6534.6ea6468b.async.js +0 -33
- package/dist/client/7087.5646e199.async.js +0 -6
- package/dist/client/7534.0d69e071.async.js +0 -34
- package/dist/client/816.b71d5e67.async.js +0 -1
- package/dist/client/935.97d45ffa.async.js +0 -27
- package/dist/client/9844.6f484975.async.js +0 -37
- package/dist/client/npm._at_budibase.b1200847.async.js +0 -36
- package/dist/client/npm.mathjs.fd97f3b7.async.js +0 -52
- package/dist/client/npm.mermaid.91e7e45d.async.js +0 -1556
- package/dist/client/npm.slate.44c32547.async.js +0 -1
- package/dist/client/npm.uuid.15e7bb90.async.js +0 -1
- package/dist/client/p__index.7e8edd31.async.js +0 -2517
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2300],{23352:function(oe,X,b){b.d(X,{A:function(){return T}});function d(D,A,Z,R){var W,M,L,C,V,j,J,q,ne,Q,z,ee,H,K,f;if(W=A.y-D.y,L=D.x-A.x,V=A.x*D.y-D.x*A.y,ne=W*Z.x+L*Z.y+V,Q=W*R.x+L*R.y+V,!(ne!==0&&Q!==0&&S(ne,Q))&&(M=R.y-Z.y,C=Z.x-R.x,j=R.x*Z.y-Z.x*R.y,J=M*D.x+C*D.y+j,q=M*A.x+C*A.y+j,!(J!==0&&q!==0&&S(J,q))&&(z=W*C-M*L,z!==0)))return ee=Math.abs(z/2),H=L*j-C*V,K=H<0?(H-ee)/z:(H+ee)/z,H=M*V-W*j,f=H<0?(H-ee)/z:(H+ee)/z,{x:K,y:f}}function S(D,A){return D*A>0}function T(D,A,Z){var R=D.x,W=D.y,M=[],L=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY;A.forEach(function(z){L=Math.min(L,z.x),C=Math.min(C,z.y)});for(var V=R-D.width/2-L,j=W-D.height/2-C,J=0;J<A.length;J++){var q=A[J],ne=A[J<A.length-1?J+1:0],Q=d(D,Z,{x:V+q.x,y:j+q.y},{x:V+ne.x,y:j+ne.y});Q&&M.push(Q)}return M.length?(M.length>1&&M.sort(function(z,ee){var H=z.x-Z.x,K=z.y-Z.y,f=Math.sqrt(H*H+K*K),g=ee.x-Z.x,x=ee.y-Z.y,I=Math.sqrt(g*g+x*x);return f<I?-1:f===I?0:1}),M[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",D),D)}},22930:function(oe,X,b){b.d(X,{q:function(){return d}});function d(S,T){var D=S.x,A=S.y,Z=T.x-D,R=T.y-A,W=S.width/2,M=S.height/2,L,C;return Math.abs(R)*W>Math.abs(Z)*M?(R<0&&(M=-M),L=R===0?0:M*Z/R,C=M):(Z<0&&(W=-W),L=W,C=Z===0?0:W*R/Z),{x:D+L,y:A+C}}},43349:function(oe,X,b){b.d(X,{a:function(){return S}});var d=b(96225);function S(T,D){var A=T.append("foreignObject").attr("width","100000"),Z=A.append("xhtml:div");Z.attr("xmlns","http://www.w3.org/1999/xhtml");var R=D.label;switch(typeof R){case"function":Z.insert(R);break;case"object":Z.insert(function(){return R});break;default:Z.html(R)}d.bg(Z,D.labelStyle),Z.style("display","inline-block"),Z.style("white-space","nowrap");var W=Z.node().getBoundingClientRect();return A.attr("width",W.width).attr("height",W.height),A}},96225:function(oe,X,b){b.d(X,{$p:function(){return W},O1:function(){return D},WR:function(){return M},bF:function(){return T},bg:function(){return R}});var d=b(37514),S=b(73234);function T(L,C){return!!L.children(C).length}function D(L){return Z(L.v)+":"+Z(L.w)+":"+Z(L.name)}var A=/:/g;function Z(L){return L?String(L).replace(A,"\\:"):""}function R(L,C){C&&L.attr("style",C)}function W(L,C,V){C&&L.attr("class",C).attr("class",V+" "+L.attr("class"))}function M(L,C){var V=C.graph();if(d.Z(V)){var j=V.transition;if(S.Z(j))return j(L)}return L}},99791:function(oe,X,b){b.d(X,{bK:function(){return dt}});var d=b(70870),S=b(66749),T=b(17452),D=b(62002),A=b(27961),Z=b(43836),R=b(74379),W=b(45625);class M{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,t=n._prev;if(t!==n)return L(t),t}enqueue(n){var t=this._sentinel;n._prev&&n._next&&L(n),n._next=t._next,t._next._prev=n,t._next=n,n._prev=t}toString(){for(var n=[],t=this._sentinel,r=t._prev;r!==t;)n.push(JSON.stringify(r,C)),r=r._prev;return"["+n.join(", ")+"]"}}function L(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function C(e,n){if(e!=="_next"&&e!=="_prev")return n}var V=D.Z(1);function j(e,n){if(e.nodeCount()<=1)return[];var t=ne(e,n||V),r=J(t.graph,t.buckets,t.zeroIdx);return A.Z(Z.Z(r,function(a){return e.outEdges(a.v,a.w)}))}function J(e,n,t){for(var r=[],a=n[n.length-1],i=n[0],o;e.nodeCount();){for(;o=i.dequeue();)q(e,n,t,o);for(;o=a.dequeue();)q(e,n,t,o);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(o=n[s].dequeue(),o){r=r.concat(q(e,n,t,o,!0));break}}}return r}function q(e,n,t,r,a){var i=a?[]:void 0;return d.Z(e.inEdges(r.v),function(o){var s=e.edge(o),h=e.node(o.v);a&&i.push({v:o.v,w:o.w}),h.out-=s,Q(n,t,h)}),d.Z(e.outEdges(r.v),function(o){var s=e.edge(o),h=o.w,l=e.node(h);l.in-=s,Q(n,t,l)}),e.removeNode(r.v),i}function ne(e,n){var t=new W.k,r=0,a=0;d.Z(e.nodes(),function(s){t.setNode(s,{v:s,in:0,out:0})}),d.Z(e.edges(),function(s){var h=t.edge(s.v,s.w)||0,l=n(s),v=h+l;t.setEdge(s.v,s.w,v),a=Math.max(a,t.node(s.v).out+=l),r=Math.max(r,t.node(s.w).in+=l)});var i=R.Z(a+r+3).map(function(){return new M}),o=r+1;return d.Z(t.nodes(),function(s){Q(i,o,t.node(s))}),{graph:t,buckets:i,zeroIdx:o}}function Q(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function z(e){var n=e.graph().acyclicer==="greedy"?j(e,t(e)):ee(e);d.Z(n,function(r){var a=e.edge(r);e.removeEdge(r),a.forwardName=r.name,a.reversed=!0,e.setEdge(r.w,r.v,a,S.Z("rev"))});function t(r){return function(a){return r.edge(a).weight}}}function ee(e){var n=[],t={},r={};function a(i){T.Z(r,i)||(r[i]=!0,t[i]=!0,d.Z(e.outEdges(i),function(o){T.Z(t,o.w)?n.push(o):a(o.w)}),delete t[i])}return d.Z(e.nodes(),a),n}function H(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}})}var K=b(59236),f=b(61666),g=b(3688),x=b(61303),I=b(935),B=b(48392),O=b(49360),G=b(3729),re=b(25222);function se(e,n,t,r){var a;do a=S.Z(r);while(e.hasNode(a));return t.dummy=n,e.setNode(a,t),a}function ke(e){var n=new W.k().setGraph(e.graph());return d.Z(e.nodes(),function(t){n.setNode(t,e.node(t))}),d.Z(e.edges(),function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},a=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+a.weight,minlen:Math.max(r.minlen,a.minlen)})}),n}function ge(e){var n=new W.k({multigraph:e.isMultigraph()}).setGraph(e.graph());return d.Z(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),d.Z(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function me(e){var n=_.map(e.nodes(),function(t){var r={};return _.forEach(e.outEdges(t),function(a){r[a.w]=(r[a.w]||0)+e.edge(a).weight}),r});return _.zipObject(e.nodes(),n)}function Ue(e){var n=_.map(e.nodes(),function(t){var r={};return _.forEach(e.inEdges(t),function(a){r[a.v]=(r[a.v]||0)+e.edge(a).weight}),r});return _.zipObject(e.nodes(),n)}function Ze(e,n){var t=e.x,r=e.y,a=n.x-t,i=n.y-r,o=e.width/2,s=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var h,l;return Math.abs(i)*o>Math.abs(a)*s?(i<0&&(s=-s),h=s*a/i,l=s):(a<0&&(o=-o),h=o,l=o*i/a),{x:t+h,y:r+l}}function ue(e){var n=Z.Z(R.Z(Ee(e)+1),function(){return[]});return d.Z(e.nodes(),function(t){var r=e.node(t),a=r.rank;O.Z(a)||(n[a][r.order]=t)}),n}function Te(e){var n=G.Z(Z.Z(e.nodes(),function(t){return e.node(t).rank}));d.Z(e.nodes(),function(t){var r=e.node(t);T.Z(r,"rank")&&(r.rank-=n)})}function we(e){var n=G.Z(Z.Z(e.nodes(),function(i){return e.node(i).rank})),t=[];d.Z(e.nodes(),function(i){var o=e.node(i).rank-n;t[o]||(t[o]=[]),t[o].push(i)});var r=0,a=e.graph().nodeRankFactor;d.Z(t,function(i,o){O.Z(i)&&o%a!==0?--r:r&&d.Z(i,function(s){e.node(s).rank+=r})})}function be(e,n,t,r){var a={width:0,height:0};return arguments.length>=4&&(a.rank=t,a.order=r),se(e,"border",a,n)}function Ee(e){return x.Z(Z.Z(e.nodes(),function(n){var t=e.node(n).rank;if(!O.Z(t))return t}))}function Me(e,n){var t={lhs:[],rhs:[]};return d.Z(e,function(r){n(r)?t.lhs.push(r):t.rhs.push(r)}),t}function ce(e,n){var t=re.Z();try{return n()}finally{console.log(e+" time: "+(re.Z()-t)+"ms")}}function Pe(e,n){return n()}function Re(e){function n(t){var r=e.children(t),a=e.node(t);if(r.length&&d.Z(r,n),T.Z(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;i<o;++i)ye(e,"borderLeft","_bl",t,a,i),ye(e,"borderRight","_br",t,a,i)}}d.Z(e.children(),n)}function ye(e,n,t,r,a,i){var o={width:0,height:0,rank:i,borderType:n},s=a[n][i-1],h=se(e,"border",o,t);a[n][i]=h,e.setParent(h,r),s&&e.setEdge(s,h,{weight:1})}function Oe(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&xe(e)}function De(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&Se(e),(n==="lr"||n==="rl")&&(Ae(e),xe(e))}function xe(e){d.Z(e.nodes(),function(n){_e(e.node(n))}),d.Z(e.edges(),function(n){_e(e.edge(n))})}function _e(e){var n=e.width;e.width=e.height,e.height=n}function Se(e){d.Z(e.nodes(),function(n){le(e.node(n))}),d.Z(e.edges(),function(n){var t=e.edge(n);d.Z(t.points,le),T.Z(t,"y")&&le(t)})}function le(e){e.y=-e.y}function Ae(e){d.Z(e.nodes(),function(n){ie(e.node(n))}),d.Z(e.edges(),function(n){var t=e.edge(n);d.Z(t.points,ie),T.Z(t,"x")&&ie(t)})}function ie(e){var n=e.x;e.x=e.y,e.y=n}function Ve(e){e.graph().dummyChains=[],d.Z(e.edges(),function(n){p(e,n)})}function p(e,n){var t=n.v,r=e.node(t).rank,a=n.w,i=e.node(a).rank,o=n.name,s=e.edge(n),h=s.labelRank;if(i!==r+1){e.removeEdge(n);var l,v,E;for(E=0,++r;r<i;++E,++r)s.points=[],v={width:0,height:0,edgeLabel:s,edgeObj:n,rank:r},l=se(e,"edge",v,"_d"),r===h&&(v.width=s.width,v.height=s.height,v.dummy="edge-label",v.labelpos=s.labelpos),e.setEdge(t,l,{weight:s.weight},o),E===0&&e.graph().dummyChains.push(l),t=l;e.setEdge(t,a,{weight:s.weight},o)}}function c(e){d.Z(e.graph().dummyChains,function(n){var t=e.node(n),r=t.edgeLabel,a;for(e.setEdge(t.edgeObj,r);t.dummy;)a=e.successors(n)[0],e.removeNode(n),r.points.push({x:t.x,y:t.y}),t.dummy==="edge-label"&&(r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height),n=a,t=e.node(n)})}var u=b(17948);function m(e){var n={};function t(r){var a=e.node(r);if(T.Z(n,r))return a.rank;n[r]=!0;var i=G.Z(Z.Z(e.outEdges(r),function(o){return t(o.w)-e.edge(o).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}d.Z(e.sources(),t)}function w(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function y(e){var n=new W.k({directed:!1}),t=e.nodes()[0],r=e.nodeCount();n.setNode(t,{});for(var a,i;k(n,e)<r;)a=N(n,e),i=n.hasNode(a.v)?w(e,a):-w(e,a),U(n,e,i);return n}function k(e,n){function t(r){d.Z(n.nodeEdges(r),function(a){var i=a.v,o=r===i?a.w:i;!e.hasNode(o)&&!w(n,a)&&(e.setNode(o,{}),e.setEdge(r,o,{}),t(o))})}return d.Z(e.nodes(),t),e.nodeCount()}function N(e,n){return u.Z(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return w(n,t)})}function U(e,n,t){d.Z(e.nodes(),function(r){n.node(r).rank+=t})}var te=b(86288),ae=b(13445),Be=D.Z(1);function fe(e,n,t,r){return Le(e,String(n),t||Be,r||function(a){return e.outEdges(a)})}function Le(e,n,t,r){var a={},i=new PriorityQueue,o,s,h=function(l){var v=l.v!==o?l.v:l.w,E=a[v],P=t(l),F=s.distance+P;if(P<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+l+" Weight: "+P);F<E.distance&&(E.distance=F,E.predecessor=o,i.decrease(v,F))};for(e.nodes().forEach(function(l){var v=l===n?0:Number.POSITIVE_INFINITY;a[l]={distance:v},i.add(l,v)});i.size()>0&&(o=i.removeMin(),s=a[o],s.distance!==Number.POSITIVE_INFINITY);)r(o).forEach(h);return a}function We(e,n,t){return _.transform(e.nodes(),function(r,a){r[a]=dijkstra(e,a,n,t)},{})}var Ne=D.Z(1);function Pt(e,n,t){return un(e,n||Ne,t||function(r){return e.outEdges(r)})}function un(e,n,t){var r={},a=e.nodes();return a.forEach(function(i){r[i]={},r[i][i]={distance:0},a.forEach(function(o){i!==o&&(r[i][o]={distance:Number.POSITIVE_INFINITY})}),t(i).forEach(function(o){var s=o.v===i?o.w:o.v,h=n(o);r[i][s]={distance:h,predecessor:i}})}),a.forEach(function(i){var o=r[i];a.forEach(function(s){var h=r[s];a.forEach(function(l){var v=h[i],E=o[l],P=h[l],F=v.distance+E.distance;F<P.distance&&(P.distance=F,P.predecessor=E.predecessor)})})}),r}var fn=b(42199);hn.CycleException=Ie;function hn(e){var n={},t={},r=[];function a(i){if(T.Z(t,i))throw new Ie;T.Z(n,i)||(t[i]=!0,n[i]=!0,d.Z(e.predecessors(i),a),delete t[i],r.push(i))}if(d.Z(e.sinks(),a),fn.Z(n)!==e.nodeCount())throw new Ie;return r}function Ie(){}Ie.prototype=new Error;function Rt(e){try{topsort(e)}catch(n){if(n instanceof CycleException)return!1;throw n}return!0}var cn=b(27771);function Ke(e,n,t){cn.Z(n)||(n=[n]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return d.Z(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);ze(e,o,t==="post",i,r,a)}),a}function ze(e,n,t,r,a,i){T.Z(r,n)||(r[n]=!0,t||i.push(n),d.Z(a(n),function(o){ze(e,o,t,r,a,i)}),t&&i.push(n))}function ln(e,n){return Ke(e,n,"post")}function vn(e,n){return Ke(e,n,"pre")}var Ot=b(1926);function Dt(e,n){var t=new Graph,r={},a=new PriorityQueue,i;function o(h){var l=h.v===i?h.w:h.v,v=a.priority(l);if(v!==void 0){var E=n(h);E<v&&(r[l]=i,a.decrease(l,E))}}if(e.nodeCount()===0)return t;_.each(e.nodes(),function(h){a.add(h,Number.POSITIVE_INFINITY),t.setNode(h)}),a.decrease(e.nodes()[0],0);for(var s=!1;a.size()>0;){if(i=a.removeMin(),_.has(r,i))t.setEdge(i,r[i]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(i).forEach(o)}return t}de.initLowLimValues=Ye,de.initCutValues=Fe,de.calcCutValue=He,de.leaveEdge=Qe,de.enterEdge=$e,de.exchangeEdges=Je;function de(e){e=ke(e),m(e);var n=y(e);Ye(n),Fe(n,e);for(var t,r;t=Qe(n);)r=$e(n,e,t),Je(n,e,t,r)}function Fe(e,n){var t=ln(e,e.nodes());t=t.slice(0,t.length-1),d.Z(t,function(r){pn(e,n,r)})}function pn(e,n,t){var r=e.node(t),a=r.parent;e.edge(t,a).cutvalue=He(e,n,t)}function He(e,n,t){var r=e.node(t),a=r.parent,i=!0,o=n.edge(t,a),s=0;return o||(i=!1,o=n.edge(a,t)),s=o.weight,d.Z(n.nodeEdges(t),function(h){var l=h.v===t,v=l?h.w:h.v;if(v!==a){var E=l===i,P=n.edge(h).weight;if(s+=E?P:-P,mn(e,t,v)){var F=e.edge(t,v).cutvalue;s+=E?-F:F}}}),s}function Ye(e,n){arguments.length<2&&(n=e.nodes()[0]),Xe(e,{},1,n)}function Xe(e,n,t,r,a){var i=t,o=e.node(r);return n[r]=!0,d.Z(e.neighbors(r),function(s){T.Z(n,s)||(t=Xe(e,n,t,s,r))}),o.low=i,o.lim=t++,a?o.parent=a:delete o.parent,t}function Qe(e){return te.Z(e.edges(),function(n){return e.edge(n).cutvalue<0})}function $e(e,n,t){var r=t.v,a=t.w;n.hasEdge(r,a)||(r=t.w,a=t.v);var i=e.node(r),o=e.node(a),s=i,h=!1;i.lim>o.lim&&(s=o,h=!0);var l=ae.Z(n.edges(),function(v){return h===qe(e,e.node(v.v),s)&&h!==qe(e,e.node(v.w),s)});return u.Z(l,function(v){return w(n,v)})}function Je(e,n,t,r){var a=t.v,i=t.w;e.removeEdge(a,i),e.setEdge(r.v,r.w,{}),Ye(e),Fe(e,n),gn(e,n)}function gn(e,n){var t=te.Z(e.nodes(),function(a){return!n.node(a).parent}),r=vn(e,t);r=r.slice(1),d.Z(r,function(a){var i=e.node(a).parent,o=n.edge(a,i),s=!1;o||(o=n.edge(i,a),s=!0),n.node(a).rank=n.node(i).rank+(s?o.minlen:-o.minlen)})}function mn(e,n,t){return e.hasEdge(n,t)}function qe(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function Zn(e){switch(e.graph().ranker){case"network-simplex":en(e);break;case"tight-tree":bn(e);break;case"longest-path":wn(e);break;default:en(e)}}var wn=m;function bn(e){m(e),y(e)}function en(e){de(e)}var he=b(34148),Ce=b(92344);function En(e){var n=se(e,"root",{},"_root"),t=yn(e),r=x.Z(he.Z(t))-1,a=2*r+1;e.graph().nestingRoot=n,d.Z(e.edges(),function(o){e.edge(o).minlen*=a});var i=xn(e)+1;d.Z(e.children(),function(o){nn(e,n,a,i,r,t,o)}),e.graph().nodeRankFactor=a}function nn(e,n,t,r,a,i,o){var s=e.children(o);if(!s.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:t});return}var h=be(e,"_bt"),l=be(e,"_bb"),v=e.node(o);e.setParent(h,o),v.borderTop=h,e.setParent(l,o),v.borderBottom=l,d.Z(s,function(E){nn(e,n,t,r,a,i,E);var P=e.node(E),F=P.borderTop?P.borderTop:E,Y=P.borderBottom?P.borderBottom:E,$=P.borderTop?r:2*r,pe=F!==Y?1:a-i[o]+1;e.setEdge(h,F,{weight:$,minlen:pe,nestingEdge:!0}),e.setEdge(Y,l,{weight:$,minlen:pe,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,h,{weight:0,minlen:a+i[o]})}function yn(e){var n={};function t(r,a){var i=e.children(r);i&&i.length&&d.Z(i,function(o){t(o,a+1)}),n[r]=a}return d.Z(e.children(),function(r){t(r,1)}),n}function xn(e){return Ce.Z(e.edges(),function(n,t){return n+e.edge(t).weight},0)}function _n(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,d.Z(e.edges(),function(t){var r=e.edge(t);r.nestingEdge&&e.removeEdge(t)})}var Ln=b(86295);function Nn(e,n,t){var r={},a;d.Z(t,function(i){for(var o=e.parent(i),s,h;o;){if(s=e.parent(o),s?(h=r[s],r[s]=o):(h=a,a=o),h&&h!==o){n.setEdge(h,o);return}o=s}})}function In(e,n,t){var r=Cn(e),a=new W.k({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(i){return e.node(i)});return d.Z(e.nodes(),function(i){var o=e.node(i),s=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,s||r),d.Z(e[t](i),function(h){var l=h.v===i?h.w:h.v,v=a.edge(l,i),E=O.Z(v)?0:v.weight;a.setEdge(l,i,{weight:e.edge(h).weight+E})}),T.Z(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function Cn(e){for(var n;e.hasNode(n=S.Z("_root")););return n}var kn=b(62743),ve=b(16406);function Tn(e,n){for(var t=0,r=1;r<n.length;++r)t+=Mn(e,n[r-1],n[r]);return t}function Mn(e,n,t){for(var r=kn.Z(t,Z.Z(t,function(l,v){return v})),a=A.Z(Z.Z(n,function(l){return ve.Z(Z.Z(e.outEdges(l),function(v){return{pos:r[v.w],weight:e.edge(v).weight}}),"pos")})),i=1;i<t.length;)i<<=1;var o=2*i-1;i-=1;var s=Z.Z(new Array(o),function(){return 0}),h=0;return d.Z(a.forEach(function(l){var v=l.pos+i;s[v]+=l.weight;for(var E=0;v>0;)v%2&&(E+=s[v+1]),v=v-1>>1,s[v]+=l.weight;h+=l.weight*E})),h}function Pn(e){var n={},t=ae.Z(e.nodes(),function(s){return!e.children(s).length}),r=x.Z(Z.Z(t,function(s){return e.node(s).rank})),a=Z.Z(R.Z(r+1),function(){return[]});function i(s){if(!T.Z(n,s)){n[s]=!0;var h=e.node(s);a[h.rank].push(s),d.Z(e.successors(s),i)}}var o=ve.Z(t,function(s){return e.node(s).rank});return d.Z(o,i),a}function Rn(e,n){return Z.Z(n,function(t){var r=e.inEdges(t);if(r.length){var a=Ce.Z(r,function(i,o){var s=e.edge(o),h=e.node(o.v);return{sum:i.sum+s.weight*h.order,weight:i.weight+s.weight}},{sum:0,weight:0});return{v:t,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:t}})}function On(e,n){var t={};d.Z(e,function(a,i){var o=t[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};O.Z(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),d.Z(n.edges(),function(a){var i=t[a.v],o=t[a.w];!O.Z(i)&&!O.Z(o)&&(o.indegree++,i.out.push(t[a.w]))});var r=ae.Z(t,function(a){return!a.indegree});return Dn(r)}function Dn(e){var n=[];function t(i){return function(o){o.merged||(O.Z(o.barycenter)||O.Z(i.barycenter)||o.barycenter>=i.barycenter)&&Sn(i,o)}}function r(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),d.Z(a.in.reverse(),t(a)),d.Z(a.out,r(a))}return Z.Z(ae.Z(n,function(i){return!i.merged}),function(i){return f.Z(i,["vs","i","barycenter","weight"])})}function Sn(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight),n.weight&&(t+=n.barycenter*n.weight,r+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}function An(e,n){var t=Me(e,function(v){return T.Z(v,"barycenter")}),r=t.lhs,a=ve.Z(t.rhs,function(v){return-v.i}),i=[],o=0,s=0,h=0;r.sort(Bn(!!n)),h=tn(i,a,h),d.Z(r,function(v){h+=v.vs.length,i.push(v.vs),o+=v.barycenter*v.weight,s+=v.weight,h=tn(i,a,h)});var l={vs:A.Z(i)};return s&&(l.barycenter=o/s,l.weight=s),l}function tn(e,n,t){for(var r;n.length&&(r=I.Z(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function Bn(e){return function(n,t){return n.barycenter<t.barycenter?-1:n.barycenter>t.barycenter?1:e?t.i-n.i:n.i-t.i}}function rn(e,n,t,r){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,s=i?i.borderRight:void 0,h={};o&&(a=ae.Z(a,function(Y){return Y!==o&&Y!==s}));var l=Rn(e,a);d.Z(l,function(Y){if(e.children(Y.v).length){var $=rn(e,Y.v,t,r);h[Y.v]=$,T.Z($,"barycenter")&&Fn(Y,$)}});var v=On(l,t);Wn(v,h);var E=An(v,r);if(o&&(E.vs=A.Z([o,E.vs,s]),e.predecessors(o).length)){var P=e.node(e.predecessors(o)[0]),F=e.node(e.predecessors(s)[0]);T.Z(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+P.order+F.order)/(E.weight+2),E.weight+=2}return E}function Wn(e,n){d.Z(e,function(t){t.vs=A.Z(t.vs.map(function(r){return n[r]?n[r].vs:r}))})}function Fn(e,n){O.Z(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Yn(e){var n=Ee(e),t=an(e,R.Z(1,n+1),"inEdges"),r=an(e,R.Z(n-1,-1,-1),"outEdges"),a=Pn(e);on(e,a);for(var i=Number.POSITIVE_INFINITY,o,s=0,h=0;h<4;++s,++h){Gn(s%2?t:r,s%4>=2),a=ue(e);var l=Tn(e,a);l<i&&(h=0,o=Ln.Z(a),i=l)}on(e,o)}function an(e,n,t){return Z.Z(n,function(r){return In(e,r,t)})}function Gn(e,n){var t=new W.k;d.Z(e,function(r){var a=r.graph().root,i=rn(r,a,t,n);d.Z(i.vs,function(o,s){r.node(o).order=s}),Nn(r,t,i.vs)})}function on(e,n){d.Z(n,function(t){d.Z(t,function(r,a){e.node(r).order=a})})}function jn(e){var n=Vn(e);d.Z(e.graph().dummyChains,function(t){for(var r=e.node(t),a=r.edgeObj,i=Un(e,n,a.v,a.w),o=i.path,s=i.lca,h=0,l=o[h],v=!0;t!==a.w;){if(r=e.node(t),v){for(;(l=o[h])!==s&&e.node(l).maxRank<r.rank;)h++;l===s&&(v=!1)}if(!v){for(;h<o.length-1&&e.node(l=o[h+1]).minRank<=r.rank;)h++;l=o[h]}e.setParent(t,l),t=e.successors(t)[0]}})}function Un(e,n,t,r){var a=[],i=[],o=Math.min(n[t].low,n[r].low),s=Math.max(n[t].lim,n[r].lim),h,l;h=t;do h=e.parent(h),a.push(h);while(h&&(n[h].low>o||s>n[h].lim));for(l=h,h=r;(h=e.parent(h))!==l;)i.push(h);return{path:a.concat(i.reverse()),lca:l}}function Vn(e){var n={},t=0;function r(a){var i=t;d.Z(e.children(a),r),n[a]={low:i,lim:t++}}return d.Z(e.children(),r),n}var Kn=b(44435);function zn(e,n){var t={};function r(a,i){var o=0,s=0,h=a.length,l=I.Z(i);return d.Z(i,function(v,E){var P=Xn(e,v),F=P?e.node(P).order:h;(P||v===l)&&(d.Z(i.slice(s,E+1),function(Y){d.Z(e.predecessors(Y),function($){var pe=e.node($),dn=pe.order;(dn<o||F<dn)&&!(pe.dummy&&e.node(Y).dummy)&&sn(t,$,Y)})}),s=E+1,o=F)}),i}return Ce.Z(n,r),t}function Hn(e,n){var t={};function r(i,o,s,h,l){var v;d.Z(R.Z(o,s),function(E){v=i[E],e.node(v).dummy&&d.Z(e.predecessors(v),function(P){var F=e.node(P);F.dummy&&(F.order<h||F.order>l)&&sn(t,P,v)})})}function a(i,o){var s=-1,h,l=0;return d.Z(o,function(v,E){if(e.node(v).dummy==="border"){var P=e.predecessors(v);P.length&&(h=e.node(P[0]).order,r(o,l,E,s,h),l=E,s=h)}r(o,l,o.length,h,i.length)}),o}return Ce.Z(n,a),t}function Xn(e,n){if(e.node(n).dummy)return te.Z(e.predecessors(n),function(t){return e.node(t).dummy})}function sn(e,n,t){if(n>t){var r=n;n=t,t=r}var a=e[n];a||(e[n]=a={}),a[t]=!0}function Qn(e,n,t){if(n>t){var r=n;n=t,t=r}return T.Z(e[n],t)}function $n(e,n,t,r){var a={},i={},o={};return d.Z(n,function(s){d.Z(s,function(h,l){a[h]=h,i[h]=h,o[h]=l})}),d.Z(n,function(s){var h=-1;d.Z(s,function(l){var v=r(l);if(v.length){v=ve.Z(v,function($){return o[$]});for(var E=(v.length-1)/2,P=Math.floor(E),F=Math.ceil(E);P<=F;++P){var Y=v[P];i[l]===l&&h<o[Y]&&!Qn(t,l,Y)&&(i[Y]=l,i[l]=a[l]=a[Y],h=o[Y])}}})}),{root:a,align:i}}function Jn(e,n,t,r,a){var i={},o=qn(e,n,t,a),s=a?"borderLeft":"borderRight";function h(E,P){for(var F=o.nodes(),Y=F.pop(),$={};Y;)$[Y]?E(Y):($[Y]=!0,F.push(Y),F=F.concat(P(Y))),Y=F.pop()}function l(E){i[E]=o.inEdges(E).reduce(function(P,F){return Math.max(P,i[F.v]+o.edge(F))},0)}function v(E){var P=o.outEdges(E).reduce(function(Y,$){return Math.min(Y,i[$.w]-o.edge($))},Number.POSITIVE_INFINITY),F=e.node(E);P!==Number.POSITIVE_INFINITY&&F.borderType!==s&&(i[E]=Math.max(i[E],P))}return h(l,o.predecessors.bind(o)),h(v,o.successors.bind(o)),d.Z(r,function(E){i[E]=i[t[E]]}),i}function qn(e,n,t,r){var a=new W.k,i=e.graph(),o=at(i.nodesep,i.edgesep,r);return d.Z(n,function(s){var h;d.Z(s,function(l){var v=t[l];if(a.setNode(v),h){var E=t[h],P=a.edge(E,v);a.setEdge(E,v,Math.max(o(e,l,h),P||0))}h=l})}),a}function et(e,n){return u.Z(he.Z(n),function(t){var r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return Kn.Z(t,function(i,o){var s=it(e,o)/2;r=Math.max(i+s,r),a=Math.min(i-s,a)}),r-a})}function nt(e,n){var t=he.Z(n),r=G.Z(t),a=x.Z(t);d.Z(["u","d"],function(i){d.Z(["l","r"],function(o){var s=i+o,h=e[s],l;if(h!==n){var v=he.Z(h);l=o==="l"?r-G.Z(v):a-x.Z(v),l&&(e[s]=B.Z(h,function(E){return E+l}))}})})}function tt(e,n){return B.Z(e.ul,function(t,r){if(n)return e[n.toLowerCase()][r];var a=ve.Z(Z.Z(e,r));return(a[1]+a[2])/2})}function rt(e){var n=ue(e),t=K.Z(zn(e,n),Hn(e,n)),r={},a;d.Z(["u","d"],function(o){a=o==="u"?n:he.Z(n).reverse(),d.Z(["l","r"],function(s){s==="r"&&(a=Z.Z(a,function(E){return he.Z(E).reverse()}));var h=(o==="u"?e.predecessors:e.successors).bind(e),l=$n(e,a,t,h),v=Jn(e,a,l.root,l.align,s==="r");s==="r"&&(v=B.Z(v,function(E){return-E})),r[o+s]=v})});var i=et(e,r);return nt(r,i),tt(r,e.graph().align)}function at(e,n,t){return function(r,a,i){var o=r.node(a),s=r.node(i),h=0,l;if(h+=o.width/2,T.Z(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":l=-o.width/2;break;case"r":l=o.width/2;break}if(l&&(h+=t?l:-l),l=0,h+=(o.dummy?n:e)/2,h+=(s.dummy?n:e)/2,h+=s.width/2,T.Z(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=s.width/2;break;case"r":l=-s.width/2;break}return l&&(h+=t?l:-l),l=0,h}}function it(e,n){return e.node(n).width}function ot(e){e=ge(e),st(e),d.Z(rt(e),function(n,t){e.node(t).x=n})}function st(e){var n=ue(e),t=e.graph().ranksep,r=0;d.Z(n,function(a){var i=x.Z(Z.Z(a,function(o){return e.node(o).height}));d.Z(a,function(o){e.node(o).y=r+i/2}),r+=i+t})}function dt(e,n){var t=n&&n.debugTiming?ce:Pe;t("layout",function(){var r=t(" buildLayoutGraph",function(){return wt(e)});t(" runLayout",function(){ut(r,t)}),t(" updateInputGraph",function(){ft(e,r)})})}function ut(e,n){n(" makeSpaceForEdgeLabels",function(){bt(e)}),n(" removeSelfEdges",function(){kt(e)}),n(" acyclic",function(){z(e)}),n(" nestingGraph.run",function(){En(e)}),n(" rank",function(){Zn(ge(e))}),n(" injectEdgeLabelProxies",function(){Et(e)}),n(" removeEmptyRanks",function(){we(e)}),n(" nestingGraph.cleanup",function(){_n(e)}),n(" normalizeRanks",function(){Te(e)}),n(" assignRankMinMax",function(){yt(e)}),n(" removeEdgeLabelProxies",function(){xt(e)}),n(" normalize.run",function(){Ve(e)}),n(" parentDummyChains",function(){jn(e)}),n(" addBorderSegments",function(){Re(e)}),n(" order",function(){Yn(e)}),n(" insertSelfEdges",function(){Tt(e)}),n(" adjustCoordinateSystem",function(){Oe(e)}),n(" position",function(){ot(e)}),n(" positionSelfEdges",function(){Mt(e)}),n(" removeBorderNodes",function(){Ct(e)}),n(" normalize.undo",function(){c(e)}),n(" fixupEdgeLabelCoords",function(){Nt(e)}),n(" undoCoordinateSystem",function(){De(e)}),n(" translateGraph",function(){_t(e)}),n(" assignNodeIntersects",function(){Lt(e)}),n(" reversePoints",function(){It(e)}),n(" acyclic.undo",function(){H(e)})}function ft(e,n){d.Z(e.nodes(),function(t){var r=e.node(t),a=n.node(t);r&&(r.x=a.x,r.y=a.y,n.children(t).length&&(r.width=a.width,r.height=a.height))}),d.Z(e.edges(),function(t){var r=e.edge(t),a=n.edge(t);r.points=a.points,T.Z(a,"x")&&(r.x=a.x,r.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var ht=["nodesep","edgesep","ranksep","marginx","marginy"],ct={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},lt=["acyclicer","ranker","rankdir","align"],vt=["width","height"],pt={width:0,height:0},gt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Zt=["labelpos"];function wt(e){var n=new W.k({multigraph:!0,compound:!0}),t=je(e.graph());return n.setGraph(K.Z({},ct,Ge(t,ht),f.Z(t,lt))),d.Z(e.nodes(),function(r){var a=je(e.node(r));n.setNode(r,g.Z(Ge(a,vt),pt)),n.setParent(r,e.parent(r))}),d.Z(e.edges(),function(r){var a=je(e.edge(r));n.setEdge(r,K.Z({},mt,Ge(a,gt),f.Z(a,Zt)))}),n}function bt(e){var n=e.graph();n.ranksep/=2,d.Z(e.edges(),function(t){var r=e.edge(t);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Et(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-r.rank)/2+r.rank,e:n};se(e,"edge-proxy",i,"_ep")}})}function yt(e){var n=0;d.Z(e.nodes(),function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=x.Z(n,r.maxRank))}),e.graph().maxRank=n}function xt(e){d.Z(e.nodes(),function(n){var t=e.node(n);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))})}function _t(e){var n=Number.POSITIVE_INFINITY,t=0,r=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,s=i.marginy||0;function h(l){var v=l.x,E=l.y,P=l.width,F=l.height;n=Math.min(n,v-P/2),t=Math.max(t,v+P/2),r=Math.min(r,E-F/2),a=Math.max(a,E+F/2)}d.Z(e.nodes(),function(l){h(e.node(l))}),d.Z(e.edges(),function(l){var v=e.edge(l);T.Z(v,"x")&&h(v)}),n-=o,r-=s,d.Z(e.nodes(),function(l){var v=e.node(l);v.x-=n,v.y-=r}),d.Z(e.edges(),function(l){var v=e.edge(l);d.Z(v.points,function(E){E.x-=n,E.y-=r}),T.Z(v,"x")&&(v.x-=n),T.Z(v,"y")&&(v.y-=r)}),i.width=t-n+o,i.height=a-r+s}function Lt(e){d.Z(e.edges(),function(n){var t=e.edge(n),r=e.node(n.v),a=e.node(n.w),i,o;t.points?(i=t.points[0],o=t.points[t.points.length-1]):(t.points=[],i=a,o=r),t.points.unshift(Ze(r,i)),t.points.push(Ze(a,o))})}function Nt(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(T.Z(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function It(e){d.Z(e.edges(),function(n){var t=e.edge(n);t.reversed&&t.points.reverse()})}function Ct(e){d.Z(e.nodes(),function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),a=e.node(t.borderBottom),i=e.node(I.Z(t.borderLeft)),o=e.node(I.Z(t.borderRight));t.width=Math.abs(o.x-i.x),t.height=Math.abs(a.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}}),d.Z(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function kt(e){d.Z(e.edges(),function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Tt(e){var n=ue(e);d.Z(n,function(t){var r=0;d.Z(t,function(a,i){var o=e.node(a);o.order=i+r,d.Z(o.selfEdges,function(s){se(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:i+ ++r,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function Mt(e){d.Z(e.nodes(),function(n){var t=e.node(n);if(t.dummy==="selfedge"){var r=e.node(t.e.v),a=r.x+r.width/2,i=r.y,o=t.x-a,s=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:a+2*o/3,y:i-s},{x:a+5*o/6,y:i-s},{x:a+o,y:i},{x:a+5*o/6,y:i+s},{x:a+2*o/3,y:i+s}],t.label.x=t.x,t.label.y=t.y}})}function Ge(e,n){return B.Z(f.Z(e,n),Number)}function je(e){var n={};return d.Z(e,function(t,r){n[r.toLowerCase()]=t}),n}},1926:function(oe,X,b){b.d(X,{k:function(){return q}});var d=b(17452),S=b(62002),T=b(73234),D=b(17179),A=b(13445),Z=b(79697),R=b(70870),W=b(49360),M=b(8500),L=b(34148),C=b(92344),V="\0",j="\0",J="";class q{constructor(f={}){this._isDirected=d.Z(f,"directed")?f.directed:!0,this._isMultigraph=d.Z(f,"multigraph")?f.multigraph:!1,this._isCompound=d.Z(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=S.Z(void 0),this._defaultEdgeLabelFn=S.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[j]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(f){return this._label=f,this}graph(){return this._label}setDefaultNodeLabel(f){return T.Z(f)||(f=S.Z(f)),this._defaultNodeLabelFn=f,this}nodeCount(){return this._nodeCount}nodes(){return D.Z(this._nodes)}sources(){var f=this;return A.Z(this.nodes(),function(g){return Z.Z(f._in[g])})}sinks(){var f=this;return A.Z(this.nodes(),function(g){return Z.Z(f._out[g])})}setNodes(f,g){var x=arguments,I=this;return R.Z(f,function(B){x.length>1?I.setNode(B,g):I.setNode(B)}),this}setNode(f,g){return d.Z(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=g),this):(this._nodes[f]=arguments.length>1?g:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=j,this._children[f]={},this._children[j][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)}node(f){return this._nodes[f]}hasNode(f){return d.Z(this._nodes,f)}removeNode(f){var g=this;if(d.Z(this._nodes,f)){var x=function(I){g.removeEdge(g._edgeObjs[I])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],R.Z(this.children(f),function(I){g.setParent(I)}),delete this._children[f]),R.Z(D.Z(this._in[f]),x),delete this._in[f],delete this._preds[f],R.Z(D.Z(this._out[f]),x),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this}setParent(f,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(W.Z(g))g=j;else{g+="";for(var x=g;!W.Z(x);x=this.parent(x))if(x===f)throw new Error("Setting "+g+" as parent of "+f+" would create a cycle");this.setNode(g)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=g,this._children[g][f]=!0,this}_removeFromParentsChildList(f){delete this._children[this._parent[f]][f]}parent(f){if(this._isCompound){var g=this._parent[f];if(g!==j)return g}}children(f){if(W.Z(f)&&(f=j),this._isCompound){var g=this._children[f];if(g)return D.Z(g)}else{if(f===j)return this.nodes();if(this.hasNode(f))return[]}}predecessors(f){var g=this._preds[f];if(g)return D.Z(g)}successors(f){var g=this._sucs[f];if(g)return D.Z(g)}neighbors(f){var g=this.predecessors(f);if(g)return M.Z(g,this.successors(f))}isLeaf(f){var g;return this.isDirected()?g=this.successors(f):g=this.neighbors(f),g.length===0}filterNodes(f){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var x=this;R.Z(this._nodes,function(O,G){f(G)&&g.setNode(G,O)}),R.Z(this._edgeObjs,function(O){g.hasNode(O.v)&&g.hasNode(O.w)&&g.setEdge(O,x.edge(O))});var I={};function B(O){var G=x.parent(O);return G===void 0||g.hasNode(G)?(I[O]=G,G):G in I?I[G]:B(G)}return this._isCompound&&R.Z(g.nodes(),function(O){g.setParent(O,B(O))}),g}setDefaultEdgeLabel(f){return T.Z(f)||(f=S.Z(f)),this._defaultEdgeLabelFn=f,this}edgeCount(){return this._edgeCount}edges(){return L.Z(this._edgeObjs)}setPath(f,g){var x=this,I=arguments;return C.Z(f,function(B,O){return I.length>1?x.setEdge(B,O,g):x.setEdge(B,O),O}),this}setEdge(){var f,g,x,I,B=!1,O=arguments[0];typeof O=="object"&&O!==null&&"v"in O?(f=O.v,g=O.w,x=O.name,arguments.length===2&&(I=arguments[1],B=!0)):(f=O,g=arguments[1],x=arguments[3],arguments.length>2&&(I=arguments[2],B=!0)),f=""+f,g=""+g,W.Z(x)||(x=""+x);var G=z(this._isDirected,f,g,x);if(d.Z(this._edgeLabels,G))return B&&(this._edgeLabels[G]=I),this;if(!W.Z(x)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(g),this._edgeLabels[G]=B?I:this._defaultEdgeLabelFn(f,g,x);var re=ee(this._isDirected,f,g,x);return f=re.v,g=re.w,Object.freeze(re),this._edgeObjs[G]=re,ne(this._preds[g],f),ne(this._sucs[f],g),this._in[g][G]=re,this._out[f][G]=re,this._edgeCount++,this}edge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x);return this._edgeLabels[I]}hasEdge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x);return d.Z(this._edgeLabels,I)}removeEdge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x),B=this._edgeObjs[I];return B&&(f=B.v,g=B.w,delete this._edgeLabels[I],delete this._edgeObjs[I],Q(this._preds[g],f),Q(this._sucs[f],g),delete this._in[g][I],delete this._out[f][I],this._edgeCount--),this}inEdges(f,g){var x=this._in[f];if(x){var I=L.Z(x);return g?A.Z(I,function(B){return B.v===g}):I}}outEdges(f,g){var x=this._out[f];if(x){var I=L.Z(x);return g?A.Z(I,function(B){return B.w===g}):I}}nodeEdges(f,g){var x=this.inEdges(f,g);if(x)return x.concat(this.outEdges(f,g))}}q.prototype._nodeCount=0,q.prototype._edgeCount=0;function ne(K,f){K[f]?K[f]++:K[f]=1}function Q(K,f){--K[f]||delete K[f]}function z(K,f,g,x){var I=""+f,B=""+g;if(!K&&I>B){var O=I;I=B,B=O}return I+J+B+J+(W.Z(x)?V:x)}function ee(K,f,g,x){var I=""+f,B=""+g;if(!K&&I>B){var O=I;I=B,B=O}var G={v:I,w:B};return x&&(G.name=x),G}function H(K,f){return z(K,f.v,f.w,f.name)}},45625:function(oe,X,b){b.d(X,{k:function(){return d.k}});var d=b(1926);const S="2.1.9-pre"},46060:function(oe,X,b){b.d(X,{c:function(){return A}});var d=b(49360),S=b(92346),T=b(43836),D=b(1926);function A(M){var L={options:{directed:M.isDirected(),multigraph:M.isMultigraph(),compound:M.isCompound()},nodes:Z(M),edges:R(M)};return d.Z(M.graph())||(L.value=S.Z(M.graph())),L}function Z(M){return T.Z(M.nodes(),function(L){var C=M.node(L),V=M.parent(L),j={v:L};return d.Z(C)||(j.value=C),d.Z(V)||(j.parent=V),j})}function R(M){return T.Z(M.edges(),function(L){var C=M.edge(L),V={v:L.v,w:L.w};return d.Z(L.name)||(V.name=L.name),d.Z(C)||(V.value=C),V})}function W(M){var L=new Graph(M.options).setGraph(M.value);return _.each(M.nodes,function(C){L.setNode(C.v,C.value),C.parent&&L.setParent(C.v,C.parent)}),_.each(M.edges,function(C){L.setEdge({v:C.v,w:C.w,name:C.name},C.value)}),L}},91518:function(oe,X,b){b.d(X,{sY:function(){return xe}});var d=b(23198),S=b(17452),T=b(3688),D=b(70870),A=b(99791),Z=b(96225),R={normal:M,vee:L,undirected:C};function W(p){R=p}function M(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}function L(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}function C(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}var V=b(43349);function j(p,c){var u=p;return u.node().appendChild(c.label),Z.bg(u,c.labelStyle),u}function J(p,c){for(var u=p.append("text"),m=q(c.label).split(`
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2300],{23352:function(oe,X,b){b.d(X,{A:function(){return T}});function d(D,A,Z,R){var W,M,L,C,V,j,J,q,ne,Q,z,ee,H,K,f;if(W=A.y-D.y,L=D.x-A.x,V=A.x*D.y-D.x*A.y,ne=W*Z.x+L*Z.y+V,Q=W*R.x+L*R.y+V,!(ne!==0&&Q!==0&&S(ne,Q))&&(M=R.y-Z.y,C=Z.x-R.x,j=R.x*Z.y-Z.x*R.y,J=M*D.x+C*D.y+j,q=M*A.x+C*A.y+j,!(J!==0&&q!==0&&S(J,q))&&(z=W*C-M*L,z!==0)))return ee=Math.abs(z/2),H=L*j-C*V,K=H<0?(H-ee)/z:(H+ee)/z,H=M*V-W*j,f=H<0?(H-ee)/z:(H+ee)/z,{x:K,y:f}}function S(D,A){return D*A>0}function T(D,A,Z){var R=D.x,W=D.y,M=[],L=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY;A.forEach(function(z){L=Math.min(L,z.x),C=Math.min(C,z.y)});for(var V=R-D.width/2-L,j=W-D.height/2-C,J=0;J<A.length;J++){var q=A[J],ne=A[J<A.length-1?J+1:0],Q=d(D,Z,{x:V+q.x,y:j+q.y},{x:V+ne.x,y:j+ne.y});Q&&M.push(Q)}return M.length?(M.length>1&&M.sort(function(z,ee){var H=z.x-Z.x,K=z.y-Z.y,f=Math.sqrt(H*H+K*K),g=ee.x-Z.x,x=ee.y-Z.y,I=Math.sqrt(g*g+x*x);return f<I?-1:f===I?0:1}),M[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",D),D)}},22930:function(oe,X,b){b.d(X,{q:function(){return d}});function d(S,T){var D=S.x,A=S.y,Z=T.x-D,R=T.y-A,W=S.width/2,M=S.height/2,L,C;return Math.abs(R)*W>Math.abs(Z)*M?(R<0&&(M=-M),L=R===0?0:M*Z/R,C=M):(Z<0&&(W=-W),L=W,C=Z===0?0:W*R/Z),{x:D+L,y:A+C}}},43349:function(oe,X,b){b.d(X,{a:function(){return S}});var d=b(96225);function S(T,D){var A=T.append("foreignObject").attr("width","100000"),Z=A.append("xhtml:div");Z.attr("xmlns","http://www.w3.org/1999/xhtml");var R=D.label;switch(typeof R){case"function":Z.insert(R);break;case"object":Z.insert(function(){return R});break;default:Z.html(R)}d.bg(Z,D.labelStyle),Z.style("display","inline-block"),Z.style("white-space","nowrap");var W=Z.node().getBoundingClientRect();return A.attr("width",W.width).attr("height",W.height),A}},96225:function(oe,X,b){b.d(X,{$p:function(){return W},O1:function(){return D},WR:function(){return M},bF:function(){return T},bg:function(){return R}});var d=b(37514),S=b(73234);function T(L,C){return!!L.children(C).length}function D(L){return Z(L.v)+":"+Z(L.w)+":"+Z(L.name)}var A=/:/g;function Z(L){return L?String(L).replace(A,"\\:"):""}function R(L,C){C&&L.attr("style",C)}function W(L,C,V){C&&L.attr("class",C).attr("class",V+" "+L.attr("class"))}function M(L,C){var V=C.graph();if(d.Z(V)){var j=V.transition;if(S.Z(j))return j(L)}return L}},99791:function(oe,X,b){b.d(X,{bK:function(){return dt}});var d=b(70870),S=b(66749),T=b(17452),D=b(62002),A=b(27961),Z=b(43836),R=b(74379),W=b(45625);class M{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,t=n._prev;if(t!==n)return L(t),t}enqueue(n){var t=this._sentinel;n._prev&&n._next&&L(n),n._next=t._next,t._next._prev=n,t._next=n,n._prev=t}toString(){for(var n=[],t=this._sentinel,r=t._prev;r!==t;)n.push(JSON.stringify(r,C)),r=r._prev;return"["+n.join(", ")+"]"}}function L(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function C(e,n){if(e!=="_next"&&e!=="_prev")return n}var V=D.Z(1);function j(e,n){if(e.nodeCount()<=1)return[];var t=ne(e,n||V),r=J(t.graph,t.buckets,t.zeroIdx);return A.Z(Z.Z(r,function(a){return e.outEdges(a.v,a.w)}))}function J(e,n,t){for(var r=[],a=n[n.length-1],i=n[0],o;e.nodeCount();){for(;o=i.dequeue();)q(e,n,t,o);for(;o=a.dequeue();)q(e,n,t,o);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(o=n[s].dequeue(),o){r=r.concat(q(e,n,t,o,!0));break}}}return r}function q(e,n,t,r,a){var i=a?[]:void 0;return d.Z(e.inEdges(r.v),function(o){var s=e.edge(o),h=e.node(o.v);a&&i.push({v:o.v,w:o.w}),h.out-=s,Q(n,t,h)}),d.Z(e.outEdges(r.v),function(o){var s=e.edge(o),h=o.w,l=e.node(h);l.in-=s,Q(n,t,l)}),e.removeNode(r.v),i}function ne(e,n){var t=new W.k,r=0,a=0;d.Z(e.nodes(),function(s){t.setNode(s,{v:s,in:0,out:0})}),d.Z(e.edges(),function(s){var h=t.edge(s.v,s.w)||0,l=n(s),v=h+l;t.setEdge(s.v,s.w,v),a=Math.max(a,t.node(s.v).out+=l),r=Math.max(r,t.node(s.w).in+=l)});var i=R.Z(a+r+3).map(function(){return new M}),o=r+1;return d.Z(t.nodes(),function(s){Q(i,o,t.node(s))}),{graph:t,buckets:i,zeroIdx:o}}function Q(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function z(e){var n=e.graph().acyclicer==="greedy"?j(e,t(e)):ee(e);d.Z(n,function(r){var a=e.edge(r);e.removeEdge(r),a.forwardName=r.name,a.reversed=!0,e.setEdge(r.w,r.v,a,S.Z("rev"))});function t(r){return function(a){return r.edge(a).weight}}}function ee(e){var n=[],t={},r={};function a(i){T.Z(r,i)||(r[i]=!0,t[i]=!0,d.Z(e.outEdges(i),function(o){T.Z(t,o.w)?n.push(o):a(o.w)}),delete t[i])}return d.Z(e.nodes(),a),n}function H(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}})}var K=b(59236),f=b(61666),g=b(3688),x=b(61303),I=b(935),B=b(48392),O=b(49360),G=b(3729),re=b(25222);function se(e,n,t,r){var a;do a=S.Z(r);while(e.hasNode(a));return t.dummy=n,e.setNode(a,t),a}function ke(e){var n=new W.k().setGraph(e.graph());return d.Z(e.nodes(),function(t){n.setNode(t,e.node(t))}),d.Z(e.edges(),function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},a=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+a.weight,minlen:Math.max(r.minlen,a.minlen)})}),n}function ge(e){var n=new W.k({multigraph:e.isMultigraph()}).setGraph(e.graph());return d.Z(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),d.Z(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function me(e){var n=_.map(e.nodes(),function(t){var r={};return _.forEach(e.outEdges(t),function(a){r[a.w]=(r[a.w]||0)+e.edge(a).weight}),r});return _.zipObject(e.nodes(),n)}function Ue(e){var n=_.map(e.nodes(),function(t){var r={};return _.forEach(e.inEdges(t),function(a){r[a.v]=(r[a.v]||0)+e.edge(a).weight}),r});return _.zipObject(e.nodes(),n)}function Ze(e,n){var t=e.x,r=e.y,a=n.x-t,i=n.y-r,o=e.width/2,s=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var h,l;return Math.abs(i)*o>Math.abs(a)*s?(i<0&&(s=-s),h=s*a/i,l=s):(a<0&&(o=-o),h=o,l=o*i/a),{x:t+h,y:r+l}}function ue(e){var n=Z.Z(R.Z(Ee(e)+1),function(){return[]});return d.Z(e.nodes(),function(t){var r=e.node(t),a=r.rank;O.Z(a)||(n[a][r.order]=t)}),n}function Te(e){var n=G.Z(Z.Z(e.nodes(),function(t){return e.node(t).rank}));d.Z(e.nodes(),function(t){var r=e.node(t);T.Z(r,"rank")&&(r.rank-=n)})}function we(e){var n=G.Z(Z.Z(e.nodes(),function(i){return e.node(i).rank})),t=[];d.Z(e.nodes(),function(i){var o=e.node(i).rank-n;t[o]||(t[o]=[]),t[o].push(i)});var r=0,a=e.graph().nodeRankFactor;d.Z(t,function(i,o){O.Z(i)&&o%a!==0?--r:r&&d.Z(i,function(s){e.node(s).rank+=r})})}function be(e,n,t,r){var a={width:0,height:0};return arguments.length>=4&&(a.rank=t,a.order=r),se(e,"border",a,n)}function Ee(e){return x.Z(Z.Z(e.nodes(),function(n){var t=e.node(n).rank;if(!O.Z(t))return t}))}function Me(e,n){var t={lhs:[],rhs:[]};return d.Z(e,function(r){n(r)?t.lhs.push(r):t.rhs.push(r)}),t}function ce(e,n){var t=re.Z();try{return n()}finally{console.log(e+" time: "+(re.Z()-t)+"ms")}}function Pe(e,n){return n()}function Re(e){function n(t){var r=e.children(t),a=e.node(t);if(r.length&&d.Z(r,n),T.Z(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;i<o;++i)ye(e,"borderLeft","_bl",t,a,i),ye(e,"borderRight","_br",t,a,i)}}d.Z(e.children(),n)}function ye(e,n,t,r,a,i){var o={width:0,height:0,rank:i,borderType:n},s=a[n][i-1],h=se(e,"border",o,t);a[n][i]=h,e.setParent(h,r),s&&e.setEdge(s,h,{weight:1})}function Oe(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&xe(e)}function De(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&Se(e),(n==="lr"||n==="rl")&&(Ae(e),xe(e))}function xe(e){d.Z(e.nodes(),function(n){_e(e.node(n))}),d.Z(e.edges(),function(n){_e(e.edge(n))})}function _e(e){var n=e.width;e.width=e.height,e.height=n}function Se(e){d.Z(e.nodes(),function(n){le(e.node(n))}),d.Z(e.edges(),function(n){var t=e.edge(n);d.Z(t.points,le),T.Z(t,"y")&&le(t)})}function le(e){e.y=-e.y}function Ae(e){d.Z(e.nodes(),function(n){ie(e.node(n))}),d.Z(e.edges(),function(n){var t=e.edge(n);d.Z(t.points,ie),T.Z(t,"x")&&ie(t)})}function ie(e){var n=e.x;e.x=e.y,e.y=n}function Ve(e){e.graph().dummyChains=[],d.Z(e.edges(),function(n){p(e,n)})}function p(e,n){var t=n.v,r=e.node(t).rank,a=n.w,i=e.node(a).rank,o=n.name,s=e.edge(n),h=s.labelRank;if(i!==r+1){e.removeEdge(n);var l,v,E;for(E=0,++r;r<i;++E,++r)s.points=[],v={width:0,height:0,edgeLabel:s,edgeObj:n,rank:r},l=se(e,"edge",v,"_d"),r===h&&(v.width=s.width,v.height=s.height,v.dummy="edge-label",v.labelpos=s.labelpos),e.setEdge(t,l,{weight:s.weight},o),E===0&&e.graph().dummyChains.push(l),t=l;e.setEdge(t,a,{weight:s.weight},o)}}function c(e){d.Z(e.graph().dummyChains,function(n){var t=e.node(n),r=t.edgeLabel,a;for(e.setEdge(t.edgeObj,r);t.dummy;)a=e.successors(n)[0],e.removeNode(n),r.points.push({x:t.x,y:t.y}),t.dummy==="edge-label"&&(r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height),n=a,t=e.node(n)})}var u=b(17948);function m(e){var n={};function t(r){var a=e.node(r);if(T.Z(n,r))return a.rank;n[r]=!0;var i=G.Z(Z.Z(e.outEdges(r),function(o){return t(o.w)-e.edge(o).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}d.Z(e.sources(),t)}function w(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function y(e){var n=new W.k({directed:!1}),t=e.nodes()[0],r=e.nodeCount();n.setNode(t,{});for(var a,i;k(n,e)<r;)a=N(n,e),i=n.hasNode(a.v)?w(e,a):-w(e,a),U(n,e,i);return n}function k(e,n){function t(r){d.Z(n.nodeEdges(r),function(a){var i=a.v,o=r===i?a.w:i;!e.hasNode(o)&&!w(n,a)&&(e.setNode(o,{}),e.setEdge(r,o,{}),t(o))})}return d.Z(e.nodes(),t),e.nodeCount()}function N(e,n){return u.Z(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return w(n,t)})}function U(e,n,t){d.Z(e.nodes(),function(r){n.node(r).rank+=t})}var te=b(86288),ae=b(13445),Be=D.Z(1);function fe(e,n,t,r){return Le(e,String(n),t||Be,r||function(a){return e.outEdges(a)})}function Le(e,n,t,r){var a={},i=new PriorityQueue,o,s,h=function(l){var v=l.v!==o?l.v:l.w,E=a[v],P=t(l),F=s.distance+P;if(P<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+l+" Weight: "+P);F<E.distance&&(E.distance=F,E.predecessor=o,i.decrease(v,F))};for(e.nodes().forEach(function(l){var v=l===n?0:Number.POSITIVE_INFINITY;a[l]={distance:v},i.add(l,v)});i.size()>0&&(o=i.removeMin(),s=a[o],s.distance!==Number.POSITIVE_INFINITY);)r(o).forEach(h);return a}function We(e,n,t){return _.transform(e.nodes(),function(r,a){r[a]=dijkstra(e,a,n,t)},{})}var Ne=D.Z(1);function Pt(e,n,t){return un(e,n||Ne,t||function(r){return e.outEdges(r)})}function un(e,n,t){var r={},a=e.nodes();return a.forEach(function(i){r[i]={},r[i][i]={distance:0},a.forEach(function(o){i!==o&&(r[i][o]={distance:Number.POSITIVE_INFINITY})}),t(i).forEach(function(o){var s=o.v===i?o.w:o.v,h=n(o);r[i][s]={distance:h,predecessor:i}})}),a.forEach(function(i){var o=r[i];a.forEach(function(s){var h=r[s];a.forEach(function(l){var v=h[i],E=o[l],P=h[l],F=v.distance+E.distance;F<P.distance&&(P.distance=F,P.predecessor=E.predecessor)})})}),r}var fn=b(42199);hn.CycleException=Ie;function hn(e){var n={},t={},r=[];function a(i){if(T.Z(t,i))throw new Ie;T.Z(n,i)||(t[i]=!0,n[i]=!0,d.Z(e.predecessors(i),a),delete t[i],r.push(i))}if(d.Z(e.sinks(),a),fn.Z(n)!==e.nodeCount())throw new Ie;return r}function Ie(){}Ie.prototype=new Error;function Rt(e){try{topsort(e)}catch(n){if(n instanceof CycleException)return!1;throw n}return!0}var cn=b(27771);function Ke(e,n,t){cn.Z(n)||(n=[n]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return d.Z(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);ze(e,o,t==="post",i,r,a)}),a}function ze(e,n,t,r,a,i){T.Z(r,n)||(r[n]=!0,t||i.push(n),d.Z(a(n),function(o){ze(e,o,t,r,a,i)}),t&&i.push(n))}function ln(e,n){return Ke(e,n,"post")}function vn(e,n){return Ke(e,n,"pre")}var Ot=b(1926);function Dt(e,n){var t=new Graph,r={},a=new PriorityQueue,i;function o(h){var l=h.v===i?h.w:h.v,v=a.priority(l);if(v!==void 0){var E=n(h);E<v&&(r[l]=i,a.decrease(l,E))}}if(e.nodeCount()===0)return t;_.each(e.nodes(),function(h){a.add(h,Number.POSITIVE_INFINITY),t.setNode(h)}),a.decrease(e.nodes()[0],0);for(var s=!1;a.size()>0;){if(i=a.removeMin(),_.has(r,i))t.setEdge(i,r[i]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(i).forEach(o)}return t}de.initLowLimValues=Ye,de.initCutValues=Fe,de.calcCutValue=He,de.leaveEdge=Qe,de.enterEdge=$e,de.exchangeEdges=Je;function de(e){e=ke(e),m(e);var n=y(e);Ye(n),Fe(n,e);for(var t,r;t=Qe(n);)r=$e(n,e,t),Je(n,e,t,r)}function Fe(e,n){var t=ln(e,e.nodes());t=t.slice(0,t.length-1),d.Z(t,function(r){pn(e,n,r)})}function pn(e,n,t){var r=e.node(t),a=r.parent;e.edge(t,a).cutvalue=He(e,n,t)}function He(e,n,t){var r=e.node(t),a=r.parent,i=!0,o=n.edge(t,a),s=0;return o||(i=!1,o=n.edge(a,t)),s=o.weight,d.Z(n.nodeEdges(t),function(h){var l=h.v===t,v=l?h.w:h.v;if(v!==a){var E=l===i,P=n.edge(h).weight;if(s+=E?P:-P,mn(e,t,v)){var F=e.edge(t,v).cutvalue;s+=E?-F:F}}}),s}function Ye(e,n){arguments.length<2&&(n=e.nodes()[0]),Xe(e,{},1,n)}function Xe(e,n,t,r,a){var i=t,o=e.node(r);return n[r]=!0,d.Z(e.neighbors(r),function(s){T.Z(n,s)||(t=Xe(e,n,t,s,r))}),o.low=i,o.lim=t++,a?o.parent=a:delete o.parent,t}function Qe(e){return te.Z(e.edges(),function(n){return e.edge(n).cutvalue<0})}function $e(e,n,t){var r=t.v,a=t.w;n.hasEdge(r,a)||(r=t.w,a=t.v);var i=e.node(r),o=e.node(a),s=i,h=!1;i.lim>o.lim&&(s=o,h=!0);var l=ae.Z(n.edges(),function(v){return h===qe(e,e.node(v.v),s)&&h!==qe(e,e.node(v.w),s)});return u.Z(l,function(v){return w(n,v)})}function Je(e,n,t,r){var a=t.v,i=t.w;e.removeEdge(a,i),e.setEdge(r.v,r.w,{}),Ye(e),Fe(e,n),gn(e,n)}function gn(e,n){var t=te.Z(e.nodes(),function(a){return!n.node(a).parent}),r=vn(e,t);r=r.slice(1),d.Z(r,function(a){var i=e.node(a).parent,o=n.edge(a,i),s=!1;o||(o=n.edge(i,a),s=!0),n.node(a).rank=n.node(i).rank+(s?o.minlen:-o.minlen)})}function mn(e,n,t){return e.hasEdge(n,t)}function qe(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function Zn(e){switch(e.graph().ranker){case"network-simplex":en(e);break;case"tight-tree":bn(e);break;case"longest-path":wn(e);break;default:en(e)}}var wn=m;function bn(e){m(e),y(e)}function en(e){de(e)}var he=b(34148),Ce=b(92344);function En(e){var n=se(e,"root",{},"_root"),t=yn(e),r=x.Z(he.Z(t))-1,a=2*r+1;e.graph().nestingRoot=n,d.Z(e.edges(),function(o){e.edge(o).minlen*=a});var i=xn(e)+1;d.Z(e.children(),function(o){nn(e,n,a,i,r,t,o)}),e.graph().nodeRankFactor=a}function nn(e,n,t,r,a,i,o){var s=e.children(o);if(!s.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:t});return}var h=be(e,"_bt"),l=be(e,"_bb"),v=e.node(o);e.setParent(h,o),v.borderTop=h,e.setParent(l,o),v.borderBottom=l,d.Z(s,function(E){nn(e,n,t,r,a,i,E);var P=e.node(E),F=P.borderTop?P.borderTop:E,Y=P.borderBottom?P.borderBottom:E,$=P.borderTop?r:2*r,pe=F!==Y?1:a-i[o]+1;e.setEdge(h,F,{weight:$,minlen:pe,nestingEdge:!0}),e.setEdge(Y,l,{weight:$,minlen:pe,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,h,{weight:0,minlen:a+i[o]})}function yn(e){var n={};function t(r,a){var i=e.children(r);i&&i.length&&d.Z(i,function(o){t(o,a+1)}),n[r]=a}return d.Z(e.children(),function(r){t(r,1)}),n}function xn(e){return Ce.Z(e.edges(),function(n,t){return n+e.edge(t).weight},0)}function _n(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,d.Z(e.edges(),function(t){var r=e.edge(t);r.nestingEdge&&e.removeEdge(t)})}var Ln=b(86295);function Nn(e,n,t){var r={},a;d.Z(t,function(i){for(var o=e.parent(i),s,h;o;){if(s=e.parent(o),s?(h=r[s],r[s]=o):(h=a,a=o),h&&h!==o){n.setEdge(h,o);return}o=s}})}function In(e,n,t){var r=Cn(e),a=new W.k({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(i){return e.node(i)});return d.Z(e.nodes(),function(i){var o=e.node(i),s=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,s||r),d.Z(e[t](i),function(h){var l=h.v===i?h.w:h.v,v=a.edge(l,i),E=O.Z(v)?0:v.weight;a.setEdge(l,i,{weight:e.edge(h).weight+E})}),T.Z(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function Cn(e){for(var n;e.hasNode(n=S.Z("_root")););return n}var kn=b(62743),ve=b(16406);function Tn(e,n){for(var t=0,r=1;r<n.length;++r)t+=Mn(e,n[r-1],n[r]);return t}function Mn(e,n,t){for(var r=kn.Z(t,Z.Z(t,function(l,v){return v})),a=A.Z(Z.Z(n,function(l){return ve.Z(Z.Z(e.outEdges(l),function(v){return{pos:r[v.w],weight:e.edge(v).weight}}),"pos")})),i=1;i<t.length;)i<<=1;var o=2*i-1;i-=1;var s=Z.Z(new Array(o),function(){return 0}),h=0;return d.Z(a.forEach(function(l){var v=l.pos+i;s[v]+=l.weight;for(var E=0;v>0;)v%2&&(E+=s[v+1]),v=v-1>>1,s[v]+=l.weight;h+=l.weight*E})),h}function Pn(e){var n={},t=ae.Z(e.nodes(),function(s){return!e.children(s).length}),r=x.Z(Z.Z(t,function(s){return e.node(s).rank})),a=Z.Z(R.Z(r+1),function(){return[]});function i(s){if(!T.Z(n,s)){n[s]=!0;var h=e.node(s);a[h.rank].push(s),d.Z(e.successors(s),i)}}var o=ve.Z(t,function(s){return e.node(s).rank});return d.Z(o,i),a}function Rn(e,n){return Z.Z(n,function(t){var r=e.inEdges(t);if(r.length){var a=Ce.Z(r,function(i,o){var s=e.edge(o),h=e.node(o.v);return{sum:i.sum+s.weight*h.order,weight:i.weight+s.weight}},{sum:0,weight:0});return{v:t,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:t}})}function On(e,n){var t={};d.Z(e,function(a,i){var o=t[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};O.Z(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),d.Z(n.edges(),function(a){var i=t[a.v],o=t[a.w];!O.Z(i)&&!O.Z(o)&&(o.indegree++,i.out.push(t[a.w]))});var r=ae.Z(t,function(a){return!a.indegree});return Dn(r)}function Dn(e){var n=[];function t(i){return function(o){o.merged||(O.Z(o.barycenter)||O.Z(i.barycenter)||o.barycenter>=i.barycenter)&&Sn(i,o)}}function r(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),d.Z(a.in.reverse(),t(a)),d.Z(a.out,r(a))}return Z.Z(ae.Z(n,function(i){return!i.merged}),function(i){return f.Z(i,["vs","i","barycenter","weight"])})}function Sn(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight),n.weight&&(t+=n.barycenter*n.weight,r+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}function An(e,n){var t=Me(e,function(v){return T.Z(v,"barycenter")}),r=t.lhs,a=ve.Z(t.rhs,function(v){return-v.i}),i=[],o=0,s=0,h=0;r.sort(Bn(!!n)),h=tn(i,a,h),d.Z(r,function(v){h+=v.vs.length,i.push(v.vs),o+=v.barycenter*v.weight,s+=v.weight,h=tn(i,a,h)});var l={vs:A.Z(i)};return s&&(l.barycenter=o/s,l.weight=s),l}function tn(e,n,t){for(var r;n.length&&(r=I.Z(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function Bn(e){return function(n,t){return n.barycenter<t.barycenter?-1:n.barycenter>t.barycenter?1:e?t.i-n.i:n.i-t.i}}function rn(e,n,t,r){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,s=i?i.borderRight:void 0,h={};o&&(a=ae.Z(a,function(Y){return Y!==o&&Y!==s}));var l=Rn(e,a);d.Z(l,function(Y){if(e.children(Y.v).length){var $=rn(e,Y.v,t,r);h[Y.v]=$,T.Z($,"barycenter")&&Fn(Y,$)}});var v=On(l,t);Wn(v,h);var E=An(v,r);if(o&&(E.vs=A.Z([o,E.vs,s]),e.predecessors(o).length)){var P=e.node(e.predecessors(o)[0]),F=e.node(e.predecessors(s)[0]);T.Z(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+P.order+F.order)/(E.weight+2),E.weight+=2}return E}function Wn(e,n){d.Z(e,function(t){t.vs=A.Z(t.vs.map(function(r){return n[r]?n[r].vs:r}))})}function Fn(e,n){O.Z(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Yn(e){var n=Ee(e),t=an(e,R.Z(1,n+1),"inEdges"),r=an(e,R.Z(n-1,-1,-1),"outEdges"),a=Pn(e);on(e,a);for(var i=Number.POSITIVE_INFINITY,o,s=0,h=0;h<4;++s,++h){Gn(s%2?t:r,s%4>=2),a=ue(e);var l=Tn(e,a);l<i&&(h=0,o=Ln.Z(a),i=l)}on(e,o)}function an(e,n,t){return Z.Z(n,function(r){return In(e,r,t)})}function Gn(e,n){var t=new W.k;d.Z(e,function(r){var a=r.graph().root,i=rn(r,a,t,n);d.Z(i.vs,function(o,s){r.node(o).order=s}),Nn(r,t,i.vs)})}function on(e,n){d.Z(n,function(t){d.Z(t,function(r,a){e.node(r).order=a})})}function jn(e){var n=Vn(e);d.Z(e.graph().dummyChains,function(t){for(var r=e.node(t),a=r.edgeObj,i=Un(e,n,a.v,a.w),o=i.path,s=i.lca,h=0,l=o[h],v=!0;t!==a.w;){if(r=e.node(t),v){for(;(l=o[h])!==s&&e.node(l).maxRank<r.rank;)h++;l===s&&(v=!1)}if(!v){for(;h<o.length-1&&e.node(l=o[h+1]).minRank<=r.rank;)h++;l=o[h]}e.setParent(t,l),t=e.successors(t)[0]}})}function Un(e,n,t,r){var a=[],i=[],o=Math.min(n[t].low,n[r].low),s=Math.max(n[t].lim,n[r].lim),h,l;h=t;do h=e.parent(h),a.push(h);while(h&&(n[h].low>o||s>n[h].lim));for(l=h,h=r;(h=e.parent(h))!==l;)i.push(h);return{path:a.concat(i.reverse()),lca:l}}function Vn(e){var n={},t=0;function r(a){var i=t;d.Z(e.children(a),r),n[a]={low:i,lim:t++}}return d.Z(e.children(),r),n}var Kn=b(44435);function zn(e,n){var t={};function r(a,i){var o=0,s=0,h=a.length,l=I.Z(i);return d.Z(i,function(v,E){var P=Xn(e,v),F=P?e.node(P).order:h;(P||v===l)&&(d.Z(i.slice(s,E+1),function(Y){d.Z(e.predecessors(Y),function($){var pe=e.node($),dn=pe.order;(dn<o||F<dn)&&!(pe.dummy&&e.node(Y).dummy)&&sn(t,$,Y)})}),s=E+1,o=F)}),i}return Ce.Z(n,r),t}function Hn(e,n){var t={};function r(i,o,s,h,l){var v;d.Z(R.Z(o,s),function(E){v=i[E],e.node(v).dummy&&d.Z(e.predecessors(v),function(P){var F=e.node(P);F.dummy&&(F.order<h||F.order>l)&&sn(t,P,v)})})}function a(i,o){var s=-1,h,l=0;return d.Z(o,function(v,E){if(e.node(v).dummy==="border"){var P=e.predecessors(v);P.length&&(h=e.node(P[0]).order,r(o,l,E,s,h),l=E,s=h)}r(o,l,o.length,h,i.length)}),o}return Ce.Z(n,a),t}function Xn(e,n){if(e.node(n).dummy)return te.Z(e.predecessors(n),function(t){return e.node(t).dummy})}function sn(e,n,t){if(n>t){var r=n;n=t,t=r}var a=e[n];a||(e[n]=a={}),a[t]=!0}function Qn(e,n,t){if(n>t){var r=n;n=t,t=r}return T.Z(e[n],t)}function $n(e,n,t,r){var a={},i={},o={};return d.Z(n,function(s){d.Z(s,function(h,l){a[h]=h,i[h]=h,o[h]=l})}),d.Z(n,function(s){var h=-1;d.Z(s,function(l){var v=r(l);if(v.length){v=ve.Z(v,function($){return o[$]});for(var E=(v.length-1)/2,P=Math.floor(E),F=Math.ceil(E);P<=F;++P){var Y=v[P];i[l]===l&&h<o[Y]&&!Qn(t,l,Y)&&(i[Y]=l,i[l]=a[l]=a[Y],h=o[Y])}}})}),{root:a,align:i}}function Jn(e,n,t,r,a){var i={},o=qn(e,n,t,a),s=a?"borderLeft":"borderRight";function h(E,P){for(var F=o.nodes(),Y=F.pop(),$={};Y;)$[Y]?E(Y):($[Y]=!0,F.push(Y),F=F.concat(P(Y))),Y=F.pop()}function l(E){i[E]=o.inEdges(E).reduce(function(P,F){return Math.max(P,i[F.v]+o.edge(F))},0)}function v(E){var P=o.outEdges(E).reduce(function(Y,$){return Math.min(Y,i[$.w]-o.edge($))},Number.POSITIVE_INFINITY),F=e.node(E);P!==Number.POSITIVE_INFINITY&&F.borderType!==s&&(i[E]=Math.max(i[E],P))}return h(l,o.predecessors.bind(o)),h(v,o.successors.bind(o)),d.Z(r,function(E){i[E]=i[t[E]]}),i}function qn(e,n,t,r){var a=new W.k,i=e.graph(),o=at(i.nodesep,i.edgesep,r);return d.Z(n,function(s){var h;d.Z(s,function(l){var v=t[l];if(a.setNode(v),h){var E=t[h],P=a.edge(E,v);a.setEdge(E,v,Math.max(o(e,l,h),P||0))}h=l})}),a}function et(e,n){return u.Z(he.Z(n),function(t){var r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return Kn.Z(t,function(i,o){var s=it(e,o)/2;r=Math.max(i+s,r),a=Math.min(i-s,a)}),r-a})}function nt(e,n){var t=he.Z(n),r=G.Z(t),a=x.Z(t);d.Z(["u","d"],function(i){d.Z(["l","r"],function(o){var s=i+o,h=e[s],l;if(h!==n){var v=he.Z(h);l=o==="l"?r-G.Z(v):a-x.Z(v),l&&(e[s]=B.Z(h,function(E){return E+l}))}})})}function tt(e,n){return B.Z(e.ul,function(t,r){if(n)return e[n.toLowerCase()][r];var a=ve.Z(Z.Z(e,r));return(a[1]+a[2])/2})}function rt(e){var n=ue(e),t=K.Z(zn(e,n),Hn(e,n)),r={},a;d.Z(["u","d"],function(o){a=o==="u"?n:he.Z(n).reverse(),d.Z(["l","r"],function(s){s==="r"&&(a=Z.Z(a,function(E){return he.Z(E).reverse()}));var h=(o==="u"?e.predecessors:e.successors).bind(e),l=$n(e,a,t,h),v=Jn(e,a,l.root,l.align,s==="r");s==="r"&&(v=B.Z(v,function(E){return-E})),r[o+s]=v})});var i=et(e,r);return nt(r,i),tt(r,e.graph().align)}function at(e,n,t){return function(r,a,i){var o=r.node(a),s=r.node(i),h=0,l;if(h+=o.width/2,T.Z(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":l=-o.width/2;break;case"r":l=o.width/2;break}if(l&&(h+=t?l:-l),l=0,h+=(o.dummy?n:e)/2,h+=(s.dummy?n:e)/2,h+=s.width/2,T.Z(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=s.width/2;break;case"r":l=-s.width/2;break}return l&&(h+=t?l:-l),l=0,h}}function it(e,n){return e.node(n).width}function ot(e){e=ge(e),st(e),d.Z(rt(e),function(n,t){e.node(t).x=n})}function st(e){var n=ue(e),t=e.graph().ranksep,r=0;d.Z(n,function(a){var i=x.Z(Z.Z(a,function(o){return e.node(o).height}));d.Z(a,function(o){e.node(o).y=r+i/2}),r+=i+t})}function dt(e,n){var t=n&&n.debugTiming?ce:Pe;t("layout",function(){var r=t(" buildLayoutGraph",function(){return wt(e)});t(" runLayout",function(){ut(r,t)}),t(" updateInputGraph",function(){ft(e,r)})})}function ut(e,n){n(" makeSpaceForEdgeLabels",function(){bt(e)}),n(" removeSelfEdges",function(){kt(e)}),n(" acyclic",function(){z(e)}),n(" nestingGraph.run",function(){En(e)}),n(" rank",function(){Zn(ge(e))}),n(" injectEdgeLabelProxies",function(){Et(e)}),n(" removeEmptyRanks",function(){we(e)}),n(" nestingGraph.cleanup",function(){_n(e)}),n(" normalizeRanks",function(){Te(e)}),n(" assignRankMinMax",function(){yt(e)}),n(" removeEdgeLabelProxies",function(){xt(e)}),n(" normalize.run",function(){Ve(e)}),n(" parentDummyChains",function(){jn(e)}),n(" addBorderSegments",function(){Re(e)}),n(" order",function(){Yn(e)}),n(" insertSelfEdges",function(){Tt(e)}),n(" adjustCoordinateSystem",function(){Oe(e)}),n(" position",function(){ot(e)}),n(" positionSelfEdges",function(){Mt(e)}),n(" removeBorderNodes",function(){Ct(e)}),n(" normalize.undo",function(){c(e)}),n(" fixupEdgeLabelCoords",function(){Nt(e)}),n(" undoCoordinateSystem",function(){De(e)}),n(" translateGraph",function(){_t(e)}),n(" assignNodeIntersects",function(){Lt(e)}),n(" reversePoints",function(){It(e)}),n(" acyclic.undo",function(){H(e)})}function ft(e,n){d.Z(e.nodes(),function(t){var r=e.node(t),a=n.node(t);r&&(r.x=a.x,r.y=a.y,n.children(t).length&&(r.width=a.width,r.height=a.height))}),d.Z(e.edges(),function(t){var r=e.edge(t),a=n.edge(t);r.points=a.points,T.Z(a,"x")&&(r.x=a.x,r.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var ht=["nodesep","edgesep","ranksep","marginx","marginy"],ct={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},lt=["acyclicer","ranker","rankdir","align"],vt=["width","height"],pt={width:0,height:0},gt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Zt=["labelpos"];function wt(e){var n=new W.k({multigraph:!0,compound:!0}),t=je(e.graph());return n.setGraph(K.Z({},ct,Ge(t,ht),f.Z(t,lt))),d.Z(e.nodes(),function(r){var a=je(e.node(r));n.setNode(r,g.Z(Ge(a,vt),pt)),n.setParent(r,e.parent(r))}),d.Z(e.edges(),function(r){var a=je(e.edge(r));n.setEdge(r,K.Z({},mt,Ge(a,gt),f.Z(a,Zt)))}),n}function bt(e){var n=e.graph();n.ranksep/=2,d.Z(e.edges(),function(t){var r=e.edge(t);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Et(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-r.rank)/2+r.rank,e:n};se(e,"edge-proxy",i,"_ep")}})}function yt(e){var n=0;d.Z(e.nodes(),function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=x.Z(n,r.maxRank))}),e.graph().maxRank=n}function xt(e){d.Z(e.nodes(),function(n){var t=e.node(n);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))})}function _t(e){var n=Number.POSITIVE_INFINITY,t=0,r=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,s=i.marginy||0;function h(l){var v=l.x,E=l.y,P=l.width,F=l.height;n=Math.min(n,v-P/2),t=Math.max(t,v+P/2),r=Math.min(r,E-F/2),a=Math.max(a,E+F/2)}d.Z(e.nodes(),function(l){h(e.node(l))}),d.Z(e.edges(),function(l){var v=e.edge(l);T.Z(v,"x")&&h(v)}),n-=o,r-=s,d.Z(e.nodes(),function(l){var v=e.node(l);v.x-=n,v.y-=r}),d.Z(e.edges(),function(l){var v=e.edge(l);d.Z(v.points,function(E){E.x-=n,E.y-=r}),T.Z(v,"x")&&(v.x-=n),T.Z(v,"y")&&(v.y-=r)}),i.width=t-n+o,i.height=a-r+s}function Lt(e){d.Z(e.edges(),function(n){var t=e.edge(n),r=e.node(n.v),a=e.node(n.w),i,o;t.points?(i=t.points[0],o=t.points[t.points.length-1]):(t.points=[],i=a,o=r),t.points.unshift(Ze(r,i)),t.points.push(Ze(a,o))})}function Nt(e){d.Z(e.edges(),function(n){var t=e.edge(n);if(T.Z(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function It(e){d.Z(e.edges(),function(n){var t=e.edge(n);t.reversed&&t.points.reverse()})}function Ct(e){d.Z(e.nodes(),function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),a=e.node(t.borderBottom),i=e.node(I.Z(t.borderLeft)),o=e.node(I.Z(t.borderRight));t.width=Math.abs(o.x-i.x),t.height=Math.abs(a.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}}),d.Z(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function kt(e){d.Z(e.edges(),function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Tt(e){var n=ue(e);d.Z(n,function(t){var r=0;d.Z(t,function(a,i){var o=e.node(a);o.order=i+r,d.Z(o.selfEdges,function(s){se(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:i+ ++r,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function Mt(e){d.Z(e.nodes(),function(n){var t=e.node(n);if(t.dummy==="selfedge"){var r=e.node(t.e.v),a=r.x+r.width/2,i=r.y,o=t.x-a,s=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:a+2*o/3,y:i-s},{x:a+5*o/6,y:i-s},{x:a+o,y:i},{x:a+5*o/6,y:i+s},{x:a+2*o/3,y:i+s}],t.label.x=t.x,t.label.y=t.y}})}function Ge(e,n){return B.Z(f.Z(e,n),Number)}function je(e){var n={};return d.Z(e,function(t,r){n[r.toLowerCase()]=t}),n}},1926:function(oe,X,b){b.d(X,{k:function(){return q}});var d=b(17452),S=b(62002),T=b(73234),D=b(17179),A=b(13445),Z=b(28287),R=b(70870),W=b(49360),M=b(8500),L=b(34148),C=b(92344),V="\0",j="\0",J="";class q{constructor(f={}){this._isDirected=d.Z(f,"directed")?f.directed:!0,this._isMultigraph=d.Z(f,"multigraph")?f.multigraph:!1,this._isCompound=d.Z(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=S.Z(void 0),this._defaultEdgeLabelFn=S.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[j]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(f){return this._label=f,this}graph(){return this._label}setDefaultNodeLabel(f){return T.Z(f)||(f=S.Z(f)),this._defaultNodeLabelFn=f,this}nodeCount(){return this._nodeCount}nodes(){return D.Z(this._nodes)}sources(){var f=this;return A.Z(this.nodes(),function(g){return Z.Z(f._in[g])})}sinks(){var f=this;return A.Z(this.nodes(),function(g){return Z.Z(f._out[g])})}setNodes(f,g){var x=arguments,I=this;return R.Z(f,function(B){x.length>1?I.setNode(B,g):I.setNode(B)}),this}setNode(f,g){return d.Z(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=g),this):(this._nodes[f]=arguments.length>1?g:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=j,this._children[f]={},this._children[j][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)}node(f){return this._nodes[f]}hasNode(f){return d.Z(this._nodes,f)}removeNode(f){var g=this;if(d.Z(this._nodes,f)){var x=function(I){g.removeEdge(g._edgeObjs[I])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],R.Z(this.children(f),function(I){g.setParent(I)}),delete this._children[f]),R.Z(D.Z(this._in[f]),x),delete this._in[f],delete this._preds[f],R.Z(D.Z(this._out[f]),x),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this}setParent(f,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(W.Z(g))g=j;else{g+="";for(var x=g;!W.Z(x);x=this.parent(x))if(x===f)throw new Error("Setting "+g+" as parent of "+f+" would create a cycle");this.setNode(g)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=g,this._children[g][f]=!0,this}_removeFromParentsChildList(f){delete this._children[this._parent[f]][f]}parent(f){if(this._isCompound){var g=this._parent[f];if(g!==j)return g}}children(f){if(W.Z(f)&&(f=j),this._isCompound){var g=this._children[f];if(g)return D.Z(g)}else{if(f===j)return this.nodes();if(this.hasNode(f))return[]}}predecessors(f){var g=this._preds[f];if(g)return D.Z(g)}successors(f){var g=this._sucs[f];if(g)return D.Z(g)}neighbors(f){var g=this.predecessors(f);if(g)return M.Z(g,this.successors(f))}isLeaf(f){var g;return this.isDirected()?g=this.successors(f):g=this.neighbors(f),g.length===0}filterNodes(f){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var x=this;R.Z(this._nodes,function(O,G){f(G)&&g.setNode(G,O)}),R.Z(this._edgeObjs,function(O){g.hasNode(O.v)&&g.hasNode(O.w)&&g.setEdge(O,x.edge(O))});var I={};function B(O){var G=x.parent(O);return G===void 0||g.hasNode(G)?(I[O]=G,G):G in I?I[G]:B(G)}return this._isCompound&&R.Z(g.nodes(),function(O){g.setParent(O,B(O))}),g}setDefaultEdgeLabel(f){return T.Z(f)||(f=S.Z(f)),this._defaultEdgeLabelFn=f,this}edgeCount(){return this._edgeCount}edges(){return L.Z(this._edgeObjs)}setPath(f,g){var x=this,I=arguments;return C.Z(f,function(B,O){return I.length>1?x.setEdge(B,O,g):x.setEdge(B,O),O}),this}setEdge(){var f,g,x,I,B=!1,O=arguments[0];typeof O=="object"&&O!==null&&"v"in O?(f=O.v,g=O.w,x=O.name,arguments.length===2&&(I=arguments[1],B=!0)):(f=O,g=arguments[1],x=arguments[3],arguments.length>2&&(I=arguments[2],B=!0)),f=""+f,g=""+g,W.Z(x)||(x=""+x);var G=z(this._isDirected,f,g,x);if(d.Z(this._edgeLabels,G))return B&&(this._edgeLabels[G]=I),this;if(!W.Z(x)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(g),this._edgeLabels[G]=B?I:this._defaultEdgeLabelFn(f,g,x);var re=ee(this._isDirected,f,g,x);return f=re.v,g=re.w,Object.freeze(re),this._edgeObjs[G]=re,ne(this._preds[g],f),ne(this._sucs[f],g),this._in[g][G]=re,this._out[f][G]=re,this._edgeCount++,this}edge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x);return this._edgeLabels[I]}hasEdge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x);return d.Z(this._edgeLabels,I)}removeEdge(f,g,x){var I=arguments.length===1?H(this._isDirected,arguments[0]):z(this._isDirected,f,g,x),B=this._edgeObjs[I];return B&&(f=B.v,g=B.w,delete this._edgeLabels[I],delete this._edgeObjs[I],Q(this._preds[g],f),Q(this._sucs[f],g),delete this._in[g][I],delete this._out[f][I],this._edgeCount--),this}inEdges(f,g){var x=this._in[f];if(x){var I=L.Z(x);return g?A.Z(I,function(B){return B.v===g}):I}}outEdges(f,g){var x=this._out[f];if(x){var I=L.Z(x);return g?A.Z(I,function(B){return B.w===g}):I}}nodeEdges(f,g){var x=this.inEdges(f,g);if(x)return x.concat(this.outEdges(f,g))}}q.prototype._nodeCount=0,q.prototype._edgeCount=0;function ne(K,f){K[f]?K[f]++:K[f]=1}function Q(K,f){--K[f]||delete K[f]}function z(K,f,g,x){var I=""+f,B=""+g;if(!K&&I>B){var O=I;I=B,B=O}return I+J+B+J+(W.Z(x)?V:x)}function ee(K,f,g,x){var I=""+f,B=""+g;if(!K&&I>B){var O=I;I=B,B=O}var G={v:I,w:B};return x&&(G.name=x),G}function H(K,f){return z(K,f.v,f.w,f.name)}},45625:function(oe,X,b){b.d(X,{k:function(){return d.k}});var d=b(1926);const S="2.1.9-pre"},46060:function(oe,X,b){b.d(X,{c:function(){return A}});var d=b(49360),S=b(92346),T=b(43836),D=b(1926);function A(M){var L={options:{directed:M.isDirected(),multigraph:M.isMultigraph(),compound:M.isCompound()},nodes:Z(M),edges:R(M)};return d.Z(M.graph())||(L.value=S.Z(M.graph())),L}function Z(M){return T.Z(M.nodes(),function(L){var C=M.node(L),V=M.parent(L),j={v:L};return d.Z(C)||(j.value=C),d.Z(V)||(j.parent=V),j})}function R(M){return T.Z(M.edges(),function(L){var C=M.edge(L),V={v:L.v,w:L.w};return d.Z(L.name)||(V.name=L.name),d.Z(C)||(V.value=C),V})}function W(M){var L=new Graph(M.options).setGraph(M.value);return _.each(M.nodes,function(C){L.setNode(C.v,C.value),C.parent&&L.setParent(C.v,C.parent)}),_.each(M.edges,function(C){L.setEdge({v:C.v,w:C.w,name:C.name},C.value)}),L}},91518:function(oe,X,b){b.d(X,{sY:function(){return xe}});var d=b(23198),S=b(17452),T=b(3688),D=b(70870),A=b(99791),Z=b(96225),R={normal:M,vee:L,undirected:C};function W(p){R=p}function M(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}function L(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}function C(p,c,u,m){var w=p.append("marker").attr("id",c).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),y=w.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");Z.bg(y,u[m+"Style"]),u[m+"Class"]&&y.attr("class",u[m+"Class"])}var V=b(43349);function j(p,c){var u=p;return u.node().appendChild(c.label),Z.bg(u,c.labelStyle),u}function J(p,c){for(var u=p.append("text"),m=q(c.label).split(`
|
|
2
2
|
`),w=0;w<m.length;w++)u.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(m[w]);return Z.bg(u,c.labelStyle),u}function q(p){for(var c="",u=!1,m,w=0;w<p.length;++w)if(m=p[w],u){switch(m){case"n":c+=`
|
|
3
3
|
`;break;default:c+=m}u=!1}else m==="\\"?u=!0:c+=m;return c}function ne(p,c,u){var m=c.label,w=p.append("g");c.labelType==="svg"?j(w,c):typeof m!="string"||c.labelType==="html"?(0,V.a)(w,c):J(w,c);var y=w.node().getBBox(),k;switch(u){case"top":k=-c.height/2;break;case"bottom":k=c.height/2-y.height;break;default:k=-y.height/2}return w.attr("transform","translate("+-y.width/2+","+k+")"),w}var Q=function(p,c){var u=c.nodes().filter(function(y){return Z.bF(c,y)}),m=p.selectAll("g.cluster").data(u,function(y){return y});Z.WR(m.exit(),c).style("opacity",0).remove();var w=m.enter().append("g").attr("class","cluster").attr("id",function(y){var k=c.node(y);return k.id}).style("opacity",0).each(function(y){var k=c.node(y),N=d.Ys(this);d.Ys(this).append("rect");var U=N.append("g").attr("class","label");ne(U,k,k.clusterLabelPos)});return m=m.merge(w),m=Z.WR(m,c).style("opacity",1),m.selectAll("rect").each(function(y){var k=c.node(y),N=d.Ys(this);Z.bg(N,k.style)}),m};function z(p){Q=p}let ee=function(p,c){var u=p.selectAll("g.edgeLabel").data(c.edges(),function(w){return Z.O1(w)}).classed("update",!0);u.exit().remove(),u.enter().append("g").classed("edgeLabel",!0).style("opacity",0),u=p.selectAll("g.edgeLabel"),u.each(function(w){var y=d.Ys(this);y.select(".label").remove();var k=c.edge(w),N=ne(y,c.edge(w),0).classed("label",!0),U=N.node().getBBox();k.labelId&&N.attr("id",k.labelId),S.Z(k,"width")||(k.width=U.width),S.Z(k,"height")||(k.height=U.height)});var m;return u.exit?m=u.exit():m=u.selectAll(null),Z.WR(m,c).style("opacity",0).remove(),u};function H(p){ee=p}var K=b(66749),f=b(74379);function g(p,c){return p.intersect(c)}var x=function(p,c,u){var m=p.selectAll("g.edgePath").data(c.edges(),function(k){return Z.O1(k)}).classed("update",!0),w=se(m,c);ke(m,c);var y=m.merge!==void 0?m.merge(w):m;return Z.WR(y,c).style("opacity",1),y.each(function(k){var N=d.Ys(this),U=c.edge(k);U.elem=this,U.id&&N.attr("id",U.id),Z.$p(N,U.class,(N.classed("update")?"update ":"")+"edgePath")}),y.selectAll("path.path").each(function(k){var N=c.edge(k);N.arrowheadId=K.Z("arrowhead");var U=d.Ys(this).attr("marker-end",function(){return"url("+B(location.href,N.arrowheadId)+")"}).style("fill","none");Z.WR(U,c).attr("d",function(te){return O(c,te)}),Z.bg(U,N.style)}),y.selectAll("defs *").remove(),y.selectAll("defs").each(function(k){var N=c.edge(k),U=u[N.arrowhead];U(d.Ys(this),N.arrowheadId,N,"arrowhead")}),y};function I(p){x=p}function B(p,c){var u=p.split("#")[0];return u+"#"+c}function O(p,c){var u=p.edge(c),m=p.node(c.v),w=p.node(c.w),y=u.points.slice(1,u.points.length-1);return y.unshift(g(m,y[0])),y.push(g(w,y[y.length-1])),G(u,y)}function G(p,c){var u=(d.jvg||d.YPS.line)().x(function(m){return m.x}).y(function(m){return m.y});return(u.curve||u.interpolate)(p.curve),u(c)}function re(p){var c=p.getBBox(),u=p.ownerSVGElement.getScreenCTM().inverse().multiply(p.getScreenCTM()).translate(c.width/2,c.height/2);return{x:u.e,y:u.f}}function se(p,c){var u=p.enter().append("g").attr("class","edgePath").style("opacity",0);return u.append("path").attr("class","path").attr("d",function(m){var w=c.edge(m),y=c.node(m.v).elem,k=f.Z(w.points.length).map(function(){return re(y)});return G(w,k)}),u.append("defs"),u}function ke(p,c){var u=p.exit();Z.WR(u,c).style("opacity",0).remove()}var ge=b(61666),me=function(p,c,u){var m=c.nodes().filter(function(k){return!Z.bF(c,k)}),w=p.selectAll("g.node").data(m,function(k){return k}).classed("update",!0);w.exit().remove(),w.enter().append("g").attr("class","node").style("opacity",0),w=p.selectAll("g.node"),w.each(function(k){var N=c.node(k),U=d.Ys(this);Z.$p(U,N.class,(U.classed("update")?"update ":"")+"node"),U.select("g.label").remove();var te=U.append("g").attr("class","label"),ae=ne(te,N),Be=u[N.shape],fe=ge.Z(ae.node().getBBox(),"width","height");N.elem=this,N.id&&U.attr("id",N.id),N.labelId&&te.attr("id",N.labelId),S.Z(N,"width")&&(fe.width=N.width),S.Z(N,"height")&&(fe.height=N.height),fe.width+=N.paddingLeft+N.paddingRight,fe.height+=N.paddingTop+N.paddingBottom,te.attr("transform","translate("+(N.paddingLeft-N.paddingRight)/2+","+(N.paddingTop-N.paddingBottom)/2+")");var Le=d.Ys(this);Le.select(".label-container").remove();var We=Be(Le,fe,N).classed("label-container",!0);Z.bg(We,N.style);var Ne=We.node().getBBox();N.width=Ne.width,N.height=Ne.height});var y;return w.exit?y=w.exit():y=w.selectAll(null),Z.WR(y,c).style("opacity",0).remove(),w};function Ue(p){me=p}function Ze(p,c){var u=p.filter(function(){return!d.Ys(this).classed("update")});function m(w){var y=c.node(w);return"translate("+y.x+","+y.y+")"}u.attr("transform",m),Z.WR(p,c).style("opacity",1).attr("transform",m),Z.WR(u.selectAll("rect"),c).attr("width",function(w){return c.node(w).width}).attr("height",function(w){return c.node(w).height}).attr("x",function(w){var y=c.node(w);return-y.width/2}).attr("y",function(w){var y=c.node(w);return-y.height/2})}function ue(p,c){var u=p.filter(function(){return!d.Ys(this).classed("update")});function m(w){var y=c.edge(w);return S.Z(y,"x")?"translate("+y.x+","+y.y+")":""}u.attr("transform",m),Z.WR(p,c).style("opacity",1).attr("transform",m)}function Te(p,c){var u=p.filter(function(){return!d.Ys(this).classed("update")});function m(w){var y=c.node(w);return"translate("+y.x+","+y.y+")"}u.attr("transform",m),Z.WR(p,c).style("opacity",1).attr("transform",m)}function we(p,c,u,m){var w=p.x,y=p.y,k=w-m.x,N=y-m.y,U=Math.sqrt(c*c*N*N+u*u*k*k),te=Math.abs(c*u*k/U);m.x<w&&(te=-te);var ae=Math.abs(c*u*N/U);return m.y<y&&(ae=-ae),{x:w+te,y:y+ae}}function be(p,c,u){return we(p,c,c,u)}var Ee=b(23352),Me=b(22930),ce={rect:Re,ellipse:ye,circle:Oe,diamond:De};function Pe(p){ce=p}function Re(p,c,u){var m=p.insert("rect",":first-child").attr("rx",u.rx).attr("ry",u.ry).attr("x",-c.width/2).attr("y",-c.height/2).attr("width",c.width).attr("height",c.height);return u.intersect=function(w){return(0,Me.q)(u,w)},m}function ye(p,c,u){var m=c.width/2,w=c.height/2,y=p.insert("ellipse",":first-child").attr("x",-c.width/2).attr("y",-c.height/2).attr("rx",m).attr("ry",w);return u.intersect=function(k){return we(u,m,w,k)},y}function Oe(p,c,u){var m=Math.max(c.width,c.height)/2,w=p.insert("circle",":first-child").attr("x",-c.width/2).attr("y",-c.height/2).attr("r",m);return u.intersect=function(y){return be(u,m,y)},w}function De(p,c,u){var m=c.width*Math.SQRT2/2,w=c.height*Math.SQRT2/2,y=[{x:0,y:-w},{x:-m,y:0},{x:0,y:w},{x:m,y:0}],k=p.insert("polygon",":first-child").attr("points",y.map(function(N){return N.x+","+N.y}).join(" "));return u.intersect=function(N){return(0,Ee.A)(u,y,N)},k}function xe(){var p=function(c,u){le(u);var m=ie(c,"output"),w=ie(m,"clusters"),y=ie(m,"edgePaths"),k=ee(ie(m,"edgeLabels"),u),N=me(ie(m,"nodes"),u,ce);(0,A.bK)(u),Te(N,u),ue(k,u),x(y,u,R);var U=Q(w,u);Ze(U,u),Ae(u)};return p.createNodes=function(c){return arguments.length?(Ue(c),p):me},p.createClusters=function(c){return arguments.length?(z(c),p):Q},p.createEdgeLabels=function(c){return arguments.length?(H(c),p):ee},p.createEdgePaths=function(c){return arguments.length?(I(c),p):x},p.shapes=function(c){return arguments.length?(Pe(c),p):ce},p.arrows=function(c){return arguments.length?(W(c),p):R},p}var _e={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},Se={arrowhead:"normal",curve:d.c_6};function le(p){p.nodes().forEach(function(c){var u=p.node(c);!S.Z(u,"label")&&!p.children(c).length&&(u.label=c),S.Z(u,"paddingX")&&T.Z(u,{paddingLeft:u.paddingX,paddingRight:u.paddingX}),S.Z(u,"paddingY")&&T.Z(u,{paddingTop:u.paddingY,paddingBottom:u.paddingY}),S.Z(u,"padding")&&T.Z(u,{paddingLeft:u.padding,paddingRight:u.padding,paddingTop:u.padding,paddingBottom:u.padding}),T.Z(u,_e),D.Z(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(m){u[m]=Number(u[m])}),S.Z(u,"width")&&(u._prevWidth=u.width),S.Z(u,"height")&&(u._prevHeight=u.height)}),p.edges().forEach(function(c){var u=p.edge(c);S.Z(u,"label")||(u.label=""),T.Z(u,Se)})}function Ae(p){D.Z(p.nodes(),function(c){var u=p.node(c);S.Z(u,"_prevWidth")?u.width=u._prevWidth:delete u.width,S.Z(u,"_prevHeight")?u.height=u._prevHeight:delete u.height,delete u._prevWidth,delete u._prevHeight})}function ie(p,c){var u=p.select("g."+c);return u.empty()&&(u=p.append("g").attr("class",c)),u}var Ve=b(45625)}}]);
|