text: function require(a,b,c){var d=require.resolve(a);if(null==d){c=c||a,b=b||"root";var e=new Error('Failed to require "'+c+'" from "'+b+'"');throw e.path=c,e.parent=b,e.require=!0,e}var f=require.modules[d];return f.exports||(f.exports={},f.client=f.component=!0,f.call(this,f.exports,require.relative(d),f)),f.exports}require.modules={},require.aliases={},require.resolve=function(a){"/"===a.charAt(0)&&(a=a.slice(1));for(var b=a+"/index.js",c=[a,a+".js",a+".json",a+"/index.js",a+"/index.json"],d=0;d<c.length;d++){var a=c[d];if(require.modules.hasOwnProperty(a))return a}return require.aliases.hasOwnProperty(b)?require.aliases[b]:void 0},require.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;d<b.length;++d)".."==b[d]?a.pop():"."!=b[d]&&""!=b[d]&&c.push(b[d]);return a.concat(c).join("/")},require.register=function(a,b){require.modules[a]=b},require.alias=function(a,b){if(!require.modules.hasOwnProperty(a))throw new Error('Failed to alias "'+a+'", it does not exist');require.aliases[b]=a},require.relative=function(a){function b(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}function c(b){var d=c.resolve(b);return require(d,a,b)}var d=require.normalize(a,"..");return c.resolve=function(c){var e=c.charAt(0);if("/"==e)return c.slice(1);if("."==e)return require.normalize(d,c);var f=a.split("/"),g=b(f,"deps")+1;return g||(g=0),c=f.slice(0,g+1).join("/")+"/deps/"+c},c.exists=function(a){return require.modules.hasOwnProperty(c.resolve(a))},c},require.register("mbostock-d3/index-browserify.js",function(a,b,c){b("./d3"),c.exports=d3,function(){delete this.d3}()}),require.register("mbostock-d3/d3.js",function(){d3=function(){function a(a){return null!=a&&!isNaN(a)}function b(a){return a.length}function c(a){for(var b=1;a*b%1;)b*=10;return b}function d(a,b){try{for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}catch(d){a.prototype=b}}function e(){}function f(){}function g(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function h(){}function i(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],d=new e;return b.on=function(b,e){var f,g=d.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),d.remove(b)),e&&c.push(d.set(b,{on:e})),a)},b}function j(){sg.event.stopPropagation(),sg.event.preventDefault()}function k(){for(var a,b=sg.event;a=b.sourceEvent;)b=a;return b}function l(a,b){function c(){a.on(b,null)}a.on(b,function(){j(),c()},!0),setTimeout(c,0)}function m(a){for(var b=new h,c=0,d=arguments.length;++c<d;)b[arguments[c]]=i(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=sg.event;e.target=a,sg.event=e,b[e.type].apply(c,d)}finally{sg.event=f}}},b}function n(a,b){var c=a.ownerSVGElement||a;if(c.createSVGPoint){var d=c.createSVGPoint();if(0>Cg&&(vg.scrollX||vg.scrollY)){c=sg.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var e=c[0][0].getScreenCTM();Cg=!(e.f||e.e),c.remove()}return Cg?(d.x=b.pageX,d.y=b.pageY):(d.x=b.clientX,d.y=b.clientY),d=d.matrixTransform(a.getScreenCTM().inverse()),[d.x,d.y]}var f=a.getBoundingClientRect();return[b.clientX-f.left-a.clientLeft,b.clientY-f.top-a.clientTop]}function o(a){for(var b=-1,c=a.length,d=[];++b<c;)d.push(a[b]);return d}function p(a){return Array.prototype.slice.call(a)}function q(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.substring(1);for(var c=0,d=Gg.length;d>c;++c){var e=Gg[c]+b;if(e in a)return e}}function r(a){return Fg(a,Ng),a}function s(a){return function(){return Jg(a,this)}}function t(a){return function(){return Kg(a,this)}}function u(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}return a=sg.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function v(a){return a.trim().replace(/\s+/g," ")}function w(a){return new RegExp("(?:^|\\s+)"+sg.requote(a)+"(?:\\s+|$)","g")}function x(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=a.trim().split(/\s+/).map(y);var e=a.length;return"function"==typeof b?d:c}function y(a){var b=w(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.getAttribute("class")||"";d?(b.lastIndex=0,b.test(e)||c.setAttribute("class",v(e+" "+a))):c.setAttribute("class",v(e.replace(b," ")))}}function z(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function A(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function B(a){return{__data__:a}}function C(a){return function(){return Mg(this,a)}}function D(a){return arguments.length||(a=sg.ascending),function(b,c){return!b-!c||a(b.__data__,c.__data__)}}function E(){}function F(a,b,c){function d(){var b=this[g];b&&(this.removeEventListener(a,b,b.$),delete this[g])}function e(){var e=i(b,Dg(arguments));d.call(this),this.addEventListener(a,this[g]=e,e.$=c),e._=b}function f(){var b,c=new RegExp("^__on([^.]+)"+sg.requote(a)+"$");for(var d in this)if(b=d.match(c)){var e=this[d];this.removeEventListener(b[1],e,e.$),delete this[d]}}var g="__on"+a,h=a.indexOf("."),i=G;h>0&&(a=a.substring(0,h));var j=Qg.get(a);return j&&(a=j,i=H),h?b?e:d:b?E:f}function G(a,b){return function(c){var d=sg.event;sg.event=c,b[0]=this.__data__;try{a.apply(this,b)}finally{sg.event=d}}}function H(a,b){var c=G(a,b);return function(a){var b=this,d=a.relatedTarget;d&&(d===b||8&d.compareDocumentPosition(b))||c.call(b,a)}}function I(a,b){for(var c=0,d=a.length;d>c;c++)for(var e,f=a[c],g=0,h=f.length;h>g;g++)(e=f[g])&&b(e,g,c);return a}function J(a){return Fg(a,Rg),a}function K(){}function L(a,b,c){return new M(a,b,c)}function M(a,b,c){this.h=a,this.s=b,this.l=c}function N(a,b,c){function d(a){return a>360?a-=360:0>a&&(a+=360),60>a?f+(g-f)*a/60:180>a?g:240>a?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a=isNaN(a)?0:(a%=360)<0?a+360:a,b=isNaN(b)?0:0>b?0:b>1?1:b,c=0>c?0:c>1?1:c,g=.5>=c?c*(1+b):c+b-c*b,f=2*c-g,cb(e(a+120),e(a),e(a-120))}function O(a){return a>0?1:0>a?-1:0}function P(a){return a>1?0:-1>a?Xg:Math.acos(a)}function Q(a){return a>1?Xg/2:-1>a?-Xg/2:Math.asin(a)}function R(a){return(Math.exp(a)-Math.exp(-a))/2}function S(a){return(Math.exp(a)+Math.exp(-a))/2}function T(a){return(a=Math.sin(a/2))*a}function U(a,b,c){return new V(a,b,c)}function V(a,b,c){this.h=a,this.c=b,this.l=c}function W(a,b,c){return isNaN(a)&&(a=0),isNaN(b)&&(b=0),X(c,Math.cos(a*=$g)*b,Math.sin(a)*b)}function X(a,b,c){return new Y(a,b,c)}function Y(a,b,c){this.l=a,this.a=b,this.b=c}function Z(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=_(e)*ch,d=_(d)*dh,f=_(f)*eh,cb(bb(3.2404542*e-1.5371385*d-.4985314*f),bb(-.969266*e+1.8760108*d+.041556*f),bb(.0556434*e-.2040259*d+1.0572252*f))}function $(a,b,c){return a>0?U(Math.atan2(c,b)*_g,Math.sqrt(b*b+c*c),a):U(0/0,0/0,a)}function _(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function ab(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function bb(a){return Math.round(255*(.00304>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function cb(a,b,c){return new db(a,b,c)}function db(a,b,c){this.r=a,this.g=b,this.b=c}function eb(a){return 16>a?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function fb(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/i.exec(a))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(jb(e[0]),jb(e[1]),jb(e[2]))}return(f=hh.get(a))?b(f.r,f.g,f.b):(null!=a&&"#"===a.charAt(0)&&(4===a.length?(g=a.charAt(1),g+=g,h=a.charAt(2),h+=h,i=a.charAt(3),i+=i):7===a.length&&(g=a.substring(1,3),h=a.substring(3,5),i=a.substring(5,7)),g=parseInt(g,16),h=parseInt(h,16),i=parseInt(i,16)),b(g,h,i))}function gb(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=.5>i?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(c>b?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):(d=0/0,e=i>0&&1>i?0:d),L(d,e,i)}function hb(a,b,c){a=ib(a),b=ib(b),c=ib(c);var d=ab((.4124564*a+.3575761*b+.1804375*c)/ch),e=ab((.2126729*a+.7151522*b+.072175*c)/dh),f=ab((.0193339*a+.119192*b+.9503041*c)/eh);return X(116*e-16,500*(d-e),200*(e-f))}function ib(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function jb(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function kb(a){return"function"==typeof a?a:function(){return a}}function lb(a){return a}function mb(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=null),nb(b,c,a,d)}}function nb(a,b,c,d){function e(){var a,b=i.status;if(!b&&i.responseText||b>=200&&300>b||304===b){try{a=c.call(f,i)}catch(d){return g.error.call(f,d),void 0}g.load.call(f,a)}else g.error.call(f,i)}var f={},g=sg.dispatch("progress","load","error"),h={},i=new XMLHttpRequest,j=null;return!vg.XDomainRequest||"withCredentials"in i||!/^(http(s)?:)?\/\//.test(a)||(i=new XDomainRequest),"onload"in i?i.onload=i.onerror=e:i.onreadystatechange=function(){i.readyState>3&&e()},i.onprogress=function(a){var b=sg.event;sg.event=a;try{g.progress.call(f,i)}finally{sg.event=b}},f.header=function(a,b){return a=(a+"").toLowerCase(),arguments.length<2?h[a]:(null==b?delete h[a]:h[a]=b+"",f)},f.mimeType=function(a){return arguments.length?(b=null==a?null:a+"",f):b},f.responseType=function(a){return arguments.length?(j=a,f):j},f.response=function(a){return c=a,f},["get","post"].forEach(function(a){f[a]=function(){return f.send.apply(f,[a].concat(Dg(arguments)))}}),f.send=function(c,d,e){if(2===arguments.length&&"function"==typeof d&&(e=d,d=null),i.open(c,a,!0),null==b||"accept"in h||(h.accept=b+",*/*"),i.setRequestHeader)for(var g in h)i.setRequestHeader(g,h[g]);return null!=b&&i.overrideMimeType&&i.overrideMimeType(b),null!=j&&(i.responseType=j),null!=e&&f.on("error",e).on("load",function(a){e(null,a)}),i.send(null==d?null:d),f},f.abort=function(){return i.abort(),f},sg.rebind(f,g,"on"),null==d?f:f.get(ob(d))}function ob(a){return 1===a.length?function(b,c){a(null==b?c:null)}:a}function pb(){var a=qb(),b=rb()-a;b>24?(isFinite(b)&&(clearTimeout(lh),lh=setTimeout(pb,b)),kh=0):(kh=1,mh(pb))}function qb(){for(var a=Date.now(),b=ih;b;)a>=b.time&&(b.flush=b.callback(a-b.time)),b=b.next;return a}function rb(){for(var a,b=ih,c=1/0;b;)b.flush?b=a?a.next=b.next:ih=b.next:(b.time<c&&(c=b.time),b=(a=b).next);return jh=a,c}function sb(a,b){var c=Math.pow(10,3*Math.abs(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function tb(a,b){return b-(a?Math.ceil(Math.log(a)/Math.LN10):1)}function ub(a){return a+""}function vb(){}function wb(a,b,c){var d=c.s=a+b,e=d-a,f=d-e;c.t=a-f+(b-e)}function xb(a,b){a&&xh.hasOwnProperty(a.type)&&xh[a.type](a,b)}function yb(a,b,c){var d,e=-1,f=a.length-c;for(b.lineStart();++e<f;)d=a[e],b.point(d[0],d[1]);b.lineEnd()}function zb(a,b){var c=-1,d=a.length;for(b.polygonStart();++c<d;)yb(a[c],b,1);b.polygonEnd()}function Ab(){function a(a,b){a*=$g,b=b*$g/2+Xg/4;var c=a-d,g=Math.cos(b),h=Math.sin(b),i=f*h,j=e*g+i*Math.cos(c),k=i*Math.sin(c);zh.add(Math.atan2(k,j)),d=a,e=g,f=h}var b,c,d,e,f;Ah.point=function(g,h){Ah.point=a,d=(b=g)*$g,e=Math.cos(h=(c=h)*$g/2+Xg/4),f=Math.sin(h)},Ah.lineEnd=function(){a(b,c)}}function Bb(a){var b=a[0],c=a[1],d=Math.cos(c);return[d*Math.cos(b),d*Math.sin(b),Math.sin(c)]}function Cb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function Db(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function Eb(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function Fb(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function Gb(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function Hb(a){return[Math.atan2(a[1],a[0]),Q(a[2])]}function Ib(a,b){return Math.abs(a[0]-b[0])<Yg&&Math.abs(a[1]-b[1])<Yg}function Jb(a,b){a*=$g;var c=Math.cos(b*=$g);Kb(c*Math.cos(a),c*Math.sin(a),Math.sin(b))}function Kb(a,b,c){++Bh,Dh+=(a-Dh)/Bh,Eh+=(b-Eh)/Bh,Fh+=(c-Fh)/Bh}function Lb(){function a(a,e){a*=$g;var f=Math.cos(e*=$g),g=f*Math.cos(a),h=f*Math.sin(a),i=Math.sin(e),j=Math.atan2(Math.sqrt((j=c*i-d*h)*j+(j=d*g-b*i)*j+(j=b*h-c*g)*j),b*g+c*h+d*i);Ch+=j,Gh+=j*(b+(b=g)),Hh+=j*(c+(c=h)),Ih+=j*(d+(d=i)),Kb(b,c,d)}var b,c,d;Mh.point=function(e,f){e*=$g;var g=Math.cos(f*=$g);b=g*Math.cos(e),c=g*Math.sin(e),d=Math.sin(f),Mh.point=a,Kb(b,c,d)}}function Mb(){Mh.point=Jb}function Nb(){function a(a,b){a*=$g;var c=Math.cos(b*=$g),g=c*Math.cos(a),h=c*Math.sin(a),i=Math.sin(b),j=e*i-f*h,k=f*g-d*i,l=d*h-e*g,m=Math.sqrt(j*j+k*k+l*l),n=d*g+e*h+f*i,o=m&&-P(n)/m,p=Math.atan2(m,n);Jh+=o*j,Kh+=o*k,Lh+=o*l,Ch+=p,Gh+=p*(d+(d=g)),Hh+=p*(e+(e=h)),Ih+=p*(f+(f=i)),Kb(d,e,f)}var b,c,d,e,f;Mh.point=function(g,h){b=g,c=h,Mh.point=a,g*=$g;var i=Math.cos(h*=$g);d=i*Math.cos(g),e=i*Math.sin(g),f=Math.sin(h),Kb(d,e,f)},Mh.lineEnd=function(){a(b,c),Mh.lineEnd=Mb,Mh.point=Jb}}function Ob(){return!0}function Pb(a,b,c,d,e){var f=[],g=[];if(a.forEach(function(a){if(!((b=a.length-1)<=0)){var b,c=a[0],d=a[b];if(Ib(c,d)){e.lineStart();for(var h=0;b>h;++h)e.point((c=a[h])[0],c[1]);return e.lineEnd(),void 0}var i={point:c,points:a,other:null,visited:!1,entry:!0,subject:!0},j={point:c,points:[c],other:i,visited:!1,entry:!1,subject:!1};i.other=j,f.push(i),g.push(j),i={point:d,points:[d],other:null,visited:!1,entry:!1,subject:!0},j={point:d,points:[d],other:i,visited:!1,entry:!0,subject:!1},i.other=j,f.push(i),g.push(j)}}),g.sort(b),Qb(f),Qb(g),f.length){if(c)for(var h=1,i=!c(g[0].point),j=g.length;j>h;++h)g[h].entry=i=!i;for(var k,l,m,n=f[0];;){for(k=n;k.visited;)if((k=k.next)===n)return;l=k.points,e.lineStart();do{if(k.visited=k.other.visited=!0,k.entry){if(k.subject)for(var h=0;h<l.length;h++)e.point((m=l[h])[0],m[1]);else d(k.point,k.next.point,1,e);k=k.next}else{if(k.subject){l=k.prev.points;for(var h=l.length;--h>=0;)e.point((m=l[h])[0],m[1])}else d(k.point,k.prev.point,-1,e);k=k.prev}k=k.other,l=k.points}while(!k.visited);e.lineEnd()}}}function Qb(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d<b;)e.next=c=a[d],c.prev=e,e=c;e.next=c=a[0],c.prev=e}}function Rb(a,b,c,d){return function(e){function f(b,c){a(b,c)&&e.point(b,c)}function g(a,b){p.point(a,b)}function h(){q.point=g,p.lineStart()}function i(){q.point=f,p.lineEnd()}function j(a,b){s.point(a,b),o.push([a,b])}function k(){s.lineStart(),o=[]}function l(){j(o[0][0],o[0][1]),s.lineEnd();var a,b=s.clean(),c=r.buffer(),d=c.length;if(o.pop(),n.push(o),o=null,d){if(1&b){a=c[0];var f,d=a.length-1,g=-1;for(e.lineStart();++g<d;)e.point((f=a[g])[0],f[1]);return e.lineEnd(),void 0}d>1&&2&b&&c.push(c.pop().concat(c.shift())),m.push(c.filter(Sb))}}var m,n,o,p=b(e),q={point:f,lineStart:h,lineEnd:i,polygonStart:function(){q.point=j,q.lineStart=k,q.lineEnd=l,m=[],n=[],e.polygonStart()},polygonEnd:function(){q.point=f,q.lineStart=h,q.lineEnd=i,m=sg.merge(m),m.length?Pb(m,Ub,null,c,e):d(n)&&(e.lineStart(),c(null,null,1,e),e.lineEnd()),e.polygonEnd(),m=n=null},sphere:function(){e.polygonStart(),e.lineStart(),c(null,null,1,e),e.lineEnd(),e.polygonEnd()}},r=Tb(),s=b(r);return q}}function Sb(a){return a.length>1}function Tb(){var a,b=[];return{lineStart:function(){b.push(a=[])},point:function(b,c){a.push([b,c])},lineEnd:E,buffer:function(){var c=b;return b=[],a=null,c},rejoin:function(){b.length>1&&b.push(b.pop().concat(b.shift()))}}}function Ub(a,b){return((a=a.point)[0]<0?a[1]-Xg/2-Yg:Xg/2-a[1])-((b=b.point)[0]<0?b[1]-Xg/2-Yg:Xg/2-b[1])}function Vb(a,b){var c=a[0],d=a[1],e=[Math.sin(c),-Math.cos(c),0],f=0,g=!1,h=!1,i=0;zh.reset();for(var j=0,k=b.length;k>j;++j){var l=b[j],m=l.length;if(m){for(var n=l[0],o=n[0],p=n[1]/2+Xg/4,q=Math.sin(p),r=Math.cos(p),s=1;;){s===m&&(s=0),a=l[s];var t=a[0],u=a[1]/2+Xg/4,v=Math.sin(u),w=Math.cos(u),x=t-o,y=Math.abs(x)>Xg,z=q*v;if(zh.add(Math.atan2(z*Math.sin(x),r*w+z*Math.cos(x))),Math.abs(u)<Yg&&(h=!0),f+=y?x+(x>=0?2:-2)*Xg:x,y^o>=c^t>=c){var A=Db(Bb(n),Bb(a));Gb(A);var B=Db(e,A);Gb(B);var C=(y^x>=0?-1:1)*Q(B[2]);d>C&&(i+=y^x>=0?1:-1)}if(!s++)break;o=t,q=v,r=w,n=a}Math.abs(f)>Yg&&(g=!0)}}return(!h&&!g&&0>zh||-Yg>f)^1&i}function Wb(a){var b,c=0/0,d=0/0,e=0/0;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Xg:-Xg,i=Math.abs(f-c);Math.abs(i-Xg)<Yg?(a.point(c,d=(d+g)/2>0?Xg/2:-Xg/2),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Xg&&(Math.abs(c-e)<Yg&&(c-=e*Yg),Math.abs(f-h)<Yg&&(f-=h*Yg),d=Xb(c,d,f,g),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),b=0),a.point(c=f,d=g),e=h},lineEnd:function(){a.lineEnd(),c=d=0/0},clean:function(){return 2-b}}}function Xb(a,b,c,d){var e,f,g=Math.sin(a-c);return Math.abs(g)>Yg?Math.atan((Math.sin(b)*(f=Math.cos(d))*Math.sin(c)-Math.sin(d)*(e=Math.cos(b))*Math.sin(a))/(e*f*g)):(b+d)/2}function Yb(a,b,c,d){var e;if(null==a)e=c*Xg/2,d.point(-Xg,e),d.point(0,e),d.point(Xg,e),d.point(Xg,0),d.point(Xg,-e),d.point(0,-e),d.point(-Xg,-e),d.point(-Xg,0),d.point(-Xg,e);else if(Math.abs(a[0]-b[0])>Yg){var f=(a[0]<b[0]?1:-1)*Xg;e=c*f/2,d.point(-f,e),d.point(0,e),d.point(f,e)}else d.point(b[0],b[1])}function Zb(a){return Vb(Oh,a)}function $b(a){function b(a,b){return Math.cos(a)*Math.cos(b)>g}function c(a){var c,f,g,i,k;return{lineStart:function(){i=g=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=h?p?0:e(l,m):p?e(l+(0>l?Xg:-Xg),m):0;if(!c&&(i=g=p)&&a.lineStart(),p!==g&&(n=d(c,o),(Ib(c,n)||Ib(o,n))&&(o[0]+=Yg,o[1]+=Yg,p=b(o[0],o[1]))),p!==g)k=0,p?(a.lineStart(),n=d(o,c),a.point(n[0],n[1])):(n=d(c,o),a.point(n[0],n[1]),a.lineEnd()),c=n;else if(j&&c&&h^p){var r;q&f||!(r=d(o,c,!0))||(k=0,h?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||c&&Ib(c,o)||a.point(o[0],o[1]),c=o,g=p,f=q},lineEnd:function(){g&&a.lineEnd(),c=null},clean:function(){return k|(i&&g)<<1}}}function d(a,b,c){var d=Bb(a),e=Bb(b),f=[1,0,0],h=Db(d,e),i=Cb(h,h),j=h[0],k=i-j*j;if(!k)return!c&&a;var l=g*i/k,m=-g*j/k,n=Db(f,h),o=Fb(f,l),p=Fb(h,m);Eb(o,p);var q=n,r=Cb(o,q),s=Cb(q,q),t=r*r-s*(Cb(o,o)-1);if(!(0>t)){var u=Math.sqrt(t),v=Fb(q,(-r-u)/s);if(Eb(v,o),v=Hb(v),!c)return v;var w,x=a[0],y=b[0],z=a[1],A=b[1];x>y&&(w=x,x=y,y=w);var B=y-x,C=Math.abs(B-Xg)<Yg,D=C||Yg>B;if(!C&&z>A&&(w=z,z=A,A=w),D?C?z+A>0^v[1]<(Math.abs(v[0]-x)<Yg?z:A):z<=v[1]&&v[1]<=A:B>Xg^(x<=v[0]&&v[0]<=y)){var E=Fb(q,(-r+u)/s);return Eb(E,o),[v,Hb(E)]}}}function e(b,c){var d=h?a:Xg-a,e=0;return-d>b?e|=1:b>d&&(e|=2),-d>c?e|=4:c>d&&(e|=8),e}function f(a){return Vb(i,a)}var g=Math.cos(a),h=g>0,i=[a,0],j=Math.abs(g)>Yg,k=xc(a,6*$g);return Rb(b,c,k,f)}function _b(a,b,c,d){function e(d,e){return Math.abs(d[0]-a)<Yg?e>0?0:3:Math.abs(d[0]-c)<Yg?e>0?2:1:Math.abs(d[1]-b)<Yg?e>0?1:0:e>0?3:2}function f(a,b){return g(a.point,b.point)}function g(a,b){var c=e(a,1),d=e(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}function h(e,f){var g=f[0]-e[0],h=f[1]-e[1],i=[0,1];return Math.abs(g)<Yg&&Math.abs(h)<Yg?a<=e[0]&&e[0]<=c&&b<=e[1]&&e[1]<=d:ac(a-e[0],g,i)&&ac(e[0]-c,-g,i)&&ac(b-e[1],h,i)&&ac(e[1]-d,-h,i)?(i[1]<1&&(f[0]=e[0]+i[1]*g,f[1]=e[1]+i[1]*h),i[0]>0&&(e[0]+=i[0]*g,e[1]+=i[0]*h),!0):!1}return function(i){function j(f){var g=e(f,-1),h=k([0===g||3===g?a:c,g>1?d:b]);return h}function k(a){for(var b=0,c=t.length,d=a[1],e=0;c>e;++e)for(var f,g=1,h=t[e],i=h.length,j=h[0];i>g;++g)f=h[g],j[1]<=d?f[1]>d&&l(j,f,a)>0&&++b:f[1]<=d&&l(j,f,a)<0&&--b,j=f;return 0!==b}function l(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])}function m(f,h,i,j){var k=0,l=0;if(null==f||(k=e(f,i))!==(l=e(h,i))||g(f,h)<0^i>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+i+4)%4)!==l)}else j.point(h[0],h[1])}function n(e,f){return e>=a&&c>=e&&f>=b&&d>=f}function o(a,b){n(a,b)&&i.point(a,b)}function p(){E.point=r,t&&t.push(u=[]),B=!0,A=!1,y=z=0/0}function q(){s&&(r(v,w),x&&A&&D.rejoin(),s.push(D.buffer())),E.point=o,A&&i.lineEnd()}function r(a,b){a=Math.max(-Ph,Math.min(Ph,a)),b=Math.max(-Ph,Math.min(Ph,b));var c=n(a,b);if(t&&u.push([a,b]),B)v=a,w=b,x=c,B=!1,c&&(i.lineStart(),i.point(a,b));else if(c&&A)i.point(a,b);else{var d=[y,z],e=[a,b];h(d,e)?(A||(i.lineStart(),i.point(d[0],d[1])),i.point(e[0],e[1]),c||i.lineEnd()):c&&(i.lineStart(),i.point(a,b))}y=a,z=b,A=c}var s,t,u,v,w,x,y,z,A,B,C=i,D=Tb(),E={point:o,lineStart:p,lineEnd:q,polygonStart:function(){i=D,s=[],t=[]},polygonEnd:function(){i=C,(s=sg.merge(s)).length?(i.polygonStart(),Pb(s,f,j,m,i),i.polygonEnd()):k([a,b])&&(i.polygonStart(),i.lineStart(),m(null,null,1,i),i.lineEnd(),i.polygonEnd()),s=t=u=null}};return E}}function ac(a,b,c){if(Math.abs(b)<Yg)return 0>=a;var d=a/b;if(b>0){if(d>c[1])return!1;d>c[0]&&(c[0]=d)}else{if(d<c[0])return!1;d<c[1]&&(c[1]=d)}return!0}function bc(a,b){function c(c,d){return c=a(c,d),b(c[0],c[1])}return a.invert&&b.invert&&(c.invert=function(c,d){return c=b.invert(c,d),c&&a.invert(c[0],c[1])}),c}function cc(a){var b=0,c=Xg/3,d=qc(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Xg/180,c=a[1]*Xg/180):[180*(b/Xg),180*(c/Xg)]},e}function dc(a,b){function c(a,b){var c=Math.sqrt(f-2*e*Math.sin(b))/e;return[c*Math.sin(a*=e),g-c*Math.cos(a)]}var d=Math.sin(a),e=(d+Math.sin(b))/2,f=1+d*(2*e-d),g=Math.sqrt(f)/e;return c.invert=function(a,b){var c=g-b;return[Math.atan2(a,c)/e,Q((f-(a*a+c*c)*e*e)/(2*e))]},c}function ec(){function a(a,b){Rh+=e*a-d*b,d=a,e=b}var b,c,d,e;Wh.point=function(f,g){Wh.point=a,b=d=f,c=e=g},Wh.lineEnd=function(){a(b,c)}}function fc(a,b){Sh>a&&(Sh=a),a>Uh&&(Uh=a),Th>b&&(Th=b),b>Vh&&(Vh=b)}function gc(){function a(a,b){g.push("M",a,",",b,f)}function b(a,b){g.push("M",a,",",b),h.point=c}function c(a,b){g.push("L",a,",",b)}function d(){h.point=a}function e(){g.push("Z")}var f=hc(4.5),g=[],h={point:a,lineStart:function(){h.point=b},lineEnd:d,polygonStart:function(){h.lineEnd=e},polygonEnd:function(){h.lineEnd=d,h.point=a},pointRadius:function(a){return f=hc(a),h},result:function(){if(g.length){var a=g.join("");return g=[],a}}};return h}function hc(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function ic(a,b){Dh+=a,Eh+=b,++Fh}function jc(){function a(a,d){var e=a-b,f=d-c,g=Math.sqrt(e*e+f*f);Gh+=g*(b+a)/2,Hh+=g*(c+d)/2,Ih+=g,ic(b=a,c=d)}var b,c;Yh.point=function(d,e){Yh.point=a,ic(b=d,c=e)}}function kc(){Yh.point=ic}function lc(){function a(a,b){var c=a-d,f=b-e,g=Math.sqrt(c*c+f*f);Gh+=g*(d+a)/2,Hh+=g*(e+b)/2,Ih+=g,g=e*a-d*b,Jh+=g*(d+a),Kh+=g*(e+b),Lh+=3*g,ic(d=a,e=b)}var b,c,d,e;Yh.point=function(f,g){Yh.point=a,ic(b=d=f,c=e=g)},Yh.lineEnd=function(){a(b,c)}}function mc(a){function b(b,c){a.moveTo(b,c),a.arc(b,c,g,0,2*Xg)}function c(b,c){a.moveTo(b,c),h.point=d}function d(b,c){a.lineTo(b,c)}function e(){h.point=b}function f(){a.closePath()}var g=4.5,h={point:b,lineStart:function(){h.point=c},lineEnd:e,polygonStart:function(){h.lineEnd=f},polygonEnd:function(){h.lineEnd=e,h.point=b},pointRadius:function(a){return g=a,h},result:E};return h}function nc(a){function b(b){function d(c,d){c=a(c,d),b.point(c[0],c[1])}function f(){u=0/0,z.point=g,b.lineStart()}function g(d,f){var g=Bb([d,f]),h=a(d,f),i=[];c(u,v,t,w,x,y,u=h[0],v=h[1],t=d,w=g[0],x=g[1],y=g[2],e,i),l(i,b),b.point(u,v)}function h(){z.point=d,b.lineEnd()}function i(){f(),z.point=j,z.lineEnd=k}function j(a,b){g(m=a,n=b),o=u,p=v,q=w,r=x,s=y,z.point=g}function k(){var a=[];c(u,v,t,w,x,y,o,p,m,q,r,s,e,a),l(a,b),z.lineEnd=h,h()}function l(a,b){for(var c,d=0,e=a.length;e>d;++d)b.point((c=a[d])[0],c[1])}var m,n,o,p,q,r,s,t,u,v,w,x,y,z={point:d,lineStart:f,lineEnd:h,polygonStart:function(){b.polygonStart(),z.lineStart=i},polygonEnd:function(){b.polygonEnd(),z.lineStart=f}};return z}function c(b,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=j-b,s=k-e,t=r*r+s*s;if(t>4*d&&p--){var u=g+m,v=h+n,w=i+o,x=Math.sqrt(u*u+v*v+w*w),y=Math.asin(w/=x),z=Math.abs(Math.abs(w)-1)<Yg?(f+l)/2:Math.atan2(v,u),A=a(z,y),B=A[0],C=A[1],D=B-b,E=C-e,F=s*D-r*E,G=!1;if(F*F/t>d||Math.abs((r*D+s*E)/t-.5)>.3||(G=D*D+E*E>256*d)){var H=c(b,e,f,g,h,i,B,C,z,u/=x,v/=x,w,p,q);q.push(A);var I=c(B,C,z,u,v,w,j,k,l,m,n,o,p,q);return!G||H||I||(q.pop(),!1)}}}var d=.5,e=16;return b.precision=function(a){return arguments.length?(e=(d=a*a)>0&&16,b):Math.sqrt(d)},b}function oc(a){var b=nc(function(b,c){return a([b*_g,c*_g])});return function(a){return a=b(a),{point:function(b,c){a.point(b*$g,c*$g)},sphere:function(){a.sphere()},lineStart:function(){a.lineStart()},lineEnd:function(){a.lineEnd()},polygonStart:function(){a.polygonStart()},polygonEnd:function(){a.polygonEnd()}}}}function pc(a){return qc(function(){return a})()}function qc(a){function b(a){return a=h(a[0]*$g,a[1]*$g),[a[0]*m+i,j-a[1]*m]}function c(a){return a=h.invert((a[0]-i)/m,(j-a[1])/m),a&&[a[0]*_g,a[1]*_g]}function d(){h=bc(g=tc(r,s,t),f);var a=f(p,q);return i=n-a[0]*m,j=o+a[1]*m,e()}function e(){return k&&(k.valid=!1,k=null),b}var f,g,h,i,j,k,l=nc(function(a,b){return a=f(a,b),[a[0]*m+i,j-a[1]*m]}),m=150,n=480,o=250,p=0,q=0,r=0,s=0,t=0,u=Nh,v=lb,w=null,x=null;return b.stream=function(a){return k&&(k.valid=!1),k=rc(g,u(l(v(a)))),k.valid=!0,k},b.clipAngle=function(a){return arguments.length?(u=null==a?(w=a,Nh):$b((w=+a)*$g),e()):w},b.clipExtent=function(a){return arguments.length?(x=a,v=null==a?lb:_b(a[0][0],a[0][1],a[1][0],a[1][1]),e()):x},b.scale=function(a){return arguments.length?(m=+a,d()):m},b.translate=function(a){return arguments.length?(n=+a[0],o=+a[1],d()):[n,o]},b.center=function(a){return arguments.length?(p=a[0]%360*$g,q=a[1]%360*$g,d()):[p*_g,q*_g]},b.rotate=function(a){return arguments.length?(r=a[0]%360*$g,s=a[1]%360*$g,t=a.length>2?a[2]%360*$g:0,d()):[r*_g,s*_g,t*_g]},sg.rebind(b,l,"precision"),function(){return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function rc(a,b){return{point:function(c,d){d=a(c*$g,d*$g),c=d[0],b.point(c>Xg?c-2*Xg:-Xg>c?c+2*Xg:c,d[1])},sphere:function(){b.sphere()},lineStart:function(){b.lineStart()},lineEnd:function(){b.lineEnd()},polygonStart:function(){b.polygonStart()},polygonEnd:function(){b.polygonEnd()}}}function sc(a,b){return[a,b]}function tc(a,b,c){return a?b||c?bc(vc(a),wc(b,c)):vc(a):b||c?wc(b,c):sc}function uc(a){return function(b,c){return b+=a,[b>Xg?b-2*Xg:-Xg>b?b+2*Xg:b,c]}}function vc(a){var b=uc(a);return b.invert=uc(-a),b}function wc(a,b){function c(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*d+h*e;return[Math.atan2(i*f-k*g,h*d-j*e),Q(k*f+i*g)]}var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b);return c.invert=function(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*f-i*g;return[Math.atan2(i*f+j*g,h*d+k*e),Q(k*d-h*e)]},c}function xc(a,b){var c=Math.cos(a),d=Math.sin(a);return function(e,f,g,h){null!=e?(e=yc(c,e),f=yc(c,f),(g>0?f>e:e>f)&&(e+=2*g*Xg)):(e=a+2*g*Xg,f=a);for(var i,j=g*b,k=e;g>0?k>f:f>k;k-=j)h.point((i=Hb([c,-d*Math.cos(k),-d*Math.sin(k)]))[0],i[1])}}function yc(a,b){var c=Bb(b);c[0]-=a,Gb(c);var d=P(-c[1]);return((-c[2]<0?-d:d)+2*Math.PI-Yg)%(2*Math.PI)}function zc(a,b,c){var d=sg.range(a,b-Yg,c).concat(b);return function(a){return d.map(function(b){return[a,b]})}}function Ac(a,b,c){var d=sg.range(a,b-Yg,c).concat(b);return function(a){return d.map(function(b){return[b,a]})}}function Bc(a){return a.source}function Cc(a){return a.target}function Dc(a,b,c,d){var e=Math.cos(b),f=Math.sin(b),g=Math.cos(d),h=Math.sin(d),i=e*Math.cos(a),j=e*Math.sin(a),k=g*Math.cos(c),l=g*Math.sin(c),m=2*Math.asin(Math.sqrt(T(d-b)+e*g*T(c-a))),n=1/Math.sin(m),o=m?function(a){var b=Math.sin(a*=m)*n,c=Math.sin(m-a)*n,d=c*i+b*k,e=c*j+b*l,g=c*f+b*h;return[Math.atan2(e,d)*_g,Math.atan2(g,Math.sqrt(d*d+e*e))*_g]}:function(){return[a*_g,b*_g]};return o.distance=m,o}function Ec(){function a(a,e){var f=Math.sin(e*=$g),g=Math.cos(e),h=Math.abs((a*=$g)-b),i=Math.cos(h);Zh+=Math.atan2(Math.sqrt((h=g*Math.sin(h))*h+(h=d*f-c*g*i)*h),c*f+d*g*i),b=a,c=f,d=g}var b,c,d;$h.point=function(e,f){b=e*$g,c=Math.sin(f*=$g),d=Math.cos(f),$h.point=a},$h.lineEnd=function(){$h.point=$h.lineEnd=E}}function Fc(a,b){function c(b,c){var d=Math.cos(b),e=Math.cos(c),f=a(d*e);return[f*e*Math.sin(b),f*Math.sin(c)]}return c.invert=function(a,c){var d=Math.sqrt(a*a+c*c),e=b(d),f=Math.sin(e),g=Math.cos(e);return[Math.atan2(a*f,d*g),Math.asin(d&&c*f/d)]},c}function Gc(a,b){function c(a,b){var c=Math.abs(Math.abs(b)-Xg/2)<Yg?0:g/Math.pow(e(b),f);return[c*Math.sin(f*a),g-c*Math.cos(f*a)]}var d=Math.cos(a),e=function(a){return Math.tan(Xg/4+a/2)},f=a===b?Math.sin(a):Math.log(d/Math.cos(b))/Math.log(e(b)/e(a)),g=d*Math.pow(e(a),f)/f;return f?(c.invert=function(a,b){var c=g-b,d=O(f)*Math.sqrt(a*a+c*c);return[Math.atan2(a,c)/f,2*Math.atan(Math.pow(g/d,1/f))-Xg/2]},c):Ic}function Hc(a,b){function c(a,b){var c=f-b;return[c*Math.sin(e*a),f-c*Math.cos(e*a)]}var d=Math.cos(a),e=a===b?Math.sin(a):(d-Math.cos(b))/(b-a),f=d/e+a;return Math.abs(e)<Yg?sc:(c.invert=function(a,b){var c=f-b;return[Math.atan2(a,c)/e,f-O(e)*Math.sqrt(a*a+c*c)]},c)}function Ic(a,b){return[a,Math.log(Math.tan(Xg/4+b/2))]}function Jc(a){var b,c=pc(a),d=c.scale,e=c.translate,f=c.clipExtent;return c.scale=function(){var a=d.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.translate=function(){var a=e.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.clipExtent=function(a){var g=f.apply(c,arguments);if(g===c){if(b=null==a){var h=Xg*d(),i=e();f([[i[0]-h,i[1]-h],[i[0]+h,i[1]+h]])}}else b&&(g=null);return g},c.clipExtent(null)}function Kc(a,b){var c=Math.cos(b)*Math.sin(a);return[Math.log((1+c)/(1-c))/2,Math.atan2(Math.tan(b),Math.cos(a))]}function Lc(a){function b(b){function g(){j.push("M",f(a(k),h))}for(var i,j=[],k=[],l=-1,m=b.length,n=kb(c),o=kb(d);++l<m;)e.call(this,i=b[l],l)?k.push([+n.call(this,i,l),+o.call(this,i,l)]):k.length&&(g(),k=[]);return k.length&&g(),j.length?j.join(""):null}var c=Mc,d=Nc,e=Ob,f=Oc,g=f.key,h=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(g="function"==typeof a?f=a:(f=ei.get(a)||Oc).key,b):g},b.tension=function(a){return arguments.length?(h=a,b):h},b}function Mc(a){return a[0]}function Nc(a){return a[1]}function Oc(a){return a.join("L")}function Pc(a){return Oc(a)+"Z"}function Qc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d[0]+(d=a[b])[0])/2,"V",d[1]);return c>1&&e.push("H",d[0]),e.join("")}function Rc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function Sc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function Tc(a,b){return a.length<4?Oc(a):a[1]+Wc(a.slice(1,a.length-1),Xc(a,b))}function Uc(a,b){return a.length<3?Oc(a):a[0]+Wc((a.push(a[0]),a),Xc([a[a.length-2]].concat(a,[a[1]]),b))}function Vc(a,b){return a.length<3?Oc(a):a[0]+Wc(a,Xc(a,b))}function Wc(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return Oc(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function Xc(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);
  return d}function Yc(a){if(a.length<3)return Oc(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];for(bd(i,g,h);++b<c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),bd(i,g,h);for(b=-1;++b<2;)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),bd(i,g,h);return i.join("")}function Zc(a){if(a.length<4)return Oc(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(ad(hi,f)+","+ad(hi,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),bd(c,f,g);return c.join("")}function $c(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[ad(hi,g),",",ad(hi,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),bd(b,g,h);return b.join("")}function _c(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return Yc(a)}function ad(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function bd(a,b,c){a.push("C",ad(fi,b),",",ad(fi,c),",",ad(gi,b),",",ad(gi,c),",",ad(hi,b),",",ad(hi,c))}function cd(a,b){return(b[1]-a[1])/(b[0]-a[0])}function dd(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=cd(e,f);++b<c;)d[b]=(g+(g=cd(e=f,f=a[b+1])))/2;return d[b]=g,d}function ed(a){for(var b,c,d,e,f=[],g=dd(a),h=-1,i=a.length-1;++h<i;)b=cd(a[h],a[h+1]),Math.abs(b)<1e-6?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function fd(a){return a.length<3?Oc(a):a[0]+Wc(a,ed(a))}function gd(a,b,c,d){var e,f,g,h,i,j,k;return e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1],(k-g)*(h-f)-(i-g)*(j-f)>0}function hd(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function id(a,b,c,d){var e=a[0],f=c[0],g=b[0]-e,h=d[0]-f,i=a[1],j=c[1],k=b[1]-i,l=d[1]-j,m=(h*(i-j)-l*(e-f))/(l*g-h*k);return[e+m*g,i+m*k]}function jd(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));return b=b.l},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[ii[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;return c.c=a.x*d+a.y*e+.5*(d*d+e*e),f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e),c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f,g,h=(c.c*d.b-d.c*c.b)/e,i=(d.c*c.a-c.c*d.a)/e,j=c.region.r,k=d.region.r;j.y<k.y||j.y==k.y&&j.x<k.x?(f=a,g=c):(f=b,g=d);var l=h>=g.region.r.x;return l&&"l"===f.side||!l&&"r"===f.side?null:{x:h,y:i}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&"l"===a.side)return 1;if(!e&&"r"===a.side)return 0;if(1===c.a){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;if(!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1)),!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return"l"===a.side?i:!i},endPoint:function(a,c,d){a.ep[c]=d,a.ep[ii[c]]&&b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;g>d;d++){var h=e[d];if(!(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x))break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;d>b&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return 0===f.list.length},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;d>b;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.list.shift();for(var g,h,i,j,k,l,m,n,o,p,q,r,s,t=c.list.shift();;)if(f.empty()||(g=f.min()),t&&(f.empty()||t.y<g.y||t.y==g.y&&t.x<g.x))h=d.leftBound(t),i=d.right(h),m=d.rightRegion(h),r=e.bisect(m,t),l=d.createHalfEdge(r,"l"),d.insert(h,l),p=e.intersect(h,l),p&&(f.del(h),f.insert(h,p,e.distance(p,t))),h=l,l=d.createHalfEdge(r,"r"),d.insert(h,l),p=e.intersect(l,i),p&&f.insert(l,p,e.distance(p,t)),t=c.list.shift();else{if(f.empty())break;h=f.extractMin(),j=d.left(h),i=d.right(h),k=d.right(i),m=d.leftRegion(h),n=d.rightRegion(i),q=h.vertex,e.endPoint(h.edge,h.side,q),e.endPoint(i.edge,i.side,q),d.del(h),f.del(i),d.del(i),s="l",m.y>n.y&&(o=m,m=n,n=o,s="r"),r=e.bisect(m,n),l=d.createHalfEdge(r,s),d.insert(j,l),e.endPoint(r,ii[s],q),p=e.intersect(j,l),p&&(f.del(j),f.insert(j,p,e.distance(p,m))),p=e.intersect(l,k),p&&f.insert(l,p,e.distance(p,m))}for(h=d.right(d.leftEnd);h!=d.rightEnd;h=d.right(h))b(h.edge)}function kd(a){return a.x}function ld(a){return a.y}function md(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function nd(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&nd(a,i[0],c,d,g,h),i[1]&&nd(a,i[1],g,d,e,h),i[2]&&nd(a,i[2],c,h,g,f),i[3]&&nd(a,i[3],g,h,e,f)}}function od(a,b){a=sg.rgb(a),b=sg.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+eb(Math.round(c+f*a))+eb(Math.round(d+g*a))+eb(Math.round(e+h*a))}}function pd(a){var b=[a.a,a.b],c=[a.c,a.d],d=rd(b),e=qd(b,c),f=rd(sd(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*_g,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*_g:0}function qd(a,b){return a[0]*b[0]+a[1]*b[1]}function rd(a){var b=Math.sqrt(qd(a,a));return b&&(a[0]/=b,a[1]/=b),b}function sd(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function td(a,b){return b-=a=+a,function(c){return a+b*c}}function ud(a,b){var c,d=[],e=[],f=sg.transform(a),g=sg.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:td(h[0],i[0])},{i:3,x:td(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:td(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:td(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:td(n[0],o[0])},{i:c-2,x:td(n[1],o[1])})):(1!=o[0]||1!=o[1])&&d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}}function vd(a,b){var c,d={},e={};for(c in a)c in b?d[c]=yd(c)(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}}function wd(a,b){var c,d,e,f,g,h=0,i=0,j=[],k=[];for(a+="",b+="",ki.lastIndex=0,d=0;c=ki.exec(b);++d)c.index&&j.push(b.substring(h,i=c.index)),k.push({i:j.length,x:c[0]}),j.push(null),h=ki.lastIndex;for(h<b.length&&j.push(b.substring(h)),d=0,f=k.length;(c=ki.exec(a))&&f>d;++d)if(g=k[d],g.x==c[0]){if(g.i)if(null==j[g.i+1])for(j[g.i-1]+=g.x,j.splice(g.i,1),e=d+1;f>e;++e)k[e].i--;else for(j[g.i-1]+=g.x+j[g.i+1],j.splice(g.i,2),e=d+1;f>e;++e)k[e].i-=2;else if(null==j[g.i+1])j[g.i]=g.x;else for(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1),e=d+1;f>e;++e)k[e].i--;k.splice(d,1),f--,d--}else g.x=td(parseFloat(c[0]),parseFloat(g.x));for(;f>d;)g=k.pop(),null==j[g.i+1]?j[g.i]=g.x:(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1)),f--;return 1===j.length?null==j[0]?(g=k[0].x,function(a){return g(a)+""}):function(){return b}:function(a){for(d=0;f>d;++d)j[(g=k[d]).i]=g.x(a);return j.join("")}}function xd(a,b){for(var c,d=sg.interpolators.length;--d>=0&&!(c=sg.interpolators[d](a,b)););return c}function yd(a){return"transform"==a?ud:xd}function zd(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;h>c;++c)d.push(xd(a[c],b[c]));for(;f>c;++c)e[c]=a[c];for(;g>c;++c)e[c]=b[c];return function(a){for(c=0;h>c;++c)e[c]=d[c](a);return e}}function Ad(a){return function(b){return 0>=b?0:b>=1?1:a(b)}}function Bd(a){return function(b){return 1-a(1-b)}}function Cd(a){return function(b){return.5*(.5>b?a(2*b):2-a(2-2*b))}}function Dd(a){return a*a}function Ed(a){return a*a*a}function Fd(a){if(0>=a)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(.5>a?c:3*(a-b)+c-.75)}function Gd(a){return function(b){return Math.pow(b,a)}}function Hd(a){return 1-Math.cos(a*Xg/2)}function Id(a){return Math.pow(2,10*(a-1))}function Jd(a){return 1-Math.sqrt(1-a*a)}function Kd(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/(2*Xg)*Math.asin(1/a):(a=1,c=b/4),function(d){return 1+a*Math.pow(2,10*-d)*Math.sin(2*(d-c)*Xg/b)}}function Ld(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Md(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Nd(a,b){a=sg.hcl(a),b=sg.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.c:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:-180>f&&(f+=360),function(a){return W(c+f*a,d+g*a,e+h*a)+""}}function Od(a,b){a=sg.hsl(a),b=sg.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.s:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:-180>f&&(f+=360),function(a){return N(c+f*a,d+g*a,e+h*a)+""}}function Pd(a,b){a=sg.lab(a),b=sg.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return Z(c+f*a,d+g*a,e+h*a)+""}}function Qd(a,b){return b-=a,function(c){return Math.round(a+b*c)}}function Rd(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return(c-a)*b}}function Sd(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function Td(a){for(var b=a.source,c=a.target,d=Vd(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Ud(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Vd(a,b){if(a===b)return a;for(var c=Ud(a),d=Ud(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Wd(a){a.fixed|=2}function Xd(a){a.fixed&=-7}function Yd(a){a.fixed|=4,a.px=a.x,a.py=a.y}function Zd(a){a.fixed&=-5}function $d(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&($d(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function _d(a,b){return sg.rebind(a,b,"sort","children","value"),a.nodes=a,a.links=de,a}function ae(a){return a.children}function be(a){return a.value}function ce(a,b){return b.value-a.value}function de(a){return sg.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function ee(a){return a.x}function fe(a){return a.y}function ge(a,b,c){a.y0=b,a.y=c}function he(a){return sg.range(a.length)}function ie(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function je(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;f>c;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function ke(a){return a.reduce(le,0)}function le(a,b){return a+b[1]}function me(a,b){return ne(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ne(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function oe(a){return[sg.min(a),sg.max(a)]}function pe(a,b){return a.parent==b.parent?1:2}function qe(a){var b=a.children;return b&&b.length?b[0]:a._tree.thread}function re(a){var b,c=a.children;return c&&(b=c.length)?c[b-1]:a._tree.thread}function se(a,b){var c=a.children;if(c&&(e=c.length))for(var d,e,f=-1;++f<e;)b(d=se(c[f],b),a)>0&&(a=d);return a}function te(a,b){return a.x-b.x}function ue(a,b){return b.x-a.x}function ve(a,b){return a.depth-b.depth}function we(a,b){function c(a,d){var e=a.children;if(e&&(g=e.length))for(var f,g,h=null,i=-1;++i<g;)f=e[i],c(f,h),h=f;b(a,d)}c(a,null)}function xe(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f]._tree,b.prelim+=c,b.mod+=c,c+=b.shift+(d+=b.change)}function ye(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function ze(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function Ae(a,b){return a.value-b.value}function Be(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function Ce(a,b){a._pack_next=b,b._pack_prev=a}function De(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return.999*e*e>c*c+d*d}function Ee(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-1/0,m=1/0,n=-1/0;if(c.forEach(Fe),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],Ie(d,e,f),b(f),Be(d,f),d._pack_prev=f,Be(f,e),e=d._pack_next,g=3;j>g;g++){Ie(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(De(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!De(i,f);i=i._pack_prev,q++);o?(q>p||p==q&&e.r<d.r?Ce(d,e=h):Ce(d=i,e),g--):(Be(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;j>g;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(Ge)}}function Fe(a){a._pack_next=a._pack_prev=a}function Ge(a){delete a._pack_next,delete a._pack_prev}function He(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)He(e[f],b,c,d)}function Ie(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function Je(a){return 1+sg.max(a,function(a){return a.y})}function Ke(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function Le(a){var b=a.children;return b&&b.length?Le(b[0]):a}function Me(a){var b,c=a.children;return c&&(b=c.length)?Me(c[b-1]):a}function Ne(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Oe(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return 0>e&&(c+=e/2,e=0),0>f&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Pe(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Qe(a){return a.rangeExtent?a.rangeExtent():Pe(a.range())}function Re(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Se(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return f>g&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function Te(a){return a?{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}:ti}function Ue(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=sg.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Ve(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Ue:Re,i=d?Sd:Rd;return g=e(a,b,i,c),h=e(b,a,i,xd),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(Qd)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return $e(a,b)},f.tickFormat=function(b,c){return _e(a,b,c)},f.nice=function(b){return Xe(a,b),e()},f.copy=function(){return Ve(a,b,c,d)},e()}function We(a,b){return sg.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Xe(a,b){return Se(a,Te(b?Ze(a,b)[2]:Ye(a)))}function Ye(a){var b=Pe(a),c=b[1]-b[0];return Math.pow(10,Math.round(Math.log(c)/Math.LN10)-1)}function Ze(a,b){var c=Pe(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return.15>=f?e*=10:.35>=f?e*=5:.75>=f&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function $e(a,b){return sg.range.apply(sg,Ze(a,b))}function _e(a,b,c){var d=-Math.floor(Math.log(Ze(a,b)[2])/Math.LN10+.01);return sg.format(c?c.replace(rh,function(a,b,c,e,f,g,h,i,j,k){return[b,c,e,f,g,h,i,j||"."+(d-2*("%"===k)),k].join("")}):",."+d+"f")}function af(a,b,c,d,e){function f(b){return a(c(b))}return f.invert=function(b){return d(a.invert(b))},f.domain=function(b){return arguments.length?(b[0]<0?(c=df,d=ef):(c=bf,d=cf),a.domain((e=b.map(Number)).map(c)),f):e},f.base=function(a){return arguments.length?(b=+a,f):b},f.nice=function(){function d(a){return Math.pow(b,Math.floor(Math.log(a)/Math.log(b)))}function g(a){return Math.pow(b,Math.ceil(Math.log(a)/Math.log(b)))}return a.domain(Se(e,c===bf?{floor:d,ceil:g}:{floor:function(a){return-g(-a)},ceil:function(a){return-d(-a)}}).map(c)),f},f.ticks=function(){var e=Pe(a.domain()),f=[];if(e.every(isFinite)){var g=Math.log(b),h=Math.floor(e[0]/g),i=Math.ceil(e[1]/g),j=d(e[0]),k=d(e[1]),l=b%1?2:b;if(c===df)for(f.push(-Math.pow(b,-h));h++<i;)for(var m=l-1;m>0;m--)f.push(-Math.pow(b,-h)*m);else{for(;i>h;h++)for(var m=1;l>m;m++)f.push(Math.pow(b,h)*m);f.push(Math.pow(b,h))}for(h=0;f[h]<j;h++);for(i=f.length;f[i-1]>k;i--);f=f.slice(h,i)}return f},f.tickFormat=function(a,e){if(!arguments.length)return ui;arguments.length<2?e=ui:"function"!=typeof e&&(e=sg.format(e));var g,h=Math.log(b),i=Math.max(.1,a/f.ticks().length),j=c===df?(g=-1e-12,Math.floor):(g=1e-12,Math.ceil);return function(a){return a/d(h*j(c(a)/h+g))<=i?e(a):""}},f.copy=function(){return af(a.copy(),b,c,d,e)},We(f,a)}function bf(a){return Math.log(0>a?0:a)}function cf(a){return Math.exp(a)}function df(a){return-Math.log(a>0?0:-a)}function ef(a){return-Math.exp(-a)}function ff(a,b,c){function d(b){return a(e(b))}var e=gf(b),f=gf(1/b);return d.invert=function(b){return f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain((c=b.map(Number)).map(e)),d):c},d.ticks=function(a){return $e(c,a)},d.tickFormat=function(a,b){return _e(c,a,b)},d.nice=function(a){return d.domain(Xe(c,a))},d.exponent=function(g){return arguments.length?(e=gf(b=g),f=gf(1/b),a.domain(c.map(e)),d):b},d.copy=function(){return ff(a.copy(),b,c)},We(d,a)}function gf(a){return function(b){return 0>b?-Math.pow(-b,a):Math.pow(b,a)}}function hf(a,b){function c(b){return g[((f.get(b)||f.set(b,a.push(b)))-1)%g.length]}function d(b,c){return sg.range(a.length).map(function(a){return b+c*a})}var f,g,h;return c.domain=function(d){if(!arguments.length)return a;a=[],f=new e;for(var g,h=-1,i=d.length;++h<i;)f.has(g=d[h])||f.set(g,a.push(g));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(g=a,h=0,b={t:"range",a:arguments},c):g},c.rangePoints=function(e,f){arguments.length<2&&(f=0);var i=e[0],j=e[1],k=(j-i)/(Math.max(1,a.length-1)+f);return g=d(a.length<2?(i+j)/2:i+k*f/2,k),h=0,b={t:"rangePoints",a:arguments},c},c.rangeBands=function(e,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=(l-k)/(a.length-f+2*i);return g=d(k+m*i,m),j&&g.reverse(),h=m*(1-f),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(e,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=Math.floor((l-k)/(a.length-f+2*i)),n=l-k-(a.length-f)*m;return g=d(k+Math.round(n/2),m),j&&g.reverse(),h=Math.round(m*(1-f)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return h},c.rangeExtent=function(){return Pe(b.a[0])},c.copy=function(){return hf(a,b)},c.domain(a)}function jf(a,b){function c(){var c=0,f=b.length;for(e=[];++c<f;)e[c-1]=sg.quantile(a,c/f);return d}function d(a){return isNaN(a=+a)?0/0:b[sg.bisect(e,a)]}var e;return d.domain=function(b){return arguments.length?(a=b.filter(function(a){return!isNaN(a)}).sort(sg.ascending),c()):a},d.range=function(a){return arguments.length?(b=a,c()):b},d.quantiles=function(){return e},d.copy=function(){return jf(a,b)},c()}function kf(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.copy=function(){return kf(a,b,c)},d.invertExtent=function(b){return b=c.indexOf(b),b=0>b?0/0:b/f+a,[b,b+1/f]},e()}function lf(a,b){function c(c){return b[sg.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.invertExtent=function(c){return c=b.indexOf(c),[a[c-1],a[c]]},c.copy=function(){return lf(a,b)},c}function mf(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return $e(a,b)},b.tickFormat=function(b,c){return _e(a,b,c)},b.copy=function(){return mf(a)},b}function nf(a){return a.innerRadius}function of(a){return a.outerRadius}function pf(a){return a.startAngle}function qf(a){return a.endAngle}function rf(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]+zi,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function sf(a){function b(b){function i(){p.push("M",h(a(r),l),k,j(a(q.reverse()),l),"Z")}for(var m,n,o,p=[],q=[],r=[],s=-1,t=b.length,u=kb(c),v=kb(e),w=c===d?function(){return n}:kb(d),x=e===f?function(){return o}:kb(f);++s<t;)g.call(this,m=b[s],s)?(q.push([n=+u.call(this,m,s),o=+v.call(this,m,s)]),r.push([+w.call(this,m,s),+x.call(this,m,s)])):q.length&&(i(),q=[],r=[]);return q.length&&i(),p.length?p.join(""):null}var c=Mc,d=Mc,e=0,f=Nc,g=Ob,h=Oc,i=h.key,j=h,k="L",l=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(g=a,b):g},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?h=a:(h=ei.get(a)||Oc).key,j=h.reverse||h,k=h.closed?"M":"L",b):i},b.tension=function(a){return arguments.length?(l=a,b):l},b}function tf(a){return a.radius}function uf(a){return[a.x,a.y]}function vf(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+zi;return[c*Math.cos(d),c*Math.sin(d)]}}function wf(){return 64}function xf(){return"circle"}function yf(a){var b=Math.sqrt(a/Xg);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function zf(a,b){return Fg(a,Fi),a.id=b,a}function Af(a,b,c,d){var e=a.id;return I(a,"function"==typeof c?function(a,f,g){a.__transition__[e].tween.set(b,d(c.call(a,a.__data__,f,g)))}:(c=d(c),function(a){a.__transition__[e].tween.set(b,c)}))}function Bf(a){return null==a&&(a=""),function(){this.textContent=a}}function Cf(a,b,c,d){var f=a.__transition__||(a.__transition__={active:0,count:0}),g=f[c];if(!g){var h=d.time;return g=f[c]={tween:new e,event:sg.dispatch("start","end"),time:h,ease:d.ease,delay:d.delay,duration:d.duration},++f.count,sg.timer(function(d){function e(d){return f.active>c?j():(f.active=c,m.start.call(a,k,b),g.tween.forEach(function(c,d){(d=d.call(a,k,b))&&p.push(d)}),i(d)||sg.timer(i,0,h),1)}function i(d){if(f.active!==c)return j();for(var e=(d-n)/o,g=l(e),h=p.length;h>0;)p[--h].call(a,g);return e>=1?(j(),m.end.call(a,k,b),1):void 0}function j(){return--f.count?delete f[c]:delete a.__transition__,1}var k=a.__data__,l=g.ease,m=g.event,n=g.delay,o=g.duration,p=[];return d>=n?e(d):sg.timer(e,n,h),1},0,h),g}}function Df(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function Ef(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function Ff(a,b,c){if(d=[],c&&b.length>1){for(var d,e,f,g=Pe(a.domain()),h=-1,i=b.length,j=(b[1]-b[0])/++c;++h<i;)for(e=c;--e>0;)(f=+b[h]-e*j)>=g[0]&&d.push(f);for(--h,e=0;++e<c&&(f=+b[h]+e*j)<g[1];)d.push(f)}return d}function Gf(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Hf(a,b,c){function d(b){var c=a(b),d=f(c,1);return d-b>b-c?c:d}function e(c){return b(c=a(new Mi(c-1)),1),c}function f(a,c){return b(a=new Mi(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;d>g;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;d>g;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{Mi=Gf;var d=new Gf;return d._=a,g(d,b,c)}finally{Mi=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=If(a);return i.floor=i,i.round=If(d),i.ceil=If(e),i.offset=If(f),i.range=h,a}function If(a){return function(b,c){try{Mi=Gf;var d=new Gf;return d._=b,a(d,c)._}finally{Mi=Date}}}function Jf(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;h>g;){if(d>=i)return-1;if(e=b.charCodeAt(g++),37===e){if(f=fj[b.charAt(g++)],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function Kf(a){return new RegExp("^(?:"+a.map(sg.requote).join("|")+")","i")}function Lf(a){for(var b=new e,c=-1,d=a.length;++c<d;)b.set(a[c].toLowerCase(),c);return b}function Mf(a,b,c){var d=0>a?"-":"",e=(d?-a:a)+"",f=e.length;return d+(c>f?new Array(c-f+1).join(b)+e:e)}function Nf(a,b,c){Yi.lastIndex=0;var d=Yi.exec(b.substring(c));return d?(a.w=Zi.get(d[0].toLowerCase()),c+d[0].length):-1}function Of(a,b,c){Wi.lastIndex=0;var d=Wi.exec(b.substring(c));return d?(a.w=Xi.get(d[0].toLowerCase()),c+d[0].length):-1}function Pf(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function Qf(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c));return d?(a.U=+d[0],c+d[0].length):-1}function Rf(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c));return d?(a.W=+d[0],c+d[0].length):-1}function Sf(a,b,c){aj.lastIndex=0;var d=aj.exec(b.substring(c));return d?(a.m=bj.get(d[0].toLowerCase()),c+d[0].length):-1}function Tf(a,b,c){$i.lastIndex=0;var d=$i.exec(b.substring(c));return d?(a.m=_i.get(d[0].toLowerCase()),c+d[0].length):-1}function Uf(a,b,c){return Jf(a,ej.c.toString(),b,c)}function Vf(a,b,c){return Jf(a,ej.x.toString(),b,c)}function Wf(a,b,c){return Jf(a,ej.X.toString(),b,c)}function Xf(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function Yf(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.y=Zf(+d[0]),c+d[0].length):-1}function Zf(a){return a+(a>68?1900:2e3)}function $f(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function _f(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function ag(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+3));return d?(a.j=+d[0],c+d[0].length):-1}function bg(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function cg(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function dg(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function eg(a,b,c){gj.lastIndex=0;var d=gj.exec(b.substring(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function fg(a,b,c){var d=hj.get(b.substring(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}function gg(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=~~(Math.abs(b)/60),e=Math.abs(b)%60;return c+Mf(d,"0",2)+Mf(e,"0",2)}function hg(a,b,c){cj.lastIndex=0;var d=cj.exec(b.substring(c,c+1));return d?c+d[0].length:-1}function ig(a){return a.toISOString()}function jg(a,b,c){function d(b){return a(b)}return d.invert=function(b){return kg(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(kg)},d.nice=function(a){return d.domain(Se(d.domain(),a))},d.ticks=function(c,e){var f=Pe(d.domain());if("function"!=typeof c){var g=f[1]-f[0],h=g/c,i=sg.bisect(jj,h);if(i==jj.length)return b.year(f,c);if(!i)return a.ticks(c).map(kg);Math.log(h/jj[i-1])<Math.log(jj[i]/h)&&--i,c=b[i],e=c[1],c=c[0].range}return c(f[0],new Date(+f[1]+1),e)},d.tickFormat=function(){return c},d.copy=function(){return jg(a.copy(),b,c)},We(d,a)}function kg(a){return new Date(a)}function lg(a){return function(b){for(var c=a.length-1,d=a[c];!d[1](b);)d=a[--c];return d[0](b)}}function mg(a){var b=new Date(a,0,1);return b.setFullYear(a),b}function ng(a){var b=a.getFullYear(),c=mg(b),d=mg(b+1);return b+(a-c)/(d-c)}function og(a){var b=new Date(Date.UTC(a,0,1));return b.setUTCFullYear(a),b}function pg(a){var b=a.getUTCFullYear(),c=og(b),d=og(b+1);return b+(a-c)/(d-c)}function qg(a){return JSON.parse(a.responseText)}function rg(a){var b=tg.createRange();return b.selectNode(tg.body),b.createContextualFragment(a.responseText)}var sg={version:"3.2.0"};Date.now||(Date.now=function(){return+new Date});var tg=document,ug=tg.documentElement,vg=window;try{tg.createElement("div").style.setProperty("opacity",0,"")}catch(wg){var xg=vg.CSSStyleDeclaration.prototype,yg=xg.setProperty;xg.setProperty=function(a,b,c){yg.call(this,a,b+"",c)}}sg.ascending=function(a,b){return b>a?-1:a>b?1:a>=b?0:0/0},sg.descending=function(a,b){return a>b?-1:b>a?1:b>=a?0:0/0},sg.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},sg.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},sg.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g&&(null==(c=e=a[f])||c!=c);)c=e=void 0;for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),d>e&&(e=d))}else{for(;++f<g&&(null==(c=e=b.call(a,a[f],f))||c!=c);)c=void 0;for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),d>e&&(e=d))}return[c,e]},sg.sum=function(a,b){var c,d=0,e=a.length,f=-1;if(1===arguments.length)for(;++f<e;)isNaN(c=+a[f])||(d+=c);else for(;++f<e;)isNaN(c=+b.call(a,a[f],f))||(d+=c);return d},sg.mean=function(b,c){var d,e=b.length,f=0,g=-1,h=0;if(1===arguments.length)for(;++g<e;)a(d=b[g])&&(f+=(d-f)/++h);else for(;++g<e;)a(d=c.call(b,b[g],g))&&(f+=(d-f)/++h);return h?f:void 0},sg.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=+a[d-1],f=c-d;return f?e+f*(a[d]-e):e},sg.median=function(b,c){return arguments.length>1&&(b=b.map(c)),b=b.filter(a),b.length?sg.quantile(b.sort(sg.ascending),.5):void 0},sg.bisector=function(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;a.call(b,b[f],f)<c?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;c<a.call(b,b[f],f)?e=f:d=f+1}return d}}};var zg=sg.bisector(function(a){return a});sg.bisectLeft=zg.left,sg.bisect=sg.bisectRight=zg.right,sg.shuffle=function(a){for(var b,c,d=a.length;d;)c=0|Math.random()*d--,b=a[d],a[d]=a[c],a[c]=b;return a},sg.permute=function(a,b){for(var c=[],d=-1,e=b.length;++d<e;)c[d]=a[b[d]];return c},sg.zip=function(){if(!(e=arguments.length))return[];for(var a=-1,c=sg.min(arguments,b),d=new Array(c);++a<c;)for(var e,f=-1,g=d[a]=new Array(e);++f<e;)g[f]=arguments[f][a];
  return d},sg.transpose=function(a){return sg.zip.apply(sg,a)},sg.keys=function(a){var b=[];for(var c in a)b.push(c);return b},sg.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},sg.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},sg.merge=function(a){return Array.prototype.concat.apply([],a)},sg.range=function(a,b,d){if(arguments.length<3&&(d=1,arguments.length<2&&(b=a,a=0)),1/0===(b-a)/d)throw new Error("infinite range");var e,f=[],g=c(Math.abs(d)),h=-1;if(a*=g,b*=g,d*=g,0>d)for(;(e=a+d*++h)>b;)f.push(e/g);else for(;(e=a+d*++h)<b;)f.push(e/g);return f},sg.map=function(a){var b=new e;for(var c in a)b.set(c,a[c]);return b},d(e,{has:function(a){return Ag+a in this},get:function(a){return this[Ag+a]},set:function(a,b){return this[Ag+a]=b},remove:function(a){return a=Ag+a,a in this&&delete this[a]},keys:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},values:function(){var a=[];return this.forEach(function(b,c){a.push(c)}),a},entries:function(){var a=[];return this.forEach(function(b,c){a.push({key:b,value:c})}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===Bg&&a.call(this,b.substring(1),this[b])}});var Ag="\0",Bg=Ag.charCodeAt(0);sg.nest=function(){function a(b,h,i){if(i>=g.length)return d?d.call(f,h):c?h.sort(c):h;for(var j,k,l,m,n=-1,o=h.length,p=g[i++],q=new e;++n<o;)(m=q.get(j=p(k=h[n])))?m.push(k):q.set(j,[k]);return b?(k=b(),l=function(c,d){k.set(c,a(b,d,i))}):(k={},l=function(c,d){k[c]=a(b,d,i)}),q.forEach(l),k}function b(a,c){if(c>=g.length)return a;var d=[],e=h[c++];return a.forEach(function(a,e){d.push({key:a,values:b(e,c)})}),e?d.sort(function(a,b){return e(a.key,b.key)}):d}var c,d,f={},g=[],h=[];return f.map=function(b,c){return a(c,b,0)},f.entries=function(c){return b(a(sg.map,c,0),0)},f.key=function(a){return g.push(a),f},f.sortKeys=function(a){return h[g.length-1]=a,f},f.sortValues=function(a){return c=a,f},f.rollup=function(a){return d=a,f},f},sg.set=function(a){var b=new f;if(a)for(var c=0;c<a.length;c++)b.add(a[c]);return b},d(f,{has:function(a){return Ag+a in this},add:function(a){return this[Ag+a]=!0,a},remove:function(a){return a=Ag+a,a in this&&delete this[a]},values:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===Bg&&a.call(this,b.substring(1))}}),sg.behavior={},sg.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=g(a,b,b[c]);return a},sg.dispatch=function(){for(var a=new h,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=i(a);return a},h.prototype.on=function(a,b){var c=a.indexOf("."),d="";if(c>=0&&(d=a.substring(c+1),a=a.substring(0,c)),a)return arguments.length<2?this[a].on(d):this[a].on(d,b);if(2===arguments.length){if(null==b)for(a in this)this.hasOwnProperty(a)&&this[a].on(d,null);return this}},sg.event=null,sg.mouse=function(a){return n(a,k())};var Cg=/WebKit/.test(vg.navigator.userAgent)?-1:0,Dg=p;try{Dg(ug.childNodes)[0].nodeType}catch(Eg){Dg=o}var Fg=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};sg.touches=function(a,b){return arguments.length<2&&(b=k().touches),b?Dg(b).map(function(b){var c=n(a,b);return c.identifier=b.identifier,c}):[]};var Gg=["webkit","ms","moz","Moz","o","O"],Hg=q(ug.style,"userSelect"),Ig=Hg?function(){var a=ug.style,b=a[Hg];return a[Hg]="none",function(){a[Hg]=b}}:function(a){var b=sg.select(vg).on("selectstart."+a,j);return function(){b.on("selectstart."+a,null)}};sg.behavior.drag=function(){function a(){this.on("mousedown.drag",b).on("touchstart.drag",b)}function b(){function a(){var a=g.parentNode;return null!=k?sg.touches(a).filter(function(a){return a.identifier===k})[0]:sg.mouse(a)}function b(){if(!g.parentNode)return e();var b=a(),c=b[0]-m[0],d=b[1]-m[1];n|=c|d,m=b,j(),h({type:"drag",x:b[0]+f[0],y:b[1]+f[1],dx:c,dy:d})}function e(){h({type:"dragend"}),n&&(j(),sg.event.target===i&&l(p,"click")),p.on(null!=k?"touchmove.drag-"+k:"mousemove.drag",null).on(null!=k?"touchend.drag-"+k:"mouseup.drag",null),o()}var f,g=this,h=c.of(g,arguments),i=sg.event.target,k=sg.event.touches?sg.event.changedTouches[0].identifier:null,m=a(),n=0,o=Ig(null!=k?"drag-"+k:"drag"),p=sg.select(vg).on(null!=k?"touchmove.drag-"+k:"mousemove.drag",b).on(null!=k?"touchend.drag-"+k:"mouseup.drag",e,!0);d?(f=d.apply(g,arguments),f=[f.x-m[0],f.y-m[1]]):f=[0,0],h({type:"dragstart"})}var c=m(a,"drag","dragstart","dragend"),d=null;return a.origin=function(b){return arguments.length?(d=b,a):d},sg.rebind(a,c,"on")};var Jg=function(a,b){return b.querySelector(a)},Kg=function(a,b){return b.querySelectorAll(a)},Lg=ug[q(ug,"matchesSelector")],Mg=function(a,b){return Lg.call(a,b)};"function"==typeof Sizzle&&(Jg=function(a,b){return Sizzle(a,b)[0]||null},Kg=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))},Mg=Sizzle.matchesSelector),sg.selection=function(){return Sg};var Ng=sg.selection.prototype=[];Ng.select=function(a){var b,c,d,e,f=[];"function"!=typeof a&&(a=s(a));for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return r(f)},Ng.selectAll=function(a){var b,c,d=[];"function"!=typeof a&&(a=t(a));for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=Dg(a.call(c,c.__data__,h))),b.parentNode=c);return r(d)};var Og={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/"};sg.ns={prefix:Og,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.substring(0,b),a=a.substring(b+1)),Og.hasOwnProperty(c)?{space:Og[c],local:a}:a}},Ng.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=sg.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(u(b,a[b]));return this}return this.each(u(a,b))},sg.requote=function(a){return a.replace(Pg,"\\$&")};var Pg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;Ng.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=a.trim().split(/^|\s+/g)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.getAttribute("class");++e<d;)if(!w(a[e]).test(b))return!1;return!0}for(b in a)this.each(x(b,a[b]));return this}return this.each(x(a,b))},Ng.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.each(z(c,a[c],b));return this}if(2>d)return vg.getComputedStyle(this.node(),null).getPropertyValue(a);c=""}return this.each(z(a,b,c))},Ng.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(A(b,a[b]));return this}return this.each(A(a,b))},Ng.text=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a}):this.node().textContent},Ng.html=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a}):this.node().innerHTML},Ng.append=function(a){function b(){return this.appendChild(tg.createElementNS(this.namespaceURI,a))}function c(){return this.appendChild(tg.createElementNS(a.space,a.local))}return a=sg.ns.qualify(a),this.select(a.local?c:b)},Ng.insert=function(a,b){function c(c,d){return this.insertBefore(tg.createElementNS(this.namespaceURI,a),b.call(this,c,d))}function d(c,d){return this.insertBefore(tg.createElementNS(a.space,a.local),b.call(this,c,d))}return a=sg.ns.qualify(a),"function"!=typeof b&&(b=s(b)),this.select(a.local?d:c)},Ng.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},Ng.data=function(a,b){function c(a,c){var d,f,g,h=a.length,l=c.length,m=Math.min(h,l),n=new Array(l),o=new Array(l),p=new Array(h);if(b){var q,r=new e,s=new e,t=[];for(d=-1;++d<h;)q=b.call(f=a[d],f.__data__,d),r.has(q)?p[d]=f:r.set(q,f),t.push(q);for(d=-1;++d<l;)q=b.call(c,g=c[d],d),(f=r.get(q))?(n[d]=f,f.__data__=g):s.has(q)||(o[d]=B(g)),s.set(q,g),r.remove(q);for(d=-1;++d<h;)r.has(t[d])&&(p[d]=a[d])}else{for(d=-1;++d<m;)f=a[d],g=c[d],f?(f.__data__=g,n[d]=f):o[d]=B(g);for(;l>d;++d)o[d]=B(c[d]);for(;h>d;++d)p[d]=a[d]}o.update=n,o.parentNode=n.parentNode=p.parentNode=a.parentNode,i.push(o),j.push(n),k.push(p)}var d,f,g=-1,h=this.length;if(!arguments.length){for(a=new Array(h=(d=this[0]).length);++g<h;)(f=d[g])&&(a[g]=f.__data__);return a}var i=J([]),j=r([]),k=r([]);if("function"==typeof a)for(;++g<h;)c(d=this[g],a.call(d,d.parentNode.__data__,g));else for(;++g<h;)c(d=this[g],a);return j.enter=function(){return i},j.exit=function(){return k},j},Ng.datum=function(a){return arguments.length?this.property("__data__",a):this.property("__data__")},Ng.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=C(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d,d.__data__,h)&&b.push(d)}return r(e)},Ng.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},Ng.sort=function(a){a=D.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},Ng.on=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b=!1);for(c in a)this.each(F(c,a[c],b));return this}if(2>d)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(F(a,b,c))};var Qg=sg.map({mouseenter:"mouseover",mouseleave:"mouseout"});Qg.forEach(function(a){"on"+a in tg&&Qg.remove(a)}),Ng.each=function(a){return I(this,function(b,c,d){a.call(b,b.__data__,c,d)})},Ng.call=function(a){var b=Dg(arguments);return a.apply(b[0]=this,b),this},Ng.empty=function(){return!this.node()},Ng.node=function(){for(var a=0,b=this.length;b>a;a++)for(var c=this[a],d=0,e=c.length;e>d;d++){var f=c[d];if(f)return f}return null},Ng.size=function(){var a=0;return this.each(function(){++a}),a};var Rg=[];sg.selection.enter=J,sg.selection.enter.prototype=Rg,Rg.append=Ng.append,Rg.insert=Ng.insert,Rg.empty=Ng.empty,Rg.node=Ng.node,Rg.call=Ng.call,Rg.size=Ng.size,Rg.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j)),c.__data__=f.__data__):b.push(null)}return r(g)},Ng.transition=function(){var a,b,c=Ci||++Gi,d=[],e=Object.create(Hi);e.time=Date.now();for(var f=-1,g=this.length;++f<g;){d.push(a=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(b=h[i])&&Cf(b,i,c,e),a.push(b)}return zf(d,c)},sg.select=function(a){var b=["string"==typeof a?Jg(a,tg):a];return b.parentNode=ug,r([b])},sg.selectAll=function(a){var b=Dg("string"==typeof a?Kg(a,tg):a);return b.parentNode=ug,r([b])};var Sg=sg.select(ug);sg.behavior.zoom=function(){function a(){this.on("mousedown.zoom",h).on("mousemove.zoom",k).on(Vg+".zoom",i).on("dblclick.zoom",n).on("touchstart.zoom",o).on("touchmove.zoom",p).on("touchend.zoom",o)}function b(a){return[(a[0]-x[0])/y,(a[1]-x[1])/y]}function c(a){return[a[0]*y+x[0],a[1]*y+x[1]]}function d(a){y=Math.max(z[0],Math.min(z[1],a))}function e(a,b){b=c(b),x[0]+=a[0]-b[0],x[1]+=a[1]-b[1]}function f(){t&&t.domain(s.range().map(function(a){return(a-x[0])/y}).map(s.invert)),v&&v.domain(u.range().map(function(a){return(a-x[1])/y}).map(u.invert))}function g(a){f(),sg.event.preventDefault(),a({type:"zoom",scale:y,translate:x})}function h(){function a(){i=1,e(sg.mouse(d),m),g(f)}function c(){i&&j(),k.on("mousemove.zoom",null).on("mouseup.zoom",null),n(),i&&sg.event.target===h&&l(k,"click.zoom")}var d=this,f=A.of(d,arguments),h=sg.event.target,i=0,k=sg.select(vg).on("mousemove.zoom",a).on("mouseup.zoom",c),m=b(sg.mouse(d)),n=Ig("zoom")}function i(){q||(q=b(sg.mouse(this))),d(Math.pow(2,.002*Tg())*y),e(sg.mouse(this),q),g(A.of(this,arguments))}function k(){q=null}function n(){var a=sg.mouse(this),c=b(a),f=Math.log(y)/Math.LN2;d(Math.pow(2,sg.event.shiftKey?Math.ceil(f)-1:Math.floor(f)+1)),e(a,c),g(A.of(this,arguments))}function o(){var a=sg.touches(this),c=Date.now();if(r=y,q={},a.forEach(function(a){q[a.identifier]=b(a)}),1===a.length){if(500>c-w){var f=a[0],h=b(a[0]);d(2*y),e(f,h),g(A.of(this,arguments))}w=c}}function p(){var a=sg.touches(this),b=a[0],c=q[b.identifier];if(f=a[1]){var f,h=q[f.identifier];b=[(b[0]+f[0])/2,(b[1]+f[1])/2],c=[(c[0]+h[0])/2,(c[1]+h[1])/2],d(sg.event.scale*r)}e(b,c),w=null,g(A.of(this,arguments))}var q,r,s,t,u,v,w,x=[0,0],y=1,z=Ug,A=m(a,"zoom");return a.translate=function(b){return arguments.length?(x=b.map(Number),f(),a):x},a.scale=function(b){return arguments.length?(y=+b,f(),a):y},a.scaleExtent=function(b){return arguments.length?(z=null==b?Ug:b.map(Number),a):z},a.x=function(b){return arguments.length?(t=b,s=b.copy(),x=[0,0],y=1,a):t},a.y=function(b){return arguments.length?(v=b,u=b.copy(),x=[0,0],y=1,a):v},sg.rebind(a,A,"on")};var Tg,Ug=[0,1/0],Vg="onwheel"in tg?(Tg=function(){return-sg.event.deltaY*(sg.event.deltaMode?120:1)},"wheel"):"onmousewheel"in tg?(Tg=function(){return sg.event.wheelDelta},"mousewheel"):(Tg=function(){return-sg.event.detail},"MozMousePixelScroll");K.prototype.toString=function(){return this.rgb()+""},sg.hsl=function(a,b,c){return 1===arguments.length?a instanceof M?L(a.h,a.s,a.l):fb(""+a,gb,L):L(+a,+b,+c)};var Wg=M.prototype=new K;Wg.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),L(this.h,this.s,this.l/a)},Wg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),L(this.h,this.s,a*this.l)},Wg.rgb=function(){return N(this.h,this.s,this.l)};var Xg=Math.PI,Yg=1e-6,Zg=Yg*Yg,$g=Xg/180,_g=180/Xg;sg.hcl=function(a,b,c){return 1===arguments.length?a instanceof V?U(a.h,a.c,a.l):a instanceof Y?$(a.l,a.a,a.b):$((a=hb((a=sg.rgb(a)).r,a.g,a.b)).l,a.a,a.b):U(+a,+b,+c)};var ah=V.prototype=new K;ah.brighter=function(a){return U(this.h,this.c,Math.min(100,this.l+bh*(arguments.length?a:1)))},ah.darker=function(a){return U(this.h,this.c,Math.max(0,this.l-bh*(arguments.length?a:1)))},ah.rgb=function(){return W(this.h,this.c,this.l).rgb()},sg.lab=function(a,b,c){return 1===arguments.length?a instanceof Y?X(a.l,a.a,a.b):a instanceof V?W(a.l,a.c,a.h):hb((a=sg.rgb(a)).r,a.g,a.b):X(+a,+b,+c)};var bh=18,ch=.95047,dh=1,eh=1.08883,fh=Y.prototype=new K;fh.brighter=function(a){return X(Math.min(100,this.l+bh*(arguments.length?a:1)),this.a,this.b)},fh.darker=function(a){return X(Math.max(0,this.l-bh*(arguments.length?a:1)),this.a,this.b)},fh.rgb=function(){return Z(this.l,this.a,this.b)},sg.rgb=function(a,b,c){return 1===arguments.length?a instanceof db?cb(a.r,a.g,a.b):fb(""+a,cb,N):cb(~~a,~~b,~~c)};var gh=db.prototype=new K;gh.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&e>b&&(b=e),c&&e>c&&(c=e),d&&e>d&&(d=e),cb(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))):cb(e,e,e)},gh.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),cb(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},gh.hsl=function(){return gb(this.r,this.g,this.b)},gh.toString=function(){return"#"+eb(this.r)+eb(this.g)+eb(this.b)};var hh=sg.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});hh.forEach(function(a,b){hh.set(a,fb(b,cb,N))}),sg.functor=kb,sg.xhr=mb(lb),sg.dsv=function(a,b){function c(a,c,f){arguments.length<3&&(f=c,c=null);var g=sg.xhr(a,b,f);return g.row=function(a){return arguments.length?g.response(null==(c=a)?d:e(a)):c},g.row(c)}function d(a){return c.parse(a.responseText)}function e(a){return function(b){return c.parse(b.responseText,a)}}function g(b){return b.map(h).join(a)}function h(a){return i.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var i=new RegExp('["'+a+"\n]"),j=a.charCodeAt(0);return c.parse=function(a,b){var d;return c.parseRows(a,function(a,c){if(d)return d(a,c-1);var e=new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+"]"}).join(",")+"}");d=b?function(a,c){return b(e(a),c)}:e})},c.parseRows=function(a,b){function c(){if(k>=i)return g;if(e)return e=!1,f;var b=k;if(34===a.charCodeAt(b)){for(var c=b;c++<i;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;++c}k=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&++k):10===d&&(e=!0),a.substring(b+1,c).replace(/""/g,'"')}for(;i>k;){var d=a.charCodeAt(k++),h=1;if(10===d)e=!0;else if(13===d)e=!0,10===a.charCodeAt(k)&&(++k,++h);else if(d!==j)continue;return a.substring(b,k-h)}return a.substring(b)}for(var d,e,f={},g={},h=[],i=a.length,k=0,l=0;(d=c())!==g;){for(var m=[];d!==f&&d!==g;)m.push(d),d=c();(!b||(m=b(m,l++)))&&h.push(m)}return h},c.format=function(b){if(Array.isArray(b[0]))return c.formatRows(b);var d=new f,e=[];return b.forEach(function(a){for(var b in a)d.has(b)||e.push(d.add(b))}),[e.map(h).join(a)].concat(b.map(function(b){return e.map(function(a){return h(b[a])}).join(a)})).join("\n")},c.formatRows=function(a){return a.map(g).join("\n")},c},sg.csv=sg.dsv(",","text/csv"),sg.tsv=sg.dsv("	","text/tab-separated-values");var ih,jh,kh,lh;sg.timer=function(a,b,c){if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}var d=c+b,e={callback:a,time:d,next:null};jh?jh.next=e:ih=e,jh=e,kh||(lh=clearTimeout(lh),kh=1,mh(pb))},sg.timer.flush=function(){qb(),rb()};var mh=vg[q(vg,"requestAnimationFrame")]||function(a){setTimeout(a,17)},nh=".",oh=",",ph=[3,3],qh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(sb);sg.formatPrefix=function(a,b){var c=0;return a&&(0>a&&(a*=-1),b&&(a=sg.round(a,tb(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((0>=c?c+1:c-1)/3)))),qh[8+c/3]},sg.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)},sg.format=function(a){var b=rh.exec(a),c=b[1]||" ",d=b[2]||">",e=b[3]||"",f=b[4]||"",g=b[5],h=+b[6],i=b[7],j=b[8],k=b[9],l=1,m="",n=!1;switch(j&&(j=+j.substring(1)),(g||"0"===c&&"="===d)&&(g=c="0",d="=",i&&(h-=Math.floor((h-1)/4))),k){case"n":i=!0,k="g";break;case"%":l=100,m="%",k="f";break;case"p":l=100,m="%",k="r";break;case"b":case"o":case"x":case"X":f&&(f="0"+k.toLowerCase());case"c":case"d":n=!0,j=0;break;case"s":l=-1,k="r"}"#"===f&&(f=""),"r"!=k||j||(k="g"),null!=j&&("g"==k?j=Math.max(1,Math.min(21,j)):("e"==k||"f"==k)&&(j=Math.max(0,Math.min(20,j)))),k=sh.get(k)||ub;var o=g&&i;return function(a){if(n&&a%1)return"";var b=0>a||0===a&&0>1/a?(a=-a,"-"):e;if(0>l){var p=sg.formatPrefix(a,j);a=p.scale(a),m=p.symbol}else a*=l;a=k(a,j),!g&&i&&(a=th(a));var q=f.length+a.length+(o?0:b.length),r=h>q?new Array(q=h-q+1).join(c):"";return o&&(a=th(r+a)),nh&&a.replace(".",nh),b+=f,("<"===d?b+a+r:">"===d?r+b+a:"^"===d?r.substring(0,q>>=1)+b+a+r.substring(q):b+(o?a:r+a))+m}};var rh=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sh=sg.map({b:function(a){return a.toString(2)},c:function(a){return String.fromCharCode(a)},o:function(a){return a.toString(8)},x:function(a){return a.toString(16)},X:function(a){return a.toString(16).toUpperCase()},g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return(a=sg.round(a,tb(a,b))).toFixed(Math.max(0,Math.min(20,tb(a*(1+1e-15),b))))}}),th=lb;if(ph){var uh=ph.length;th=function(a){for(var b=a.lastIndexOf("."),c=b>=0?"."+a.substring(b+1):(b=a.length,""),d=[],e=0,f=ph[0];b>0&&f>0;)d.push(a.substring(b-=f,b+f)),f=ph[e=(e+1)%uh];return d.reverse().join(oh||"")+c}}sg.geo={},vb.prototype={s:0,t:0,add:function(a){wb(a,this.t,vh),wb(vh.s,this.s,this),this.s?this.t+=vh.t:this.s=vh.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var vh=new vb;sg.geo.stream=function(a,b){a&&wh.hasOwnProperty(a.type)?wh[a.type](a,b):xb(a,b)};var wh={Feature:function(a,b){xb(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++d<e;)xb(c[d].geometry,b)}},xh={Sphere:function(a,b){b.sphere()},Point:function(a,b){var c=a.coordinates;b.point(c[0],c[1])},MultiPoint:function(a,b){for(var c,d=a.coordinates,e=-1,f=d.length;++e<f;)c=d[e],b.point(c[0],c[1])},LineString:function(a,b){yb(a.coordinates,b,0)},MultiLineString:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)yb(c[d],b,0)},Polygon:function(a,b){zb(a.coordinates,b)},MultiPolygon:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)zb(c[d],b)},GeometryCollection:function(a,b){for(var c=a.geometries,d=-1,e=c.length;++d<e;)xb(c[d],b)}};sg.geo.area=function(a){return yh=0,sg.geo.stream(a,Ah),yh};var yh,zh=new vb,Ah={sphere:function(){yh+=4*Xg},point:E,lineStart:E,lineEnd:E,polygonStart:function(){zh.reset(),Ah.lineStart=Ab},polygonEnd:function(){var a=2*zh;yh+=0>a?4*Xg+a:a,Ah.lineStart=Ah.lineEnd=Ah.point=E}};sg.geo.bounds=function(){function a(a,b){t.push(u=[k=a,m=a]),l>b&&(l=b),b>n&&(n=b)}function b(b,c){var d=Bb([b*$g,c*$g]);if(r){var e=Db(r,d),f=[e[1],-e[0],0],g=Db(f,e);Gb(g),g=Hb(g);var i=b-o,j=i>0?1:-1,p=g[0]*_g*j,q=Math.abs(i)>180;if(q^(p>j*o&&j*b>p)){var s=g[1]*_g;s>n&&(n=s)}else if(p=(p+360)%360-180,q^(p>j*o&&j*b>p)){var s=-g[1]*_g;l>s&&(l=s)}else l>c&&(l=c),c>n&&(n=c);q?o>b?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b):m>=k?(k>b&&(k=b),b>m&&(m=b)):b>o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b)}else a(b,c);r=d,o=b}function c(){v.point=b}function d(){u[0]=k,u[1]=m,v.point=a,r=null}function e(a,c){if(r){var d=a-o;s+=Math.abs(d)>180?d+(d>0?360:-360):d}else p=a,q=c;Ah.point(a,c),b(a,c)}function f(){Ah.lineStart()}function g(){e(p,q),Ah.lineEnd(),Math.abs(s)>Yg&&(k=-(m=180)),u[0]=k,u[1]=m,r=null}function h(a,b){return(b-=a)<0?b+360:b}function i(a,b){return a[0]-b[0]}function j(a,b){return b[0]<=b[1]?b[0]<=a&&a<=b[1]:a<b[0]||b[1]<a}var k,l,m,n,o,p,q,r,s,t,u,v={point:a,lineStart:c,lineEnd:d,polygonStart:function(){v.point=e,v.lineStart=f,v.lineEnd=g,s=0,Ah.polygonStart()},polygonEnd:function(){Ah.polygonEnd(),v.point=a,v.lineStart=c,v.lineEnd=d,0>zh?(k=-(m=180),l=-(n=90)):s>Yg?n=90:-Yg>s&&(l=-90),u[0]=k,u[1]=m}};return function(a){n=m=-(k=l=1/0),t=[],sg.geo.stream(a,v);var b=t.length;if(b){t.sort(i);for(var c,d=1,e=t[0],f=[e];b>d;++d)c=t[d],j(c[0],e)||j(c[1],e)?(h(e[0],c[1])>h(e[0],e[1])&&(e[1]=c[1]),h(c[0],e[1])>h(e[0],e[1])&&(e[0]=c[0])):f.push(e=c);for(var g,c,o=-1/0,b=f.length-1,d=0,e=f[b];b>=d;e=c,++d)c=f[d],(g=h(e[1],c[0]))>o&&(o=g,k=c[0],m=e[1])}return t=u=null,1/0===k||1/0===l?[[0/0,0/0],[0/0,0/0]]:[[k,l],[m,n]]}}(),sg.geo.centroid=function(a){Bh=Ch=Dh=Eh=Fh=Gh=Hh=Ih=Jh=Kh=Lh=0,sg.geo.stream(a,Mh);var b=Jh,c=Kh,d=Lh,e=b*b+c*c+d*d;return Zg>e&&(b=Gh,c=Hh,d=Ih,Yg>Ch&&(b=Dh,c=Eh,d=Fh),e=b*b+c*c+d*d,Zg>e)?[0/0,0/0]:[Math.atan2(c,b)*_g,Q(d/Math.sqrt(e))*_g]};var Bh,Ch,Dh,Eh,Fh,Gh,Hh,Ih,Jh,Kh,Lh,Mh={sphere:E,point:Jb,lineStart:Lb,lineEnd:Mb,polygonStart:function(){Mh.lineStart=Nb},polygonEnd:function(){Mh.lineStart=Lb}},Nh=Rb(Ob,Wb,Yb,Zb),Oh=[-Xg,0],Ph=1e9;(sg.geo.conicEqualArea=function(){return cc(dc)}).raw=dc,sg.geo.albers=function(){return sg.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},sg.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return b=null,c(f,g),b||(d(f,g),b)||e(f,g),b}var b,c,d,e,f=sg.geo.albers(),g=sg.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h=sg.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),i={point:function(a,c){b=[a,c]}};return a.invert=function(a){var b=f.scale(),c=f.translate(),d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return(e>=.12&&.234>e&&d>=-.425&&-.214>d?g:e>=.166&&.234>e&&d>=-.214&&-.115>d?h:f).invert(a)},a.stream=function(a){var b=f.stream(a),c=g.stream(a),d=h.stream(a);return{point:function(a,e){b.point(a,e),c.point(a,e),d.point(a,e)},sphere:function(){b.sphere(),c.sphere(),d.sphere()},lineStart:function(){b.lineStart(),c.lineStart(),d.lineStart()},lineEnd:function(){b.lineEnd(),c.lineEnd(),d.lineEnd()},polygonStart:function(){b.polygonStart(),c.polygonStart(),d.polygonStart()},polygonEnd:function(){b.polygonEnd(),c.polygonEnd(),d.polygonEnd()}}},a.precision=function(b){return arguments.length?(f.precision(b),g.precision(b),h.precision(b),a):f.precision()},a.scale=function(b){return arguments.length?(f.scale(b),g.scale(.35*b),h.scale(b),a.translate(f.translate())):f.scale()},a.translate=function(b){if(!arguments.length)return f.translate();var j=f.scale(),k=+b[0],l=+b[1];return c=f.translate(b).clipExtent([[k-.455*j,l-.238*j],[k+.455*j,l+.238*j]]).stream(i).point,d=g.translate([k-.307*j,l+.201*j]).clipExtent([[k-.425*j+Yg,l+.12*j+Yg],[k-.214*j-Yg,l+.234*j-Yg]]).stream(i).point,e=h.translate([k-.205*j,l+.212*j]).clipExtent([[k-.214*j+Yg,l+.166*j+Yg],[k-.115*j-Yg,l+.234*j-Yg]]).stream(i).point,a},a.scale(1070)};var Qh,Rh,Sh,Th,Uh,Vh,Wh={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Rh=0,Wh.lineStart=ec},polygonEnd:function(){Wh.lineStart=Wh.lineEnd=Wh.point=E,Qh+=Math.abs(Rh/2)}},Xh={point:fc,lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E},Yh={point:ic,lineStart:jc,lineEnd:kc,polygonStart:function(){Yh.lineStart=lc},polygonEnd:function(){Yh.point=ic,Yh.lineStart=jc,Yh.lineEnd=kc}};sg.geo.path=function(){function a(a){return a&&("function"==typeof h&&f.pointRadius(+h.apply(this,arguments)),g&&g.valid||(g=e(f)),sg.geo.stream(a,g)),f.result()}function b(){return g=null,a}var c,d,e,f,g,h=4.5;return a.area=function(a){return Qh=0,sg.geo.stream(a,e(Wh)),Qh},a.centroid=function(a){return Dh=Eh=Fh=Gh=Hh=Ih=Jh=Kh=Lh=0,sg.geo.stream(a,e(Yh)),Lh?[Jh/Lh,Kh/Lh]:Ih?[Gh/Ih,Hh/Ih]:Fh?[Dh/Fh,Eh/Fh]:[0/0,0/0]},a.bounds=function(a){return Uh=Vh=-(Sh=Th=1/0),sg.geo.stream(a,e(Xh)),[[Sh,Th],[Uh,Vh]]},a.projection=function(a){return arguments.length?(e=(c=a)?a.stream||oc(a):lb,b()):c},a.context=function(a){return arguments.length?(f=null==(d=a)?new gc:new mc(a),"function"!=typeof h&&f.pointRadius(h),b()):d},a.pointRadius=function(b){return arguments.length?(h="function"==typeof b?b:(f.pointRadius(+b),+b),a):h},a.projection(sg.geo.albersUsa()).context(null)},sg.geo.projection=pc,sg.geo.projectionMutator=qc,(sg.geo.equirectangular=function(){return pc(sc)}).raw=sc.invert=sc,sg.geo.rotation=function(a){function b(b){return b=a(b[0]*$g,b[1]*$g),b[0]*=_g,b[1]*=_g,b}return a=tc(a[0]%360*$g,a[1]*$g,a.length>2?a[2]*$g:0),b.invert=function(b){return b=a.invert(b[0]*$g,b[1]*$g),b[0]*=_g,b[1]*=_g,b},b},sg.geo.circle=function(){function a(){var a="function"==typeof d?d.apply(this,arguments):d,b=tc(-a[0]*$g,-a[1]*$g,0).invert,e=[];return c(null,null,1,{point:function(a,c){e.push(a=b(a,c)),a[0]*=_g,a[1]*=_g}}),{type:"Polygon",coordinates:[e]}}var b,c,d=[0,0],e=6;return a.origin=function(b){return arguments.length?(d=b,a):d},a.angle=function(d){return arguments.length?(c=xc((b=+d)*$g,e*$g),a):b},a.precision=function(d){return arguments.length?(c=xc(b*$g,(e=+d)*$g),a):e},a.angle(90)},sg.geo.distance=function(a,b){var c,d=(b[0]-a[0])*$g,e=a[1]*$g,f=b[1]*$g,g=Math.sin(d),h=Math.cos(d),i=Math.sin(e),j=Math.cos(e),k=Math.sin(f),l=Math.cos(f);return Math.atan2(Math.sqrt((c=l*g)*c+(c=j*k-i*l*h)*c),i*k+j*l*h)},sg.geo.graticule=function(){function a(){return{type:"MultiLineString",coordinates:b()}}function b(){return sg.range(Math.ceil(f/q)*q,e,q).map(m).concat(sg.range(Math.ceil(j/r)*r,i,r).map(n)).concat(sg.range(Math.ceil(d/o)*o,c,o).filter(function(a){return Math.abs(a%q)>Yg}).map(k)).concat(sg.range(Math.ceil(h/p)*p,g,p).filter(function(a){return Math.abs(a%r)>Yg}).map(l))}var c,d,e,f,g,h,i,j,k,l,m,n,o=10,p=o,q=90,r=360,s=2.5;return a.lines=function(){return b().map(function(a){return{type:"LineString",coordinates:a}})},a.outline=function(){return{type:"Polygon",coordinates:[m(f).concat(n(i).slice(1),m(e).reverse().slice(1),n(j).reverse().slice(1))]}},a.extent=function(b){return arguments.length?a.majorExtent(b).minorExtent(b):a.minorExtent()},a.majorExtent=function(b){return arguments.length?(f=+b[0][0],e=+b[1][0],j=+b[0][1],i=+b[1][1],f>e&&(b=f,f=e,e=b),j>i&&(b=j,j=i,i=b),a.precision(s)):[[f,j],[e,i]]},a.minorExtent=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(s)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.majorStep(b).minorStep(b):a.minorStep()},a.majorStep=function(b){return arguments.length?(q=+b[0],r=+b[1],a):[q,r]},a.minorStep=function(b){return arguments.length?(o=+b[0],p=+b[1],a):[o,p]},a.precision=function(b){return arguments.length?(s=+b,k=zc(h,g,90),l=Ac(d,c,s),m=zc(j,i,90),n=Ac(f,e,s),a):s},a.majorExtent([[-180,-90+Yg],[180,90-Yg]]).minorExtent([[-180,-80-Yg],[180,80+Yg]])},sg.geo.greatArc=function(){function a(){return{type:"LineString",coordinates:[b||d.apply(this,arguments),c||e.apply(this,arguments)]}}var b,c,d=Bc,e=Cc;return a.distance=function(){return sg.geo.distance(b||d.apply(this,arguments),c||e.apply(this,arguments))},a.source=function(c){return arguments.length?(d=c,b="function"==typeof c?null:c,a):d
  },a.target=function(b){return arguments.length?(e=b,c="function"==typeof b?null:b,a):e},a.precision=function(){return arguments.length?a:0},a},sg.geo.interpolate=function(a,b){return Dc(a[0]*$g,a[1]*$g,b[0]*$g,b[1]*$g)},sg.geo.length=function(a){return Zh=0,sg.geo.stream(a,$h),Zh};var Zh,$h={sphere:E,point:E,lineStart:Ec,lineEnd:E,polygonStart:E,polygonEnd:E},_h=Fc(function(a){return Math.sqrt(2/(1+a))},function(a){return 2*Math.asin(a/2)});(sg.geo.azimuthalEqualArea=function(){return pc(_h)}).raw=_h;var ai=Fc(function(a){var b=Math.acos(a);return b&&b/Math.sin(b)},lb);(sg.geo.azimuthalEquidistant=function(){return pc(ai)}).raw=ai,(sg.geo.conicConformal=function(){return cc(Gc)}).raw=Gc,(sg.geo.conicEquidistant=function(){return cc(Hc)}).raw=Hc;var bi=Fc(function(a){return 1/a},Math.atan);(sg.geo.gnomonic=function(){return pc(bi)}).raw=bi,Ic.invert=function(a,b){return[a,2*Math.atan(Math.exp(b))-Xg/2]},(sg.geo.mercator=function(){return Jc(Ic)}).raw=Ic;var ci=Fc(function(){return 1},Math.asin);(sg.geo.orthographic=function(){return pc(ci)}).raw=ci;var di=Fc(function(a){return 1/(1+a)},function(a){return 2*Math.atan(a)});(sg.geo.stereographic=function(){return pc(di)}).raw=di,Kc.invert=function(a,b){return[Math.atan2(R(a),Math.cos(b)),Q(Math.sin(b)/S(a))]},(sg.geo.transverseMercator=function(){return Jc(Kc)}).raw=Kc,sg.geom={},sg.svg={},sg.svg.line=function(){return Lc(lb)};var ei=sg.map({linear:Oc,"linear-closed":Pc,step:Qc,"step-before":Rc,"step-after":Sc,basis:Yc,"basis-open":Zc,"basis-closed":$c,bundle:_c,cardinal:Vc,"cardinal-open":Tc,"cardinal-closed":Uc,monotone:fd});ei.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var fi=[0,2/3,1/3,0],gi=[0,1/3,2/3,0],hi=[0,1/6,2/3,1/6];sg.geom.hull=function(a){function b(a){if(a.length<3)return[];var b,e,f,g,h,i,j,k,l,m,n,o,p=kb(c),q=kb(d),r=a.length,s=r-1,t=[],u=[],v=0;if(p===Mc&&d===Nc)b=a;else for(f=0,b=[];r>f;++f)b.push([+p.call(this,e=a[f],f),+q.call(this,e,f)]);for(f=1;r>f;++f)(b[f][1]<b[v][1]||b[f][1]==b[v][1]&&b[f][0]<b[v][0])&&(v=f);for(f=0;r>f;++f)f!==v&&(i=b[f][1]-b[v][1],h=b[f][0]-b[v][0],t.push({angle:Math.atan2(i,h),index:f}));for(t.sort(function(a,b){return a.angle-b.angle}),n=t[0].angle,m=t[0].index,l=0,f=1;s>f;++f){if(g=t[f].index,n==t[f].angle){if(h=b[m][0]-b[v][0],i=b[m][1]-b[v][1],j=b[g][0]-b[v][0],k=b[g][1]-b[v][1],h*h+i*i>=j*j+k*k){t[f].index=-1;continue}t[l].index=-1}n=t[f].angle,l=f,m=g}for(u.push(v),f=0,g=0;2>f;++g)t[g].index>-1&&(u.push(t[g].index),f++);for(o=u.length;s>g;++g)if(!(t[g].index<0)){for(;!gd(u[o-2],u[o-1],t[g].index,b);)--o;u[o++]=t[g].index}var w=[];for(f=o-1;f>=0;--f)w.push(a[u[f]]);return w}var c=Mc,d=Nc;return arguments.length?b(a):(b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b)},sg.geom.polygon=function(a){return a.area=function(){for(var b=0,c=a.length,d=a[c-1][1]*a[0][0]-a[c-1][0]*a[0][1];++b<c;)d+=a[b-1][1]*a[b][0]-a[b-1][0]*a[b][1];return.5*d},a.centroid=function(b){var c,d,e=-1,f=a.length,g=0,h=0,i=a[f-1];for(arguments.length||(b=-1/(6*a.area()));++e<f;)c=i,i=a[e],d=c[0]*i[1]-i[0]*c[1],g+=(c[0]+i[0])*d,h+=(c[1]+i[1])*d;return[g*b,h*b]},a.clip=function(b){for(var c,d,e,f,g,h,i=-1,j=a.length,k=a[j-1];++i<j;){for(c=b.slice(),b.length=0,f=a[i],g=c[(e=c.length)-1],d=-1;++d<e;)h=c[d],hd(h,k,f)?(hd(g,k,f)||b.push(id(g,h,k,f)),b.push(h)):hd(g,k,f)&&b.push(id(g,h,k,f)),g=h;k=f}return b},a},sg.geom.delaunay=function(a){var b=a.map(function(){return[]}),c=[];return jd(a,function(c){b[c.region.l.index].push(a[c.region.r.index])}),b.forEach(function(b,d){var e=a[d],f=e[0],g=e[1];b.forEach(function(a){a.angle=Math.atan2(a[0]-f,a[1]-g)}),b.sort(function(a,b){return a.angle-b.angle});for(var h=0,i=b.length-1;i>h;h++)c.push([e,b[h],b[h+1]])}),c},sg.geom.voronoi=function(a){function b(a){var b,f,g,h=a.map(function(){return[]}),i=kb(c),j=kb(d),k=a.length,l=1e6;if(i===Mc&&j===Nc)b=a;else for(b=new Array(k),g=0;k>g;++g)b[g]=[+i.call(this,f=a[g],g),+j.call(this,f,g)];if(jd(b,function(a){var b,c,d,e,f,g;1===a.a&&a.b>=0?(b=a.ep.r,c=a.ep.l):(b=a.ep.l,c=a.ep.r),1===a.a?(f=b?b.y:-l,d=a.c-a.b*f,g=c?c.y:l,e=a.c-a.b*g):(d=b?b.x:-l,f=a.c-a.a*d,e=c?c.x:l,g=a.c-a.a*e);var i=[d,f],j=[e,g];h[a.region.l.index].push(i,j),h[a.region.r.index].push(i,j)}),h=h.map(function(a,c){var d=b[c][0],e=b[c][1],f=a.map(function(a){return Math.atan2(a[0]-d,a[1]-e)}),g=sg.range(a.length).sort(function(a,b){return f[a]-f[b]});return g.filter(function(a,b){return!b||f[a]-f[g[b-1]]>Yg}).map(function(b){return a[b]})}),h.forEach(function(a,c){var d=a.length;if(!d)return a.push([-l,-l],[-l,l],[l,l],[l,-l]);if(!(d>2)){var e=b[c],f=a[0],g=a[1],h=e[0],i=e[1],j=f[0],k=f[1],m=g[0],n=g[1],o=Math.abs(m-j),p=n-k;if(Math.abs(p)<Yg){var q=k>i?-l:l;a.push([-l,q],[l,q])}else if(Yg>o){var r=j>h?-l:l;a.push([r,-l],[r,l])}else{var q=(j-h)*(n-k)>(m-j)*(k-i)?l:-l,s=Math.abs(p)-o;Math.abs(s)<Yg?a.push([0>p?q:-q,q]):(s>0&&(q*=-1),a.push([-l,q],[l,q]))}}}),e)for(g=0;k>g;++g)e.clip(h[g]);for(g=0;k>g;++g)h[g].point=a[g];return h}var c=Mc,d=Nc,e=null;return arguments.length?b(a):(b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.clipExtent=function(a){if(!arguments.length)return e&&[e[0],e[2]];if(null==a)e=null;else{var c=+a[0][0],d=+a[0][1],f=+a[1][0],g=+a[1][1];e=sg.geom.polygon([[c,d],[c,g],[f,g],[f,d]])}return b},b.size=function(a){return arguments.length?b.clipExtent(a&&[[0,0],a]):e&&e[2]},b.links=function(a){var b,e,f,g=a.map(function(){return[]}),h=[],i=kb(c),j=kb(d),k=a.length;if(i===Mc&&j===Nc)b=a;else for(b=new Array(k),f=0;k>f;++f)b[f]=[+i.call(this,e=a[f],f),+j.call(this,e,f)];return jd(b,function(b){var c=b.region.l.index,d=b.region.r.index;g[c][d]||(g[c][d]=g[d][c]=!0,h.push({source:a[c],target:a[d]}))}),h},b.triangles=function(a){if(c===Mc&&d===Nc)return sg.geom.delaunay(a);for(var b,e=new Array(i),f=kb(c),g=kb(d),h=-1,i=a.length;++h<i;)(e[h]=[+f.call(this,b=a[h],h),+g.call(this,b,h)]).data=b;return sg.geom.delaunay(e).map(function(a){return a.map(function(a){return a.data})})},b)};var ii={l:"r",r:"l"};sg.geom.quadtree=function(a,b,c,d,e){function f(a){function f(a,b,c,d,e,f,g,h){if(!isNaN(c)&&!isNaN(d))if(a.leaf){var i=a.x,k=a.y;if(null!=i)if(Math.abs(i-c)+Math.abs(k-d)<.01)j(a,b,c,d,e,f,g,h);else{var l=a.point;a.x=a.y=a.point=null,j(a,l,i,k,e,f,g,h),j(a,b,c,d,e,f,g,h)}else a.x=c,a.y=d,a.point=b}else j(a,b,c,d,e,f,g,h)}function j(a,b,c,d,e,g,h,i){var j=.5*(e+h),k=.5*(g+i),l=c>=j,m=d>=k,n=(m<<1)+l;a.leaf=!1,a=a.nodes[n]||(a.nodes[n]=md()),l?e=j:h=j,m?g=k:i=k,f(a,b,c,d,e,g,h,i)}var k,l,m,n,o,p,q,r,s,t=kb(h),u=kb(i);if(null!=b)p=b,q=c,r=d,s=e;else if(r=s=-(p=q=1/0),l=[],m=[],o=a.length,g)for(n=0;o>n;++n)k=a[n],k.x<p&&(p=k.x),k.y<q&&(q=k.y),k.x>r&&(r=k.x),k.y>s&&(s=k.y),l.push(k.x),m.push(k.y);else for(n=0;o>n;++n){var v=+t(k=a[n],n),w=+u(k,n);p>v&&(p=v),q>w&&(q=w),v>r&&(r=v),w>s&&(s=w),l.push(v),m.push(w)}var x=r-p,y=s-q;x>y?s=q+x:r=p+y;var z=md();if(z.add=function(a){f(z,a,+t(a,++n),+u(a,n),p,q,r,s)},z.visit=function(a){nd(a,z,p,q,r,s)},n=-1,null==b){for(;++n<o;)f(z,a[n],l[n],m[n],p,q,r,s);--n}else a.forEach(z.add);return l=m=a=k=null,z}var g,h=Mc,i=Nc;return(g=arguments.length)?(h=kd,i=ld,3===g&&(e=c,d=b,c=b=0),f(a)):(f.x=function(a){return arguments.length?(h=a,f):h},f.y=function(a){return arguments.length?(i=a,f):i},f.extent=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=+a[0][0],c=+a[0][1],d=+a[1][0],e=+a[1][1]),f):null==b?null:[[b,c],[d,e]]},f.size=function(a){return arguments.length?(null==a?b=c=d=e=null:(b=c=0,d=+a[0],e=+a[1]),f):null==b?null:[d-b,e-c]},f)},sg.interpolateRgb=od,sg.transform=function(a){var b=tg.createElementNS(sg.ns.prefix.svg,"g");return(sg.transform=function(a){if(null!=a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate()}return new pd(c?c.matrix:ji)})(a)},pd.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ji={a:1,b:0,c:0,d:1,e:0,f:0};sg.interpolateNumber=td,sg.interpolateTransform=ud,sg.interpolateObject=vd,sg.interpolateString=wd;var ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;sg.interpolate=xd,sg.interpolators=[function(a,b){var c=typeof b;return("string"===c?hh.has(b)||/^(#|rgb\(|hsl\()/.test(b)?od:wd:b instanceof K?od:"object"===c?Array.isArray(b)?zd:vd:td)(a,b)}],sg.interpolateArray=zd;var li=function(){return lb},mi=sg.map({linear:li,poly:Gd,quad:function(){return Dd},cubic:function(){return Ed},sin:function(){return Hd},exp:function(){return Id},circle:function(){return Jd},elastic:Kd,back:Ld,bounce:function(){return Md}}),ni=sg.map({"in":lb,out:Bd,"in-out":Cd,"out-in":function(a){return Cd(Bd(a))}});sg.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return c=mi.get(c)||li,d=ni.get(d)||lb,Ad(d(c.apply(null,Array.prototype.slice.call(arguments,1))))},sg.interpolateHcl=Nd,sg.interpolateHsl=Od,sg.interpolateLab=Pd,sg.interpolateRound=Qd,sg.layout={},sg.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Td(a[c]));return b}},sg.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=sg.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(sg.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(2*Xg-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},sg.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=1/Math.sqrt(f*f+g*g);if(p>(e-c)*h){var i=b.charge*h*h;return a.px-=f*i,a.py-=g*i,!0}if(b.point&&isFinite(h)){var i=b.pointCharge*h*h;a.px-=f*i,a.py-=g*i}}return!b.charge}}function b(a){a.px=sg.event.x,a.py=sg.event.y,h.resume()}var c,d,e,f,g,h={},i=sg.dispatch("start","tick","end"),j=[1,1],k=.9,l=oi,m=pi,n=-30,o=.1,p=.8,q=[],r=[];return h.tick=function(){if((d*=.99)<.005)return i.end({type:"end",alpha:d=0}),!0;var b,c,h,l,m,p,s,t,u,v=q.length,w=r.length;for(c=0;w>c;++c)h=r[c],l=h.source,m=h.target,t=m.x-l.x,u=m.y-l.y,(p=t*t+u*u)&&(p=d*f[c]*((p=Math.sqrt(p))-e[c])/p,t*=p,u*=p,m.x-=t*(s=l.weight/(m.weight+l.weight)),m.y-=u*s,l.x+=t*(s=1-s),l.y+=u*s);if((s=d*o)&&(t=j[0]/2,u=j[1]/2,c=-1,s))for(;++c<v;)h=q[c],h.x+=(t-h.x)*s,h.y+=(u-h.y)*s;if(n)for($d(b=sg.geom.quadtree(q),d,g),c=-1;++c<v;)(h=q[c]).fixed||b.visit(a(h));for(c=-1;++c<v;)h=q[c],h.fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*k,h.y-=(h.py-(h.py=h.y))*k);i.tick({type:"tick",alpha:d})},h.nodes=function(a){return arguments.length?(q=a,h):q},h.links=function(a){return arguments.length?(r=a,h):r},h.size=function(a){return arguments.length?(j=a,h):j},h.linkDistance=function(a){return arguments.length?(l="function"==typeof a?a:+a,h):l},h.distance=h.linkDistance,h.linkStrength=function(a){return arguments.length?(m="function"==typeof a?a:+a,h):m},h.friction=function(a){return arguments.length?(k=+a,h):k},h.charge=function(a){return arguments.length?(n="function"==typeof a?a:+a,h):n},h.gravity=function(a){return arguments.length?(o=+a,h):o},h.theta=function(a){return arguments.length?(p=+a,h):p},h.alpha=function(a){return arguments.length?(a=+a,d?d=a>0?a:0:a>0&&(i.start({type:"start",alpha:d=a}),sg.timer(h.tick)),h):d},h.start=function(){function a(a,d){for(var e,f=b(c),g=-1,h=f.length;++g<h;)if(!isNaN(e=f[g][a]))return e;return Math.random()*d}function b(){if(!i){for(i=[],d=0;o>d;++d)i[d]=[];for(d=0;p>d;++d){var a=r[d];i[a.source.index].push(a.target),i[a.target.index].push(a.source)}}return i[c]}var c,d,i,k,o=q.length,p=r.length,s=j[0],t=j[1];for(c=0;o>c;++c)(k=q[c]).index=c,k.weight=0;for(c=0;p>c;++c)k=r[c],"number"==typeof k.source&&(k.source=q[k.source]),"number"==typeof k.target&&(k.target=q[k.target]),++k.source.weight,++k.target.weight;for(c=0;o>c;++c)k=q[c],isNaN(k.x)&&(k.x=a("x",s)),isNaN(k.y)&&(k.y=a("y",t)),isNaN(k.px)&&(k.px=k.x),isNaN(k.py)&&(k.py=k.y);if(e=[],"function"==typeof l)for(c=0;p>c;++c)e[c]=+l.call(this,r[c],c);else for(c=0;p>c;++c)e[c]=l;if(f=[],"function"==typeof m)for(c=0;p>c;++c)f[c]=+m.call(this,r[c],c);else for(c=0;p>c;++c)f[c]=m;if(g=[],"function"==typeof n)for(c=0;o>c;++c)g[c]=+n.call(this,q[c],c);else for(c=0;o>c;++c)g[c]=n;return h.resume()},h.resume=function(){return h.alpha(.1)},h.stop=function(){return h.alpha(0)},h.drag=function(){return c||(c=sg.behavior.drag().origin(lb).on("dragstart.force",Wd).on("drag.force",b).on("dragend.force",Xd)),arguments.length?(this.on("mouseover.force",Yd).on("mouseout.force",Zd).call(c),void 0):c},sg.rebind(h,i,"on")};var oi=20,pi=1;sg.layout.hierarchy=function(){function a(b,g,h){var i=e.call(c,b,g);if(b.depth=g,h.push(b),i&&(j=i.length)){for(var j,k,l=-1,m=b.children=[],n=0,o=g+1;++l<j;)k=a(i[l],o,h),k.parent=b,m.push(k),n+=k.value;d&&m.sort(d),f&&(b.value=n)}else f&&(b.value=+f.call(c,b,g)||0);return b}function b(a,d){var e=a.children,g=0;if(e&&(h=e.length))for(var h,i=-1,j=d+1;++i<h;)g+=b(e[i],j);else f&&(g=+f.call(c,a,d)||0);return f&&(a.value=g),g}function c(b){var c=[];return a(b,0,c),c}var d=ce,e=ae,f=be;return c.sort=function(a){return arguments.length?(d=a,c):d},c.children=function(a){return arguments.length?(e=a,c):e},c.value=function(a){return arguments.length?(f=a,c):f},c.revalue=function(a){return b(a,0),a},c},sg.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=sg.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},_d(c,d)},sg.layout.pie=function(){function a(f){var g=f.map(function(c,d){return+b.call(a,c,d)}),h=+("function"==typeof d?d.apply(this,arguments):d),i=(("function"==typeof e?e.apply(this,arguments):e)-h)/sg.sum(g),j=sg.range(f.length);null!=c&&j.sort(c===qi?function(a,b){return g[b]-g[a]}:function(a,b){return c(f[a],f[b])});var k=[];return j.forEach(function(a){var b;k[a]={data:f[a],value:b=g[a],startAngle:h,endAngle:h+=b*i}}),k}var b=Number,c=qi,d=0,e=2*Xg;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a};var qi={};sg.layout.stack=function(){function a(h,i){var j=h.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[f.call(a,b,c),g.call(a,b,c)]})}),l=c.call(a,k,i);j=sg.permute(j,l),k=sg.permute(k,l);var m,n,o,p=d.call(a,k,i),q=j.length,r=j[0].length;for(n=0;r>n;++n)for(e.call(a,j[0][n],o=p[n],k[0][n][1]),m=1;q>m;++m)e.call(a,j[m][n],o+=k[m-1][n][1],k[m][n][1]);return h}var b=lb,c=he,d=ie,e=ge,f=ee,g=fe;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:ri.get(b)||he,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:si.get(b)||ie,a):d},a.x=function(b){return arguments.length?(f=b,a):f},a.y=function(b){return arguments.length?(g=b,a):g},a.out=function(b){return arguments.length?(e=b,a):e},a};var ri=sg.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(je),f=a.map(ke),g=sg.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;d>b;++b)c=g[b],i>h?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return sg.range(a.length).reverse()},"default":he}),si=sg.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;f>c;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;m>c;++c){for(b=0,e=0;k>b;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];k>b;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);b>d;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,j>i&&(j=i)}for(c=0;m>c;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];if(d)for(b=0;e>b;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=g}for(c=0;f>c;++c)h[c]=0;return h},zero:ie});sg.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[sg.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=oe,e=me;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=kb(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return ne(a,b)}:kb(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},sg.layout.tree=function(){function a(a,f){function g(a,b){var d=a.children,e=a._tree;if(d&&(f=d.length)){for(var f,h,j,k=d[0],l=k,m=-1;++m<f;)j=d[m],g(j,h),l=i(j,h,l),h=j;xe(a);var n=.5*(k._tree.prelim+j._tree.prelim);b?(e.prelim=b._tree.prelim+c(a,b),e.mod=e.prelim-n):e.prelim=n}else b&&(e.prelim=b._tree.prelim+c(a,b))}function h(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c&&(d=c.length)){var d,e=-1;for(b+=a._tree.mod;++e<d;)h(c[e],b)}}function i(a,b,d){if(b){for(var e,f=a,g=a,h=b,i=a.parent.children[0],j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m=i._tree.mod;h=re(h),f=qe(f),h&&f;)i=qe(i),g=re(g),g._tree.ancestor=a,e=h._tree.prelim+l-f._tree.prelim-j+c(h,f),e>0&&(ye(ze(h,a,d),a,e),j+=e,k+=e),l+=h._tree.mod,j+=f._tree.mod,m+=i._tree.mod,k+=g._tree.mod;h&&!re(g)&&(g._tree.thread=h,g._tree.mod+=l-k),f&&!qe(i)&&(i._tree.thread=f,i._tree.mod+=j-m,d=a)}return d}var j=b.call(this,a,f),k=j[0];we(k,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),g(k),h(k,-k._tree.prelim);var l=se(k,ue),m=se(k,te),n=se(k,ve),o=l.x-c(l,m)/2,p=m.x+c(m,l)/2,q=n.depth||1;return we(k,e?function(a){a.x*=d[0],a.y=a.depth*d[1],delete a._tree}:function(a){a.x=(a.x-o)/(p-o)*d[0],a.y=a.depth/q*d[1],delete a._tree}),j}var b=sg.layout.hierarchy().sort(null).value(null),c=pe,d=[1,1],e=!1;return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(e=null==(d=b),a):e?null:d},a.nodeSize=function(b){return arguments.length?(e=null!=(d=b),a):e?d:null},_d(a,b)},sg.layout.pack=function(){function a(a,f){var g=c.call(this,a,f),h=g[0],i=e[0],j=e[1],k=b||Math.sqrt;if(h.x=h.y=0,we(h,function(a){a.r=k(a.value)}),we(h,Ee),d){var l=d*(b?1:Math.max(2*h.r/i,2*h.r/j))/2;we(h,function(a){a.r+=l}),we(h,Ee),we(h,function(a){a.r-=l})}return He(h,i/2,j/2,b?1:1/Math.max(2*h.r/i,2*h.r/j)),g}var b,c=sg.layout.hierarchy().sort(Ae),d=0,e=[1,1];return a.size=function(b){return arguments.length?(e=b,a):e},a.radius=function(c){return arguments.length?(b=c,a):b},a.padding=function(b){return arguments.length?(d=+b,a):d},_d(a,c)},sg.layout.cluster=function(){function a(a,f){var g,h=b.call(this,a,f),i=h[0],j=0;we(i,function(a){var b=a.children;b&&b.length?(a.x=Ke(b),a.y=Je(b)):(a.x=g?j+=c(a,g):0,a.y=0,g=a)});var k=Le(i),l=Me(i),m=k.x-c(k,l)/2,n=l.x+c(l,k)/2;return we(i,e?function(a){a.x=(a.x-i.x)*d[0],a.y=(i.y-a.y)*d[1]}:function(a){a.x=(a.x-m)/(n-m)*d[0],a.y=(1-(i.y?a.y/i.y:1))*d[1]}),h}var b=sg.layout.hierarchy().sort(null).value(null),c=pe,d=[1,1],e=!1;return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(e=null==(d=b),a):e?null:d},a.nodeSize=function(b){return arguments.length?(e=null!=(d=b),a):e?d:null},_d(a,b)},sg.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(0>b?0:b),c.area=isNaN(d)||0>=d?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),o=1/0,p="slice"===n?j.dx:"dice"===n?j.dy:"slice-dice"===n?1&c.depth?j.dy:j.dx:Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,"squarify"!==n||(h=d(k,p))<=o?(m.pop(),o=h):(k.area-=k.pop().area,e(k,p,j,!1),p=Math.min(j.dx,j.dy),k.length=k.area=0,o=1/0);k.length&&(e(k,p,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(f>c&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*o/d,d/(b*f*o)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=sg.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Ne,m=!1,n="squarify",o=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Ne(b):Oe(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Oe(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Ne:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(o=a,f):o},f.mode=function(a){return arguments.length?(n=a+"",f):n},_d(f,h)},sg.random={normal:function(a,b){var c=arguments.length;return 2>c&&(b=1),1>c&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var a=sg.random.normal.apply(sg,arguments);return function(){return Math.exp(a())}},irwinHall:function(a){return function(){for(var b=0,c=0;a>c;c++)b+=Math.random();return b/a}}},sg.scale={};var ti={floor:lb,ceil:lb};sg.scale.linear=function(){return Ve([0,1],[0,1],xd,!1)},sg.scale.log=function(){return af(sg.scale.linear().domain([0,Math.LN10]),10,bf,cf,[1,10])};var ui=sg.format(".0e");sg.scale.pow=function(){return ff(sg.scale.linear(),1,[0,1])},sg.scale.sqrt=function(){return sg.scale.pow().exponent(.5)},sg.scale.ordinal=function(){return hf([],{t:"range",a:[[]]})},sg.scale.category10=function(){return sg.scale.ordinal().range(vi)},sg.scale.category20=function(){return sg.scale.ordinal().range(wi)},sg.scale.category20b=function(){return sg.scale.ordinal().range(xi)},sg.scale.category20c=function(){return sg.scale.ordinal().range(yi)};var vi=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],wi=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],xi=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],yi=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];sg.scale.quantile=function(){return jf([],[])},sg.scale.quantize=function(){return kf(0,1,[0,1])},sg.scale.threshold=function(){return lf([.5],[0,1])},sg.scale.identity=function(){return mf([0,1])},sg.svg.arc=function(){function a(){var a=b.apply(this,arguments),f=c.apply(this,arguments),g=d.apply(this,arguments)+zi,h=e.apply(this,arguments)+zi,i=(g>h&&(i=g,g=h,h=i),h-g),j=Xg>i?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=Ai?a?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":a?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+a*m+","+a*n+"A"+a+","+a+" 0 "+j+",0 "+a*k+","+a*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var b=nf,c=of,d=pf,e=qf;return a.innerRadius=function(c){return arguments.length?(b=kb(c),a):b},a.outerRadius=function(b){return arguments.length?(c=kb(b),a):c},a.startAngle=function(b){return arguments.length?(d=kb(b),a):d},a.endAngle=function(b){return arguments.length?(e=kb(b),a):e},a.centroid=function(){var a=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(d.apply(this,arguments)+e.apply(this,arguments))/2+zi;return[Math.cos(f)*a,Math.sin(f)*a]},a};var zi=-Xg/2,Ai=2*Xg-1e-6;sg.svg.line.radial=function(){var a=Lc(rf);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},Rc.reverse=Sc,Sc.reverse=Rc,sg.svg.area=function(){return sf(lb)},sg.svg.area.radial=function(){var a=sf(rf);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},sg.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=h.call(a,e,d),g=i.call(a,e,d)+zi,k=j.call(a,e,d)+zi;return{r:f,a0:g,a1:k,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(k),f*Math.sin(k)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Xg)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=Bc,g=Cc,h=tf,i=pf,j=qf;return a.radius=function(b){return arguments.length?(h=kb(b),a):h},a.source=function(b){return arguments.length?(f=kb(b),a):f},a.target=function(b){return arguments.length?(g=kb(b),a):g},a.startAngle=function(b){return arguments.length?(i=kb(b),a):i},a.endAngle=function(b){return arguments.length?(j=kb(b),a):j},a},sg.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=Bc,c=Cc,d=uf;return a.source=function(c){return arguments.length?(b=kb(c),a):b},a.target=function(b){return arguments.length?(c=kb(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d},a},sg.svg.diagonal.radial=function(){var a=sg.svg.diagonal(),b=uf,c=a.projection;return a.projection=function(a){return arguments.length?c(vf(b=a)):b},a},sg.svg.symbol=function(){function a(a,d){return(Bi.get(b.call(this,a,d))||yf)(c.call(this,a,d))}var b=xf,c=wf;return a.type=function(c){return arguments.length?(b=kb(c),a):b},a.size=function(b){return arguments.length?(c=kb(b),a):c},a};var Bi=sg.map({circle:yf,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*Ei)),c=b*Ei;return"M0,"+-b+"L"+c+",0"+" 0,"+b+" "+-c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/Di),c=b*Di/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/Di),c=b*Di/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});sg.svg.symbolTypes=Bi.keys();var Ci,Di=Math.sqrt(3),Ei=Math.tan(30*$g),Fi=[],Gi=0,Hi={ease:Fd,delay:0,duration:250};Fi.call=Ng.call,Fi.empty=Ng.empty,Fi.node=Ng.node,sg.transition=function(a){return arguments.length?Ci?a.transition():a:Sg.transition()},sg.transition.prototype=Fi,Fi.select=function(a){var b,c,d,e=this.id,f=[];"function"!=typeof a&&(a=s(a));for(var g=-1,h=this.length;++g<h;){f.push(b=[]);for(var i=this[g],j=-1,k=i.length;++j<k;)(d=i[j])&&(c=a.call(d,d.__data__,j))?("__data__"in d&&(c.__data__=d.__data__),Cf(c,j,e,d.__transition__[e]),b.push(c)):b.push(null)}return zf(f,e)},Fi.selectAll=function(a){var b,c,d,e,f,g=this.id,h=[];"function"!=typeof a&&(a=t(a));for(var i=-1,j=this.length;++i<j;)for(var k=this[i],l=-1,m=k.length;++l<m;)if(d=k[l]){f=d.__transition__[g],c=a.call(d,d.__data__,l),h.push(b=[]);for(var n=-1,o=c.length;++n<o;)Cf(e=c[n],n,g,f),b.push(e)}return zf(h,g)},Fi.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=C(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d,d.__data__,h)&&b.push(d)}return zf(e,this.id,this.time).ease(this.ease())},Fi.tween=function(a,b){var c=this.id;return arguments.length<2?this.node().__transition__[c].tween.get(a):I(this,null==b?function(b){b.__transition__[c].tween.remove(a)}:function(d){d.__transition__[c].tween.set(a,b)})},Fi.attr=function(a,b){function c(){this.removeAttribute(h)}function d(){this.removeAttributeNS(h.space,h.local)}function e(a){return null==a?c:(a+="",function(){var b,c=this.getAttribute(h);return c!==a&&(b=g(c,a),function(a){this.setAttribute(h,b(a))})})}function f(a){return null==a?d:(a+="",function(){var b,c=this.getAttributeNS(h.space,h.local);return c!==a&&(b=g(c,a),function(a){this.setAttributeNS(h.space,h.local,b(a))})})}if(arguments.length<2){for(b in a)this.attr(b,a[b]);return this}var g=yd(a),h=sg.ns.qualify(a);return Af(this,"attr."+a,b,h.local?f:e)},Fi.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=sg.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Fi.style=function(a,b,c){function d(){this.style.removeProperty(a)}function e(b){return null==b?d:(b+="",function(){var d,e=vg.getComputedStyle(this,null).getPropertyValue(a);return e!==b&&(d=g(e,b),function(b){this.style.setProperty(a,d(b),c)})})}var f=arguments.length;if(3>f){if("string"!=typeof a){2>f&&(b="");for(c in a)this.style(c,a[c],b);return this}c=""}var g=yd(a);return Af(this,"style."+a,b,e)},Fi.styleTween=function(a,b,c){function d(d,e){var f=b.call(this,d,e,vg.getComputedStyle(this,null).getPropertyValue(a));return f&&function(b){this.style.setProperty(a,f(b),c)}}return arguments.length<3&&(c=""),this.tween("style."+a,d)},Fi.text=function(a){return Af(this,"text",a,Bf)},Fi.remove=function(){return this.each("end.transition",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},Fi.ease=function(a){var b=this.id;return arguments.length<1?this.node().__transition__[b].ease:("function"!=typeof a&&(a=sg.ease.apply(sg,arguments)),I(this,function(c){c.__transition__[b].ease=a}))},Fi.delay=function(a){var b=this.id;return I(this,"function"==typeof a?function(c,d,e){c.__transition__[b].delay=0|a.call(c,c.__data__,d,e)
  }:(a|=0,function(c){c.__transition__[b].delay=a}))},Fi.duration=function(a){var b=this.id;return I(this,"function"==typeof a?function(c,d,e){c.__transition__[b].duration=Math.max(1,0|a.call(c,c.__data__,d,e))}:(a=Math.max(1,0|a),function(c){c.__transition__[b].duration=a}))},Fi.each=function(a,b){var c=this.id;if(arguments.length<2){var d=Hi,e=Ci;Ci=c,I(this,function(b,d,e){Hi=b.__transition__[c],a.call(b,b.__data__,d,e)}),Hi=d,Ci=e}else I(this,function(d){d.__transition__[c].event.on(a,b)});return this},Fi.transition=function(){for(var a,b,c,d,e=this.id,f=++Gi,g=[],h=0,i=this.length;i>h;h++){g.push(a=[]);for(var b=this[h],j=0,k=b.length;k>j;j++)(c=b[j])&&(d=Object.create(c.__transition__[e]),d.delay+=d.duration,Cf(c,j,f,d)),a.push(c)}return zf(g,f)},sg.svg.axis=function(){function a(a){a.each(function(){var a,l=sg.select(this),m=null==j?c.ticks?c.ticks.apply(c,i):c.domain():j,n=null==b?c.tickFormat?c.tickFormat.apply(c,i):String:b,o=Ff(c,m,k),p=l.selectAll(".tick.minor").data(o,String),q=p.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),r=sg.transition(p.exit()).style("opacity",1e-6).remove(),s=sg.transition(p).style("opacity",1),t=l.selectAll(".tick.major").data(m,String),u=t.enter().insert("g",".domain").attr("class","tick major").style("opacity",1e-6),v=sg.transition(t.exit()).style("opacity",1e-6).remove(),w=sg.transition(t).style("opacity",1),x=Qe(c),y=l.selectAll(".domain").data([0]),z=(y.enter().append("path").attr("class","domain"),sg.transition(y)),A=c.copy(),B=this.__chart__||A;this.__chart__=A,u.append("line"),u.append("text");var C=u.select("line"),D=w.select("line"),E=t.select("text").text(n),F=u.select("text"),G=w.select("text");switch(d){case"bottom":a=Df,q.attr("y2",f),s.attr("x2",0).attr("y2",f),C.attr("y2",e),F.attr("y",Math.max(e,0)+h),D.attr("x2",0).attr("y2",e),G.attr("x",0).attr("y",Math.max(e,0)+h),E.attr("dy",".71em").style("text-anchor","middle"),z.attr("d","M"+x[0]+","+g+"V0H"+x[1]+"V"+g);break;case"top":a=Df,q.attr("y2",-f),s.attr("x2",0).attr("y2",-f),C.attr("y2",-e),F.attr("y",-(Math.max(e,0)+h)),D.attr("x2",0).attr("y2",-e),G.attr("x",0).attr("y",-(Math.max(e,0)+h)),E.attr("dy","0em").style("text-anchor","middle"),z.attr("d","M"+x[0]+","+-g+"V0H"+x[1]+"V"+-g);break;case"left":a=Ef,q.attr("x2",-f),s.attr("x2",-f).attr("y2",0),C.attr("x2",-e),F.attr("x",-(Math.max(e,0)+h)),D.attr("x2",-e).attr("y2",0),G.attr("x",-(Math.max(e,0)+h)).attr("y",0),E.attr("dy",".32em").style("text-anchor","end"),z.attr("d","M"+-g+","+x[0]+"H0V"+x[1]+"H"+-g);break;case"right":a=Ef,q.attr("x2",f),s.attr("x2",f).attr("y2",0),C.attr("x2",e),F.attr("x",Math.max(e,0)+h),D.attr("x2",e).attr("y2",0),G.attr("x",Math.max(e,0)+h).attr("y",0),E.attr("dy",".32em").style("text-anchor","start"),z.attr("d","M"+g+","+x[0]+"H0V"+x[1]+"H"+g)}if(c.ticks)u.call(a,B),w.call(a,A),v.call(a,A),q.call(a,B),s.call(a,A),r.call(a,A);else{var H=A.rangeBand()/2,I=function(a){return A(a)+H};u.call(a,I),w.call(a,I)}})}var b,c=sg.scale.linear(),d=Ii,e=6,f=6,g=6,h=3,i=[10],j=null,k=0;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b in Ji?b+"":Ii,a):d},a.ticks=function(){return arguments.length?(i=arguments,a):i},a.tickValues=function(b){return arguments.length?(j=b,a):j},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b,c){if(!arguments.length)return e;var d=arguments.length-1;return e=+b,f=d>1?+c:e,g=d>0?+arguments[d]:e,a},a.tickPadding=function(b){return arguments.length?(h=+b,a):h},a.tickSubdivide=function(b){return arguments.length?(k=+b,a):k},a};var Ii="bottom",Ji={top:1,right:1,bottom:1,left:1};sg.svg.brush=function(){function a(f){f.each(function(){var f,g=sg.select(this),j=g.selectAll(".background").data([0]),l=g.selectAll(".extent").data([0]),m=g.selectAll(".resize").data(k,String);g.style("pointer-events","all").on("mousedown.brush",e).on("touchstart.brush",e),j.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),m.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return Ki[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),m.style("display",a.empty()?"none":null),m.exit().remove(),h&&(f=Qe(h),j.attr("x",f[0]).attr("width",f[1]-f[0]),c(g)),i&&(f=Qe(i),j.attr("y",f[0]).attr("height",f[1]-f[0]),d(g)),b(g)})}function b(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+l[+/e$/.test(a)][0]+","+l[+/^s/.test(a)][1]+")"})}function c(a){a.select(".extent").attr("x",l[0][0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1][0]-l[0][0])}function d(a){a.select(".extent").attr("y",l[0][1]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1][1]-l[0][1])}function e(){function e(){var a=sg.event.changedTouches;return a?sg.touches(t,a)[0]:sg.mouse(t)}function k(){32==sg.event.keyCode&&(A||(r=null,B[0]-=l[1][0],B[1]-=l[1][1],A=2),j())}function m(){32==sg.event.keyCode&&2==A&&(B[0]+=l[1][0],B[1]+=l[1][1],A=0,j())}function o(){var a=e(),f=!1;s&&(a[0]+=s[0],a[1]+=s[1]),A||(sg.event.altKey?(r||(r=[(l[0][0]+l[1][0])/2,(l[0][1]+l[1][1])/2]),B[0]=l[+(a[0]<r[0])][0],B[1]=l[+(a[1]<r[1])][1]):r=null),y&&p(a,h,0)&&(c(w),f=!0),z&&p(a,i,1)&&(d(w),f=!0),f&&(b(w),v({type:"brush",mode:A?"move":"resize"}))}function p(a,b,c){var d,e,g=Qe(b),h=g[0],i=g[1],j=B[c],k=l[1][c]-l[0][c];return A&&(h-=j,i-=k+j),d=n[c]?Math.max(h,Math.min(i,a[c])):a[c],A?e=(d+=j)+k:(r&&(j=Math.max(h,Math.min(i,2*r[c]-d))),d>j?(e=d,d=j):e=j),l[0][c]!==d||l[1][c]!==e?(f=null,l[0][c]=d,l[1][c]=e,!0):void 0}function q(){o(),w.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),sg.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),v({type:"brushend"}),j()}var r,s,t=this,u=sg.select(sg.event.target),v=g.of(t,arguments),w=sg.select(t),x=u.datum(),y=!/^(n|s)$/.test(x)&&h,z=!/^(e|w)$/.test(x)&&i,A=u.classed("extent"),B=e(),C=sg.select(vg).on("mousemove.brush",o).on("mouseup.brush",q).on("touchmove.brush",o).on("touchend.brush",q).on("keydown.brush",k).on("keyup.brush",m);if(A)B[0]=l[0][0]-B[0],B[1]=l[0][1]-B[1];else if(x){var D=+/w$/.test(x),E=+/^n/.test(x);s=[l[1-D][0]-B[0],l[1-E][1]-B[1]],B[0]=l[D][0],B[1]=l[E][1]}else sg.event.altKey&&(r=B.slice());w.style("pointer-events","none").selectAll(".resize").style("display",null),sg.select("body").style("cursor",u.style("cursor")),v({type:"brushstart"}),o(),j()}var f,g=m(a,"brushstart","brush","brushend"),h=null,i=null,k=Li[0],l=[[0,0],[0,0]],n=[!0,!0];return a.x=function(b){return arguments.length?(h=b,k=Li[!h<<1|!i],a):h},a.y=function(b){return arguments.length?(i=b,k=Li[!h<<1|!i],a):i},a.clamp=function(b){return arguments.length?(h&&i?n=[!!b[0],!!b[1]]:n[+!h]=!!b,a):h&&i?n:n[+!h]},a.extent=function(b){var c,d,e,g,j;return arguments.length?(f=[[0,0],[0,0]],h&&(c=b[0],d=b[1],i&&(c=c[0],d=d[0]),f[0][0]=c,f[1][0]=d,h.invert&&(c=h(c),d=h(d)),c>d&&(j=c,c=d,d=j),l[0][0]=0|c,l[1][0]=0|d),i&&(e=b[0],g=b[1],h&&(e=e[1],g=g[1]),f[0][1]=e,f[1][1]=g,i.invert&&(e=i(e),g=i(g)),e>g&&(j=e,e=g,g=j),l[0][1]=0|e,l[1][1]=0|g),a):(b=f||l,h&&(c=b[0][0],d=b[1][0],f||(c=l[0][0],d=l[1][0],h.invert&&(c=h.invert(c),d=h.invert(d)),c>d&&(j=c,c=d,d=j))),i&&(e=b[0][1],g=b[1][1],f||(e=l[0][1],g=l[1][1],i.invert&&(e=i.invert(e),g=i.invert(g)),e>g&&(j=e,e=g,g=j))),h&&i?[[c,e],[d,g]]:h?[c,d]:i&&[e,g])},a.clear=function(){return f=null,l[0][0]=l[0][1]=l[1][0]=l[1][1]=0,a},a.empty=function(){return h&&l[0][0]===l[1][0]||i&&l[0][1]===l[1][1]},sg.rebind(a,g,"on")};var Ki={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Li=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];sg.time={};var Mi=Date,Ni=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Gf.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(){Oi.setUTCDate.apply(this._,arguments)},setDay:function(){Oi.setUTCDay.apply(this._,arguments)},setFullYear:function(){Oi.setUTCFullYear.apply(this._,arguments)},setHours:function(){Oi.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Oi.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Oi.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Oi.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Oi.setUTCSeconds.apply(this._,arguments)},setTime:function(){Oi.setTime.apply(this._,arguments)}};var Oi=Date.prototype,Pi="%a %b %e %X %Y",Qi="%m/%d/%Y",Ri="%H:%M:%S",Si=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ti=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ui=["January","February","March","April","May","June","July","August","September","October","November","December"],Vi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];sg.time.year=Hf(function(a){return a=sg.time.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),sg.time.years=sg.time.year.range,sg.time.years.utc=sg.time.year.utc.range,sg.time.day=Hf(function(a){var b=new Mi(2e3,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),sg.time.days=sg.time.day.range,sg.time.days.utc=sg.time.day.utc.range,sg.time.dayOfYear=function(a){var b=sg.time.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},Ni.forEach(function(a,b){a=a.toLowerCase(),b=7-b;var c=sg.time[a]=Hf(function(a){return(a=sg.time.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=sg.time.year(a).getDay();return Math.floor((sg.time.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});sg.time[a+"s"]=c.range,sg.time[a+"s"].utc=c.utc.range,sg.time[a+"OfYear"]=function(a){var c=sg.time.year(a).getDay();return Math.floor((sg.time.dayOfYear(a)+(c+b)%7)/7)}}),sg.time.week=sg.time.sunday,sg.time.weeks=sg.time.sunday.range,sg.time.weeks.utc=sg.time.sunday.utc.range,sg.time.weekOfYear=sg.time.sundayOfYear,sg.time.format=function(a){function b(b){for(var d,e,f,g=[],h=-1,i=0;++h<c;)37===a.charCodeAt(h)&&(g.push(a.substring(i,h)),null!=(e=dj[d=a.charAt(++h)])&&(d=a.charAt(++h)),(f=ej[d])&&(d=f(b,null==e?"e"===d?" ":"0":e)),g.push(d),i=h+1);return g.push(a.substring(i,h)),g.join("")}var c=a.length;return b.parse=function(b){var c={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},d=Jf(c,a,b,0);if(d!=b.length)return null;"p"in c&&(c.H=c.H%12+12*c.p);var e=new Mi;return"j"in c?e.setFullYear(c.y,0,c.j):"w"in c&&("W"in c||"U"in c)?(e.setFullYear(c.y,0,1),e.setFullYear(c.y,0,"W"in c?(c.w+6)%7+7*c.W-(e.getDay()+5)%7:c.w+7*c.U-(e.getDay()+6)%7)):e.setFullYear(c.y,c.m,c.d),e.setHours(c.H,c.M,c.S,c.L),e},b.toString=function(){return a},b};var Wi=Kf(Si),Xi=Lf(Si),Yi=Kf(Ti),Zi=Lf(Ti),$i=Kf(Ui),_i=Lf(Ui),aj=Kf(Vi),bj=Lf(Vi),cj=/^%/,dj={"-":"",_:" ",0:"0"},ej={a:function(a){return Ti[a.getDay()]},A:function(a){return Si[a.getDay()]},b:function(a){return Vi[a.getMonth()]},B:function(a){return Ui[a.getMonth()]},c:sg.time.format(Pi),d:function(a,b){return Mf(a.getDate(),b,2)},e:function(a,b){return Mf(a.getDate(),b,2)},H:function(a,b){return Mf(a.getHours(),b,2)},I:function(a,b){return Mf(a.getHours()%12||12,b,2)},j:function(a,b){return Mf(1+sg.time.dayOfYear(a),b,3)},L:function(a,b){return Mf(a.getMilliseconds(),b,3)},m:function(a,b){return Mf(a.getMonth()+1,b,2)},M:function(a,b){return Mf(a.getMinutes(),b,2)},p:function(a){return a.getHours()>=12?"PM":"AM"},S:function(a,b){return Mf(a.getSeconds(),b,2)},U:function(a,b){return Mf(sg.time.sundayOfYear(a),b,2)},w:function(a){return a.getDay()},W:function(a,b){return Mf(sg.time.mondayOfYear(a),b,2)},x:sg.time.format(Qi),X:sg.time.format(Ri),y:function(a,b){return Mf(a.getFullYear()%100,b,2)},Y:function(a,b){return Mf(a.getFullYear()%1e4,b,4)},Z:gg,"%":function(){return"%"}},fj={a:Nf,A:Of,b:Sf,B:Tf,c:Uf,d:_f,e:_f,H:bg,I:bg,j:ag,L:eg,m:$f,M:cg,p:fg,S:dg,U:Qf,w:Pf,W:Rf,x:Vf,X:Wf,y:Yf,Y:Xf,"%":hg},gj=/^\s*\d+/,hj=sg.map({am:0,pm:1});sg.time.format.utc=function(a){function b(a){try{Mi=Gf;var b=new Mi;return b._=a,c(b)}finally{Mi=Date}}var c=sg.time.format(a);return b.parse=function(a){try{Mi=Gf;var b=c.parse(a);return b&&b._}finally{Mi=Date}},b.toString=c.toString,b};var ij=sg.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");sg.time.format.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ig:ij,ig.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},ig.toString=ij.toString,sg.time.second=Hf(function(a){return new Mi(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),sg.time.seconds=sg.time.second.range,sg.time.seconds.utc=sg.time.second.utc.range,sg.time.minute=Hf(function(a){return new Mi(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),sg.time.minutes=sg.time.minute.range,sg.time.minutes.utc=sg.time.minute.utc.range,sg.time.hour=Hf(function(a){var b=a.getTimezoneOffset()/60;return new Mi(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),sg.time.hours=sg.time.hour.range,sg.time.hours.utc=sg.time.hour.utc.range,sg.time.month=Hf(function(a){return a=sg.time.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),sg.time.months=sg.time.month.range,sg.time.months.utc=sg.time.month.utc.range;var jj=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],kj=[[sg.time.second,1],[sg.time.second,5],[sg.time.second,15],[sg.time.second,30],[sg.time.minute,1],[sg.time.minute,5],[sg.time.minute,15],[sg.time.minute,30],[sg.time.hour,1],[sg.time.hour,3],[sg.time.hour,6],[sg.time.hour,12],[sg.time.day,1],[sg.time.day,2],[sg.time.week,1],[sg.time.month,1],[sg.time.month,3],[sg.time.year,1]],lj=[[sg.time.format("%Y"),Ob],[sg.time.format("%B"),function(a){return a.getMonth()}],[sg.time.format("%b %d"),function(a){return 1!=a.getDate()}],[sg.time.format("%a %d"),function(a){return a.getDay()&&1!=a.getDate()}],[sg.time.format("%I %p"),function(a){return a.getHours()}],[sg.time.format("%I:%M"),function(a){return a.getMinutes()}],[sg.time.format(":%S"),function(a){return a.getSeconds()}],[sg.time.format(".%L"),function(a){return a.getMilliseconds()}]],mj=sg.scale.linear(),nj=lg(lj);kj.year=function(a,b){return mj.domain(a.map(ng)).ticks(b).map(mg)},sg.time.scale=function(){return jg(sg.scale.linear(),kj,nj)};var oj=kj.map(function(a){return[a[0].utc,a[1]]}),pj=[[sg.time.format.utc("%Y"),Ob],[sg.time.format.utc("%B"),function(a){return a.getUTCMonth()}],[sg.time.format.utc("%b %d"),function(a){return 1!=a.getUTCDate()}],[sg.time.format.utc("%a %d"),function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],[sg.time.format.utc("%I %p"),function(a){return a.getUTCHours()}],[sg.time.format.utc("%I:%M"),function(a){return a.getUTCMinutes()}],[sg.time.format.utc(":%S"),function(a){return a.getUTCSeconds()}],[sg.time.format.utc(".%L"),function(a){return a.getUTCMilliseconds()}]],qj=lg(pj);return oj.year=function(a,b){return mj.domain(a.map(pg)).ticks(b).map(og)},sg.time.scale.utc=function(){return jg(sg.scale.linear(),oj,qj)},sg.text=mb(function(a){return a.responseText}),sg.json=function(a,b){return nb(a,"application/json",qg,b)},sg.html=function(a,b){return nb(a,"text/html",rg,b)},sg.xml=mb(function(a){return a.responseXML}),sg}()}),require.register("tcs-charts/js/index.js",function(a,b,c){!function(){c.exports={Base:b("./base"),Gauge:b("./gauge"),TimeBars:b("./timebars")}}.call(this)}),require.register("tcs-charts/js/base.js",function(a,b,c){!function(){var a,b,d=function(a,b){return function(){return a.apply(b,arguments)}},e=[].slice;b=a=function(){function a(a){var b;this.target=a,this._extend=d(this._extend,this),this.define=d(this.define,this),this.setter=d(this.setter,this),this.getter=d(this.getter,this);try{Object.defineProperty(this,"testIE",{get:function(){return!1}})}catch(c){return b=c,new Error("browser-outdated","tcs-charts not availible on IE8 and lower.")}}return a.prototype.defaults={},a.prototype.getter=function(a,b,c){null==c&&(c=this),Object.defineProperty(c,a,{get:b})},a.prototype.setter=function(a,b,c){null==c&&(c=this),Object.defineProperty(c,a,{set:b})},a.prototype.define=function(a,b,c){Object.defineProperty(c,a,b)},a.prototype._extend=function(){var a,b,c,d,f,g;for(c=1<=arguments.length?e.call(arguments,0):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)d=b[a],c[0][a]=d}return c[0]},a}(),null!=("undefined"!=typeof c&&null!==c?c.exports:void 0)?c.exports=b:(window.tcscharts||(window.tcscharts={}),window.tcscharts.Base=b)}.call(this)}),require.register("tcs-charts/js/gauge.js",function(a,b,c){!function(){var a,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};null!=("undefined"!=typeof c&&null!==c?c.exports:void 0)?(d=b("./base.js"),this.d3=b("d3")):d=window.tcscharts.Base,e=a=function(a){function b(a,c,d){var e,g,h=this;return this.target=a,null==c&&(c=0),this.tweenNeedle=f(this.tweenNeedle,this),this.tween=f(this.tween,this),this._set=f(this._set,this),this._getColorByFactor=f(this._getColorByFactor,this),this._getAngleByFactor=f(this._getAngleByFactor,this),this._calcNeedle=f(this._calcNeedle,this),this.create=f(this.create,this),this._arc=f(this._arc,this),this._radToAngle=f(this._radToAngle,this),this._angleToRad=f(this._angleToRad,this),this._initOption=f(this._initOption,this),this._initOptions=f(this._initOptions,this),g=b.__super__.constructor.call(this,this.target),this._initOptions(d,!0),e={get:function(){return 100*h._value},set:function(a){a>1&&(a/=100),h._set(a)}},this.define("value",e,this),this.value=c,this.create(),g}return h(b,a),b.prototype.defaults={width:500,margin:0,startAngle:-75,endAngle:75,thicknessFactor:.8,needleLengthFactor:null,bgColor:"#ddd",needleColor:"#333",fixedColor:null,startColor:"#B4EB57",endColor:"#D10000",animationDuration:500},b.prototype._rad=2*Math.PI/360,b.prototype._initOptions=function(a,b){var c;if(null==b&&(b=!1),b&&this._extend(this.opt={},this.defaults,a),this.opt.height=this.opt.width/2,b)for(c in this.opt)this._initOption(c)},b.prototype._initOption=function(a){var b,c=this;return b={get:function(){return"needleLengthFactor"===a&&null==c.opt[a]?c.opt.thicknessFactor:c.opt[a]},set:function(b){switch(c.opt[a]=b,a){case"width":case"needleLengthFactor":case"thicknessFactor":c._initOptions(null),c.create();break;case"animationDuration":case"startColor":case"endColor":break;default:c.create()}}},this.define(a,b,this)},b.prototype._angleToRad=function(a){return this._rad*a},b.prototype._radToAngle=function(a){return a/this._rad},b.prototype._arc=function(a){var b;return b=d3.svg.arc().outerRadius(this.opt.width/2.05).innerRadius(this.opt.width/6/this.opt.thicknessFactor).startAngle(this._angleToRad(this.opt.startAngle)),null!=a&&b.endAngle(this._angleToRad(a)),b},b.prototype.create=function(){var a;a=d3.select(this.target),a.select("svg").remove(),this.svg=a.append("svg").attr("height",this.opt.height+2*this.opt.margin).attr("width",this.opt.width+2*this.opt.margin).append("g").attr("transform","translate("+this.opt.margin+","+this.opt.margin+")"),this.bg=this.svg.append("path").style("fill",this.opt.bgColor).attr("class","bg").attr("transform","translate("+this.opt.height+","+this.opt.height+")").attr("d",this._arc(this.opt.endAngle)),this.color=this.svg.append("path").attr("class","color").attr("transform","translate("+this.opt.height+","+this.opt.height+")").datum({endAngle:this._angleToRad(this._getAngleByFactor(this._value)),fill:this._getColorByFactor(this._value)}).attr("d",this.arc=this._arc()),null!=this.opt.fixedColor&&this.color.attr("fill",this.opt.fixedColor),this.opt.neelde||(this.needle=this.svg.append("path").style("fill",this.opt.needleColor).attr("class","needle").datum({angle:this._getAngleByFactor(this._value)}).attr("d",this._calcNeedle()).attr("transform","rotate("+this._getAngleByFactor(0)+" "+this.opt.height+" "+this.opt.height+")")),this._set(this._value)},b.prototype._calcNeedle=function(){var a,b;return b=this.opt.width,a=this.opt.height,"M"+.495*b+" 0 L"+.505*b+" 0 L"+.52*b+" "+.73*a*this.needleLengthFactor+" L"+.48*b+" "+.73*a*this.needleLengthFactor+" Z"},b.prototype._getAngleByFactor=function(a){return d3.interpolate(this.opt.startAngle,this.opt.endAngle)(a)},b.prototype._getColorByFactor=function(a){return d3.interpolateRgb(this.opt.startColor,this.opt.endColor)(a)},b.prototype._set=function(a,b){this._value=a,null==b&&(b=this.opt.animationDuration),null!=this.color&&this.color.transition().duration(b).call(this.tween,this._value),this.opt.neelde||null==this.needle||this.needle.transition().duration(b).call(this.tweenNeedle,this._value)},b.prototype.tween=function(a,b){var c,d,e=this;c=this._getAngleByFactor(b),a.attrTween("d",function(a){var b;return b=d3.interpolate(e.color.datum().endAngle,e._angleToRad(c)),function(c){return a.endAngle=b(c),e.arc(a)}}),null==this.opt.fixedColor&&(d=this._getColorByFactor(b),a.attrTween("fill",function(){var a;return a=d3.interpolate(e.color.datum().fill,d),function(b){return d=a(b),e.color.datum().fill=d,d}}))},b.prototype.tweenNeedle=function(a,b){var c,d=this;c=this._getAngleByFactor(b),a.attrTween("transform",function(){var a;return a=d3.interpolate(d.needle.datum().angle,c),function(b){var c;return c=a(b),d.needle.datum().angle=c,"rotate("+c+" "+d.opt.height+" "+d.opt.height+")"}})},b}(d),null!=("undefined"!=typeof c&&null!==c?c.exports:void 0)?c.exports=e:(window.tcscharts||(window.tcscharts={}),window.tcscharts.Gauge=e)}.call(this)}),require.register("tcs-charts/js/timebars.js",function(a,b,c){!function(){var a,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};null!=("undefined"!=typeof c&&null!==c?c.exports:void 0)?(d=b("./base.js"),this.d3=b("d3")):d=window.tcscharts.Base,e=a=function(a){function b(a,c,d){var e;return this.target=a,this.data=null!=c?c:[],this._update=f(this._update,this),this.reset=f(this.reset,this),this.rem=f(this.rem,this),this.add=f(this.add,this),this.getData=f(this.getData,this),this._calcBarWidth=f(this._calcBarWidth,this),this.create=f(this.create,this),this.fnRect=f(this.fnRect,this),this._initOption=f(this._initOption,this),this._initOptions=f(this._initOptions,this),this._calcMetrics=f(this._calcMetrics,this),e=b.__super__.constructor.call(this,this.target),this._initOptions(d,!0),this._calcMetrics(),this.create(),e}return h(b,a),b.prototype.defaults={timeKey:"ts",countKey:"count",width:700,height:300,margin:{top:20,right:20,bottom:10,left:40},spacing:3,barsColor:"#718EE3",showCount:!1,countColorIn:"#fff",countColorOut:"#666",ticks:"minutes",timeFormat:null,timeDomain:null,smallBarWidth:20,animationDuration:600},b.prototype._calcMetrics=function(){var a,b,c,d=this;null!=this.domainX&&(this._oldDomainX=this.domainX),null!=this.opt.timeDomain?(this.domainX=this.opt.timeDomain,this.data=function(){var a,b,d,e;for(d=this.data,e=[],a=0,b=d.length;b>a;a++)c=d[a],c[this.opt.timeKey]>this.domainX[0]&&c[this.opt.timeKey]<this.domainX[1]&&e.push(c);return e}.call(this)):(a=function(){var a,c,d,e;for(d=this.data,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b[this.opt.timeKey]);return e}.call(this),this.domainX=[d3.min(a),d3.max(a)]),this.domainY=[d3.max(this.data,function(a){return a[d.opt.countKey]}),0],this.interpolateX=d3.time.scale().domain(this.domainX),this.interpolateY=d3.scale.linear().range([0,this.opt.height-25]).domain(this.domainY),this._barWidth=this._calcBarWidth(),this.interpolateX.range([0,this.opt.width-this._barWidth]),this.xAxis=d3.svg.axis().scale(this.interpolateX).orient("bottom"),this.yAxis=d3.svg.axis().scale(this.interpolateY).tickSize(this.opt.width).orient("left"),null!=this.opt.tickCount&&this.xAxis.ticks(this.opt.tickCount),null!=this.opt.timeFormat&&("function"==typeof this.opt.timeFormat?this.xAxis.tickFormat(this.opt.timeFormat):this.xAxis.tickFormat(function(a){return d3.time.format(d.opt.timeFormat)(a)}))},b.prototype._initOptions=function(a,b){var c;if(null==b&&(b=!1),b&&this._extend(this.opt={},this.defaults,a),this.opt._width=this.opt.width+this.opt.margin.left+this.opt.margin.right,this.opt._height=this.opt.height+this.opt.margin.top+this.opt.margin.bottom,b)for(c in this.opt)this._initOption(c)},b.prototype._initOption=function(a){var b,c=this;return b={get:function(){return c.opt[a]},set:function(b){switch(c.opt[a]=b,a){case"width":case"height":c.create();break;default:c.create()}}},this.define(a,b,this)},b.prototype.fnRect=function(a,b){var c=this;return null==a&&(a=!1),null==b&&(b=!1),function(d){var e,f;return d.attr("class","bar"),a?d.transition().duration(c.opt.animationDuration).attrTween("transform",function(a,d,e){var f,g,h,i,j,k,l,m;return i=e.slice(10,-1).split(","),j=i[0],k=i[1],h=b?0:c.interpolateY(a[c.opt.countKey]),l=c.interpolateX(new Date(a.ts)),m=h,f=d3.interpolate(a._x||parseFloat(j),l),g=d3.interpolate(a._y||parseFloat(k),m),a._x=l,a._y=m,a._h=h,function(a){return"translate("+f(a)+","+g(a)+")"}}):d.datum(function(a){var b;return b=c.interpolateY(a[c.opt.countKey]),a._x=c.interpolateX(new Date(a.ts)),a._y=b,a._h=b,a}).attr("transform",function(a){return"translate("+a._x+","+a._y+")"}),e=a?d.select("rect"):d.append("rect"),e.attr("fill",c.opt.barsColor),a?e.transition().duration(c.opt.animationDuration).attr("width",function(){return c._barWidth}).attr("height",function(a){return b?1e-6:c.opt.height-25-c.interpolateY(a[c.opt.countKey])}):e.attr("width",function(){return c._barWidth}).attr("height",function(a){return b?1e-6:c.opt.height-25-c.interpolateY(a[c.opt.countKey])}),c.opt.showCount&&(f=a?d.select("text"):d.append("text"),f.attr("class",function(a){var b;return b=[],c._barWidth>c.opt.smallBarWidth?b.push("normal"):b.push("small"),a[c.opt.countKey]<.2*c.domainY[1]?b.push("low"):b.push("high"),b.join(" ")}).attr("transform",function(a){return a[c.opt.countKey]<.2*c.domainY[1]?"translate("+c._barWidth/2+",-5)":"translate("+c._barWidth/2+",15)"}).attr("fill",function(a){return a[c.opt.countKey]<.2*c.domainY[1]?c.opt.countColorOut:c.opt.countColorIn}).text(function(a){return a[c.opt.countKey]})),d}},b.prototype.create=function(){var a;a=d3.select(this.target),a.select("svg").remove(),this.svg=a.append("svg").attr("height",this.opt._height).attr("width",this.opt._width).append("g").attr("transform","translate("+this.opt.margin.left+","+this.opt.margin.top+")"),this.gxAxis=this.svg.append("g").attr("class","x axis").attr("transform","translate("+this._barWidth/2+","+(this.opt.height-20)+")").call(this.xAxis),this.gyAxis=this.svg.append("g").attr("class","y axis").attr("transform","translate("+(this.opt.width-12)+", 0)").call(this.yAxis),this._update()},b.prototype._calcBarWidth=function(){var a;return a=this.interpolateX.ticks(d3.time[this.opt.ticks]).length,(this.opt.width-a*this.opt.spacing)/a},b.prototype.getData=function(){return this.data},b.prototype.add=function(a){this.data.push(a),this._calcMetrics(),this._update(!0)},b.prototype.rem=function(a){var b,c,d,e,f,g;for(g=!1,f=this.data,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c[this.opt.timeKey]===a){this.data.splice(b,1),g=!0;break}g&&(this._calcMetrics(),this._update(!0))},b.prototype.reset=function(a){this.data=a,this._calcMetrics(),this._update(!0)},b.prototype._update=function(a){var b,c=this;null==a&&(a=!1),this.bars=this.svg.selectAll(".bar").data(this.data,function(a){return a[c.opt.timeKey]}),a&&(this.gxAxis.transition().duration(this.opt.animationDuration).attr("transform","translate("+this._barWidth/2+","+(this.opt.height-20)+")").call(this.xAxis),this.gyAxis.transition().duration(this.opt.animationDuration).call(this.yAxis),this.bars.transition().duration(this.opt.animationDuration)),this.bars.enter().append("g").call(this.fnRect(!1)),this.bars.call(this.fnRect(!0)),b=this.bars.exit().call(this.fnRect(!0,!0)).remove()},b}(d),null!=("undefined"!=typeof c&&null!==c?c.exports:void 0)?c.exports=e:(window.tcscharts||(window.tcscharts={}),window.tcscharts.TimeBars=e)}.call(this)}),require.alias("mbostock-d3/index-browserify.js","tcs-charts/deps/d3/index-browserify.js"),require.alias("mbostock-d3/d3.js","tcs-charts/deps/d3/d3.js"),require.alias("mbostock-d3/index-browserify.js","tcs-charts/deps/d3/index.js"),require.alias("mbostock-d3/index-browserify.js","d3/index.js"),require.alias("mbostock-d3/index-browserify.js","mbostock-d3/index.js"),require.alias("tcs-charts/js/index.js","tcs-charts/index.js");