var d3=function(T){"use strict";var o={value:function(){}};function q(){for(var t,n=0,e=arguments.length,r={};n>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=wt.exec(t))?St(parseInt(n[1],16)):(n=xt.exec(t))?new Xt(n[1],n[2],n[3],1):(n=bt.exec(t))?new Xt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Nt.exec(t))?Tt(n[1],n[2],n[3],n[4]):(n=Mt.exec(t))?Tt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=kt.exec(t))?Yt(n[1],n[2]/100,n[3]/100,1):(n=At.exec(t))?Yt(n[1],n[2]/100,n[3]/100,n[4]):zt.hasOwnProperty(t)?St(zt[t]):"transparent"===t?new Xt(NaN,NaN,NaN,0):null}function St(t){return new Xt(t>>16&255,t>>8&255,255&t,1)}function Tt(t,n,e,r){return r<=0&&(t=n=e=NaN),new Xt(t,n,e,r)}function qt(t){return t instanceof vt||(t=Et(t)),t?new Xt((t=t.rgb()).r,t.g,t.b,t.opacity):new Xt}function Pt(t,n,e,r){return 1===arguments.length?qt(t):new Xt(t,n,e,null==r?1:r)}function Xt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ct(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Yt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||1<=e?t=n=NaN:n<=0&&(t=NaN),new It(t,n,e,r)}function It(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Dt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}ft(vt,Et,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),ft(Xt,Pt,pt(vt,{brighter:function(t){return t=null==t?yt:Math.pow(yt,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Ct(this.r)+Ct(this.g)+Ct(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),ft(It,function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof It)return new It(t.h,t.s,t.l,t.opacity);if(t instanceof vt||(t=Et(t)),!t)return new It;if(t instanceof It)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(ee._time&&(r=e._time),e=(t=e)._next):(n=e._next,e._next=null,e=t?t._next=n:En=n);Sn=t,Gn(r)}(),In=0}}function Un(){var t=Vn.now(),n=t-Yn;CnQn)throw new Error("too late; already scheduled");return e}function te(t,n){var e=ne(t,n);if(e.state>Wn)throw new Error("too late; already started");return e}function ne(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ee=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>Wn&&e.state<5,e.state=6,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}};function re(t,n,e){var r=t._id;return t.each(function(){var t=te(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return ne(t,r).value[n]}}var ie=function(t,n){var e;return("number"==typeof n?pn:n instanceof Et?fn:(e=Et(n))?(n=e,fn):function(t,r){var n,e,i,o,u,a=vn.lastIndex=yn.lastIndex=0,s=-1,h=[],c=[];for(t+="",r+="";(n=vn.exec(t))&&(e=yn.exec(r));)(i=e.index)>a&&(i=r.slice(a,i),h[s]?h[s]+=i:h[++s]=i),(n=n[0])===(e=e[0])?h[s]?h[s]+=e:h[++s]=e:(h[++s]=null,c.push({i:s,x:pn(n,e)})),a=yn.lastIndex;return a=(o=(y+g)/2))?y=o:g=o,(c=e>=(u=(d+m)/2))?d=u:m=u,!(p=(i=p)[l=c<<1|h]))return i[l]=v,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return v.next=p,i?i[l]=v:t._root=v,t;for(;i=i?i[l]=new Array(4):t._root=new Array(4),(h=n>=(o=(y+g)/2))?y=o:g=o,(c=e>=(u=(d+m)/2))?d=u:m=u,(l=c<<1|h)==(f=(u<=s)<<1|o<=a););return i[f]=p,i[l]=v,t}var Te=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function qe(t){return t[0]}function Pe(t){return t[1]}function Xe(t,n,e){var r=new Ce(null==n?qe:n,null==e?Pe:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ce(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ye(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ie=Xe.prototype=Ce.prototype;function De(t){return t.x+t.vx}function Ve(t){return t.y+t.vy}Ie.copy=function(){var t,n,e=new Ce(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Ye(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Ye(n));return e},Ie.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Se(this.cover(n,e),n,e,t)},Ie.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,h=1/0,c=-1/0,l=-1/0;for(e=0;ef||(o=s.y0)>p||(u=s.x1)=(a=(v+d)/2))?v=a:d=a,(c=u>=(s=(y+g)/2))?y=s:g=s,!(p=(n=p)[l=c<<1|h]))return this;if(!p.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,f=l)}for(;p.data!==t;)if(!(p=(r=p).next))return this;return(i=p.next)&&delete p.next,r?i?r.next=i:delete r.next:n?(i?n[l]=i:delete n[l],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[f]=p:this._root=p)):this._root=i,this},Ie.removeAll=function(t){for(var n=0,e=t.length;nl.index){var s=f-o.x-o.vx,h=p-o.y-o.vy,c=s*s+h*h;ct.r&&(t.r=t[n].r)}function e(){if(o){var t,n,e=o.length;for(u=new Array(e),t=0;t