!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){return function(n,e){return kr(t(n),e)}}function e(){for(var t,n=0,e=arguments.length,i={};n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function o(t,n){for(var e,r=0,i=t.length;r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function f(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;rn?1:t>=n?0:NaN}function w(t){return function(){this.removeAttribute(t)}}function x(t){return function(){this.removeAttributeNS(t.space,t.local)}}function b(t,n){return function(){this.setAttribute(t,n)}}function M(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function T(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function A(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function N(t){return function(){this.style.removeProperty(t)}}function C(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function S(t){return function(){delete this[t]}}function U(t,n){return function(){this[t]=n}}function E(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function D(t){return t.trim().split(/^|\s+/)}function F(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=D(t.getAttribute("class")||"")}function Y(t,n){for(var e=F(t),r=-1,i=n.length;++r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=Si.exec(t))?it(parseInt(n[1],16)):(n=Ui.exec(t))?new st(n[1],n[2],n[3],1):(n=Ei.exec(t))?new st(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Di.exec(t))?ot(n[1],n[2],n[3],n[4]):(n=Fi.exec(t))?ot(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Pi.exec(t))?ct(n[1],n[2]/100,n[3]/100,1):(n=Yi.exec(t))?ct(n[1],n[2]/100,n[3]/100,n[4]):Hi.hasOwnProperty(t)?it(Hi[t]):"transparent"===t?new st(NaN,NaN,NaN,0):null}function it(t){return new st(t>>16&255,t>>8&255,255&t,1)}function ot(t,n,e,r){return r<=0&&(t=n=e=NaN),new st(t,n,e,r)}function ut(t){return t instanceof et||(t=rt(t)),t?(t=t.rgb(),new st(t.r,t.g,t.b,t.opacity)):new st}function at(t,n,e,r){return 1===arguments.length?ut(t):new st(t,n,e,null==r?1:r)}function st(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function ct(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new ft(t,n,e,r)}function lt(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof et||(t=rt(t)),!t)return new ft;if(t instanceof ft)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&s<1?0:u,new ft(u,a,s,t.opacity)}function ht(t,n,e,r){return 1===arguments.length?lt(t):new ft(t,n,e,null==r?1:r)}function ft(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function pt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function dt(t){if(t instanceof vt)return new vt(t.l,t.a,t.b,t.opacity);if(t instanceof Mt){var n=t.h*qi;return new vt(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof st||(t=ut(t));var e=wt(t.r),r=wt(t.g),i=wt(t.b),o=gt((.4124564*e+.3575761*r+.1804375*i)/ji),u=gt((.2126729*e+.7151522*r+.072175*i)/Oi);return new vt(116*u-16,500*(o-u),200*(u-gt((.0193339*e+.119192*r+.9503041*i)/zi)),t.opacity)}function _t(t,n,e,r){return 1===arguments.length?dt(t):new vt(t,n,e,null==r?1:r)}function vt(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function gt(t){return t>Ri?Math.pow(t,1/3):t/Ii+$i}function yt(t){return t>Xi?t*t*t:Ii*(t-$i)}function mt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function wt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xt(t){if(t instanceof Mt)return new Mt(t.h,t.c,t.l,t.opacity);t instanceof vt||(t=dt(t));var n=Math.atan2(t.b,t.a)*Li;return new Mt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function bt(t,n,e,r){return 1===arguments.length?xt(t):new Mt(t,n,e,null==r?1:r)}function Mt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Tt(t){if(t instanceof Nt)return new Nt(t.h,t.s,t.l,t.opacity);t instanceof st||(t=ut(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Ki*r+Gi*n-Qi*e)/(Ki+Gi-Qi),o=r-i,u=(Ji*(e-i)-Vi*o)/Wi,a=Math.sqrt(u*u+o*o)/(Ji*i*(1-i)),s=a?Math.atan2(u,o)*Li-120:NaN;return new Nt(s<0?s+360:s,a,i,t.opacity)}function At(t,n,e,r){return 1===arguments.length?Tt(t):new Nt(t,n,e,null==r?1:r)}function Nt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ct(t,n){return function(e){return t+e*n}}function kt(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function St(t,n){var e=n-t;return e?Ct(t,e>180||e<-180?e-360*Math.round(e/360):e):io(isNaN(t)?n:t)}function Ut(t){return 1==(t=+t)?Et:function(n,e){return e-n?kt(n,e,t):io(isNaN(n)?e:n)}}function Et(t,n){var e=n-t;return e?Ct(t,e):io(isNaN(t)?n:t)}function Dt(t){return function(){return t}}function Ft(t){return function(n){return t(n)+""}}function Pt(t){return"none"===t?vo:(to||(to=document.createElement("DIV"),no=document.documentElement,eo=document.defaultView),to.style.transform=t,t=eo.getComputedStyle(no.appendChild(to),null).getPropertyValue("transform"),no.removeChild(to),t=t.slice(7,-1).split(","),go(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function Yt(t){return null==t?vo:(ro||(ro=document.createElementNS("http://www.w3.org/2000/svg","g")),ro.setAttribute("transform",t),(t=ro.transform.baseVal.consolidate())?(t=t.matrix,go(t.a,t.b,t.c,t.d,t.e,t.f)):vo)}function Ht(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:so(t,i)},{i:s-2,x:so(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}function u(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:so(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function a(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:so(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function s(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:so(t,e)},{i:a-2,x:so(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),a(n.skewX,e.skewX,r,i),s(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e=0&&n._call.call(null,t),n=n._next;--Mo}function Xt(){ko=(Co=Uo.now())+So,Mo=To=0;try{$t()}finally{Mo=0,Rt(),ko=0}}function It(){var t=Uo.now(),n=t-Co;n>No&&(So-=n,Co=t)}function Rt(){for(var t,n,e=wo,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:wo=n);xo=t,Zt(r)}function Zt(t){if(!Mo){To&&(To=clearTimeout(To));var n=t-ko;n>24?(t<1/0&&(To=setTimeout(Xt,n)),Ao&&(Ao=clearInterval(Ao))):(Ao||(Co=ko,Ao=setInterval(It,No)),Mo=1,Eo(Xt))}}function Bt(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Yo)throw new Error("too late");return e}function Vt(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>qo)throw new Error("too late");return e}function Wt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Jt(t,n,e){function r(t){e.state=Ho,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var c,l,h,f;if(e.state!==Ho)return u();for(c in s)if(f=s[c],f.name===e.name){if(f.state===Lo)return Do(i);f.state===jo?(f.state=zo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[c]):+c=0&&(t=t.slice(0,n)),!t||"start"===t})}function _n(t,n,e){var r,i,o=dn(n)?Bt:Vt;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function vn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function gn(t,n){var e,r,i;return function(){var o=si(this).getComputedStyle(this,null),u=o.getPropertyValue(t),a=(this.style.removeProperty(t),o.getPropertyValue(t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}function yn(t){return function(){this.style.removeProperty(t)}}function mn(t,n,e){var r,i;return function(){var o=si(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function wn(t,n,e){var r,i,o;return function(){var u=si(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=e(this);return null==s&&(this.style.removeProperty(t),s=u.getPropertyValue(t)),a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function xn(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function bn(t){return function(){this.textContent=t}}function Mn(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function Tn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function An(t){return tt().transition(t)}function Nn(){return++lu}function Cn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function kn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return pu.time=Lt(),pu;return e}function Sn(t){return{type:t}}function Un(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function En(){return new Un}function Dn(){}function Fn(t,n){var e=new Dn;if(t instanceof Dn)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i=(o=(_+g)/2))?_=o:g=o,(l=e>=(u=(v+y)/2))?v=u:y=u,i=p,!(p=p[h=l<<1|c]))return i[h]=d,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return d.next=p,i?i[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=n>=(o=(_+g)/2))?_=o:g=o,(l=e>=(u=(v+y)/2))?v=u:y=u}while((h=l<<1|c)==(f=(s>=u)<<1|a>=o));return i[f]=p,i[h]=d,t}function On(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,c=1/0,l=-(1/0),h=-(1/0);for(e=0;el&&(l=r),ih&&(h=i));for(l",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],s=!!n[7],c=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(s=!0,l="g"):Zu[l]||(l=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=s,this.precision=c,this.type=l}function Wn(){this.reset()}function Jn(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}function Gn(t){return t>1?0:t<-1?ea:Math.acos(t)}function Qn(t){return t>1?ra:t<-1?-ra:Math.asin(t)}function Kn(t){return function(n,e){var r=ua(n),i=ua(e),o=t(r*i);return[o*i*aa(n),o*aa(e)]}}function te(t){return function(n,e){var r=sa(n*n+e*e),i=t(r),o=aa(i);return[oa(n*o,r*ua(i)),Qn(r&&e*o/r)]}}function ne(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function ee(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function re(t,n){var e,r,i,o,u,a=new se(t),s=+t.value&&(a.value=t.value),c=[a];for(null==n&&(n=oe);e=c.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)c.push(r=e.children[o]=new se(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(ae)}function ie(){return re(this).eachBefore(ue)}function oe(t){return t.children}function ue(t){t.data=t.data.data}function ae(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function se(t){this.data=t,this.depth=this.height=0,this.parent=null}function ce(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function le(t){if(!t._start)try{he(t)}catch(n){if(t._tasks[t._ended+t._active-1])pe(t,n);else if(!t._data)throw n}}function he(t){for(;t._start=t._waiting&&t._active=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(t){}t._active=NaN,de(t)}function de(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function _e(t){return function(n,e){t(null==n?e:null)}}function ve(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function ge(t,n){return function(e){return t(e.responseText,n)}}function ye(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return u;do{u.push(new Date(+e))}while(n(e,o),t(e),e=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return Aa.setTime(+n),Na.setTime(+r),t(Aa),t(Na),Math.floor(e(Aa,Na))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}function me(t){return ye(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ka)/Sa})}function we(t){return ye(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/Sa})}function xe(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function be(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Me(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Te(t){function n(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,c=t.length;for(e instanceof Date||(e=new Date(+e));++a=s)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=$[i in Xa?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=U.exec(n.slice(e));return r?(t.p=E[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=P.exec(n.slice(e));return r?(t.w=Y[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=D.exec(n.slice(e));return r?(t.w=F[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=L.exec(n.slice(e));return r?(t.m=j[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){var r=H.exec(n.slice(e));return r?(t.m=q[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){return r(t,b,n,e)}function l(t,n,e){return r(t,M,n,e)}function h(t,n,e){return r(t,T,n,e)}function f(t){return C[t.getDay()]}function p(t){return N[t.getDay()]}function d(t){return S[t.getMonth()]}function _(t){return k[t.getMonth()]}function v(t){return A[+(t.getHours()>=12)]}function g(t){return C[t.getUTCDay()]}function y(t){return N[t.getUTCDay()]}function m(t){return S[t.getUTCMonth()]}function w(t){return k[t.getUTCMonth()]}function x(t){return A[+(t.getUTCHours()>=12)]}var b=t.dateTime,M=t.date,T=t.time,A=t.periods,N=t.days,C=t.shortDays,k=t.months,S=t.shortMonths,U=Ce(A),E=ke(A),D=Ce(N),F=ke(N),P=Ce(C),Y=ke(C),H=Ce(k),q=ke(k),L=Ce(S),j=ke(S),O={a:f,A:p,b:d,B:_,c:null,d:Xe,e:Xe,H:Ie,I:Re,j:Ze,L:Be,m:Ve,M:We,p:v,S:Je,U:Ge,w:Qe,W:Ke,x:null,X:null,y:tr,Y:nr,Z:er,"%":gr},z={a:g,A:y,b:m,B:w,c:null,d:rr,e:rr,H:ir,I:or,j:ur,L:ar,m:sr,M:cr,p:x,S:lr,U:hr,w:fr,W:pr,x:null,X:null,y:dr,Y:_r,Z:vr,"%":gr},$={a:o,A:u,b:a,B:s,c:c,d:He,e:He,H:Le,I:Le,j:qe,L:ze,m:Ye,M:je,p:i,S:Oe,U:Ue,w:Se,W:Ee,x:l,X:h,y:Fe,Y:De,Z:Pe,"%":$e};return O.x=n(M,O),O.X=n(T,O),O.c=n(b,O),z.x=n(M,z),z.X=n(T,z),z.c=n(b,z),{format:function(t){var e=n(t+="",O);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",xe);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",z);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,be);return n.toString=function(){return t},n}}}function Ae(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function Pe(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Ye(t,n,e){var r=Ia.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function He(t,n,e){var r=Ia.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function qe(t,n,e){var r=Ia.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Le(t,n,e){var r=Ia.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function je(t,n,e){var r=Ia.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Oe(t,n,e){var r=Ia.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function ze(t,n,e){var r=Ia.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function $e(t,n,e){var r=Ra.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Xe(t,n){return Ae(t.getDate(),n,2)}function Ie(t,n){return Ae(t.getHours(),n,2)}function Re(t,n){return Ae(t.getHours()%12||12,n,2)}function Ze(t,n){return Ae(1+Ua.count(Fa(t),t),n,3)}function Be(t,n){return Ae(t.getMilliseconds(),n,3)}function Ve(t,n){return Ae(t.getMonth()+1,n,2)}function We(t,n){return Ae(t.getMinutes(),n,2)}function Je(t,n){return Ae(t.getSeconds(),n,2)}function Ge(t,n){return Ae(Ea.count(Fa(t),t),n,2)}function Qe(t){return t.getDay()}function Ke(t,n){return Ae(Da.count(Fa(t),t),n,2)}function tr(t,n){return Ae(t.getFullYear()%100,n,2)}function nr(t,n){return Ae(t.getFullYear()%1e4,n,4)}function er(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Ae(n/60|0,"0",2)+Ae(n%60,"0",2)}function rr(t,n){return Ae(t.getUTCDate(),n,2)}function ir(t,n){return Ae(t.getUTCHours(),n,2)}function or(t,n){return Ae(t.getUTCHours()%12||12,n,2)}function ur(t,n){return Ae(1+Pa.count(qa(t),t),n,3)}function ar(t,n){return Ae(t.getUTCMilliseconds(),n,3)}function sr(t,n){return Ae(t.getUTCMonth()+1,n,2)}function cr(t,n){return Ae(t.getUTCMinutes(),n,2)}function lr(t,n){return Ae(t.getUTCSeconds(),n,2)}function hr(t,n){return Ae(Ya.count(qa(t),t),n,2)}function fr(t){return t.getUTCDay()}function pr(t,n){return Ae(Ha.count(qa(t),t),n,2)}function dr(t,n){return Ae(t.getUTCFullYear()%100,n,2)}function _r(t,n){return Ae(t.getUTCFullYear()%1e4,n,4)}function vr(){return"+0000"}function gr(){return"%"}function yr(t){return t.toISOString()}function mr(t){var n=new Date(t);return isNaN(n)?null:n}function wr(t){this._context=t}function xr(t){return t<0?-1:1}function br(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(xr(o)+xr(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Mr(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Tr(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Ar(t){this._context=t}function Nr(t){this._context=new Cr(t)}function Cr(t){this._context=t}var kr=function(t,n){return tn?1:t>=n?0:NaN},Sr=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}(kr),Ur=(Sr.right,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2),{value:function(){}});r.prototype=e.prototype={constructor:r,on:function(t,n){var e,r=this._,a=i(t+"",r),s=-1,c=a.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++s0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Dr.hasOwnProperty(n)?{space:Dr[n],local:t}:t},Pr=function(t){var n=Fr(t);return(n.local?s:a)(n)},Yr=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Hr=document.documentElement;if(!Hr.matches){var qr=Hr.webkitMatchesSelector||Hr.msMatchesSelector||Hr.mozMatchesSelector||Hr.oMatchesSelector;Yr=function(t){return function(){return qr.call(this,t)}}}}var Lr=Yr,jr={};if(t.event=null,"undefined"!=typeof document){"onmouseenter"in document.documentElement||(jr={mouseenter:"mouseover",mouseleave:"mouseout"})}var Or=function(t,n,e){var r,i,o=h(t+""),u=o.length;{if(!(arguments.length<2)){for(a=n?p:f,null==e&&(e=!1),r=0;r=b&&(b=x+1);!(w=v[b])&&++b=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},ti=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=m);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?N:"function"==typeof n?k:C)(t,n,null==e?"":e)):si(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},li=function(t,n){return arguments.length>1?this.each((null==n?S:"function"==typeof n?E:U)(t,n)):this.node()[t]};P.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var hi=function(t,n){var e=D(t+"");if(arguments.length<2){for(var r=F(this.node()),i=-1,o=e.length;++i=240?t-240:t+120,i,r),pt(t,i,r),pt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var qi=Math.PI/180,Li=180/Math.PI,ji=.95047,Oi=1,zi=1.08883,$i=4/29,Xi=6/29,Ii=3*Xi*Xi,Ri=Xi*Xi*Xi;Ti(vt,_t,nt(et,{brighter:function(t){return new vt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new vt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=Oi*yt(t),n=ji*yt(n),e=zi*yt(e),new st(mt(3.2404542*n-1.5371385*t-.4985314*e),mt(-.969266*n+1.8760108*t+.041556*e),mt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ti(Mt,bt,nt(et,{brighter:function(t){return new Mt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Mt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return dt(this).rgb()}}));var Zi=-.14861,Bi=1.78277,Vi=-.29227,Wi=-.90649,Ji=1.97294,Gi=Ji*Wi,Qi=Ji*Bi,Ki=Bi*Vi-Wi*Zi;Ti(Nt,At,nt(et,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Nt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Nt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*qi,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new st(255*(n+e*(Zi*r+Bi*i)),255*(n+e*(Vi*r+Wi*i)),255*(n+e*(Ji*r)),this.opacity)}}));var to,no,eo,ro,io=function(t){return function(){return t}},oo=function t(n){function e(t,n){var e=r((t=at(t)).r,(n=at(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=Et(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=Ut(n);return e.gamma=t,e}(1),uo=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),u=new Array(r);for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:so(e,r)})),o=ho.lastIndex;return oqo&&e.state1e-6)if(Math.abs(l*a-s*c)>1e-6&&i){var f=e-o,p=r-u,d=a*a+s*s,_=f*f+p*p,v=Math.sqrt(d),g=Math.sqrt(h),y=i*Math.tan((_u-Math.acos((d+h-_)/(2*v*g)))/2),m=y/g,w=y/v;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*c)+","+(n+m*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*p)+","+(this._x1=t+w*a)+","+(this._y1=n+w*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var u=e*Math.cos(r),a=e*Math.sin(r),s=t+u,c=n+a,l=1^o,h=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+s+","+c),e&&(h<0&&(h=h%vu+vu),h>gu?this._+="A"+e+","+e+",0,1,"+l+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+l+","+(this._x1=s)+","+(this._y1=c):h>1e-6&&(this._+="A"+e+","+e+",0,"+ +(h>=_u)+","+l+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};Dn.prototype=Fn.prototype={constructor:Dn,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var yu=Fn.prototype;Pn.prototype=Yn.prototype={constructor:Pn,has:yu.has,add:function(t){return t+="",this["$"+t]=t,this},remove:yu.remove,clear:yu.clear,values:yu.keys,size:yu.size,empty:yu.empty,each:yu.each};var mu=function(t){function n(t,n){var r,i,o=e(t,function(t,e){if(r)return r(t,e-1);i=t,r=n?qn(t,n):Hn(t)});return o.columns=i,o}function e(t,n){function e(){if(l>=c)return u;if(i)return i=!1,o;var n,e=l;if(34===t.charCodeAt(e)){for(var r=e;r++t||t>i||r>n||n>o))return this;var u,a,s=i-e,c=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{u=new Array(4),u[a]=c,c=u}while(s*=2,i=e+s,o=r+s,t>i||n>o);break;case 1:do{u=new Array(4),u[a]=c,c=u}while(s*=2,e=i-s,o=r+s,e>t||n>o);break;case 2:do{u=new Array(4),u[a]=c,c=u}while(s*=2,i=e+s,r=o-s,t>i||r>n);break;case 3:do{u=new Array(4),u[a]=c,c=u}while(s*=2,e=i-s,r=o-s,e>t||r>n)}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Nu=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},Cu=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ku=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i},Su=function(t,n,e){var r,i,o,u,a,s,c,l=this._x0,h=this._y0,f=this._x1,p=this._y1,d=[],_=this._root;for(_&&d.push(new ku(_,l,h,f,p)),null==e?e=1/0:(l=t-e,h=n-e,f=t+e,p=n+e,e*=e);s=d.pop();)if(!(!(_=s.node)||(i=s.x0)>f||(o=s.y0)>p||(u=s.x1)=g)<<1|t>=v)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=s)}else{var y=t-+this._x.call(null,_.data),m=n-+this._y.call(null,_.data),w=y*y+m*m;if(w=(a=(d+v)/2))?d=a:v=a,(l=u>=(s=(_+g)/2))?_=s:g=s,n=p,!(p=p[h=l<<1|c]))return this;if(!p.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[h]=i:delete n[h],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[f]=p:this._root=p),this):(this._root=i,this)},Eu=function(){return this._root},Du=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},Fu=function(t){var n,e,r,i,o,u,a=[],s=this._root;for(s&&a.push(new ku(s,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(s=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&s.length){var c=(r+o)/2,l=(i+u)/2;(e=s[3])&&a.push(new ku(e,c,l,o,u)),(e=s[2])&&a.push(new ku(e,r,l,c,u)),(e=s[1])&&a.push(new ku(e,c,i,o,l)),(e=s[0])&&a.push(new ku(e,r,i,c,l))}return this},Pu=function(t){var n,e=[],r=[];for(this._root&&e.push(new ku(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,u=n.x0,a=n.y0,s=n.x1,c=n.y1,l=(u+s)/2,h=(a+c)/2;(o=i[0])&&e.push(new ku(o,u,a,l,h)),(o=i[1])&&e.push(new ku(o,l,a,s,h)),(o=i[2])&&e.push(new ku(o,u,h,l,c)),(o=i[3])&&e.push(new ku(o,l,h,s,c))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Yu=function(t){return arguments.length?(this._x=t,this):this._x},Hu=function(t){return arguments.length?(this._y=t,this):this._y},qu=In.prototype=Rn.prototype;qu.copy=function(){var t,n,e=new Rn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Zn(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Zn(n));return e},qu.add=Tu,qu.addAll=On,qu.cover=Au,qu.data=Nu,qu.extent=Cu,qu.find=Su,qu.remove=Uu,qu.removeAll=zn,qu.root=Eu,qu.size=Du,qu.visit=Fu,qu.visitAfter=Pu,qu.x=Yu,qu.y=Hu;var Lu,ju=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},Ou=function(t){return t=ju(Math.abs(t)),t?t[1]:NaN},zu=function(t,n){return function(e,r){for(var i=e.length,o=[],u=0,a=t[0],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(e.substring(i-=a,i+a)),!((s+=a+1)>r));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}},$u=function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}},Xu=function(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;i0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},Iu=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Lu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ju(t,Math.max(0,n+o-1))[0]},Ru=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Zu={"":Xu,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Ru(100*t,n)},r:Ru,s:Iu,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Bn.prototype=Vn.prototype,Vn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Vu,Wu,Ju,Gu=function(t){return t},Qu=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"],Ku=function(t){function n(t){function n(t){var n,i,c,m=_,w=v;if("c"===d)w=g(t)+w,t="";else{t=+t;var x=t<0;if(t=g(Math.abs(t),p),x&&0==+t&&(x=!1),m=(x?"("===s?s:"-":"-"===s||"("===s?"":s)+m,w=w+("s"===d?Qu[8+Lu/3]:"")+(x&&"("===s?")":""),y)for(n=-1,i=t.length;++n(c=t.charCodeAt(n))||c>57){w=(46===c?o+t.slice(n+1):t.slice(n))+w,t=t.slice(0,n);break}}f&&!l&&(t=r(t,1/0));var b=m.length+t.length+w.length,M=b>1)+m+t+w+M.slice(b);break;default:t=M+m+t+w}return u(t)}t=Bn(t);var e=t.fill,a=t.align,s=t.sign,c=t.symbol,l=t.zero,h=t.width,f=t.comma,p=t.precision,d=t.type,_="$"===c?i[0]:"#"===c&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",v="$"===c?i[1]:/[%p]/.test(d)?"%":"",g=Zu[d],y=!d||/[defgprs%]/.test(d);return p=null==p?d?6:12:/[gprs]/.test(d)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=Bn(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Ou(e)/3))),o=Math.pow(10,-i),u=Qu[8+i/3];return function(t){return r(o*t)+u}}var r=t.grouping&&t.thousands?zu(t.grouping,t.thousands):Gu,i=t.currency,o=t.decimal,u=t.numerals?$u(t.numerals):Gu;return{format:n,formatPrefix:e}};!function(t){Vu=Ku(t),Wu=Vu.format,Ju=Vu.formatPrefix,Vu}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var ta=function(){return new Wn};Wn.prototype={ constructor:Wn,reset:function(){this.s=this.t=0},add:function(t){Jn(na,t,this.t),Jn(this,na.s,this.s),this.s?this.t+=na.t:this.s=na.t},valueOf:function(){return this.s}};var na=new Wn,ea=Math.PI,ra=ea/2,ia=ea/180,oa=(Math.abs,Math.atan,Math.atan2),ua=Math.cos,aa=Math.sin,sa=Math.sqrt;ta(),ta(),ta(),ta(),ta(),ta(),ta(),ta();ua(30*ia);Kn(function(t){return sa(2/(1+t))}).invert=te(function(t){return 2*Qn(t/2)}),Kn(function(t){return(t=Gn(t))&&t/aa(t)}).invert=te(function(t){return t});var ca=function(){return this.eachAfter(ne)},la=function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},fa=function(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e=0;)e+=r[i].value;n.value=e})},da=function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},_a=function(t){for(var n=this,e=ee(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},va=function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},ga=function(){var t=[];return this.each(function(n){t.push(n)}),t},ya=function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},ma=function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n};se.prototype=re.prototype={constructor:se,count:ca,each:la,eachAfter:fa,eachBefore:ha,sum:pa,sort:da,path:_a,ancestors:va,descendants:ga,leaves:ya,links:ma,copy:ie};ce.prototype=Object.create(se.prototype);var wa=([].slice,{}),xa=function(t,n){function r(t){var n,e=l.status;if(!e&&ve(l)||e>=200&&e<300||304===e){if(u)try{n=u.call(i,l)}catch(t){return void s.call("error",i,t)}else n=l;s.call("load",i,n)}else s.call("error",i,t)}var i,o,u,a,s=e("beforesend","progress","load","error"),c=Fn(),l=new XMLHttpRequest,h=null,f=null,p=0;if("undefined"==typeof XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=r:l.onreadystatechange=function(t){l.readyState>3&&r(t)},l.onprogress=function(t){s.call("progress",i,t)},i={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?c.get(t):(null==n?c.remove(t):c.set(t,n+""),i)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",i):o},responseType:function(t){return arguments.length?(a=t,i):a},timeout:function(t){return arguments.length?(p=+t,i):p},user:function(t){return arguments.length<1?h:(h=null==t?null:t+"",i)},password:function(t){return arguments.length<1?f:(f=null==t?null:t+"",i)},response:function(t){return u=t,i},get:function(t,n){return i.send("GET",t,n)},post:function(t,n){return i.send("POST",t,n)},send:function(n,e,r){return l.open(n,t,!0,h,f),null==o||c.has("accept")||c.set("accept",o+",*/*"),l.setRequestHeader&&c.each(function(t,n){l.setRequestHeader(n,t)}),null!=o&&l.overrideMimeType&&l.overrideMimeType(o),null!=a&&(l.responseType=a),p>0&&(l.timeout=p),null==r&&"function"==typeof e&&(r=e,e=null),null!=r&&1===r.length&&(r=_e(r)),null!=r&&i.on("error",r).on("load",function(t){r(null,t)}),s.call("beforesend",i,l),l.send(null==e?null:e),i},abort:function(){return l.abort(),i},on:function(){var t=s.on.apply(s,arguments);return t===s?i:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i},ba=function(t,n){return function(e,r){var i=xa(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}};ba("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),ba("application/json",function(t){return JSON.parse(t.responseText)}),ba("text/plain",function(t){return t.responseText}),ba("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});var Ma=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=xa(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(ge(n,r=t)):r},o.row(r),i?o.get(i):o}};Ma("text/csv",xu),Ma("text/tab-separated-values",Mu);var Ta=Array.prototype,Aa=(Ta.map,Ta.slice,new Date),Na=new Date,Ca=ye(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Ca.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ye(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):Ca:null};var ka=6e4,Sa=6048e5,Ua=(ye(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),ye(function(t){t.setTime(Math.floor(t/ka)*ka)},function(t,n){t.setTime(+t+n*ka)},function(t,n){return(n-t)/ka},function(t){return t.getMinutes()}),ye(function(t){var n=t.getTimezoneOffset()*ka%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),ye(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ka)/864e5},function(t){return t.getDate()-1})),Ea=me(0),Da=me(1),Fa=(me(2),me(3),me(4),me(5),me(6),ye(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),ye(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}));Fa.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ye(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Pa=(ye(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*ka)},function(t,n){return(n-t)/ka},function(t){return t.getUTCMinutes()}),ye(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),ye(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1})),Ya=we(0),Ha=we(1),qa=(we(2),we(3),we(4),we(5),we(6),ye(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),ye(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}));qa.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ye(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var La,ja,Oa,za,$a,Xa={"-":"",_:" ",0:"0"},Ia=/^\s*\d+/,Ra=/^%/,Za=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;!function(t){La=Te(t),ja=La.format,Oa=La.parse,za=La.utcFormat,$a=La.utcParse,La}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var Ba=(Date.prototype.toISOString||za("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||$a("%Y-%m-%dT%H:%M:%S.%LZ"),function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})});Ba("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ba("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Ba("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Ba("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),bo(At(300,.5,0),At(-240,.5,1));bo(At(-100,.75,.35),At(80,1.5,.8)),bo(At(260,.75,.35),At(80,1.5,.8)),At();wr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};Ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Tr(this,this._t0,Mr(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Tr(this,Mr(this,e=br(this,t,n)),e);break;default:Tr(this,this._t0,e=br(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Nr.prototype=Object.create(Ar.prototype)).point=function(t,n){Ar.prototype.point.call(this,n,t)},Cr.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}};t.select=bi,t.selectAll=Mi,Object.defineProperty(t,"__esModule",{value:!0})});