!function(G,y){"use strict";var s="ht",O=s+".layout.",W=G[s]||module.parent.exports.ht,K=null,F=W.Default,g=F.def,M=W.List,x=W.Node,e=W.Edge,t=W.Group,r=Math,X=r.floor,E=r.ceil,i=r.sqrt,c=r.max,h=r.min,n=r.abs,C=r.cos,L=r.sin,H=r.PI,R=2*H,z=H/2,Z=r.atan,w=r.atan2,Q=r.random,P=r.pow,k=Number.MAX_VALUE,S=Number.MIN_VALUE,j="circular",m="symmetric",u="hierarchical",J="towardnorth",T="towardsouth",v="towardeast",q="towardwest",D=function(){throw"Oops!"},l=function(z){return j===z?new $f:m===z?new kc:u===z?new Zm:z===J||z===T||z===v||z===q?new $p:K},$=function(h){return h===q?new U(z):h===v?new U(-z):h===J?new U(H):K},U=function(D){this.s=L(D),this.c=C(D)};U.prototype.tf=function(f,n){return 1===arguments.length&&(n=f.y,f=f.x),{x:this.c*f-this.s*n,y:this.s*f+this.c*n}};var Y=function(p,j){this.x=p,this.y=j};g(Y,y,{equals:function(V){return this===V?!0:V instanceof Y?V.x===this.x&&V.y===this.y:!1}});var I=function(u,f){this.width=u,this.height=f};g(I,y,{});var p=function(J,C){this.x=J,this.y=C};g(p,y,{});var B=function(){var O=arguments;2===O.length?(B.superClass.constructor.call(this,O[1].width,O[1].height),this.x=O[0].x,this.y=O[0].y):(B.superClass.constructor.call(this,O[2],O[3]),this.x=O[0],this.y=O[1])};g(B,I,{});var N=function(S,W){if(N.a2(S.x,W.x))this._a=1,this._b=0,this._c=-S.x;else{this._b=-1;var g=(W.y-S.y)/(W.x-S.x),V=S.y-S.x*g;this._a=g,this._c=V}};g(N,y,{a3:function(){return this._a},a4:function(){return this._b},a5:function(){return this._c}}),N.a6=function(s,O){if(N.a1(s.a3())&&N.a1(O.a3()))return K;if(N.a1(s.a4())&&N.a1(O.a4()))return K;if(N.a1(O.a4())){var E=s;s=O,O=E}var h,A,q=s.a3(),m=s.a4(),d=-s.a5();N.a1(s.a3())?(h=O.a4(),A=-O.a5()):(h=O.a4()-O.a3()/s.a3()*s.a4(),A=-O.a5()-O.a3()/s.a3()*-s.a5());var v=A/h,I=(d-v*m)/q;return new Y(I,v)},N.a1=function(P){return N.a2(P,0)},N.a2=function(e,M){return n(e-M)<1e-5};var V=function(K){if(this._a=new lq,K)for(var A=0;Ah;h++)G[h]=new Uf;for(;R.i1();R.i2())G[K.i2(R.i9())].ae(R.i9());return G},a:function(U,o,Y,E){for(o.c(U),Y.i7(U,E);!o.a();){U=o.b();for(var Q=U.ag();Q;Q=Q.a8()){var R=Q.a3();-1===Y.i2(R)&&(Y.i7(R,E),o.c(R))}for(var C=U.ae();C;C=C.a7()){var H=C.a2();-1===Y.i2(H)&&(Y.i7(H,E),o.c(H))}}},a1:function(G,n,Y){var s=new Dn(n,Y);return s.a8(G),s._i},a5:function(K,s,C){for(var L=[],e=0;C>e;e++)L[e]=new Nm;for(var m=K.xf();m.i1();m.i2())L[s.i2(m.i8())].aa(m.i8());return L},a7:function(x){var q=new Nm,b=An.a3(Rp.b(x.xa())),w=An.a4(Rp.a(x.xh())),L=a.a1(x,w,b),M=a.a5(x,w,L);if(M.length>1){for(var y=new Uf,h=0;hK._a?(K._c=K._a,K._b=K._d,K._a=x._a+1,K._d=b):x._a+1>K._c&&(K._c=x._a+1,K._b=b)}});var Cq=function(F){this._a=F};g(Cq,Ec,{a3:function(T,e,t){t&&T.a2()===e&&this._a.ac(T)}});var Gf=function(){this._a=0,this._c=0};g(Gf,y,{});var Tl=function(){this._a=0};g(Tl,y,{a1:function(C,K){this._a=0;for(var a=K.length-1;a>=0;a--)K[a]=-1;for(var c=C.x9();c.i1();c.i2()){var g=c.i9();if(0===g.ak()){this.a2(g,g.al(),K);break}}for(var U=C.x9();U.i1();U.i2()){var Q=U.i9(),j=Q.al();-1===K[j]&&this.a2(Q,j,K)}},a2:function(l,j,M){M[j]=-2;for(var P=l.ag();P;){var Q=P.a3(),k=Q.al();switch(M[k]){case-1:this.a2(Q,k,M);case-2:default:P=P.a8()}}M[j]=this._a++}});var np={a1:function(q){var O=new bn;return O.a8(q),O._n},a2:function(L){var E,u=L.x9(),M=0;for(u.i4();u.i1();u.i2())0===u.i9().ak()&&(E=u.i9(),M++);if(1===M)return E;for(M=0,u.i4();u.i1();u.i2())0===u.i9().ao()&&(E=u.i9(),M++);return 1===M?E:np.a8(L)},a8:function(i){var P=Rp.a(i.x0()),D=An.a2(P);return np.a6(i,D)},a6:function(t,e){var b=t.xd(),n=Rp.d(1),q=Rp.a(t.x0(),-1),d=np.a4(t,b);np.a7(b,e,n,q,-1);for(var X=d.c1();X.i1();X.i2())t.x3(X.i8());return n[0]},a7:function(j,u,r,k,q){for(var x=0,X=j.ag();X;X=X.a8()){var Z=X.a3(),h=np.a7(Z,u,r,k,q);h>q&&(q=h),x+=k[Z.al()]}for(var O=x*(j._g.xa()-1-x),s=j.ag();s;s=s.a8())for(var Q=s.a3(),z=s.a8();z;z=z.a8()){var w=z.a3();O+=k[Q.al()]*k[w.al()]}return u.i7(j,O),k[j.al()]=x+1,O>q&&(q=O,r[0]=j),q},a4:function(J,G){var l=new Nm,X=new Cq(l);X.a6(!1),X.a9(J,G);for(var x=l.c1();x.i1();x.i2())J.x3(x.i8());return l},a3:function(R){return np.a4(R,np.a2(R))}},bn=function(){this._n=!0,this.a6(!1)};g(bn,Ec,{a3:function(i,W,Q){Q||(this._n=!1)},a1:function(){this._n=!1}});var Dn=function(Y,R){this._i=0,this._m=R,this._j=Y,this._l=!1};g(Dn,Ec,{a8:function(C){this._h=Rp.a(C.x0()),this._k=Rp.a(C.x0()),this._g=new Lj(C.xh()),Dn.superClass.a8.call(this,C)},a5:function(O,k){this._k[O.al()]=this._h[O.al()]=k},a3:function(X,O,Q){if(this._g.c(X),!Q){var U=X.a1(O);this._h[U.al()]=h(this._h[U.al()],this._k[O.al()])}},a1:function(){this._l=!1},a2:function(D,Y){var H=D.a1(Y);if(this._h[Y.al()]>=this._k[H.al()]){for(;this._g.d()!==D;this._j.i5(this._g.b(),this._i));this._j.i5(this._g.b(),this._i),this._i++,this._g.a()?this._l?this._m.i5(H,!0):this._l=!0:this._m.i5(H,!0)}this._h[H.al()]=h(this._h[H.al()],this._h[Y.al()])}});var dm=function(b,n){this._h=!1,this._i=b,this._g=n};g(dm,y,{z1:function(W,t){W._c[this._i]=t},i1:function(a){return a._c[this._i]},i5:function(a,C){a._c[this._i]=C},i4:function(I){return I._c[this._i]},i7:function(z,c){z._c[this._i]=c},i2:function(K){var I=K._c[this._i];return I?I:0},i6:function(N,d){N._c[this._i]=d},i3:function(t){var K=t._c[this._i];return K?K:0},c:function(){return this._h},d:function(){this._h=!0}});var Nb=function($,j){this._c=!1,this._d=$,this._b=j};g(Nb,y,{i8:function(Z,E){Z._c[this._d]=E},i1:function(L){return L._c[this._d]},i7:function(v,$){v._c[this._d]=$},i4:function(t){var b=t._c[this._d];return b?b:!1},i5:function(E,r){E._c[this._d]=r},i2:function(j){var e=j._c[this._d];return e?e:0},i6:function(g,u){g._c[this._d]=u},i3:function(I){var H=I._c[this._d];return H?H:0},a:function(){return this._c},b:function(){this._c=!0}});var eb=function(h){this._bb=h,this.i4()};g(eb,y,{i1:function(){return this._aa!=K},i2:function(){this._aa=this._aa._a},i3:function(){this._aa=this._aa._b},i4:function(){this._aa=this._bb._b},i5:function(){this._aa=this._bb._c},i7:function(){return this._bb.ay()},i6:function(){return this._aa._c}});var zq=function(g){zq.superClass.constructor.call(this,g)};g(zq,eb,{i8:function(){return this.i6()}});var lq=function(R){if(this._id=lq.id(),this._a=0,R)for(R.i4();R.i1();R.i2())this.ae(R.i6())};g(lq,y,{ac:function(j){var f=this.ag(j);return this._b?(this._b._b=f,f._a=this._b,this._b=f):this._b=this._c=f,this._a++,f},ae:function($){var L=this.ag($);return this._c?(this._c._a=L,L._b=this._c,this._c=L):this._b=this._c=L,this._a++,L},z1:function(Z){Z._b=K,Z._a=K,this._c?(this._c._a=Z,Z._b=this._c,this._c=Z):this._b=this._c=Z,this._a++},ad:function(l){l._b=K,l._a=K,this._b?(this._b._b=l,l._a=this._b,this._b=l):this._b=this._c=l,this._a++},aa:function(F){return this.ae(F),!0},ab:function(e){for(;e.i1();e.i2())this.ae(e.i6())},ao:function(A,q){if(q===this._b)return this.ac(A);if(q){var l=this.ag(A);return this.aq(l,q),l}return this.ae(A)},aq:function(d,t){if(t)if(t===this._b)this.ad(d);else{if(this._c){var Y=t._b;t._b=d,d._a=t,Y._a=d,d._b=Y}else d._b=K,d._a=K,this._b=this._c=d;this._a++}else this.ad(d)},ap:function(v,o){if(o)if(o===this._c)this.z1(v);else{if(this._b){var t=o._a;o._a=v,v._a=t,t._b=v,v._b=o}else v._b=K,v._a=K,this._b=this._c=v;this._a++}else this.z1(v)},an:function(x,I){if(I===this._c)return this.ae(x);if(I){var w=this.ag(x);return this.ap(w,I),w}return this.ac(x)},ay:function(){return this._a},ar:function(){return 0===this._a},af:function(){this._b=this._c=K,this._a=0},am:function(){return this._b._c},at:function(){var f=this.am();return this.aw(this._b),f},as:function(){return this._c._c},au:function(){return this.aw(this._c)},ak:function(U){for(var V=0,H=this._b;H;){if(U===V)return H._c;H=H._a,V++}return K},aj:function(N){return N._a?N._a:this._b},ai:function(q){return q._b?q._b:this._c},aw:function(i){return i!==this._b?i._b._a=i._a:this._b=i._a,i!==this._c?i._a._b=i._b:this._c=i._b,this._a--,i._c},av:function(U){return this.aw(U._aa)},ah:function(){return new eb(this)},al:function(q){for(var X=this._b;X;){if(!X._c&&!q)return X;if(X._c===q)return X;X=X._a}return K},a0:function(){for(var z=Rp.d(this._a),M=0,n=this._b;n;)z[M]=n._c,n=n._a,M++;return z},ax:function(){for(var N=this._b;N;N=N._b){var U=N._a;N._a=N._b,N._b=U}var z=this._b;this._b=this._c,this._c=z},a1:function(m){var z=this.a0(),C=0;z.sort(m);for(var $=this._b;$;)$._c=z[C],$=$._a,C++},a2:function(){var r=this.a0();r.sort(Rp.c);for(var _=0,V=this._b;V;)V._c=r[_],V=V._a,_++},az:function(M){this._b?M._b&&(this._c._a=M._b,M._b._b=this._c,this._c=M._c):(this._b=M._b,this._c=M._c),this._a+=M._a,M._b=M._c=K,M._a=0},ag:function(b){return new Yk(b)}}),lq.id=function(){var Z=0;return function(){return++Z}}();var Nm=function(W){Nm.superClass.constructor.call(this,W)};g(Nm,lq,{c1:function(){return new zq(this)},c2:function(){return this.am()},c3:function(){return this.at()}});var cf=function(){this._c=0};g(cf,y,{a:function(T){this._c++,T._b=this._b,T._a=K,this._b?(this._b._a=T,this._b=T):this._b=this._a=T},b:function(X,E){if(!E)return this.a(X),void 0;var e=E._b;e?e._a=X:this._a=X,X._b=e,X._a=E,E._b=X,this._c++},c:function(n){var S=n._a,Q=n._b;this._c--,S?S._b=Q:this._b=Q,Q?Q._a=S:this._a=S}});var Eg=function(V,W){this._p=V,this._j=W,this._o=V._o[W]};g(Eg,y,{i1:function(){return this._o!=K},i2:function(){this._o=this._o._k[this._j]},i3:function(){this._o=this._o._f[this._j]},i4:function(){this._o=this._p._o[this._j]},i5:function(){this._o=this._p._q[this._j]},i7:function(){return this._p._n[this._j]},i6:function(){return this._o},i8:function(){return this._o}});var Yk=function(R){this._c=R};g(Yk,y,{a:function(){return this._a},b:function(){return this._b},c:function(N){this._c=N},d:function(){return this._c}});var Ei=function(A,M,k,t){this._r=A,this._s=M,this._q=k,this._p=t};g(Ei,y,{i1:function(J){return this._p[J.a5()]},i3:function(Q){return this._r[Q.a5()]},i2:function(B){return this._s[B.a5()]},i4:function(M){return this._q[M.a5()]},i8:function(h,B){this._p[h.a5()]=B},i6:function(h,G){this._r[h.a5()]=G},i5:function(H,b){this._s[H.a5()]=b},i7:function(H,v){this._q[H.a5()]=v}});var Lj=function(w){this._a=Rp.d(w),this._b=-1};g(Lj,y,{d:function(){return this._a[this._b]},b:function(){return this._a[this._b--]},c:function(x){this._a[++this._b]=x},a:function(){return this._b<0}});var hn=function(){};g(hn,y,{a0:function(T){this._c=Rp.d(T)}});var Sc=function(o,Z,Y,m,v,Q,f){this._g=0,o.xt(this,Z,Y,m,v,Q,f)};g(Sc,hn,{a5:function(){return this._h._u&&this._h.b1(),this._g},a2:function(){return this._d},a3:function(){return this._e},a1:function(q){return this._d!==q?this._d:this._e},a4:function(){for(var $=0;1>=$;$++)this._k[$]=K,this._f[$]=K},a8:function(){return this._k[0]},a7:function(){return this._k[1]},a6:function(X,g,j,V){this.a0(V),this._h=X,this._k=Rp.d(2),this._f=Rp.d(2),this._d=g,this._e=j}});var Mk=function(o){this._j=0,this._h=o,this.i4()};g(Mk,y,{i2:function(){this._k=this._k._k[this._j],this._k||0!==this._j||(this._k=this._h._o[1],this._j=1)},i3:function(){this._k=this._k._f[this._j],this._k||1!==this._j||(this._k=this._h._q[0],this._j=0)},i4:function(){this._k=this._h._o[0],this._k?this._j=0:(this._k=this._h._o[1],this._j=1)},i5:function(){this._k=this._h._q[1],this._k?this._j=1:(this._k=this._h._q[0],this._j=0)},i1:function(){return!!this._k},i6:function(){return this._k},i8:function(){return this._k},i7:function(){return this._h.ad()}});var yh=function(){this._a=Gg._A,this._b=Gg._A,this._c=new M};g(yh,y,{i1:function(){return this._c.size()},i2:function(v){return this._c.get(v)},i3:function(K,T,F){this._c.set(K,new Y(T,F))},i4:function(v,z){this._c.add(new Y(v,z))},i5:function(){this._c.clear()},i6:function(){return this._a},i7:function(){return this._b},i8:function(O){this._a=O},i9:function(S){this._b=S}});var jm=function(){this._x=0,this._y=0,this._w=0,this._h=0};g(jm,y,{i5:function(v,C){this._x=v,this._y=C},i6:function(g,h){this._w=g,this._h=h},i4:function(){return this._h},i3:function(){return this._w},i1:function(){return this._x},i2:function(){return this._y}});var ze=function(r,M,g,V){this._m=r,this._n=M,this._l=g,this._k=V};g(ze,y,{i1:function(H){return this._k[H.al()]},i3:function(I){return this._m[I.al()]},i2:function(Q){return this._n[Q.al()]},i4:function(j){return this._l[j.al()]},z1:function(K,E){this._k[K.al()]=E},i6:function(j,U){this._m[j.al()]=U},i7:function(A,n){this._n[A.al()]=n},i5:function(k,v){this._l[k.al()]=v}});var ao=function(f,U){this._b=f,this._r=U,this._a=[];for(var W=this._b-1;W>=0;W--)this._a.push(W);this._c=new M};g(ao,y,{a1:function(N){var H;if(0===this._a.length){this.a2(N,this._b,this._b+this._r);for(var P=this._b+this._r-1;P>this._b;P--)this._a.push(P);H=this._b,this._b+=this._r}else H=this._a.pop();return H},b:function(D){var U=this.a1(D),m=new dm(U,this);return this._c.add(m),this.a4(D,U),m},c:function(t){var q=this.a1(t),b=new Nb(q,this);return this._c.add(b),this.a4(t,q),b},a2:function(j,T,A){for(var g=j._a;g;g=g._a){var m=Rp.d(A);Rp.f(g._c,m,T),g._c=m}},a3:function(A,w,q){var K=Rp.d(q);Rp.f(A._c,K,w),A._c=K},a4:function(C,A){for(var D=C._a;D;D=D._a)D._c[A]=K},a5:function(Z,Y){if(Z instanceof dm){var N=Z;if(N.c())throw"";N.d();var F=Z._i;this._a.indexOf(F)<0&&(this.a4(Y,F),this._a.push(F),this._c.remove(Z))}},a6:function(N,e){if(N instanceof Nb){var g=N;if(g.a())throw"";g.b();var x=g._d;this._a.indexOf(x)<0&&(this.a4(e,x),this._a.push(x),this._c.remove(N))}}});var oh=function(f){this._id=lq.id(),this._p=0,f.xs(this)};g(oh,hn,{ad:function(){return this._n[0]+this._n[1]},ak:function(){return this._n[1]},ao:function(){return this._n[0]},al:function(){return this._g._y&&this._g.c(),this._p},ag:function(){return this._o[0]},ae:function(){return this._o[1]},af:function(){return new Mk(this)},am:function(){return new Eg(this,1)},ap:function(){return new Eg(this,0)},an:function(){return new Un(this)},aq:function(){return new Bo(this,1)},aw:function(){return new Bo(this,0)},ah:function(V){for(var d=this._o[0];d;d=d._k[0])if(d.a3()===V)return d;return K},ai:function(M){for(var Z=this._o[1];Z;Z=Z._k[1])if(Z.a2()===M)return Z;return K},aj:function(U){var s=this.ah(U);return s||(s=this.ai(U)),s},au:function(X){this.at(X,1,Rp.d(this.ak()))},av:function(x){this.at(x,0,Rp.d(this.ao()))},as:function(t,P){this.a0(P),this._g=t,this._o=Rp.d(2),this._q=Rp.d(2),this._n=Rp.a(2)},ab:function(E,S,L,T,G){if(!S)return this.aa(E,L,T),void 0;var o;if(o=S._d===S._e?T:this!==S._d?1:0,0===G){var e=S._k[o];E._f[T]=S,E._k[T]=e,S._k[o]=E,e?e._d===e._e?e._f[T]=E:e._f[this!==e._d?1:0]=E:this._q[L]=E}else{var O=S._f[o];E._k[T]=S,E._f[T]=O,S._f[o]=E,O?O._d===O._e?O._k[T]=E:O._k[this!==O._d?1:0]=E:this._o[L]=E}this._n[L]++},aa:function(m,l,Y){var V=this._q[l];m._k[Y]=K,V?(m._f[Y]=V,V._d===V._e?V._k[Y]=m:V._k[this!==V._d?1:0]=m):(this._o[l]=m,m._f[Y]=K),this._q[l]=m,this._n[l]++},ar:function(n,x,o){var h,T;h=n._k[o],T=n._f[o],h?h._f[h._d!==this?1:0]=T:this._q[x]=T,T?T._k[T._d!==this?1:0]=h:this._o[x]=h,this._n[x]--},ac:function(){for(var W=0;1>=W;W++)this._o[W]=K,this._q[W]=K,this._n[W]=0},at:function(k,U,H){if(!(this._n[U]<2)){for(var C=this._n[U],o=0,y=this._o[U];y;y=y._k[U])H[o]=y,o++;Rp.s(H,C,k);var s=1,D=this._o[U]=H[0];for(D._f[U]=K;C>s;)y=H[s],y._f[U]=D,D._k[U]=y,s++,D=y;this._q[U]=y,y._k[U]=K}}});var Bo=function(g,H){Bo.superClass.constructor.call(this,g,H),this._h=1!==H?1:0};g(Bo,Eg,{i6:function(){return this.i9()},i9:function(){return 0!==this._h?this._o._e:this._o._d}});var Un=function(W){Un.superClass.constructor.call(this,W)};g(Un,Mk,{i6:function(){return this._k.a1(this._h)},i9:function(){return this._k.a1(this._h)}});var jk=function(e){jk.superClass.constructor.call(this,e)};g(jk,eb,{i9:function(){return this.i6()}});var Zd=function(V){this._o=V,this._c=V._a};g(Zd,y,{i1:function(){return this._c!=K},i2:function(){this._c=this._c._a},i3:function(){this._c=this._c._b},i5:function(){this._c=this._o._b},i4:function(){this._c=this._o._a},i7:function(){return this._o._c},i6:function(){return this._c},i9:function(){return this._c},i8:function(){return this._c}});var Uf=function(h){if(h&&h.length){Uf.superClass.constructor.call(this);for(var i=0;i=s;s++)G[s]=new Bg(s);for(var k=this._g.x9();k.i1();k.i2()){var R=k.i9();(!W||W.i4(R))&&(this._f.z1(R,G[c.i2(R)-h].ac(R)),this._e++)}for(;VO;O++)G[O]=new lq;return z.c1(),this.a1(z.c1(),0,G),G},a1:function(m,S,r){r[S].ae(m);for(var T=m.aw();T.i1();T.i2())this.a1(T.i9(),S+1,r)},b:function(q){var G=q.c1();this._j2.s2(G,0,this._j2.g6(G)),this.g(G)},g:function(W){for(var J=W.aw();J.i1();J.i2()){var C=J.i9(),F=this._jy.i1(C);this._j2.s2(C,this._j2.g5(W)+F._c,this._j2.g6(C)),this.g(C)}},f:function(_){if(this._j3.c2(_))return this._jy.z1(_,new yc(this,_)),void 0;var X=_.aw(),K=X.i9();X.i2(),this.f(K);var H=this._jy.i1(K),s=new yc(this,H._a,H._b,0);if(!X.i1())return s._a.ac(new oq(this._j2.gj(_)/2,0)),s._b.ac(new oq(this._j2.gj(_)/2,0)),this._jy.z1(_,s),void 0;for(;X.i1();){K=X.i9(),X.i2(),this.f(K),H=this._jy.i1(K);for(var D=s._b.ah(),q=H._a.ah(),k=2147483647,r=0,l=0;D.i1()&&q.i1();){var P=D.i6();D.i2();var W=q.i6();q.i2(),l+=P._a,r+=W._a,k=h(k,r-l-P._b-W._b)}H._c=this._jv-k,r+=H._c;var F=H._b.am();if(F._a=H._c,D.i1()&&!q.i1())for(var w=l-this.a3(H._b);D.i1();w=0){var T=D.i6();D.i2(),H._b.ae(new oq(T._b,T._a+w))}else if(!D.i1()&&q.i1()){var Q=this.a3(s._a);for(Q=r-Q;q.i1();Q=0){var n=q.i6();q.i2(),s._a.ae(new oq(n._b,n._a+Q))}}s._b=H._b}this._jy.z1(_,s);for(var y=-H._c/2,V=_.aw();V.i1();){var C=V.i9();V.i2();var t=this._jy.i1(C);t._c+=y;var Y=t._b.am();Y._a+=y,Y=t._a.am(),Y._a+=y}s._a.ac(new oq(this._j2.gj(_)/2,0)),s._b.ac(new oq(this._j2.gj(_)/2,0))},a3:function(T){for(var Y=0,m=T.ah();m.i1();m.i2()){var a=m.i6();Y+=a._a}return Y}});var Ak=function(i){this._b=i,this.a()};g(Ak,y,{c1:function(){return this._a||this.a(),this._a},b:function(){return this._a?this.d(this._a):-1},d:function(H){for(var z=0,S=H.aw();S.i1();S.i2())z=c(z,this.d(S.i9()));return z+1},c2:function(A){return 0===A.ao()},a:function(){for(var Z=this._b.x9();Z.i1();Z.i2())if(0===Z.i9().ak())return this._a=Z.i9(),void 0}});var uo=function(f){this._d=0,this._e=0,this._f=0,this._a=0,this._b=0,this._g=f,this._c=new lq};g(uo,y,{a:function(){return this._d+this._e+this._f}});var Ml=function(){Ml.superClass.constructor.call(this),this._kl=340,this._km=360,this._kk=40,this._ko=.5};g(Ml,ei,{ic:function(){return this._km},ia:function(){return this._kl},i9:function(){return this._ko},i3:function(Y){if(!np.a1(Y))throw"";this._a=Y;var K=this.i8(),I=np.a4(Y,K);yg.c(Y),this._kn=Rp.d(Y.x0());for(var Q=Y.x9();Q.i1();Q.i2()){var p=Q.i9();p!==K?this.aa(p,new uo(this._kk+this.q(p.aq().i9()))):this.aa(p,new uo(this._kk))}this.s(K),Y.s2(K,0,0),this.t(K);for(var H;!I.ar();Y.x3(H))H=I.c3()},i4:function(s){return np.a1(s)},i0:function(u){return this._kn[u.al()]},i8:function(){return np.a2(this._a)},i7:function(J){for(var a,w=this.ib(J);;){if(a=this.i6(J),w>=a)break;for(var c=J.aw();c.i1();c.i2()){var o=c.i9();this.i0(o)._g*=1+this._ko}}var s=(w-a)/(2*J.ao());a=0;for(var k=J.aw();k.i1();k.i2()){var z=this.i0(k.i9());z._d+=s,z._e+=s,a+=z._d+z._e}this.id(J)},id:function(V){for(var E=Rp.d(V.ao()),L=0,p=V.ap();p.i1();)E[L]=p.i8(),p.i2(),L++;var k=this;E.sort(function(J,i){var v=J.a3(),q=i.a3(),M=k.i0(v).a()-k.i0(q).a();return M>0?1:M>=0?0:-1});for(var T=0;T0;L-=2)this._a.u1(E[L])},ib:function(c){return 0===c.ak()?this._km:2===c.ao()?h(180,this._kl):this._kl},i6:function(u){for(var L=0,P=u.ap();P.i1();P.i2()){for(var I,v=P.i8(),B=v.a3(),l=this.i0(B),y=-l._g,i=l._b,V=l._c,r=0,$=r+1,M=V._b,_=M.d();$>r;$=(I.y-i)/(I.x-y))I=_,M=V.ai(M),_=M.d(),r=(_.y-I.y)/(_.x-I.x);for(l._d=180*-Z($)/H,r=0,$=r-1,M=V._b,_=M.d();M.a().d().x===_.x;_=M.d())M=M.a();for(var O;r>$;$=(O.y-i)/(O.x-y))O=_,M=V.aj(M),_=M.d(),r=(_.y-O.y)/(_.x-O.x);l._e=180*Z($)/H,L+=l._d+l._e}return L},aa:function(J,G){this._kn[J.al()]=G},p:function(s){var F=this.i0(s),z=new lq,Q=2*this.q(s);z.aa(new Y(0,0)),z.aa(new Y(0,Q)),z.aa(new Y(Q,Q)),z.aa(new Y(Q,0)),F._c=z,F._a=Q/2,F._b=Q/2},r:function(O){if(0===O.ao())this.p(O);else{var H=this.i0(O),p=this.q(O),u=new lq;u.aa(new Y(-p,-p)),u.aa(new Y(-p,p)),u.aa(new Y(p,-p)),u.aa(new Y(p,p));for(var J=O.aw();J.i1();J.i2()){var t=this.i0(J.i9());u.az(t._c)}for(var n=Gg.h(u),q=k,y=k,x=S,z=S,A=n.ah();A.i1();A.i2()){var g=A.i6();g.xx&&(x=g.x),g.yz&&(z=g.y)}for(var W=new lq,F=n.ah();F.i1();F.i2()){var _=F.i6();W.aa(new Y(_.x-q,_.y-y))}H._c=W,H._a=-q,H._b=-y}},s:function(O){if(0===O.ao())this.r(O);else{for(var k=O.aw();k.i1();k.i2())this.s(k.i9());this.i7(O);for(var e=0,q=O.aw();q.i1();q.i2()){var F=q.i9(),y=this.i0(F),U=180-(360-this.ib(O))/2-e-(y._e+y._f);e+=y.a(),U=U/180*H;for(var p=L(U),A=C(U),D=y._c._b;D;D=D.a()){var z=D.d(),I=z.x+y._g,G=z.y-y._b,w=new Y(I*A-p*G,I*p+A*G);D.c(w)}var s=y._a+y._g;y._a=s*A,y._b=s*p}this.r(O)}},t:function(j){var q=this._a.g4(j),d=0;if(j.ak()>0){var u=j.aq().i9(),B=this._a.g4(u);d=H+w(B.y-q.y,B.x-q.x)}for(var Z=j.aw();Z.i1();Z.i2()){var D=Z.i9(),n=this.i0(D);if(0!==d){var s=C(d),g=L(d),h=n._a*s-g*n._b,k=n._a*g+s*n._b;n._a=h,n._b=k}this._a.s2(D,q.x+n._a,q.y+n._b),this.t(D)}},q:function(j){return 1.41*(c(this._a.gj(j),this._a.g9(j))/2)}});var wd=function(){};g(wd,y,{i2:function(d){return d.ad()},i1:D,i3:D,i4:D});var $l=function(h){this._a=h};g($l,y,{i2:function(N){for(var J=0,g=N.an();g.i1();g.i2())this._a.i1(g.i9())&&J++;return J},i4:function(x){return this._a.i1(x)==K},i1:D,i3:D});var De=function(){De.superClass.constructor.call(this),this._kq=!1,this._kp=90};g(De,Ml,{a:function(d,W){this._kr=W,this._ks=d,this._kq=!0},i7:function(R){if(!this.u(R))return De.superClass.i7.call(this,R),void 0;for(var T=this.i9(),H=this.ib(R),W=(360-H)/2+H,G=new Nm(R.ap());;){var z,M,$=this.i6(R),E=G._b;for($=(360-H)/2;E;E=E.a()){var L=E.d(),t=L.a3(),S=this.i0(t),V=this._ks.i3(L),C=V-($+S._e);if(C>=0&&V+S._d>=W&&(C=$+S.a()<=W?W-$-S.a():2*(W-(V+S._d))),S._f=0,C>=0)S._f=C,z=E,M=S;else{for(-C>S._d+S._e?C=(S._d+S._e)/2:C/=-2,$-=C,W>=$&&$+S.a()>W&&($+=C,C=$+S.a()-W,$-=C);z&&C>M._f;M=this.i0(z.d().a3()))if(C-=M._f,M._f=0,z=z.b(),!z){M=K;break}z?M._f-=C:$+=C}$+=S.a()}if(W>=$){for(var I=0,q=(360-H)/2,Q=R.ap();Q.i1();Q.i2()){var P=Q.i8(),y=P.a3(),f=this._ks.i3(P),i=this.i0(y),g=q+i._f+i._e;Is;s++)b[s]=new Uf,Q[s]=new Nm;for(var c=X.xf();c.i1();c.i2()){var D=c.i8();Q[O.i2(D.a2())].aa(D),X.h1(D)}for(var $=X.x9();$.i1();$.i2()){var q=$.i9();b[O.i2(q)].aa(q),X.h2($.i9())}for(var i=0;p>i;i++){for(var j=b[i].x1();j.i1();j.i2())X.h3(j.i9());for(var n=Q[i].c1();n.i1();n.i2())X.u1(n.i8());k=this.w3(X);for(var h=Q[i].c1();h.i1();h.i2())X.h1(h.i8());for(var Z=b[i].x1();Z.i1();Z.i2())X.h2(Z.i9());if(!k)break}for(var v=0;p>v;v++)for(var L=b[v].x1();L.i1();L.i2())X.h3(L.i9());for(var _=0;p>_;_++)for(var V=Q[_].c1();V.i1();V.i2())X.u1(V.i8());return X.xi(O),k}return!0},i2:function(w){if(!w.xb()){for(var x=w.xk(),$=a.a3(w,x),N=Rp.d($),m=Rp.d($),R=Rp.d($),H=Rp.d($),W=0;$>W;W++)N[W]=new Uf,m[W]=new Nm;for(var l=w.xf();l.i1();l.i2()){var J=l.i8();m[x.i2(J.a2())].aa(J),w.h1(J)}for(var q=w.x9();q.i1();q.i2()){var o=q.i9();N[x.i2(o)].aa(o),w.h2(q.i9()) }for(var d=0;$>d;d++){for(var u=N[d].x1();u.i1();u.i2())w.h3(u.i9());for(var e=m[d].c1();e.i1();e.i2())w.u1(e.i8());this.w4(w);var v=w.g3();R[d]=new B(v.x,v.y,v.width,v.height);var k={};if(H[d]=k,this._cf>0){var V=this._cg+E((v.width+1)/this._cf)*this._cf,U=this._cg+E((v.height+1)/this._cf)*this._cf;k.x=v.x,k.y=v.y,k.width=V,k.height=U}else k.x=v.x,k.y=v.y,k.width=v.width+this._cg,k.height=v.height+this._cg;for(var G=m[d].c1();G.i1();G.i2())w.h1(G.i8());for(var S=N[d].x1();S.i1();S.i2())w.h2(S.i9())}for(var t=0;$>t;t++)for(var Q=N[t].x1();Q.i1();Q.i2())w.h3(Q.i9());for(var I=0;$>I;I++)for(var j=m[I].c1();j.i1();j.i2())w.u1(j.i8());if(yg.a(H,K,this._ce/this._ch),this._cf<=0)for(var C=0;Cf;)r[f]=this.e(_.i9())+this._jo,e+=r[f],f++,_.i2();var q=e/$,D=e/R;G>D&&(D=G),_.i4();for(var p=0,B=0;$>B;){var U=d/q*r[B];p+=U/2;var E=C(p)*D,j=L(p)*D;p+=U/2,this._ju.s2(_.i9(),E,j),B++,_.i2()}return D},e:function(D){var b=this._ju.gj(D),S=this._ju.g9(D);return S>=b?S:b}});var $f=function(){$f.superClass.constructor.call(this),this._jm=new cs,this._jk=new De};g($f,ei,{i4:function(){return!0},i3:function(B){if(!(B.x0()<2)){this._jn=B,yg.c(this._jn),yg.e(this._jn);var R=new Nj(this._jn);R.a1(),R.h();var c=new Li(this._jn);c.a();for(var J=R.x9();J.i1();J.i2()){var O=J.i9(),Z=R.c2(O);if(Z.ay()>1){var P=R.d1(O);Li.h(this._jn,P.c1()),this._jm.i3(this._jn);var m=this._jn.g3();R.s7(O,m.width,m.height)}else if(1===Z.ay()){var d=Z.x2();R.s8(O,this._jn.gm(d)),this._jn.s2(d,0,0)}else R.s7(O,1,1);Li.i(this._jn,this._jn.xf())}c.b();var U=this.a7(R);np.a4(R,U);var s=R.xk(),b=R.xl();this.a2(R,b,s),this.a1(R,b),this.a3(R,U,b),this._jk.a(b,s),this._jk.i3(R),this.a5(R,U,s);for(var j=R.x9();j.i1();j.i2())for(var A=j.i9(),Q=R.g4(A),X=R.c2(A).x1();X.i1();X.i2()){var z=X.i9();this._jn.s2(z,Q.x+this._jn.g5(z),Q.y+this._jn.g6(z))}}},a7:function(W){for(var p,L=-1,B=W.x9();B.i1();B.i2()){var d=B.i9();W.c2(d).ay()>L&&(p=d,L=W.c2(d).ay())}return p},a1:function(z,_){for(var Q=function(Q,X){var t=_.i3(Q)-_.i3(X);return t>0?1:t>=0?0:-1},G=z.x9();G.i1();G.i2())G.i9().av(Q)},a2:function(j,F,K){for(var U=Rp.a(this._jn.x0()),f=j.x9();f.i1();f.i2())for(var D=f.i9(),b=j.c2(D),e=b.x1();e.i1();e.i2())U[e.i9().al()]=D.al();this.a4(j,np.a2(j),U,F,K)},a3:function(m,E,w){if(m.c2(E).ay()>1){for(var Q=0,O=0,t=0,J=E.ap();J.i1();J.i2()){var q=J.i8(),H=w.i3(q);H-Q>O&&(O=H-Q,t=(Q+H)/2),Q=H}360-Q>O&&(t=(360+Q)/2),this.a6(m,E,t);for(var M=E.ap();M.i1();M.i2()){var n=M.i8(),a=w.i3(n);for(a-=t;0>a;a+=360);w.i6(n,a)}E.av(function(Q,B){var E=w.i3(Q)-w.i3(B);return E>0?1:E>=0?0:-1})}},a4:function(T,e,$,B,F){for(var z=e.al(),c=F.i3(e),Q=e.ap();Q.i1();Q.i2()){for(var n=Q.i8(),N=T.b(n),u=0,d=0,j=0,b=0,m=N.c1();m.i1();m.i2()){var h,_,K=m.i8();$[K.a2().al()]===z?(h=K.a2(),_=K.a3()):(h=K.a3(),_=K.a2()),j-=this._jn.g5(h),b+=this._jn.g6(h),u-=this._jn.g5(_),d+=this._jn.g6(_)}if(0!==j||0!==b){var O;for(O=180*w(b,j)/H-c;0>O;O+=360);B.i6(n,O)}if(0!==u&&0!==d){var y=180*w(d,u)/H;0>y&&(y+=360),F.i6(n.a3(),y)}this.a4(T,n.a3(),$,B,F)}},a5:function(W,n,y){for(var u=W.g4(n),Z=n.ap();Z.i1();Z.i2()){var $=Z.i8(),L=$.a3(),i=W.g4(L),Q=180*w(i.y-u.y,i.x-u.x)/H;y.i1(L)&&(Q+=y.i3(L)),this.a6(W,L,Q),this.a5(W,L,y)}},a6:function(R,G,m){m=m/180*H;var w=R.c2(G);if(!(w.ay()<=1))for(var A=w.x1();A.i1();A.i2()){var e=A.i9(),U=this._jn.g5(e),D=this._jn.g6(e),h=C(m),Y=L(m),d=U*h-Y*D,u=U*Y+h*D;this._jn.s2(e,d,u)}}});var rc=function(){this._a=(new Date).getTime()};g(rc,y,{b:function(){return(new Date).getTime()-this._a}});var Gg={_A:new Y(0,0),b:function(t,e,s){return Gg.c(t.x,t.y,e.x,e.y,s.x,s.y)},c:function(W,c,x,_,C,G){x-=W,_-=c,C-=W,G-=c;var V=C*_-G*x;return V>=0?0>=V?0:-1:1},d:function(G,c,I){return Gg.b(G,c,I)>0},f:function(H,S,c){return Gg.b(H,S,c)<0},g:function(Z,b,G){return 0===Gg.b(Z,b,G)},h:function(n){return Gg.i(n)},i:function(B){var q=new lq(B.ah()),L=new lq;if(q.a2(),q.ar())return L;var y=q.at();for(L.ae(y);!q.ar()&&y.equals(q.am());q.at());if(q.ar())return L;y=q.at();for(var w=L.ae(y),E=q.ah();E.i1();E.i2()){var t=E.i6();if(!t.equals(y))if(y=t,2===L.ay()&&Gg.g(L.am(),L.as(),t))w.c(t);else{var U;for(U=w;!Gg.f(L.ai(U).d(),U.d(),t);U=L.ai(U));var A;for(A=w;!Gg.d(L.aj(A).d(),A.d(),t);A=L.aj(A));for(;A!==L.aj(U);L.aw(L.aj(U)));w=L.an(t,U)}}return L},j:function(){return Gg.k(k)},k:function(H){return X(Q()*H)},l:function($,E){return Q()*(E-$)+$}},Lf=function(){};g(Lf,y,{i1:function(m){this._b=m;var j=new Nm;j=a.a6(m),j.az(a.a7(m));for(var R=this.a1();!j.ar();m.x5(j.c3()));return R.x1()},a1:function(){if(this._b.x0()<3)return new Uf(this._b.x9());for(var h=this._b.xk(),o=this._b.xk(),X=this._b.xl(),L=new _d(this._b,new wd,0,this.a3(this._b)),b=this._b.x0(),d=new Nm,f=new Nm,I=new Li(this._b);b>3;b--){for(var Z=L.g(),l=Z.an();l.i1();l.i2())h.z1(l.i9(),b),o.i5(l.i9(),!1);for(var i=Z.an();i.i1();i.i2())for(var S=i.i9(),u=S.ap();u.i1();u.i2()){var W=u.i8();h.i2(W.a3())===b&&(f.aa(W),o.i5(W.a2(),!0),o.i5(W.a3(),!0))}if(f.ay()=Z.ad()-1)break}}}}for(var $=Z.an();$.i1();$.i2())L.b($.i9());for(var R=f.c1();R.i1();R.i2()){var _=R.i8();X.i4(_)&&(L.d(_.a2()),L.d(_.a3()))}d.az(f),I.e(Z)}I.b(),L.c();for(var T=d.c1();T.i1();T.i2()){var G=T.i8();G._h&&(X.i4(G)?this._b.x5(G):this._b.h1(G))}var s,j=this.a4(this._b),c=new Uf,n=j.ak(0),y=j.ak(1);s=n.a2()===y.a2()||n.a2()===y.a3()?n.a3():n.a2(),c.aa(s);for(var A=j.c1();A.i1();A.i2()){var z=A.i8();s=z.a1(s),c.aa(s)}for(var p=d.c1();p.i1();p.i2()){var F=p.i8();X.i4(F)||F._h||this._b.u1(F)}return this._b.xi(o),this._b.xj(X),this._b.xi(h),this.a2(c),c},a2:function(q){if(q.ay()R;R++)g[R]=new Gf;var E=new Bj(g);E.a6(!1),E.a8(s);for(var V,l=-1,M=s.x9();M.i1();M.i2()){var G=M.i9(),i=g[G.al()];i._a+i._c>l&&(l=i._a+i._c,V=G)}for(var h=new Nm,y=V,w=g[y.al()]._d;w;w=g[y.al()]._d)h.ac(w),y=w.a1(y);y=V;for(var P=g[y.al()]._b;P;P=g[y.al()]._d)h.ae(P),y=P.a1(y);return h}});var vk=function(){this._v=new cf,this._x=new cf,this._z=new ao(3,5),this._w=new ao(3,5),this._y=!1,this._u=!1,this._t={}};g(vk,y,{xm:function(){var q=new oh(this);return q},xo:function(c,V){return this.xn(c,K,V,K,0,0)},xn:function(U,g,y,u,N,i){return new Sc(this,U,g,y,u,N,i)},x4:function(W){this.b3(W)},b3:function(L){for(var Q;Q=L._o[0];)this.x5(Q);for(;Q=L._o[1];)this.x5(Q);this._v.c(L),L._g=K,this._y=!0},x5:function(M){this.a11(M)},a11:function(J){if(J._h!==this)throw"";this.a12(J,J.a2(),J.a3()),this._x.c(J),J._h=K,this._u=!0},x7:function(f){f._p=this._v._c,f._g=this,f.ac(),f._c.length$;$++){var D=K[$];D.ay()>M&&(y=D,M=D.ay())}return y},d2:function($,Y){for(var m=this._ay.xl(),A=this._ay.xk(),c=Y.length,J=0;c>J;J++)for(var L=Y[J],u=L.c1();u.i1();u.i2())m.i8(u.i8(),L);var i=this.c1(Y);this.a4(i,$,m,new M,A);var O={};c=Y.length;for(var E=0;c>E;E++){var I=Y[E];if(I.ay()>1){var n=this.xm();O[I._id]=n}}for(var w=this._ay.x9();w.i1();w.i2()){var k=w.i9();if($.i4(k)&&!A.i1(k)){var b=this.xm();O[k._id]=b;var v=new Uf;v.aa(k),this.a2(b,v)}}var G=Rp.d(2),W=0;for(c=Y.length;c>W;W++){var U=Y[W];if(1===U.ay()){var g=U.c2();G[0]=g.a2(),G[1]=g.a3();for(var r=0;2>r;r++){var Z=G[r];if(1===Z.ad()){var V=this.xm();O[Z._id]=V;var y=new Uf;y.aa(Z),this.a2(V,y)}}}}for(var Q=this._ay.x9();Q.i1();Q.i2()){var F=Q.i9();if(A.i1(F))for(var d=A.i1(F),o=O[d._id],T=F.af();T.i1();T.i2()){var C=T.i8();if(m.i1(C)!==d){var K=O[m.i1(C)._id];if(!K){var H=C.a1(F),S=A.i1(H);K=S?O[S._id]:O[H._id]}var s,z=o.aj(K);z?s=this.b(z):(z=this.xo(o,K),s=new Nm),s.aa(C),this.a3(z,s)}}else if($.i4(F))for(var R=O[F._id],h=F.af();h.i1();h.i2()){var j=h.i8(),q=j.a1(F),l=O[q._id];if(l){var N=R.aj(l);if(!N){var x=this.xo(R,l),B=new Nm;B.aa(j),this.a3(x,B)}}}}if(2===this._ay.x0()&&1===this._ay.xg()){var P=this._ay.xf().i8(),f=O[P.a2()._id],p=O[P.a3()._id];if(p&&f&&!p.aj(f)){var D=this.xo(f,p),t=new Nm;t.aa(P),this.a3(D,t)}}var e=Rp.a(this._ay.x0()),X=1;c=Y.length;for(var _=0;c>_;_++){var a=Y[_],gl=O[a._id];if(gl){var ep=this.c2(gl);ep||(ep=new Uf,this.a2(gl,ep));for(var xq=a.c1();xq.i1();xq.i2()){var Mb=xq.i8(),Kr=Mb.a2();e[Kr.al()]===X||$.i4(Kr)&&A.i1(Kr)!==a||(e[Kr.al()]=X,ep.aa(Kr)),Kr=Mb.a3(),e[Kr.al()]===X||$.i4(Kr)&&A.i1(Kr)!==a||(e[Kr.al()]=X,ep.aa(Kr))}}}this._ay.xj(m),this._ay.xi(A)},a4:function(Q,o,R,f,g){if(!f.contains(Q)){f.add(Q);for(var u=[],S=Q.c1();S.i1();S.i2()){var v=S.i8();u[0]=v.a2(),u[1]=v.a3();for(var G=0;2>G;G++){var b=u[G];if(o.i4(b)&&!g.i1(b)){Q.ay()>1&&g.z1(b,Q);for(var B=b.af();B.i1();B.i2())this.a4(R.i1(B.i8()),o,R,f,g)}}}}}});var im=function(d,c,s){this._a={},im.superClass.constructor.call(this);for(var L=new M,z=0,J=c.size();J>z;z++){var T=c.get(z);if(T instanceof e)L.add(T);else{T instanceof t&&T.setExpanded(!0);var g=d.getNodeSize(T);if(T instanceof t&&T.setExpanded(!1),g){var C=this.xm(),P=d._repulsion;s!==j||T instanceof t?s===j?P*=1.1:s===m&&(P*=.9):P*=.6,s===v||s===q?this.s7(C,g.height*P,g.width*P):this.s7(C,g.width*P,g.height*P),C.node=T,this._a[T.getId()]=C}}}for(z=0,J=L.size();J>z;z++){var y=L.get(z),B=y.getSourceAgent(),H=y.getTargetAgent(),u=this._a[B.getId()],h=this._a[H.getId()];u&&h&&u!==h&&this.xo(u,h)}};g(im,qq,{});var yg={_D:new V,_E:new Y(0,0),b:function(I){if(I.i1()>0){for(var L=new M,o=I.i1()-1;o>=0;o--)L.add(I.i2(o));I.i5();for(var J=0,u=L.size();u>J;J++){var i=L.get(J);I.i4(i.x,i.y)}}var b=I.i6();I.i8(I.i7()),I.i9(b)},c:function(n){yg.d(n,!0)},d:function(r,k){if(k)for(var P=r.xf();P.i1();P.i2()){var Y=P.i8();r.gt(Y,yg._E),r.gz(Y,yg._E),r.s5(Y,yg._D)}else for(var B=r.xf();B.i1();B.i2())r.s5(B.i8(),yg._D)},e:function(t){for(var F=new Y(0,0),g=t.xf();g.i1();g.i2()){var S=g.i8();t.gt(S,F),t.gz(S,F)}},f:function(h,O,u,G){for(var $=h.gc(O).b(),H=Rp.d($),g=0,A=h.gc(O).c();A.i1();A.i2()){var l=A.i6();(0>=g||!l.equals(H[g-1]))&&(H[g]=new Y(l.x,l.y),g++)}if($=g,!(2>$)){var R=new M,E=yg.i(new p(H[1].x-H[0].x,H[1].y-H[0].y));E.x*=G,E.y*=G;for(var t=yg.h(H[0],E),I=yg.h(H[1],E),X=new N(t,I),T=1;$-1>T;T++){var r=X,Q=yg.i(new p(H[T+1].x-H[T].x,H[T+1].y-H[T].y));Q.x*=G,Q.y*=G;var C=yg.h(H[T],Q),z=yg.h(H[T+1],Q);X=new N(C,z);var b=N.a6(r,X);b&&R.add(new Y(b.x,b.y))}var S=new p(H[$-1].x-H[$-2].x,H[$-1].y-H[$-2].y);S=yg.i(S),S.x*=G,S.y*=G;var D=yg.h(H[$-1],S),y=new V(R);O.a2()===u.a2()?(h.s5(u,y),h.m2(u,t,D)):(h.s5(u,y.a()),h.m2(u,D,t))}},g:function(_,X,S,T){for(var o=T,R=S.c1();R.i1();R.i2()){var M=R.i8();yg.f(_,X,M,o),0>o&&(o-=T),o=-o}},a:function(v,K,i){return yg.j(v,K,i,1)},l:function(J,Y,z){if(!J||J.length<1)return Y&&(Y.x=0,Y.y=0,Y.width=0,Y.height=0),{width:0,height:0};for(var d=0,x=0,M=0;Mj*o?(h=j,l=o):(h=r,l=A);var g,W=0,C=0,O=0,e=0;if(d>x)for(var v=0;v=h&&(W++,C=0);else for(var H=0;H=l&&(C++,W=0);return Y&&(Y.x=0,Y.y=0,Y.width=O,Y.height=e),{width:l,height:h}},j:function(R,F,f){if(!R||R.length<1)return F&&(F.x=0,F.y=0,F.width=0,F.height=0),0;for(var m,L,n=m=R[0].width,x=L=R[0].height,V=R.length,z=1;V>z;z++){var l=R[z].width;n=h(n,l),m=c(m,l);var I=R[z].height;x=h(x,I),L=c(L,I)}if(x/L>.95&&n/m>.95)return yg.l(R,F,f).width;for(var N=new lq,T=0,u=0;V>u;u++){var b=R[u];N.aa(R[u]),T=X(T+b.width*b.height)}N.a1(function(Q,v){var J=X(v.height)-X(Q.height);return 0===J?X(v.width)-X(Q.width):J});var g=0,$=0,C=X(f*i(T/f)),p=C,E=0,O=new lq;do{var M,v,A=new lq,d=M=v=0;O.aa(A);for(var o=N.ah();o.i1();o.i2()){var D=o.i6();d+D.width>p&&A.ay()>0?(v=c(v,d),A=new lq,A.aa(D),O.aa(A),d=X(D.width)):(A.aa(D),d=X(d+D.width)),1===A.ay()&&(M=X(M+A.am().height))}v=c(v,d),f*M>v&&E!==v&&(O.af(),p=X(1.1*p),E=v)}while(O.ar());for(var S=0,q=O.ah();q.i1();q.i2()){for(var e=0,j=q.i6(),Z=j.ah();Z.i1();Z.i2()){var Y=Z.i6();Y.x=e,Y.y=S,e+=Y.width}g=c(g,e),S+=yg.k(j),$=c($,S)}return F&&(F.x=0,F.y=0,F.width=g,F.height=$),O.ay()},k:function(J){for(var k=0,t=J.ah();t.i1();t.i2())k=c(t.i6().height,k);return k},h:function(g,D){return new Y(g.x+D.x,g.y+D.y)},i:function(I){var v=i(I.x*I.x+I.y*I.y);return new p(-I.y/v,I.x/v)}},Jo=function(s){this._a=s,this._b=!1};g(Jo,y,{a:function(){return this._b},b:function(){return this._a},c:function(){return 1===this._a},d:function(){return 2===this._a},e:function(){return 4===this._a},f:function(){return 8===this._a},g:function(){return 0===this._a}}),Jo.h=function(z,p){var y=z.xc("A");return y?y.i1(p):K},Jo.i=function(B,k){var I=B.xc("B");return I?I.i1(k):K},Jo.j=function(U){switch(U){case 1:return Jo.k;case 2:return Jo.l}return K},Jo.k=new Jo(1),Jo.l=new Jo(2);var rl=function(g,h,d,_,W){this._o=0,this._l=0,this._i=0,this._d=0,this._f=0,this._b=g,this._a=1e-4,this._r=h,this._p=1,this._e=(W.gj(g)+W.g9(g))/4;var U=.45*d*i(_);this._k=Gg.l(-U,U),this._h=Gg.l(-U,U),this._g=Gg.l(-U,U)};g(rl,y,{});var ps=function(){this._a=0,this._c=0,this._b=0};g(ps,y,{});var kc=function(){kc.superClass.constructor.call(this),this._dj=0,this._dh=0,this._dq=0,this._dp=0,this._dt=0,this._de=0,this._d3=0,this._dr=0,this._ed=0,this._dw=.65,this._ea=1,this._dl=80,this._dx=3,this._d8=!0,this._eb=3e5,this._ee=2,this._di=2,this._df=1e3};g(kc,ei,{i4:function(){return!0},i3:function(M){if(M&&(this._d5=M,this.s(M))){var d=new ps,I=0,v=X(this._dx*this._dz.length*this._dz.length+20*this._dz.length);v=c(v,1e4);var u=this._ea*this._ea*this._dz.length,z=this._df;try{for(;this._dj>u&&v>I;I++){var j=this.b(2147483647&I);0===z--&&(this._dy.b()>this._eb&&(I=v),z=this._df),this.h(j,d),this.d(j,d),this.i(j,d),this._d8?(this.g(j,d),this.j(j,d)):(this.f(j,d),this.c(j,d));var W=i(d._a*d._a+d._c*d._c+d._b*d._b);this.ac(j,d,W),this.aa(j,d,W)}}finally{this.r()}}},s:function(V){if(!V||V.xa()<1)return!1;this._d5=V,this._dp=1,this._dy=new rc,this._dt=V.x0(),this._d2=Rp.d(this._dt),this._df=1+1e5/this._dt,this._ed=1/(2*this._di),this._de=this._ed*this._ee/(.05*this._dl),this._d3=P(this._dl,-1)*this._ed,this._dr=P(this._dl,3)*this._ed,this._dj=0,this._du=new ps,this._dq=c(20*this._dl,10);var W=c(.1,h(this._dw*this._dl,this._dq)),S=this._dt;yg.c(V),this._dz=Rp.d(S);for(var n=V.x9();n.i1();n.i2()){var j=n.i9(),M=new rl(j,W,this._dl,this._dt,V);this._dz[--S]=M,this._dj+=M._r,this._dh+=M._r*M._r,this._du._a+=M._k,this._du._c+=M._h,this._du._b+=M._g,this._d2[j.al()]=M}return this._d8=!1,this._dz.length>0},b:function(L){var D=this._dz.length,n=D-L%D-1,l=Gg.k(n+1),W=this._dz[l];return this._dz[l]=this._dz[n],this._dz[n]=W,W},f:function($,y){for(var k,L,t=k=L=0,s=$._b.ae();s;s=s.a7()){var z,g=this._d2[s.a2().al()],B=g._k-$._k,A=g._h-$._h,M=g._g-$._g,b=B*B+A*A+M*M,f=i(b),P=f-(g._e+$._e);0>=P||(z=P*P*this._d3/f,t+=B*z,k+=A*z,L+=M*z)}for(var j=$._b.ag();j;j=j.a8()){var a,p=this._d2[j.a3().al()],V=p._k-$._k,h=p._h-$._h,T=p._g-$._g,I=V*V+h*h+T*T,o=i(I),R=o-(p._e+$._e);0>=R||(a=R*R*this._d3/o,t+=V*a,k+=h*a,L+=T*a)}y._a+=t,y._c+=k,y._b+=L},g:function(m,F){var C,l,X=C=l=0;this._dp++,m._f=this._dp;for(var T=m._b.ae();T;T=T.a7()){var N=this._d2[T.a2().al()];N._f=this._dp;var Y=N._k-m._k,P=N._h-m._h,B=N._g-m._g,G=Y*Y+P*P+B*B,s=i(G);if(0!==s){var o=c(1e-6,s-(m._e+N._e)),$=-this._ef[T.a5()]/(o*o);$+=o*o*this._d1[T.a5()],$/=s,X+=Y*$,C+=P*$,l+=B*$}}for(var t=m._b.ag();t;t=t.a8()){var h=this._d2[t.a3().al()];h._f=this._dp;var W=h._k-m._k,Q=h._h-m._h,f=h._g-m._g,j=W*W+Q*Q+f*f,d=i(j);if(0!==d){var g=c(1e-6,d-(m._e+h._e)),p=-this._ef[t.a5()]/(g*g);p+=g*g*this._d1[t.a5()],p/=d,X+=W*p,C+=Q*p,l+=f*p}}F._a+=X,F._c+=C,F._b+=l},j:function(B,r){for(var L,h,q=L=h=0,V=this._dt-1;V>=0;V--){var e=this._d2[V];if(e._f!==B._f){var S=B._k-e._k,p=B._h-e._h,D=B._g-e._g,a=S*S+p*p+D*D;if(0!==a){var f=i(a),o=c(1e-6,f-(B._e+e._e)),O=this._dr/(o*o*f);q+=S*O,L+=p*O,h+=D*O}}}r._a+=q,r._c+=L,r._b+=h},c:function(P,$){for(var p,G,u=p=G=0,f=this._dt-1;f>=0;f--){var H=this._d2[f],g=P._k-H._k,l=P._h-H._h,s=P._g-H._g,T=g*g+l*l+s*s;if(0!==T){var k,E=i(T),D=E-(P._e+H._e);k=0>=D?this._dr/(1e-8*E):this._dr/(D*D*E),u+=g*k,p+=l*k,G+=s*k}}$._a+=u,$._c+=p,$._b+=G},i:function(X,C){var j=this._du._b/this._dt-X._g;C._b+=j*this._dl*this._dt/this._dh},d:function(f,B){if(0!==this._de){var T=this._du._a/this._dt-f._k,E=this._du._c/this._dt-f._h,w=this._du._b/this._dt-f._g;B._a+=T*this._de,B._c+=E*this._de,B._b+=w*this._de}},h:function(D,n){var Y=.05*(D._r+2);Y>0&&(n._a=Gg.l(-Y,Y),n._c=Gg.l(-Y,Y),n._b=Gg.l(-Y,Y))},ac:function(H,v,J){if(0!==J&&0!==H._a){var s=v._a*H._o+v._c*H._l+v._b*H._i,x=s/(J*H._a);this._dh-=H._r*H._r,this._dj-=H._r,H._r+=H._p*x>0?.45*x:.15*x,H._r>this._dq?H._r=this._dq:H._r<.1&&(H._r=.1),this._dj+=H._r,this._dh+=H._r*H._r,H._p=x}},aa:function(E,X,o){if(o>0){var P=E._r/o,M=X._a*P,v=X._c*P,Y=X._b*P;E._k+=M,E._h+=v,E._g+=Y,this._du._a+=M,this._du._c+=v,this._du._b+=Y,E._a=o,E._o=X._a,E._l=X._c,E._i=X._b}},r:function(){for(var E=this._d2.length-1;E>=0;E--){var n=this._d2[E];this._d5.s2(n._b,n._k,n._h)}}});var $c=function(i,X){this._e=i,this._f=X,this._c={}};g($c,y,{r:function(){for(var k in this._c){var e=this._c[k];e.g.setExpanded(e.b)}},p:function(){for(var R=new M,S=new M,B=new M,$=0,I=this._f.size();I>$;$++){var n=this._f.get($);if(n instanceof e)n.isLooped()||R.add(n);else if(n instanceof x){if(n.getParent()instanceof t){n instanceof t||S.add(n);continue}R.add(n),n instanceof t&&(B.add(n),this.l(n))}}return S.each(function(X){for(var G=!0,L=0;Li;i++)if(n=v.get(i),n instanceof t&&(this.l(n),n.setExpanded(!1)),n instanceof e||I.contains(n)||I.add(n),n instanceof x){var L=n.getEdges();if(L)for(var N=0,D=L.size();D>N;N++){var u=L.get(N);I.contains(u)||I.add(u)}}var Y=new im(this._e,I,E);try{h.i2(Y);var A=$(E);for(var z in Y._a){var T=Y._a[z],f=Y.g4(T);T.node.p(A?A.tf(f):f)}}catch(B){}H.eachChild(function(r){r instanceof t&&r.setExpanded(!0)})}}}});var lk=function(){};g(lk,y,{i1:function(J,G,T){var l=this.a1(J,G);return this.a2(J,G,T),l},a1:function(K,w){var y=lk.i4(K);y.ax();for(var Y=0,F=y.x1();F.i1();F.i2())w.i7(F.i9(),-1);for(var q=y.x1();q.i1();q.i2()){for(var $=q.i9(),P=-1,G=$.aq();G.i1();G.i2())P=c(P,w.i2(G.i9()));w.i7($,P+1),Y=c(Y,P+1)}return Y+1},a2:function(A,$,b){b.az(lk.i3(A,$))}}),lk.i3=function(Z,I){for(var v=new Nm,B=Z.xf();B.i1();B.i2()){var r=B.i8();I.i2(r.a2())>I.i2(r.a3())&&(Z.x3(r),v.ac(r))}return v},lk.i4=function(b){var A=Rp.a(b.xa());return(new Tl).a1(b,A),lk.i2(b,A)},lk.i2=function(n,Z){for(var Q=Rp.d(n.x0()),H=n.x9();H.i1();H.i2()){var q=H.i9(),w=q.al();Q[Z[w]]=q}return new Uf(Q)};var Tk=function(){Tk.superClass.constructor.call(this),this.c0()};g(Tk,Nm,{c0:function(){this._bc=1,this._bd=0}});var qb=function(){this._m1=20,this._m2=60,this._m3=5,this._m4=0};g(qb,y,{i4:function(F){this._m3=F},i5:function(Y){this._m4=Y},i3:function(m){this._m1=m},i6:function(H){this._m2=H},i2:function(P){this._m5=P},t1:function(){return this._m2},a1:function(k,t){for(var i=Rp.d(t.length),D=0;DF;U=U.a7())F++;for(;v>=F&&!D;F++){var c=this._m6.g2(U),r=U.a2(),b=r.al();this._i[$]===N&&!this._e[U.a5()]&&hl&&(M[J]+=l)}},td:function(E,A,W){var g=A.al();if(W[g]===k){W[g]=0;var K=A,R=0;do{var N=K.al();if(N!==g&&(R-=this._g[N]),this._l[N]>0){var y=this._b[N],Y=this._m[this._b[N].al()],I=Y.al();this.td(E,Y,W),this._o[g]===A&&(this._o[g]=this._o[I]),this._o[g]===this._o[I]&&(W[g]=c(W[g],W[y.al()]+this.ti(E,y,K)-R))}R+=this._j[N],K=this._i[N]}while(K!==A);R=0,K=A;do{var G=K.al();G!==g&&(R-=this._g[G]),W[G]=W[g]+R,R+=this._j[G],K=this._i[G]}while(K!==A)}},tk:function(m,d,A){var D=d.al();if(!this._d[D]){this._d[D]=!0;var L=d;do{var G=L.al(),O=this._k[G];if(O){var K=O.al(),x=this._o[this._m[K].al()];if(x!==this._o[D]){var o=A[K]-A[D]-this.ti(m,L,O);this._c[x.al()]!==k&&(o+=this._c[x.al()]),this._c[this._o[D].al()]=h(this._c[this._o[D].al()],o)}else this.tk(m,this._m[K],A)}L=this._i[G]}while(L!==d)}},tc:function(J){for(var c=Rp.a(4),y=Rp.a(4),h=J.x9();h.i1();h.i2()){var M=h.i9().al();y[0]+=this._f[0][M],y[1]+=this._f[1][M],y[2]+=this._f[2][M],y[3]+=this._f[3][M]}y[0]/=J.xa(),y[1]/=J.xa(),y[2]/=J.xa(),y[3]/=J.xa();for(var v=J.x9();v.i1();v.i2()){var I=v.i9(),e=I.al(),a=J.g4(I);c[0]=this._f[0][e]-y[0],c[1]=this._f[1][e]-y[1],c[2]=this._f[2][e]-y[2],c[3]=this._f[3][e]-y[3],c.sort(Rp.n),J.s1(I,new Y((c[1]+c[2])/2,a.y))}},ti:function(S,z,y){var J,r=S.gj(z),v=S.gj(y);return J=r>1&&v>1?this._m1+(r+v)/2:this._m3+(r+v)/2,this._l[z.al()]E;E++)for(var d=-1,Q=0,t=0,S=A[E].x1(),T=A[E].x1();T.i1();T.i2()){var M,n=T.i9(),j=!1;if(1===n.ak()&&(M=n.ae().a2(),s.i1(M)&&s.i1(n)&&(j=!0)),t===A[E].ay()-1||j){for(var i=j?X[M.al()]:A[E-1].ay();t>=Q;Q++){for(var D=S.i9(),Z=D.am();Z.i1();Z.i2()){var l=Z.i8(),B=X[l.a2().al()];(d>B||B>i)&&N.i7(Z.i8(),!0)}S.i2()}d=i}t++}}});var Lr=function(G,I){this._b=20,this._a=I,this._d=G,this._f={}};g(Lr,y,{a3:function(y){this._b=y},a4:function(t,y,e,H,s){if(this.a2(t)){var k=this.b2(t);k._o=y,k._m=s,k._n=H,k._f=e}},b2:function(Z){var B=this._f[Z._id];return B||(B=new Jb,this._f[Z._id]=B),B},a2:function(p){return!!this._f[p._id]},c:function(){for(var M=An.a1(Rp.a(this._d.xa())),g=An.a1(Rp.a(this._d.xa())),G=this._d.x9();G.i1();G.i2()){var p=G.i9();if(this.a2(p)){var D=this.b2(p);M.i6(p,this._b*(D.c()-1)),g.i6(p,this._b*(D.b()-1))}}this._d.x1("D",M),this._d.x1("C",g)},g:function(){this._d.x6("D"),this._d.x6("C")},f:function(){for(var M=this._d.x9();M.i1();M.i2()){var q=M.i9();if(this.a2(q)){var w=this._d.gi(q),x=this._d.gh(q),t=this._d.gj(q),T=this._d.g9(q),H=this.b2(q),i=H._q.ay()+H._b.ay()+H._f,K=H._d.ay()+H._g.ay()+H._o,G=H._i.ay()+H._l.ay()+H._n,N=H._h.ay()+H._k.ay()+H._m,m=this._a.a7(t,i),z=this._a.a7(t,K),J=this._a.a7(T,N),h=this._a.a7(T,G);H.a2(this._a.a8(t,i,m),this._a.a8(t,K,z),this._a.a8(T,N,J),this._a.a8(T,G,h));for(var s=H._j.c1();s.i1();s.i2()){var r=s.i8(),U=this.a1(r),R=this.b1(r),S=new lq;U.b()===R.b()?(U.c()?(S.aa(new Y(w+H._g._bd*z+H._c,x)),S.aa(new Y(w+H._g._bd*z+H._c,x-this._b)),H._g._bd++,S.aa(new Y(w+H._g._bd*z+H._c,x-this._b)),S.aa(new Y(w+H._g._bd*z+H._c,x)),H._g._bd++,H._g._bc=c(H._g._bc,2)):U.d()?(S.aa(new Y(w+H._b._bd*m+H._p,x+T)),S.aa(new Y(w+H._b._bd*m+H._p,x+T+this._b)),H._b._bd++,S.aa(new Y(w+H._b._bd*m+H._p,x+T+this._b)),S.aa(new Y(w+H._b._bd*m+H._p,x+T)),H._b._bd++,H._b._bc=c(H._b._bc,2)):U.f()?(S.aa(new Y(w,x+H._i._bd*h+H._a)),S.aa(new Y(w-this._b,x+H._i._bd*h+H._a)),H._i._bd++,S.aa(new Y(w-this._b,x+H._i._bd*h+H._a)),S.aa(new Y(w,x+H._i._bd*h+H._a)),H._i._bd++,H._i._bc=c(H._i._bc,2)):U.e()&&(S.aa(new Y(w+t,x+H._h._bd*J+H._e)),S.aa(new Y(w+t+this._b,x+H._h._bd*J+H._e)),H._h._bd++,S.aa(new Y(w+t+this._b,x+H._h._bd*J+H._e)),S.aa(new Y(w+t,x+H._h._bd*J+H._e)),H._h._bd++,H._h._bc=c(H._h._bc,2)),this._d.m1(r,S)):U.c()||R.c()?U.e()||R.e()?(S.aa(new Y(w+t-H._d._bd*z-H._c,x)),S.aa(new Y(w+t-H._d._bd*z-H._c,x-this._b*H._d._bc)),S.aa(new Y(w+t+this._b*H._h._bc,x-this._b*H._d._bc)),S.aa(new Y(w+t+this._b*H._h._bc,x+H._h._bd*J+H._e)),S.aa(new Y(w+t,x+H._h._bd*J+H._e)),H._d._bd++,H._d._bc++,H._h._bd++,H._h._bc++,R.c()&&S.ax(),this._d.m1(r,S)):U.f()||R.f()?(S.aa(new Y(w+H._g._bd*z+H._c,x)),S.aa(new Y(w+H._g._bd*z+H._c,x-this._b*H._g._bc)),S.aa(new Y(w-this._b*H._i._bc,x-this._b*H._g._bc)),S.aa(new Y(w-this._b*H._i._bc,x+H._i._bd*h+H._a)),S.aa(new Y(w,x+H._i._bd*h+H._a)),H._g._bd++,H._g._bc++,H._i._bd++,H._i._bc++,R.c()&&S.ax(),this._d.m1(r,S)):(U.d()||R.d())&&(S.aa(new Y(w+t-H._d._bd*z-H._c,x)),S.aa(new Y(w+t-H._d._bd*z-H._c,x-this._b*H._d._bc)),S.aa(new Y(w+t+this._b*H.b(),x-this._b*H._d._bc)),S.aa(new Y(w+t+this._b*H.b(),x+T+this._b*H._q._bc)),S.aa(new Y(w+t-H._q._bd*m-H._p,x+T+this._b*H._q._bc)),S.aa(new Y(w+t-H._q._bd*m-H._p,x+T)),H._d._bd++,H._d._bc++,H._k._bc++,H._h._bc++,H._q._bc++,H._q._bd++,R.c()&&S.ax(),this._d.m1(r,S)):U.d()||R.d()?U.e()||R.e()?(S.aa(new Y(w+t-H._q._bd*m-H._p,x+T)),S.aa(new Y(w+t-H._q._bd*m-H._p,x+T+this._b*H._q._bc)),S.aa(new Y(w+t+this._b*H._k._bc,x+T+this._b*H._q._bc)),S.aa(new Y(w+t+this._b*H._k._bc,x+T-H._k._bd*J-H._e)),S.aa(new Y(w+t,x+T-H._k._bd*J-H._e)),H._q._bd++,H._q._bc++,H._k._bd++,H._k._bc++,R.d()&&S.ax(),this._d.m1(r,S)):(U.f()||R.f())&&(S.aa(new Y(w+H._b._bd*m+H._p,x+T)),S.aa(new Y(w+H._b._bd*m+H._p,x+T+this._b*H._b._bc)),S.aa(new Y(w-this._b*H._l._bc,x+T+this._b*H._b._bc)),S.aa(new Y(w-this._b*H._l._bc,x+T-H._l._bd*h-H._a)),S.aa(new Y(w,x+T-H._l._bd*h-H._a)),H._b._bd++,H._b._bc++,H._l._bd++,H._l._bc++,R.d()&&S.ax(),this._d.m1(r,S)):(S.aa(new Y(w,x+T-H._l._bd*h-H._a)),S.aa(new Y(w-this._b*H._l._bc,x+T-H._l._bd*h-H._a)),S.aa(new Y(w-this._b*H._l._bc,x+T+this._b*H.a1())),S.aa(new Y(w+t+this._b*H._k._bc,x+T+this._b*H.a1())),S.aa(new Y(w+t+this._b*H._k._bc,x+T-H._k._bd*J-H._e)),S.aa(new Y(w+t,x+T-H._k._bd*J-H._e)),H._l._bd++,H._l._bc++,H._b._bc++,H._q._bc++,H._k._bc++,H._k._bd++,R.f()&&S.ax(),this._d.m1(r,S))}}}},a5:function(J,B){for(var v=0;v=W?W>=0?0:-1:1},k=function(Z,i){var J=B.i3(Z.a2())-B.i3(i.a2());return 0>=J?J>=0?0:-1:1},m=0;m0)for(var p=this._d.g9(t)/2,M=this._d.gj(t),o=this.a7(M,N),T=-.5*M+this.a8(this._d.gj(t),N,o)+o*(X._b.ay()+w.ay()),Q=t.ap();Q.i1();Q.i2()){var J=Q.i8();this.c2(J)||this._j.i1(J.a2())||(this._d.g2(J).i8(new Y(T,p)),T+=o)}var a=this._t.a3(t),F=0,z=0,O=0,A=0;if(a&&(F=a._e.ay(),z=a._c.ay(),O=a._b.ay(),A=a._d.ay()),N=X._g.ay()+F+q.ay()+t.ak()+h.ay()+z+X._d.ay(),N>0){for(var x=this._d.gj(t),$=this.a7(x,N),jq=this.a8(x,N,$),ee=-.5*x+jq+$*(X._g.ay()+F+q.ay()),pb=-this._d.g9(t)/2,fo=t.am();fo.i1();fo.i2()){var Fj=fo.i8();this.d1(Fj)||this._j.i1(Fj.a3())||(this._d.g2(Fj).i9(new Y(ee,pb)),ee+=$)}if(a){for(var oh=-.5*x+jq+$*(X._g.ay()+q.ay()+a._e.ay()-1),fr=a._e.c1();fr.i1();fr.i2()){var qo=fr.i8();this._d.u1(qo),qo.a2()!==t||this.c2(qo)?this.d1(qo)||(this._d.g2(fr.i8()).i9(new Y(oh,pb)),oh-=$):(this._d.g2(fr.i8()).i8(new Y(oh,pb)),oh-=$),this._d.h1(qo)}oh=.5*x-jq-$*(X._d.ay()+h.ay());for(var Lg=a._c.c1();Lg.i1();Lg.i2()){var wo=Lg.i8();this._d.u1(wo),wo.a2()!==t||this.c2(wo)?this.d1(wo)||(this._d.g2(Lg.i8()).i9(new Y(oh,pb)),oh-=$):(this._d.g2(Lg.i8()).i8(new Y(oh,pb)),oh-=$),this._d.h1(wo)}}}this._b.a2(t)&&this._b.a4(t,F+q.ay()+t.ak()+h.ay()+z,w.ay()+t.ao()+L.ay(),O+E.ay(),A+d.ay())}return this._d.xi(B),D},a7:function(M,J){return 1>=J?0:M/(J-1+2*this._r)},a8:function(L,v,o){return 1>=v?.5*L:.5*(L-o*(v-1))},f:function(i){var M=this.g1(),z=0;for(this._f=this._d.xk();z0&&(v+=j[L-1]._j+j[L-1]._h+j[L-1]._b),v+=y._g+y._f+y._a+y._d;for(var c=i[L].x1();c.i1();c.i2()){var A=c.i9();this._d.s3(A,this._d.gi(A),this._d.gh(A)+v)}y._c+=v,y._i+=v}for(var W=0;W=q._d.gi(Q)?-1:1:1:q.a3(Q)?-1:q._d.gi(p)>=q._d.gi(Q)?1:-1},s=function(C,b){return q.a3(C)?q.a3(b)?q._d.gi(C)>=q._d.gi(b)?1:-1:1:q.a3(b)?-1:q._d.gi(C)>=q._d.gi(b)?-1:1},R=0;R0)for(var _i=$e._h.ay()+h.ay()+n+$e._k.ay(),On=this.a7(Ge,_i),Rd=this.a8(Ge,_i,On),Hh=Qb+Rd+On*($e._h.ay()+this.a4(h)),pd=Xe._d.c1();pd.i1();pd.i2()){var Am=pd.i8();this._d.u1(Am),Am.a2()===o?this.c2(Am)||this._d.gx(Am,new Y(qg+kk,Hh)):(this.d1(Am),this._d.gy(Am,new Y(qg+kk,Hh))),Hh+=On,this._d.h1(Am)}if(p>0)for(var zh=$e._i.ay()+G.ay()+p+$e._l.ay(),Ph=this.a7(Ge,zh),Nr=this.a8(Ge,zh,Ph),qj=Qb+Nr+Ph*($e._i.ay()+this.a4(G)),hc=Xe._b.c1();hc.i1();hc.i2()){var ne=hc.i8();this._d.u1(ne),ne.a2()===o?this.c2(ne)||this._d.gx(ne,new Y(qg,qj)):this.d1(ne)||this._d.gy(ne,new Y(qg,qj)),qj+=Ph,this._d.h1(ne)}}if(h.ay()>0){h.a1(H);for(var vj=$e._h.ay()+h.ay()+n+$e._k.ay(),Cm=this.a7(Ge,vj),jp=this.a8(Ge,vj,Cm),ue=Qb+jp+Cm*$e._h.ay(),pr=!0;!h.ar();){var ic=h.x4();if(this.a3(ic)){pr&&(pr=!1,ue+=Cm*n);var rn=ic.ag(),Ke=this._d.gd(rn),$h=Ke.at();if(Ke.ac(new Y($h.x,e.b())),this.c2(rn)){var qh=this._a.i1(rn);Ke.ac(new Y($h.x,qh.y+this._d.g6(o))),Ke.ac(new Y(qh.x+this._d.g5(o),qh.y+this._d.g6(o)))}else Ke.ac(new Y($h.x,ue)),Ke.ac(new Y(qg+kk,ue));this._d.xr(rn,o,rn.a3()),this._d.m1(rn,Ke)}else{var Tg=ic.ae(),wf=this._d.gd(Tg),Fk=wf.au();if(wf.ae(new Y(Fk.x,e.a())),this.d1(Tg)){var Sb=this._g.i1(Tg);wf.ae(new Y(Fk.x,Sb.y+this._d.g6(o))),wf.ae(new Y(Sb.x+this._d.g5(o),Sb.y+this._d.g6(o)))}else wf.ae(new Y(Fk.x,ue)),wf.ae(new Y(qg+kk,ue));this._d.xr(Tg,Tg.a2(),o),this._d.m1(Tg,wf)}this._d.x4(ic),ue+=Cm}}if(G.ay()>0){G.a1(s);for(var Zn=$e._i.ay()+G.ay()+p+$e._l.ay(),Xn=this.a7(Ge,Zn),ce=this.a8(Ge,Zn,Xn),$i=Qb+ce+Xn*$e._i.ay(),ss=!0;!G.ar();){var Fm=G.x4();if(this.a3(Fm)){ss&&(ss=!1,$i+=Xn*p);var fi=Fm.ag(),_k=this._d.gd(fi),tr=_k.at();if(_k.ac(new Y(tr.x,e.b())),this.c2(fi)){var Lp=this._a.i1(fi);_k.ac(new Y(tr.x,Lp.y+this._d.g6(o))),_k.ac(new Y(Lp.x+this._d.g5(o),Lp.y+this._d.g6(o)))}else _k.ac(new Y(tr.x,$i)),_k.ac(new Y(qg,$i));this._d.xr(fi,o,fi.a3()),this._d.m1(fi,_k)}else{var xe=Fm.ae(),Xq=this._d.gd(xe),te=Xq.au();if(Xq.ae(new Y(te.x,e.a())),this.d1(xe)){var Qd=this._g.i1(xe);Xq.ae(new Y(te.x,Qd.y+this._d.g6(o))),Xq.ae(new Y(Qd.x+this._d.g5(o),Qd.y+this._d.g6(o)))}else Xq.ae(new Y(te.x,$i)),Xq.ae(new Y(qg,$i));this._d.xr(xe,xe.a2(),o),this._d.m1(xe,Xq)}this._d.x4(Fm),$i+=Xn}}var qf=$e._g.ay()+$e._d.ay()+zi+Z.ay()+N.ay()+Q+d;kk=this._d.gj(o);var mj=this.a7(kk,qf),Np=this.a8(kk,qf,mj);qf=$e._b.ay()+$e._q.ay()+Mo+u.ay()+b.ay();var Vm=this.a7(kk,qf),Zo=this.a8(kk,qf,Vm);if(Z.ay()>0)for(var tn,Wo=mj,bo=M,ir=this._d.gi(o)+Np+Wo*($e._g.ay()+Z.ay()-1),Dq=this._d.gh(o),Ei=e._c-e._g-Z.ay()*bo;!Z.ar();this._d.x4(tn)){tn=Z.x4();var yi=tn.ag(),zf=this._d.gd(yi),Ym=zf.at();if(zf.ac(new Y(Ym.x,e.b())),zf.ac(new Y(Ym.x,Ei)),this.c2(yi)){var ln=this._a.i1(yi);zf.ac(new Y(ln.x+this._d.g5(o),Ei)),zf.ac(new Y(ln.x+this._d.g5(o),ln.y+this._d.g6(o)))}else zf.ac(new Y(ir,Ei)),zf.ac(new Y(ir,Dq)),ir-=Wo;Ei+=bo,this._d.xr(yi,o,yi.a3()),this._d.m1(yi,zf)}if(N.ay()>0)for(var Xf,pl=mj,cm=M,Kn=this._d.gi(o)+this._d.gj(o)-Np-pl*$e._d.ay(),qd=this._d.gh(o),Jk=e._c-e._g-cm;!N.ar();this._d.x4(Xf)){Xf=N.x4();var $r=Xf.ag(),wr=this._d.gd($r),Cj=wr.at();if(wr.ac(new Y(Cj.x,e.b())),wr.ac(new Y(Cj.x,Jk)),this.c2($r)){var oh=this._a.i1($r);wr.ac(new Y(oh.x+this._d.g5(o),Jk)),wr.ac(new Y(oh.x+this._d.g5(o),oh.y+this._d.g6(o)))}else wr.ac(new Y(Kn,Jk)),wr.ac(new Y(Kn,qd)),Kn-=pl;Jk-=cm,this._d.xr($r,o,$r.a3()),this._d.m1($r,wr)}if(u.ay()>0)for(var hd,mq=Vm,pf=M,gg=this._d.gi(o)+Zo+mq*($e._b.ay()+u.ay()-1),Km=this._d.gh(o)+this._d.g9(o),Tf=Km+u.ay()*pf;!u.ar();this._d.x4(hd)){hd=u.x4();var xr=hd.ae(),wi=this._d.gd(xr),Bl=wi.au();if(wi.ae(new Y(Bl.x,e.a())),wi.ae(new Y(Bl.x,Tf)),this.d1(xr)){var cq=this._g.i1(xr);wi.ae(new Y(cq.x+this._d.g5(o),Tf)),wi.ae(new Y(cq.x+this._d.g5(o),cq.y+this._d.g6(o)))}else wi.ae(new Y(gg,Tf)),wi.ae(new Y(gg,Km)),gg-=mq;Tf-=pf,this._d.xr(xr,xr.a2(),o),this._d.m1(xr,wi)}if(b.ay()>0)for(var Fg,Lb=Vm,Jm=M,Oc=this._d.gi(o)+this._d.gj(o)-Zo-Vm*$e._q.ay(),ob=this._d.gh(o)+this._d.g9(o),Nk=ob+Jm;!b.ar();this._d.x4(Fg)){Fg=b.x4();var fp=Fg.ae(),ro=this._d.gd(fp),uj=ro.au();if(ro.ae(new Y(uj.x,e.a())),ro.ae(new Y(uj.x,Nk)),this.d1(fp)){var Qp=this._g.i1(fp);ro.ae(new Y(Qp.x+this._d.g5(o),Nk)),ro.ae(new Y(Qp.x+this._d.g5(o),Qp.y+this._d.g6(o)))}else ro.ae(new Y(Oc,Nk)),ro.ae(new Y(Oc,ob)),Oc-=Lb;Nk+=Jm,this._d.xr(fp,fp.a2(),o),this._d.m1(fp,ro)}for(;!r.ar();){var El=r.c3(),jq=this._d.gl(El);e.a()+12Ib.y){var Im=this._d.gf(Dh);Im.ac(new Y(Ib.x,e.b())),this._d.s6(Dh,Im)}}}}for(var Vk=0;Vk0){for(var G=this.r(),k=0;20>k&&g>0&&this.o();k++){this.b2(!0);var n=this.g();g>n&&(this.a7(G),g=n)}this.b3(G),this.b1()}return this.c()},a6:function(K,g,p){this._b=(new Date).getTime(),this._ac=K,this._ah=g;var s=this;this._p=function(c,N){var i=s._n[c.al()]-s._n[N.al()];return i>0?1:i>=0?0:-1},this._ad=Rp.d(p);for(var Z=0;Zr;r++)this._ab[r]=0;this._ac.x2(K,this._z)}var X=this._ac.xm();this._ah.i7(X,0);for(var d=this._ac.x9();d.i1();d.i2())0===d.i9().ak()&&d.i9()!==X&&this._ac.xo(X,d.i9());var E=new Jl(this);E.a6(!0),E.a9(this._ac,X),this._ad[0].at(),this._ac.x4(X),this.d()},a1:function(){this._ac.x2(this._o,this._l);for(var K=0,m=1;m=this._ab[E.al()]&&(this._aa[P.al()]=Q.ae(P))}else for(var z=E.ae();z;z=z.a7()){var o=z.a2();this._ab[o.al()]>this._ab[E.al()]&&(this._aa[o.al()]=Q.ae(o))}return S},g:function(){for(var Z=this.r(),n=this.a1(),W=!0,_=0;3>_&&this.o()&&n>0;){var r=this.k();n>r?(this.a7(Z),n=r):_++,W=!W}if(this.b3(Z),this.b1(),n>0){for(var H=1,v=0;1===H&&n>0;v++){this.e(),this.i();var u=this.a1();n>u?(H=1,this.a7(Z)):H=-1,n=u}this.b3(Z),this.b1()}return n},e:function(){for(var M=this.l(),q=this.r(),e=Rp.d(this._ac.x0()),T=this._ad.length-1;T>=0;T--)for(var r=this._ad[T].ah();r.i1();r.i2()){var j=r.i6();if(1===j.ak()&&1===j.ao()){var U=M.i1(j.ag());if(U&&!e[U.al()])for(var k=this.a4(j,U),u=U.al(),F=e[u]=Rp.d(k+1),d=F.length-1;d>=0;d--)F[d]=new lq}}for(var _=0;_0;){for(var X,D=0;;){X=z[D].am();var x=X.a3();if(1!==x.ak()||1!==x.ao())break;D++}var S=z[D].at().a3();D--,S=X.a2(),X=z[D].at();for(var L=X.a3();D>=0;)if(q[S.al()]!==q[L.al()]&&(this._ab[S.al()]=q[L.al()]),S=S.ae().a2(),--D>=0){var c=z[D].at();L=c.a3()}}}}this.b1(),this._ac.xj(M)},i:function(){for(var f=this.f(),i=this.r(),F=Rp.d(this._ac.x0()),Y=0;Y=0;t--)v[t]=new lq}}for(var R=this._ad.length-1;R>=0;R--)for(var S=this._ad[R].ah();S.i1();S.i2()){var Q=S.i6();if(1===Q.ak()&&1===Q.ao()){var b=f.i1(Q.ae());b&&F[b.al()][this.a4(b,Q)-1].ae(Q.ag())}else for(var p=Q.ag();p;p=p.a8()){var j=f.i1(p);j&&F[j.al()][this.a4(j,Q)-1].ae(p)}}for(var d=this._ac.x9();d.i1();d.i2()){var x=d.i9();if(F[x.al()])for(var w=x.ae();w;w=w.a7()){var T=f.i1(w);if(T)for(var I=F[T.al()];I[0].ay()>0;){for(var y,q=0;;){y=I[q].am();var J=y.a2();if(1!==J.ak()||1!==J.ao())break;q++}var s=I[q].at().a2();q--,s=y.a3(),y=I[q].at();for(var $=y.a2();q>=0;)if(i[s.al()]!==i[$.al()]&&(this._ab[s.al()]=i[$.al()]),s=s.ag().a3(),--q>=0){var U=I[q].at();$=U.a2()}}}}this.b1(),this._ac.xj(f)},a4:function(M,i){return this._ah.i2(M)-this._ah.i2(i)},l:function(){for(var p=An.a6(Rp.d(this._ac.xg())),L=this._ac.x9();L.i1();L.i2()){var H=L.i9();if(H.ao()>1){for(var b=0,P=H.ag();P;P=P.a8()){var E=P.a3();1===E.ak()&&1===E.ao()&&b++}if(b>1)for(var _=H.ag();_;_=_.a8()){var d=_,S=d.a3();if(1===S.ak()&&1===S.ao()){for(;1===S.ak()&&1===S.ao();S=d.a3())p.i8(d,H),d=S.ag();p.i8(d,H)}}}}return p},f:function(){for(var N=An.a6(Rp.d(this._ac.xg())),V=this._ac.x9();V.i1();V.i2()){var I=V.i9();if(I.ak()>1){for(var W=0,C=I.ae();C;C=C.a7()){var q=C.a2();1===q.ak()&&1===q.ao()&&W++}if(W>1)for(var t=I.ae();t;t=t.a7()){var O=t,G=O.a2();if(1===G.ak()&&1===G.ao()){for(;1===G.ak()&&1===G.ao();G=O.a2())N.i8(O,I),O=G.ae();N.i8(O,I)}}}}return N},k:function(){for(var M=1;M0){var l=new M,f=c.gc(D),m=f.c(),r=m.i6();m.i2();var o=r.x,J=r.y;if(m.i1()){var E=m.i6(),L=E.x,Q=E.y;for(m.i2();m.i1();m.i2()){var _=m.i6(),U=_.x,C=_.y,j=(o-U)*(Q-C)/(J-C)+U;n(j-L)>=1&&(l.add(E),o=L,J=Q),E=_,L=U,Q=C}}l.size()1){for(var W,q,H=Z;I>1;I--)W=P.xm(),P.s7(W,1,1),P.s4(W,Gg._A),q=P.xo(H,W),H===Z&&P.gt(q,P.gn(o.i8())),C.i7(W,C.i2(H)+1),d.z1(W,o.i8()),H=W;q=P.xo(W,D),P.gz(q,P.gk(o.i8())),P.h1(o.i8())}}}});var lo=function(B,P,x,J){this._i=20,this._j=B,this._g=P,this._a=x,this._h=J};g(lo,y,{a1:function(M){this._i=M},b2:function(E){return this._e?this._e.i4(E):!1},a3:function(p){return this._f?this._f.i1(p):K},d:function(){this._j.xi(this._f),this._j.xi(this._e)}});var Cc=function(){this._c=0,this._i=0,this._g=0,this._j=0,this._f=0,this._h=0,this._d=0,this._e=0,this._a=0,this._b=0};g(Cc,y,{a:function(){return this._c-this._g-this._f-this._a},b:function(){return this._i+this._j+this._h+this._b}});var Tc=function(){this._d=new Nm,this._b=new Nm,this._c=new Nm,this._e=new Nm};g(Tc,y,{});var Ik=function(g,e,Y,j,q,S,Z,w){this._d=g,this._a=e,this._b=Y,this._h=j,this._f=q,this._c=S,this._e=Z,this._g=w};g(Ik,y,{});var Rp={a:function(h,m){for(var p=[],S=0;h>S;S++)p[S]=m||0;return p},b:function(o){for(var v=[],x=0;o>x;x++)v[x]=!1;return v},c:function(s,a){if(s instanceof Y)return s.xa.x?1:s.ys.width?-1:a.widths.height?-1:a.height>=s.height?0:1;if(s instanceof B)return s.xa.x?1:s.ya.y?1:a.width>s.width?-1:a.widths.height?-1:a.height>=s.height?0:1;throw""},d:function(_){for(var Q=[],x=0;_>x;x++)Q[x]=K;return Q},e:function(S,m){for(var Z=[],H=0;S>H;H++)Z[H]=Rp.a(m);return Z},f:function(O,N,e){for(var H=0;e>H;H++)N[H]=O[H]},s:function(C,N,_){var W=[];Rp.f(C,W,N),W.sort(_),Rp.f(W,C,N)},n:function(X,L){return X-L}};W.layout.AutoLayout=function(R){R instanceof W.DataModel?this.dm=R:this.gv=R},g(O+"AutoLayout",y,{_repulsion:1,_type:K,_offsetX:K,_offsetY:K,_xf:0,_yf:0,_animate:!0,_frames:K,_interval:K,_duration:K,_easing:K,isAnimate:function(){return this._animate},setAnimate:function(m){this._animate=m},getFrames:function(){return this._frames},setFrames:function(s){this._frames=s},getInterval:function(){return this._interval},setInterval:function(F){this._interval=F},getDuration:function(){return this._duration},setDuration:function(o){this._duration=o},getEasing:function(){return this._easing},setEasing:function(R){this._easing=R},getRepulsion:function(){return this._repulsion},setRepulsion:function(Z){this._repulsion=Z},getOffsetX:function(){return this._offsetX},setOffsetX:function(m){this._offsetX=m},getOffsetY:function(){return this._offsetY},setOffsetY:function(C){this._offsetY=C},getNodeSize:function(c){var Q,d=this.gv;return c.getChildrenRect&&(Q=c.getChildrenRect(),Q&&F.grow(Q,15)),!Q&&d&&d.getDataUIBounds&&(Q=d.getDataUIBounds(c)),Q||(Q=c.getRect(),F.grow(Q,15)),Q},isLayoutable:function(I){var g=this.gv;return g&&!g.isVisible(I)?!1:I.s("layoutable")===!1?!1:I instanceof e?I.getSourceAgent()&&I.getTargetAgent()&&!I.isLooped()?!0:!1:I instanceof x?I.getHost()?!1:g?g.isMovable(I):!0:!1},getType:function(){return this._type},getLayoutDatas:function(){var Q,D=this,G=D.gv,c=D.dm,V=!1,E=new M;return G?G.sm().size()>1?(V=!0,Q=G.sm().getSelection()):Q=G.dm().getDatas():c.sm().size()>1?(V=!0,Q=c.sm().getSelection()):Q=c.getDatas(),D._xf=D._yf=k,Q.each(function(H){if(D.isLayoutable(H)&&(E.add(H),V&&H instanceof x)){var A=H.p(); A.xz&&(h=z),z=o.y-O.gj(j)/w,P>z&&(P=z)):(z=o.x-O.gj(j)/w,h>z&&(h=z),z=o.y-O.g9(j)/w,P>z&&(P=z));for(f in n)j=d[f],Z=n[f],Z.x=Z.x-h+L._xf,Z.y=Z.y-P+L._yf}if(!I&&L._animate){var T=L.gv,Q={};for(f in n)Q[f]=d[f].node.p();T&&(T._autoLayouting=1),F.startAnim({duration:L._duration,frames:L._frames,interval:L._interval,easing:L._easing,finishFunc:function(){c.r(),V&&V(),T&&(delete T._autoLayouting,T.onAutoLayoutEnded())},action:function(z){for(f in n){var e=Q[f],O=n[f];d[f].node.p(e.x+(O.x-e.x)*z,e.y+(O.y-e.y)*z)}}})}else{for(f in n)j=d[f],Z=n[f],I?I[j.node.getId()]=Z:j.node.p(Z);c.r(),V&&V()}return!0}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:this,Object);