import{$ as Br,Aa as hr,Ba as Ur,Ca as jr,Da as B,Ea as Wr,O as ze,P as k,Q as Pr,R as D,S as Rr,T as Mr,U as Ke,V as Ve,W as H,X as He,Y as Fr,Z as Xe,_ as _e,aa as Ze,ba as $e,ca as Je,da as Qe,ea as F,fa as Dr,ga as _,ha as rt,ia as G,ja as et,ka as Tr,ma as mr,na as pr,oa as tt,pa as lr,qa as X,ra as Gr,sa as ot,ta as U,ua as j,va as nt,wa as P,xa as at,ya as cr,za as nr}from"./chunk-KR7JTV7U.js";var Vn="[object Symbol]";function Hn(r){return typeof r=="symbol"||F(r)&&Pr(r)==Vn}var N=Hn;function Xn(r,e){for(var t=-1,o=r==null?0:r.length,n=Array(o);++t-1}var bt=ha;function xa(r){return G(r)?ot(r):Ur(r)}var E=xa;var _a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,va=/^\w*$/;function ga(r,e){if(_(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||N(r)?!0:va.test(r)||!_a.test(r)||e!=null&&r in Object(e)}var _r=ga;var ba=500;function ya(r){var e=Ve(r,function(o){return t.size===ba&&t.clear(),o}),t=e.cache;return e}var yt=ya;var wa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ea=/\\(\\)?/g,Ia=yt(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(wa,function(t,o,n,a){e.push(n?a.replace(Ea,"$1"):o||t)}),e}),wt=Ia;function Aa(r){return r==null?"":ut(r)}var zr=Aa;function Ta(r,e){return _(r)?r:_r(r,e)?[r]:wt(zr(r))}var Z=Ta;var Oa=1/0;function Sa(r){if(typeof r=="string"||N(r))return r;var e=r+"";return e=="0"&&1/r==-Oa?"-0":e}var q=Sa;function La(r,e){e=Z(e,r);for(var t=0,o=e.length;r!=null&&t0&&t(f)?e>1?Tt(f,e-1,t,o,n):vr(n,f):o||(n[n.length]=f)}return n}var gr=Tt;function Pa(r){var e=r==null?0:r.length;return e?gr(r,1):[]}var R=Pa;function Ra(r){return at(nt(r,void 0,R),r+"")}var Ot=Ra;var Ma="\\ud800-\\udfff",Fa="\\u0300-\\u036f",Ba="\\ufe20-\\ufe2f",Da="\\u20d0-\\u20ff",Ga=Fa+Ba+Da,Ua="\\ufe0e\\ufe0f",ja="\\u200d",Wa=RegExp("["+ja+Ma+Ga+Ua+"]");function qa(r){return Wa.test(r)}var St=qa;function Ya(r,e,t,o){var n=-1,a=r==null?0:r.length;for(o&&a&&(t=r[++n]);++nf))return!1;var u=a.get(r),m=a.get(e);if(u&&m)return u==e&&m==r;var p=-1,l=!0,x=t&Ef?new Qr:void 0;for(a.set(r,e),a.set(e,r);++p2?e[2]:void 0;for(n&&nr(e[0],e[1],n)&&(o=1);++t-1?n[a?e[i]:i]:void 0}}var wo=Es;var Is=Math.max;function As(r,e,t){var o=r==null?0:r.length;if(!o)return-1;var n=t==null?0:ht(t);return n<0&&(n=Is(o+n,0)),Yr(r,O(e,3),n)}var Eo=As;var Ts=wo(Eo),Ir=Ts;function Os(r,e){var t=-1,o=G(r)?Array(r.length):[];return J(r,function(n,a,i){o[++t]=e(n,a,i)}),o}var de=Os;function Ss(r,e){var t=_(r)?W:de;return t(r,O(e,3))}var g=Ss;function Ls(r,e){return r==null?r:Fr(r,Er(e),U)}var ye=Ls;function Ns(r,e){return r&&wr(r,Er(e))}var we=Ns;function Cs(r,e){return r>e}var Io=Cs;var ks=Object.prototype,Ps=ks.hasOwnProperty;function Rs(r,e){return r!=null&&Ps.call(r,e)}var Ao=Rs;function Ms(r,e){return r!=null&&ie(r,e,Ao)}var c=Ms;var Fs="[object String]";function Bs(r){return typeof r=="string"||!_(r)&&F(r)&&Pr(r)==Fs}var To=Bs;function Ds(r,e){return W(e,function(t){return r[t]})}var Oo=Ds;function Gs(r){return r==null?[]:Oo(r,E(r))}var C=Gs;function Us(r){return r===void 0}var I=Us;function js(r,e){return re||a&&i&&s&&!f&&!u||o&&i&&s||!t&&s||!n)return 1;if(!o&&!a&&!u&&r=f)return s;var u=t[o];return s*(u=="desc"?-1:1)}}return r.index-e.index}var ko=$s;function Js(r,e,t){e.length?e=W(e,function(a){return _(a)?function(i){return $(i,a.length===1?a[0]:a)}:a}):e=[j];var o=-1;e=W(e,mr(O));var n=de(r,function(a,i,f){var s=W(e,function(u){return u(a)});return{criteria:s,index:++o,value:a}});return No(n,function(a,i){return ko(a,i,t)})}var Po=Js;var Qs=se("length"),Ro=Qs;var Fo="\\ud800-\\udfff",ru="\\u0300-\\u036f",eu="\\ufe20-\\ufe2f",tu="\\u20d0-\\u20ff",ou=ru+eu+tu,nu="\\ufe0e\\ufe0f",au="["+Fo+"]",Ee="["+ou+"]",Ie="\\ud83c[\\udffb-\\udfff]",iu="(?:"+Ee+"|"+Ie+")",Bo="[^"+Fo+"]",Do="(?:\\ud83c[\\udde6-\\uddff]){2}",Go="[\\ud800-\\udbff][\\udc00-\\udfff]",fu="\\u200d",Uo=iu+"?",jo="["+nu+"]?",su="(?:"+fu+"(?:"+[Bo,Do,Go].join("|")+")"+jo+Uo+")*",uu=jo+Uo+su,du="(?:"+[Bo+Ee+"?",Ee,Do,Go,au].join("|")+")",Mo=RegExp(Ie+"(?="+Ie+")|"+du+uu,"g");function mu(r){for(var e=Mo.lastIndex=0;Mo.test(r);)++e;return e}var Wo=mu;function pu(r){return St(r)?Wo(r):Ro(r)}var qo=pu;function lu(r,e){return Lo(r,e,function(t,o){return fe(r,o)})}var Yo=lu;var cu=Ot(function(r,e){return r==null?{}:Yo(r,e)}),fr=cu;var hu=Math.ceil,xu=Math.max;function _u(r,e,t,o){for(var n=-1,a=xu(hu((e-r)/(t||1)),0),i=Array(a);a--;)i[o?a:++n]=r,r+=t;return i}var zo=_u;function vu(r){return function(e,t,o){return o&&typeof o!="number"&&nr(e,t,o)&&(t=o=void 0),e=xr(e),t===void 0?(t=e,e=0):t=xr(t),o=o===void 0?e1&&nr(r,e[0],e[1])?e=[]:t>2&&nr(e[0],e[1],e[2])&&(e=[e[0]]),Po(r,gr(e,1),[])}),z=Au;var Tu=1/0,Ou=jr&&1/yr(new jr([,-0]))[1]==Tu?function(r){return new jr(r)}:xt,Ho=Ou;var Su=200;function Lu(r,e,t){var o=-1,n=bt,a=r.length,i=!0,f=[],s=f;if(t)i=!1,n=bo;else if(a>=Su){var u=e?null:Ho(r);if(u)return yr(u);i=!1,n=re,s=new Qr}else s=e?[]:f;r:for(;++o1?n.setNode(a,t):n.setNode(a)}),this}setNode(e,t){return c(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=ur,this._children[e]={},this._children[ur][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return c(this._nodes,e)}removeNode(e){var t=this;if(c(this._nodes,e)){var o=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),function(n){t.setParent(n)}),delete this._children[e]),d(E(this._in[e]),o),delete this._in[e],delete this._preds[e],d(E(this._out[e]),o),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(I(t))t=ur;else{t+="";for(var o=t;!I(o);o=this.parent(o))if(o===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==ur)return t}}children(e){if(I(e)&&(e=ur),this._isCompound){var t=this._children[e];if(t)return E(t)}else{if(e===ur)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return E(t)}successors(e){var t=this._sucs[e];if(t)return E(t)}neighbors(e){var t=this.predecessors(e);if(t)return Te(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var o=this;d(this._nodes,function(i,f){e(f)&&t.setNode(f,i)}),d(this._edgeObjs,function(i){t.hasNode(i.v)&&t.hasNode(i.w)&&t.setEdge(i,o.edge(i))});var n={};function a(i){var f=o.parent(i);return f===void 0||t.hasNode(f)?(n[i]=f,f):f in n?n[f]:a(f)}return this._isCompound&&d(t.nodes(),function(i){t.setParent(i,a(i))}),t}setDefaultEdgeLabel(e){return Rr(e)||(e=P(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return C(this._edgeObjs)}setPath(e,t){var o=this,n=arguments;return Y(e,function(a,i){return n.length>1?o.setEdge(a,i,t):o.setEdge(a,i),i}),this}setEdge(){var e,t,o,n,a=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(e=i.v,t=i.w,o=i.name,arguments.length===2&&(n=arguments[1],a=!0)):(e=i,t=arguments[1],o=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),e=""+e,t=""+t,I(o)||(o=""+o);var f=Sr(this._isDirected,e,t,o);if(c(this._edgeLabels,f))return a&&(this._edgeLabels[f]=n),this;if(!I(o)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[f]=a?n:this._defaultEdgeLabelFn(e,t,o);var s=Fu(this._isDirected,e,t,o);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[f]=s,Jo(this._preds[t],e),Jo(this._sucs[e],t),this._in[t][f]=s,this._out[e][f]=s,this._edgeCount++,this}edge(e,t,o){var n=arguments.length===1?Oe(this._isDirected,arguments[0]):Sr(this._isDirected,e,t,o);return this._edgeLabels[n]}hasEdge(e,t,o){var n=arguments.length===1?Oe(this._isDirected,arguments[0]):Sr(this._isDirected,e,t,o);return c(this._edgeLabels,n)}removeEdge(e,t,o){var n=arguments.length===1?Oe(this._isDirected,arguments[0]):Sr(this._isDirected,e,t,o),a=this._edgeObjs[n];return a&&(e=a.v,t=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Qo(this._preds[t],e),Qo(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,t){var o=this._in[e];if(o){var n=C(o);return t?S(n,function(a){return a.v===t}):n}}outEdges(e,t){var o=this._out[e];if(o){var n=C(o);return t?S(n,function(a){return a.w===t}):n}}nodeEdges(e,t){var o=this.inEdges(e,t);if(o)return o.concat(this.outEdges(e,t))}};A.prototype._nodeCount=0;A.prototype._edgeCount=0;function Jo(r,e){r[e]?r[e]++:r[e]=1}function Qo(r,e){--r[e]||delete r[e]}function Sr(r,e,t,o){var n=""+e,a=""+t;if(!r&&n>a){var i=n;n=a,a=i}return n+$o+a+$o+(I(o)?Mu:o)}function Fu(r,e,t,o){var n=""+e,a=""+t;if(!r&&n>a){var i=n;n=a,a=i}var f={v:n,w:a};return o&&(f.name=o),f}function Oe(r,e){return Sr(r,e.v,e.w,e.name)}function K(r,e,t,o){var n;do n=sr(o);while(r.hasNode(n));return t.dummy=e,r.setNode(n,t),n}function rn(r){var e=new A().setGraph(r.graph());return d(r.nodes(),function(t){e.setNode(t,r.node(t))}),d(r.edges(),function(t){var o=e.edge(t.v,t.w)||{weight:0,minlen:1},n=r.edge(t);e.setEdge(t.v,t.w,{weight:o.weight+n.weight,minlen:Math.max(o.minlen,n.minlen)})}),e}function le(r){var e=new A({multigraph:r.isMultigraph()}).setGraph(r.graph());return d(r.nodes(),function(t){r.children(t).length||e.setNode(t,r.node(t))}),d(r.edges(),function(t){e.setEdge(t,r.edge(t))}),e}function Se(r,e){var t=r.x,o=r.y,n=e.x-t,a=e.y-o,i=r.width/2,f=r.height/2;if(!n&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,u;return Math.abs(a)*i>Math.abs(n)*f?(a<0&&(f=-f),s=f*n/a,u=f):(n<0&&(i=-i),s=i,u=i*a/n),{x:t+s,y:o+u}}function rr(r){var e=g(M(Ne(r)+1),function(){return[]});return d(r.nodes(),function(t){var o=r.node(t),n=o.rank;I(n)||(e[n][o.order]=t)}),e}function en(r){var e=V(g(r.nodes(),function(t){return r.node(t).rank}));d(r.nodes(),function(t){var o=r.node(t);c(o,"rank")&&(o.rank-=e)})}function tn(r){var e=V(g(r.nodes(),function(a){return r.node(a).rank})),t=[];d(r.nodes(),function(a){var i=r.node(a).rank-e;t[i]||(t[i]=[]),t[i].push(a)});var o=0,n=r.graph().nodeRankFactor;d(t,function(a,i){I(a)&&i%n!==0?--o:o&&d(a,function(f){r.node(f).rank+=o})})}function Le(r,e,t,o){var n={width:0,height:0};return arguments.length>=4&&(n.rank=t,n.order=o),K(r,"border",n,e)}function Ne(r){return L(g(r.nodes(),function(e){var t=r.node(e).rank;if(!I(t))return t}))}function on(r,e){var t={lhs:[],rhs:[]};return d(r,function(o){e(o)?t.lhs.push(o):t.rhs.push(o)}),t}function nn(r,e){var t=ue();try{return e()}finally{console.log(r+" time: "+(ue()-t)+"ms")}}function an(r,e){return e()}function sn(r){function e(t){var o=r.children(t),n=r.node(t);if(o.length&&d(o,e),c(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var a=n.minRank,i=n.maxRank+1;a0;--f)if(i=e[f].dequeue(),i){o=o.concat(Pe(r,e,t,i,!0));break}}}return o}function Pe(r,e,t,o,n){var a=n?[]:void 0;return d(r.inEdges(o.v),function(i){var f=r.edge(i),s=r.node(i.v);n&&a.push({v:i.v,w:i.w}),s.out-=f,Re(e,t,s)}),d(r.outEdges(o.v),function(i){var f=r.edge(i),s=i.w,u=r.node(s);u.in-=f,Re(e,t,u)}),r.removeNode(o.v),a}function qu(r,e){var t=new A,o=0,n=0;d(r.nodes(),function(f){t.setNode(f,{v:f,in:0,out:0})}),d(r.edges(),function(f){var s=t.edge(f.v,f.w)||0,u=e(f),m=s+u;t.setEdge(f.v,f.w,m),n=Math.max(n,t.node(f.v).out+=u),o=Math.max(o,t.node(f.w).in+=u)});var a=M(n+o+3).map(function(){return new ce}),i=o+1;return d(t.nodes(),function(f){Re(a,i,t.node(f))}),{graph:t,buckets:a,zeroIdx:i}}function Re(r,e,t){t.out?t.in?r[t.out-t.in+e].enqueue(t):r[r.length-1].enqueue(t):r[0].enqueue(t)}function hn(r){var e=r.graph().acyclicer==="greedy"?cn(r,t(r)):Yu(r);d(e,function(o){var n=r.edge(o);r.removeEdge(o),n.forwardName=o.name,n.reversed=!0,r.setEdge(o.w,o.v,n,sr("rev"))});function t(o){return function(n){return o.edge(n).weight}}}function Yu(r){var e=[],t={},o={};function n(a){c(o,a)||(o[a]=!0,t[a]=!0,d(r.outEdges(a),function(i){c(t,i.w)?e.push(i):n(i.w)}),delete t[a])}return d(r.nodes(),n),e}function xn(r){d(r.edges(),function(e){var t=r.edge(e);if(t.reversed){r.removeEdge(e);var o=t.forwardName;delete t.reversed,delete t.forwardName,r.setEdge(e.w,e.v,t,o)}})}function vn(r){r.graph().dummyChains=[],d(r.edges(),function(e){zu(r,e)})}function zu(r,e){var t=e.v,o=r.node(t).rank,n=e.w,a=r.node(n).rank,i=e.name,f=r.edge(e),s=f.labelRank;if(a!==o+1){r.removeEdge(e);var u,m,p;for(p=0,++o;oi.lim&&(f=i,s=!0);var u=S(e.edges(),function(m){return s===wn(r,r.node(m.v),f)&&s!==wn(r,r.node(m.w),f)});return ir(u,function(m){return dr(e,m)})}function On(r,e,t,o){var n=t.v,a=t.w;r.removeEdge(n,a),r.setEdge(o.v,o.w,{}),Ge(r),De(r,e),rd(r,e)}function rd(r,e){var t=Ir(r.nodes(),function(n){return!e.node(n).parent}),o=Be(r,t);o=o.slice(1),d(o,function(n){var a=r.node(n).parent,i=e.edge(n,a),f=!1;i||(i=e.edge(a,n),f=!0),e.node(n).rank=e.node(a).rank+(f?i.minlen:-i.minlen)})}function ed(r,e,t){return r.hasEdge(e,t)}function wn(r,e,t){return t.low<=e.lim&&e.lim<=t.lim}function Ue(r){switch(r.graph().ranker){case"network-simplex":Sn(r);break;case"tight-tree":od(r);break;case"longest-path":td(r);break;default:Sn(r)}}var td=Lr;function od(r){Lr(r),he(r)}function Sn(r){tr(r)}function Ln(r){var e=K(r,"root",{},"_root"),t=nd(r),o=L(C(t))-1,n=2*o+1;r.graph().nestingRoot=e,d(r.edges(),function(i){r.edge(i).minlen*=n});var a=ad(r)+1;d(r.children(),function(i){Nn(r,e,n,a,o,t,i)}),r.graph().nodeRankFactor=n}function Nn(r,e,t,o,n,a,i){var f=r.children(i);if(!f.length){i!==e&&r.setEdge(e,i,{weight:0,minlen:t});return}var s=Le(r,"_bt"),u=Le(r,"_bb"),m=r.node(i);r.setParent(s,i),m.borderTop=s,r.setParent(u,i),m.borderBottom=u,d(f,function(p){Nn(r,e,t,o,n,a,p);var l=r.node(p),x=l.borderTop?l.borderTop:p,h=l.borderBottom?l.borderBottom:p,v=l.borderTop?o:2*o,w=x!==h?1:n-a[i]+1;r.setEdge(s,x,{weight:v,minlen:w,nestingEdge:!0}),r.setEdge(h,u,{weight:v,minlen:w,nestingEdge:!0})}),r.parent(i)||r.setEdge(e,s,{weight:0,minlen:n+a[i]})}function nd(r){var e={};function t(o,n){var a=r.children(o);a&&a.length&&d(a,function(i){t(i,n+1)}),e[o]=n}return d(r.children(),function(o){t(o,1)}),e}function ad(r){return Y(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function Cn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,d(r.edges(),function(t){var o=r.edge(t);o.nestingEdge&&r.removeEdge(t)})}function kn(r,e,t){var o={},n;d(t,function(a){for(var i=r.parent(a),f,s;i;){if(f=r.parent(i),f?(s=o[f],o[f]=i):(s=n,n=i),s&&s!==i){e.setEdge(s,i);return}i=f}})}function Pn(r,e,t){var o=fd(r),n=new A({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(a){return r.node(a)});return d(r.nodes(),function(a){var i=r.node(a),f=r.parent(a);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(n.setNode(a),n.setParent(a,f||o),d(r[t](a),function(s){var u=s.v===a?s.w:s.v,m=n.edge(u,a),p=I(m)?0:m.weight;n.setEdge(u,a,{weight:r.edge(s).weight+p})}),c(i,"minRank")&&n.setNode(a,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))}),n}function fd(r){for(var e;r.hasNode(e=sr("_root")););return e}function Rn(r,e){for(var t=0,o=1;o0;)m%2&&(p+=f[m+1]),m=m-1>>1,f[m]+=u.weight;s+=u.weight*p})),s}function Mn(r){var e={},t=S(r.nodes(),function(f){return!r.children(f).length}),o=L(g(t,function(f){return r.node(f).rank})),n=g(M(o+1),function(){return[]});function a(f){if(!c(e,f)){e[f]=!0;var s=r.node(f);n[s.rank].push(f),d(r.successors(f),a)}}var i=z(t,function(f){return r.node(f).rank});return d(i,a),n}function Fn(r,e){return g(e,function(t){var o=r.inEdges(t);if(o.length){var n=Y(o,function(a,i){var f=r.edge(i),s=r.node(i.v);return{sum:a.sum+f.weight*s.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:t}})}function Bn(r,e){var t={};d(r,function(n,a){var i=t[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:a};I(n.barycenter)||(i.barycenter=n.barycenter,i.weight=n.weight)}),d(e.edges(),function(n){var a=t[n.v],i=t[n.w];!I(a)&&!I(i)&&(i.indegree++,a.out.push(t[n.w]))});var o=S(t,function(n){return!n.indegree});return ud(o)}function ud(r){var e=[];function t(a){return function(i){i.merged||(I(i.barycenter)||I(a.barycenter)||i.barycenter>=a.barycenter)&&dd(a,i)}}function o(a){return function(i){i.in.push(a),--i.indegree===0&&r.push(i)}}for(;r.length;){var n=r.pop();e.push(n),d(n.in.reverse(),t(n)),d(n.out,o(n))}return g(S(e,function(a){return!a.merged}),function(a){return fr(a,["vs","i","barycenter","weight"])})}function dd(r,e){var t=0,o=0;r.weight&&(t+=r.barycenter*r.weight,o+=r.weight),e.weight&&(t+=e.barycenter*e.weight,o+=e.weight),r.vs=e.vs.concat(r.vs),r.barycenter=t/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function Gn(r,e){var t=on(r,function(m){return c(m,"barycenter")}),o=t.lhs,n=z(t.rhs,function(m){return-m.i}),a=[],i=0,f=0,s=0;o.sort(md(!!e)),s=Dn(a,n,s),d(o,function(m){s+=m.vs.length,a.push(m.vs),i+=m.barycenter*m.weight,f+=m.weight,s=Dn(a,n,s)});var u={vs:R(a)};return f&&(u.barycenter=i/f,u.weight=f),u}function Dn(r,e,t){for(var o;e.length&&(o=Q(e)).i<=t;)e.pop(),r.push(o.vs),t++;return t}function md(r){return function(e,t){return e.barycentert.barycenter?1:r?t.i-e.i:e.i-t.i}}function je(r,e,t,o){var n=r.children(e),a=r.node(e),i=a?a.borderLeft:void 0,f=a?a.borderRight:void 0,s={};i&&(n=S(n,function(h){return h!==i&&h!==f}));var u=Fn(r,n);d(u,function(h){if(r.children(h.v).length){var v=je(r,h.v,t,o);s[h.v]=v,c(v,"barycenter")&&ld(h,v)}});var m=Bn(u,t);pd(m,s);var p=Gn(m,o);if(i&&(p.vs=R([i,p.vs,f]),r.predecessors(i).length)){var l=r.node(r.predecessors(i)[0]),x=r.node(r.predecessors(f)[0]);c(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+l.order+x.order)/(p.weight+2),p.weight+=2}return p}function pd(r,e){d(r,function(t){t.vs=R(t.vs.map(function(o){return e[o]?e[o].vs:o}))})}function ld(r,e){I(r.barycenter)?(r.barycenter=e.barycenter,r.weight=e.weight):(r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight)}function Wn(r){var e=Ne(r),t=Un(r,M(1,e+1),"inEdges"),o=Un(r,M(e-1,-1,-1),"outEdges"),n=Mn(r);jn(r,n);for(var a=Number.POSITIVE_INFINITY,i,f=0,s=0;s<4;++f,++s){cd(f%2?t:o,f%4>=2),n=rr(r);var u=Rn(r,n);ui||f>e[s].lim));for(u=s,s=o;(s=r.parent(s))!==u;)a.push(s);return{path:n.concat(a.reverse()),lca:u}}function xd(r){var e={},t=0;function o(n){var a=t;d(r.children(n),o),e[n]={low:a,lim:t++}}return d(r.children(),o),e}function _d(r,e){var t={};function o(n,a){var i=0,f=0,s=n.length,u=Q(a);return d(a,function(m,p){var l=gd(r,m),x=l?r.node(l).order:s;(l||m===u)&&(d(a.slice(f,p+1),function(h){d(r.predecessors(h),function(v){var w=r.node(v),T=w.order;(Tu)&&Yn(t,l,m)})})}function n(a,i){var f=-1,s,u=0;return d(i,function(m,p){if(r.node(m).dummy==="border"){var l=r.predecessors(m);l.length&&(s=r.node(l[0]).order,o(i,u,p,f,s),u=p,f=s)}o(i,u,i.length,s,a.length)}),i}return Y(e,n),t}function gd(r,e){if(r.node(e).dummy)return Ir(r.predecessors(e),function(t){return r.node(t).dummy})}function Yn(r,e,t){if(e>t){var o=e;e=t,t=o}var n=r[e];n||(r[e]=n={}),n[t]=!0}function bd(r,e,t){if(e>t){var o=e;e=t,t=o}return c(r[e],t)}function yd(r,e,t,o){var n={},a={},i={};return d(e,function(f){d(f,function(s,u){n[s]=s,a[s]=s,i[s]=u})}),d(e,function(f){var s=-1;d(f,function(u){var m=o(u);if(m.length){m=z(m,function(v){return i[v]});for(var p=(m.length-1)/2,l=Math.floor(p),x=Math.ceil(p);l<=x;++l){var h=m[l];a[u]===u&&s * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) */