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