{"size": 143959, "ext": "js", "max_stars_repo_path": "research/iteration1/js/d3.min.js", "max_stars_repo_name": "txizzle/txizzle.github.io", "max_stars_repo_stars_event_min_datetime": "2015-06-09T17:55:04.000Z", "max_stars_repo_stars_event_max_datetime": "2015-06-09T17:55:04.000Z", "max_issues_repo_path": "research/iteration1/js/d3.min.js", "max_issues_repo_name": "txizzle/txizzle.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "research/iteration1/js/d3.min.js", "max_forks_repo_name": "txizzle/txizzle.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28791.8, "max_line_length": 32058, "alphanum_fraction": 0.6372647768}
d3=function(){function p(e){return null!=e&&!isNaN(e)}function m(e){return e.length}function g(e){for(var t=1;e*t%1;)t*=10;return t}function v(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(i){e.prototype=t}}function y(){}function w(){}function _(e,t,n){return function(){var i=n.apply(t,arguments);return i===t?e:i}}function k(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var n=0,i=C.length;i>n;++n){var r=C[n]+t;if(r in e)return r}}function T(){}function S(){}function E(e){function i(){for(var a,n=t,i=-1,r=n.length;++i<r;)(a=n[i].on)&&a.apply(this,arguments);return e}var t=[],n=new y;return i.on=function(i,r){var o,a=n.get(i);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(i)),r&&t.push(n.set(i,{on:r})),e)},i}function N(){e.event.preventDefault()}function j(){for(var n,t=e.event;n=t.sourceEvent;)t=n;return t}function D(t){for(var n=new S,i=0,r=arguments.length;++i<r;)n[arguments[i]]=E(n);return n.of=function(i,r){return function(a){try{var o=a.sourceEvent=e.event;a.target=t,e.event=a,n[a.type].apply(i,r)}finally{e.event=o}}},n}function $(e){return A(e,P),e}function F(e){return"function"==typeof e?e:function(){return O(e,this)}}function R(e){return"function"==typeof e?e:function(){return I(e,this)}}function q(t,n){function i(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function a(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function s(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function l(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=e.ns.qualify(t),null==n?t.local?r:i:"function"==typeof n?t.local?l:s:t.local?o:a}function B(e){return e.trim().replace(/\s+/g," ")}function W(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function U(e,t){function i(){for(var i=-1;++i<n;)e[i](this,t)}function r(){for(var i=-1,r=t.apply(this,arguments);++i<n;)e[i](this,r)}e=e.trim().split(/\s+/).map(V);var n=e.length;return"function"==typeof t?r:i}function V(e){var t=W(e);return function(n,i){if(r=n.classList)return i?r.add(e):r.remove(e);var r=n.getAttribute("class")||"";i?(t.lastIndex=0,t.test(r)||n.setAttribute("class",B(r+" "+e))):n.setAttribute("class",B(r.replace(t," ")))}}function Q(e,t,n){function i(){this.style.removeProperty(e)}function r(){this.style.setProperty(e,t,n)}function a(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}return null==t?i:"function"==typeof t?a:r}function J(e,t){function n(){delete this[e]}function i(){this[e]=t}function r(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?r:i}function X(t){return"function"==typeof t?t:(t=e.ns.qualify(t)).local?function(){return i.createElementNS(t.space,t.local)}:function(){return i.createElementNS(this.namespaceURI,t)}}function G(e){return{__data__:e}}function Y(e){return function(){return H(this,e)}}function K(t){return arguments.length||(t=e.ascending),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function Z(e,t){for(var n=0,i=e.length;i>n;n++)for(var s,r=e[n],a=0,o=r.length;o>a;a++)(s=r[a])&&t(s,a,n);return e}function ee(e){return A(e,te),e}function ne(e){var t,n;return function(i,r,a){var l,o=e[a].update,s=o.length;for(a!=n&&(n=a,t=0),r>=t&&(t=r+1);!(l=o[t])&&++t<s;);return l}}function re(t,i,r){function u(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}function c(){var e=s(i,n(arguments));u.call(this),this.addEventListener(t,this[a]=e,e.$=r),e._=i}function f(){var i,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var r in this)if(i=r.match(n)){var a=this[r];this.removeEventListener(i[1],a,a.$),delete this[r]}}var a="__on"+t,o=t.indexOf("."),s=oe;o>0&&(t=t.substring(0,o));var l=ae.get(t);return l&&(t=l,s=se),o?i?c:u:i?T:f}function oe(t,n){return function(i){var r=e.event;e.event=i,n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=r}}}function se(e,t){var n=oe(e,t);return function(e){var t=this,i=e.relatedTarget;i&&(i===t||8&i.compareDocumentPosition(t))||n.call(t,e)}}function ce(){var t=".dragsuppress-"+ ++ue,n="touchmove"+t,i="selectstart"+t,o="dragstart"+t,s="click"+t,l=e.select(a).on(n,N).on(i,N).on(o,N),u=r.style,c=u[le];return u[le]="none",function(e){function n(){l.on(s,null)}l.on(t,null),u[le]=c,e&&(l.on(s,function(){N(),n()},!0),setTimeout(n,0))}}function de(t,n){var i=t.ownerSVGElement||t;if(i.createSVGPoint){var r=i.createSVGPoint();if(0>fe&&(a.scrollX||a.scrollY)){i=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=i[0][0].getScreenCTM();fe=!(o.f||o.e),i.remove()}return fe?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var s=t.getBoundingClientRect();return[n.clientX-s.left-t.clientLeft,n.clientY-s.top-t.clientTop]}function ye(e){return e>0?1:0>e?-1:0}function be(e){return e>1?0:-1>e?pe:Math.acos(e)}function xe(e){return e>1?pe/2:-1>e?-pe/2:Math.asin(e)}function we(e){return(Math.exp(e)-Math.exp(-e))/2}function _e(e){return(Math.exp(e)+Math.exp(-e))/2}function ke(e){return we(e)/_e(e)}function Ce(e){return(e=Math.sin(e/2))*e}function Me(){}function Ae(e,t,n){return new $e(e,t,n)}function $e(e,t,n){this.h=e,this.s=t,this.l=n}function Ie(e,t,n){function a(e){return e>360?e-=360:0>e&&(e+=360),60>e?i+(r-i)*e/60:180>e?r:240>e?i+(r-i)*(240-e)/60:i}function o(e){return Math.round(255*a(e))}var i,r;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,r=.5>=n?n*(1+t):n+t-n*t,i=2*n-r,et(o(e+120),o(e),o(e-120))}function Le(e,t,n){return new He(e,t,n)}function He(e,t,n){this.h=e,this.c=t,this.l=n}function Fe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),Re(n,Math.cos(e*=ge)*t,Math.sin(e)*t)}function Re(e,t,n){return new ze(e,t,n)}function ze(e,t,n){this.l=e,this.a=t,this.b=n}function Qe(e,t,n){var i=(e+16)/116,r=i+t/500,a=i-n/200;return r=Xe(r)*Be,i=Xe(i)*We,a=Xe(a)*Ue,et(Ye(3.2404542*r-1.5371385*i-.4985314*a),Ye(-.969266*r+1.8760108*i+.041556*a),Ye(.0556434*r-.2040259*i+1.0572252*a))}function Je(e,t,n){return e>0?Le(Math.atan2(n,t)*ve,Math.sqrt(t*t+n*n),e):Le(NaN,NaN,e)}function Xe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ge(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Ye(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Ke(e){return et(e>>16,e>>8&255,255&e)}function Ze(e){return Ke(e)+""}function et(e,t,n){return new tt(e,t,n)}function tt(e,t,n){this.r=e,this.g=t,this.b=n}function it(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function rt(e,t,n){var o,s,l,i=0,r=0,a=0;if(o=/([a-z]+)\((.*)\)/i.exec(e))switch(s=o[2].split(","),o[1]){case"hsl":return n(parseFloat(s[0]),parseFloat(s[1])/100,parseFloat(s[2])/100);case"rgb":return t(lt(s[0]),lt(s[1]),lt(s[2]))}return(l=ut.get(e))?t(l.r,l.g,l.b):(null!=e&&"#"===e.charAt(0)&&(4===e.length?(i=e.charAt(1),i+=i,r=e.charAt(2),r+=r,a=e.charAt(3),a+=a):7===e.length&&(i=e.substring(1,3),r=e.substring(3,5),a=e.substring(5,7)),i=parseInt(i,16),r=parseInt(r,16),a=parseInt(a,16)),t(i,r,a))}function at(e,t,n){var o,s,i=Math.min(e/=255,t/=255,n/=255),r=Math.max(e,t,n),a=r-i,l=(r+i)/2;return a?(s=.5>l?a/(r+i):a/(2-r-i),o=e==r?(t-n)/a+(n>t?6:0):t==r?(n-e)/a+2:(e-t)/a+4,o*=60):(o=NaN,s=l>0&&1>l?0:o),Ae(o,s,l)}function ot(e,t,n){e=st(e),t=st(t),n=st(n);var i=Ge((.4124564*e+.3575761*t+.1804375*n)/Be),r=Ge((.2126729*e+.7151522*t+.072175*n)/We),a=Ge((.0193339*e+.119192*t+.9503041*n)/Ue);return Re(116*r-16,500*(i-r),200*(r-a))}function st(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function ct(e){return"function"==typeof e?e:function(){return e}}function ft(e){return e}function dt(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),pt(t,n,e,i)}}function pt(t,i,r,o){function d(){var t,e=c.status;if(!e&&c.responseText||e>=200&&300>e||304===e){try{t=r.call(s,c)}catch(n){return void l.error.call(s,n)}l.load.call(s,t)}else l.error.call(s,c)}var s={},l=e.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,f=null;return!a.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(t){var n=e.event;e.event=t;try{l.progress.call(s,c)}finally{e.event=n}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u[e]:(null==t?delete u[e]:u[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(i=null==e?null:e+"",s):i},s.responseType=function(e){return arguments.length?(f=e,s):f},s.response=function(e){return r=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(n(arguments)))}}),s.send=function(e,n,r){if(2===arguments.length&&"function"==typeof n&&(r=n,n=null),c.open(e,t,!0),null==i||"accept"in u||(u.accept=i+",*/*"),c.setRequestHeader)for(var a in u)c.setRequestHeader(a,u[a]);return null!=i&&c.overrideMimeType&&c.overrideMimeType(i),null!=f&&(c.responseType=f),null!=r&&s.on("error",r).on("load",function(e){r(null,e)}),l.beforesend.call(s,c),c.send(null==n?null:n),s},s.abort=function(){return c.abort(),s},e.rebind(s,l,"on"),null==o?s:s.get(ht(o))}function ht(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function wt(){var e=kt(),t=Ct()-e;t>24?(isFinite(t)&&(clearTimeout(yt),yt=setTimeout(wt,t)),vt=0):(vt=1,xt(wt))}function _t(e,t,n){var i=arguments.length;2>i&&(t=0),3>i&&(n=Date.now()),bt.callback=e,bt.time=n+t}function kt(){var e=Date.now();for(bt=mt;bt;)e>=bt.time&&(bt.flush=bt.callback(e-bt.time)),bt=bt.next;return e}function Ct(){for(var e,t=mt,n=1/0;t;)t.flush?t=e?e.next=t.next:mt=t.next:(t.time<n&&(n=t.time),t=(e=t).next);return gt=e,n}function Dt(e,t){var n=Math.pow(10,3*Math.abs(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function $t(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Ot(e){return e+""}function Ht(){}function Ft(e,t,n){var i=n.s=e+t,r=i-e,a=i-r;n.t=e-a+(t-r)}function Rt(e,t){e&&qt.hasOwnProperty(e.type)&&qt[e.type](e,t)}function Bt(e,t,n){var a,i=-1,r=e.length-n;for(t.lineStart();++i<r;)a=e[i],t.point(a[0],a[1],a[2]);t.lineEnd()}function Wt(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)Bt(e[n],t,1);t.polygonEnd()}function Jt(){function a(e,t){e*=ge,t=t*ge/2+pe/4;var a=e-n,o=Math.cos(t),s=Math.sin(t),l=r*s,u=i*o+l*Math.cos(a),c=l*Math.sin(a);Vt.add(Math.atan2(c,u)),n=e,i=o,r=s}var e,t,n,i,r;Qt.point=function(o,s){Qt.point=a,n=(e=o)*ge,i=Math.cos(s=(t=s)*ge/2+pe/4),r=Math.sin(s)},Qt.lineEnd=function(){a(e,t)}}function Xt(e){var t=e[0],n=e[1],i=Math.cos(n);return[i*Math.cos(t),i*Math.sin(t),Math.sin(n)]}function Gt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Yt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Kt(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Zt(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function en(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function tn(e){return[Math.atan2(e[1],e[0]),xe(e[2])]}function nn(e,t){return Math.abs(e[0]-t[0])<he&&Math.abs(e[1]-t[1])<he}function gn(e,t){e*=ge;var n=Math.cos(t*=ge);vn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function vn(e,t,n){++rn,on+=(e-on)/rn,sn+=(t-sn)/rn,ln+=(n-ln)/rn}function yn(){function i(i,r){i*=ge;var a=Math.cos(r*=ge),o=a*Math.cos(i),s=a*Math.sin(i),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=t*l-n*s)*u+(u=n*o-e*l)*u+(u=e*s-t*o)*u),e*o+t*s+n*l);an+=u,un+=u*(e+(e=o)),cn+=u*(t+(t=s)),fn+=u*(n+(n=l)),vn(e,t,n)}var e,t,n;mn.point=function(r,a){r*=ge;var o=Math.cos(a*=ge);e=o*Math.cos(r),t=o*Math.sin(r),n=Math.sin(a),mn.point=i,vn(e,t,n)}}function bn(){mn.point=gn}function xn(){function a(e,t){e*=ge;var a=Math.cos(t*=ge),o=a*Math.cos(e),s=a*Math.sin(e),l=Math.sin(t),u=i*l-r*s,c=r*o-n*l,f=n*s-i*o,d=Math.sqrt(u*u+c*c+f*f),p=n*o+i*s+r*l,h=d&&-be(p)/d,m=Math.atan2(d,p);dn+=h*u,pn+=h*c,hn+=h*f,an+=m,un+=m*(n+(n=o)),cn+=m*(i+(i=s)),fn+=m*(r+(r=l)),vn(n,i,r)}var e,t,n,i,r;mn.point=function(o,s){e=o,t=s,mn.point=a,o*=ge;var l=Math.cos(s*=ge);n=l*Math.cos(o),i=l*Math.sin(o),r=Math.sin(s),vn(n,i,r)},mn.lineEnd=function(){a(e,t),mn.lineEnd=bn,mn.point=gn}}function wn(){return!0}function _n(e,t,n,i,r){var a=[],o=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],i=e[t];if(nn(n,i)){r.lineStart();for(var s=0;t>s;++s)r.point((n=e[s])[0],n[1]);return void r.lineEnd()}var l={point:n,points:e,other:null,visited:!1,entry:!0,subject:!0},u={point:n,points:[n],other:l,visited:!1,entry:!1,subject:!1};l.other=u,a.push(l),o.push(u),l={point:i,points:[i],other:null,visited:!1,entry:!1,subject:!0},u={point:i,points:[i],other:l,visited:!1,entry:!0,subject:!1},l.other=u,a.push(l),o.push(u)}}),o.sort(t),kn(a),kn(o),a.length){if(n)for(var s=1,l=!n(o[0].point),u=o.length;u>s;++s)o[s].entry=l=!l;for(var f,d,p,c=a[0];;){for(f=c;f.visited;)if((f=f.next)===c)return;d=f.points,r.lineStart();do{if(f.visited=f.other.visited=!0,f.entry){if(f.subject)for(var s=0;s<d.length;s++)r.point((p=d[s])[0],p[1]);else i(f.point,f.next.point,1,r);f=f.next}else{if(f.subject){d=f.prev.points;for(var s=d.length;--s>=0;)r.point((p=d[s])[0],p[1])}else i(f.point,f.prev.point,-1,r);f=f.prev}f=f.other,d=f.points}while(!f.visited);r.lineEnd()}}}function kn(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n<t;)i.next=r=e[n],r.prev=i,i=r;i.next=r=e[0],r.prev=i}}function Cn(t,n,i,r){return function(a){function l(e,n){t(e,n)&&a.point(e,n)}function u(e,t){o.point(e,t)}function c(){s.point=u,o.lineStart()}function f(){s.point=l,o.lineEnd()}function v(e,t){h.point(e,t),g.push([e,t])}function y(){h.lineStart(),g=[]}function b(){v(g[0][0],g[0][1]),h.lineEnd();var n,e=h.clean(),t=p.buffer(),i=t.length;if(g.pop(),m.push(g),g=null,i){if(1&e){n=t[0];var o,i=n.length-1,r=-1;for(a.lineStart();++r<i;)a.point((o=n[r])[0],o[1]);return void a.lineEnd()}i>1&&2&e&&t.push(t.pop().concat(t.shift())),d.push(t.filter(Tn))}}var d,m,g,o=n(a),s={point:l,lineStart:c,lineEnd:f,polygonStart:function(){s.point=v,s.lineStart=y,s.lineEnd=b,d=[],m=[],a.polygonStart()},polygonEnd:function(){s.point=l,s.lineStart=c,s.lineEnd=f,d=e.merge(d),d.length?_n(d,En,null,i,a):r(m)&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),a.polygonEnd(),d=m=null},sphere:function(){a.polygonStart(),a.lineStart(),i(null,null,1,a),a.lineEnd(),a.polygonEnd()}},p=Sn(),h=n(p);return s}}function Tn(e){return e.length>1}function Sn(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:T,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function En(e,t){return((e=e.point)[0]<0?e[1]-pe/2-he:pe/2-e[1])-((t=t.point)[0]<0?t[1]-pe/2-he:pe/2-t[1])}function Nn(e,t){var n=e[0],i=e[1],r=[Math.sin(n),-Math.cos(n),0],a=0,o=!1,s=!1,l=0;Vt.reset();for(var u=0,c=t.length;c>u;++u){var f=t[u],d=f.length;if(d){for(var p=f[0],h=p[0],m=p[1]/2+pe/4,g=Math.sin(m),v=Math.cos(m),y=1;;){y===d&&(y=0),e=f[y];var b=e[0],x=e[1]/2+pe/4,w=Math.sin(x),_=Math.cos(x),k=b-h,C=Math.abs(k)>pe,T=g*w;if(Vt.add(Math.atan2(T*Math.sin(k),v*_+T*Math.cos(k))),Math.abs(x)<he&&(s=!0),a+=C?k+(k>=0?2:-2)*pe:k,C^h>=n^b>=n){var S=Yt(Xt(p),Xt(e));en(S);var E=Yt(r,S);en(E);var N=(C^k>=0?-1:1)*xe(E[2]);i>N&&(l+=C^k>=0?1:-1)}if(!y++)break;h=b,g=w,v=_,p=e}Math.abs(a)>he&&(o=!0)}}return(!s&&!o&&0>Vt||-he>a)^1&l}function Dn(e){var r,t=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),r=1},point:function(a,o){var s=a>0?pe:-pe,l=Math.abs(a-t);Math.abs(l-pe)<he?(e.point(t,n=(n+o)/2>0?pe/2:-pe/2),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),r=0):i!==s&&l>=pe&&(Math.abs(t-i)<he&&(t-=i*he),Math.abs(a-s)<he&&(a-=s*he),n=Mn(t,n,a,o),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(s,n),r=0),e.point(t=a,n=o),i=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}function Mn(e,t,n,i){var r,a,o=Math.sin(e-n);return Math.abs(o)>he?Math.atan((Math.sin(t)*(a=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(t))*Math.sin(e))/(r*a*o)):(t+i)/2}function An(e,t,n,i){var r;if(null==e)r=n*pe/2,i.point(-pe,r),i.point(0,r),i.point(pe,r),i.point(pe,0),i.point(pe,-r),i.point(0,-r),i.point(-pe,-r),i.point(-pe,0),i.point(-pe,r);else if(Math.abs(e[0]-t[0])>he){var a=(e[0]<t[0]?1:-1)*pe;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(t[0],t[1])}function On(e){return Nn($n,e)}function In(e){function o(e,n){return Math.cos(e)*Math.cos(n)>t}function s(e){var t,i,a,s,c;return{lineStart:function(){s=a=!1,c=1},point:function(f,d){var h,p=[f,d],m=o(f,d),g=n?m?0:u(f,d):m?u(f+(0>f?pe:-pe),d):0;if(!t&&(s=a=m)&&e.lineStart(),m!==a&&(h=l(t,p),(nn(t,h)||nn(p,h))&&(p[0]+=he,p[1]+=he,m=o(p[0],p[1]))),m!==a)c=0,m?(e.lineStart(),h=l(p,t),e.point(h[0],h[1])):(h=l(t,p),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(r&&t&&n^m){var v;g&i||!(v=l(p,t,!0))||(c=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||t&&nn(t,p)||e.point(p[0],p[1]),t=p,a=m,i=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return c|(s&&a)<<1}}}function l(e,n,i){var r=Xt(e),a=Xt(n),o=[1,0,0],s=Yt(r,a),l=Gt(s,s),u=s[0],c=l-u*u;if(!c)return!i&&e;var f=t*l/c,d=-t*u/c,p=Yt(o,s),h=Zt(o,f),m=Zt(s,d);Kt(h,m);var g=p,v=Gt(h,g),y=Gt(g,g),b=v*v-y*(Gt(h,h)-1);if(!(0>b)){var x=Math.sqrt(b),w=Zt(g,(-v-x)/y);if(Kt(w,h),w=tn(w),!i)return w;var S,_=e[0],k=n[0],C=e[1],T=n[1];_>k&&(S=_,_=k,k=S);var E=k-_,N=Math.abs(E-pe)<he,j=N||he>E;if(!N&&C>T&&(S=C,C=T,T=S),j?N?C+T>0^w[1]<(Math.abs(w[0]-_)<he?C:T):C<=w[1]&&w[1]<=T:E>pe^(_<=w[0]&&w[0]<=k)){var D=Zt(g,(-v+x)/y);return Kt(D,h),[w,tn(D)]}}}function u(t,i){var r=n?e:pe-e,a=0;return-r>t?a|=1:t>r&&(a|=2),-r>i?a|=4:i>r&&(a|=8),a}function c(e){return Nn(i,e)}var t=Math.cos(e),n=t>0,i=[e,0],r=Math.abs(t)>he,a=vi(e,6*ge);return Cn(o,s,a,c)}function Hn(t,n,i,r){function a(e,r){return Math.abs(e[0]-t)<he?r>0?0:3:Math.abs(e[0]-i)<he?r>0?2:1:Math.abs(e[1]-n)<he?r>0?1:0:r>0?3:2}function o(e,t){return s(e.point,t.point)}function s(e,t){var n=a(e,1),i=a(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}function l(e,a){var o=a[0]-e[0],s=a[1]-e[1],l=[0,1];return Math.abs(o)<he&&Math.abs(s)<he?t<=e[0]&&e[0]<=i&&n<=e[1]&&e[1]<=r:Pn(t-e[0],o,l)&&Pn(e[0]-i,-o,l)&&Pn(n-e[1],s,l)&&Pn(e[1]-r,-s,l)?(l[1]<1&&(a[0]=e[0]+l[1]*o,a[1]=e[1]+l[1]*s),l[0]>0&&(e[0]+=l[0]*o,e[1]+=l[0]*s),!0):!1}return function(u){function g(e){var o=a(e,-1),s=v([0===o||3===o?t:i,o>1?r:n]);return s}function v(e){for(var t=0,n=p.length,i=e[1],r=0;n>r;++r)for(var u,a=1,o=p[r],s=o.length,l=o[0];s>a;++a)u=o[a],l[1]<=i?u[1]>i&&y(l,u,e)>0&&++t:u[1]<=i&&y(l,u,e)<0&&--t,l=u;return 0!==t}function y(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function b(e,o,l,u){var c=0,f=0;if(null==e||(c=a(e,l))!==(f=a(o,l))||s(e,o)<0^l>0){do u.point(0===c||3===c?t:i,c>1?r:n);while((c=(c+l+4)%4)!==f)}else u.point(o[0],o[1])}function x(e,a){return e>=t&&i>=e&&a>=n&&r>=a}function w(e,t){x(e,t)&&u.point(e,t)}function j(){m.point=M,p&&p.push(h=[]),N=!0,E=!1,T=S=NaN}function D(){d&&(M(_,k),C&&E&&f.rejoin(),d.push(f.buffer())),m.point=w,E&&u.lineEnd()}function M(e,t){e=Math.max(-Ln,Math.min(Ln,e)),t=Math.max(-Ln,Math.min(Ln,t));var n=x(e,t);if(p&&h.push([e,t]),N)_=e,k=t,C=n,N=!1,n&&(u.lineStart(),u.point(e,t));else if(n&&E)u.point(e,t);else{var i=[T,S],r=[e,t];l(i,r)?(E||(u.lineStart(),u.point(i[0],i[1])),u.point(r[0],r[1]),n||u.lineEnd()):n&&(u.lineStart(),u.point(e,t))}T=e,S=t,E=n}var d,p,h,_,k,C,T,S,E,N,c=u,f=Sn(),m={point:w,lineStart:j,lineEnd:D,polygonStart:function(){u=f,d=[],p=[]},polygonEnd:function(){u=c,(d=e.merge(d)).length?(u.polygonStart(),_n(d,o,g,b,u),u.polygonEnd()):v([t,n])&&(u.polygonStart(),u.lineStart(),b(null,null,1,u),u.lineEnd(),u.polygonEnd()),d=p=h=null}};return m}}function Pn(e,t,n){if(Math.abs(t)<he)return 0>=e;var i=e/t;if(t>0){if(i>n[1])return!1;i>n[0]&&(n[0]=i)}else{if(i<n[0])return!1;i<n[1]&&(n[1]=i)}return!0}function Fn(e,t){function n(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),n}function Rn(e){var t=0,n=pe/3,i=ci(e),r=i(t,n);return r.parallels=function(e){return arguments.length?i(t=e[0]*pe/180,n=e[1]*pe/180):[t/pe*180,n/pe*180]},r}function zn(e,t){function o(e,t){var n=Math.sqrt(r-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var n=Math.sin(e),i=(n+Math.sin(t))/2,r=1+n*(2*i-n),a=Math.sqrt(r)/i;return o.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,xe((r-(e*e+n*n)*i*i)/(2*i))]},o}function Un(){function r(e,t){Bn+=i*e-n*t,n=e,i=t}var e,t,n,i;Wn.point=function(a,o){Wn.point=r,e=n=a,t=i=o},Wn.lineEnd=function(){r(e,t)}}function Yn(e,t){Vn>e&&(Vn=e),e>Jn&&(Jn=e),Qn>t&&(Qn=t),t>Xn&&(Xn=t)}function Kn(){function i(n,i){t.push("M",n,",",i,e)}function r(e,i){t.push("M",e,",",i),n.point=a}function a(e,n){t.push("L",e,",",n)}function o(){n.point=i}function s(){t.push("Z")}var e=Zn(4.5),t=[],n={point:i,lineStart:function(){n.point=r},lineEnd:o,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=o,n.point=i},pointRadius:function(t){return e=Zn(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};return n}function Zn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ti(e,t){on+=e,sn+=t,++ln}function ni(){function n(n,i){var r=n-e,a=i-t,o=Math.sqrt(r*r+a*a);un+=o*(e+n)/2,cn+=o*(t+i)/2,fn+=o,ti(e=n,t=i)}var e,t;ei.point=function(i,r){ei.point=n,ti(e=i,t=r)}}function ii(){ei.point=ti}function ri(){function r(e,t){var r=e-n,a=t-i,o=Math.sqrt(r*r+a*a);un+=o*(n+e)/2,cn+=o*(i+t)/2,fn+=o,o=i*e-n*t,dn+=o*(n+e),pn+=o*(i+t),hn+=3*o,ti(n=e,i=t)}var e,t,n,i;ei.point=function(a,o){ei.point=r,ti(e=n=a,t=i=o)},ei.lineEnd=function(){r(e,t)}}function ai(e){function i(n,i){e.moveTo(n,i),e.arc(n,i,t,0,2*pe)}function r(t,i){e.moveTo(t,i),n.point=a}function a(t,n){e.lineTo(t,n)}function o(){n.point=i}function s(){e.closePath()}var t=4.5,n={point:i,lineStart:function(){n.point=r},lineEnd:o,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=o,n.point=i},pointRadius:function(e){return t=e,n},result:T};return n}function oi(e){function r(t){function y(n,i){n=e(n,i),t.point(n[0],n[1])}function b(){d=NaN,v.point=x,t.lineStart()}function x(n,r){var o=Xt([n,r]),s=e(n,r);a(d,p,f,h,m,g,d=s[0],p=s[1],f=n,h=o[0],m=o[1],g=o[2],i,t),t.point(d,p)}function w(){v.point=y,t.lineEnd()}function _(){b(),v.point=k,v.lineEnd=C}function k(e,t){x(n=e,r=t),o=d,s=p,l=h,u=m,c=g,v.point=x}function C(){a(d,p,f,h,m,g,o,s,n,l,u,c,i,t),v.lineEnd=w,w()}var n,r,o,s,l,u,c,f,d,p,h,m,g,v={point:y,lineStart:b,lineEnd:w,polygonStart:function(){t.polygonStart(),v.lineStart=_},polygonEnd:function(){t.polygonEnd(),v.lineStart=b}};return v}function a(i,r,o,s,l,u,c,f,d,p,h,m,g,v){var y=c-i,b=f-r,x=y*y+b*b;if(x>4*t&&g--){var w=s+p,_=l+h,k=u+m,C=Math.sqrt(w*w+_*_+k*k),T=Math.asin(k/=C),S=Math.abs(Math.abs(k)-1)<he?(o+d)/2:Math.atan2(_,w),E=e(S,T),N=E[0],j=E[1],D=N-i,M=j-r,A=b*D-y*M;(A*A/x>t||Math.abs((y*D+b*M)/x-.5)>.3||n>s*p+l*h+u*m)&&(a(i,r,o,s,l,u,N,j,S,w/=C,_/=C,k,g,v),v.point(N,j),a(N,j,S,w,_,k,c,f,d,p,h,m,g,v))}}var t=.5,n=Math.cos(30*ge),i=16;return r.precision=function(e){return arguments.length?(i=(t=e*e)>0&&16,r):Math.sqrt(t)},r}function si(e){this.stream=e}function li(e){var t=oi(function(t,n){return e([t*ve,n*ve])});return function(e){var n=new si(e=t(e));return n.point=function(t,n){e.point(t*ge,n*ge)},n}}function ui(e){return ci(function(){return e})()}function ci(t){function w(e){return e=r(e[0]*ge,e[1]*ge),[e[0]*o+h,m-e[1]*o]}function _(e){return e=r.invert((e[0]-h)/o,(m-e[1])/o),e&&[e[0]*ve,e[1]*ve]}function k(){r=Fn(i=pi(f,d,p),n);var e=n(u,c);return h=s-e[0]*o,m=l+e[1]*o,C()}function C(){return x&&(x.valid=!1,x=null),w}var n,i,r,h,m,x,a=oi(function(e,t){return e=n(e,t),[e[0]*o+h,m-e[1]*o]}),o=150,s=480,l=250,u=0,c=0,f=0,d=0,p=0,g=jn,v=ft,y=null,b=null;return w.stream=function(e){return x&&(x.valid=!1),x=fi(i,g(a(v(e)))),x.valid=!0,x},w.clipAngle=function(e){return arguments.length?(g=null==e?(y=e,jn):In((y=+e)*ge),C()):y},w.clipExtent=function(e){return arguments.length?(b=e,v=e?Hn(e[0][0],e[0][1],e[1][0],e[1][1]):ft,C()):b},w.scale=function(e){return arguments.length?(o=+e,k()):o},w.translate=function(e){return arguments.length?(s=+e[0],l=+e[1],k()):[s,l]},w.center=function(e){return arguments.length?(u=e[0]%360*ge,c=e[1]%360*ge,k()):[u*ve,c*ve]},w.rotate=function(e){return arguments.length?(f=e[0]%360*ge,d=e[1]%360*ge,p=e.length>2?e[2]%360*ge:0,k()):[f*ve,d*ve,p*ve]},e.rebind(w,a,"precision"),function(){return n=t.apply(this,arguments),w.invert=n.invert&&_,k()}}function fi(e,t){var n=new si(t);return n.point=function(n,i){i=e(n*ge,i*ge),n=i[0],t.point(n>pe?n-2*pe:-pe>n?n+2*pe:n,i[1])},n}function di(e,t){return[e,t]}function pi(e,t,n){return e?t||n?Fn(mi(e),gi(t,n)):mi(e):t||n?gi(t,n):di}function hi(e){return function(t,n){return t+=e,[t>pe?t-2*pe:-pe>t?t+2*pe:t,n]}}function mi(e){var t=hi(e);return t.invert=hi(-e),t}function gi(e,t){function o(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,u=Math.sin(t),c=u*n+s*i;return[Math.atan2(l*r-c*a,s*n-u*i),xe(c*r+l*a)]}var n=Math.cos(e),i=Math.sin(e),r=Math.cos(t),a=Math.sin(t);return o.invert=function(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,u=Math.sin(t),c=u*r-l*a;return[Math.atan2(l*r+u*a,s*n+c*i),xe(c*n-s*i)]},o}function vi(e,t){var n=Math.cos(e),i=Math.sin(e);return function(r,a,o,s){null!=r?(r=yi(n,r),a=yi(n,a),(o>0?a>r:r>a)&&(r+=2*o*pe)):(r=e+2*o*pe,a=e);for(var l,u=o*t,c=r;o>0?c>a:a>c;c-=u)s.point((l=tn([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],l[1])}}function yi(e,t){var n=Xt(t);n[0]-=e,en(n);var i=be(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-he)%(2*Math.PI)}function bi(t,n,i){var r=e.range(t,n-he,i).concat(n);return function(e){return r.map(function(t){return[e,t]})}}function xi(t,n,i){var r=e.range(t,n-he,i).concat(n);return function(e){return r.map(function(t){return[t,e]})}}function wi(e){return e.source}function _i(e){return e.target}function ki(e,t,n,i){var r=Math.cos(t),a=Math.sin(t),o=Math.cos(i),s=Math.sin(i),l=r*Math.cos(e),u=r*Math.sin(e),c=o*Math.cos(n),f=o*Math.sin(n),d=2*Math.asin(Math.sqrt(Ce(i-t)+r*o*Ce(n-e))),p=1/Math.sin(d),h=d?function(e){var t=Math.sin(e*=d)*p,n=Math.sin(d-e)*p,i=n*l+t*c,r=n*u+t*f,o=n*a+t*s;return[Math.atan2(r,i)*ve,Math.atan2(o,Math.sqrt(i*i+r*r))*ve]}:function(){return[e*ve,t*ve]};return h.distance=d,h}function Si(){function i(i,r){var a=Math.sin(r*=ge),o=Math.cos(r),s=Math.abs((i*=ge)-e),l=Math.cos(s);Ci+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=n*a-t*o*l)*s),t*a+n*o*l),e=i,t=a,n=o}var e,t,n;Ti.point=function(r,a){e=r*ge,t=Math.sin(a*=ge),n=Math.cos(a),Ti.point=i},Ti.lineEnd=function(){Ti.point=Ti.lineEnd=T}}function Ei(e,t){function n(t,n){var i=Math.cos(t),r=Math.cos(n),a=e(i*r);return[a*r*Math.sin(t),a*Math.sin(n)]}return n.invert=function(e,n){var i=Math.sqrt(e*e+n*n),r=t(i),a=Math.sin(r),o=Math.cos(r);return[Math.atan2(e*a,i*o),Math.asin(i&&n*a/i)]},n}function Di(e,t){function o(e,t){var n=Math.abs(Math.abs(t)-pe/2)<he?0:a/Math.pow(i(t),r);return[n*Math.sin(r*e),a-n*Math.cos(r*e)]}var n=Math.cos(e),i=function(e){return Math.tan(pe/4+e/2)},r=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(i(t)/i(e)),a=n*Math.pow(i(e),r)/r;return r?(o.invert=function(e,t){var n=a-t,i=ye(r)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/r,2*Math.atan(Math.pow(a/i,1/r))-pe/2]},o):$i}function Mi(e,t){function a(e,t){var n=r-t;return[n*Math.sin(i*e),r-n*Math.cos(i*e)]}var n=Math.cos(e),i=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),r=n/i+e;return Math.abs(i)<he?di:(a.invert=function(e,t){var n=r-t;return[Math.atan2(e,n)/i,r-ye(i)*Math.sqrt(e*e+n*n)]},a)}function $i(e,t){return[e,Math.log(Math.tan(pe/4+t/2))]}function Oi(e){var a,t=ui(e),n=t.scale,i=t.translate,r=t.clipExtent;return t.scale=function(){var e=n.apply(t,arguments);return e===t?a?t.clipExtent(null):t:e},t.translate=function(){var e=i.apply(t,arguments);return e===t?a?t.clipExtent(null):t:e},t.clipExtent=function(e){var o=r.apply(t,arguments);if(o===t){if(a=null==e){var s=pe*n(),l=i();r([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else a&&(o=null);return o},t.clipExtent(null)}function Hi(e,t){var n=Math.cos(t)*Math.sin(e);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(t),Math.cos(e))]}function Pi(e){function s(a){function h(){s.push("M",r(e(l),o))}for(var f,s=[],l=[],u=-1,c=a.length,d=ct(t),p=ct(n);++u<c;)i.call(this,f=a[u],u)?l.push([+d.call(this,f,u),+p.call(this,f,u)]):l.length&&(h(),l=[]);return l.length&&h(),s.length?s.join(""):null}var t=Fi,n=Ri,i=wn,r=qi,a=r.key,o=.7;return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(i=e,s):i},s.interpolate=function(e){return arguments.length?(a="function"==typeof e?r=e:(r=zi.get(e)||qi).key,s):a},s.tension=function(e){return arguments.length?(o=e,s):o},s}function Fi(e){return e[0]}function Ri(e){return e[1]}function qi(e){return e.join("L")}function Bi(e){return qi(e)+"Z"}function Wi(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i[0]+(i=e[t])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function Ui(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("V",(i=e[t])[1],"H",i[0]);return r.join("")}function Vi(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i=e[t])[0],"V",i[1]);return r.join("")}function Qi(e,t){return e.length<4?qi(e):e[1]+Gi(e.slice(1,e.length-1),Yi(e,t))}function Ji(e,t){return e.length<3?qi(e):e[0]+Gi((e.push(e[0]),e),Yi([e[e.length-2]].concat(e,[e[1]]),t))}function Xi(e,t){return e.length<3?qi(e):e[0]+Gi(e,Yi(e,t))}function Gi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return qi(e);var n=e.length!=t.length,i="",r=e[0],a=e[1],o=t[0],s=o,l=1;if(n&&(i+="Q"+(a[0]-2*o[0]/3)+","+(a[1]-2*o[1]/3)+","+a[0]+","+a[1],r=e[1],l=2),t.length>1){s=t[1],a=e[l],l++,i+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u<t.length;u++,l++)a=e[l],s=t[u],i+="S"+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1]}if(n){var c=e[l];i+="Q"+(a[0]+2*s[0]/3)+","+(a[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function Yi(e,t){for(var r,n=[],i=(1-t)/2,a=e[0],o=e[1],s=1,l=e.length;++s<l;)r=a,a=o,o=e[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Ki(e){if(e.length<3)return qi(e);var t=1,n=e.length,i=e[0],r=i[0],a=i[1],o=[r,r,r,(i=e[1])[0]],s=[a,a,a,i[1]],l=[r,",",a,"L",nr(ar,o),",",nr(ar,s)];for(e.push(e[n-1]);++t<=n;)i=e[t],o.shift(),o.push(i[0]),s.shift(),s.push(i[1]),or(l,o,s);return e.pop(),l.push("L",i),l.join("")}function Zi(e){if(e.length<4)return qi(e);for(var r,t=[],n=-1,i=e.length,a=[0],o=[0];++n<3;)r=e[n],a.push(r[0]),o.push(r[1]);for(t.push(nr(ar,a)+","+nr(ar,o)),--n;++n<i;)r=e[n],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),or(t,a,o);return t.join("")}function er(e){for(var t,a,n=-1,i=e.length,r=i+4,o=[],s=[];++n<4;)a=e[n%i],o.push(a[0]),s.push(a[1]);for(t=[nr(ar,o),",",nr(ar,s)],--n;++n<r;)a=e[n%i],o.shift(),o.push(a[0]),s.shift(),s.push(a[1]),or(t,o,s);return t.join("")}function tr(e,t){var n=e.length-1;if(n)for(var l,u,i=e[0][0],r=e[0][1],a=e[n][0]-i,o=e[n][1]-r,s=-1;++s<=n;)l=e[s],u=s/n,l[0]=t*l[0]+(1-t)*(i+u*a),l[1]=t*l[1]+(1-t)*(r+u*o);return Ki(e)}function nr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function or(e,t,n){e.push("C",nr(ir,t),",",nr(ir,n),",",nr(rr,t),",",nr(rr,n),",",nr(ar,t),",",nr(ar,n))}function sr(e,t){return(t[1]-e[1])/(t[0]-e[0])}function lr(e){for(var t=0,n=e.length-1,i=[],r=e[0],a=e[1],o=i[0]=sr(r,a);++t<n;)i[t]=(o+(o=sr(r=a,a=e[t+1])))/2;return i[t]=o,i}function ur(e){
for(var n,i,r,a,t=[],o=lr(e),s=-1,l=e.length-1;++s<l;)n=sr(e[s],e[s+1]),Math.abs(n)<1e-6?o[s]=o[s+1]=0:(i=o[s]/n,r=o[s+1]/n,a=i*i+r*r,a>9&&(a=3*n/Math.sqrt(a),o[s]=a*i,o[s+1]=a*r));for(s=-1;++s<=l;)a=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),t.push([a||0,o[s]*a||0]);return t}function cr(e){return e.length<3?qi(e):e[0]+Gi(e,ur(e))}function fr(e,t,n,i){var r,a,o,s,l,u,c;return r=i[e],a=r[0],o=r[1],r=i[t],s=r[0],l=r[1],r=i[n],u=r[0],c=r[1],(c-o)*(s-a)-(l-o)*(u-a)>0}function pr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function hr(e,t,n,i){var r=e[0],a=n[0],o=t[0]-r,s=i[0]-a,l=e[1],u=n[1],c=t[1]-l,f=i[1]-u,d=(s*(l-u)-f*(r-a))/(f*o-s*c);return[r+d*o,l+d*c]}function mr(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function vr(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},i={list:[],leftEnd:null,rightEnd:null,init:function(){i.leftEnd=i.createHalfEdge(null,"l"),i.rightEnd=i.createHalfEdge(null,"l"),i.leftEnd.r=i.rightEnd,i.rightEnd.l=i.leftEnd,i.list.unshift(i.leftEnd,i.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=i.leftEnd;do t=t.r;while(t!=i.rightEnd&&r.rightOf(t,e));return t=t.l},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return null==e.edge?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return null==e.edge?n.bottomSite:e.edge.region[gr[e.side]]}},r={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},i=t.x-e.x,r=t.y-e.y,a=i>0?i:-i,o=r>0?r:-r;return n.c=e.x*i+e.y*r+.5*(i*i+r*r),a>o?(n.a=1,n.b=r/i,n.c/=i):(n.b=1,n.a=i/r,n.c/=r),n},intersect:function(e,t){var n=e.edge,i=t.edge;if(!n||!i||n.region.r==i.region.r)return null;var r=n.a*i.b-n.b*i.a;if(Math.abs(r)<1e-10)return null;var u,c,a=(n.c*i.b-i.c*n.b)/r,o=(i.c*n.a-n.c*i.a)/r,s=n.region.r,l=i.region.r;s.y<l.y||s.y==l.y&&s.x<l.x?(u=e,c=n):(u=t,c=i);var f=a>=c.region.r.x;return f&&"l"===u.side||!f&&"r"===u.side?null:{x:a,y:o}},rightOf:function(e,t){var n=e.edge,i=n.region.r,r=t.x>i.x;if(r&&"l"===e.side)return 1;if(!r&&"r"===e.side)return 0;if(1===n.a){var a=t.y-i.y,o=t.x-i.x,s=0,l=0;if(!r&&n.b<0||r&&n.b>=0?l=s=a>=n.b*o:(l=t.x+t.y*n.b>n.c,n.b<0&&(l=!l),l||(s=1)),!s){var u=i.x-n.region.l.x;l=n.b*(o*o-a*a)<u*a*(1+2*o/u+n.b*n.b),n.b<0&&(l=!l)}}else{var c=n.c-n.a*t.x,f=t.y-c,d=t.x-i.x,p=c-i.y;l=f*f>d*d+p*p}return"l"===e.side?l:!l},endPoint:function(e,n,i){e.ep[n]=i,e.ep[gr[n]]&&t(e)},distance:function(e,t){var n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)}},a={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var i=0,r=a.list,o=r.length;o>i;i++){var s=r[i];if(!(e.ystar>s.ystar||e.ystar==s.ystar&&t.x>s.vertex.x))break}r.splice(i,0,e)},del:function(e){for(var t=0,n=a.list,i=n.length;i>t&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return 0===a.list.length},nextEvent:function(e){for(var t=0,n=a.list,i=n.length;i>t;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=a.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return a.list.shift()}};i.init(),n.bottomSite=n.list.shift();for(var s,l,u,c,f,d,p,h,m,g,v,y,b,o=n.list.shift();;)if(a.empty()||(s=a.min()),o&&(a.empty()||o.y<s.y||o.y==s.y&&o.x<s.x))l=i.leftBound(o),u=i.right(l),p=i.rightRegion(l),y=r.bisect(p,o),d=i.createHalfEdge(y,"l"),i.insert(l,d),g=r.intersect(l,d),g&&(a.del(l),a.insert(l,g,r.distance(g,o))),l=d,d=i.createHalfEdge(y,"r"),i.insert(l,d),g=r.intersect(d,u),g&&a.insert(d,g,r.distance(g,o)),o=n.list.shift();else{if(a.empty())break;l=a.extractMin(),c=i.left(l),u=i.right(l),f=i.right(u),p=i.leftRegion(l),h=i.rightRegion(u),v=l.vertex,r.endPoint(l.edge,l.side,v),r.endPoint(u.edge,u.side,v),i.del(l),a.del(u),i.del(u),b="l",p.y>h.y&&(m=p,p=h,h=m,b="r"),y=r.bisect(p,h),d=i.createHalfEdge(y,b),i.insert(c,d),r.endPoint(y,gr[b],v),g=r.intersect(c,d),g&&(a.del(c),a.insert(c,g,r.distance(g,p))),g=r.intersect(d,f),g&&a.insert(d,g,r.distance(g,p))}for(l=i.right(i.leftEnd);l!=i.rightEnd;l=i.right(l))t(l.edge)}function yr(e){return e.x}function br(e){return e.y}function xr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function wr(e,t,n,i,r,a){if(!e(t,n,i,r,a)){var o=.5*(n+r),s=.5*(i+a),l=t.nodes;l[0]&&wr(e,l[0],n,i,o,s),l[1]&&wr(e,l[1],o,i,r,s),l[2]&&wr(e,l[2],n,s,o,a),l[3]&&wr(e,l[3],o,s,r,a)}}function _r(t,n){t=e.rgb(t),n=e.rgb(n);var i=t.r,r=t.g,a=t.b,o=n.r-i,s=n.g-r,l=n.b-a;return function(e){return"#"+it(Math.round(i+o*e))+it(Math.round(r+s*e))+it(Math.round(a+l*e))}}function kr(e,t){var r,n={},i={};for(r in e)r in t?n[r]=Er(e[r],t[r]):i[r]=e[r];for(r in t)r in e||(i[r]=t[r]);return function(e){for(r in n)i[r]=n[r](e);return i}}function Cr(e,t){return t-=e=+e,function(n){return e+t*n}}function Tr(e,t){var n,i,r,u,c,a=0,o=0,s=[],l=[];for(e+="",t+="",Sr.lastIndex=0,i=0;n=Sr.exec(t);++i)n.index&&s.push(t.substring(a,o=n.index)),l.push({i:s.length,x:n[0]}),s.push(null),a=Sr.lastIndex;for(a<t.length&&s.push(t.substring(a)),i=0,u=l.length;(n=Sr.exec(e))&&u>i;++i)if(c=l[i],c.x==n[0]){if(c.i)if(null==s[c.i+1])for(s[c.i-1]+=c.x,s.splice(c.i,1),r=i+1;u>r;++r)l[r].i--;else for(s[c.i-1]+=c.x+s[c.i+1],s.splice(c.i,2),r=i+1;u>r;++r)l[r].i-=2;else if(null==s[c.i+1])s[c.i]=c.x;else for(s[c.i]=c.x+s[c.i+1],s.splice(c.i+1,1),r=i+1;u>r;++r)l[r].i--;l.splice(i,1),u--,i--}else c.x=Cr(parseFloat(n[0]),parseFloat(c.x));for(;u>i;)c=l.pop(),null==s[c.i+1]?s[c.i]=c.x:(s[c.i]=c.x+s[c.i+1],s.splice(c.i+1,1)),u--;return 1===s.length?null==s[0]?(c=l[0].x,function(e){return c(e)+""}):function(){return t}:function(e){for(i=0;u>i;++i)s[(c=l[i]).i]=c.x(e);return s.join("")}}function Er(t,n){for(var r,i=e.interpolators.length;--i>=0&&!(r=e.interpolators[i](t,n)););return r}function Nr(e,t){var s,n=[],i=[],r=e.length,a=t.length,o=Math.min(e.length,t.length);for(s=0;o>s;++s)n.push(Er(e[s],t[s]));for(;r>s;++s)i[s]=e[s];for(;a>s;++s)i[s]=t[s];return function(e){for(s=0;o>s;++s)i[s]=n[s](e);return i}}function Ar(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function $r(e){return function(t){return 1-e(1-t)}}function Or(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function Ir(e){return e*e}function Lr(e){return e*e*e}function Hr(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function Pr(e){return function(t){return Math.pow(t,e)}}function Fr(e){return 1-Math.cos(e*pe/2)}function Rr(e){return Math.pow(2,10*(e-1))}function zr(e){return 1-Math.sqrt(1-e*e)}function qr(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/(2*pe)*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,10*-i)*Math.sin(2*(i-n)*pe/t)}}function Br(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Wr(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Ur(t,n){t=e.hcl(t),n=e.hcl(n);var i=t.h,r=t.c,a=t.l,o=n.h-i,s=n.c-r,l=n.l-a;return isNaN(s)&&(s=0,r=isNaN(r)?n.c:r),isNaN(o)?(o=0,i=isNaN(i)?n.h:i):o>180?o-=360:-180>o&&(o+=360),function(e){return Fe(i+o*e,r+s*e,a+l*e)+""}}function Vr(t,n){t=e.hsl(t),n=e.hsl(n);var i=t.h,r=t.s,a=t.l,o=n.h-i,s=n.s-r,l=n.l-a;return isNaN(s)&&(s=0,r=isNaN(r)?n.s:r),isNaN(o)?(o=0,i=isNaN(i)?n.h:i):o>180?o-=360:-180>o&&(o+=360),function(e){return Ie(i+o*e,r+s*e,a+l*e)+""}}function Qr(t,n){t=e.lab(t),n=e.lab(n);var i=t.l,r=t.a,a=t.b,o=n.l-i,s=n.a-r,l=n.b-a;return function(e){return Qe(i+o*e,r+s*e,a+l*e)+""}}function Jr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Xr(e){var t=[e.a,e.b],n=[e.c,e.d],i=Yr(t),r=Gr(t,n),a=Yr(Kr(n,t,-r))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*ve,this.translate=[e.e,e.f],this.scale=[i,a],this.skew=a?Math.atan2(r,a)*ve:0}function Gr(e,t){return e[0]*t[0]+e[1]*t[1]}function Yr(e){var t=Math.sqrt(Gr(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Kr(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function ea(t,n){var a,i=[],r=[],o=e.transform(t),s=e.transform(n),l=o.translate,u=s.translate,c=o.rotate,f=s.rotate,d=o.skew,p=s.skew,h=o.scale,m=s.scale;return l[0]!=u[0]||l[1]!=u[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:Cr(l[0],u[0])},{i:3,x:Cr(l[1],u[1])})):u[0]||u[1]?i.push("translate("+u+")"):i.push(""),c!=f?(c-f>180?f+=360:f-c>180&&(c+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:Cr(c,f)})):f&&i.push(i.pop()+"rotate("+f+")"),d!=p?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:Cr(d,p)}):p&&i.push(i.pop()+"skewX("+p+")"),h[0]!=m[0]||h[1]!=m[1]?(a=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:a-4,x:Cr(h[0],m[0])},{i:a-2,x:Cr(h[1],m[1])})):(1!=m[0]||1!=m[1])&&i.push(i.pop()+"scale("+m+")"),a=r.length,function(e){for(var n,t=-1;++t<a;)i[(n=r[t]).i]=n.x(e);return i.join("")}}function ta(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function na(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function ia(e){for(var t=e.source,n=e.target,i=aa(t,n),r=[t];t!==i;)t=t.parent,r.push(t);for(var a=r.length;n!==i;)r.splice(a,0,n),n=n.parent;return r}function ra(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function aa(e,t){if(e===t)return e;for(var n=ra(e),i=ra(t),r=n.pop(),a=i.pop(),o=null;r===a;)o=r,r=n.pop(),a=i.pop();return o}function oa(e){e.fixed|=2}function sa(e){e.fixed&=-7}function la(e){e.fixed|=4,e.px=e.x,e.py=e.y}function ua(e){e.fixed&=-5}function ca(e,t,n){var i=0,r=0;if(e.charge=0,!e.leaf)for(var l,a=e.nodes,o=a.length,s=-1;++s<o;)l=a[s],null!=l&&(ca(l,t,n),e.charge+=l.charge,i+=l.charge*l.cx,r+=l.charge*l.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,r+=u*e.point.y}e.cx=i/e.charge,e.cy=r/e.charge}function pa(t,n){return e.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=va,t}function ha(e){return e.children}function ma(e){return e.value}function ga(e,t){return t.value-e.value}function va(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function ba(e){return e.x}function xa(e){return e.y}function wa(e,t,n){e.y0=t,e.y=n}function Ca(t){return e.range(t.length)}function Ta(e){for(var t=-1,n=e[0].length,i=[];++t<n;)i[t]=0;return i}function Sa(e){for(var r,t=1,n=0,i=e[0][1],a=e.length;a>t;++t)(r=e[t][1])>i&&(n=t,i=r);return n}function Ea(e){return e.reduce(Na,0)}function Na(e,t){return e+t[1]}function ja(e,t){return Da(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Da(e,t){for(var n=-1,i=+e[0],r=(e[1]-i)/t,a=[];++n<=t;)a[n]=r*n+i;return a}function Ma(t){return[e.min(t),e.max(t)]}function Aa(e,t){return e.parent==t.parent?1:2}function $a(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Oa(e){var n,t=e.children;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Ia(e,t){var n=e.children;if(n&&(r=n.length))for(var i,r,a=-1;++a<r;)t(i=Ia(n[a],t),e)>0&&(e=i);return e}function La(e,t){return e.x-t.x}function Ha(e,t){return t.x-e.x}function Pa(e,t){return e.depth-t.depth}function Fa(e,t){function n(e,i){var r=e.children;if(r&&(l=r.length))for(var a,l,o=null,s=-1;++s<l;)a=r[s],n(a,o),o=a;t(e,i)}n(e,null)}function Ra(e){for(var a,t=0,n=0,i=e.children,r=i.length;--r>=0;)a=i[r]._tree,a.prelim+=t,a.mod+=t,t+=a.shift+(n+=a.change)}function za(e,t,n){e=e._tree,t=t._tree;var i=n/(t.number-e.number);e.change+=i,t.change-=i,t.shift+=n,t.prelim+=n,t.mod+=n}function qa(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function Ba(e,t){return e.value-t.value}function Wa(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ua(e,t){e._pack_next=t,t._pack_prev=e}function Va(e,t){var n=t.x-e.x,i=t.y-e.y,r=e.r+t.r;return.999*r*r>n*n+i*i}function Qa(e){function p(e){n=Math.min(e.x-e.r,n),i=Math.max(e.x+e.r,i),r=Math.min(e.y-e.r,r),a=Math.max(e.y+e.r,a)}if((t=e.children)&&(d=t.length)){var t,o,s,l,u,c,f,d,n=1/0,i=-(1/0),r=1/0,a=-(1/0);if(t.forEach(Ja),o=t[0],o.x=-o.r,o.y=0,p(o),d>1&&(s=t[1],s.x=s.r,s.y=0,p(s),d>2))for(l=t[2],Ya(o,s,l),p(l),Wa(o,l),o._pack_prev=l,Wa(l,s),s=o._pack_next,u=3;d>u;u++){Ya(o,s,l=t[u]);var h=0,m=1,g=1;for(c=s._pack_next;c!==s;c=c._pack_next,m++)if(Va(c,l)){h=1;break}if(1==h)for(f=o._pack_prev;f!==c._pack_prev&&!Va(f,l);f=f._pack_prev,g++);h?(g>m||m==g&&s.r<o.r?Ua(o,s=c):Ua(o=f,s),u--):(Wa(o,l),s=l,p(l))}var v=(n+i)/2,y=(r+a)/2,b=0;for(u=0;d>u;u++)l=t[u],l.x-=v,l.y-=y,b=Math.max(b,l.r+Math.sqrt(l.x*l.x+l.y*l.y));e.r=b,t.forEach(Xa)}}function Ja(e){e._pack_next=e._pack_prev=e}function Xa(e){delete e._pack_next,delete e._pack_prev}function Ga(e,t,n,i){var r=e.children;if(e.x=t+=i*e.x,e.y=n+=i*e.y,e.r*=i,r)for(var a=-1,o=r.length;++a<o;)Ga(r[a],t,n,i)}function Ya(e,t,n){var i=e.r+n.r,r=t.x-e.x,a=t.y-e.y;if(i&&(r||a)){var o=t.r+n.r,s=r*r+a*a;o*=o,i*=i;var l=.5+(i-o)/(2*s),u=Math.sqrt(Math.max(0,2*o*(i+s)-(i-=s)*i-o*o))/(2*s);n.x=e.x+l*r+u*a,n.y=e.y+l*a-u*r}else n.x=e.x+i,n.y=e.y}function Ka(t){return 1+e.max(t,function(e){return e.y})}function Za(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function eo(e){var t=e.children;return t&&t.length?eo(t[0]):e}function to(e){var n,t=e.children;return t&&(n=t.length)?to(t[n-1]):e}function no(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function io(e,t){var n=e.x+t[3],i=e.y+t[0],r=e.dx-t[1]-t[3],a=e.dy-t[0]-t[2];return 0>r&&(n+=r/2,r=0),0>a&&(i+=a/2,a=0),{x:n,y:i,dx:r,dy:a}}function ro(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function ao(e){return e.rangeExtent?e.rangeExtent():ro(e.range())}function oo(e,t,n,i){var r=n(e[0],e[1]),a=i(t[0],t[1]);return function(e){return a(r(e))}}function so(e,t){var o,n=0,i=e.length-1,r=e[n],a=e[i];return r>a&&(o=n,n=i,i=o,o=r,r=a,a=o),e[n]=t.floor(r),e[i]=t.ceil(a),e}function lo(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:uo}function co(t,n,i,r){var a=[],o=[],s=0,l=Math.min(t.length,n.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++s<=l;)a.push(i(t[s-1],t[s])),o.push(r(n[s-1],n[s]));return function(n){var i=e.bisect(t,n,1,l)-1;return o[i](a[i](n))}}function fo(e,t,n,i){function o(){var o=Math.min(e.length,t.length)>2?co:oo,l=i?na:ta;return r=o(e,t,l,n),a=o(t,e,l,Er),s}function s(e){return r(e)}var r,a;return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(Jr)},s.clamp=function(e){return arguments.length?(i=e,o()):i},s.interpolate=function(e){return arguments.length?(n=e,o()):n},s.ticks=function(t){return go(e,t)},s.tickFormat=function(t,n){return vo(e,t,n)},s.nice=function(t){return ho(e,t),o()},s.copy=function(){return fo(e,t,n,i)},o()}function po(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function ho(e,t){return so(e,lo(mo(e,t)[2]))}function mo(e,t){null==t&&(t=10);var n=ro(e),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),a=t/i*r;return.15>=a?r*=10:.35>=a?r*=5:.75>=a&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function go(t,n){return e.range.apply(e,mo(t,n))}function vo(t,n,i){var r=-Math.floor(Math.log(mo(t,n)[2])/Math.LN10+.01);return e.format(i?i.replace(Mt,function(e,t,n,i,a,o,s,l,u,c){return[t,n,i,a,o,s,l,u||"."+(r-2*("%"===c)),c].join("")}):",."+r+"f")}function yo(t,n,i,r){function a(e){return(i?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(n)}function o(e){return i?Math.pow(n,e):-Math.pow(n,-e)}function s(e){return t(a(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((r=e.map(Number)).map(a)),s):r},s.base=function(e){return arguments.length?(n=+e,t.domain(r.map(a)),s):n},s.nice=function(){var e=so(r.map(a),i?Math:xo);return t.domain(e),r=e.map(o),s},s.ticks=function(){var e=ro(r),t=[],s=e[0],l=e[1],u=Math.floor(a(s)),c=Math.ceil(a(l)),f=n%1?2:n;if(isFinite(c-u)){if(i){for(;c>u;u++)for(var d=1;f>d;d++)t.push(o(u)*d);t.push(o(u))}else for(t.push(o(u));u++<c;)for(var d=f-1;d>0;d--)t.push(o(u)*d);for(u=0;t[u]<s;u++);for(c=t.length;t[c-1]>l;c--);t=t.slice(u,c)}return t},s.tickFormat=function(t,n){if(!arguments.length)return bo;arguments.length<2?n=bo:"function"!=typeof n&&(n=e.format(n));var u,r=Math.max(.1,t/s.ticks().length),l=i?(u=1e-12,Math.ceil):(u=-1e-12,Math.floor);return function(e){return e/o(l(a(e)+u))<=r?n(e):""}},s.copy=function(){return yo(t.copy(),n,i,r)},po(s,t)}function wo(e,t,n){function a(t){return e(i(t))}var i=_o(t),r=_o(1/t);return a.invert=function(t){return r(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),a):n},a.ticks=function(e){return go(n,e)},a.tickFormat=function(e,t){return vo(n,e,t)},a.nice=function(e){return a.domain(ho(n,e))},a.exponent=function(o){return arguments.length?(i=_o(t=o),r=_o(1/t),e.domain(n.map(i)),a):t},a.copy=function(){return wo(e.copy(),t,n)},po(a,e)}function _o(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function ko(t,n){function o(e){return r[((i.get(e)||i.set(e,t.push(e)))-1)%r.length]}function s(n,i){return e.range(t.length).map(function(e){return n+i*e})}var i,r,a;return o.domain=function(e){if(!arguments.length)return t;t=[],i=new y;for(var s,r=-1,a=e.length;++r<a;)i.has(s=e[r])||i.set(s,t.push(s));return o[n.t].apply(o,n.a)},o.range=function(e){return arguments.length?(r=e,a=0,n={t:"range",a:arguments},o):r},o.rangePoints=function(e,i){arguments.length<2&&(i=0);var l=e[0],u=e[1],c=(u-l)/(Math.max(1,t.length-1)+i);return r=s(t.length<2?(l+u)/2:l+c*i/2,c),a=0,n={t:"rangePoints",a:arguments},o},o.rangeBands=function(e,i,l){arguments.length<2&&(i=0),arguments.length<3&&(l=i);var u=e[1]<e[0],c=e[u-0],f=e[1-u],d=(f-c)/(t.length-i+2*l);return r=s(c+d*l,d),u&&r.reverse(),a=d*(1-i),n={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(e,i,l){arguments.length<2&&(i=0),arguments.length<3&&(l=i);var u=e[1]<e[0],c=e[u-0],f=e[1-u],d=Math.floor((f-c)/(t.length-i+2*l)),p=f-c-(t.length-i)*d;return r=s(c+Math.round(p/2),d),u&&r.reverse(),a=Math.round(d*(1-i)),n={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return a},o.rangeExtent=function(){return ro(n.a[0])},o.copy=function(){return ko(t,n)},o.domain(t)}function No(t,n){function r(){var r=0,o=n.length;for(i=[];++r<o;)i[r-1]=e.quantile(t,r/o);return a}function a(t){return isNaN(t=+t)?void 0:n[e.bisect(i,t)]}var i;return a.domain=function(n){return arguments.length?(t=n.filter(function(e){return!isNaN(e)}).sort(e.ascending),r()):t},a.range=function(e){return arguments.length?(n=e,r()):n},a.quantiles=function(){return i},a.invertExtent=function(e){return e=n.indexOf(e),0>e?[NaN,NaN]:[e>0?i[e-1]:t[0],e<i.length?i[e]:t[t.length-1]]},a.copy=function(){return No(t,n)},r()}function jo(e,t,n){function a(t){return n[Math.max(0,Math.min(r,Math.floor(i*(t-e))))]}function o(){return i=n.length/(t-e),r=n.length-1,a}var i,r;return a.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],o()):[e,t]},a.range=function(e){return arguments.length?(n=e,o()):n},a.invertExtent=function(t){return t=n.indexOf(t),t=0>t?NaN:t/i+e,[t,t+1/i]},a.copy=function(){return jo(e,t,n)},o()}function Do(t,n){function i(i){return i>=i?n[e.bisect(t,i)]:void 0}return i.domain=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=e,i):n},i.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},i.copy=function(){return Do(t,n)},i}function Mo(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return go(e,t)},t.tickFormat=function(t,n){return vo(e,t,n)},t.copy=function(){return Mo(e)},t}function Oo(e){return e.innerRadius}function Io(e){return e.outerRadius}function Lo(e){return e.startAngle}function Ho(e){return e.endAngle}function Po(e){for(var t,r,a,n=-1,i=e.length;++n<i;)t=e[n],r=t[0],a=t[1]+Ao,t[0]=r*Math.cos(a),t[1]=r*Math.sin(a);return e}function Fo(e){function f(s){function k(){f.push("M",o(e(p),c),u,l(e(d.reverse()),c),"Z")}for(var g,w,_,f=[],d=[],p=[],h=-1,m=s.length,v=ct(t),y=ct(i),b=t===n?function(){return w}:ct(n),x=i===r?function(){return _}:ct(r);++h<m;)a.call(this,g=s[h],h)?(d.push([w=+v.call(this,g,h),_=+y.call(this,g,h)]),p.push([+b.call(this,g,h),+x.call(this,g,h)])):d.length&&(k(),d=[],p=[]);return d.length&&k(),f.length?f.join(""):null}var t=Fi,n=Fi,i=0,r=Ri,a=wn,o=qi,s=o.key,l=o,u="L",c=.7;return f.x=function(e){return arguments.length?(t=n=e,f):n},f.x0=function(e){return arguments.length?(t=e,f):t},f.x1=function(e){return arguments.length?(n=e,f):n},f.y=function(e){return arguments.length?(i=r=e,f):r},f.y0=function(e){return arguments.length?(i=e,f):i},f.y1=function(e){return arguments.length?(r=e,f):r},f.defined=function(e){return arguments.length?(a=e,f):a},f.interpolate=function(e){return arguments.length?(s="function"==typeof e?o=e:(o=zi.get(e)||qi).key,l=o.reverse||o,u=o.closed?"M":"L",f):s},f.tension=function(e){return arguments.length?(c=e,f):c},f}function Ro(e){return e.radius}function zo(e){return[e.x,e.y]}function qo(e){return function(){var t=e.apply(this,arguments),n=t[0],i=t[1]+Ao;return[n*Math.cos(i),n*Math.sin(i)]}}function Bo(){return 64}function Wo(){return"circle"}function Uo(e){var t=Math.sqrt(e/pe);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Xo(e,t){return A(e,Go),e.id=t,e}function es(){var e=this.__transition__;e&&++e.active}function ts(e,t,n,i){var r=e.id;return Z(e,"function"==typeof n?function(e,a,o){e.__transition__[r].tween.set(t,i(n.call(e,e.__data__,a,o)))}:(n=i(n),function(e){e.__transition__[r].tween.set(t,n)}))}function ns(e){return null==e&&(e=""),function(){this.textContent=e}}function is(t,n,i,r){var a=t.__transition__||(t.__transition__={active:0,count:0}),o=a[i];if(!o){var s=r.time;o=a[i]={tween:new y,time:s,ease:r.ease,delay:r.delay,duration:r.duration},++a.count,e.timer(function(e){function d(e){return a.active>i?h():(a.active=i,o.event&&o.event.start.call(t,r,n),o.tween.forEach(function(e,i){(i=i.call(t,r,n))&&f.push(i)}),p(e)?1:void _t(p,0,s))}function p(e){if(a.active!==i)return h();for(var s=(e-u)/c,d=l(s),p=f.length;p>0;)f[--p].call(t,d);return s>=1?(o.event&&o.event.end.call(t,r,n),h()):void 0}function h(){return--a.count?delete a[i]:delete t.__transition__,1}var r=t.__data__,l=o.ease,u=o.delay,c=o.duration,f=[];return e>=u?d(e):void _t(d,u,s)},0,s)}}function os(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function ss(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function ps(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function _s(e,t,n){function i(t){var n=e(t),i=a(n,1);return i-t>t-n?n:i}function r(n){return t(n=e(new fs(n-1)),1),n}function a(e,n){return t(e=new fs(+e),n),e}function o(e,i,a){var o=r(e),s=[];if(a>1)for(;i>o;)n(o)%a||s.push(new Date(+o)),t(o,1);else for(;i>o;)s.push(new Date(+o)),t(o,1);return s}function s(e,t,n){try{fs=ps;var i=new ps;return i._=e,o(i,t,n)}finally{fs=Date}}e.floor=e,e.round=i,e.ceil=r,e.offset=a,e.range=o;var l=e.utc=ks(e);return l.floor=l,l.round=ks(i),l.ceil=ks(r),l.offset=ks(a),l.range=s,e}function ks(e){return function(t,n){try{fs=ps;var i=new ps;return i._=t,e(i,n)._}finally{fs=Date}}}function Cs(e){function n(n){for(var o,s,l,i=[],r=-1,a=0;++r<t;)37===e.charCodeAt(r)&&(i.push(e.substring(a,r)),null!=(s=Ps[o=e.charAt(++r)])&&(o=e.charAt(++r)),(l=Fs[o])&&(o=l(n,null==s?"e"===o?" ":"0":s)),i.push(o),a=r+1);return i.push(e.substring(a,r)),i.join("")}var t=e.length;return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},i=Ts(n,e,t,0);if(i!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=new fs;return"j"in n?r.setFullYear(n.y,0,n.j):"w"in n&&("W"in n||"U"in n)?(r.setFullYear(n.y,0,1),r.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(r.getDay()+5)%7:n.w+7*n.U-(r.getDay()+6)%7)):r.setFullYear(n.y,n.m,n.d),r.setHours(n.H,n.M,n.S,n.L),r},n.toString=function(){return e},n}function Ts(e,t,n,i){for(var r,a,o=0,s=t.length,l=n.length;s>o;){if(i>=l)return-1;if(r=t.charCodeAt(o++),37===r){if(a=Rs[t.charAt(o++)],!a||(i=a(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function Ss(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Es(e){for(var t=new y,n=-1,i=e.length;++n<i;)t.set(e[n].toLowerCase(),n);return t}function Ns(e,t,n){var i=0>e?"-":"",r=(i?-e:e)+"",a=r.length;return i+(n>a?new Array(n-a+1).join(t)+r:r)}function zs(e,t,n){Ms.lastIndex=0;var i=Ms.exec(t.substring(n));return i?(e.w=As.get(i[0].toLowerCase()),n+i[0].length):-1}function qs(e,t,n){js.lastIndex=0;var i=js.exec(t.substring(n));return i?(e.w=Ds.get(i[0].toLowerCase()),n+i[0].length):-1}function Bs(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Ws(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n));return i?(e.U=+i[0],n+i[0].length):-1}function Us(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n));return i?(e.W=+i[0],n+i[0].length):-1}function Vs(e,t,n){Is.lastIndex=0;var i=Is.exec(t.substring(n));return i?(e.m=Ls.get(i[0].toLowerCase()),n+i[0].length):-1}function Qs(e,t,n){$s.lastIndex=0;var i=$s.exec(t.substring(n));return i?(e.m=Os.get(i[0].toLowerCase()),n+i[0].length):-1}function Js(e,t,n){return Ts(e,Fs.c.toString(),t,n)}function Xs(e,t,n){return Ts(e,Fs.x.toString(),t,n)}function Gs(e,t,n){return Ts(e,Fs.X.toString(),t,n)}function Ys(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Ks(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.y=Zs(+i[0]),n+i[0].length):-1}function Zs(e){return e+(e>68?1900:2e3)}function el(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function tl(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function nl(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+3));return i?(e.j=+i[0],n+i[0].length):-1}function il(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function rl(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function al(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function ol(e,t,n){sl.lastIndex=0;var i=sl.exec(t.substring(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function ll(e,t,n){var i=ul.get(t.substring(n,n+=2).toLowerCase());return null==i?-1:(e.p=i,n)}function cl(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",i=~~(Math.abs(t)/60),r=Math.abs(t)%60;return n+Ns(i,"0",2)+Ns(r,"0",2)}function fl(e,t,n){Hs.lastIndex=0;var i=Hs.exec(t.substring(n,n+1));return i?n+i[0].length:-1}function dl(e){function n(e){try{fs=ps;var n=new fs;return n._=e,t(n)}finally{fs=Date}}var t=Cs(e);return n.parse=function(e){try{fs=ps;var n=t.parse(e);return n&&n._}finally{fs=Date}},n.toString=t.toString,n}function hl(e){return e.toISOString()}function ml(t,n,i){function r(e){return t(e)}function a(t,i){var r=t[1]-t[0],a=r/i,o=e.bisect(yl,a);return o==yl.length?[n.year,mo(t.map(function(e){return e/31536e6}),i)[2]]:o?n[a/yl[o-1]<yl[o]/a?o-1:o]:[_l,mo(t,i)[2]]}return r.invert=function(e){return gl(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(gl)},r.nice=function(e,t){function s(n){return!isNaN(n)&&!e.range(n,gl(+n+1),t).length}var n=r.domain(),i=ro(n),o=null==e?a(i,10):"number"==typeof e&&a(i,e);return o&&(e=o[0],t=o[1]),r.domain(so(n,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=gl(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=gl(+t+1);return t}}:e))},r.ticks=function(e,t){var n=ro(r.domain()),i=null==e?a(n,10):"number"==typeof e?a(n,e):!e.range&&[{range:e},t];return i&&(e=i[0],t=i[1]),e.range(n[0],gl(+n[1]+1),t)},r.tickFormat=function(){return i},r.copy=function(){return ml(t.copy(),n,i)},po(r,t)}function gl(e){return new Date(e)}function vl(e){return function(t){for(var n=e.length-1,i=e[n];!i[1](t);)i=e[--n];return i[0](t)}}function Sl(e){return JSON.parse(e.responseText)}function El(e){var t=i.createRange();return t.selectNode(i.body),t.createContextualFragment(e.responseText)}var e={version:"3.3.0"};Date.now||(Date.now=function(){return+new Date});var t=[].slice,n=function(e){return t.call(e)},i=document,r=i.documentElement,a=window;try{n(r.childNodes)[0].nodeType}catch(o){n=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{i.createElement("div").style.setProperty("opacity",0,"")}catch(s){var l=a.Element.prototype,u=l.setAttribute,c=l.setAttributeNS,f=a.CSSStyleDeclaration.prototype,d=f.setProperty;l.setAttribute=function(e,t){u.call(this,e,t+"")},l.setAttributeNS=function(e,t,n){c.call(this,e,t,n+"")},f.setProperty=function(e,t,n){d.call(this,e,t+"",n)}}e.ascending=function(e,t){return t>e?-1:e>t?1:e>=t?0:NaN},e.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:NaN},e.min=function(e,t){var r,a,n=-1,i=e.length;if(1===arguments.length){for(;++n<i&&!(null!=(r=e[n])&&r>=r);)r=void 0;for(;++n<i;)null!=(a=e[n])&&r>a&&(r=a)}else{for(;++n<i&&!(null!=(r=t.call(e,e[n],n))&&r>=r);)r=void 0;for(;++n<i;)null!=(a=t.call(e,e[n],n))&&r>a&&(r=a)}return r},e.max=function(e,t){var r,a,n=-1,i=e.length;if(1===arguments.length){for(;++n<i&&!(null!=(r=e[n])&&r>=r);)r=void 0;for(;++n<i;)null!=(a=e[n])&&a>r&&(r=a)}else{for(;++n<i&&!(null!=(r=t.call(e,e[n],n))&&r>=r);)r=void 0;for(;++n<i;)null!=(a=t.call(e,e[n],n))&&a>r&&(r=a)}return r},e.extent=function(e,t){var r,a,o,n=-1,i=e.length;if(1===arguments.length){for(;++n<i&&!(null!=(r=o=e[n])&&r>=r);)r=o=void 0;for(;++n<i;)null!=(a=e[n])&&(r>a&&(r=a),a>o&&(o=a))}else{for(;++n<i&&!(null!=(r=o=t.call(e,e[n],n))&&r>=r);)r=void 0;for(;++n<i;)null!=(a=t.call(e,e[n],n))&&(r>a&&(r=a),a>o&&(o=a))}return[r,o]},e.sum=function(e,t){var r,n=0,i=e.length,a=-1;if(1===arguments.length)for(;++a<i;)isNaN(r=+e[a])||(n+=r);else for(;++a<i;)isNaN(r=+t.call(e,e[a],a))||(n+=r);return n},e.mean=function(e,t){var i,n=e.length,r=0,a=-1,o=0;if(1===arguments.length)for(;++a<n;)p(i=e[a])&&(r+=(i-r)/++o);else for(;++a<n;)p(i=t.call(e,e[a],a))&&(r+=(i-r)/++o);return o?r:void 0},e.quantile=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],a=n-i;return a?r+a*(e[i]-r):r},e.median=function(t,n){return arguments.length>1&&(t=t.map(n)),t=t.filter(p),t.length?e.quantile(t.sort(e.ascending),.5):void 0},e.bisector=function(e){return{left:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var a=i+r>>>1;e.call(t,t[a],a)<n?i=a+1:r=a}return i},right:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var a=i+r>>>1;n<e.call(t,t[a],a)?r=a:i=a+1}return i}}};var h=e.bisector(function(e){return e});e.bisectLeft=h.left,e.bisect=e.bisectRight=h.right,e.shuffle=function(e){for(var n,i,t=e.length;t;)i=Math.random()*t--|0,n=e[t],e[t]=e[i],e[i]=n;return e},e.permute=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},e.pairs=function(e){for(var i,t=0,n=e.length-1,r=e[0],a=new Array(0>n?0:n);n>t;)a[t]=[i=r,r=e[++t]];return a},e.zip=function(){if(!(a=arguments.length))return[];for(var t=-1,n=e.min(arguments,m),i=new Array(n);++t<n;)for(var a,r=-1,o=i[t]=new Array(a);++r<a;)o[r]=arguments[r][t];return i},e.transpose=function(t){return e.zip.apply(e,t)},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t},e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},e.merge=function(e){return Array.prototype.concat.apply([],e)},e.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");
var o,i=[],r=g(Math.abs(n)),a=-1;if(e*=r,t*=r,n*=r,0>n)for(;(o=e+n*++a)>t;)i.push(o/r);else for(;(o=e+n*++a)<t;)i.push(o/r);return i},e.map=function(e){var t=new y;if(e instanceof y)e.forEach(function(e,n){t.set(e,n)});else for(var n in e)t.set(n,e[n]);return t},v(y,{has:function(e){return b+e in this},get:function(e){return this[b+e]},set:function(e,t){return this[b+e]=t},remove:function(e){return e=b+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===x&&e.call(this,t.substring(1),this[t])}});var b="\x00",x=b.charCodeAt(0);e.nest=function(){function o(e,i,s){if(s>=n.length)return a?a.call(t,i):r?i.sort(r):i;for(var f,d,p,m,l=-1,u=i.length,c=n[s++],h=new y;++l<u;)(m=h.get(f=c(d=i[l])))?m.push(d):h.set(f,[d]);return e?(d=e(),p=function(t,n){d.set(t,o(e,n,s))}):(d={},p=function(t,n){d[t]=o(e,n,s)}),h.forEach(p),d}function s(e,t){if(t>=n.length)return e;var r=[],a=i[t++];return e.forEach(function(e,n){r.push({key:e,values:s(n,t)})}),a?r.sort(function(e,t){return a(e.key,t.key)}):r}var r,a,t={},n=[],i=[];return t.map=function(e,t){return o(t,e,0)},t.entries=function(t){return s(o(e.map,t,0),0)},t.key=function(e){return n.push(e),t},t.sortKeys=function(e){return i[n.length-1]=e,t},t.sortValues=function(e){return r=e,t},t.rollup=function(e){return a=e,t},t},e.set=function(e){var t=new w;if(e)for(var n=0,i=e.length;i>n;++n)t.add(e[n]);return t},v(w,{has:function(e){return b+e in this},add:function(e){return this[b+e]=!0,e},remove:function(e){return e=b+e,e in this&&delete this[e]},values:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===x&&e.call(this,t.substring(1))}}),e.behavior={},e.rebind=function(e,t){for(var r,n=1,i=arguments.length;++n<i;)e[r=arguments[n]]=_(e,t,t[r]);return e};var C=["webkit","ms","moz","Moz","o","O"];e.dispatch=function(){for(var e=new S,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=E(e);return e},S.prototype.on=function(e,t){var n=e.indexOf("."),i="";if(n>=0&&(i=e.substring(n+1),e=e.substring(0,n)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},e.event=null,e.requote=function(e){return e.replace(M,"\\$&")};var M=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,A={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},O=function(e,t){return t.querySelector(e)},I=function(e,t){return t.querySelectorAll(e)},L=r[k(r,"matchesSelector")],H=function(e,t){return L.call(e,t)};"function"==typeof Sizzle&&(O=function(e,t){return Sizzle(e,t)[0]||null},I=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},H=Sizzle.matchesSelector),e.selection=function(){return ie};var P=e.selection.prototype=[];P.select=function(e){var n,i,r,a,t=[];e=F(e);for(var o=-1,s=this.length;++o<s;){t.push(n=[]),n.parentNode=(r=this[o]).parentNode;for(var l=-1,u=r.length;++l<u;)(a=r[l])?(n.push(i=e.call(a,a.__data__,l,o)),i&&"__data__"in a&&(i.__data__=a.__data__)):n.push(null)}return $(t)},P.selectAll=function(e){var i,r,t=[];e=R(e);for(var a=-1,o=this.length;++a<o;)for(var s=this[a],l=-1,u=s.length;++l<u;)(r=s[l])&&(t.push(i=n(e.call(r,r.__data__,l,a))),i.parentNode=r);return $(t)};var z={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:z,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),z.hasOwnProperty(n)?{space:z[n],local:e}:e}},P.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var i=this.node();return t=e.ns.qualify(t),t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}for(n in t)this.each(q(n,t[n]));return this}return this.each(q(t,n))},P.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),i=(e=e.trim().split(/^|\s+/g)).length,r=-1;if(t=n.classList){for(;++r<i;)if(!t.contains(e[r]))return!1}else for(t=n.getAttribute("class");++r<i;)if(!W(e[r]).test(t))return!1;return!0}for(t in e)this.each(U(t,e[t]));return this}return this.each(U(e,t))},P.style=function(e,t,n){var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t="");for(n in e)this.each(Q(n,e[n],t));return this}if(2>i)return a.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(Q(e,t,n))},P.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(J(t,e[t]));return this}return this.each(J(e,t))},P.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},P.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},P.append=function(e){return e=X(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},P.insert=function(e,t){return e=X(e),t=F(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments))})},P.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},P.data=function(e,t){function o(e,n){var i,p,h,r=e.length,a=n.length,o=Math.min(r,a),c=new Array(a),f=new Array(a),d=new Array(r);if(t){var b,m=new y,g=new y,v=[];for(i=-1;++i<r;)b=t.call(p=e[i],p.__data__,i),m.has(b)?d[i]=p:m.set(b,p),v.push(b);for(i=-1;++i<a;)b=t.call(n,h=n[i],i),(p=m.get(b))?(c[i]=p,p.__data__=h):g.has(b)||(f[i]=G(h)),g.set(b,h),m.remove(b);for(i=-1;++i<r;)m.has(v[i])&&(d[i]=e[i])}else{for(i=-1;++i<o;)p=e[i],h=n[i],p?(p.__data__=h,c[i]=p):f[i]=G(h);for(;a>i;++i)f[i]=G(n[i]);for(;r>i;++i)d[i]=e[i]}f.update=c,f.parentNode=c.parentNode=d.parentNode=e.parentNode,s.push(f),l.push(c),u.push(d)}var r,a,n=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(r=this[0]).length);++n<i;)(a=r[n])&&(e[n]=a.__data__);return e}var s=ee([]),l=$([]),u=$([]);if("function"==typeof e)for(;++n<i;)o(r=this[n],e.call(r,r.parentNode.__data__,n));else for(;++n<i;)o(r=this[n],e);return l.enter=function(){return s},l.exit=function(){return u},l},P.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},P.filter=function(e){var n,i,r,t=[];"function"!=typeof e&&(e=Y(e));for(var a=0,o=this.length;o>a;a++){t.push(n=[]),n.parentNode=(i=this[a]).parentNode;for(var s=0,l=i.length;l>s;s++)(r=i[s])&&e.call(r,r.__data__,s)&&n.push(r)}return $(t)},P.order=function(){for(var e=-1,t=this.length;++e<t;)for(var a,n=this[e],i=n.length-1,r=n[i];--i>=0;)(a=n[i])&&(r&&r!==a.nextSibling&&r.parentNode.insertBefore(a,r),r=a);return this},P.sort=function(e){e=K.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},P.each=function(e){return Z(this,function(t,n,i){e.call(t,t.__data__,n,i)})},P.call=function(e){var t=n(arguments);return e.apply(t[0]=this,t),this},P.empty=function(){return!this.node()},P.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],i=0,r=n.length;r>i;i++){var a=n[i];if(a)return a}return null},P.size=function(){var e=0;return this.each(function(){++e}),e};var te=[];e.selection.enter=ee,e.selection.enter.prototype=te,te.append=P.append,te.empty=P.empty,te.node=P.node,te.call=P.call,te.size=P.size,te.select=function(e){for(var n,i,r,a,o,t=[],s=-1,l=this.length;++s<l;){r=(a=this[s]).update,t.push(n=[]),n.parentNode=a.parentNode;for(var u=-1,c=a.length;++u<c;)(o=a[u])?(n.push(r[u]=i=e.call(a.parentNode,o.__data__,u,s)),i.__data__=o.__data__):n.push(null)}return $(t)},te.insert=function(e,t){return arguments.length<2&&(t=ne(this)),P.insert.call(this,e,t)},e.select=function(e){var t=["string"==typeof e?O(e,i):e];return t.parentNode=r,$([t])},e.selectAll=function(e){var t=n("string"==typeof e?I(e,i):e);return t.parentNode=r,$([t])};var ie=e.select(r);P.on=function(e,t,n){var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t=!1);for(n in e)this.each(re(n,e[n],t));return this}if(2>i)return(i=this.node()["__on"+e])&&i._;n=!1}return this.each(re(e,t,n))};var ae=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});ae.forEach(function(e){"on"+e in i&&ae.remove(e)});var le=k(r.style,"userSelect"),ue=0;e.mouse=function(e){return de(e,j())};var fe=/WebKit/.test(a.navigator.userAgent)?-1:0;e.touches=function(e,t){return arguments.length<2&&(t=j().touches),t?n(t).map(function(t){var n=de(e,t);return n.identifier=t.identifier,n}):[]},e.behavior.drag=function(){function o(){this.on("mousedown.drag",i).on("touchstart.drag",r)}function s(){return e.event.changedTouches[0].identifier}function l(t,n){return e.touches(t).filter(function(e){return e.identifier===n})[0]}function u(i,r,o,s){return function(){function b(){if(!u)return x();var e=r(u,d),t=e[0]-h[0],n=e[1]-h[1];m|=t|n,h=e,c({type:"drag",x:e[0]+g[0],y:e[1]+g[1],dx:t,dy:n})}function x(){v.on(o+"."+p,null).on(s+"."+p,null),y(m&&e.event.target===f),c({type:"dragend"})}var g,l=this,u=l.parentNode,c=t.of(l,arguments),f=e.event.target,d=i(),p=null==d?"drag":"drag-"+d,h=r(u,d),m=0,v=e.select(a).on(o+"."+p,b).on(s+"."+p,x),y=ce();n?(g=n.apply(l,arguments),g=[g.x-h[0],g.y-h[1]]):g=[0,0],c({type:"dragstart"})}}var t=D(o,"drag","dragstart","dragend"),n=null,i=u(T,e.mouse,"mousemove","mouseup"),r=u(s,l,"touchmove","touchend");return o.origin=function(e){return arguments.length?(n=e,o):n},e.rebind(o,t,"on")};var pe=Math.PI,he=1e-6,me=he*he,ge=pe/180,ve=180/pe,Te=Math.SQRT2,Se=2,Ee=4;e.interpolateZoom=function(e,t){function y(e){var t=e*v;if(g){var a=_e(h),o=r/(Se*f)*(a*ke(Te*t+h)-we(h));return[n+o*l,i+o*u,r*a/_e(Te*t+h)]}return[n+e*l,i+e*u,r*Math.exp(Te*t)]}var n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],s=t[2],l=a-n,u=o-i,c=l*l+u*u,f=Math.sqrt(c),d=(s*s-r*r+Ee*c)/(2*r*Se*f),p=(s*s-r*r-Ee*c)/(2*s*Se*f),h=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(p*p+1)-p),g=m-h,v=(g||Math.log(s/r))/Te;return y.duration=1e3*v,y},e.behavior.zoom=function(){function x(e){e.on(s,M).on(De+".zoom",$).on(l,O).on("dblclick.zoom",I).on(f,A)}function w(e){return[(e[0]-t.x)/t.k,(e[1]-t.y)/t.k]}function _(e){return[e[0]*t.k+t.x,e[1]*t.k+t.y]}function k(e){t.k=Math.max(o[0],Math.min(o[1],e))}function C(e,n){n=_(n),t.x+=e[0]-n[0],t.y+=e[1]-n[1]}function T(){v&&v.domain(g.range().map(function(e){return(e-t.x)/t.k}).map(g.invert)),b&&b.domain(y.range().map(function(e){return(e-t.y)/t.k}).map(y.invert))}function S(e){e({type:"zoomstart"})}function E(e){T(),e({type:"zoom",scale:t.k,translate:[t.x,t.y]})}function j(e){e({type:"zoomend"})}function M(){function f(){r=1,C(e.mouse(t),s),E(n)}function d(){o.on(l,a===t?O:null).on(u,null),c(r&&e.event.target===i),j(n)}var t=this,n=m.of(t,arguments),i=e.event.target,r=0,o=e.select(a).on(l,f).on(u,d),s=w(e.mouse(t)),c=ce();es.call(t),S(n)}function A(){function v(){var i=e.touches(n);return l=t.k,r={},i.forEach(function(e){r[e.identifier]=w(e)}),i}function y(){var e=Date.now(),n=v();if(1===n.length){if(500>e-h){var a=n[0],s=r[a.identifier];k(2*t.k),C(a,s),N(),E(i)}h=e}else if(n.length>1){var a=n[0],l=n[1],u=a[0]-l[0],c=a[1]-l[1];o=u*u+c*c}}function b(){var t=e.touches(n),a=t[0],s=r[a.identifier];if(u=t[1]){var u,c=r[u.identifier],f=e.event.scale;if(null==f){var d=(d=u[0]-a[0])*d+(d=u[1]-a[1])*d;f=o&&Math.sqrt(d/o)}a=[(a[0]+u[0])/2,(a[1]+u[1])/2],s=[(s[0]+c[0])/2,(s[1]+c[1])/2],k(f*l)}h=null,C(a,s),E(i)}function x(){e.event.touches.length?v():(u.on(d,null).on(p,null),c.on(s,M).on(f,A),g(),j(i))}var r,l,n=this,i=m.of(n,arguments),o=0,u=e.select(a).on(d,b).on(p,x),c=e.select(n).on(s,null).on(f,y),g=ce();es.call(n),y(),S(i)}function $(){var r=m.of(this,arguments);c?clearTimeout(c):(es.call(this),S(r)),c=setTimeout(function(){c=null,j(r)},50),N();var a=i||e.mouse(this);n||(n=w(a)),k(Math.pow(2,.002*je())*t.k),C(a,n),E(r)}function O(){n=null}function I(){var n=m.of(this,arguments),i=e.mouse(this),r=w(i),a=Math.log(t.k)/Math.LN2;S(n),k(Math.pow(2,e.event.shiftKey?Math.ceil(a)-1:Math.floor(a)+1)),C(i,r),E(n),j(n)}var n,i,c,h,g,v,y,b,t={x:0,y:0,k:1},r=[960,500],o=Ne,s="mousedown.zoom",l="mousemove.zoom",u="mouseup.zoom",f="touchstart.zoom",d="touchmove.zoom",p="touchend.zoom",m=D(x,"zoomstart","zoom","zoomend");return x.event=function(n){n.each(function(){var n=m.of(this,arguments),i=t;Ko?e.select(this).transition().each("start.zoom",function(){t=this.__chart__||{x:0,y:0,k:1},S(n)}).tween("zoom:zoom",function(){var a=r[0],o=r[1],s=a/2,l=o/2,u=e.interpolateZoom([(s-t.x)/t.k,(l-t.y)/t.k,a/t.k],[(s-i.x)/i.k,(l-i.y)/i.k,a/i.k]);return function(e){var i=u(e),r=a/i[2];this.__chart__=t={x:s-i[0]*r,y:l-i[1]*r,k:r},E(n)}}).each("end.zoom",function(){j(n)}):(this.__chart__=t,S(n),E(n),j(n))})},x.translate=function(e){return arguments.length?(t={x:+e[0],y:+e[1],k:t.k},T(),x):[t.x,t.y]},x.scale=function(e){return arguments.length?(t={x:t.x,y:t.y,k:+e},T(),x):t.k},x.scaleExtent=function(e){return arguments.length?(o=null==e?Ne:[+e[0],+e[1]],x):o},x.center=function(e){return arguments.length?(i=e&&[+e[0],+e[1]],x):i},x.size=function(e){return arguments.length?(r=e&&[+e[0],+e[1]],x):r},x.x=function(e){return arguments.length?(v=e,g=e.copy(),t={x:0,y:0,k:1},x):v},x.y=function(e){return arguments.length?(b=e,y=e.copy(),t={x:0,y:0,k:1},x):b},e.rebind(x,m,"on")};var je,Ne=[0,1/0],De="onwheel"in i?(je=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in i?(je=function(){return e.event.wheelDelta},"mousewheel"):(je=function(){return-e.event.detail},"MozMousePixelScroll");Me.prototype.toString=function(){return this.rgb()+""},e.hsl=function(e,t,n){return 1===arguments.length?e instanceof $e?Ae(e.h,e.s,e.l):rt(""+e,at,Ae):Ae(+e,+t,+n)};var Oe=$e.prototype=new Me;Oe.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),Ae(this.h,this.s,this.l/e)},Oe.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),Ae(this.h,this.s,e*this.l)},Oe.rgb=function(){return Ie(this.h,this.s,this.l)},e.hcl=function(t,n,i){return 1===arguments.length?t instanceof He?Le(t.h,t.c,t.l):t instanceof ze?Je(t.l,t.a,t.b):Je((t=ot((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):Le(+t,+n,+i)};var Pe=He.prototype=new Me;Pe.brighter=function(e){return Le(this.h,this.c,Math.min(100,this.l+qe*(arguments.length?e:1)))},Pe.darker=function(e){return Le(this.h,this.c,Math.max(0,this.l-qe*(arguments.length?e:1)))},Pe.rgb=function(){return Fe(this.h,this.c,this.l).rgb()},e.lab=function(t,n,i){return 1===arguments.length?t instanceof ze?Re(t.l,t.a,t.b):t instanceof He?Fe(t.l,t.c,t.h):ot((t=e.rgb(t)).r,t.g,t.b):Re(+t,+n,+i)};var qe=18,Be=.95047,We=1,Ue=1.08883,Ve=ze.prototype=new Me;Ve.brighter=function(e){return Re(Math.min(100,this.l+qe*(arguments.length?e:1)),this.a,this.b)},Ve.darker=function(e){return Re(Math.max(0,this.l-qe*(arguments.length?e:1)),this.a,this.b)},Ve.rgb=function(){return Qe(this.l,this.a,this.b)},e.rgb=function(e,t,n){return 1===arguments.length?e instanceof tt?et(e.r,e.g,e.b):rt(""+e,et,Ie):et(~~e,~~t,~~n)};var nt=tt.prototype=new Me;nt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,i=this.b,r=30;return t||n||i?(t&&r>t&&(t=r),n&&r>n&&(n=r),i&&r>i&&(i=r),et(Math.min(255,~~(t/e)),Math.min(255,~~(n/e)),Math.min(255,~~(i/e)))):et(r,r,r)},nt.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),et(~~(e*this.r),~~(e*this.g),~~(e*this.b))},nt.hsl=function(){return at(this.r,this.g,this.b)},nt.toString=function(){return"#"+it(this.r)+it(this.g)+it(this.b)};var ut=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ut.forEach(function(e,t){ut.set(e,Ke(t))}),e.functor=ct,e.xhr=dt(ft),e.dsv=function(t,n){function a(t,i,r){arguments.length<3&&(r=i,i=null);var a=e.xhr(t,n,r);return a.row=function(e){return arguments.length?a.response(null==(i=e)?o:s(e)):i},a.row(i)}function o(e){return a.parse(e.responseText)}function s(e){return function(t){return a.parse(t.responseText,e)}}function l(e){return e.map(u).join(t)}function u(e){return i.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var i=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);return a.parse=function(e,t){var n;return a.parseRows(e,function(e,i){if(n)return n(e,i-1);var r=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(r(e),n)}:r})},a.parseRows=function(e,t){function f(){if(s>=o)return i;if(c)return c=!1,n;var t=s;if(34===e.charCodeAt(t)){for(var a=t;a++<o;)if(34===e.charCodeAt(a)){if(34!==e.charCodeAt(a+1))break;++a}s=a+2;var l=e.charCodeAt(a+1);return 13===l?(c=!0,10===e.charCodeAt(a+2)&&++s):10===l&&(c=!0),e.substring(t+1,a).replace(/""/g,'"')}for(;o>s;){var l=e.charCodeAt(s++),u=1;if(10===l)c=!0;else if(13===l)c=!0,10===e.charCodeAt(s)&&(++s,++u);else if(l!==r)continue;return e.substring(t,s-u)}return e.substring(t)}for(var u,c,n={},i={},a=[],o=e.length,s=0,l=0;(u=f())!==i;){for(var d=[];u!==n&&u!==i;)d.push(u),u=f();(!t||(d=t(d,l++)))&&a.push(d)}return a},a.format=function(e){if(Array.isArray(e[0]))return a.formatRows(e);var n=new w,i=[];return e.forEach(function(e){for(var t in e)n.has(t)||i.push(n.add(t))}),[i.map(u).join(t)].concat(e.map(function(e){return i.map(function(t){return u(e[t])}).join(t)})).join("\n")},a.formatRows=function(e){return e.map(l).join("\n")},a},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("	","text/tab-separated-values");var mt,gt,vt,yt,bt,xt=a[k(a,"requestAnimationFrame")]||function(e){setTimeout(e,17)};e.timer=function(e,t,n){var i=arguments.length;2>i&&(t=0),3>i&&(n=Date.now());var r=n+t,a={callback:e,time:r,next:null};gt?gt.next=a:mt=a,gt=a,vt||(yt=clearTimeout(yt),vt=1,xt(wt))},e.timer.flush=function(){kt(),Ct()};var Tt=".",St=",",Et=[3,3],Nt="$",jt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Dt);e.formatPrefix=function(t,n){var i=0;return t&&(0>t&&(t*=-1),n&&(t=e.round(t,$t(t,n))),i=1+Math.floor(1e-12+Math.log(t)/Math.LN10),i=Math.max(-24,Math.min(24,3*Math.floor((0>=i?i+1:i-1)/3)))),jt[8+i/3]},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.format=function(t){var n=Mt.exec(t),i=n[1]||" ",r=n[2]||">",a=n[3]||"",o=n[4]||"",s=n[5],l=+n[6],u=n[7],c=n[8],f=n[9],d=1,p="",h=!1;switch(c&&(c=+c.substring(1)),(s||"0"===i&&"="===r)&&(s=i="0",r="=",u&&(l-=Math.floor((l-1)/4))),f){case"n":u=!0,f="g";break;case"%":d=100,p="%",f="f";break;case"p":d=100,p="%",f="r";break;case"b":case"o":case"x":case"X":"#"===o&&(o="0"+f.toLowerCase());case"c":case"d":h=!0,c=0;break;case"s":d=-1,f="r"}"#"===o?o="":"$"===o&&(o=Nt),"r"!=f||c||(f="g"),null!=c&&("g"==f?c=Math.max(1,Math.min(21,c)):("e"==f||"f"==f)&&(c=Math.max(0,Math.min(20,c)))),f=At.get(f)||Ot;var m=s&&u;return function(t){if(h&&t%1)return"";var n=0>t||0===t&&0>1/t?(t=-t,"-"):a;if(0>d){var g=e.formatPrefix(t,c);t=g.scale(t),p=g.symbol}else t*=d;t=f(t,c);var v=t.lastIndexOf("."),y=0>v?t:t.substring(0,v),b=0>v?"":Tt+t.substring(v+1);!s&&u&&(y=It(y));var x=o.length+y.length+b.length+(m?0:n.length),w=l>x?new Array(x=l-x+1).join(i):"";return m&&(y=It(w+y)),n+=o,t=y+b,("<"===r?n+t+w:">"===r?w+n+t:"^"===r?w.substring(0,x>>=1)+n+t+w.substring(x):n+(m?t:w+t))+p}};var Mt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,At=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,$t(t,n))).toFixed(Math.max(0,Math.min(20,$t(t*(1+1e-15),n))))}}),It=ft;if(Et){var Lt=Et.length;It=function(e){for(var t=e.length,n=[],i=0,r=Et[0];t>0&&r>0;)n.push(e.substring(t-=r,t+r)),r=Et[i=(i+1)%Lt];return n.reverse().join(St)}}e.geo={},Ht.prototype={s:0,t:0,add:function(e){Ft(e,this.t,Pt),Ft(Pt.s,this.s,this),this.s?this.t+=Pt.t:this.s=Pt.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Pt=new Ht;e.geo.stream=function(e,t){e&&zt.hasOwnProperty(e.type)?zt[e.type](e,t):Rt(e,t)};var zt={Feature:function(e,t){Rt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)Rt(n[i].geometry,t)}},qt={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){Bt(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Bt(n[i],t,0)},Polygon:function(e,t){Wt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Wt(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)Rt(n[i],t)}};e.geo.area=function(t){return Ut=0,e.geo.stream(t,Qt),Ut};var Ut,Vt=new Ht,Qt={sphere:function(){Ut+=4*pe},point:T,lineStart:T,lineEnd:T,polygonStart:function(){Vt.reset(),Qt.lineStart=Jt},polygonEnd:function(){var e=2*Vt;Ut+=0>e?4*pe+e:e,Qt.lineStart=Qt.lineEnd=Qt.point=T}};e.geo.bounds=function(){function p(e,a){c.push(f=[t=e,i=e]),n>a&&(n=a),a>r&&(r=a)}function h(e,o){var s=Xt([e*ge,o*ge]);if(l){var u=Yt(l,s),c=[u[1],-u[0],0],f=Yt(c,u);en(f),f=tn(f);var d=e-a,h=d>0?1:-1,m=f[0]*ve*h,g=Math.abs(d)>180;if(g^(m>h*a&&h*e>m)){var v=f[1]*ve;v>r&&(r=v)}else if(m=(m+360)%360-180,g^(m>h*a&&h*e>m)){var v=-f[1]*ve;n>v&&(n=v)}else n>o&&(n=o),o>r&&(r=o);g?a>e?x(t,e)>x(t,i)&&(i=e):x(e,i)>x(t,i)&&(t=e):i>=t?(t>e&&(t=e),e>i&&(i=e)):e>a?x(t,e)>x(t,i)&&(i=e):x(e,i)>x(t,i)&&(t=e)}else p(e,o);l=s,a=e}function m(){d.point=h}function g(){f[0]=t,f[1]=i,d.point=p,l=null}function v(e,t){if(l){var n=e-a;u+=Math.abs(n)>180?n+(n>0?360:-360):n}else o=e,s=t;Qt.point(e,t),h(e,t)}function y(){Qt.lineStart()}function b(){v(o,s),Qt.lineEnd(),Math.abs(u)>he&&(t=-(i=180)),f[0]=t,f[1]=i,l=null}function x(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function _(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var t,n,i,r,a,o,s,l,u,c,f,d={point:p,lineStart:m,lineEnd:g,polygonStart:function(){d.point=v,d.lineStart=y,d.lineEnd=b,u=0,Qt.polygonStart()},polygonEnd:function(){Qt.polygonEnd(),d.point=p,d.lineStart=m,d.lineEnd=g,0>Vt?(t=-(i=180),n=-(r=90)):u>he?r=90:-he>u&&(n=-90),f[0]=t,f[1]=i}};return function(a){r=i=-(t=n=1/0),c=[],e.geo.stream(a,d);var o=c.length;if(o){c.sort(w);for(var u,s=1,l=c[0],p=[l];o>s;++s)u=c[s],_(u[0],l)||_(u[1],l)?(x(l[0],u[1])>x(l[0],l[1])&&(l[1]=u[1]),x(u[0],l[1])>x(l[0],l[1])&&(l[0]=u[0])):p.push(l=u);for(var m,u,h=-(1/0),o=p.length-1,s=0,l=p[o];o>=s;l=u,++s)u=p[s],(m=x(l[1],u[0]))>h&&(h=m,t=u[0],i=l[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[i,r]]}}(),e.geo.centroid=function(t){rn=an=on=sn=ln=un=cn=fn=dn=pn=hn=0,e.geo.stream(t,mn);var n=dn,i=pn,r=hn,a=n*n+i*i+r*r;return me>a&&(n=un,i=cn,r=fn,he>an&&(n=on,i=sn,r=ln),a=n*n+i*i+r*r,me>a)?[NaN,NaN]:[Math.atan2(i,n)*ve,xe(r/Math.sqrt(a))*ve]};var rn,an,on,sn,ln,un,cn,fn,dn,pn,hn,mn={sphere:T,point:gn,lineStart:yn,lineEnd:bn,polygonStart:function(){mn.lineStart=xn},polygonEnd:function(){mn.lineStart=yn}},jn=Cn(wn,Dn,An,On),$n=[-pe,0],Ln=1e9;e.geo.clipExtent=function(){var e,t,n,i,r,a,o={stream:function(e){return r&&(r.valid=!1),r=a(e),r.valid=!0,r},extent:function(s){return arguments.length?(a=Hn(e=+s[0][0],t=+s[0][1],n=+s[1][0],i=+s[1][1]),r&&(r.valid=!1,r=null),o):[[e,t],[n,i]]}};return o.extent([[0,0],[960,500]])},(e.geo.conicEqualArea=function(){return Rn(zn)}).raw=zn,e.geo.albers=function(){return e.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},e.geo.albersUsa=function(){function u(e){var t=e[0],n=e[1];return r=null,o(t,n),r||(s(t,n),r)||l(t,n),r}var r,o,s,l,t=e.geo.albers(),n=e.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i=e.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a={point:function(e,t){r=[e,t]}};return u.invert=function(e){var r=t.scale(),a=t.translate(),o=(e[0]-a[0])/r,s=(e[1]-a[1])/r;return(s>=.12&&.234>s&&o>=-.425&&-.214>o?n:s>=.166&&.234>s&&o>=-.214&&-.115>o?i:t).invert(e)},u.stream=function(e){var r=t.stream(e),a=n.stream(e),o=i.stream(e);return{point:function(e,t){r.point(e,t),a.point(e,t),o.point(e,t)},sphere:function(){r.sphere(),a.sphere(),o.sphere()},lineStart:function(){r.lineStart(),a.lineStart(),o.lineStart()},lineEnd:function(){r.lineEnd(),a.lineEnd(),o.lineEnd()},polygonStart:function(){r.polygonStart(),a.polygonStart(),o.polygonStart()},polygonEnd:function(){r.polygonEnd(),a.polygonEnd(),o.polygonEnd()}}},u.precision=function(e){return arguments.length?(t.precision(e),n.precision(e),i.precision(e),u):t.precision()},u.scale=function(e){return arguments.length?(t.scale(e),n.scale(.35*e),i.scale(e),u.translate(t.translate())):t.scale()},u.translate=function(e){if(!arguments.length)return t.translate();var r=t.scale(),c=+e[0],f=+e[1];return o=t.translate(e).clipExtent([[c-.455*r,f-.238*r],[c+.455*r,f+.238*r]]).stream(a).point,s=n.translate([c-.307*r,f+.201*r]).clipExtent([[c-.425*r+he,f+.12*r+he],[c-.214*r-he,f+.234*r-he]]).stream(a).point,l=i.translate([c-.205*r,f+.212*r]).clipExtent([[c-.214*r+he,f+.166*r+he],[c-.115*r-he,f+.234*r-he]]).stream(a).point,u},u.scale(1070)};var qn,Bn,Vn,Qn,Jn,Xn,Wn={point:T,lineStart:T,lineEnd:T,polygonStart:function(){Bn=0,Wn.lineStart=Un},polygonEnd:function(){Wn.lineStart=Wn.lineEnd=Wn.point=T,qn+=Math.abs(Bn/2)}},Gn={point:Yn,lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T},ei={point:ti,lineStart:ni,lineEnd:ii,polygonStart:function(){ei.lineStart=ri},polygonEnd:function(){ei.point=ti,ei.lineStart=ni,ei.lineEnd=ii}};e.geo.transform=function(e){return{stream:function(t){var n=new si(t);for(var i in e)n[i]=e[i];return n}}},si.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},e.geo.path=function(){function s(n){return n&&("function"==typeof t&&a.pointRadius(+t.apply(this,arguments)),o&&o.valid||(o=r(a)),e.geo.stream(n,o)),a.result()}function l(){return o=null,s}var n,i,r,a,o,t=4.5;return s.area=function(t){return qn=0,e.geo.stream(t,r(Wn)),qn},s.centroid=function(t){return on=sn=ln=un=cn=fn=dn=pn=hn=0,e.geo.stream(t,r(ei)),hn?[dn/hn,pn/hn]:fn?[un/fn,cn/fn]:ln?[on/ln,sn/ln]:[NaN,NaN]},s.bounds=function(t){return Jn=Xn=-(Vn=Qn=1/0),e.geo.stream(t,r(Gn)),[[Vn,Qn],[Jn,Xn]]},s.projection=function(e){return arguments.length?(r=(n=e)?e.stream||li(e):ft,l()):n},s.context=function(e){return arguments.length?(a=null==(i=e)?new Kn:new ai(e),"function"!=typeof t&&a.pointRadius(t),l()):i},s.pointRadius=function(e){return arguments.length?(t="function"==typeof e?e:(a.pointRadius(+e),+e),s):t},s.projection(e.geo.albersUsa()).context(null)},e.geo.projection=ui,e.geo.projectionMutator=ci,(e.geo.equirectangular=function(){return ui(di)}).raw=di.invert=di,e.geo.rotation=function(e){function t(t){return t=e(t[0]*ge,t[1]*ge),t[0]*=ve,t[1]*=ve,t}return e=pi(e[0]%360*ge,e[1]*ge,e.length>2?e[2]*ge:0),t.invert=function(t){return t=e.invert(t[0]*ge,t[1]*ge),t[0]*=ve,t[1]*=ve,t},t},e.geo.circle=function(){function r(){var t="function"==typeof e?e.apply(this,arguments):e,n=pi(-t[0]*ge,-t[1]*ge,0).invert,r=[];return i(null,null,1,{point:function(e,t){r.push(e=n(e,t)),e[0]*=ve,e[1]*=ve}}),{type:"Polygon",coordinates:[r]}}var t,i,e=[0,0],n=6;return r.origin=function(t){return arguments.length?(e=t,r):e},r.angle=function(e){return arguments.length?(i=vi((t=+e)*ge,n*ge),r):t},r.precision=function(e){return arguments.length?(i=vi(t*ge,(n=+e)*ge),r):n},r.angle(90)},e.geo.distance=function(e,t){var f,n=(t[0]-e[0])*ge,i=e[1]*ge,r=t[1]*ge,a=Math.sin(n),o=Math.cos(n),s=Math.sin(i),l=Math.cos(i),u=Math.sin(r),c=Math.cos(r);return Math.atan2(Math.sqrt((f=c*a)*f+(f=l*u-s*c*o)*f),s*u+l*c*o)},e.geo.graticule=function(){function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(r/f)*f,i,f).map(m).concat(e.range(Math.ceil(l/d)*d,s,d).map(g)).concat(e.range(Math.ceil(n/u)*u,t,u).filter(function(e){return Math.abs(e%f)>he}).map(p)).concat(e.range(Math.ceil(o/c)*c,a,c).filter(function(e){return Math.abs(e%d)>he}).map(h))}var t,n,i,r,a,o,s,l,p,h,m,g,u=10,c=u,f=90,d=360,v=2.5;return y.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})},y.outline=function(){return{type:"Polygon",coordinates:[m(r).concat(g(s).slice(1),m(i).reverse().slice(1),g(l).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.majorExtent(e).minorExtent(e):y.minorExtent()},y.majorExtent=function(e){return arguments.length?(r=+e[0][0],i=+e[1][0],l=+e[0][1],s=+e[1][1],r>i&&(e=r,r=i,i=e),l>s&&(e=l,l=s,s=e),y.precision(v)):[[r,l],[i,s]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],a=+e[1][1],n>t&&(e=n,n=t,t=e),o>a&&(e=o,o=a,a=e),y.precision(v)):[[n,o],[t,a]]},y.step=function(e){
return arguments.length?y.majorStep(e).minorStep(e):y.minorStep()},y.majorStep=function(e){return arguments.length?(f=+e[0],d=+e[1],y):[f,d]},y.minorStep=function(e){return arguments.length?(u=+e[0],c=+e[1],y):[u,c]},y.precision=function(e){return arguments.length?(v=+e,p=bi(o,a,90),h=xi(n,t,v),m=bi(l,s,90),g=xi(r,i,v),y):v},y.majorExtent([[-180,-90+he],[180,90-he]]).minorExtent([[-180,-80-he],[180,80+he]])},e.geo.greatArc=function(){function a(){return{type:"LineString",coordinates:[n||t.apply(this,arguments),r||i.apply(this,arguments)]}}var n,r,t=wi,i=_i;return a.distance=function(){return e.geo.distance(n||t.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(e){return arguments.length?(t=e,n="function"==typeof e?null:e,a):t},a.target=function(e){return arguments.length?(i=e,r="function"==typeof e?null:e,a):i},a.precision=function(){return arguments.length?a:0},a},e.geo.interpolate=function(e,t){return ki(e[0]*ge,e[1]*ge,t[0]*ge,t[1]*ge)},e.geo.length=function(t){return Ci=0,e.geo.stream(t,Ti),Ci};var Ci,Ti={sphere:T,point:T,lineStart:Si,lineEnd:T,polygonStart:T,polygonEnd:T},Ni=Ei(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return ui(Ni)}).raw=Ni;var ji=Ei(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},ft);(e.geo.azimuthalEquidistant=function(){return ui(ji)}).raw=ji,(e.geo.conicConformal=function(){return Rn(Di)}).raw=Di,(e.geo.conicEquidistant=function(){return Rn(Mi)}).raw=Mi;var Ai=Ei(function(e){return 1/e},Math.atan);(e.geo.gnomonic=function(){return ui(Ai)}).raw=Ai,$i.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-pe/2]},(e.geo.mercator=function(){return Oi($i)}).raw=$i;var Ii=Ei(function(){return 1},Math.asin);(e.geo.orthographic=function(){return ui(Ii)}).raw=Ii;var Li=Ei(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(e.geo.stereographic=function(){return ui(Li)}).raw=Li,Hi.invert=function(e,t){return[Math.atan2(we(e),Math.cos(t)),xe(Math.sin(t)/_e(e))]},(e.geo.transverseMercator=function(){return Oi(Hi)}).raw=Hi,e.geom={},e.svg={},e.svg.line=function(){return Pi(ft)};var zi=e.map({linear:qi,"linear-closed":Bi,step:Wi,"step-before":Ui,"step-after":Vi,basis:Ki,"basis-open":Zi,"basis-closed":er,bundle:tr,cardinal:Xi,"cardinal-open":Qi,"cardinal-closed":Ji,monotone:cr});zi.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var ir=[0,2/3,1/3,0],rr=[0,1/3,2/3,0],ar=[0,1/6,2/3,1/6];e.geom.hull=function(e){function i(e){if(e.length<3)return[];var o,c,f,d,h,m,g,v,y,b,x,w,i=ct(t),r=ct(n),a=e.length,s=a-1,l=[],u=[],p=0;if(i===Fi&&n===Ri)o=e;else for(f=0,o=[];a>f;++f)o.push([+i.call(this,c=e[f],f),+r.call(this,c,f)]);for(f=1;a>f;++f)(o[f][1]<o[p][1]||o[f][1]==o[p][1]&&o[f][0]<o[p][0])&&(p=f);for(f=0;a>f;++f)f!==p&&(m=o[f][1]-o[p][1],h=o[f][0]-o[p][0],l.push({angle:Math.atan2(m,h),index:f}));for(l.sort(function(e,t){return e.angle-t.angle}),x=l[0].angle,b=l[0].index,y=0,f=1;s>f;++f){if(d=l[f].index,x==l[f].angle){if(h=o[b][0]-o[p][0],m=o[b][1]-o[p][1],g=o[d][0]-o[p][0],v=o[d][1]-o[p][1],h*h+m*m>=g*g+v*v){l[f].index=-1;continue}l[y].index=-1}x=l[f].angle,y=f,b=d}for(u.push(p),f=0,d=0;2>f;++d)l[d].index>-1&&(u.push(l[d].index),f++);for(w=u.length;s>d;++d)if(!(l[d].index<0)){for(;!fr(u[w-2],u[w-1],l[d].index,o);)--w;u[w++]=l[d].index}var _=[];for(f=w-1;f>=0;--f)_.push(e[u[f]]);return _}var t=Fi,n=Ri;return arguments.length?i(e):(i.x=function(e){return arguments.length?(t=e,i):t},i.y=function(e){return arguments.length?(n=e,i):n},i)},e.geom.polygon=function(e){return A(e,dr),e};var dr=e.geom.polygon.prototype=[];dr.area=function(){for(var n,e=-1,t=this.length,i=this[t-1],r=0;++e<t;)n=i,i=this[e],r+=n[1]*i[0]-n[0]*i[1];return.5*r},dr.centroid=function(e){var a,s,t=-1,n=this.length,i=0,r=0,o=this[n-1];for(arguments.length||(e=-1/(6*this.area()));++t<n;)a=o,o=this[t],s=a[0]*o[1]-o[0]*a[1],i+=(a[0]+o[0])*s,r+=(a[1]+o[1])*s;return[i*e,r*e]},dr.clip=function(e){for(var t,a,o,l,u,c,n=mr(e),i=-1,r=this.length-mr(this),s=this[r-1];++i<r;){for(t=e.slice(),e.length=0,l=this[i],u=t[(o=t.length-n)-1],a=-1;++a<o;)c=t[a],pr(c,s,l)?(pr(u,s,l)||e.push(hr(u,c,s,l)),e.push(c)):pr(u,s,l)&&e.push(hr(u,c,s,l)),u=c;n&&e.push(e[0]),s=l}return e},e.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return vr(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,i){var r=e[i],a=r[0],o=r[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-a,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var s=0,l=t.length-1;l>s;s++)n.push([r,t[s],t[s+1]])}),n},e.geom.voronoi=function(t){function a(t){var a,u,c,o=t.map(function(){return[]}),s=ct(n),l=ct(i),f=t.length,d=1e6;if(s===Fi&&l===Ri)a=t;else for(a=new Array(f),c=0;f>c;++c)a[c]=[+s.call(this,u=t[c],c),+l.call(this,u,c)];if(vr(a,function(e){var t,n,i,r,a,s;1===e.a&&e.b>=0?(t=e.ep.r,n=e.ep.l):(t=e.ep.l,n=e.ep.r),1===e.a?(a=t?t.y:-d,i=e.c-e.b*a,s=n?n.y:d,r=e.c-e.b*s):(i=t?t.x:-d,a=e.c-e.a*i,r=n?n.x:d,s=e.c-e.a*r);var l=[i,a],u=[r,s];o[e.region.l.index].push(l,u),o[e.region.r.index].push(l,u)}),o=o.map(function(t,n){var i=a[n][0],r=a[n][1],o=t.map(function(e){return Math.atan2(e[0]-i,e[1]-r)}),s=e.range(t.length).sort(function(e,t){return o[e]-o[t]});return s.filter(function(e,t){return!t||o[e]-o[s[t-1]]>he}).map(function(e){return t[e]})}),o.forEach(function(e,t){var n=e.length;if(!n)return e.push([-d,-d],[-d,d],[d,d],[d,-d]);if(!(n>2)){var i=a[t],r=e[0],o=e[1],s=i[0],l=i[1],u=r[0],c=r[1],f=o[0],p=o[1],h=Math.abs(f-u),m=p-c;if(Math.abs(m)<he){var g=c>l?-d:d;e.push([-d,g],[d,g])}else if(he>h){var v=u>s?-d:d;e.push([v,-d],[v,d])}else{var g=(u-s)*(p-c)>(f-u)*(c-l)?d:-d,y=Math.abs(m)-h;Math.abs(y)<he?e.push([0>m?g:-g,g]):(y>0&&(g*=-1),e.push([-d,g],[d,g]))}}}),r)for(c=0;f>c;++c)r.clip(o[c]);for(c=0;f>c;++c)o[c].point=t[c];return o}var n=Fi,i=Ri,r=null;return arguments.length?a(t):(a.x=function(e){return arguments.length?(n=e,a):n},a.y=function(e){return arguments.length?(i=e,a):i},a.clipExtent=function(t){if(!arguments.length)return r&&[r[0],r[2]];if(null==t)r=null;else{var n=+t[0][0],i=+t[0][1],o=+t[1][0],s=+t[1][1];r=e.geom.polygon([[n,i],[n,s],[o,s],[o,i]])}return a},a.size=function(e){return arguments.length?a.clipExtent(e&&[[0,0],e]):r&&r[2]},a.links=function(e){var t,l,u,r=e.map(function(){return[]}),a=[],o=ct(n),s=ct(i),c=e.length;if(o===Fi&&s===Ri)t=e;else for(t=new Array(c),u=0;c>u;++u)t[u]=[+o.call(this,l=e[u],u),+s.call(this,l,u)];return vr(t,function(t){var n=t.region.l.index,i=t.region.r.index;r[n][i]||(r[n][i]=r[i][n]=!0,a.push({source:e[n],target:e[i]}))}),a},a.triangles=function(t){if(n===Fi&&i===Ri)return e.geom.delaunay(t);for(var s,r=new Array(u),a=ct(n),o=ct(i),l=-1,u=t.length;++l<u;)(r[l]=[+a.call(this,s=t[l],l),+o.call(this,s,l)]).data=s;return e.geom.delaunay(r).map(function(e){return e.map(function(e){return e.data})})},a)};var gr={l:"r",r:"l"};e.geom.quadtree=function(e,t,n,i,r){function l(e){function k(e,t,n,i,r,a,o,s){if(!isNaN(n)&&!isNaN(i))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(Math.abs(l-n)+Math.abs(u-i)<.01)C(e,t,n,i,r,a,o,s);else{var c=e.point;e.x=e.y=e.point=null,C(e,c,l,u,r,a,o,s),C(e,t,n,i,r,a,o,s)}else e.x=n,e.y=i,e.point=t}else C(e,t,n,i,r,a,o,s)}function C(e,t,n,i,r,a,o,s){var l=.5*(r+o),u=.5*(a+s),c=n>=l,f=i>=u,d=(f<<1)+c;e.leaf=!1,e=e.nodes[d]||(e.nodes[d]=xr()),c?r=l:o=l,f?a=u:s=u,k(e,t,n,i,r,a,o,s)}var l,f,d,p,h,m,g,v,y,u=ct(a),c=ct(o);if(null!=t)m=t,g=n,v=i,y=r;else if(v=y=-(m=g=1/0),f=[],d=[],h=e.length,s)for(p=0;h>p;++p)l=e[p],l.x<m&&(m=l.x),l.y<g&&(g=l.y),l.x>v&&(v=l.x),l.y>y&&(y=l.y),f.push(l.x),d.push(l.y);else for(p=0;h>p;++p){var b=+u(l=e[p],p),x=+c(l,p);m>b&&(m=b),g>x&&(g=x),b>v&&(v=b),x>y&&(y=x),f.push(b),d.push(x)}var w=v-m,_=y-g;w>_?y=g+w:v=m+_;var T=xr();if(T.add=function(e){k(T,e,+u(e,++p),+c(e,p),m,g,v,y)},T.visit=function(e){wr(e,T,m,g,v,y)},p=-1,null==t){for(;++p<h;)k(T,e[p],f[p],d[p],m,g,v,y);--p}else e.forEach(T.add);return f=d=e=l=null,T}var s,a=Fi,o=Ri;return(s=arguments.length)?(a=yr,o=br,3===s&&(r=n,i=t,n=t=0),l(e)):(l.x=function(e){return arguments.length?(a=e,l):a},l.y=function(e){return arguments.length?(o=e,l):o},l.extent=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=+e[0][0],n=+e[0][1],i=+e[1][0],r=+e[1][1]),l):null==t?null:[[t,n],[i,r]]},l.size=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=n=0,i=+e[0],r=+e[1]),l):null==t?null:[i-t,r-n]},l)},e.interpolateRgb=_r,e.interpolateObject=kr,e.interpolateNumber=Cr,e.interpolateString=Tr;var Sr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;e.interpolate=Er,e.interpolators=[function(e,t){var n=typeof t;return("string"===n?ut.has(t)||/^(#|rgb\(|hsl\()/.test(t)?_r:Tr:t instanceof Me?_r:"object"===n?Array.isArray(t)?Nr:kr:Cr)(e,t)}],e.interpolateArray=Nr;var jr=function(){return ft},Dr=e.map({linear:jr,poly:Pr,quad:function(){return Ir},cubic:function(){return Lr},sin:function(){return Fr},exp:function(){return Rr},circle:function(){return zr},elastic:qr,back:Br,bounce:function(){return Wr}}),Mr=e.map({"in":ft,out:$r,"in-out":Or,"out-in":function(e){return Or($r(e))}});e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,i=t>=0?e.substring(t+1):"in";return n=Dr.get(n)||jr,i=Mr.get(i)||ft,Ar(i(n.apply(null,Array.prototype.slice.call(arguments,1))))},e.interpolateHcl=Ur,e.interpolateHsl=Vr,e.interpolateLab=Qr,e.interpolateRound=Jr,e.transform=function(t){var n=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){n.setAttribute("transform",e);var t=n.transform.baseVal.consolidate()}return new Xr(t?t.matrix:Zr)})(t)},Xr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Zr={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=ea,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],n=-1,i=e.length;++n<i;)t.push(ia(e[n]));return t}},e.layout.chord=function(){function c(){var h,m,g,v,y,t={},c=[],d=e.range(a),p=[];for(n=[],i=[],h=0,v=-1;++v<a;){for(m=0,y=-1;++y<a;)m+=r[v][y];c.push(m),p.push(e.range(a)),h+=m}for(s&&d.sort(function(e,t){return s(c[e],c[t])}),l&&p.forEach(function(e,t){e.sort(function(e,n){return l(r[t][e],r[t][n])})}),h=(2*pe-o*a)/h,m=0,v=-1;++v<a;){for(g=m,y=-1;++y<a;){var b=d[v],x=p[b][y],w=r[b][x],_=m,k=m+=w*h;t[b+"-"+x]={index:b,subindex:x,startAngle:_,endAngle:k,value:w}}i[b]={index:b,startAngle:g,endAngle:m,value:(m-g)/h},m+=o}for(v=-1;++v<a;)for(y=v-1;++y<a;){var C=t[v+"-"+y],T=t[y+"-"+v];(C.value||T.value)&&n.push(C.value<T.value?{source:T,target:C}:{source:C,target:T})}u&&f()}function f(){n.sort(function(e,t){return u((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,i,r,a,s,l,u,t={},o=0;return t.matrix=function(e){return arguments.length?(a=(r=e)&&r.length,n=i=null,t):r},t.padding=function(e){return arguments.length?(o=e,n=i=null,t):o},t.sortGroups=function(e){return arguments.length?(s=e,n=i=null,t):s},t.sortSubgroups=function(e){return arguments.length?(l=e,n=null,t):l},t.sortChords=function(e){return arguments.length?(u=e,n&&f(),t):u},t.chords=function(){return n||c(),n},t.groups=function(){return i||c(),i},t},e.layout.force=function(){function v(e){return function(t,n,i,r){if(t.point!==e){var a=t.cx-e.x,o=t.cy-e.y,s=1/Math.sqrt(a*a+o*o);if(f>(r-n)*s){var l=t.charge*s*s;return e.px-=a*l,e.py-=o*l,!0}if(t.point&&isFinite(s)){var l=t.pointCharge*s*s;e.px-=a*l,e.py-=o*l}}return!t.charge}}function y(n){n.px=e.event.x,n.py=e.event.y,t.resume()}var r,a,h,m,g,t={},n=e.dispatch("start","tick","end"),i=[1,1],o=.9,s=fa,l=da,u=-30,c=.1,f=.8,d=[],p=[];return t.tick=function(){if((a*=.99)<.005)return n.end({type:"end",alpha:a=0}),!0;var s,l,f,y,b,x,w,_,k,t=d.length,r=p.length;for(l=0;r>l;++l)f=p[l],y=f.source,b=f.target,_=b.x-y.x,k=b.y-y.y,(x=_*_+k*k)&&(x=a*m[l]*((x=Math.sqrt(x))-h[l])/x,_*=x,k*=x,b.x-=_*(w=y.weight/(b.weight+y.weight)),b.y-=k*w,y.x+=_*(w=1-w),y.y+=k*w);if((w=a*c)&&(_=i[0]/2,k=i[1]/2,l=-1,w))for(;++l<t;)f=d[l],f.x+=(_-f.x)*w,f.y+=(k-f.y)*w;if(u)for(ca(s=e.geom.quadtree(d),a,g),l=-1;++l<t;)(f=d[l]).fixed||s.visit(v(f));for(l=-1;++l<t;)f=d[l],f.fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*o,f.y-=(f.py-(f.py=f.y))*o);n.tick({type:"tick",alpha:a})},t.nodes=function(e){return arguments.length?(d=e,t):d},t.links=function(e){return arguments.length?(p=e,t):p},t.size=function(e){return arguments.length?(i=e,t):i},t.linkDistance=function(e){return arguments.length?(s="function"==typeof e?e:+e,t):s},t.distance=t.linkDistance,t.linkStrength=function(e){return arguments.length?(l="function"==typeof e?e:+e,t):l},t.friction=function(e){return arguments.length?(o=+e,t):o},t.charge=function(e){return arguments.length?(u="function"==typeof e?e:+e,t):u},t.gravity=function(e){return arguments.length?(c=+e,t):c},t.theta=function(e){return arguments.length?(f=+e,t):f},t.alpha=function(i){return arguments.length?(i=+i,a?a=i>0?i:0:i>0&&(n.start({type:"start",alpha:a=i}),e.timer(t.tick)),t):a},t.start=function(){function y(t,n){for(var o,i=b(e),r=-1,a=i.length;++r<a;)if(!isNaN(o=i[r][t]))return o;return Math.random()*n}function b(){if(!f){for(f=[],n=0;r>n;++n)f[n]=[];for(n=0;a>n;++n){var t=p[n];f[t.source.index].push(t.target),f[t.target.index].push(t.source)}}return f[e]}var e,n,f,v,r=d.length,a=p.length,o=i[0],c=i[1];for(e=0;r>e;++e)(v=d[e]).index=e,v.weight=0;for(e=0;a>e;++e)v=p[e],"number"==typeof v.source&&(v.source=d[v.source]),"number"==typeof v.target&&(v.target=d[v.target]),++v.source.weight,++v.target.weight;for(e=0;r>e;++e)v=d[e],isNaN(v.x)&&(v.x=y("x",o)),isNaN(v.y)&&(v.y=y("y",c)),isNaN(v.px)&&(v.px=v.x),isNaN(v.py)&&(v.py=v.y);if(h=[],"function"==typeof s)for(e=0;a>e;++e)h[e]=+s.call(this,p[e],e);else for(e=0;a>e;++e)h[e]=s;if(m=[],"function"==typeof l)for(e=0;a>e;++e)m[e]=+l.call(this,p[e],e);else for(e=0;a>e;++e)m[e]=l;if(g=[],"function"==typeof u)for(e=0;r>e;++e)g[e]=+u.call(this,d[e],e);else for(e=0;r>e;++e)g[e]=u;return t.resume()},t.resume=function(){return t.alpha(.1)},t.stop=function(){return t.alpha(0)},t.drag=function(){return r||(r=e.behavior.drag().origin(ft).on("dragstart.force",oa).on("drag.force",y).on("dragend.force",sa)),arguments.length?void this.on("mouseover.force",la).on("mouseout.force",ua).call(r):r},e.rebind(t,n,"on")};var fa=20,da=1;e.layout.hierarchy=function(){function i(r,o,s){var l=t.call(a,r,o);if(r.depth=o,s.push(r),l&&(c=l.length)){for(var c,h,u=-1,f=r.children=[],d=0,p=o+1;++u<c;)h=i(l[u],p,s),h.parent=r,f.push(h),d+=h.value;e&&f.sort(e),n&&(r.value=d)}else n&&(r.value=+n.call(a,r,o)||0);return r}function r(e,t){var i=e.children,o=0;if(i&&(l=i.length))for(var l,s=-1,u=t+1;++s<l;)o+=r(i[s],u);else n&&(o=+n.call(a,e,t)||0);return n&&(e.value=o),o}function a(e){var t=[];return i(e,0,t),t}var e=ga,t=ha,n=ma;return a.sort=function(t){return arguments.length?(e=t,a):e},a.children=function(e){return arguments.length?(t=e,a):t},a.value=function(e){return arguments.length?(n=e,a):n},a.revalue=function(e){return r(e,0),e},a},e.layout.partition=function(){function i(e,t,n,r){var a=e.children;if(e.x=t,e.y=e.depth*r,e.dx=n,e.dy=r,a&&(s=a.length)){var s,l,u,o=-1;for(n=e.value?n/e.value:0;++o<s;)i(l=a[o],t,u=l.value*n,r),t+=u}}function r(e){var t=e.children,n=0;if(t&&(a=t.length))for(var a,i=-1;++i<a;)n=Math.max(n,r(t[i]));return 1+n}function a(e,a){var o=t.call(this,e,a);return i(o[0],0,n[0],n[1]/r(o[0])),o}var t=e.layout.hierarchy(),n=[1,1];return a.size=function(e){return arguments.length?(n=e,a):n},pa(a,t)},e.layout.pie=function(){function a(o){var s=o.map(function(e,n){return+t.call(a,e,n)}),l=+("function"==typeof i?i.apply(this,arguments):i),u=(("function"==typeof r?r.apply(this,arguments):r)-l)/e.sum(s),c=e.range(o.length);null!=n&&c.sort(n===ya?function(e,t){return s[t]-s[e]}:function(e,t){return n(o[e],o[t])});var f=[];return c.forEach(function(e){var t;f[e]={data:o[e],value:t=s[e],startAngle:l,endAngle:l+=t*u}}),f}var t=Number,n=ya,i=0,r=2*pe;return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(e){return arguments.length?(n=e,a):n},a.startAngle=function(e){return arguments.length?(i=e,a):i},a.endAngle=function(e){return arguments.length?(r=e,a):r},a};var ya={};e.layout.stack=function(){function s(l,u){var c=l.map(function(e,n){return t.call(s,e,n)}),f=c.map(function(e){return e.map(function(e,t){return[a.call(s,e,t),o.call(s,e,t)]})}),d=n.call(s,f,u);c=e.permute(c,d),f=e.permute(f,d);var g,v,y,p=i.call(s,f,u),h=c.length,m=c[0].length;for(v=0;m>v;++v)for(r.call(s,c[0][v],y=p[v],f[0][v][1]),g=1;h>g;++g)r.call(s,c[g][v],y+=f[g-1][v][1],f[g][v][1]);return l}var t=ft,n=Ca,i=Ta,r=wa,a=ba,o=xa;return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(e){return arguments.length?(n="function"==typeof e?e:_a.get(e)||Ca,s):n},s.offset=function(e){return arguments.length?(i="function"==typeof e?e:ka.get(e)||Ta,s):i},s.x=function(e){return arguments.length?(a=e,s):a},s.y=function(e){return arguments.length?(o=e,s):o},s.out=function(e){return arguments.length?(r=e,s):r},s};var _a=e.map({"inside-out":function(t){var i,r,n=t.length,a=t.map(Sa),o=t.map(Ea),s=e.range(n).sort(function(e,t){return a[e]-a[t]}),l=0,u=0,c=[],f=[];for(i=0;n>i;++i)r=s[i],u>l?(l+=o[r],c.push(r)):(u+=o[r],f.push(r));return f.reverse().concat(c)},reverse:function(t){return e.range(t.length).reverse()},"default":Ca}),ka=e.map({silhouette:function(e){var a,o,s,t=e.length,n=e[0].length,i=[],r=0,l=[];for(o=0;n>o;++o){for(a=0,s=0;t>a;a++)s+=e[a][o][1];s>r&&(r=s),i.push(s)}for(o=0;n>o;++o)l[o]=(r-i[o])/2;return l},wiggle:function(e){var r,a,o,s,l,u,c,f,d,t=e.length,n=e[0],i=n.length,p=[];for(p[0]=f=d=0,a=1;i>a;++a){for(r=0,s=0;t>r;++r)s+=e[r][a][1];for(r=0,l=0,c=n[a][0]-n[a-1][0];t>r;++r){for(o=0,u=(e[r][a][1]-e[r][a-1][1])/(2*c);r>o;++o)u+=(e[o][a][1]-e[o][a-1][1])/c;l+=u*e[r][a][1]}p[a]=f-=s?l/s*c:0,d>f&&(d=f)}for(a=0;i>a;++a)p[a]-=d;return p},expand:function(e){var r,a,o,t=e.length,n=e[0].length,i=1/t,s=[];for(a=0;n>a;++a){for(r=0,o=0;t>r;r++)o+=e[r][a][1];if(o)for(r=0;t>r;r++)e[r][a][1]/=o;else for(r=0;t>r;r++)e[r][a][1]=i}for(a=0;n>a;++a)s[a]=0;return s},zero:Ta});e.layout.histogram=function(){function a(a,o){for(var f,m,s=[],l=a.map(n,this),u=i.call(this,l,o),c=r.call(this,u,l,o),o=-1,d=l.length,p=c.length-1,h=t?1:1/d;++o<p;)f=s[o]=[],f.dx=c[o+1]-(f.x=c[o]),f.y=0;if(p>0)for(o=-1;++o<d;)m=l[o],m>=u[0]&&m<=u[1]&&(f=s[e.bisect(c,m,1,p)-1],f.y+=h,f.push(a[o]));return s}var t=!0,n=Number,i=Ma,r=ja;return a.value=function(e){return arguments.length?(n=e,a):n},a.range=function(e){return arguments.length?(i=ct(e),a):i},a.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return Da(t,e)}:ct(e),a):r},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.tree=function(){function a(e,a){function l(e,t){var i=e.children,r=e._tree;if(i&&(a=i.length)){for(var a,s,f,o=i[0],u=o,d=-1;++d<a;)f=i[d],l(f,s),u=c(f,s,u),s=f;Ra(e);var p=.5*(o._tree.prelim+f._tree.prelim);t?(r.prelim=t._tree.prelim+n(e,t),r.mod=r.prelim-p):r.prelim=p}else t&&(r.prelim=t._tree.prelim+n(e,t))}function u(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(r=n.length)){var r,i=-1;for(t+=e._tree.mod;++i<r;)u(n[i],t)}}function c(e,t,i){if(t){for(var d,r=e,a=e,o=t,s=e.parent.children[0],l=r._tree.mod,u=a._tree.mod,c=o._tree.mod,f=s._tree.mod;o=Oa(o),r=$a(r),o&&r;)s=$a(s),a=Oa(a),a._tree.ancestor=e,d=o._tree.prelim+c-r._tree.prelim-l+n(o,r),d>0&&(za(qa(o,e,i),e,d),l+=d,u+=d),c+=o._tree.mod,l+=r._tree.mod,f+=s._tree.mod,u+=a._tree.mod;o&&!Oa(a)&&(a._tree.thread=o,a._tree.mod+=c-u),r&&!$a(s)&&(s._tree.thread=r,s._tree.mod+=l-f,i=e)}return i}var o=t.call(this,e,a),s=o[0];Fa(s,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),l(s),u(s,-s._tree.prelim);var f=Ia(s,Ha),d=Ia(s,La),p=Ia(s,Pa),h=f.x-n(f,d)/2,m=d.x+n(d,f)/2,g=p.depth||1;return Fa(s,r?function(e){e.x*=i[0],e.y=e.depth*i[1],delete e._tree}:function(e){e.x=(e.x-h)/(m-h)*i[0],e.y=e.depth/g*i[1],delete e._tree}),o}var t=e.layout.hierarchy().sort(null).value(null),n=Aa,i=[1,1],r=!1;return a.separation=function(e){return arguments.length?(n=e,a):n},a.size=function(e){return arguments.length?(r=null==(i=e),a):r?null:i},a.nodeSize=function(e){return arguments.length?(r=null!=(i=e),a):r?i:null},pa(a,t)},e.layout.pack=function(){function a(e,a){var o=t.call(this,e,a),s=o[0],l=i[0],u=i[1],c=null==r?Math.sqrt:"function"==typeof r?r:function(){return r};if(s.x=s.y=0,Fa(s,function(e){e.r=+c(e.value)}),Fa(s,Qa),n){var f=n*(r?1:Math.max(2*s.r/l,2*s.r/u))/2;Fa(s,function(e){e.r+=f}),Fa(s,Qa),Fa(s,function(e){e.r-=f})}return Ga(s,l/2,u/2,r?1:1/Math.max(2*s.r/l,2*s.r/u)),o}var r,t=e.layout.hierarchy().sort(Ba),n=0,i=[1,1];return a.size=function(e){return arguments.length?(i=e,a):i},a.radius=function(e){return arguments.length?(r=null==e||"function"==typeof e?e:+e,a):r},a.padding=function(e){return arguments.length?(n=+e,a):n},pa(a,t)},e.layout.cluster=function(){function a(e,a){var l,o=t.call(this,e,a),s=o[0],u=0;Fa(s,function(e){var t=e.children;t&&t.length?(e.x=Za(t),e.y=Ka(t)):(e.x=l?u+=n(e,l):0,e.y=0,l=e)});var c=eo(s),f=to(s),d=c.x-n(c,f)/2,p=f.x+n(f,c)/2;return Fa(s,r?function(e){e.x=(e.x-s.x)*i[0],e.y=(s.y-e.y)*i[1]}:function(e){e.x=(e.x-d)/(p-d)*i[0],e.y=(1-(s.y?e.y/s.y:1))*i[1]}),o}var t=e.layout.hierarchy().sort(null).value(null),n=Aa,i=[1,1],r=!1;return a.separation=function(e){return arguments.length?(n=e,a):n},a.size=function(e){return arguments.length?(r=null==(i=e),a):r?null:i},a.nodeSize=function(e){return arguments.length?(r=null!=(i=e),a):r?i:null},pa(a,t)},e.layout.treemap=function(){function c(e,t){for(var r,a,n=-1,i=e.length;++n<i;)a=(r=e[n]).value*(0>t?0:t),r.area=isNaN(a)||0>=a?0:a}function f(e){var t=e.children;if(t&&t.length){var o,u,m,n=a(e),i=[],r=t.slice(),s=1/0,d="slice"===l?n.dx:"dice"===l?n.dy:"slice-dice"===l?1&e.depth?n.dy:n.dx:Math.min(n.dx,n.dy);for(c(r,n.dx*n.dy/e.value),i.area=0;(m=r.length)>0;)i.push(o=r[m-1]),i.area+=o.area,"squarify"!==l||(u=p(i,d))<=s?(r.pop(),s=u):(i.area-=i.pop().area,h(i,d,n,!1),d=Math.min(n.dx,n.dy),i.length=i.area=0,s=1/0);i.length&&(h(i,d,n,!0),i.length=i.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var r,n=a(e),i=t.slice(),o=[];for(c(i,n.dx*n.dy/e.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(h(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);t.forEach(d)}}function p(e,t){for(var i,n=e.area,r=0,a=1/0,o=-1,s=e.length;++o<s;)(i=e[o].area)&&(a>i&&(a=i),i>r&&(r=i));return n*=n,t*=t,n?Math.max(t*r*u/n,n/(t*a*u)):1/0}function h(e,t,i,r){var c,a=-1,o=e.length,s=i.x,l=i.y,u=t?n(e.area/t):0;if(t==i.dx){for((r||u>i.dy)&&(u=i.dy);++a<o;)c=e[a],c.x=s,c.y=l,c.dy=u,s+=c.dx=Math.min(i.x+i.dx-s,u?n(c.area/u):0);c.z=!0,c.dx+=i.x+i.dx-s,i.y+=u,i.dy-=u}else{for((r||u>i.dx)&&(u=i.dx);++a<o;)c=e[a],c.x=s,c.y=l,c.dx=u,l+=c.dy=Math.min(i.y+i.dy-l,u?n(c.area/u):0);c.z=!1,c.dy+=i.y+i.dy-l,i.x+=u,i.dx-=u}}function m(e){var n=s||t(e),r=n[0];return r.x=0,r.y=0,r.dx=i[0],r.dy=i[1],s&&t.revalue(r),c([r],r.dx*r.dy/r.value),(s?d:f)(r),o&&(s=n),n}var s,t=e.layout.hierarchy(),n=Math.round,i=[1,1],r=null,a=no,o=!1,l="squarify",u=.5*(1+Math.sqrt(5));return m.size=function(e){return arguments.length?(i=e,m):i},m.padding=function(e){function t(t){var n=e.call(m,t,t.depth);return null==n?no(t):io(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return io(t,e)}if(!arguments.length)return r;var i;return a=null==(r=e)?no:"function"==(i=typeof e)?t:"number"===i?(e=[e,e,e,e],n):n,m},m.round=function(e){return arguments.length?(n=e?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(o=e,s=null,m):o},m.ratio=function(e){return arguments.length?(u=e,m):u},m.mode=function(e){return arguments.length?(l=e+"",m):l},pa(m,t)},e.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return e+t*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t/e}}},e.scale={};var uo={floor:ft,ceil:ft};e.scale.linear=function(){return fo([0,1],[0,1],Er,!1)},e.scale.log=function(){return yo(e.scale.linear().domain([0,1]),10,!0,[1,10])};var bo=e.format(".0e"),xo={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};e.scale.pow=function(){return wo(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ko([],{t:"range",a:[[]]})},e.scale.category10=function(){return e.scale.ordinal().range(Co)},e.scale.category20=function(){return e.scale.ordinal().range(To)},e.scale.category20b=function(){return e.scale.ordinal().range(So)},e.scale.category20c=function(){return e.scale.ordinal().range(Eo)};var Co=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Ze),To=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Ze),So=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Ze),Eo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Ze);e.scale.quantile=function(){return No([],[])},e.scale.quantize=function(){return jo(0,1,[0,1])},e.scale.threshold=function(){return Do([.5],[0,1])},e.scale.identity=function(){return Mo([0,1])},e.svg.arc=function(){function r(){var r=e.apply(this,arguments),a=t.apply(this,arguments),o=n.apply(this,arguments)+Ao,s=i.apply(this,arguments)+Ao,l=(o>s&&(l=o,o=s,s=l),s-o),u=pe>l?"0":"1",c=Math.cos(o),f=Math.sin(o),d=Math.cos(s),p=Math.sin(s);return l>=$o?r?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+r+"A"+r+","+r+" 0 1,0 0,"+-r+"A"+r+","+r+" 0 1,0 0,"+r+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":r?"M"+a*c+","+a*f+"A"+a+","+a+" 0 "+u+",1 "+a*d+","+a*p+"L"+r*d+","+r*p+"A"+r+","+r+" 0 "+u+",0 "+r*c+","+r*f+"Z":"M"+a*c+","+a*f+"A"+a+","+a+" 0 "+u+",1 "+a*d+","+a*p+"L0,0Z"}var e=Oo,t=Io,n=Lo,i=Ho;return r.innerRadius=function(t){return arguments.length?(e=ct(t),r):e},r.outerRadius=function(e){return arguments.length?(t=ct(e),r):t},r.startAngle=function(e){return arguments.length?(n=ct(e),r):n},r.endAngle=function(e){return arguments.length?(i=ct(e),r):i},r.centroid=function(){var r=(e.apply(this,arguments)+t.apply(this,arguments))/2,a=(n.apply(this,arguments)+i.apply(this,arguments))/2+Ao;return[Math.cos(a)*r,Math.sin(a)*r]},r};var Ao=-pe/2,$o=2*pe-1e-6;e.svg.line.radial=function(){var e=Pi(Po);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},Ui.reverse=Vi,Vi.reverse=Ui,e.svg.area=function(){return Fo(ft)},e.svg.area.radial=function(){var e=Fo(Po);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},e.svg.chord=function(){function a(n,i){var r=o(this,e,n,i),a=o(this,t,n,i);return"M"+r.p0+l(r.r,r.p1,r.a1-r.a0)+(s(r,a)?u(r.r,r.p1,r.r,r.p0):u(r.r,r.p1,a.r,a.p0)+l(a.r,a.p1,a.a1-a.a0)+u(a.r,a.p1,r.r,r.p0))+"Z"}function o(e,t,a,o){var s=t.call(e,a,o),l=n.call(e,s,o),u=i.call(e,s,o)+Ao,c=r.call(e,s,o)+Ao;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(e,t){return e.a0==t.a0&&e.a1==t.a1}function l(e,t,n){return"A"+e+","+e+" 0 "+ +(n>pe)+",1 "+t}function u(e,t,n,i){return"Q 0,0 "+i}var e=wi,t=_i,n=Ro,i=Lo,r=Ho;return a.radius=function(e){return arguments.length?(n=ct(e),a):n},a.source=function(t){return arguments.length?(e=ct(t),a):e},a.target=function(e){return arguments.length?(t=ct(e),a):t},a.startAngle=function(e){return arguments.length?(i=ct(e),a):i},a.endAngle=function(e){return arguments.length?(r=ct(e),a):r},a},e.svg.diagonal=function(){function i(i,r){var a=e.call(this,i,r),o=t.call(this,i,r),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return l=l.map(n),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=wi,t=_i,n=zo;return i.source=function(t){return arguments.length?(e=ct(t),i):e},i.target=function(e){return arguments.length?(t=ct(e),i):t},i.projection=function(e){return arguments.length?(n=e,i):n},i},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=zo,i=t.projection;return t.projection=function(e){return arguments.length?i(qo(n=e)):n},t},e.svg.symbol=function(){function n(n,i){return(Vo.get(e.call(this,n,i))||Uo)(t.call(this,n,i))}var e=Wo,t=Bo;return n.type=function(t){return arguments.length?(e=ct(t),n):e},n.size=function(e){return arguments.length?(t=ct(e),n):t},n};var Vo=e.map({circle:Uo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Jo)),n=t*Jo;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Qo),n=t*Qo/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Qo),n=t*Qo/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});e.svg.symbolTypes=Vo.keys();var Ko,Zo,Qo=Math.sqrt(3),Jo=Math.tan(30*ge),Go=[],Yo=0;Go.call=P.call,Go.empty=P.empty,Go.node=P.node,Go.size=P.size,e.transition=function(e){return arguments.length?Ko?e.transition():e:ie.transition()},e.transition.prototype=Go,P.transition=function(){for(var n,i,e=Ko||++Yo,t=[],r=Zo||{time:Date.now(),ease:Hr,delay:0,duration:250},a=-1,o=this.length;++a<o;){t.push(n=[]);for(var s=this[a],l=-1,u=s.length;++l<u;)(i=s[l])&&is(i,l,e,r),n.push(i)}return Xo(t,e)},P.interrupt=function(){return this.each(es)},Go.select=function(e){var i,r,a,t=this.id,n=[];e=F(e);for(var o=-1,s=this.length;++o<s;){n.push(i=[]);for(var l=this[o],u=-1,c=l.length;++u<c;)(a=l[u])&&(r=e.call(a,a.__data__,u,o))?("__data__"in a&&(r.__data__=a.__data__),is(r,u,t,a.__transition__[t]),i.push(r)):i.push(null)}return Xo(n,t)},Go.selectAll=function(e){var i,r,a,o,s,t=this.id,n=[];e=R(e);for(var l=-1,u=this.length;++l<u;)for(var c=this[l],f=-1,d=c.length;++f<d;)if(a=c[f]){s=a.__transition__[t],r=e.call(a,a.__data__,f,l),n.push(i=[]);for(var p=-1,h=r.length;++p<h;)(o=r[p])&&is(o,p,t,s),i.push(o)}return Xo(n,t)},Go.filter=function(e){var n,i,r,t=[];"function"!=typeof e&&(e=Y(e));for(var a=0,o=this.length;o>a;a++){t.push(n=[]);for(var i=this[a],s=0,l=i.length;l>s;s++)(r=i[s])&&e.call(r,r.__data__,s)&&n.push(r)}return Xo(t,this.id)},Go.tween=function(e,t){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(e):Z(this,null==t?function(t){t.__transition__[n].tween.remove(e)}:function(i){i.__transition__[n].tween.set(e,t)})},Go.attr=function(t,n){function a(){this.removeAttribute(r)}function o(){this.removeAttributeNS(r.space,r.local)}function s(e){return null==e?a:(e+="",function(){var n,t=this.getAttribute(r);return t!==e&&(n=i(t,e),function(e){this.setAttribute(r,n(e))})})}function l(e){return null==e?o:(e+="",function(){var n,t=this.getAttributeNS(r.space,r.local);return t!==e&&(n=i(t,e),function(e){this.setAttributeNS(r.space,r.local,n(e))})})}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var i="transform"==t?ea:Er,r=e.ns.qualify(t);return ts(this,"attr."+t,n,r.local?l:s)},Go.attrTween=function(t,n){function r(e,t){var r=n.call(this,e,t,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function a(e,t){var r=n.call(this,e,t,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=e.ns.qualify(t);return this.tween("attr."+t,i.local?a:r)},Go.style=function(e,t,n){function r(){this.style.removeProperty(e)}function o(t){return null==t?r:(t+="",function(){var r,i=a.getComputedStyle(this,null).getPropertyValue(e);
return i!==t&&(r=Er(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return ts(this,"style."+e,t,o)},Go.styleTween=function(e,t,n){function i(i,r){var o=t.call(this,i,r,a.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,i)},Go.text=function(e){return ts(this,"text",e,ns)},Go.remove=function(){return this.each("end.transition",function(){var e;this.__transition__.count<2&&(e=this.parentNode)&&e.removeChild(this)})},Go.ease=function(t){var n=this.id;return arguments.length<1?this.node().__transition__[n].ease:("function"!=typeof t&&(t=e.ease.apply(e,arguments)),Z(this,function(e){e.__transition__[n].ease=t}))},Go.delay=function(e){var t=this.id;return Z(this,"function"==typeof e?function(n,i,r){n.__transition__[t].delay=+e.call(n,n.__data__,i,r)}:(e=+e,function(n){n.__transition__[t].delay=e}))},Go.duration=function(e){var t=this.id;return Z(this,"function"==typeof e?function(n,i,r){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,i,r))}:(e=Math.max(1,e),function(n){n.__transition__[t].duration=e}))},Go.each=function(t,n){var i=this.id;if(arguments.length<2){var r=Zo,a=Ko;Ko=i,Z(this,function(e,n,r){Zo=e.__transition__[i],t.call(e,e.__data__,n,r)}),Zo=r,Ko=a}else Z(this,function(r){var a=r.__transition__[i];(a.event||(a.event=e.dispatch("start","end"))).on(t,n)});return this},Go.transition=function(){for(var i,r,a,o,e=this.id,t=++Yo,n=[],s=0,l=this.length;l>s;s++){n.push(i=[]);for(var r=this[s],u=0,c=r.length;c>u;u++)(a=r[u])&&(o=Object.create(a.__transition__[e]),o.delay+=o.duration,is(a,u,t,o)),i.push(a)}return Xo(n,t)},e.svg.axis=function(){function u(u){u.each(function(){var g,u=e.select(this),c=null==s?t.ticks?t.ticks.apply(t,o):t.domain():s,f=null==l?t.tickFormat?t.tickFormat.apply(t,o):ft:l,d=u.selectAll(".tick.major").data(c,ft),p=d.enter().insert("g",".domain").attr("class","tick major").style("opacity",1e-6),h=e.transition(d.exit()).style("opacity",1e-6).remove(),m=e.transition(d).style("opacity",1),v=ao(t),y=u.selectAll(".domain").data([0]),b=(y.enter().append("path").attr("class","domain"),e.transition(y)),x=t.copy(),w=this.__chart__||x;this.__chart__=x,p.append("line"),p.append("text");var _=p.select("line"),k=m.select("line"),C=d.select("text").text(f),T=p.select("text"),S=m.select("text");switch(n){case"bottom":g=os,_.attr("y2",i),T.attr("y",Math.max(i,0)+a),k.attr("x2",0).attr("y2",i),S.attr("x",0).attr("y",Math.max(i,0)+a),C.attr("dy",".71em").style("text-anchor","middle"),b.attr("d","M"+v[0]+","+r+"V0H"+v[1]+"V"+r);break;case"top":g=os,_.attr("y2",-i),T.attr("y",-(Math.max(i,0)+a)),k.attr("x2",0).attr("y2",-i),S.attr("x",0).attr("y",-(Math.max(i,0)+a)),C.attr("dy","0em").style("text-anchor","middle"),b.attr("d","M"+v[0]+","+-r+"V0H"+v[1]+"V"+-r);break;case"left":g=ss,_.attr("x2",-i),T.attr("x",-(Math.max(i,0)+a)),k.attr("x2",-i).attr("y2",0),S.attr("x",-(Math.max(i,0)+a)).attr("y",0),C.attr("dy",".32em").style("text-anchor","end"),b.attr("d","M"+-r+","+v[0]+"H0V"+v[1]+"H"+-r);break;case"right":g=ss,_.attr("x2",i),T.attr("x",Math.max(i,0)+a),k.attr("x2",i).attr("y2",0),S.attr("x",Math.max(i,0)+a).attr("y",0),C.attr("dy",".32em").style("text-anchor","start"),b.attr("d","M"+r+","+v[0]+"H0V"+v[1]+"H"+r)}if(t.rangeBand){var E=x.rangeBand()/2,N=function(e){return x(e)+E};p.call(g,N),m.call(g,N)}else p.call(g,w),m.call(g,x),h.call(g,x)})}var l,t=e.scale.linear(),n=rs,i=6,r=6,a=3,o=[10],s=null;return u.scale=function(e){return arguments.length?(t=e,u):t},u.orient=function(e){return arguments.length?(n=e in as?e+"":rs,u):n},u.ticks=function(){return arguments.length?(o=arguments,u):o},u.tickValues=function(e){return arguments.length?(s=e,u):s},u.tickFormat=function(e){return arguments.length?(l=e,u):l},u.tickSize=function(e){var t=arguments.length;return t?(i=+e,r=+arguments[t-1],u):i},u.innerTickSize=function(e){return arguments.length?(i=+e,u):i},u.outerTickSize=function(e){return arguments.length?(r=+e,u):r},u.tickPadding=function(e){return arguments.length?(a=+e,u):a},u.tickSubdivide=function(){return arguments.length&&u},u};var rs="bottom",as={top:1,right:1,bottom:1,left:1};e.svg.brush=function(){function d(t){t.each(function(){var t=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),r=t.selectAll(".background").data([0]);r.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(f,ft);a.exit().remove(),a.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return ls[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",d.empty()?"none":null);var l,o=e.transition(t),s=e.transition(r);n&&(l=ao(n),s.attr("x",l[0]).attr("width",l[1]-l[0]),h(o)),i&&(l=ao(i),s.attr("y",l[0]).attr("height",l[1]-l[0]),m(o)),p(o)})}function p(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+r[+/e$/.test(e)]+","+o[+/^s/.test(e)]+")"})}function h(e){e.select(".extent").attr("x",r[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",r[1]-r[0])}function m(e){e.select(".extent").attr("y",o[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1]-o[0])}function g(){function M(){var t=e.event.changedTouches;return t?e.touches(f,t)[0]:e.mouse(f)}function A(){32==e.event.keyCode&&(_||(C=null,T[0]-=r[1],T[1]-=o[1],_=2),N())}function $(){32==e.event.keyCode&&2==_&&(T[0]+=r[1],T[1]+=o[1],_=0,N())}function O(){var t=M(),a=!1;S&&(t[0]+=S[0],t[1]+=S[1]),_||(e.event.altKey?(C||(C=[(r[0]+r[1])/2,(o[0]+o[1])/2]),T[0]=r[+(t[0]<C[0])],T[1]=o[+(t[1]<C[1])]):C=null),x&&I(t,n,0)&&(h(y),a=!0),w&&I(t,i,1)&&(m(y),a=!0),a&&(p(y),v({type:"brush",mode:_?"move":"resize"}))}function I(e,t,n){var m,g,i=ao(t),a=i[0],f=i[1],d=T[n],p=n?o:r,h=p[1]-p[0];return _&&(a-=d,f-=h+d),m=(n?c:u)?Math.max(a,Math.min(f,e[n])):e[n],_?g=(m+=d)+h:(C&&(d=Math.max(a,Math.min(f,2*C[n]-m))),m>d?(g=m,m=d):g=d),p[0]!=m||p[1]!=g?(n?l=null:s=null,p[0]=m,p[1]=g,!0):void 0}function L(){O(),y.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),e.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),k(),v({type:"brushend"})}var C,S,f=this,g=e.select(e.event.target),v=t.of(f,arguments),y=e.select(f),b=g.datum(),x=!/^(n|s)$/.test(b)&&n,w=!/^(e|w)$/.test(b)&&i,_=g.classed("extent"),k=ce(),T=M(),E=e.select(a).on("keydown.brush",A).on("keyup.brush",$);if(e.event.changedTouches?E.on("touchmove.brush",O).on("touchend.brush",L):E.on("mousemove.brush",O).on("mouseup.brush",L),y.interrupt().selectAll("*").interrupt(),_)T[0]=r[0]-T[0],T[1]=o[0]-T[1];else if(b){var j=+/w$/.test(b),D=+/^n/.test(b);S=[r[1-j]-T[0],o[1-D]-T[1]],T[0]=r[j],T[1]=o[D]}else e.event.altKey&&(C=T.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",g.style("cursor")),v({type:"brushstart"}),O()}var s,l,t=D(d,"brushstart","brush","brushend"),n=null,i=null,r=[0,0],o=[0,0],u=!0,c=!0,f=us[0];return d.event=function(n){n.each(function(){var n=t.of(this,arguments),i={x:r,y:o,i:s,j:l},a=this.__chart__||i;this.__chart__=i,Ko?e.select(this).transition().each("start.brush",function(){s=a.i,l=a.j,r=a.x,o=a.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Nr(r,i.x),t=Nr(o,i.y);return s=l=null,function(a){r=i.x=e(a),o=i.y=t(a),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){s=i.i,l=i.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},d.x=function(e){return arguments.length?(n=e,f=us[!n<<1|!i],d):n},d.y=function(e){return arguments.length?(i=e,f=us[!n<<1|!i],d):i},d.clamp=function(e){return arguments.length?(n&&i?(u=!!e[0],c=!!e[1]):n?u=!!e:i&&(c=!!e),d):n&&i?[u,c]:n?u:i?c:null},d.extent=function(e){var t,a,u,c,f;return arguments.length?(n&&(t=e[0],a=e[1],i&&(t=t[0],a=a[0]),s=[t,a],n.invert&&(t=n(t),a=n(a)),t>a&&(f=t,t=a,a=f),(t!=r[0]||a!=r[1])&&(r=[t,a])),i&&(u=e[0],c=e[1],n&&(u=u[1],c=c[1]),l=[u,c],i.invert&&(u=i(u),c=i(c)),u>c&&(f=u,u=c,c=f),(u!=o[0]||c!=o[1])&&(o=[u,c])),d):(n&&(s?(t=s[0],a=s[1]):(t=r[0],a=r[1],n.invert&&(t=n.invert(t),a=n.invert(a)),t>a&&(f=t,t=a,a=f))),i&&(l?(u=l[0],c=l[1]):(u=o[0],c=o[1],i.invert&&(u=i.invert(u),c=i.invert(c)),u>c&&(f=u,u=c,c=f))),n&&i?[[t,u],[a,c]]:n?[t,a]:i&&[u,c])},d.clear=function(){return d.empty()||(r=[0,0],o=[0,0],s=l=null),d},d.empty=function(){return!!n&&r[0]==r[1]||!!i&&o[0]==o[1]},e.rebind(d,t,"on")};var ls={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},us=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],cs=e.time={},fs=Date,ds=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];ps.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){hs.setUTCDate.apply(this._,arguments)},setDay:function(){hs.setUTCDay.apply(this._,arguments)},setFullYear:function(){hs.setUTCFullYear.apply(this._,arguments)},setHours:function(){hs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){hs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){hs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){hs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){hs.setUTCSeconds.apply(this._,arguments)},setTime:function(){hs.setTime.apply(this._,arguments)}};var hs=Date.prototype,ms="%a %b %e %X %Y",gs="%m/%d/%Y",vs="%H:%M:%S",ys=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bs=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xs=["January","February","March","April","May","June","July","August","September","October","November","December"],ws=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];cs.year=_s(function(e){return e=cs.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),cs.years=cs.year.range,cs.years.utc=cs.year.utc.range,cs.day=_s(function(e){var t=new fs(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),cs.days=cs.day.range,cs.days.utc=cs.day.utc.range,cs.dayOfYear=function(e){var t=cs.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},ds.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=cs[e]=_s(function(e){return(e=cs.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=cs.year(e).getDay();return Math.floor((cs.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});cs[e+"s"]=n.range,cs[e+"s"].utc=n.utc.range,cs[e+"OfYear"]=function(e){var n=cs.year(e).getDay();return Math.floor((cs.dayOfYear(e)+(n+t)%7)/7)}}),cs.week=cs.sunday,cs.weeks=cs.sunday.range,cs.weeks.utc=cs.sunday.utc.range,cs.weekOfYear=cs.sundayOfYear,cs.format=Cs;var js=Ss(ys),Ds=Es(ys),Ms=Ss(bs),As=Es(bs),$s=Ss(xs),Os=Es(xs),Is=Ss(ws),Ls=Es(ws),Hs=/^%/,Ps={"-":"",_:" ",0:"0"},Fs={a:function(e){return bs[e.getDay()]},A:function(e){return ys[e.getDay()]},b:function(e){return ws[e.getMonth()]},B:function(e){return xs[e.getMonth()]},c:Cs(ms),d:function(e,t){return Ns(e.getDate(),t,2)},e:function(e,t){return Ns(e.getDate(),t,2)},H:function(e,t){return Ns(e.getHours(),t,2)},I:function(e,t){return Ns(e.getHours()%12||12,t,2)},j:function(e,t){return Ns(1+cs.dayOfYear(e),t,3)},L:function(e,t){return Ns(e.getMilliseconds(),t,3)},m:function(e,t){return Ns(e.getMonth()+1,t,2)},M:function(e,t){return Ns(e.getMinutes(),t,2)},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e,t){return Ns(e.getSeconds(),t,2)},U:function(e,t){return Ns(cs.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ns(cs.mondayOfYear(e),t,2)},x:Cs(gs),X:Cs(vs),y:function(e,t){return Ns(e.getFullYear()%100,t,2)},Y:function(e,t){return Ns(e.getFullYear()%1e4,t,4)},Z:cl,"%":function(){return"%"}},Rs={a:zs,A:qs,b:Vs,B:Qs,c:Js,d:tl,e:tl,H:il,I:il,j:nl,L:ol,m:el,M:rl,p:ll,S:al,U:Ws,w:Bs,W:Us,x:Xs,X:Gs,y:Ks,Y:Ys,"%":fl},sl=/^\s*\d+/,ul=e.map({am:0,pm:1});Cs.utc=dl;var pl=dl("%Y-%m-%dT%H:%M:%S.%LZ");Cs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?hl:pl,hl.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},hl.toString=pl.toString,cs.second=_s(function(e){return new fs(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),cs.seconds=cs.second.range,cs.seconds.utc=cs.second.utc.range,cs.minute=_s(function(e){return new fs(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),cs.minutes=cs.minute.range,cs.minutes.utc=cs.minute.utc.range,cs.hour=_s(function(e){var t=e.getTimezoneOffset()/60;return new fs(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),cs.hours=cs.hour.range,cs.hours.utc=cs.hour.utc.range,cs.month=_s(function(e){return e=cs.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),cs.months=cs.month.range,cs.months.utc=cs.month.utc.range;var yl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],bl=[[cs.second,1],[cs.second,5],[cs.second,15],[cs.second,30],[cs.minute,1],[cs.minute,5],[cs.minute,15],[cs.minute,30],[cs.hour,1],[cs.hour,3],[cs.hour,6],[cs.hour,12],[cs.day,1],[cs.day,2],[cs.week,1],[cs.month,1],[cs.month,3],[cs.year,1]],xl=[[Cs("%Y"),wn],[Cs("%B"),function(e){return e.getMonth()}],[Cs("%b %d"),function(e){return 1!=e.getDate()}],[Cs("%a %d"),function(e){return e.getDay()&&1!=e.getDate()}],[Cs("%I %p"),function(e){return e.getHours()}],[Cs("%I:%M"),function(e){return e.getMinutes()}],[Cs(":%S"),function(e){return e.getSeconds()}],[Cs(".%L"),function(e){return e.getMilliseconds()}]],wl=vl(xl);bl.year=cs.year,cs.scale=function(){return ml(e.scale.linear(),bl,wl)};var _l={range:function(t,n,i){return e.range(+t,+n,i).map(gl)}},kl=bl.map(function(e){return[e[0].utc,e[1]]}),Cl=[[dl("%Y"),wn],[dl("%B"),function(e){return e.getUTCMonth()}],[dl("%b %d"),function(e){return 1!=e.getUTCDate()}],[dl("%a %d"),function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],[dl("%I %p"),function(e){return e.getUTCHours()}],[dl("%I:%M"),function(e){return e.getUTCMinutes()}],[dl(":%S"),function(e){return e.getUTCSeconds()}],[dl(".%L"),function(e){return e.getUTCMilliseconds()}]],Tl=vl(Cl);return kl.year=cs.year.utc,cs.scale.utc=function(){return ml(e.scale.linear(),kl,Tl)},e.text=dt(function(e){return e.responseText}),e.json=function(e,t){return pt(e,"application/json",Sl,t)},e.html=function(e,t){return pt(e,"text/html",El,t)},e.xml=dt(function(e){return e.responseXML}),e}();