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