d3.min.js 208 KB

1234567
  1. (function(t,n){typeof exports==="object"&&typeof module!=="undefined"?n(exports):typeof define==="function"&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";var n="4.0.0";function e(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function r(t){if(t.length===1)t=i(t);return{left:function(n,e,r,i){if(r==null)r=0;if(i==null)i=n.length;while(r<i){var a=r+i>>>1;if(t(n[a],e)<0)r=a+1;else i=a}return r},right:function(n,e,r,i){if(r==null)r=0;if(i==null)i=n.length;while(r<i){var a=r+i>>>1;if(t(n[a],e)>0)i=a;else r=a+1}return r}}}function i(t){return function(n,r){return e(t(n),r)}}var a=r(e);var o=a.right;var u=a.left;function f(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function c(t){return t===null?NaN:+t}function s(t,n){var e=t.length,r=0,i,a,o=0,u=-1,f=0;if(n==null){while(++u<e){if(!isNaN(i=c(t[u]))){a=i-r;r+=a/++f;o+=a*(i-r)}}}else{while(++u<e){if(!isNaN(i=c(n(t[u],u,t)))){a=i-r;r+=a/++f;o+=a*(i-r)}}}if(f>1)return o/(f-1)}function l(t,n){var e=s(t,n);return e?Math.sqrt(e):e}function h(t,n){var e=-1,r=t.length,i,a,o;if(n==null){while(++e<r)if((a=t[e])!=null&&a>=a){i=o=a;break}while(++e<r)if((a=t[e])!=null){if(i>a)i=a;if(o<a)o=a}}else{while(++e<r)if((a=n(t[e],e,t))!=null&&a>=a){i=o=a;break}while(++e<r)if((a=n(t[e],e,t))!=null){if(i>a)i=a;if(o<a)o=a}}return[i,o]}var p=Array.prototype;var v=p.slice;var d=p.map;function _(t){return function(){return t}}function y(t){return t}function g(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;var r=-1,i=Math.max(0,Math.ceil((n-t)/e))|0,a=new Array(i);while(++r<i){a[r]=t+r*e}return a}var m=Math.sqrt(50);var x=Math.sqrt(10);var w=Math.sqrt(2);function b(t,n,e){var r=M(t,n,e);return g(Math.ceil(t/r)*r,Math.floor(n/r)*r+r/2,r)}function M(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;if(a>=m)i*=10;else if(a>=x)i*=5;else if(a>=w)i*=2;return n<t?-i:i}function k(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function T(){var t=y,n=h,e=k;function r(r){var i,a=r.length,u,f=new Array(a);for(i=0;i<a;++i){f[i]=t(r[i],i,r)}var c=n(f),s=c[0],l=c[1],h=e(f,s,l);if(!Array.isArray(h))h=b(s,l,h);var p=h.length;while(h[0]<=s)h.shift(),--p;while(h[p-1]>=l)h.pop(),--p;var v=new Array(p+1),d;for(i=0;i<=p;++i){d=v[i]=[];d.x0=i>0?h[i-1]:s;d.x1=i<p?h[i]:l}for(i=0;i<a;++i){u=f[i];if(s<=u&&u<=l){v[o(h,u,0,p)].push(r[i])}}return v}r.value=function(n){return arguments.length?(t=typeof n==="function"?n:_(n),r):t};r.domain=function(t){return arguments.length?(n=typeof t==="function"?t:_([t[0],t[1]]),r):n};r.thresholds=function(t){return arguments.length?(e=typeof t==="function"?t:Array.isArray(t)?_(v.call(t)):_(t),r):e};return r}function N(t,n,e){if(e==null)e=c;if(!(r=t.length))return;if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),o=+e(t[a],a,t),u=+e(t[a+1],a+1,t);return o+(u-o)*(i-a)}function S(t,n,r){t=d.call(t,c).sort(e);return Math.ceil((r-n)/(2*(N(t,.75)-N(t,.25))*Math.pow(t.length,-1/3)))}function E(t,n,e){return Math.ceil((e-n)/(3.5*l(t)*Math.pow(t.length,-1/3)))}function A(t,n){var e=-1,r=t.length,i,a;if(n==null){while(++e<r)if((a=t[e])!=null&&a>=a){i=a;break}while(++e<r)if((a=t[e])!=null&&a>i)i=a}else{while(++e<r)if((a=n(t[e],e,t))!=null&&a>=a){i=a;break}while(++e<r)if((a=n(t[e],e,t))!=null&&a>i)i=a}return i}function C(t,n){var e=0,r=t.length,i,a=-1,o=r;if(n==null){while(++a<r)if(!isNaN(i=c(t[a])))e+=i;else--o}else{while(++a<r)if(!isNaN(i=c(n(t[a],a,t))))e+=i;else--o}if(o)return e/o}function z(t,n){var r=[],i=t.length,a,o=-1;if(n==null){while(++o<i)if(!isNaN(a=c(t[o])))r.push(a)}else{while(++o<i)if(!isNaN(a=c(n(t[o],o,t))))r.push(a)}return N(r.sort(e),.5)}function P(t){var n=t.length,e,r=-1,i=0,a,o;while(++r<n)i+=t[r].length;a=new Array(i);while(--n>=0){o=t[n];e=o.length;while(--e>=0){a[--i]=o[e]}}return a}function L(t,n){var e=-1,r=t.length,i,a;if(n==null){while(++e<r)if((a=t[e])!=null&&a>=a){i=a;break}while(++e<r)if((a=t[e])!=null&&i>a)i=a}else{while(++e<r)if((a=n(t[e],e,t))!=null&&a>=a){i=a;break}while(++e<r)if((a=n(t[e],e,t))!=null&&i>a)i=a}return i}function q(t){var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);while(n<e)i[n]=[r,r=t[++n]];return i}function U(t,n){var e=n.length,r=new Array(e);while(e--)r[e]=t[n[e]];return r}function I(t,n){if(!(i=t.length))return;var r=0,i,a=0,o,u=t[a];if(!n)n=e;while(++r<i)if(n(o=t[r],u)<0||n(u,u)!==0)u=o,a=r;if(n(u,u)===0)return a}function R(t,n,e){var r=(e==null?t.length:e)-(n=n==null?0:+n),i,a;while(r){a=Math.random()*r--|0;i=t[r+n];t[r+n]=t[a+n];t[a+n]=i}return t}function D(t,n){var e=0,r=t.length,i,a=-1;if(n==null){while(++a<r)if(i=+t[a])e+=i}else{while(++a<r)if(i=+n(t[a],a,t))e+=i}return e}function O(t){if(!(a=t.length))return[];for(var n=-1,e=L(t,F),r=new Array(e);++n<e;){for(var i=-1,a,o=r[n]=new Array(a);++i<a;){o[i]=t[i][n]}}return r}function F(t){return t.length}function Y(){return O(arguments)}var B="$";function j(){}j.prototype=H.prototype={constructor:j,has:function(t){return B+t in this},get:function(t){return this[B+t]},set:function(t,n){this[B+t]=n;return this},remove:function(t){var n=B+t;return n in this&&delete this[n]},clear:function(){for(var t in this)if(t[0]===B)delete this[t]},keys:function(){var t=[];for(var n in this)if(n[0]===B)t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)if(n[0]===B)t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)if(n[0]===B)t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)if(n[0]===B)++t;return t},empty:function(){for(var t in this)if(t[0]===B)return false;return true},each:function(t){for(var n in this)if(n[0]===B)t(this[n],n.slice(1),this)}};function H(t,n){var e=new j;if(t instanceof j)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r=-1,i=t.length,a;if(n==null)while(++r<i)e.set(r,t[r]);else while(++r<i)e.set(n(a=t[r],r,t),a)}else if(t)for(var o in t)e.set(o,t[o]);return e}function X(){var t=[],n=[],e,r,i;function a(n,i,o,u){if(i>=t.length)return r!=null?r(n):e!=null?n.sort(e):n;var f=-1,c=n.length,s=t[i++],l,h,p=H(),v,d=o();while(++f<c){if(v=p.get(l=s(h=n[f])+"")){v.push(h)}else{p.set(l,[h])}}p.each(function(t,n){u(d,n,a(t,i,o,u))});return d}function o(e,i){if(++i>t.length)return e;var a,u=n[i-1];if(r!=null&&i>=t.length)a=e.entries();else a=[],e.each(function(t,n){a.push({key:n,values:o(t,i)})});return u!=null?a.sort(function(t,n){return u(t.key,n.key)}):a}return i={object:function(t){return a(t,0,V,W)},map:function(t){return a(t,0,$,Z)},entries:function(t){return o(a(t,0,$,Z),0)},key:function(n){t.push(n);return i},sortKeys:function(e){n[t.length-1]=e;return i},sortValues:function(t){e=t;return i},rollup:function(t){r=t;return i}}}function V(){return{}}function W(t,n,e){t[n]=e}function $(){return H()}function Z(t,n,e){t.set(n,e)}function G(){}var J=H.prototype;G.prototype=Q.prototype={constructor:G,has:J.has,add:function(t){t+="";this[B+t]=t;return this},remove:J.remove,clear:J.clear,values:J.keys,size:J.size,empty:J.empty,each:J.each};function Q(t,n){var e=new G;if(t instanceof G)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(n==null)while(++r<i)e.add(t[r]);else while(++r<i)e.add(n(t[r],r,t))}return e}function K(t){var n=[];for(var e in t)n.push(e);return n}function tt(t){var n=[];for(var e in t)n.push(t[e]);return n}function nt(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n}function et(t,n){t=t==null?0:+t;n=n==null?1:+n;if(arguments.length===1)n=t,t=0;else n-=t;return function(){return Math.random()*n+t}}function rt(t,n){var e,r;t=t==null?0:+t;n=n==null?1:+n;return function(){var i;if(e!=null)i=e,e=null;else do{e=Math.random()*2-1;i=Math.random()*2-1;r=e*e+i*i}while(!r||r>1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}}function it(){var t=rt.apply(this,arguments);return function(){return Math.exp(t())}}function at(t){return function(){for(var n=0,e=0;e<t;++e)n+=Math.random();return n}}function ot(t){var n=at(t);return function(){return n()/t}}function ut(t){return function(){return-Math.log(1-Math.random())/t}}function ft(t){return+t}function ct(t){return t*t}function st(t){return t*(2-t)}function lt(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ht(t){return t*t*t}function pt(t){return--t*t*t+1}function vt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var dt=3;var _t=function t(n){n=+n;function e(t){return Math.pow(t,n)}e.exponent=t;return e}(dt);var yt=function t(n){n=+n;function e(t){return 1-Math.pow(1-t,n)}e.exponent=t;return e}(dt);var gt=function t(n){n=+n;function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}e.exponent=t;return e}(dt);var mt=Math.PI;var xt=mt/2;function wt(t){return 1-Math.cos(t*xt)}function bt(t){return Math.sin(t*xt)}function Mt(t){return(1-Math.cos(mt*t))/2}function kt(t){return Math.pow(2,10*t-10)}function Tt(t){return 1-Math.pow(2,-10*t)}function Nt(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function St(t){return 1-Math.sqrt(1-t*t)}function Et(t){return Math.sqrt(1- --t*t)}function At(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ct=4/11;var zt=6/11;var Pt=8/11;var Lt=3/4;var qt=9/11;var Ut=10/11;var It=15/16;var Rt=21/22;var Dt=63/64;var Ot=1/Ct/Ct;function Ft(t){return 1-Yt(1-t)}function Yt(t){return(t=+t)<Ct?Ot*t*t:t<Pt?Ot*(t-=zt)*t+Lt:t<Ut?Ot*(t-=qt)*t+It:Ot*(t-=Rt)*t+Dt}function Bt(t){return((t*=2)<=1?1-Yt(1-t):Yt(t-1)+1)/2}var jt=1.70158;var Ht=function t(n){n=+n;function e(t){return t*t*((n+1)*t-n)}e.overshoot=t;return e}(jt);var Xt=function t(n){n=+n;function e(t){return--t*t*((n+1)*t+n)+1}e.overshoot=t;return e}(jt);var Vt=function t(n){n=+n;function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}e.overshoot=t;return e}(jt);var Wt=2*Math.PI;var $t=1;var Zt=.3;var Gt=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wt);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}i.amplitude=function(n){return t(n,e*Wt)};i.period=function(e){return t(n,e)};return i}($t,Zt);var Jt=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wt);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}i.amplitude=function(n){return t(n,e*Wt)};i.period=function(e){return t(n,e)};return i}($t,Zt);var Qt=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Wt);function i(t){return((t=t*2-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}i.amplitude=function(n){return t(n,e*Wt)};i.period=function(e){return t(n,e)};return i}($t,Zt);function Kt(t){var n=-1,e=t.length,r,i=t[e-1],a=0;while(++n<e){r=i;i=t[n];a+=r[1]*i[0]-r[0]*i[1]}return a/2}function tn(t){var n=-1,e=t.length,r=0,i=0,a,o=t[e-1],u,f=0;while(++n<e){a=o;o=t[n];f+=u=a[0]*o[1]-o[0]*a[1];r+=(a[0]+o[0])*u;i+=(a[1]+o[1])*u}return f*=3,[r/f,i/f]}function nn(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function en(t,n){return t[0]-n[0]||t[1]-n[1]}function rn(t){var n=t.length,e=[0,1],r=2;for(var i=2;i<n;++i){while(r>1&&nn(t[e[r-2]],t[e[r-1]],t[i])<=0)--r;e[r++]=i}return e.slice(0,r)}function an(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];r.sort(en);for(n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var a=rn(r),o=rn(i);var u=o[0]===a[0],f=o[o.length-1]===a[a.length-1],c=[];for(n=a.length-1;n>=0;--n)c.push(t[r[a[n]][2]]);for(n=+u;n<o.length-f;++n)c.push(t[r[o[n]][2]]);return c}function on(t,n){var e=t.length,r=t[e-1],i=n[0],a=n[1],o=r[0],u=r[1],f,c,s=false;for(var l=0;l<e;++l){r=t[l],f=r[0],c=r[1];if(c>a!==u>a&&i<(o-f)*(a-c)/(u-c)+f)s=!s;o=f,u=c}return s}function un(t){var n=-1,e=t.length,r=t[e-1],i,a,o=r[0],u=r[1],f=0;while(++n<e){i=o;a=u;r=t[n];o=r[0];u=r[1];i-=o;a-=u;f+=Math.sqrt(i*i+a*a)}return f}var fn=Math.PI;var cn=2*fn;var sn=1e-6;var ln=cn-sn;function hn(){this._x0=this._y0=this._x1=this._y1=null;this._=[]}function pn(){return new hn}hn.prototype=pn.prototype={constructor:hn,moveTo:function(t,n){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n)},closePath:function(){if(this._x1!==null){this._x1=this._x0,this._y1=this._y0;this._.push("Z")}},lineTo:function(t,n){this._.push("L",this._x1=+t,",",this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._.push("Q",+t,",",+n,",",this._x1=+e,",",this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,a){this._.push("C",+t,",",+n,",",+e,",",+r,",",this._x1=+i,",",this._y1=+a)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var a=this._x1,o=this._y1,u=e-t,f=r-n,c=a-t,s=o-n,l=c*c+s*s;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null){this._.push("M",this._x1=t,",",this._y1=n)}else if(!(l>sn));else if(!(Math.abs(s*u-f*c)>sn)||!i){this._.push("L",this._x1=t,",",this._y1=n)}else{var h=e-a,p=r-o,v=u*u+f*f,d=h*h+p*p,_=Math.sqrt(v),y=Math.sqrt(l),g=i*Math.tan((fn-Math.acos((v+l-d)/(2*_*y)))/2),m=g/y,x=g/_;if(Math.abs(m-1)>sn){this._.push("L",t+m*c,",",n+m*s)}this._.push("A",i,",",i,",0,0,",+(s*h>c*p),",",this._x1=t+x*u,",",this._y1=n+x*f)}},arc:function(t,n,e,r,i,a){t=+t,n=+n,e=+e;var o=e*Math.cos(r),u=e*Math.sin(r),f=t+o,c=n+u,s=1^a,l=a?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);if(this._x1===null){this._.push("M",f,",",c)}else if(Math.abs(this._x1-f)>sn||Math.abs(this._y1-c)>sn){this._.push("L",f,",",c)}if(!e)return;if(l>ln){this._.push("A",e,",",e,",0,1,",s,",",t-o,",",n-u,"A",e,",",e,",0,1,",s,",",this._x1=f,",",this._y1=c)}else{if(l<0)l=l%cn+cn;this._.push("A",e,",",e,",0,",+(l>=fn),",",s,",",this._x1=t+e*Math.cos(i),",",this._y1=n+e*Math.sin(i))}},rect:function(t,n,e,r){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n,"h",+e,"v",+r,"h",-e,"Z")},toString:function(){return this._.join("")}};function vn(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return dn(this.cover(n,e),n,e,t)}function dn(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,a=t._root,o={data:r},u=t._x0,f=t._y0,c=t._x1,s=t._y1,l,h,p,v,d,_,y,g;if(!a)return t._root=o,t;while(a.length){if(d=n>=(l=(u+c)/2))u=l;else c=l;if(_=e>=(h=(f+s)/2))f=h;else s=h;if(i=a,!(a=a[y=_<<1|d]))return i[y]=o,t}p=+t._x.call(null,a.data);v=+t._y.call(null,a.data);if(n===p&&e===v)return o.next=a,i?i[y]=o:t._root=o,t;do{i=i?i[y]=new Array(4):t._root=new Array(4);if(d=n>=(l=(u+c)/2))u=l;else c=l;if(_=e>=(h=(f+s)/2))f=h;else s=h}while((y=_<<1|d)===(g=(v>=h)<<1|p>=l));return i[g]=a,i[y]=o,t}function _n(t){var n,e,r=t.length,i,a,o=new Array(r),u=new Array(r),f=Infinity,c=Infinity,s=-Infinity,l=-Infinity;for(e=0;e<r;++e){if(isNaN(i=+this._x.call(null,n=t[e]))||isNaN(a=+this._y.call(null,n)))continue;o[e]=i;u[e]=a;if(i<f)f=i;if(i>s)s=i;if(a<c)c=a;if(a>l)l=a}if(s<f)f=this._x0,s=this._x1;if(l<c)c=this._y0,l=this._y1;this.cover(f,c).cover(s,l);for(e=0;e<r;++e){dn(this,o[e],u[e],t[e])}return this}function yn(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(e)){i=(e=Math.floor(t))+1;a=(r=Math.floor(n))+1}else if(e>t||t>i||r>n||n>a){var o=i-e,u=this._root,f,c;switch(c=(n<(r+a)/2)<<1|t<(e+i)/2){case 0:{do f=new Array(4),f[c]=u,u=f;while(o*=2,i=e+o,a=r+o,t>i||n>a);break}case 1:{do f=new Array(4),f[c]=u,u=f;while(o*=2,e=i-o,a=r+o,e>t||n>a);break}case 2:{do f=new Array(4),f[c]=u,u=f;while(o*=2,i=e+o,r=a-o,t>i||r>n);break}case 3:{do f=new Array(4),f[c]=u,u=f;while(o*=2,e=i-o,r=a-o,e>t||r>n);break}}if(this._root&&this._root.length)this._root=u}else return this;this._x0=e;this._y0=r;this._x1=i;this._y1=a;return this}function gn(){var t=[];this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)});return t}function mn(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?undefined:[[this._x0,this._y0],[this._x1,this._y1]]}function xn(t,n,e,r,i){this.node=t;this.x0=n;this.y0=e;this.x1=r;this.y1=i}function wn(t,n,e){var r,i=this._x0,a=this._y0,o,u,f,c,s=this._x1,l=this._y1,h=[],p=this._root,v,d;if(p)h.push(new xn(p,i,a,s,l));if(e==null)e=Infinity;else{i=t-e,a=n-e;s=t+e,l=n+e;e*=e}while(v=h.pop()){if(!(p=v.node)||(o=v.x0)>s||(u=v.y0)>l||(f=v.x1)<i||(c=v.y1)<a)continue;if(p.length){var _=(o+f)/2,y=(u+c)/2;h.push(new xn(p[3],_,y,f,c),new xn(p[2],o,y,_,c),new xn(p[1],_,u,f,y),new xn(p[0],o,u,_,y));if(d=(n>=y)<<1|t>=_){v=h[h.length-1];h[h.length-1]=h[h.length-1-d];h[h.length-1-d]=v}}else{var g=t-+this._x.call(null,p.data),m=n-+this._y.call(null,p.data),x=g*g+m*m;if(x<e){var w=Math.sqrt(e=x);i=t-w,a=n-w;s=t+w,l=n+w;r=p.data}}}return r}function bn(t){if(isNaN(s=+this._x.call(null,t))||isNaN(l=+this._y.call(null,t)))return this;var n,e=this._root,r,i,a,o=this._x0,u=this._y0,f=this._x1,c=this._y1,s,l,h,p,v,d,_,y;if(!e)return this;if(e.length)while(true){if(v=s>=(h=(o+f)/2))o=h;else f=h;if(d=l>=(p=(u+c)/2))u=p;else c=p;if(!(n=e,e=e[_=d<<1|v]))return this;if(!e.length)break;if(n[_+1&3]||n[_+2&3]||n[_+3&3])r=n,y=_}while(e.data!==t)if(!(i=e,e=e.next))return this;if(a=e.next)delete e.next;if(i)return a?i.next=a:delete i.next,this;if(!n)return this._root=a,this;a?n[_]=a:delete n[_];if((e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length){if(r)r[y]=e;else this._root=e}return this}function Mn(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function kn(){return this._root}function Tn(){var t=0;this.visit(function(n){if(!n.length)do++t;while(n=n.next)});return t}function Nn(t){var n=[],e,r=this._root,i,a,o,u,f;if(r)n.push(new xn(r,this._x0,this._y0,this._x1,this._y1));while(e=n.pop()){if(!t(r=e.node,a=e.x0,o=e.y0,u=e.x1,f=e.y1)&&r.length){var c=(a+u)/2,s=(o+f)/2;if(i=r[3])n.push(new xn(i,c,s,u,f));if(i=r[2])n.push(new xn(i,a,s,c,f));if(i=r[1])n.push(new xn(i,c,o,u,s));if(i=r[0])n.push(new xn(i,a,o,c,s))}}return this}function Sn(t){var n=[],e=[],r;if(this._root)n.push(new xn(this._root,this._x0,this._y0,this._x1,this._y1));while(r=n.pop()){var i=r.node;if(i.length){var a,o=r.x0,u=r.y0,f=r.x1,c=r.y1,s=(o+f)/2,l=(u+c)/2;if(a=i[0])n.push(new xn(a,o,u,s,l));if(a=i[1])n.push(new xn(a,s,u,f,l));if(a=i[2])n.push(new xn(a,o,l,s,c));if(a=i[3])n.push(new xn(a,s,l,f,c))}e.push(r)}while(r=e.pop()){t(r.node,r.x0,r.y0,r.x1,r.y1)}return this}function En(t){return t[0]}function An(t){return arguments.length?(this._x=t,this):this._x}function Cn(t){return t[1]}function zn(t){return arguments.length?(this._y=t,this):this._y}function Pn(t,n,e){var r=new Ln(n==null?En:n,e==null?Cn:e,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Ln(t,n,e,r,i,a){this._x=t;this._y=n;this._x0=e;this._y0=r;this._x1=i;this._y1=a;this._root=undefined}function qn(t){var n={data:t.data},e=n;while(t=t.next)e=e.next={data:t.data};return n}var Un=Pn.prototype=Ln.prototype;Un.copy=function(){var t=new Ln(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,e,r;if(!n)return t;if(!n.length)return t._root=qn(n),t;e=[{source:n,target:t._root=new Array(4)}];while(n=e.pop()){for(var i=0;i<4;++i){if(r=n.source[i]){if(r.length)e.push({source:r,target:n.target[i]=new Array(4)});else n.target[i]=qn(r)}}}return t};Un.add=vn;Un.addAll=_n;Un.cover=yn;Un.data=gn;Un.extent=mn;Un.find=wn;Un.remove=bn;Un.removeAll=Mn;Un.root=kn;Un.size=Tn;Un.visit=Nn;Un.visitAfter=Sn;Un.x=An;Un.y=zn;var In=[].slice;var Rn={};function Dn(t){if(!(t>=1))throw new Error;this._size=t;this._call=this._error=null;this._tasks=[];this._data=[];this._waiting=this._active=this._ended=this._start=0}Dn.prototype=Hn.prototype={constructor:Dn,defer:function(t){if(typeof t!=="function"||this._call)throw new Error;if(this._error!=null)return this;var n=In.call(arguments,1);n.push(t);++this._waiting,this._tasks.push(n);On(this);return this},abort:function(){if(this._error==null)Bn(this,new Error("abort"));return this},await:function(t){if(typeof t!=="function"||this._call)throw new Error;this._call=function(n,e){t.apply(null,[n].concat(e))};jn(this);return this},awaitAll:function(t){if(typeof t!=="function"||this._call)throw new Error;this._call=t;jn(this);return this}};function On(t){if(!t._start)try{Fn(t)}catch(n){if(t._tasks[t._ended+t._active-1])Bn(t,n)}}function Fn(t){while(t._start=t._waiting&&t._active<t._size){var n=t._ended+t._active,e=t._tasks[n],r=e.length-1,i=e[r];e[r]=Yn(t,n);--t._waiting,++t._active;e=i.apply(null,e);if(!t._tasks[n])continue;t._tasks[n]=e||Rn}}function Yn(t,n){return function(e,r){if(!t._tasks[n])return;--t._active,++t._ended;t._tasks[n]=null;if(t._error!=null)return;if(e!=null){Bn(t,e)}else{t._data[n]=r;if(t._waiting)On(t);else jn(t)}}}function Bn(t,n){var e=t._tasks.length,r;t._error=n;t._data=undefined;t._waiting=NaN;while(--e>=0){if(r=t._tasks[e]){t._tasks[e]=null;if(r.abort)try{r.abort()}catch(t){}}}t._active=NaN;jn(t)}function jn(t){if(!t._active&&t._call)t._call(t._error,t._data)}function Hn(t){return new Dn(arguments.length?+t:Infinity)}function Xn(t){return function n(){return t}}var Vn=1e-12;var Wn=Math.PI;var $n=Wn/2;var Zn=2*Wn;function Gn(t){return t.innerRadius}function Jn(t){return t.outerRadius}function Qn(t){return t.startAngle}function Kn(t){return t.endAngle}function te(t){return t&&t.padAngle}function ne(t){return t>=1?$n:t<=-1?-$n:Math.asin(t)}function ee(t,n,e,r,i,a,o,u){var f=e-t,c=r-n,s=o-i,l=u-a,h=(s*(n-a)-l*(t-i))/(l*f-s*c);return[t+h*f,n+h*c]}function re(t,n,e,r,i,a,o){var u=t-e,f=n-r,c=(o?a:-a)/Math.sqrt(u*u+f*f),s=c*f,l=-c*u,h=t+s,p=n+l,v=e+s,d=r+l,_=(h+v)/2,y=(p+d)/2,g=v-h,m=d-p,x=g*g+m*m,w=i-a,b=h*d-v*p,M=(m<0?-1:1)*Math.sqrt(Math.max(0,w*w*x-b*b)),k=(b*m-g*M)/x,T=(-b*g-m*M)/x,N=(b*m+g*M)/x,S=(-b*g+m*M)/x,E=k-_,A=T-y,C=N-_,z=S-y;if(E*E+A*A>C*C+z*z)k=N,T=S;return{cx:k,cy:T,x01:-s,y01:-l,x11:k*(i/w-1),y11:T*(i/w-1)}}function ie(){var t=Gn,n=Jn,e=Xn(0),r=null,i=Qn,a=Kn,o=te,u=null;function f(){var f,c,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-$n,p=a.apply(this,arguments)-$n,v=Math.abs(p-h),d=p>h;if(!u)u=f=pn();if(l<s)c=l,l=s,s=c;if(!(l>Vn))u.moveTo(0,0);else if(v>Zn-Vn){u.moveTo(l*Math.cos(h),l*Math.sin(h));u.arc(0,0,l,h,p,!d);if(s>Vn){u.moveTo(s*Math.cos(p),s*Math.sin(p));u.arc(0,0,s,p,h,d)}}else{var _=h,y=p,g=h,m=p,x=v,w=v,b=o.apply(this,arguments)/2,M=b>Vn&&(r?+r.apply(this,arguments):Math.sqrt(s*s+l*l)),k=Math.min(Math.abs(l-s)/2,+e.apply(this,arguments)),T=k,N=k,S,E;if(M>Vn){var A=ne(M/s*Math.sin(b)),C=ne(M/l*Math.sin(b));if((x-=A*2)>Vn)A*=d?1:-1,g+=A,m-=A;else x=0,g=m=(h+p)/2;if((w-=C*2)>Vn)C*=d?1:-1,_+=C,y-=C;else w=0,_=y=(h+p)/2}var z=l*Math.cos(_),P=l*Math.sin(_),L=s*Math.cos(m),q=s*Math.sin(m);if(k>Vn){var U=l*Math.cos(y),I=l*Math.sin(y),R=s*Math.cos(g),D=s*Math.sin(g);if(v<Wn){var O=x>Vn?ee(z,P,R,D,U,I,L,q):[L,q],F=z-O[0],Y=P-O[1],B=U-O[0],j=I-O[1],H=1/Math.sin(Math.acos((F*B+Y*j)/(Math.sqrt(F*F+Y*Y)*Math.sqrt(B*B+j*j)))/2),X=Math.sqrt(O[0]*O[0]+O[1]*O[1]);T=Math.min(k,(s-X)/(H-1));N=Math.min(k,(l-X)/(H+1))}}if(!(w>Vn))u.moveTo(z,P);else if(N>Vn){S=re(R,D,z,P,l,N,d);E=re(U,I,L,q,l,N,d);u.moveTo(S.cx+S.x01,S.cy+S.y01);if(N<k)u.arc(S.cx,S.cy,N,Math.atan2(S.y01,S.x01),Math.atan2(E.y01,E.x01),!d);else{u.arc(S.cx,S.cy,N,Math.atan2(S.y01,S.x01),Math.atan2(S.y11,S.x11),!d);u.arc(0,0,l,Math.atan2(S.cy+S.y11,S.cx+S.x11),Math.atan2(E.cy+E.y11,E.cx+E.x11),!d);u.arc(E.cx,E.cy,N,Math.atan2(E.y11,E.x11),Math.atan2(E.y01,E.x01),!d)}}else u.moveTo(z,P),u.arc(0,0,l,_,y,!d);if(!(s>Vn)||!(x>Vn))u.lineTo(L,q);else if(T>Vn){S=re(L,q,U,I,s,-T,d);E=re(z,P,R,D,s,-T,d);u.lineTo(S.cx+S.x01,S.cy+S.y01);if(T<k)u.arc(S.cx,S.cy,T,Math.atan2(S.y01,S.x01),Math.atan2(E.y01,E.x01),!d);else{u.arc(S.cx,S.cy,T,Math.atan2(S.y01,S.x01),Math.atan2(S.y11,S.x11),!d);u.arc(0,0,s,Math.atan2(S.cy+S.y11,S.cx+S.x11),Math.atan2(E.cy+E.y11,E.cx+E.x11),d);u.arc(E.cx,E.cy,T,Math.atan2(E.y11,E.x11),Math.atan2(E.y01,E.x01),!d)}}else u.arc(0,0,s,m,g,d)}u.closePath();if(f)return u=null,f+""||null}f.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Wn/2;return[Math.cos(r)*e,Math.sin(r)*e]};f.innerRadius=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),f):t};f.outerRadius=function(t){return arguments.length?(n=typeof t==="function"?t:Xn(+t),f):n};f.cornerRadius=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(+t),f):e};f.padRadius=function(t){return arguments.length?(r=t==null?null:typeof t==="function"?t:Xn(+t),f):r};f.startAngle=function(t){return arguments.length?(i=typeof t==="function"?t:Xn(+t),f):i};f.endAngle=function(t){return arguments.length?(a=typeof t==="function"?t:Xn(+t),f):a};f.padAngle=function(t){return arguments.length?(o=typeof t==="function"?t:Xn(+t),f):o};f.context=function(t){return arguments.length?(u=t==null?null:t,f):u};return f}function ae(t){this._context=t}ae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;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;default:this._context.lineTo(t,n);break}}};function oe(t){return new ae(t)}function ue(t){return t[0]}function fe(t){return t[1]}function ce(){var t=ue,n=fe,e=Xn(true),r=null,i=oe,a=null;function o(o){var u,f=o.length,c,s=false,l;if(r==null)a=i(l=pn());for(u=0;u<=f;++u){if(!(u<f&&e(c=o[u],u,o))===s){if(s=!s)a.lineStart();else a.lineEnd()}if(s)a.point(+t(c,u,o),+n(c,u,o))}if(l)return a=null,l+""||null}o.x=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),o):t};o.y=function(t){return arguments.length?(n=typeof t==="function"?t:Xn(+t),o):n};o.defined=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(!!t),o):e};o.curve=function(t){return arguments.length?(i=t,r!=null&&(a=i(r)),o):i};o.context=function(t){return arguments.length?(t==null?r=a=null:a=i(r=t),o):r};return o}function se(){var t=ue,n=null,e=Xn(0),r=fe,i=Xn(true),a=null,o=oe,u=null;function f(f){var c,s,l,h=f.length,p,v=false,d,_=new Array(h),y=new Array(h);if(a==null)u=o(d=pn());for(c=0;c<=h;++c){if(!(c<h&&i(p=f[c],c,f))===v){if(v=!v){s=c;u.areaStart();u.lineStart()}else{u.lineEnd();u.lineStart();for(l=c-1;l>=s;--l){u.point(_[l],y[l])}u.lineEnd();u.areaEnd()}}if(v){_[c]=+t(p,c,f),y[c]=+e(p,c,f);u.point(n?+n(p,c,f):_[c],r?+r(p,c,f):y[c])}}if(d)return u=null,d+""||null}function c(){return ce().defined(i).curve(o).context(a)}f.x=function(e){return arguments.length?(t=typeof e==="function"?e:Xn(+e),n=null,f):t};f.x0=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),f):t};f.x1=function(t){return arguments.length?(n=t==null?null:typeof t==="function"?t:Xn(+t),f):n};f.y=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(+t),r=null,f):e};f.y0=function(t){return arguments.length?(e=typeof t==="function"?t:Xn(+t),f):e};f.y1=function(t){return arguments.length?(r=t==null?null:typeof t==="function"?t:Xn(+t),f):r};f.lineX0=f.lineY0=function(){return c().x(t).y(e)};f.lineY1=function(){return c().x(t).y(r)};f.lineX1=function(){return c().x(n).y(e)};f.defined=function(t){return arguments.length?(i=typeof t==="function"?t:Xn(!!t),f):i};f.curve=function(t){return arguments.length?(o=t,a!=null&&(u=o(a)),f):o};f.context=function(t){return arguments.length?(t==null?a=u=null:u=o(a=t),f):a};return f}function le(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function he(t){return t}function pe(){var t=he,n=le,e=null,r=Xn(0),i=Xn(Zn),a=Xn(0);function o(o){var u,f=o.length,c,s,l=0,h=new Array(f),p=new Array(f),v=+r.apply(this,arguments),d=Math.min(Zn,Math.max(-Zn,i.apply(this,arguments)-v)),_,y=Math.min(Math.abs(d)/f,a.apply(this,arguments)),g=y*(d<0?-1:1),m;for(u=0;u<f;++u){if((m=p[h[u]=u]=+t(o[u],u,o))>0){l+=m}}if(n!=null)h.sort(function(t,e){return n(p[t],p[e])});else if(e!=null)h.sort(function(t,n){return e(o[t],o[n])});for(u=0,s=l?(d-f*g)/l:0;u<f;++u,v=_){c=h[u],m=p[c],_=v+(m>0?m*s:0)+g,p[c]={data:o[c],index:u,value:m,startAngle:v,endAngle:_,padAngle:y}}return p}o.value=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(+n),o):t};o.sortValues=function(t){return arguments.length?(n=t,e=null,o):n};o.sort=function(t){return arguments.length?(e=t,n=null,o):e};o.startAngle=function(t){return arguments.length?(r=typeof t==="function"?t:Xn(+t),o):r};o.endAngle=function(t){return arguments.length?(i=typeof t==="function"?t:Xn(+t),o):i};o.padAngle=function(t){return arguments.length?(a=typeof t==="function"?t:Xn(+t),o):a};return o}var ve=_e(oe);function de(t){this._curve=t}de.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function _e(t){function n(n){return new de(t(n))}n._curve=t;return n}function ye(t){var n=t.curve;t.angle=t.x,delete t.x;t.radius=t.y,delete t.y;t.curve=function(t){return arguments.length?n(_e(t)):n()._curve};return t}function ge(){return ye(ce().curve(ve))}function me(){var t=se().curve(ve),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;t.angle=t.x,delete t.x;t.startAngle=t.x0,delete t.x0;t.endAngle=t.x1,delete t.x1;t.radius=t.y,delete t.y;t.innerRadius=t.y0,delete t.y0;t.outerRadius=t.y1,delete t.y1;t.lineStartAngle=function(){return ye(e())},delete t.lineX0;t.lineEndAngle=function(){return ye(r())},delete t.lineX1;t.lineInnerRadius=function(){return ye(i())},delete t.lineY0;t.lineOuterRadius=function(){return ye(a())},delete t.lineY1;t.curve=function(t){return arguments.length?n(_e(t)):n()._curve};return t}var xe={draw:function(t,n){var e=Math.sqrt(n/Wn);t.moveTo(e,0);t.arc(0,0,e,0,Zn)}};var we={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e);t.lineTo(-e,-e);t.lineTo(-e,-3*e);t.lineTo(e,-3*e);t.lineTo(e,-e);t.lineTo(3*e,-e);t.lineTo(3*e,e);t.lineTo(e,e);t.lineTo(e,3*e);t.lineTo(-e,3*e);t.lineTo(-e,e);t.lineTo(-3*e,e);t.closePath()}};var be=Math.sqrt(1/3);var Me=be*2;var ke={draw:function(t,n){var e=Math.sqrt(n/Me),r=e*be;t.moveTo(0,-e);t.lineTo(r,0);t.lineTo(0,e);t.lineTo(-r,0);t.closePath()}};var Te=.8908130915292852;var Ne=Math.sin(Wn/10)/Math.sin(7*Wn/10);var Se=Math.sin(Zn/10)*Ne;var Ee=-Math.cos(Zn/10)*Ne;var Ae={draw:function(t,n){var e=Math.sqrt(n*Te),r=Se*e,i=Ee*e;t.moveTo(0,-e);t.lineTo(r,i);for(var a=1;a<5;++a){var o=Zn*a/5,u=Math.cos(o),f=Math.sin(o);t.lineTo(f*e,-u*e);t.lineTo(u*r-f*i,f*r+u*i)}t.closePath()}};var Ce={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}};var ze=Math.sqrt(3);var Pe={draw:function(t,n){var e=-Math.sqrt(n/(ze*3));t.moveTo(0,e*2);t.lineTo(-ze*e,-e);t.lineTo(ze*e,-e);t.closePath()}};var Le=-.5;var qe=Math.sqrt(3)/2;var Ue=1/Math.sqrt(12);var Ie=(Ue/2+1)*3;var Re={draw:function(t,n){var e=Math.sqrt(n/Ie),r=e/2,i=e*Ue,a=r,o=e*Ue+e,u=-a,f=o;t.moveTo(r,i);t.lineTo(a,o);t.lineTo(u,f);t.lineTo(Le*r-qe*i,qe*r+Le*i);t.lineTo(Le*a-qe*o,qe*a+Le*o);t.lineTo(Le*u-qe*f,qe*u+Le*f);t.lineTo(Le*r+qe*i,Le*i-qe*r);t.lineTo(Le*a+qe*o,Le*o-qe*a);t.lineTo(Le*u+qe*f,Le*f-qe*u);t.closePath()}};var De=[xe,we,ke,Ce,Ae,Pe,Re];function Oe(){var t=Xn(xe),n=Xn(64),e=null;function r(){var r;if(!e)e=r=pn();t.apply(this,arguments).draw(e,+n.apply(this,arguments));if(r)return e=null,r+""||null}r.type=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(n),r):t};r.size=function(t){return arguments.length?(n=typeof t==="function"?t:Xn(+t),r):n};r.context=function(t){return arguments.length?(e=t==null?null:t,r):e};return r}function Fe(){}function Ye(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Be(t){this._context=t}Be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){switch(this._point){case 3:Ye(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;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:
  2. this._point=3;this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function je(t){return new Be(t)}function He(t){this._context=t}He.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2);this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break}case 3:{this.point(this._x2,this._y2);this.point(this._x3,this._y3);this.point(this._x4,this._y4);break}}},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._x2=t,this._y2=n;break;case 1:this._point=2;this._x3=t,this._y3=n;break;case 2:this._point=3;this._x4=t,this._y4=n;this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function Xe(t){return new He(t)}function Ve(t){this._context=t}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Ye(this,t,n);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n}};function We(t){return new Ve(t)}function $e(t,n){this._basis=new Be(t);this._beta=n}$e.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0){var r=t[0],i=n[0],a=t[e]-r,o=n[e]-i,u=-1,f;while(++u<=e){f=u/e;this._basis.point(this._beta*t[u]+(1-this._beta)*(r+f*a),this._beta*n[u]+(1-this._beta)*(i+f*o))}}this._x=this._y=null;this._basis.lineEnd()},point:function(t,n){this._x.push(+t);this._y.push(+n)}};var Ze=function t(n){function e(t){return n===1?new Be(t):new $e(t,n)}e.beta=function(n){return t(+n)};return e}(.85);function Ge(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Je(t,n){this._context=t;this._k=(1-n)/6}Je.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ge(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;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;this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qe=function t(n){function e(t){return new Je(t,n)}e.tension=function(n){return t(+n)};return e}(0);function Ke(t,n){this._context=t;this._k=(1-n)/6}Ke.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;this._x3=t,this._y3=n;break;case 1:this._point=2;this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3;this._x5=t,this._y5=n;break;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var tr=function t(n){function e(t){return new Ke(t,n)}e.tension=function(n){return t(+n)};return e}(0);function nr(t,n){this._context=t;this._k=(1-n)/6}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ge(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var er=function t(n){function e(t){return new nr(t,n)}e.tension=function(n){return t(+n)};return e}(0);function rr(t,n,e){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vn){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,f=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/f;i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/f}if(t._l23_a>Vn){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-n*t._l12_2a)/s;o=(o*c+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ir(t,n){this._context=t;this._alpha=n}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this,this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}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;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ar=function t(n){function e(t){return n?new ir(t,n):new Je(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function or(t,n){this._context=t;this._alpha=n}or.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;this._x3=t,this._y3=n;break;case 1:this._point=2;this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3;this._x5=t,this._y5=n;break;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ur=function t(n){function e(t){return n?new or(t,n):new Ke(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function fr(t,n){this._context=t;this._alpha=n}fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,n){t=+t,n=+n;if(this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rr(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=n}};var cr=function t(n){function e(t){return n?new fr(t,n):new nr(t,0)}e.alpha=function(n){return t(+n)};return e}(.5);function sr(t){this._context=t}sr.prototype={areaStart:Fe,areaEnd:Fe,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(t,n){t=+t,n=+n;if(this._point)this._context.lineTo(t,n);else this._point=1,this._context.moveTo(t,n)}};function lr(t){return new sr(t)}function hr(t){return t<0?-1:1}function pr(t,n,e){var r=t._x1-t._x0,i=n-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),u=(a*i+o*r)/(r+i);return(hr(a)+hr(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function vr(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function dr(t,n,e){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,u=(a-r)/3;t._context.bezierCurveTo(r+u,i+u*n,a-u,o-u*e,a,o)}function _r(t){this._context=t}_r.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:dr(this,this._t0,vr(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,n){var e=NaN;t=+t,n=+n;if(t===this._x1&&n===this._y1)return;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;dr(this,vr(this,e=pr(this,t,n)),e);break;default:dr(this,this._t0,e=pr(this,t,n));break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=n;this._t0=e}};function yr(t){this._context=new gr(t)}(yr.prototype=Object.create(_r.prototype)).point=function(t,n){_r.prototype.point.call(this,n,t)};function gr(t){this._context=t}gr.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,a){this._context.bezierCurveTo(n,t,r,e,a,i)}};function mr(t){return new _r(t)}function xr(t){return new yr(t)}function wr(t){this._context=t}wr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[];this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e){this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]);if(e===2){this._context.lineTo(t[1],n[1])}else{var r=br(t),i=br(n);for(var a=0,o=1;o<e;++a,++o){this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],n[o])}}}if(this._line||this._line!==0&&e===1)this._context.closePath();this._line=1-this._line;this._x=this._y=null},point:function(t,n){this._x.push(+t);this._y.push(+n)}};function br(t){var n,e=t.length-1,r,i=new Array(e),a=new Array(e),o=new Array(e);i[0]=0,a[0]=2,o[0]=t[0]+2*t[1];for(n=1;n<e-1;++n)i[n]=1,a[n]=4,o[n]=4*t[n]+2*t[n+1];i[e-1]=2,a[e-1]=7,o[e-1]=8*t[e-1]+t[e];for(n=1;n<e;++n)r=i[n]/a[n-1],a[n]-=r,o[n]-=r*o[n-1];i[e-1]=o[e-1]/a[e-1];for(n=e-2;n>=0;--n)i[n]=(o[n]-i[n+1])/a[n];a[e-1]=(t[e]+i[e-1])/2;for(n=0;n<e-1;++n)a[n]=2*t[n+1]-i[n+1];return[i,a]}function Mr(t){return new wr(t)}function kr(t,n){this._context=t;this._t=n}kr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN;this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(t,n){t=+t,n=+n;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;default:{if(this._t<=0){this._context.lineTo(this._x,n);this._context.lineTo(t,n)}else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y);this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function Tr(t){return new kr(t,.5)}function Nr(t){return new kr(t,0)}function Sr(t){return new kr(t,1)}var Er=Array.prototype.slice;function Ar(t,n){if(!((a=t.length)>1))return;for(var e=1,r,i=t[n[0]],a,o=i.length;e<a;++e){r=i,i=t[n[e]];for(var u=0;u<o;++u){i[u][1]+=i[u][0]=isNaN(r[u][1])?r[u][0]:r[u][1]}}}function Cr(t){var n=t.length,e=new Array(n);while(--n>=0)e[n]=n;return e}function zr(t,n){return t[n]}function Pr(){var t=Xn([]),n=Cr,e=Ar,r=zr;function i(i){var a=t.apply(this,arguments),o,u=i.length,f=a.length,c=new Array(f),s;for(o=0;o<f;++o){for(var l=a[o],h=c[o]=new Array(u),p=0,v;p<u;++p){h[p]=v=[0,+r(i[p],l,p,i)];v.data=i[p]}h.key=l}for(o=0,s=n(c);o<f;++o){c[s[o]].index=o}e(c,s);return c}i.keys=function(n){return arguments.length?(t=typeof n==="function"?n:Xn(Er.call(n)),i):t};i.value=function(t){return arguments.length?(r=typeof t==="function"?t:Xn(+t),i):r};i.order=function(t){return arguments.length?(n=t==null?Cr:typeof t==="function"?t:Xn(Er.call(t)),i):n};i.offset=function(t){return arguments.length?(e=t==null?Ar:t,i):e};return i}function Lr(t,n){if(!((r=t.length)>0))return;for(var e,r,i=0,a=t[0].length,o;i<a;++i){for(o=e=0;e<r;++e)o+=t[e][i][1]||0;if(o)for(e=0;e<r;++e)t[e][i][1]/=o}Ar(t,n)}function qr(t,n){if(!((i=t.length)>0))return;for(var e=0,r=t[n[0]],i,a=r.length;e<a;++e){for(var o=0,u=0;o<i;++o)u+=t[o][e][1]||0;r[e][1]+=r[e][0]=-u/2}Ar(t,n)}function Ur(t,n){if(!((o=t.length)>0)||!((a=(i=t[n[0]]).length)>0))return;for(var e=0,r=1,i,a,o;r<a;++r){for(var u=0,f=0,c=0;u<o;++u){var s=t[n[u]],l=s[r][1]||0,h=s[r-1][1]||0,p=(l-h)/2;for(var v=0;v<u;++v){var d=t[n[v]],_=d[r][1]||0,y=d[r-1][1]||0;p+=_-y}f+=l,c+=p*l}i[r-1][1]+=i[r-1][0]=e;if(f)e-=c/f}i[r-1][1]+=i[r-1][0]=e;Ar(t,n)}function Ir(t){var n=t.map(Rr);return Cr(t).sort(function(t,e){return n[t]-n[e]})}function Rr(t){var n=0,e=-1,r=t.length,i;while(++e<r)if(i=+t[e][1])n+=i;return n}function Dr(t){return Ir(t).reverse()}function Or(t){var n=t.length,e,r,i=t.map(Rr),a=Cr(t).sort(function(t,n){return i[n]-i[t]}),o=0,u=0,f=[],c=[];for(e=0;e<n;++e){r=a[e];if(o<u){o+=i[r];f.push(r)}else{u+=i[r];c.push(r)}}return c.reverse().concat(f)}function Fr(t){return Cr(t).reverse()}function Yr(t,n,e){t.prototype=n.prototype=e;e.constructor=t}function Br(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function jr(){}var Hr=.7;var Xr=1/Hr;var Vr=/^#([0-9a-f]{3})$/;var Wr=/^#([0-9a-f]{6})$/;var $r=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/;var Zr=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;var Gr=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var Jr=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var Qr=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/;var Kr=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/;var ti={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Yr(jr,ni,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});function ni(t){var n;t=(t+"").trim().toLowerCase();return(n=Vr.exec(t))?(n=parseInt(n[1],16),new oi(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1)):(n=Wr.exec(t))?ei(parseInt(n[1],16)):(n=$r.exec(t))?new oi(n[1],n[2],n[3],1):(n=Zr.exec(t))?new oi(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Gr.exec(t))?ri(n[1],n[2],n[3],n[4]):(n=Jr.exec(t))?ri(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Qr.exec(t))?ui(n[1],n[2]/100,n[3]/100,1):(n=Kr.exec(t))?ui(n[1],n[2]/100,n[3]/100,n[4]):ti.hasOwnProperty(t)?ei(ti[t]):t==="transparent"?new oi(NaN,NaN,NaN,0):null}function ei(t){return new oi(t>>16&255,t>>8&255,t&255,1)}function ri(t,n,e,r){if(r<=0)t=n=e=NaN;return new oi(t,n,e,r)}function ii(t){if(!(t instanceof jr))t=ni(t);if(!t)return new oi;t=t.rgb();return new oi(t.r,t.g,t.b,t.opacity)}function ai(t,n,e,r){return arguments.length===1?ii(t):new oi(t,n,e,r==null?1:r)}function oi(t,n,e,r){this.r=+t;this.g=+n;this.b=+e;this.opacity=+r}Yr(oi,ai,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new oi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new oi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&(0<=this.g&&this.g<=255)&&(0<=this.b&&this.b<=255)&&(0<=this.opacity&&this.opacity<=1)},toString:function(){var t=this.opacity;t=isNaN(t)?1:Math.max(0,Math.min(1,t));return(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}}));function ui(t,n,e,r){if(r<=0)t=n=e=NaN;else if(e<=0||e>=1)t=n=NaN;else if(n<=0)t=NaN;return new si(t,n,e,r)}function fi(t){if(t instanceof si)return new si(t.h,t.s,t.l,t.opacity);if(!(t instanceof jr))t=ni(t);if(!t)return new si;if(t instanceof si)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,u=a-i,f=(a+i)/2;if(u){if(n===a)o=(e-r)/u+(e<r)*6;else if(e===a)o=(r-n)/u+2;else o=(n-e)/u+4;u/=f<.5?a+i:2-a-i;o*=60}else{u=f>0&&f<1?0:o}return new si(o,u,f,t.opacity)}function ci(t,n,e,r){return arguments.length===1?fi(t):new si(t,n,e,r==null?1:r)}function si(t,n,e,r){this.h=+t;this.s=+n;this.l=+e;this.opacity=+r}Yr(si,ci,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new si(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new si(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new oi(li(t>=240?t-240:t+120,i,r),li(t,i,r),li(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)}}));function li(t,n,e){return(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)*255}var hi=Math.PI/180;var pi=180/Math.PI;var vi=18;var di=.95047;var _i=1;var yi=1.08883;var gi=4/29;var mi=6/29;var xi=3*mi*mi;var wi=mi*mi*mi;function bi(t){if(t instanceof ki)return new ki(t.l,t.a,t.b,t.opacity);if(t instanceof zi){var n=t.h*hi;return new ki(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}if(!(t instanceof oi))t=ii(t);var e=Ei(t.r),r=Ei(t.g),i=Ei(t.b),a=Ti((.4124564*e+.3575761*r+.1804375*i)/di),o=Ti((.2126729*e+.7151522*r+.072175*i)/_i),u=Ti((.0193339*e+.119192*r+.9503041*i)/yi);return new ki(116*o-16,500*(a-o),200*(o-u),t.opacity)}function Mi(t,n,e,r){return arguments.length===1?bi(t):new ki(t,n,e,r==null?1:r)}function ki(t,n,e,r){this.l=+t;this.a=+n;this.b=+e;this.opacity=+r}Yr(ki,Mi,Br(jr,{brighter:function(t){return new ki(this.l+vi*(t==null?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ki(this.l-vi*(t==null?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;t=_i*Ni(t);n=di*Ni(n);e=yi*Ni(e);return new oi(Si(3.2404542*n-1.5371385*t-.4985314*e),Si(-.969266*n+1.8760108*t+.041556*e),Si(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}}));function Ti(t){return t>wi?Math.pow(t,1/3):t/xi+gi}function Ni(t){return t>mi?t*t*t:xi*(t-gi)}function Si(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ei(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ai(t){if(t instanceof zi)return new zi(t.h,t.c,t.l,t.opacity);if(!(t instanceof ki))t=bi(t);var n=Math.atan2(t.b,t.a)*pi;return new zi(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ci(t,n,e,r){return arguments.length===1?Ai(t):new zi(t,n,e,r==null?1:r)}function zi(t,n,e,r){this.h=+t;this.c=+n;this.l=+e;this.opacity=+r}Yr(zi,Ci,Br(jr,{brighter:function(t){return new zi(this.h,this.c,this.l+vi*(t==null?1:t),this.opacity)},darker:function(t){return new zi(this.h,this.c,this.l-vi*(t==null?1:t),this.opacity)},rgb:function(){return bi(this).rgb()}}));var Pi=-.14861;var Li=+1.78277;var qi=-.29227;var Ui=-.90649;var Ii=+1.97294;var Ri=Ii*Ui;var Di=Ii*Li;var Oi=Li*qi-Ui*Pi;function Fi(t){if(t instanceof Bi)return new Bi(t.h,t.s,t.l,t.opacity);if(!(t instanceof oi))t=ii(t);var n=t.r/255,e=t.g/255,r=t.b/255,i=(Oi*r+Ri*n-Di*e)/(Oi+Ri-Di),a=r-i,o=(Ii*(e-i)-qi*a)/Ui,u=Math.sqrt(o*o+a*a)/(Ii*i*(1-i)),f=u?Math.atan2(o,a)*pi-120:NaN;return new Bi(f<0?f+360:f,u,i,t.opacity)}function Yi(t,n,e,r){return arguments.length===1?Fi(t):new Bi(t,n,e,r==null?1:r)}function Bi(t,n,e,r){this.h=+t;this.s=+n;this.l=+e;this.opacity=+r}Yr(Bi,Yi,Br(jr,{brighter:function(t){t=t==null?Xr:Math.pow(Xr,t);return new Bi(this.h,this.s,this.l*t,this.opacity)},darker:function(t){t=t==null?Hr:Math.pow(Hr,t);return new Bi(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*hi,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new oi(255*(n+e*(Pi*r+Li*i)),255*(n+e*(qi*r+Ui*i)),255*(n+e*(Ii*r)),this.opacity)}}));function ji(t,n,e,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*n+(4-6*a+3*o)*e+(1+3*t+3*a-3*o)*r+o*i)/6}function Hi(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=r<n-1?t[r+2]:2*a-i;return ji((e-r/n)*n,o,i,a,u)}}function Xi(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],a=t[r%n],o=t[(r+1)%n],u=t[(r+2)%n];return ji((e-r/n)*n,i,a,o,u)}}function Vi(t){return function(){return t}}function Wi(t,n){return function(e){return t+e*n}}function $i(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 Zi(t,n){var e=n-t;return e?Wi(t,e>180||e<-180?e-360*Math.round(e/360):e):Vi(isNaN(t)?n:t)}function Gi(t){return(t=+t)===1?Ji:function(n,e){return e-n?$i(n,e,t):Vi(isNaN(n)?e:n)}}function Ji(t,n){var e=n-t;return e?Wi(t,e):Vi(isNaN(t)?n:t)}var Qi=function t(n){var e=Gi(n);function r(t,n){var r=e((t=ai(t)).r,(n=ai(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=e(t.opacity,n.opacity);return function(n){t.r=r(n);t.g=i(n);t.b=a(n);t.opacity=o(n);return t+""}}r.gamma=t;return r}(1);function Ki(t){return function(n){var e=n.length,r=new Array(e),i=new Array(e),a=new Array(e),o,u;for(o=0;o<e;++o){u=ai(n[o]);r[o]=u.r||0;i[o]=u.g||0;a[o]=u.b||0}r=t(r);i=t(i);a=t(a);u.opacity=1;return function(t){u.r=r(t);u.g=i(t);u.b=a(t);return u+""}}}var ta=Ki(Hi);var na=Ki(Xi);function ea(t,n){var e=n?n.length:0,r=t?Math.min(e,t.length):0,i=new Array(e),a=new Array(e),o;for(o=0;o<r;++o)i[o]=sa(t[o],n[o]);for(;o<e;++o)a[o]=n[o];return function(t){for(o=0;o<r;++o)a[o]=i[o](t);return a}}function ra(t,n){return t=+t,n-=t,function(e){return t+n*e}}function ia(t,n){var e={},r={},i;if(t===null||typeof t!=="object")t={};if(n===null||typeof n!=="object")n={};for(i in n){if(i in t){e[i]=sa(t[i],n[i])}else{r[i]=n[i]}}return function(t){for(i in e)r[i]=e[i](t);return r}}var aa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;var oa=new RegExp(aa.source,"g");function ua(t){return function(){return t}}function fa(t){return function(n){return t(n)+""}}function ca(t,n){var e=aa.lastIndex=oa.lastIndex=0,r,i,a,o=-1,u=[],f=[];t=t+"",n=n+"";while((r=aa.exec(t))&&(i=oa.exec(n))){if((a=i.index)>e){a=n.slice(e,a);if(u[o])u[o]+=a;else u[++o]=a}if((r=r[0])===(i=i[0])){if(u[o])u[o]+=i;else u[++o]=i}else{u[++o]=null;f.push({i:o,x:ra(r,i)})}e=oa.lastIndex}if(e<n.length){a=n.slice(e);if(u[o])u[o]+=a;else u[++o]=a}return u.length<2?f[0]?fa(f[0].x):ua(n):(n=f.length,function(t){for(var e=0,r;e<n;++e)u[(r=f[e]).i]=r.x(t);return u.join("")})}function sa(t,n){var e=typeof n,r;return n==null||e==="boolean"?Vi(n):(e==="number"?ra:e==="string"?(r=ni(n))?(n=r,Qi):ca:n instanceof ni?Qi:Array.isArray(n)?ea:ia)(t,n)}function la(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}}var ha=180/Math.PI;var pa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function va(t,n,e,r,i,a){var o,u,f;if(o=Math.sqrt(t*t+n*n))t/=o,n/=o;if(f=t*e+n*r)e-=t*f,r-=n*f;if(u=Math.sqrt(e*e+r*r))e/=u,r/=u,f/=u;if(t*r<n*e)t=-t,n=-n,f=-f,o=-o;return{translateX:i,translateY:a,rotate:Math.atan2(n,t)*ha,skewX:Math.atan(f)*ha,scaleX:o,scaleY:u}}var da;var _a;var ya;var ga;function ma(t){if(t==="none")return pa;if(!da)da=document.createElement("DIV"),_a=document.documentElement,ya=document.defaultView;da.style.transform=t;t=ya.getComputedStyle(_a.appendChild(da),null).getPropertyValue("transform");_a.removeChild(da);var n=t.slice(7,-1).split(",");return va(+n[0],+n[1],+n[2],+n[3],+n[4],+n[5])}function xa(t){if(!ga)ga=document.createElementNS("http://www.w3.org/2000/svg","g");ga.setAttribute("transform",t==null?"":t);var n=ga.transform.baseVal.consolidate().matrix;return va(n.a,n.b,n.c,n.d,n.e,n.f)}function wa(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function a(t,r,i,a,o,u){if(t!==i||r!==a){var f=o.push("translate(",null,n,null,e);u.push({i:f-4,x:ra(t,i)},{i:f-2,x:ra(r,a)})}else if(i||a){o.push("translate("+i+n+a+e)}}function o(t,n,e,a){if(t!==n){if(t-n>180)n+=360;else if(n-t>180)t+=360;a.push({i:e.push(i(e)+"rotate(",null,r)-2,x:ra(t,n)})}else if(n){e.push(i(e)+"rotate("+n+r)}}function u(t,n,e,a){if(t!==n){a.push({i:e.push(i(e)+"skewX(",null,r)-2,x:ra(t,n)})}else if(n){e.push(i(e)+"skewX("+n+r)}}function f(t,n,e,r,a,o){if(t!==e||n!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:ra(t,e)},{i:u-2,x:ra(n,r)})}else if(e!==1||r!==1){a.push(i(a)+"scale("+e+","+r+")")}}return function(n,e){var r=[],i=[];n=t(n),e=t(e);a(n.translateX,n.translateY,e.translateX,e.translateY,r,i);o(n.rotate,e.rotate,r,i);u(n.skewX,e.skewX,r,i);f(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i);n=e=null;return function(t){var n=-1,e=i.length,a;while(++n<e)r[(a=i[n]).i]=a.x(t);return r.join("")}}}var ba=wa(ma,"px, ","px)","deg)");var Ma=wa(xa,", ",")",")");var ka=Math.SQRT2;var Ta=2;var Na=4;var Sa=1e-12;function Ea(t){return((t=Math.exp(t))+1/t)/2}function Aa(t){return((t=Math.exp(t))-1/t)/2}function Ca(t){return((t=Math.exp(2*t))-1)/(t+1)}function za(t,n){var e=t[0],r=t[1],i=t[2],a=n[0],o=n[1],u=n[2],f=a-e,c=o-r,s=f*f+c*c,l,h;if(s<Sa){h=Math.log(u/i)/ka;l=function(t){return[e+t*f,r+t*c,i*Math.exp(ka*t*h)]}}else{var p=Math.sqrt(s),v=(u*u-i*i+Na*s)/(2*i*Ta*p),d=(u*u-i*i-Na*s)/(2*u*Ta*p),_=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(d*d+1)-d);h=(y-_)/ka;l=function(t){var n=t*h,a=Ea(_),o=i/(Ta*p)*(a*Ca(ka*n+_)-Aa(_));return[e+o*f,r+o*c,i*a/Ea(ka*n+_)]}}l.duration=h*1e3;return l}function Pa(t){return function(n,e){var r=t((n=ci(n)).h,(e=ci(e)).h),i=Ji(n.s,e.s),a=Ji(n.l,e.l),o=Ji(n.opacity,e.opacity);return function(t){n.h=r(t);n.s=i(t);n.l=a(t);n.opacity=o(t);return n+""}}}var La=Pa(Zi);var qa=Pa(Ji);function Ua(t,n){var e=Ji((t=Mi(t)).l,(n=Mi(n)).l),r=Ji(t.a,n.a),i=Ji(t.b,n.b),a=Ji(t.opacity,n.opacity);return function(n){t.l=e(n);t.a=r(n);t.b=i(n);t.opacity=a(n);return t+""}}function Ia(t){return function(n,e){var r=t((n=Ci(n)).h,(e=Ci(e)).h),i=Ji(n.c,e.c),a=Ji(n.l,e.l),o=Ji(n.opacity,e.opacity);return function(t){n.h=r(t);n.c=i(t);n.l=a(t);n.opacity=o(t);return n+""}}}var Ra=Ia(Zi);var Da=Ia(Ji);function Oa(t){return function n(e){e=+e;function r(n,r){var i=t((n=Yi(n)).h,(r=Yi(r)).h),a=Ji(n.s,r.s),o=Ji(n.l,r.l),u=Ji(n.opacity,r.opacity);return function(t){n.h=i(t);n.s=a(t);n.l=o(Math.pow(t,e));n.opacity=u(t);return n+""}}r.gamma=n;return r}(1)}var Fa=Oa(Zi);var Ya=Oa(Ji);function Ba(t,n){var e=new Array(n);for(var r=0;r<n;++r)e[r]=t(r/(n-1));return e}var ja={value:function(){}};function Ha(){for(var t=0,n=arguments.length,e={},r;t<n;++t){if(!(r=arguments[t]+"")||r in e)throw new Error("illegal type: "+r);e[r]=[]}return new Xa(e)}function Xa(t){this._=t}function Va(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0)e=t.slice(r+1),t=t.slice(0,r);if(t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}Xa.prototype=Ha.prototype={constructor:Xa,on:function(t,n){var e=this._,r=Va(t+"",e),i,a=-1,o=r.length;if(arguments.length<2){while(++a<o)if((i=(t=r[a]).type)&&(i=Wa(e[i],t.name)))return i;
  3. return}if(n!=null&&typeof n!=="function")throw new Error("invalid callback: "+n);while(++a<o){if(i=(t=r[a]).type)e[i]=$a(e[i],t.name,n);else if(n==null)for(i in e)e[i]=$a(e[i],t.name,null)}return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Xa(t)},call:function(t,n){if((i=arguments.length-2)>0)for(var e=new Array(i),r=0,i,a;r<i;++r)e[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(n,e)}};function Wa(t,n){for(var e=0,r=t.length,i;e<r;++e){if((i=t[e]).name===n){return i.value}}}function $a(t,n,e){for(var r=0,i=t.length;r<i;++r){if(t[r].name===n){t[r]=ja,t=t.slice(0,r).concat(t.slice(r+1));break}}if(e!=null)t.push({name:n,value:e});return t}function Za(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Ga(t,n){var e=Za(t);return function(r,i){return n(e(r),i,t)}}function Ja(t){var n=Object.create(null),e=[];t.forEach(function(t){for(var r in t){if(!(r in n)){e.push(n[r]=r)}}});return e}function Qa(t){var n=new RegExp('["'+t+"\n]"),e=t.charCodeAt(0);function r(t,n){var e,r,a=i(t,function(t,i){if(e)return e(t,i-1);r=t,e=n?Ga(t,n):Za(t)});a.columns=r;return a}function i(t,n){var r={},i={},a=[],o=t.length,u=0,f=0,c,s;function l(){if(u>=o)return i;if(s)return s=false,r;var n=u,a;if(t.charCodeAt(n)===34){var f=n;while(f++<o){if(t.charCodeAt(f)===34){if(t.charCodeAt(f+1)!==34)break;++f}}u=f+2;a=t.charCodeAt(f+1);if(a===13){s=true;if(t.charCodeAt(f+2)===10)++u}else if(a===10){s=true}return t.slice(n+1,f).replace(/""/g,'"')}while(u<o){var c=1;a=t.charCodeAt(u++);if(a===10)s=true;else if(a===13){s=true;if(t.charCodeAt(u)===10)++u,++c}else if(a!==e)continue;return t.slice(n,u-c)}return t.slice(n)}while((c=l())!==i){var h=[];while(c!==r&&c!==i){h.push(c);c=l()}if(n&&(h=n(h,f++))==null)continue;a.push(h)}return a}function a(n,e){if(e==null)e=Ja(n);return[e.map(f).join(t)].concat(n.map(function(n){return e.map(function(t){return f(n[t])}).join(t)})).join("\n")}function o(t){return t.map(u).join("\n")}function u(n){return n.map(f).join(t)}function f(t){return t==null?"":n.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}return{parse:r,parseRows:i,format:a,formatRows:o}}var Ka=Qa(",");var to=Ka.parse;var no=Ka.parseRows;var eo=Ka.format;var ro=Ka.formatRows;var io=Qa("\t");var ao=io.parse;var oo=io.parseRows;var uo=io.format;var fo=io.formatRows;function co(t,n){var e,r=Ha("beforesend","progress","load","error"),i,a=H(),o=new XMLHttpRequest,u=null,f=null,c,s,l=0;if(typeof XDomainRequest!=="undefined"&&!("withCredentials"in o)&&/^(http(s)?:)?\/\//.test(t))o=new XDomainRequest;"onload"in o?o.onload=o.onerror=o.ontimeout=h:o.onreadystatechange=function(t){o.readyState>3&&h(t)};function h(t){var n=o.status,i;if(!n&&lo(o)||n>=200&&n<300||n===304){if(c){try{i=c.call(e,o)}catch(t){r.call("error",e,t);return}}else{i=o}r.call("load",e,i)}else{r.call("error",e,t)}}o.onprogress=function(t){r.call("progress",e,t)};e={header:function(t,n){t=(t+"").toLowerCase();if(arguments.length<2)return a.get(t);if(n==null)a.remove(t);else a.set(t,n+"");return e},mimeType:function(t){if(!arguments.length)return i;i=t==null?null:t+"";return e},responseType:function(t){if(!arguments.length)return s;s=t;return e},timeout:function(t){if(!arguments.length)return l;l=+t;return e},user:function(t){return arguments.length<1?u:(u=t==null?null:t+"",e)},password:function(t){return arguments.length<1?f:(f=t==null?null:t+"",e)},response:function(t){c=t;return e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,c,h){if(!h&&typeof c==="function")h=c,c=null;if(h&&h.length===1)h=so(h);o.open(n,t,true,u,f);if(i!=null&&!a.has("accept"))a.set("accept",i+",*/*");if(o.setRequestHeader)a.each(function(t,n){o.setRequestHeader(n,t)});if(i!=null&&o.overrideMimeType)o.overrideMimeType(i);if(s!=null)o.responseType=s;if(l>0)o.timeout=l;if(h)e.on("error",h).on("load",function(t){h(null,t)});r.call("beforesend",e,o);o.send(c==null?null:c);return e},abort:function(){o.abort();return e},on:function(){var t=r.on.apply(r,arguments);return t===r?e:t}};return n?e.get(n):e}function so(t){return function(n,e){t(n==null?e:null)}}function lo(t){var n=t.responseType;return n&&n!=="text"?t.response:t.responseText}function ho(t,n){return function(e,r){var i=co(e).mimeType(t).response(n);return r?i.get(r):i}}var po=ho("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)});var vo=ho("application/json",function(t){return JSON.parse(t.responseText)});var _o=ho("text/plain",function(t){return t.responseText});var yo=ho("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});function go(t,n){return function(e,r,i){if(arguments.length<3)i=r,r=null;var a=co(e).mimeType(t);a.row=function(t){return arguments.length?a.response(mo(n,r=t)):r};a.row(r);return i?a.get(i):a}}function mo(t,n){return function(e){return t(e.responseText,n)}}var xo=go("text/csv",to);var wo=go("text/tab-separated-values",ao);var bo=0;var Mo=0;var ko=0;var To=1e3;var No;var So;var Eo=0;var Ao=0;var Co=0;var zo=typeof performance==="object"?performance:Date;var Po=typeof requestAnimationFrame==="function"?zo===Date?function(t){requestAnimationFrame(function(){t(zo.now())})}:requestAnimationFrame:function(t){setTimeout(t,17)};function Lo(){return Ao||(Po(qo),Ao=zo.now()+Co)}function qo(){Ao=0}function Uo(){this._call=this._time=this._next=null}Uo.prototype=Io.prototype={constructor:Uo,restart:function(t,n,e){if(typeof t!=="function")throw new TypeError("callback is not a function");e=(e==null?Lo():+e)+(n==null?0:+n);if(!this._next&&So!==this){if(So)So._next=this;else No=this;So=this}this._call=t;this._time=e;Yo()},stop:function(){if(this._call){this._call=null;this._time=Infinity;Yo()}}};function Io(t,n,e){var r=new Uo;r.restart(t,n,e);return r}function Ro(){Lo();++bo;var t=No,n;while(t){if((n=Ao-t._time)>=0)t._call.call(null,n);t=t._next}--bo}function Do(t){Ao=(Eo=t||zo.now())+Co;bo=Mo=0;try{Ro()}finally{bo=0;Fo();Ao=0}}function Oo(){var t=zo.now(),n=t-Eo;if(n>To)Co-=n,Eo=t}function Fo(){var t,n=No,e,r=Infinity;while(n){if(n._call){if(r>n._time)r=n._time;t=n,n=n._next}else{e=n._next,n._next=null;n=t?t._next=e:No=e}}So=t;Yo(r)}function Yo(t){if(bo)return;if(Mo)Mo=clearTimeout(Mo);var n=t-Ao;if(n>24){if(t<Infinity)Mo=setTimeout(Do,n);if(ko)ko=clearInterval(ko)}else{if(!ko)ko=setInterval(Oo,To);bo=1,Po(Do)}}function Bo(t,n,e){var r=new Uo;n=n==null?0:+n;r.restart(function(e){r.stop();t(e+n)},n,e);return r}function jo(t,n,e){var r=new Uo,i=n;if(n==null)return r.restart(t,n,e),r;n=+n,e=e==null?Lo():+e;r.restart(function a(o){o+=i;r.restart(a,i+=n,e);t(o)},n,e);return r}var Ho=new Date;var Xo=new Date;function Vo(t,n,e,r){function i(n){return t(n=new Date(+n)),n}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-n<e-t?n:e};i.offset=function(t,e){return n(t=new Date(+t),e==null?1:Math.floor(e)),t};i.range=function(e,r,a){var o=[];e=i.ceil(e);a=a==null?1:Math.floor(a);if(!(e<r)||!(a>0))return o;do o.push(new Date(+e));while(n(e,a),t(e),e<r);return o};i.filter=function(e){return Vo(function(n){while(t(n),!e(n))n.setTime(n-1)},function(t,r){while(--r>=0)while(n(t,1),!e(t));})};if(e){i.count=function(n,r){Ho.setTime(+n),Xo.setTime(+r);t(Ho),t(Xo);return Math.floor(e(Ho,Xo))};i.every=function(t){t=Math.floor(t);return!isFinite(t)||!(t>0)?null:!(t>1)?i:i.filter(r?function(n){return r(n)%t===0}:function(n){return i.count(0,n)%t===0})}}return i}var Wo=Vo(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Wo.every=function(t){t=Math.floor(t);if(!isFinite(t)||!(t>0))return null;if(!(t>1))return Wo;return Vo(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t})};var $o=Wo.range;var Zo=1e3;var Go=6e4;var Jo=36e5;var Qo=864e5;var Ko=6048e5;var tu=Vo(function(t){t.setTime(Math.floor(t/Zo)*Zo)},function(t,n){t.setTime(+t+n*Zo)},function(t,n){return(n-t)/Zo},function(t){return t.getUTCSeconds()});var nu=tu.range;var eu=Vo(function(t){t.setTime(Math.floor(t/Go)*Go)},function(t,n){t.setTime(+t+n*Go)},function(t,n){return(n-t)/Go},function(t){return t.getMinutes()});var ru=eu.range;var iu=Vo(function(t){var n=t.getTimezoneOffset()*Go%Jo;if(n<0)n+=Jo;t.setTime(Math.floor((+t-n)/Jo)*Jo+n)},function(t,n){t.setTime(+t+n*Jo)},function(t,n){return(n-t)/Jo},function(t){return t.getHours()});var au=iu.range;var ou=Vo(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())*Go)/Qo},function(t){return t.getDate()-1});var uu=ou.range;function fu(t){return Vo(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7);n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Go)/Ko})}var cu=fu(0);var su=fu(1);var lu=fu(2);var hu=fu(3);var pu=fu(4);var vu=fu(5);var du=fu(6);var _u=cu.range;var yu=su.range;var gu=lu.range;var mu=hu.range;var xu=pu.range;var wu=vu.range;var bu=du.range;var Mu=Vo(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()+(n.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});var ku=Mu.range;var Tu=Vo(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()});Tu.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Vo(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)})};var Nu=Tu.range;var Su=Vo(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Go)},function(t,n){return(n-t)/Go},function(t){return t.getUTCMinutes()});var Eu=Su.range;var Au=Vo(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Jo)},function(t,n){return(n-t)/Jo},function(t){return t.getUTCHours()});var Cu=Au.range;var zu=Vo(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Qo},function(t){return t.getUTCDate()-1});var Pu=zu.range;function Lu(t){return Vo(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7);n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/Ko})}var qu=Lu(0);var Uu=Lu(1);var Iu=Lu(2);var Ru=Lu(3);var Du=Lu(4);var Ou=Lu(5);var Fu=Lu(6);var Yu=qu.range;var Bu=Uu.range;var ju=Iu.range;var Hu=Ru.range;var Xu=Du.range;var Vu=Ou.range;var Wu=Fu.range;var $u=Vo(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()+(n.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});var Zu=$u.range;var Gu=Vo(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()});Gu.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Vo(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)})};var Ju=Gu.range;function Qu(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)]}function Ku(t){return t=Qu(Math.abs(t)),t?t[1]:NaN}function tf(t,n){return function(e,r){var i=e.length,a=[],o=0,u=t[0],f=0;while(i>0&&u>0){if(f+u+1>r)u=Math.max(1,r-f);a.push(e.substring(i-=u,i+u));if((f+=u+1)>r)break;u=t[o=(o+1)%t.length]}return a.reverse().join(n)}}function nf(t,n){t=t.toPrecision(n);t:for(var e=t.length,r=1,i=-1,a;r<e;++r){switch(t[r]){case".":i=a=r;break;case"0":if(i===0)i=r;a=r;break;case"e":break t;default:if(i>0)i=0;break}}return i>0?t.slice(0,i)+t.slice(a+1):t}var ef;function rf(t,n){var e=Qu(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(ef=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Qu(t,Math.max(0,n+a-1))[0]}function af(t,n){var e=Qu(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")}var of={"":nf,"%":function(t,n){return(t*100).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 af(t*100,n)},r:af,s:rf,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};var uf=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function ff(t){return new cf(t)}function cf(t){if(!(n=uf.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",a=n[4]||"",o=!!n[5],u=n[6]&&+n[6],f=!!n[7],c=n[8]&&+n[8].slice(1),s=n[9]||"";if(s==="n")f=true,s="g";else if(!of[s])s="";if(o||e==="0"&&r==="=")o=true,e="0",r="=";this.fill=e;this.align=r;this.sign=i;this.symbol=a;this.zero=o;this.width=u;this.comma=f;this.precision=c;this.type=s}cf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type};var sf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lf(t){return t}function hf(t){var n=t.grouping&&t.thousands?tf(t.grouping,t.thousands):lf,e=t.currency,r=t.decimal;function i(t){t=ff(t);var i=t.fill,a=t.align,o=t.sign,u=t.symbol,f=t.zero,c=t.width,s=t.comma,l=t.precision,h=t.type;var p=u==="$"?e[0]:u==="#"&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v=u==="$"?e[1]:/[%p]/.test(h)?"%":"";var d=of[h],_=!h||/[defgprs%]/.test(h);l=l==null?h?6:12:/[gprs]/.test(h)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l));function y(t){var e=p,u=v,y,g,m;if(h==="c"){u=d(t)+u;t=""}else{t=+t;var x=(t<0||1/t<0)&&(t*=-1,true);t=d(t,l);if(x){y=-1,g=t.length;x=false;while(++y<g){if(m=t.charCodeAt(y),48<m&&m<58||h==="x"&&96<m&&m<103||h==="X"&&64<m&&m<71){x=true;break}}}e=(x?o==="("?o:"-":o==="-"||o==="("?"":o)+e;u=u+(h==="s"?sf[8+ef/3]:"")+(x&&o==="("?")":"");if(_){y=-1,g=t.length;while(++y<g){if(m=t.charCodeAt(y),48>m||m>57){u=(m===46?r+t.slice(y+1):t.slice(y))+u;t=t.slice(0,y);break}}}}if(s&&!f)t=n(t,Infinity);var w=e.length+t.length+u.length,b=w<c?new Array(c-w+1).join(i):"";if(s&&f)t=n(b+t,b.length?c-u.length:Infinity),b="";switch(a){case"<":return e+t+u+b;case"=":return e+b+t+u;case"^":return b.slice(0,w=b.length>>1)+e+t+u+b.slice(w)}return b+e+t+u}y.toString=function(){return t+""};return y}function a(t,n){var e=i((t=ff(t),t.type="f",t)),r=Math.max(-8,Math.min(8,Math.floor(Ku(n)/3)))*3,a=Math.pow(10,-r),o=sf[8+r/3];return function(t){return e(a*t)+o}}return{format:i,formatPrefix:a}}var pf;t.format;t.formatPrefix;vf({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function vf(n){pf=hf(n);t.format=pf.format;t.formatPrefix=pf.formatPrefix;return pf}function df(t){return Math.max(0,-Ku(Math.abs(t)))}function _f(t,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ku(n)/3)))*3-Ku(Math.abs(t)))}function yf(t,n){t=Math.abs(t),n=Math.abs(n)-t;return Math.max(0,Ku(n)-Ku(t))+1}function gf(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);n.setFullYear(t.y);return n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function mf(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));n.setUTCFullYear(t.y);return n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xf(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function wf(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,u=t.months,f=t.shortMonths;var c=Ef(i),s=Af(i),l=Ef(a),h=Af(a),p=Ef(o),v=Af(o),d=Ef(u),_=Af(u),y=Ef(f),g=Af(f);var m={a:L,A:q,b:U,B:I,c:null,d:Hf,e:Hf,H:Xf,I:Vf,j:Wf,L:$f,m:Zf,M:Gf,p:R,S:Jf,U:Qf,w:Kf,W:tc,x:null,X:null,y:nc,Y:ec,Z:rc,"%":gc};var x={a:D,A:O,b:F,B:Y,c:null,d:ic,e:ic,H:ac,I:oc,j:uc,L:fc,m:cc,M:sc,p:B,S:lc,U:hc,w:pc,W:vc,x:null,X:null,y:dc,Y:_c,Z:yc,"%":gc};var w={a:N,A:S,b:E,B:A,c:C,d:Rf,e:Rf,H:Of,I:Of,j:Df,L:Bf,m:If,M:Ff,p:T,S:Yf,U:zf,w:Cf,W:Pf,x:z,X:P,y:qf,Y:Lf,Z:Uf,"%":jf};m.x=b(e,m);m.X=b(r,m);m.c=b(n,m);x.x=b(e,x);x.X=b(r,x);x.c=b(n,x);function b(t,n){return function(e){var r=[],i=-1,a=0,o=t.length,u,f,c;if(!(e instanceof Date))e=new Date(+e);while(++i<o){if(t.charCodeAt(i)===37){r.push(t.slice(a,i));if((f=bf[u=t.charAt(++i)])!=null)u=t.charAt(++i);else f=u==="e"?" ":"0";if(c=n[u])u=c(e,f);r.push(u);a=i+1}}r.push(t.slice(a,i));return r.join("")}}function M(t,n){return function(e){var r=xf(1900),i=k(r,t,e+="",0);if(i!=e.length)return null;if("p"in r)r.H=r.H%12+r.p*12;if("W"in r||"U"in r){if(!("w"in r))r.w="W"in r?1:0;var a="Z"in r?mf(xf(r.y)).getUTCDay():n(xf(r.y)).getDay();r.m=0;r.d="W"in r?(r.w+6)%7+r.W*7-(a+5)%7:r.w+r.U*7-(a+6)%7}if("Z"in r){r.H+=r.Z/100|0;r.M+=r.Z%100;return mf(r)}return n(r)}}function k(t,n,e,r){var i=0,a=n.length,o=e.length,u,f;while(i<a){if(r>=o)return-1;u=n.charCodeAt(i++);if(u===37){u=n.charAt(i++);f=w[u in bf?n.charAt(i++):u];if(!f||(r=f(t,e,r))<0)return-1}else if(u!=e.charCodeAt(r++)){return-1}}return r}function T(t,n,e){var r=c.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1}function N(t,n,e){var r=p.exec(n.slice(e));return r?(t.w=v[r[0].toLowerCase()],e+r[0].length):-1}function S(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1}function E(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1}function A(t,n,e){var r=d.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1}function C(t,e,r){return k(t,n,e,r)}function z(t,n,r){return k(t,e,n,r)}function P(t,n,e){return k(t,r,n,e)}function L(t){return o[t.getDay()]}function q(t){return a[t.getDay()]}function U(t){return f[t.getMonth()]}function I(t){return u[t.getMonth()]}function R(t){return i[+(t.getHours()>=12)]}function D(t){return o[t.getUTCDay()]}function O(t){return a[t.getUTCDay()]}function F(t){return f[t.getUTCMonth()]}function Y(t){return u[t.getUTCMonth()]}function B(t){return i[+(t.getUTCHours()>=12)]}return{format:function(t){var n=b(t+="",m);n.toString=function(){return t};return n},parse:function(t){var n=M(t+="",gf);n.toString=function(){return t};return n},utcFormat:function(t){var n=b(t+="",x);n.toString=function(){return t};return n},utcParse:function(t){var n=M(t,mf);n.toString=function(){return t};return n}}}var bf={"-":"",_:" ",0:"0"};var Mf=/^\s*\d+/;var kf=/^%/;var Tf=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function Nf(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<e?new Array(e-a+1).join(n)+i:i)}function Sf(t){return t.replace(Tf,"\\$&")}function Ef(t){return new RegExp("^(?:"+t.map(Sf).join("|")+")","i")}function Af(t){var n={},e=-1,r=t.length;while(++e<r)n[t[e].toLowerCase()]=e;return n}function Cf(t,n,e){var r=Mf.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function zf(t,n,e){var r=Mf.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Pf(t,n,e){var r=Mf.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Lf(t,n,e){var r=Mf.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function qf(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Uf(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 If(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Rf(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Df(t,n,e){var r=Mf.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Of(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ff(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Yf(t,n,e){var r=Mf.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Bf(t,n,e){var r=Mf.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function jf(t,n,e){var r=kf.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Hf(t,n){return Nf(t.getDate(),n,2)}function Xf(t,n){return Nf(t.getHours(),n,2)}function Vf(t,n){return Nf(t.getHours()%12||12,n,2)}function Wf(t,n){return Nf(1+ou.count(Tu(t),t),n,3)}function $f(t,n){return Nf(t.getMilliseconds(),n,3)}function Zf(t,n){return Nf(t.getMonth()+1,n,2)}function Gf(t,n){return Nf(t.getMinutes(),n,2)}function Jf(t,n){return Nf(t.getSeconds(),n,2)}function Qf(t,n){return Nf(cu.count(Tu(t),t),n,2)}function Kf(t){return t.getDay()}function tc(t,n){return Nf(su.count(Tu(t),t),n,2)}function nc(t,n){return Nf(t.getFullYear()%100,n,2)}function ec(t,n){return Nf(t.getFullYear()%1e4,n,4)}function rc(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Nf(n/60|0,"0",2)+Nf(n%60,"0",2)}function ic(t,n){return Nf(t.getUTCDate(),n,2)}function ac(t,n){return Nf(t.getUTCHours(),n,2)}function oc(t,n){return Nf(t.getUTCHours()%12||12,n,2)}function uc(t,n){return Nf(1+zu.count(Gu(t),t),n,3)}function fc(t,n){return Nf(t.getUTCMilliseconds(),n,3)}function cc(t,n){return Nf(t.getUTCMonth()+1,n,2)}function sc(t,n){return Nf(t.getUTCMinutes(),n,2)}function lc(t,n){return Nf(t.getUTCSeconds(),n,2)}function hc(t,n){return Nf(qu.count(Gu(t),t),n,2)}function pc(t){return t.getUTCDay()}function vc(t,n){return Nf(Uu.count(Gu(t),t),n,2)}function dc(t,n){return Nf(t.getUTCFullYear()%100,n,2)}function _c(t,n){return Nf(t.getUTCFullYear()%1e4,n,4)}function yc(){return"+0000"}function gc(){return"%"}var mc;t.timeFormat;t.timeParse;t.utcFormat;t.utcParse;xc({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"]});function xc(n){mc=wf(n);t.timeFormat=mc.format;t.timeParse=mc.parse;t.utcFormat=mc.utcFormat;t.utcParse=mc.utcParse;return mc}var wc="%Y-%m-%dT%H:%M:%S.%LZ";function bc(t){return t.toISOString()}var Mc=Date.prototype.toISOString?bc:t.utcFormat(wc);function kc(t){var n=new Date(t);return isNaN(n)?null:n}var Tc=+new Date("2000-01-01T00:00:00.000Z")?kc:t.utcParse(wc);var Nc=Array.prototype;var Sc=Nc.map;var Ec=Nc.slice;var Ac={name:"implicit"};function Cc(t){var n=H(),e=[],r=Ac;t=t==null?[]:Ec.call(t);function i(i){var a=i+"",o=n.get(a);if(!o){if(r!==Ac)return r;n.set(a,o=e.push(i))}return t[(o-1)%t.length]}i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=H();var r=-1,a=t.length,o,u;while(++r<a)if(!n.has(u=(o=t[r])+""))n.set(u,e.push(o));return i};i.range=function(n){return arguments.length?(t=Ec.call(n),i):t.slice()};i.unknown=function(t){return arguments.length?(r=t,i):r};i.copy=function(){return Cc().domain(e).range(t).unknown(r)};return i}function zc(){var t=Cc().unknown(undefined),n=t.domain,e=t.range,r=[0,1],i,a,o=false,u=0,f=0,c=.5;delete t.unknown;function s(){var t=n().length,s=r[1]<r[0],l=r[s-0],h=r[1-s];i=(h-l)/Math.max(1,t-u+f*2);if(o)i=Math.floor(i);l+=(h-l-i*(t-u))*c;a=i*(1-u);if(o)l=Math.round(l),a=Math.round(a);var p=g(t).map(function(t){return l+i*t});return e(s?p.reverse():p)}t.domain=function(t){return arguments.length?(n(t),s()):n()};t.range=function(t){return arguments.length?(r=[+t[0],+t[1]],s()):r.slice()};t.rangeRound=function(t){return r=[+t[0],+t[1]],o=true,s()};t.bandwidth=function(){return a};t.step=function(){return i};t.round=function(t){return arguments.length?(o=!!t,s()):o};t.padding=function(t){return arguments.length?(u=f=Math.max(0,Math.min(1,t)),s()):u};t.paddingInner=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),s()):u};t.paddingOuter=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),s()):f};t.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),s()):c};t.copy=function(){return zc().domain(n()).range(r).round(o).paddingInner(u).paddingOuter(f).align(c)};return s()}function Pc(t){var n=t.copy;t.padding=t.paddingOuter;delete t.paddingInner;delete t.paddingOuter;t.copy=function(){return Pc(n())};return t}function Lc(){return Pc(zc().paddingInner(1))}function qc(t){return function(){return t}}function Uc(t){return+t}var Ic=[0,1];function Rc(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:qc(n)}function Dc(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}function Oc(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function Fc(t,n,e,r){var i=t[0],a=t[1],o=n[0],u=n[1];if(a<i)i=e(a,i),o=r(u,o);else i=e(i,a),o=r(o,u);return function(t){return o(i(t))}}function Yc(t,n,e,r){var i=Math.min(t.length,n.length)-1,a=new Array(i),u=new Array(i),f=-1;if(t[i]<t[0]){t=t.slice().reverse();n=n.slice().reverse()}while(++f<i){a[f]=e(t[f],t[f+1]);u[f]=r(n[f],n[f+1])}return function(n){var e=o(t,n,1,i)-1;return u[e](a[e](n))}}function Bc(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function jc(t,n){var e=Ic,r=Ic,i=sa,a=false,o,u,f;function c(){o=Math.min(e.length,r.length)>2?Yc:Fc;u=f=null;return s}function s(n){return(u||(u=o(e,r,a?Dc(t):t,i)))(+n)}s.invert=function(t){return(f||(f=o(r,e,Rc,a?Oc(n):n)))(+t)};s.domain=function(t){return arguments.length?(e=Sc.call(t,Uc),c()):e.slice()};s.range=function(t){return arguments.length?(r=Ec.call(t),c()):r.slice()};s.rangeRound=function(t){return r=Ec.call(t),i=la,c()};s.clamp=function(t){return arguments.length?(a=!!t,c()):a};s.interpolate=function(t){return arguments.length?(i=t,c()):i};return c()}function Hc(n,e,r){var i=n[0],a=n[n.length-1],o=M(i,a,e==null?10:e),u;r=ff(r==null?",f":r);switch(r.type){case"s":{var f=Math.max(Math.abs(i),Math.abs(a));if(r.precision==null&&!isNaN(u=_f(o,f)))r.precision=u;return t.formatPrefix(r,f)}case"":case"e":case"g":case"p":case"r":{if(r.precision==null&&!isNaN(u=yf(o,Math.max(Math.abs(i),Math.abs(a)))))r.precision=u-(r.type==="e");break}case"f":case"%":{if(r.precision==null&&!isNaN(u=df(o)))r.precision=u-(r.type==="%")*2;break}}return t.format(r)}function Xc(t){var n=t.domain;t.ticks=function(t){var e=n();return b(e[0],e[e.length-1],t==null?10:t)};t.tickFormat=function(t,e){return Hc(n(),t,e)};t.nice=function(e){var r=n(),i=r.length-1,a=e==null?10:e,o=r[0],u=r[i],f=M(o,u,a);if(f){f=M(Math.floor(o/f)*f,Math.ceil(u/f)*f,a);r[0]=Math.floor(o/f)*f;r[i]=Math.ceil(u/f)*f;n(r)}return t};return t}function Vc(){var t=jc(Rc,ra);t.copy=function(){return Bc(t,Vc())};return Xc(t)}function Wc(){var t=[0,1];function n(t){return+t}n.invert=n;n.domain=n.range=function(e){return arguments.length?(t=Sc.call(e,Uc),n):t.slice()};n.copy=function(){return Wc().domain(t)};return Xc(n)}function $c(t,n){t=t.slice();var e=0,r=t.length-1,i=t[e],a=t[r],o;if(a<i){o=e,e=r,r=o;o=i,i=a,a=o}t[e]=n.floor(i);t[r]=n.ceil(a);return t}function Zc(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:qc(n)}function Gc(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function Jc(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qc(t){return t===10?Jc:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function Kc(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function ts(t){return function(n){return-t(-n)}}function ns(){var n=jc(Zc,Gc).domain([1,10]),e=n.domain,r=10,i=Kc(10),a=Qc(10);function o(){i=Kc(r),a=Qc(r);if(e()[0]<0)i=ts(i),a=ts(a);return n}n.base=function(t){return arguments.length?(r=+t,o()):r};n.domain=function(t){return arguments.length?(e(t),o()):e()};n.ticks=function(t){var n=e(),o=n[0],u=n[n.length-1],f;if(f=u<o)c=o,o=u,u=c;var c=i(o),s=i(u),l,h,p,v=t==null?10:+t,d=[];if(!(r%1)&&s-c<v){c=Math.round(c)-1,s=Math.round(s)+1;if(o>0)for(;c<s;++c){for(h=1,l=a(c);h<r;++h){p=l*h;if(p<o)continue;if(p>u)break;d.push(p)}}else for(;c<s;++c){for(h=r-1,l=a(c);h>=1;--h){p=l*h;if(p<o)continue;if(p>u)break;d.push(p)}}}else{d=b(c,s,Math.min(s-c,v)).map(a)}return f?d.reverse():d};n.tickFormat=function(e,o){if(o==null)o=r===10?".0e":",";if(typeof o!=="function")o=t.format(o);if(e===Infinity)return o;if(e==null)e=10;var u=Math.max(1,r*e/n.ticks().length);return function(t){var n=t/a(Math.round(i(t)));if(n*r<r-.5)n*=r;return n<=u?o(t):""}};n.nice=function(){return e($c(e(),{floor:function(t){return a(Math.floor(i(t)))},ceil:function(t){return a(Math.ceil(i(t)))}}))};n.copy=function(){return Bc(n,ns().base(r))};return n}function es(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function rs(){var t=1,n=jc(r,i),e=n.domain;function r(n,e){return(e=es(e,t)-(n=es(n,t)))?function(r){return(es(r,t)-n)/e}:qc(e)}function i(n,e){e=es(e,t)-(n=es(n,t));return function(r){return es(n+e*r,1/t)}}n.exponent=function(n){return arguments.length?(t=+n,e(e())):t};n.copy=function(){return Bc(n,rs().exponent(t))};return Xc(n)}function is(){return rs().exponent(.5)}function as(){var t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);r=new Array(i-1);while(++e<i)r[e-1]=N(t,e/i);return a}function a(t){if(!isNaN(t=+t))return n[o(r,t)]}a.invertExtent=function(e){var i=n.indexOf(e);return i<0?[NaN,NaN]:[i>0?r[i-1]:t[0],i<r.length?r[i]:t[t.length-1]]};a.domain=function(n){if(!arguments.length)return t.slice();t=[];for(var r=0,a=n.length,o;r<a;++r)if(o=n[r],o!=null&&!isNaN(o=+o))t.push(o);t.sort(e);return i()};a.range=function(t){return arguments.length?(n=Ec.call(t),i()):n.slice()};a.quantiles=function(){return r.slice()};a.copy=function(){return as().domain(t).range(n)};return a}function os(){var t=0,n=1,e=1,r=[.5],i=[0,1];function a(t){if(t<=t)return i[o(r,t,0,e)]}function u(){var i=-1;r=new Array(e);while(++i<e)r[i]=((i+1)*n-(i-e)*t)/(e+1);return a}a.domain=function(e){return arguments.length?(t=+e[0],n=+e[1],u()):[t,n]};a.range=function(t){return arguments.length?(e=(i=Ec.call(t)).length-1,u()):i.slice()};a.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[t,r[0]]:o>=e?[r[e-1],n]:[r[o-1],r[o]]};a.copy=function(){return os().domain([t,n]).range(i)};return Xc(a)}function us(){var t=[.5],n=[0,1],e=1;function r(r){if(r<=r)return n[o(t,r,0,e)]}r.domain=function(i){return arguments.length?(t=Ec.call(i),e=Math.min(t.length,n.length-1),r):t.slice()};r.range=function(i){return arguments.length?(n=Ec.call(i),e=Math.min(t.length,n.length-1),r):n.slice()};r.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]};r.copy=function(){return us().domain(t).range(n)};return r}var fs=1e3;var cs=fs*60;var ss=cs*60;var ls=ss*24;var hs=ls*7;var ps=ls*30;var vs=ls*365;function ds(t){return new Date(t)}function _s(t){return t instanceof Date?+t:+new Date(+t)}function ys(t,n,e,i,a,o,u,f,c){var s=jc(Rc,ra),l=s.invert,h=s.domain;var p=c(".%L"),v=c(":%S"),d=c("%I:%M"),_=c("%I %p"),y=c("%a %d"),g=c("%b %d"),m=c("%B"),x=c("%Y");var w=[[u,1,fs],[u,5,5*fs],[u,15,15*fs],[u,30,30*fs],[o,1,cs],[o,5,5*cs],[o,15,15*cs],[o,30,30*cs],[a,1,ss],[a,3,3*ss],[a,6,6*ss],[a,12,12*ss],[i,1,ls],[i,2,2*ls],[e,1,hs],[n,1,ps],[n,3,3*ps],[t,1,vs]];function b(r){return(u(r)<r?p:o(r)<r?v:a(r)<r?d:i(r)<r?_:n(r)<r?e(r)<r?y:g:t(r)<r?m:x)(r);
  4. }function k(n,e,i,a){if(n==null)n=10;if(typeof n==="number"){var o=Math.abs(i-e)/n,u=r(function(t){return t[2]}).right(w,o);if(u===w.length){a=M(e/vs,i/vs,n);n=t}else if(u){u=w[o/w[u-1][2]<w[u][2]/o?u-1:u];a=u[1];n=u[0]}else{a=M(e,i,n);n=f}}return a==null?n:n.every(a)}s.invert=function(t){return new Date(l(t))};s.domain=function(t){return arguments.length?h(Sc.call(t,_s)):h().map(ds)};s.ticks=function(t,n){var e=h(),r=e[0],i=e[e.length-1],a=i<r,o;if(a)o=r,r=i,i=o;o=k(t,r,i,n);o=o?o.range(r,i+1):[];return a?o.reverse():o};s.tickFormat=function(t,n){return n==null?b:c(n)};s.nice=function(t,n){var e=h();return(t=k(t,e[0],e[e.length-1],n))?h($c(e,t)):s};s.copy=function(){return Bc(s,ys(t,n,e,i,a,o,u,f,c))};return s}function gs(){return ys(Tu,Mu,cu,ou,iu,eu,tu,Wo,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}function ms(){return ys(Gu,$u,qu,zu,Au,Su,tu,Wo,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function xs(t){return t.match(/.{6}/g).map(function(t){return"#"+t})}var ws=xs("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var bs=xs("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");var Ms=xs("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");var ks=xs("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");var Ts=Ya(Yi(300,.5,0),Yi(-240,.5,1));var Ns=Ya(Yi(-100,.75,.35),Yi(80,1.5,.8));var Ss=Ya(Yi(260,.75,.35),Yi(80,1.5,.8));var Es=Yi();function As(t){if(t<0||t>1)t-=Math.floor(t);var n=Math.abs(t-.5);Es.h=360*t-100;Es.s=1.5-1.5*n;Es.l=.8-.9*n;return Es+""}function Cs(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var zs=Cs(xs("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Ps=Cs(xs("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));var Ls=Cs(xs("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));var qs=Cs(xs("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Us(t){var n=0,e=1,r=false;function i(i){var a=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,a)):a)}i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]};i.clamp=function(t){return arguments.length?(r=!!t,i):r};i.interpolator=function(n){return arguments.length?(t=n,i):t};i.copy=function(){return Us(t).domain([n,e]).clamp(r)};return Xc(i)}var Is="http://www.w3.org/1999/xhtml";var Rs={svg:"http://www.w3.org/2000/svg",xhtml:Is,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ds(t){var n=t+="",e=n.indexOf(":");if(e>=0&&(n=t.slice(0,e))!=="xmlns")t=t.slice(e+1);return Rs.hasOwnProperty(n)?{space:Rs[n],local:t}:t}function Os(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Is&&n.documentElement.namespaceURI===Is?n.createElement(t):n.createElementNS(e,t)}}function Fs(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ys(t){var n=Ds(t);return(n.local?Fs:Os)(n)}var Bs=0;function js(){return new Hs}function Hs(){this._="@"+(++Bs).toString(36)}Hs.prototype=js.prototype={constructor:Hs,get:function(t){var n=this._;while(!(n in t))if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Xs=function(t){return function(){return this.matches(t)}};if(typeof document!=="undefined"){var Vs=document.documentElement;if(!Vs.matches){var Ws=Vs.webkitMatchesSelector||Vs.msMatchesSelector||Vs.mozMatchesSelector||Vs.oMatchesSelector;Xs=function(t){return function(){return Ws.call(this,t)}}}}var $s=Xs;var Zs={};t.event=null;if(typeof document!=="undefined"){var Gs=document.documentElement;if(!("onmouseenter"in Gs)){Zs={mouseenter:"mouseover",mouseleave:"mouseout"}}}function Js(t,n,e){t=Qs(t,n,e);return function(n){var e=n.relatedTarget;if(!e||e!==this&&!(e.compareDocumentPosition(this)&8)){t.call(this,n)}}}function Qs(n,e,r){return function(i){var a=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=a}}}function Ks(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0)n=t.slice(e+1),t=t.slice(0,e);return{type:t,name:n}})}function tl(t){return function(){var n=this.__on;if(!n)return;for(var e=0,r=-1,i=n.length,a;e<i;++e){if(a=n[e],(!t.type||a.type===t.type)&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.capture)}else{n[++r]=a}}if(++r)n.length=r;else delete this.__on}}function nl(t,n,e){var r=Zs.hasOwnProperty(t.type)?Js:Qs;return function(i,a,o){var u=this.__on,f,c=r(n,a,o);if(u)for(var s=0,l=u.length;s<l;++s){if((f=u[s]).type===t.type&&f.name===t.name){this.removeEventListener(f.type,f.listener,f.capture);this.addEventListener(f.type,f.listener=c,f.capture=e);f.value=n;return}}this.addEventListener(t.type,c,e);f={type:t.type,name:t.name,value:n,listener:c,capture:e};if(!u)this.__on=[f];else u.push(f)}}function el(t,n,e){var r=Ks(t+""),i,a=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u)for(var f=0,c=u.length,s;f<c;++f){for(i=0,s=u[f];i<a;++i){if((o=r[i]).type===s.type&&o.name===s.name){return s.value}}}return}u=n?nl:tl;if(e==null)e=false;for(i=0;i<a;++i)this.each(u(r[i],n,e));return this}function rl(n,e,r,i){var a=t.event;n.sourceEvent=t.event;t.event=n;try{return e.apply(r,i)}finally{t.event=a}}function il(){var n=t.event,e;while(e=n.sourceEvent)n=e;return n}function al(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();r.x=n.clientX,r.y=n.clientY;r=r.matrixTransform(t.getScreenCTM().inverse());return[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function ol(t){var n=il();if(n.changedTouches)n=n.changedTouches[0];return al(t,n)}function ul(){}function fl(t){return t==null?ul:function(){return this.querySelector(t)}}function cl(t){if(typeof t!=="function")t=fl(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i){for(var a=n[i],o=a.length,u=r[i]=new Array(o),f,c,s=0;s<o;++s){if((f=a[s])&&(c=t.call(f,f.__data__,s,a))){if("__data__"in f)c.__data__=f.__data__;u[s]=c}}}return new Sh(r,this._parents)}function sl(){return[]}function ll(t){return t==null?sl:function(){return this.querySelectorAll(t)}}function hl(t){if(typeof t!=="function")t=ll(t);for(var n=this._groups,e=n.length,r=[],i=[],a=0;a<e;++a){for(var o=n[a],u=o.length,f,c=0;c<u;++c){if(f=o[c]){r.push(t.call(f,f.__data__,c,o));i.push(f)}}}return new Sh(r,i)}function pl(t){if(typeof t!=="function")t=$s(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i){for(var a=n[i],o=a.length,u=r[i]=[],f,c=0;c<o;++c){if((f=a[c])&&t.call(f,f.__data__,c,a)){u.push(f)}}}return new Sh(r,this._parents)}function vl(t){return new Array(t.length)}function dl(){return new Sh(this._enter||this._groups.map(vl),this._parents)}function _l(t,n){this.ownerDocument=t.ownerDocument;this.namespaceURI=t.namespaceURI;this._next=null;this._parent=t;this.__data__=n}_l.prototype={constructor:_l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function yl(t){return function(){return t}}var gl="$";function ml(t,n,e,r,i,a){var o=0,u,f=n.length,c=a.length;for(;o<c;++o){if(u=n[o]){u.__data__=a[o];r[o]=u}else{e[o]=new _l(t,a[o])}}for(;o<f;++o){if(u=n[o]){i[o]=u}}}function xl(t,n,e,r,i,a,o){var u,f,c={},s=n.length,l=a.length,h=new Array(s),p;for(u=0;u<s;++u){if(f=n[u]){h[u]=p=gl+o.call(f,f.__data__,u,n);if(p in c){i[u]=f}else{c[p]=f}}}for(u=0;u<l;++u){p=gl+o.call(t,a[u],u,a);if(f=c[p]){r[u]=f;f.__data__=a[u];c[p]=null}else{e[u]=new _l(t,a[u])}}for(u=0;u<s;++u){if((f=n[u])&&c[h[u]]===f){i[u]=f}}}function wl(t,n){if(!t){p=new Array(this.size()),c=-1;this.each(function(t){p[++c]=t});return p}var e=n?xl:ml,r=this._parents,i=this._groups;if(typeof t!=="function")t=yl(t);for(var a=i.length,o=new Array(a),u=new Array(a),f=new Array(a),c=0;c<a;++c){var s=r[c],l=i[c],h=l.length,p=t.call(s,s&&s.__data__,c,r),v=p.length,d=u[c]=new Array(v),_=o[c]=new Array(v),y=f[c]=new Array(h);e(s,l,d,_,y,p,n);for(var g=0,m=0,x,w;g<v;++g){if(x=d[g]){if(g>=m)m=g+1;while(!(w=_[m])&&++m<v);x._next=w||null}}}o=new Sh(o,r);o._enter=u;o._exit=f;return o}function bl(){return new Sh(this._exit||this._groups.map(vl),this._parents)}function Ml(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u){for(var f=n[u],c=e[u],s=f.length,l=o[u]=new Array(s),h,p=0;p<s;++p){if(h=f[p]||c[p]){l[p]=h}}}for(;u<r;++u){o[u]=n[u]}return new Sh(o,this._parents)}function kl(){for(var t=this._groups,n=-1,e=t.length;++n<e;){for(var r=t[n],i=r.length-1,a=r[i],o;--i>=0;){if(o=r[i]){if(a&&a!==o.nextSibling)a.parentNode.insertBefore(o,a);a=o}}}return this}function Tl(t){if(!t)t=Nl;function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a){for(var o=e[a],u=o.length,f=i[a]=new Array(u),c,s=0;s<u;++s){if(c=o[s]){f[s]=c}}f.sort(n)}return new Sh(i,this._parents).order()}function Nl(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Sl(){var t=arguments[0];arguments[0]=this;t.apply(null,arguments);return this}function El(){var t=new Array(this.size()),n=-1;this.each(function(){t[++n]=this});return t}function Al(){for(var t=this._groups,n=0,e=t.length;n<e;++n){for(var r=t[n],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}}return null}function Cl(){var t=0;this.each(function(){++t});return t}function zl(){return!this.node()}function Pl(t){for(var n=this._groups,e=0,r=n.length;e<r;++e){for(var i=n[e],a=0,o=i.length,u;a<o;++a){if(u=i[a])t.call(u,u.__data__,a,i)}}return this}function Ll(t){return function(){this.removeAttribute(t)}}function ql(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ul(t,n){return function(){this.setAttribute(t,n)}}function Il(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Rl(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}}function Dl(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}}function Ol(t,n){var e=Ds(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?ql:Ll:typeof n==="function"?e.local?Dl:Rl:e.local?Il:Ul)(e,n))}function Fl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Yl(t){return function(){this.style.removeProperty(t)}}function Bl(t,n,e){return function(){this.style.setProperty(t,n,e)}}function jl(t,n,e){return function(){var r=n.apply(this,arguments);if(r==null)this.style.removeProperty(t);else this.style.setProperty(t,r,e)}}function Hl(t,n,e){var r;return arguments.length>1?this.each((n==null?Yl:typeof n==="function"?jl:Bl)(t,n,e==null?"":e)):Fl(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function Xl(t){return function(){delete this[t]}}function Vl(t,n){return function(){this[t]=n}}function Wl(t,n){return function(){var e=n.apply(this,arguments);if(e==null)delete this[t];else this[t]=e}}function $l(t,n){return arguments.length>1?this.each((n==null?Xl:typeof n==="function"?Wl:Vl)(t,n)):this.node()[t]}function Zl(t){return t.trim().split(/^|\s+/)}function Gl(t){return t.classList||new Jl(t)}function Jl(t){this._node=t;this._names=Zl(t.getAttribute("class")||"")}Jl.prototype={add:function(t){var n=this._names.indexOf(t);if(n<0){this._names.push(t);this._node.setAttribute("class",this._names.join(" "))}},remove:function(t){var n=this._names.indexOf(t);if(n>=0){this._names.splice(n,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(t){return this._names.indexOf(t)>=0}};function Ql(t,n){var e=Gl(t),r=-1,i=n.length;while(++r<i)e.add(n[r])}function Kl(t,n){var e=Gl(t),r=-1,i=n.length;while(++r<i)e.remove(n[r])}function th(t){return function(){Ql(this,t)}}function nh(t){return function(){Kl(this,t)}}function eh(t,n){return function(){(n.apply(this,arguments)?Ql:Kl)(this,t)}}function rh(t,n){var e=Zl(t+"");if(arguments.length<2){var r=Gl(this.node()),i=-1,a=e.length;while(++i<a)if(!r.contains(e[i]))return false;return true}return this.each((typeof n==="function"?eh:n?th:nh)(e,n))}function ih(){this.textContent=""}function ah(t){return function(){this.textContent=t}}function oh(t){return function(){var n=t.apply(this,arguments);this.textContent=n==null?"":n}}function uh(t){return arguments.length?this.each(t==null?ih:(typeof t==="function"?oh:ah)(t)):this.node().textContent}function fh(){this.innerHTML=""}function ch(t){return function(){this.innerHTML=t}}function sh(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n==null?"":n}}function lh(t){return arguments.length?this.each(t==null?fh:(typeof t==="function"?sh:ch)(t)):this.node().innerHTML}function hh(){if(this.nextSibling)this.parentNode.appendChild(this)}function ph(){return this.each(hh)}function vh(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dh(){return this.each(vh)}function _h(t){var n=typeof t==="function"?t:Ys(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function yh(){return null}function gh(t,n){var e=typeof t==="function"?t:Ys(t),r=n==null?yh:typeof n==="function"?n:fl(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function mh(){var t=this.parentNode;if(t)t.removeChild(this)}function xh(){return this.each(mh)}function wh(t){return arguments.length?this.property("__data__",t):this.node().__data__}function bh(t,n,e){var r=Fl(t),i=r.CustomEvent;if(i){i=new i(n,e)}else{i=r.document.createEvent("Event");if(e)i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail;else i.initEvent(n,false,false)}t.dispatchEvent(i)}function Mh(t,n){return function(){return bh(this,t,n)}}function kh(t,n){return function(){return bh(this,t,n.apply(this,arguments))}}function Th(t,n){return this.each((typeof n==="function"?kh:Mh)(t,n))}var Nh=[null];function Sh(t,n){this._groups=t;this._parents=n}function Eh(){return new Sh([[document.documentElement]],Nh)}Sh.prototype=Eh.prototype={constructor:Sh,select:cl,selectAll:hl,filter:pl,data:wl,enter:dl,exit:bl,merge:Ml,order:kl,sort:Tl,call:Sl,nodes:El,node:Al,size:Cl,empty:zl,each:Pl,attr:Ol,style:Hl,property:$l,classed:rh,text:uh,html:lh,raise:ph,lower:dh,append:_h,insert:gh,remove:xh,datum:wh,on:el,dispatch:Th};function Ah(t){return typeof t==="string"?new Sh([[document.querySelector(t)]],[document.documentElement]):new Sh([[t]],Nh)}function Ch(t){return typeof t==="string"?new Sh([document.querySelectorAll(t)],[document.documentElement]):new Sh([t==null?[]:t],Nh)}function zh(t,n,e){if(arguments.length<3)e=n,n=il().changedTouches;for(var r=0,i=n?n.length:0,a;r<i;++r){if((a=n[r]).identifier===e){return al(t,a)}}return null}function Ph(t,n){if(n==null)n=il().touches;for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e){i[e]=al(t,n[e])}return i}var Lh=Ha("start","end","interrupt");var qh=[];var Uh=0;var Ih=1;var Rh=2;var Dh=3;var Oh=4;var Fh=5;function Yh(t,n,e,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(e in o)return;Xh(t,e,{name:n,index:r,group:i,on:Lh,tween:qh,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Uh})}function Bh(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Uh)throw new Error("too late");return e}function jh(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Rh)throw new Error("too late");return e}function Hh(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Xh(t,n,e){var r=t.__transition,i;r[n]=e;e.timer=Io(a,0,e.time);function a(t){e.state=Ih;if(e.delay<=t)o(t-e.delay);else e.timer.restart(o,e.delay,e.time)}function o(a){var o,f,c,s;for(o in r){s=r[o];if(s.name!==e.name)continue;if(s.state===Dh){s.state=Fh;s.timer.stop();s.on.call("interrupt",t,t.__data__,s.index,s.group);delete r[o]}else if(+o<n){s.state=Fh;s.timer.stop();delete r[o]}}Bo(function(){if(e.state===Dh){e.timer.restart(u,e.delay,e.time);u(a)}});e.state=Rh;e.on.call("start",t,t.__data__,e.index,e.group);if(e.state!==Rh)return;e.state=Dh;i=new Array(c=e.tween.length);for(o=0,f=-1;o<c;++o){if(s=e.tween[o].value.call(t,t.__data__,e.index,e.group)){i[++f]=s}}i.length=f+1}function u(a){var o=a<e.duration?e.ease.call(null,a/e.duration):(e.state=Oh,1),u=-1,f=i.length;while(++u<f){i[u].call(null,o)}if(e.state===Oh){e.state=Fh;e.timer.stop();e.on.call("end",t,t.__data__,e.index,e.group);for(u in r)if(+u!==n)return void delete r[n];delete t.__transition}}}function Vh(t,n){var e=t.__transition,r,i,a=true,o;if(!e)return;n=n==null?null:n+"";for(o in e){if((r=e[o]).name!==n){a=false;continue}i=r.state===Dh;r.state=Fh;r.timer.stop();if(i)r.on.call("interrupt",t,t.__data__,r.index,r.group);delete e[o]}if(a)delete t.__transition}function Wh(t){return this.each(function(){Vh(this,t)})}function $h(t,n){var e,r;return function(){var i=jh(this,t),a=i.tween;if(a!==e){r=e=a;for(var o=0,u=r.length;o<u;++o){if(r[o].name===n){r=r.slice();r.splice(o,1);break}}}i.tween=r}}function Zh(t,n,e){var r,i;if(typeof e!=="function")throw new Error;return function(){var a=jh(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:n,value:e},f=0,c=i.length;f<c;++f){if(i[f].name===n){i[f]=u;break}}if(f===c)i.push(u)}a.tween=i}}function Gh(t,n){var e=this._id;t+="";if(arguments.length<2){var r=Hh(this.node(),e).tween;for(var i=0,a=r.length,o;i<a;++i){if((o=r[i]).name===t){return o.value}}return null}return this.each((n==null?$h:Zh)(e,t,n))}function Jh(t,n,e){var r=t._id;t.each(function(){var t=jh(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)});return function(t){return Hh(t,r).value[n]}}function Qh(t,n){var e;return(typeof n==="number"?ra:n instanceof ni?Qi:(e=ni(n))?(n=e,Qi):ca)(t,n)}function Kh(t){return function(){this.removeAttribute(t)}}function tp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function np(t,n,e){var r,i;return function(){var a=this.getAttribute(t);return a===e?null:a===r?i:i=n(r=a,e)}}function ep(t,n,e){var r,i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===e?null:a===r?i:i=n(r=a,e)}}function rp(t,n,e){var r,i,a;return function(){var o,u=e(this);if(u==null)return void this.removeAttribute(t);o=this.getAttribute(t);return o===u?null:o===r&&u===i?a:a=n(r=o,i=u)}}function ip(t,n,e){var r,i,a;return function(){var o,u=e(this);if(u==null)return void this.removeAttributeNS(t.space,t.local);o=this.getAttributeNS(t.space,t.local);return o===u?null:o===r&&u===i?a:a=n(r=o,i=u)}}function ap(t,n){var e=Ds(t),r=e==="transform"?Ma:Qh;return this.attrTween(t,typeof n==="function"?(e.local?ip:rp)(e,r,Jh(this,"attr."+t,n)):n==null?(e.local?tp:Kh)(e):(e.local?ep:np)(e,r,n))}function op(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}e._value=n;return e}function up(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}e._value=n;return e}function fp(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!=="function")throw new Error;var r=Ds(t);return this.tween(e,(r.local?op:up)(r,n))}function cp(t,n){return function(){Bh(this,t).delay=+n.apply(this,arguments)}}function sp(t,n){return n=+n,function(){Bh(this,t).delay=n}}function lp(t){var n=this._id;return arguments.length?this.each((typeof t==="function"?cp:sp)(n,t)):Hh(this.node(),n).delay}function hp(t,n){return function(){jh(this,t).duration=+n.apply(this,arguments)}}function pp(t,n){return n=+n,function(){jh(this,t).duration=n}}function vp(t){var n=this._id;return arguments.length?this.each((typeof t==="function"?hp:pp)(n,t)):Hh(this.node(),n).duration}function dp(t,n){if(typeof n!=="function")throw new Error;return function(){jh(this,t).ease=n}}function _p(t){var n=this._id;return arguments.length?this.each(dp(n,t)):Hh(this.node(),n).ease}function yp(t){if(typeof t!=="function")t=$s(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i){for(var a=n[i],o=a.length,u=r[i]=[],f,c=0;c<o;++c){if((f=a[c])&&t.call(f,f.__data__,c,a)){u.push(f)}}}return new Fp(r,this._parents,this._name,this._id)}function gp(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u){for(var f=n[u],c=e[u],s=f.length,l=o[u]=new Array(s),h,p=0;p<s;++p){if(h=f[p]||c[p]){l[p]=h}}}for(;u<r;++u){o[u]=n[u]}return new Fp(o,this._parents,this._name,this._id)}function mp(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");if(n>=0)t=t.slice(0,n);return!t||t==="start"})}function xp(t,n,e){var r,i,a=mp(n)?Bh:jh;return function(){var o=a(this,t),u=o.on;if(u!==r)(i=(r=u).copy()).on(n,e);o.on=i}}function wp(t,n){var e=this._id;return arguments.length<2?Hh(this.node(),e).on.on(t):this.each(xp(e,t,n))}function bp(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;if(n)n.removeChild(this)}}function Mp(){return this.on("end.remove",bp(this._id))}function kp(t){var n=this._name,e=this._id;if(typeof t!=="function")t=fl(t);for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o){for(var u=r[o],f=u.length,c=a[o]=new Array(f),s,l,h=0;h<f;++h){if((s=u[h])&&(l=t.call(s,s.__data__,h,u))){if("__data__"in s)l.__data__=s.__data__;c[h]=l;Yh(c[h],n,e,h,c,Hh(s,e))}}}return new Fp(a,this._parents,n,e)}function Tp(t){var n=this._name,e=this._id;if(typeof t!=="function")t=ll(t);for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u){for(var f=r[u],c=f.length,s,l=0;l<c;++l){if(s=f[l]){for(var h=t.call(s,s.__data__,l,f),p,v=Hh(s,e),d=0,_=h.length;d<_;++d){if(p=h[d]){Yh(p,n,e,d,h,v)}}a.push(h);o.push(s)}}}return new Fp(a,o,n,e)}var Np=Eh.prototype.constructor;function Sp(){return new Np(this._groups,this._parents)}function Ep(t,n){var e,r,i;return function(){var a=Fl(this).getComputedStyle(this,null),o=a.getPropertyValue(t),u=(this.style.removeProperty(t),a.getPropertyValue(t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Ap(t){return function(){this.style.removeProperty(t)}}function Cp(t,n,e){var r,i;return function(){var a=Fl(this).getComputedStyle(this,null).getPropertyValue(t);return a===e?null:a===r?i:i=n(r=a,e)}}function zp(t,n,e){var r,i,a;return function(){var o=Fl(this).getComputedStyle(this,null),u=o.getPropertyValue(t),f=e(this);if(f==null)f=(this.style.removeProperty(t),o.getPropertyValue(t));return u===f?null:u===r&&f===i?a:a=n(r=u,i=f)}}function Pp(t,n,e){var r=(t+="")==="transform"?ba:Qh;return n==null?this.styleTween(t,Ep(t,r)).on("end.style."+t,Ap(t)):this.styleTween(t,typeof n==="function"?zp(t,r,Jh(this,"style."+t,n)):Cp(t,r,n),e)}function Lp(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}r._value=n;return r}function qp(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!=="function")throw new Error;return this.tween(r,Lp(t,n,e==null?"":e))}function Up(t){return function(){this.textContent=t}}function Ip(t){return function(){var n=t(this);this.textContent=n==null?"":n}}function Rp(t){return this.tween("text",typeof t==="function"?Ip(Jh(this,"text",t)):Up(t==null?"":t+""))}function Dp(){var t=this._name,n=this._id,e=Bp();for(var r=this._groups,i=r.length,a=0;a<i;++a){for(var o=r[a],u=o.length,f,c=0;c<u;++c){if(f=o[c]){var s=Hh(f,n);Yh(f,t,e,c,o,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}}}return new Fp(r,this._parents,t,e)}var Op=0;function Fp(t,n,e,r){this._groups=t;this._parents=n;this._name=e;this._id=r}function Yp(t){return Eh().transition(t)}function Bp(){return++Op}var jp=Eh.prototype;Fp.prototype=Yp.prototype={constructor:Fp,select:kp,selectAll:Tp,filter:yp,merge:gp,selection:Sp,transition:Dp,call:jp.call,nodes:jp.nodes,node:jp.node,size:jp.size,empty:jp.empty,each:jp.each,on:wp,attr:ap,attrTween:fp,style:Pp,styleTween:qp,text:Rp,remove:Mp,tween:Gh,delay:lp,duration:vp,ease:_p};var Hp={time:null,delay:0,duration:250,ease:vt};function Xp(t,n){var e;while(!(e=t.__transition)||!(e=e[n])){if(!(t=t.parentNode)){return Hp.time=Lo(),Hp}}return e}function Vp(t){var n,e;if(t instanceof Fp){n=t._id,t=t._name}else{n=Bp(),(e=Hp).time=Lo(),t=t==null?null:t+""}for(var r=this._groups,i=r.length,a=0;a<i;++a){for(var o=r[a],u=o.length,f,c=0;c<u;++c){if(f=o[c]){Yh(f,t,n,c,o,e||Xp(f,n))}}}return new Fp(r,this._parents,t,n)}Eh.prototype.interrupt=Wh;Eh.prototype.transition=Vp;var Wp=[null];function $p(t,n){var e=t.__transition,r,i;if(e){n=n==null?null:n+"";for(i in e){if((r=e[i]).state>Ih&&r.name===n){return new Fp([[t]],Wp,n,+i)}}}return null}var Zp=Array.prototype.slice;function Gp(t){return t}var Jp=1;var Qp=2;var Kp=3;var tv=4;var nv=1e-6;function ev(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function rv(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function iv(t){var n=t.bandwidth()/2;return function(e){return t(e)+n}}function av(){return!this.__axis}function ov(t,n){var e=[],r=null,i=null,a=6,o=6,u=3;function f(f){var c=r==null?n.ticks?n.ticks.apply(n,e):n.domain():r,s=i==null?n.tickFormat?n.tickFormat.apply(n,e):Gp:i,l=Math.max(a,0)+u,h=t===Jp||t===Kp?ev:rv,p=n.range(),v=p[0]+.5,d=p[p.length-1]+.5,_=(n.bandwidth?iv:Gp)(n.copy()),y=f.selection?f.selection():f,g=y.selectAll(".domain").data([null]),m=y.selectAll(".tick").data(c,n).order(),x=m.exit(),w=m.enter().append("g").attr("class","tick"),b=m.select("line"),M=m.select("text"),k=t===Jp||t===tv?-1:1,T,N=t===tv||t===Qp?(T="x",
  5. "y"):(T="y","x");g=g.merge(g.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000"));m=m.merge(w);b=b.merge(w.append("line").attr("stroke","#000").attr(T+"2",k*a).attr(N+"1",.5).attr(N+"2",.5));M=M.merge(w.append("text").attr("fill","#000").attr(T,k*l).attr(N,.5).attr("dy",t===Jp?"0em":t===Kp?".71em":".32em"));if(f!==y){g=g.transition(f);m=m.transition(f);b=b.transition(f);M=M.transition(f);x=x.transition(f).attr("opacity",nv).attr("transform",function(t){return h(_,this.parentNode.__axis||_,t)});w.attr("opacity",nv).attr("transform",function(t){return h(this.parentNode.__axis||_,_,t)})}x.remove();g.attr("d",t===tv||t==Qp?"M"+k*o+","+v+"H0.5V"+d+"H"+k*o:"M"+v+","+k*o+"V0.5H"+d+"V"+k*o);m.attr("opacity",1).attr("transform",function(t){return h(_,_,t)});b.attr(T+"2",k*a);M.attr(T,k*l).text(s);y.filter(av).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Qp?"start":t===tv?"end":"middle");y.each(function(){this.__axis=_})}f.scale=function(t){return arguments.length?(n=t,f):n};f.ticks=function(){return e=Zp.call(arguments),f};f.tickArguments=function(t){return arguments.length?(e=t==null?[]:Zp.call(t),f):e.slice()};f.tickValues=function(t){return arguments.length?(r=t==null?null:Zp.call(t),f):r&&r.slice()};f.tickFormat=function(t){return arguments.length?(i=t,f):i};f.tickSize=function(t){return arguments.length?(a=o=+t,f):a};f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a};f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o};f.tickPadding=function(t){return arguments.length?(u=+t,f):u};return f}function uv(t){return ov(Jp,t)}function fv(t){return ov(Qp,t)}function cv(t){return ov(Kp,t)}function sv(t){return ov(tv,t)}function lv(t,n){return t.parent===n.parent?1:2}function hv(t){return t.reduce(pv,0)/t.length}function pv(t,n){return t+n.x}function vv(t){return 1+t.reduce(dv,0)}function dv(t,n){return Math.max(t,n.y)}function _v(t){var n;while(n=t.children)t=n[0];return t}function yv(t){var n;while(n=t.children)t=n[n.length-1];return t}function gv(){var t=lv,n=1,e=1,r=false;function i(i){var a,o=0;i.eachAfter(function(n){var e=n.children;if(e){n.x=hv(e);n.y=vv(e)}else{n.x=a?o+=t(n,a):0;n.y=0;a=n}});var u=_v(i),f=yv(i),c=u.x-t(u,f)/2,s=f.x+t(f,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n;t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-c)/(s-c)*n;t.y=(1-(i.y?t.y/i.y:1))*e})}i.separation=function(n){return arguments.length?(t=n,i):t};i.size=function(t){return arguments.length?(r=false,n=+t[0],e=+t[1],i):r?null:[n,e]};i.nodeSize=function(t){return arguments.length?(r=true,n=+t[0],e=+t[1],i):r?[n,e]:null};return i}function mv(t){var n=this,e,r=[n],i,a,o;do{e=r.reverse(),r=[];while(n=e.pop()){t(n),i=n.children;if(i)for(a=0,o=i.length;a<o;++a){r.push(i[a])}}}while(r.length);return this}function xv(t){var n=this,e=[n],r,i;while(n=e.pop()){t(n),r=n.children;if(r)for(i=r.length-1;i>=0;--i){e.push(r[i])}}return this}function wv(t){var n=this,e=[n],r=[],i,a,o;while(n=e.pop()){r.push(n),i=n.children;if(i)for(a=0,o=i.length;a<o;++a){e.push(i[a])}}while(n=r.pop()){t(n)}return this}function bv(t){return this.eachAfter(function(n){var e=+t(n.data)||0,r=n.children,i=r&&r.length;while(--i>=0)e+=r[i].value;n.value=e})}function Mv(t){return this.eachBefore(function(n){if(n.children){n.children.sort(t)}})}function kv(t){var n=this,e=Tv(n,t),r=[n];while(n!==e){n=n.parent;r.push(n)}var i=r.length;while(t!==e){r.splice(i,0,t);t=t.parent}return r}function Tv(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop();n=r.pop();while(t===n){i=t;t=e.pop();n=r.pop()}return i}function Nv(){var t=this,n=[t];while(t=t.parent){n.push(t)}return n}function Sv(){var t=[];this.each(function(n){t.push(n)});return t}function Ev(){var t=[];this.eachBefore(function(n){if(!n.children){t.push(n)}});return t}function Av(){var t=this,n=[];t.each(function(e){if(e!==t){n.push({source:e.parent,target:e})}});return n}function Cv(t,n){var e=new Uv(t),r=+t.value&&(e.value=t.value),i,a=[e],o,u,f,c;if(n==null)n=Pv;while(i=a.pop()){if(r)i.value=+i.data.value;if((u=n(i.data))&&(c=u.length)){i.children=new Array(c);for(f=c-1;f>=0;--f){a.push(o=i.children[f]=new Uv(u[f]));o.parent=i;o.depth=i.depth+1}}}return e.eachBefore(qv)}function zv(){return Cv(this).eachBefore(Lv)}function Pv(t){return t.children}function Lv(t){t.data=t.data.data}function qv(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function Uv(t){this.data=t;this.depth=this.height=0;this.parent=null}Uv.prototype=Cv.prototype={constructor:Uv,each:mv,eachAfter:wv,eachBefore:xv,sum:bv,sort:Mv,path:kv,ancestors:Nv,descendants:Sv,leaves:Ev,links:Av,copy:zv};function Iv(t){this._=t;this.next=null}function Rv(t){var n,e=(t=t.slice()).length,r=null,i=r;while(e){var a=new Iv(t[e-1]);if(i)i=i.next=a;else i=r=a;t[n]=t[--e]}return{head:r,tail:i}}function Dv(t){return Fv(Rv(t),[])}function Ov(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function Fv(t,n){var e,r=null,i=t.head,a,o;switch(n.length){case 1:e=Yv(n[0]);break;case 2:e=Bv(n[0],n[1]);break;case 3:e=jv(n[0],n[1],n[2]);break}while(i){o=i._,a=i.next;if(!e||!Ov(e,o)){if(r)t.tail=r,r.next=null;else t.head=t.tail=null;n.push(o);e=Fv(t,n);n.pop();if(t.head)i.next=t.head,t.head=i;else i.next=null,t.head=t.tail=i;r=t.tail,r.next=a}else{r=i}i=a}t.tail=r;return e}function Yv(t){return{x:t.x,y:t.y,r:t.r}}function Bv(t,n){var e=t.x,r=t.y,i=t.r,a=n.x,o=n.y,u=n.r,f=a-e,c=o-r,s=u-i,l=Math.sqrt(f*f+c*c);return{x:(e+a+f/l*s)/2,y:(r+o+c/l*s)/2,r:(l+i+u)/2}}function jv(t,n,e){var r=t.x,i=t.y,a=t.r,o=n.x,u=n.y,f=n.r,c=e.x,s=e.y,l=e.r,h=2*(r-o),p=2*(i-u),v=2*(f-a),d=r*r+i*i-a*a-o*o-u*u+f*f,_=2*(r-c),y=2*(i-s),g=2*(l-a),m=r*r+i*i-a*a-c*c-s*s+l*l,x=_*p-h*y,w=(p*m-y*d)/x-r,b=(y*v-p*g)/x,M=(_*d-h*m)/x-i,k=(h*g-_*v)/x,T=b*b+k*k-1,N=2*(w*b+M*k+a),S=w*w+M*M-a*a,E=(-N-Math.sqrt(N*N-4*T*S))/(2*T);return{x:w+b*E+r,y:M+k*E+i,r:E}}function Hv(t,n,e){var r=t.x,i=t.y,a=n.r+e.r,o=t.r+e.r,u=n.x-r,f=n.y-i,c=u*u+f*f;if(c){var s=.5+((o*=o)-(a*=a))/(2*c),l=Math.sqrt(Math.max(0,2*a*(o+c)-(o-=c)*o-a*a))/(2*c);e.x=r+s*u+l*f;e.y=i+s*f-l*u}else{e.x=r+o;e.y=i}}function Xv(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i>e*e+r*r}function Vv(t,n,e){var r=t.x-n,i=t.y-e;return r*r+i*i}function Wv(t){this._=t;this.next=null;this.previous=null}function $v(t){if(!(i=t.length))return 0;var n,e,r,i;n=t[0],n.x=0,n.y=0;if(!(i>1))return n.r;e=t[1],n.x=-e.r,e.x=n.r,e.y=0;if(!(i>2))return n.r+e.r;Hv(e,n,r=t[2]);var a=n.r*n.r,o=e.r*e.r,u=r.r*r.r,f=a+o+u,c=a*n.x+o*e.x+u*r.x,s=a*n.y+o*e.y+u*r.y,l,h,p,v,d,_,y;n=new Wv(n),e=new Wv(e),r=new Wv(r);n.next=r.previous=e;e.next=n.previous=r;r.next=e.previous=n;t:for(p=3;p<i;++p){Hv(n._,e._,r=t[p]),r=new Wv(r);if((d=n.previous)===(v=e.next)){if(Xv(v._,r._)){n=e,e=v,--p;continue t}}else{_=v._.r,y=d._.r;do{if(_<=y){if(Xv(v._,r._)){e=v,n.next=e,e.previous=n,--p;continue t}v=v.next,_+=v._.r}else{if(Xv(d._,r._)){n=d,n.next=e,e.previous=n,--p;continue t}d=d.previous,y+=d._.r}}while(v!==d.next)}r.previous=n,r.next=e,n.next=e.previous=e=r;f+=u=r._.r*r._.r;c+=u*r._.x;s+=u*r._.y;a=Vv(n._,l=c/f,h=s/f);while((r=r.next)!==e){if((u=Vv(r._,l,h))<a){n=r,a=u}}e=n.next}n=[e._],r=e;while((r=r.next)!==e)n.push(r._);r=Dv(n);for(p=0;p<i;++p)n=t[p],n.x-=r.x,n.y-=r.y;return r.r}function Zv(t){$v(t);return t}function Gv(t){return t==null?null:Jv(t)}function Jv(t){if(typeof t!=="function")throw new Error;return t}function Qv(){return 0}function Kv(t){return function(){return t}}function td(t){return Math.sqrt(t.value)}function nd(){var t=null,n=1,e=1,r=Qv;function i(i){i.x=n/2,i.y=e/2;if(t){i.eachBefore(ed(t)).eachAfter(rd(r,.5)).eachBefore(id(1))}else{i.eachBefore(ed(td)).eachAfter(rd(Qv,1)).eachAfter(rd(r,i.r/Math.min(n,e))).eachBefore(id(Math.min(n,e)/(2*i.r)))}return i}i.radius=function(n){return arguments.length?(t=Gv(n),i):t};i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]};i.padding=function(t){return arguments.length?(r=typeof t==="function"?t:Kv(+t),i):r};return i}function ed(t){return function(n){if(!n.children){n.r=Math.max(0,+t(n)||0)}}}function rd(t,n){return function(e){if(r=e.children){var r,i,a=r.length,o=t(e)*n||0,u;if(o)for(i=0;i<a;++i)r[i].r+=o;u=$v(r);if(o)for(i=0;i<a;++i)r[i].r-=o;e.r=u+o}}}function id(t){return function(n){var e=n.parent;n.r*=t;if(e){n.x=e.x+t*n.x;n.y=e.y+t*n.y}}}function ad(t){t.x0=Math.round(t.x0);t.y0=Math.round(t.y0);t.x1=Math.round(t.x1);t.y1=Math.round(t.y1)}function od(t,n,e,r,i){var a=t.children,o,u=-1,f=a.length,c=t.value&&(r-n)/t.value;while(++u<f){o=a[u],o.y0=e,o.y1=i;o.x0=n,o.x1=n+=o.value*c}}function ud(){var t=1,n=1,e=0,r=false;function i(i){var o=i.height+1;i.x0=i.y0=e;i.x1=t;i.y1=n/o;i.eachBefore(a(n,o));if(r)i.eachBefore(ad);return i}function a(t,n){return function(r){if(r.children){od(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n)}var i=r.x0,a=r.y0,o=r.x1-e,u=r.y1-e;if(o<i)i=o=(i+o)/2;if(u<a)a=u=(a+u)/2;r.x0=i;r.y0=a;r.x1=o;r.y1=u}}i.round=function(t){return arguments.length?(r=!!t,i):r};i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]};i.padding=function(t){return arguments.length?(e=+t,i):e};return i}var fd="$";var cd={depth:-1};var sd={};function ld(t){return t.id}function hd(t){return t.parentId}function pd(){var t=ld,n=hd;function e(e){var r,i,a=e.length,o,u,f,c=new Array(a),s,l,h={};for(i=0;i<a;++i){r=e[i],f=c[i]=new Uv(r);if((s=t(r,i,e))!=null&&(s+="")){l=fd+(f.id=s);h[l]=l in h?sd:f}}for(i=0;i<a;++i){f=c[i],s=n(e[i],i,e);if(s==null||!(s+="")){if(o)throw new Error("multiple roots");o=f}else{u=h[fd+s];if(!u)throw new Error("missing: "+s);if(u===sd)throw new Error("ambiguous: "+s);if(u.children)u.children.push(f);else u.children=[f];f.parent=u}}if(!o)throw new Error("no root");o.parent=cd;o.eachBefore(function(t){t.depth=t.parent.depth+1;--a}).eachBefore(qv);o.parent=null;if(a>0)throw new Error("cycle");return o}e.id=function(n){return arguments.length?(t=Jv(n),e):t};e.parentId=function(t){return arguments.length?(n=Jv(t),e):n};return e}function vd(t,n){return t.parent===n.parent?1:2}function dd(t){var n=t.children;return n?n[0]:t.t}function _d(t){var n=t.children;return n?n[n.length-1]:t.t}function yd(t,n,e){var r=e/(n.i-t.i);n.c-=r;n.s+=e;t.c+=r;n.z+=e;n.m+=e}function gd(t){var n=0,e=0,r=t.children,i=r.length,a;while(--i>=0){a=r[i];a.z+=n;a.m+=n;n+=a.s+(e+=a.c)}}function md(t,n,e){return t.a.parent===n.parent?t.a:e}function xd(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}xd.prototype=Object.create(Uv.prototype);function wd(t){var n=new xd(t,0),e,r=[n],i,a,o,u;while(e=r.pop()){if(a=e._.children){e.children=new Array(u=a.length);for(o=u-1;o>=0;--o){r.push(i=e.children[o]=new xd(a[o],o));i.parent=e}}}(n.parent=new xd(null,0)).children=[n];return n}function bd(){var t=vd,n=1,e=1,r=null;function i(i){var u=wd(i);u.eachAfter(a),u.parent.m=-u.z;u.eachBefore(o);if(r)i.eachBefore(f);else{var c=i,s=i,l=i;i.eachBefore(function(t){if(t.x<c.x)c=t;if(t.x>s.x)s=t;if(t.depth>l.depth)l=t});var h=c===s?1:t(c,s)/2,p=h-c.x,v=n/(s.x+h+p),d=e/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*v;t.y=t.depth*d})}return i}function a(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){gd(n);var a=(e[0].z+e[e.length-1].z)/2;if(i){n.z=i.z+t(n._,i._);n.m=n.z-a}else{n.z=a}}else if(i){n.z=i.z+t(n._,i._)}n.parent.A=u(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m;t.m+=t.parent.m}function u(n,e,r){if(e){var i=n,a=n,o=e,u=i.parent.children[0],f=i.m,c=a.m,s=o.m,l=u.m,h;while(o=_d(o),i=dd(i),o&&i){u=dd(u);a=_d(a);a.a=n;h=o.z+s-i.z-f+t(o._,i._);if(h>0){yd(md(o,n,r),n,h);f+=h;c+=h}s+=o.m;f+=i.m;l+=u.m;c+=a.m}if(o&&!_d(a)){a.t=o;a.m+=s-c}if(i&&!dd(u)){u.t=i;u.m+=f-l;r=n}}return r}function f(t){t.x*=n;t.y=t.depth*e}i.separation=function(n){return arguments.length?(t=n,i):t};i.size=function(t){return arguments.length?(r=false,n=+t[0],e=+t[1],i):r?null:[n,e]};i.nodeSize=function(t){return arguments.length?(r=true,n=+t[0],e=+t[1],i):r?[n,e]:null};return i}function Md(t,n,e,r,i){var a=t.children,o,u=-1,f=a.length,c=t.value&&(i-e)/t.value;while(++u<f){o=a[u],o.x0=n,o.x1=r;o.y0=e,o.y1=e+=o.value*c}}var kd=(1+Math.sqrt(5))/2;function Td(t,n,e,r,i,a){var o=[],u=n.children,f,c,s=0,l,h=u.length,p,v,d=n.value,_,y,g,m,x,w,b;while(s<h){p=i-e,v=a-r;y=g=_=u[s].value;w=Math.max(v/p,p/v)/(d*t);b=_*_*w;x=Math.max(g/b,b/y);for(l=s+1;l<h;++l){_+=c=u[l].value;if(c<y)y=c;if(c>g)g=c;b=_*_*w;m=Math.max(g/b,b/y);if(m>x){_-=c;break}x=m}o.push(f={value:_,dice:p<v,children:u.slice(s,l)});if(f.dice)od(f,e,r,i,d?r+=v*_/d:a);else Md(f,e,r,d?e+=p*_/d:i,a);d-=_,s=l}return o}var Nd=function t(n){function e(t,e,r,i,a){Td(n,t,e,r,i,a)}e.ratio=function(n){return t((n=+n)>1?n:1)};return e}(kd);function Sd(){var t=Nd,n=false,e=1,r=1,i=[0],a=Qv,o=Qv,u=Qv,f=Qv,c=Qv;function s(t){t.x0=t.y0=0;t.x1=e;t.y1=r;t.eachBefore(l);i=[0];if(n)t.eachBefore(ad);return t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;if(l<r)r=l=(r+l)/2;if(h<s)s=h=(s+h)/2;n.x0=r;n.y0=s;n.x1=l;n.y1=h;if(n.children){e=i[n.depth+1]=a(n)/2;r+=c(n)-e;s+=o(n)-e;l-=u(n)-e;h-=f(n)-e;if(l<r)r=l=(r+l)/2;if(h<s)s=h=(s+h)/2;t(n,r,s,l,h)}}s.round=function(t){return arguments.length?(n=!!t,s):n};s.size=function(t){return arguments.length?(e=+t[0],r=+t[1],s):[e,r]};s.tile=function(n){return arguments.length?(t=Jv(n),s):t};s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()};s.paddingInner=function(t){return arguments.length?(a=typeof t==="function"?t:Kv(+t),s):a};s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()};s.paddingTop=function(t){return arguments.length?(o=typeof t==="function"?t:Kv(+t),s):o};s.paddingRight=function(t){return arguments.length?(u=typeof t==="function"?t:Kv(+t),s):u};s.paddingBottom=function(t){return arguments.length?(f=typeof t==="function"?t:Kv(+t),s):f};s.paddingLeft=function(t){return arguments.length?(c=typeof t==="function"?t:Kv(+t),s):c};return s}function Ed(t,n,e,r,i){var a=t.children,o,u=a.length,f,c=new Array(u+1);for(c[0]=f=o=0;o<u;++o){c[o+1]=f+=a[o].value}s(0,u,t.value,n,e,r,i);function s(t,n,e,r,i,o,u){if(t>=n-1){var f=a[t];f.x0=r,f.y0=i;f.x1=o,f.y1=u;return}var l=c[t],h=e/2+l,p=t+1,v=n-1;while(p<v){var d=p+v>>>1;if(c[d]<h)p=d+1;else v=d}var _=c[p]-l,y=e-_;if(u-i>o-r){var g=(i*y+u*_)/e;s(t,p,_,r,i,o,g);s(p,n,y,r,g,o,u)}else{var m=(r*y+o*_)/e;s(t,p,_,r,i,m,u);s(p,n,y,m,i,o,u)}}}function Ad(t,n,e,r,i){(t.depth&1?Md:od)(t,n,e,r,i)}var Cd=function t(n){function e(t,e,r,i,a){if((o=t._squarify)&&o.ratio===n){var o,u,f,c,s=-1,l,h=o.length,p=t.value;while(++s<h){u=o[s],f=u.children;for(c=u.value=0,l=f.length;c<l;++c)u.value+=f[c].value;if(u.dice)od(u,e,r,i,r+=(a-r)*u.value/p);else Md(u,e,r,e+=(i-e)*u.value/p,a);p-=u.value}}else{t._squarify=o=Td(n,t,e,r,i,a);o.ratio=n}}e.ratio=function(n){return t((n=+n)>1?n:1)};return e}(kd);function zd(t,n){var e;if(t==null)t=0;if(n==null)n=0;function r(){var r,i=e.length,a,o=0,u=0;for(r=0;r<i;++r){a=e[r],o+=a.x,u+=a.y}for(o=o/i-t,u=u/i-n,r=0;r<i;++r){a=e[r],a.x-=o,a.y-=u}}r.initialize=function(t){e=t};r.x=function(n){return arguments.length?(t=+n,r):t};r.y=function(t){return arguments.length?(n=+t,r):n};return r}function Pd(t){return function(){return t}}function Ld(){return(Math.random()-.5)*1e-6}function qd(t){return t.x+t.vx}function Ud(t){return t.y+t.vy}function Id(t){var n,e,r=1,i=1;if(typeof t!=="function")t=Pd(t==null?1:+t);function a(){var t,a=n.length,u,f,c,s,l,h;for(var p=0;p<i;++p){u=Pn(n,qd,Ud).visitAfter(o);for(t=0;t<a;++t){f=n[t];l=e[t],h=l*l;c=f.x+f.vx;s=f.y+f.vy;u.visit(v)}}function v(n,e,i,a,o){var u=n.data,p=n.r,v=l+p;if(u){if(u.index>t){var d=c-u.x-u.vx,_=s-u.y-u.vy,y=d*d+_*_;if(y<v*v){if(d===0)d=Ld(),y+=d*d;if(_===0)_=Ld(),y+=_*_;y=(v-(y=Math.sqrt(y)))/y*r;f.vx+=(d*=y)*(v=(p*=p)/(h+p));f.vy+=(_*=y)*v;u.vx-=d*(v=1-v);u.vy-=_*v}}return}return e>c+v||a<c-v||i>s+v||o<s-v}}function o(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n){if(t[n]&&t[n].r>t.r){t.r=t[n].r}}}a.initialize=function(r){var i,a=(n=r).length;e=new Array(a);for(i=0;i<a;++i)e[i]=+t(n[i],i,n)};a.iterations=function(t){return arguments.length?(i=+t,a):i};a.strength=function(t){return arguments.length?(r=+t,a):r};a.radius=function(n){return arguments.length?(t=typeof n==="function"?n:Pd(+n),a):t};return a}function Rd(t,n){return n}function Dd(t){var n=Rd,e=s,r,i=Pd(30),a,o,u,f,c=1;if(t==null)t=[];function s(t){return 1/Math.min(u[t.source.index],u[t.target.index])}function l(n){for(var e=0,i=t.length;e<c;++e){for(var o=0,u,s,l,h,p,v,d;o<i;++o){u=t[o],s=u.source,l=u.target;h=l.x+l.vx-s.x-s.vx||Ld();p=l.y+l.vy-s.y-s.vy||Ld();v=Math.sqrt(h*h+p*p);v=(v-a[o])/v*n*r[o];h*=v,p*=v;l.vx-=h*(d=f[o]);l.vy-=p*d;s.vx+=h*(d=1-d);s.vy+=p*d}}}function h(){if(!o)return;var e,i=o.length,c=t.length,s=H(o,n),l;for(e=0,u=new Array(i);e<i;++e){u[e]=0}for(e=0;e<c;++e){l=t[e],l.index=e;if(typeof l.source!=="object")l.source=s.get(l.source);if(typeof l.target!=="object")l.target=s.get(l.target);++u[l.source.index],++u[l.target.index]}for(e=0,f=new Array(c);e<c;++e){l=t[e],f[e]=u[l.source.index]/(u[l.source.index]+u[l.target.index])}r=new Array(c),p();a=new Array(c),v()}function p(){if(!o)return;for(var n=0,i=t.length;n<i;++n){r[n]=+e(t[n],n,t)}}function v(){if(!o)return;for(var n=0,e=t.length;n<e;++n){a[n]=+i(t[n],n,t)}}l.initialize=function(t){o=t;h()};l.links=function(n){return arguments.length?(t=n,h(),l):t};l.id=function(t){return arguments.length?(n=t,l):n};l.iterations=function(t){return arguments.length?(c=+t,l):c};l.strength=function(t){return arguments.length?(e=typeof t==="function"?t:Pd(+t),p(),l):e};l.distance=function(t){return arguments.length?(i=typeof t==="function"?t:Pd(+t),v(),l):i};return l}function Od(t){return t.x}function Fd(t){return t.y}var Yd=10;var Bd=Math.PI*(3-Math.sqrt(5));function jd(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,u=H(),f=Io(s),c=Ha("tick","end");if(t==null)t=[];function s(){l();c.call("tick",n);if(e<r){f.stop();c.call("end",n)}}function l(){var n,r=t.length,f;e+=(a-e)*i;u.each(function(t){t(e)});for(n=0;n<r;++n){f=t[n];if(f.fx==null)f.x+=f.vx*=o;else f.x=f.fx,f.vx=0;if(f.fy==null)f.y+=f.vy*=o;else f.y=f.fy,f.vy=0}}function h(){for(var n=0,e=t.length,r;n<e;++n){r=t[n],r.index=n;if(isNaN(r.x)||isNaN(r.y)){var i=Yd*Math.sqrt(n),a=n*Bd;r.x=i*Math.cos(a);r.y=i*Math.sin(a)}if(isNaN(r.vx)||isNaN(r.vy)){r.vx=r.vy=0}}}function p(n){if(n.initialize)n.initialize(t);return n}h();return n={tick:l,restart:function(){return f.restart(s),n},stop:function(){return f.stop(),n},nodes:function(e){return arguments.length?(t=e,h(),u.each(p),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(a=+t,n):a},velocityDecay:function(t){return arguments.length?(o=1-t,n):1-o},force:function(t,e){return arguments.length>1?(e==null?u.remove(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i=0,a=t.length,o,u,f,c,s;if(r==null)r=Infinity;else r*=r;for(i=0;i<a;++i){c=t[i];o=n-c.x;u=e-c.y;f=o*o+u*u;if(f<r)s=c,r=f}return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}}function Hd(){var t,n,e,r=Pd(-30),i,a=1,o=Infinity,u=.81;function f(r){var i,a=t.length,o=Pn(t,Od,Fd).visitAfter(s);for(e=r,i=0;i<a;++i)n=t[i],o.visit(l)}function c(){if(!t)return;var n,e=t.length;i=new Array(e);for(n=0;n<e;++n)i[n]=+r(t[n],n,t)}function s(t){var n=0,e,r,a,o,u;if(t.length){for(a=o=u=0;u<4;++u){if((e=t[u])&&(r=e.value)){n+=r,a+=r*e.x,o+=r*e.y}}t.x=a/n;t.y=o/n}else{e=t;e.x=e.data.x;e.y=e.data.y;do n+=i[e.data.index];while(e=e.next)}t.value=n}function l(t,r,f,c){if(!t.value)return true;var s=t.x-n.x,l=t.y-n.y,h=c-r,p=s*s+l*l;if(h*h/u<p){if(p<o){if(s===0)s=Ld(),p+=s*s;if(l===0)l=Ld(),p+=l*l;if(p<a)p=Math.sqrt(a*p);n.vx+=s*t.value*e/p;n.vy+=l*t.value*e/p}return true}else if(t.length||p>=o)return;if(t.data!==n||t.next){if(s===0)s=Ld(),p+=s*s;if(l===0)l=Ld(),p+=l*l;if(p<a)p=Math.sqrt(a*p)}do if(t.data!==n){h=i[t.data.index]*e/p;n.vx+=s*h;n.vy+=l*h}while(t=t.next)}f.initialize=function(n){t=n;c()};f.strength=function(t){return arguments.length?(r=typeof t==="function"?t:Pd(+t),c(),f):r};f.distanceMin=function(t){return arguments.length?(a=t*t,f):Math.sqrt(a)};f.distanceMax=function(t){return arguments.length?(o=t*t,f):Math.sqrt(o)};f.theta=function(t){return arguments.length?(u=t*t,f):Math.sqrt(u)};return f}function Xd(t){var n=Pd(.1),e,r,i;if(typeof t!=="function")t=Pd(t==null?0:+t);function a(t){for(var n=0,a=e.length,o;n<a;++n){o=e[n],o.vx+=(i[n]-o.x)*r[n]*t}}function o(){if(!e)return;var a,o=e.length;r=new Array(o);i=new Array(o);for(a=0;a<o;++a){r[a]=isNaN(i[a]=+t(e[a],a,e))?0:+n(e[a],a,e)}}a.initialize=function(t){e=t;o()};a.strength=function(t){return arguments.length?(n=typeof t==="function"?t:Pd(+t),o(),a):n};a.x=function(n){return arguments.length?(t=typeof n==="function"?n:Pd(+n),o(),a):t};return a}function Vd(t){var n=Pd(.1),e,r,i;if(typeof t!=="function")t=Pd(t==null?0:+t);function a(t){for(var n=0,a=e.length,o;n<a;++n){o=e[n],o.vy+=(i[n]-o.y)*r[n]*t}}function o(){if(!e)return;var a,o=e.length;r=new Array(o);i=new Array(o);for(a=0;a<o;++a){r[a]=isNaN(i[a]=+t(e[a],a,e))?0:+n(e[a],a,e)}}a.initialize=function(t){e=t;o()};a.strength=function(t){return arguments.length?(n=typeof t==="function"?t:Pd(+t),o(),a):n};a.y=function(n){return arguments.length?(t=typeof n==="function"?n:Pd(+n),o(),a):t};return a}function Wd(){t.event.stopImmediatePropagation()}function $d(){t.event.preventDefault();t.event.stopImmediatePropagation()}function Zd(t){var n=t.document.documentElement,e=Ah(t).on("dragstart.drag",$d,true);if("onselectstart"in n){e.on("selectstart.drag",$d,true)}else{n.__noselect=n.style.MozUserSelect;n.style.MozUserSelect="none"}}function Gd(t,n){var e=t.document.documentElement,r=Ah(t).on("dragstart.drag",null);if(n){r.on("click.drag",$d,true);setTimeout(function(){r.on("click.drag",null)},0)}if("onselectstart"in e){r.on("selectstart.drag",null)}else{e.style.MozUserSelect=e.__noselect;delete e.__noselect}}function Jd(t){return function(){return t}}function Qd(t,n,e,r,i,a,o,u,f,c){this.target=t;this.type=n;this.subject=e;this.identifier=r;this.active=i;this.x=a;this.y=o;this.dx=u;this.dy=f;this._=c}Qd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Kd(){return!t.event.button}function t_(){return this.parentNode}function n_(n){return n==null?{x:t.event.x,y:t.event.y}:n}function e_(){var n=Kd,e=t_,r=n_,i={},a=Ha("start","drag","end"),o=0,u,f;function c(t){t.on("mousedown.drag",s).on("touchstart.drag",p).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",d).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function s(){if(f||!n.apply(this,arguments))return;var r=_("mouse",e.apply(this,arguments),ol,this,arguments);if(!r)return;Ah(t.event.view).on("mousemove.drag",l,true).on("mouseup.drag",h,true);Zd(t.event.view);Wd();u=false;r("start")}function l(){$d();u=true;i.mouse("drag")}function h(){Ah(t.event.view).on("mousemove.drag mouseup.drag",null);Gd(t.event.view,u);$d();i.mouse("end")}function p(){if(!n.apply(this,arguments))return;var r=t.event.changedTouches,i=e.apply(this,arguments),a=r.length,o,u;for(o=0;o<a;++o){if(u=_(r[o].identifier,i,zh,this,arguments)){Wd();u("start")}}}function v(){var n=t.event.changedTouches,e=n.length,r,a;for(r=0;r<e;++r){if(a=i[n[r].identifier]){$d();a("drag")}}}function d(){var n=t.event.changedTouches,e=n.length,r,a;if(f)clearTimeout(f);f=setTimeout(function(){f=null},500);for(r=0;r<e;++r){if(a=i[n[r].identifier]){Wd();a("end")}}}function _(n,e,u,f,s){var l=u(e,n),h,p,v,d=a.copy();if(!rl(new Qd(c,"beforestart",h,n,o,l[0],l[1],0,0,d),function(){if((t.event.subject=h=r.apply(f,s))==null)return false;p=h.x-l[0]||0;v=h.y-l[1]||0;return true}))return;return function t(r){var a=l,_;switch(r){case"start":i[n]=t,_=o++;break;case"end":delete i[n],--o;case"drag":l=u(e,n),_=o;break}rl(new Qd(c,r,h,n,_,l[0]+p,l[1]+v,l[0]-a[0],l[1]-a[1],d),d.apply,d,[r,f,s])}}c.filter=function(t){return arguments.length?(n=typeof t==="function"?t:Jd(!!t),c):n};c.container=function(t){return arguments.length?(e=typeof t==="function"?t:Jd(t),c):e};c.subject=function(t){return arguments.length?(r=typeof t==="function"?t:Jd(t),c):r};c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t};return c}function r_(t){return function(){return t}}function i_(t){return t[0]}function a_(t){return t[1]}function o_(){this._=null}function u_(t){t.U=t.C=t.L=t.R=t.P=t.N=null}o_.prototype={constructor:o_,insert:function(t,n){var e,r,i;if(t){n.P=t;n.N=t.N;if(t.N)t.N.P=n;t.N=n;if(t.R){t=t.R;while(t.L)t=t.L;t.L=n}else{t.R=n}e=t}else if(this._){t=s_(this._);n.P=null;n.N=t;t.P=t.L=n;e=t}else{n.P=n.N=null;this._=n;e=null}n.L=n.R=null;n.U=e;n.C=true;t=n;while(e&&e.C){r=e.U;if(e===r.L){i=r.R;if(i&&i.C){e.C=i.C=false;r.C=true;t=r}else{if(t===e.R){f_(this,e);t=e;e=t.U}e.C=false;r.C=true;c_(this,r)}}else{i=r.L;if(i&&i.C){e.C=i.C=false;r.C=true;t=r}else{if(t===e.L){c_(this,e);t=e;e=t.U}e.C=false;r.C=true;f_(this,r)}}e=t.U}this._.C=false},remove:function(t){if(t.N)t.N.P=t.P;if(t.P)t.P.N=t.N;t.N=t.P=null;var n=t.U,e,r=t.L,i=t.R,a,o;if(!r)a=i;else if(!i)a=r;else a=s_(i);if(n){if(n.L===t)n.L=a;else n.R=a}else{this._=a}if(r&&i){o=a.C;a.C=t.C;a.L=r;r.U=a;if(a!==i){n=a.U;a.U=t.U;t=a.R;n.L=t;a.R=i;i.U=a}else{a.U=n;n=a;t=a.R}}else{o=t.C;t=a}if(t)t.U=n;if(o)return;if(t&&t.C){t.C=false;return}do{if(t===this._)break;if(t===n.L){e=n.R;if(e.C){e.C=false;n.C=true;f_(this,n);e=n.R}if(e.L&&e.L.C||e.R&&e.R.C){if(!e.R||!e.R.C){e.L.C=false;e.C=true;c_(this,e);e=n.R}e.C=n.C;n.C=e.R.C=false;f_(this,n);t=this._;break}}else{e=n.L;if(e.C){e.C=false;n.C=true;c_(this,n);e=n.L}if(e.L&&e.L.C||e.R&&e.R.C){if(!e.L||!e.L.C){e.R.C=false;e.C=true;f_(this,e);e=n.L}e.C=n.C;n.C=e.L.C=false;c_(this,n);t=this._;break}}e.C=true;t=n;n=n.U}while(!t.C);if(t)t.C=false}};function f_(t,n){var e=n,r=n.R,i=e.U;if(i){if(i.L===e)i.L=r;else i.R=r}else{t._=r}r.U=i;e.U=r;e.R=r.L;if(e.R)e.R.U=e;r.L=e}function c_(t,n){var e=n,r=n.L,i=e.U;if(i){if(i.L===e)i.L=r;else i.R=r}else{t._=r}r.U=i;e.U=r;e.L=r.R;if(e.L)e.L.U=e;r.R=e}function s_(t){while(t.L)t=t.L;return t}function l_(t,n,e,r){var i=[null,null],a=Y_.push(i)-1;i.left=t;i.right=n;if(e)p_(i,t,n,e);if(r)p_(i,n,t,r);O_[t.index].halfedges.push(a);O_[n.index].halfedges.push(a);return i}function h_(t,n,e){var r=[n,e];r.left=t;return r}function p_(t,n,e,r){if(!t[0]&&!t[1]){t[0]=r;t.left=n;t.right=e}else if(t.left===e){t[1]=r}else{t[0]=r}}function v_(t,n,e,r,i){var a=t[0],o=t[1],u=a[0],f=a[1],c=o[0],s=o[1],l=0,h=1,p=c-u,v=s-f,d;d=n-u;if(!p&&d>0)return;d/=p;if(p<0){if(d<l)return;if(d<h)h=d}else if(p>0){if(d>h)return;if(d>l)l=d}d=r-u;if(!p&&d<0)return;d/=p;if(p<0){if(d>h)return;if(d>l)l=d}else if(p>0){if(d<l)return;if(d<h)h=d}d=e-f;if(!v&&d>0)return;d/=v;if(v<0){if(d<l)return;if(d<h)h=d}else if(v>0){if(d>h)return;if(d>l)l=d}d=i-f;if(!v&&d<0)return;d/=v;if(v<0){if(d>h)return;if(d>l)l=d}else if(v>0){if(d<l)return;if(d<h)h=d}if(!(l>0)&&!(h<1))return true;if(l>0)t[0]=[u+l*p,f+l*v];if(h<1)t[1]=[u+h*p,f+h*v];return true}function d_(t,n,e,r,i){var a=t[1];if(a)return true;var o=t[0],u=t.left,f=t.right,c=u[0],s=u[1],l=f[0],h=f[1],p=(c+l)/2,v=(s+h)/2,d,_;if(h===s){if(p<n||p>=r)return;if(c>l){if(!o)o=[p,e];else if(o[1]>=i)return;a=[p,i]}else{if(!o)o=[p,i];else if(o[1]<e)return;a=[p,e]}}else{d=(c-l)/(h-s);_=v-d*p;if(d<-1||d>1){if(c>l){if(!o)o=[(e-_)/d,e];else if(o[1]>=i)return;a=[(i-_)/d,i]}else{if(!o)o=[(i-_)/d,i];else if(o[1]<e)return;a=[(e-_)/d,e]}}else{if(s<h){if(!o)o=[n,d*n+_];else if(o[0]>=r)return;a=[r,d*r+_]}else{if(!o)o=[r,d*r+_];else if(o[0]<n)return;a=[n,d*n+_]}}}t[0]=o;t[1]=a;return true}function __(t,n,e,r){var i=Y_.length,a;while(i--){if(!d_(a=Y_[i],t,n,e,r)||!v_(a,t,n,e,r)||!(Math.abs(a[0][0]-a[1][0])>I_||Math.abs(a[0][1]-a[1][1])>I_)){delete Y_[i]}}}function y_(t){return O_[t.index]={site:t,halfedges:[]}}function g_(t,n){var e=t.site,r=n.left,i=n.right;if(e===i)i=r,r=e;if(i)return Math.atan2(i[1]-r[1],i[0]-r[0]);if(e===r)r=n[1],i=n[0];else r=n[0],i=n[1];return Math.atan2(r[0]-i[0],i[1]-r[1])}function m_(t,n){return n[+(n.left!==t.site)]}function x_(t,n){return n[+(n.left===t.site)]}function w_(){for(var t=0,n=O_.length,e,r,i,a;t<n;++t){if((e=O_[t])&&(a=(r=e.halfedges).length)){var o=new Array(a),u=new Array(a);for(i=0;i<a;++i)o[i]=i,u[i]=g_(e,Y_[r[i]]);o.sort(function(t,n){return u[n]-u[t]});for(i=0;i<a;++i)u[i]=r[o[i]];for(i=0;i<a;++i)r[i]=u[i]}}}function b_(t,n,e,r){var i=O_.length,a,o,u,f,c,s,l,h,p,v,d,_,y=true;for(a=0;a<i;++a){if(o=O_[a]){u=o.site;c=o.halfedges;f=c.length;while(f--){if(!Y_[c[f]]){c.splice(f,1)}}f=0,s=c.length;while(f<s){v=x_(o,Y_[c[f]]),d=v[0],_=v[1];l=m_(o,Y_[c[++f%s]]),h=l[0],p=l[1];if(Math.abs(d-h)>I_||Math.abs(_-p)>I_){c.splice(f,0,Y_.push(h_(u,v,Math.abs(d-t)<I_&&r-_>I_?[t,Math.abs(h-t)<I_?p:r]:Math.abs(_-r)<I_&&e-d>I_?[Math.abs(p-r)<I_?h:e,r]:Math.abs(d-e)<I_&&_-n>I_?[e,Math.abs(h-e)<I_?p:n]:Math.abs(_-n)<I_&&d-t>I_?[Math.abs(p-n)<I_?h:t,n]:null))-1);++s}}if(s)y=false}}if(y){var g,m,x,w=Infinity;for(a=0,y=null;a<i;++a){if(o=O_[a]){u=o.site;g=u[0]-t;m=u[1]-n;x=g*g+m*m;if(x<w)w=x,y=o}}if(y){var b=[t,n],M=[t,r],k=[e,r],T=[e,n];y.halfedges.push(Y_.push(h_(u=y.site,b,M))-1,Y_.push(h_(u,M,k))-1,Y_.push(h_(u,k,T))-1,Y_.push(h_(u,T,b))-1)}}for(a=0;a<i;++a){if(o=O_[a]){if(!o.halfedges.length){delete O_[a]}}}}var M_=[];var k_;function T_(){u_(this);this.x=this.y=this.arc=this.site=this.cy=null}function N_(t){var n=t.P,e=t.N;if(!n||!e)return;var r=n.site,i=t.site,a=e.site;if(r===a)return;var o=i[0],u=i[1],f=r[0]-o,c=r[1]-u,s=a[0]-o,l=a[1]-u;var h=2*(f*l-c*s);if(h>=-R_)return;var p=f*f+c*c,v=s*s+l*l,d=(l*p-c*v)/h,_=(f*v-s*p)/h;var y=M_.pop()||new T_;y.arc=t;y.site=i;y.x=d+o;y.y=(y.cy=_+u)+Math.sqrt(d*d+_*_);t.circle=y;var g=null,m=F_._;while(m){if(y.y<m.y||y.y===m.y&&y.x<=m.x){if(m.L)m=m.L;else{g=m.P;break}}else{if(m.R)m=m.R;else{g=m;break}}}F_.insert(g,y);if(!g)k_=y}function S_(t){var n=t.circle;if(n){if(!n.P)k_=n.N;F_.remove(n);M_.push(n);u_(n);t.circle=null}}var E_=[];function A_(){u_(this);this.edge=this.site=this.circle=null}function C_(t){var n=E_.pop()||new A_;n.site=t;return n}function z_(t){S_(t);D_.remove(t);E_.push(t);u_(t)}function P_(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],a=t.P,o=t.N,u=[t];z_(t);var f=a;while(f.circle&&Math.abs(e-f.circle.x)<I_&&Math.abs(r-f.circle.cy)<I_){a=f.P;u.unshift(f);z_(f);f=a}u.unshift(f);S_(f);var c=o;while(c.circle&&Math.abs(e-c.circle.x)<I_&&Math.abs(r-c.circle.cy)<I_){o=c.N;u.push(c);z_(c);c=o}u.push(c);S_(c);var s=u.length,l;for(l=1;l<s;++l){c=u[l];f=u[l-1];p_(c.edge,f.site,c.site,i)}f=u[0];c=u[s-1];c.edge=l_(f.site,c.site,null,i);N_(f);N_(c)}function L_(t){var n=t[0],e=t[1],r,i,a,o,u=D_._;while(u){a=q_(u,e)-n;if(a>I_)u=u.L;else{o=n-U_(u,e);if(o>I_){if(!u.R){r=u;break}u=u.R}else{if(a>-I_){r=u.P;i=u}else if(o>-I_){r=u;i=u.N}else{r=i=u}break}}}y_(t);var f=C_(t);D_.insert(r,f);if(!r&&!i)return;if(r===i){S_(r);i=C_(r.site);D_.insert(f,i);f.edge=i.edge=l_(r.site,f.site);N_(r);N_(i);return}if(!i){f.edge=l_(r.site,f.site);return}S_(r);S_(i);var c=r.site,s=c[0],l=c[1],h=t[0]-s,p=t[1]-l,v=i.site,d=v[0]-s,_=v[1]-l,y=2*(h*_-p*d),g=h*h+p*p,m=d*d+_*_,x=[(_*g-p*m)/y+s,(h*m-d*g)/y+l];p_(i.edge,c,v,x);f.edge=l_(c,t,null,x);i.edge=l_(t,v,null,x);N_(r);N_(i)}function q_(t,n){var e=t.site,r=e[0],i=e[1],a=i-n;if(!a)return r;var o=t.P;if(!o)return-Infinity;e=o.site;var u=e[0],f=e[1],c=f-n;if(!c)return u;var s=u-r,l=1/a-1/c,h=s/c;if(l)return(-h+Math.sqrt(h*h-2*l*(s*s/(-2*c)-f+c/2+i-a/2)))/l+r;return(r+u)/2}function U_(t,n){var e=t.N;if(e)return q_(e,n);var r=t.site;return r[1]===n?r[0]:Infinity}var I_=1e-6;var R_=1e-12;var D_;var O_;var F_;var Y_;function B_(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function j_(t,n){return n[1]-t[1]||n[0]-t[0]}function H_(t,n){var e=t.sort(j_).pop(),r,i,a;Y_=[];O_=new Array(t.length);D_=new o_;F_=new o_;while(true){a=k_;if(e&&(!a||e[1]<a.y||e[1]===a.y&&e[0]<a.x)){if(e[0]!==r||e[1]!==i){
  6. L_(e);r=e[0],i=e[1]}e=t.pop()}else if(a){P_(a.arc)}else{break}}w_();if(n){var o=+n[0][0],u=+n[0][1],f=+n[1][0],c=+n[1][1];__(o,u,f,c);b_(o,u,f,c)}this.edges=Y_;this.cells=O_;D_=F_=Y_=O_=null}H_.prototype={constructor:H_,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return m_(n,t[e])});e.data=n.site.data;return e})},triangles:function(){var t=[],n=this.edges;this.cells.forEach(function(e,r){var i=e.site,a=e.halfedges,o=-1,u=a.length,f,c=n[a[u-1]],s=c.left===i?c.right:c.left;while(++o<u){f=s;c=n[a[o]];s=c.left===i?c.right:c.left;if(r<f.index&&r<s.index&&B_(i,f,s)<0){t.push([i.data,f.data,s.data])}}});return t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})}};function X_(){var t=i_,n=a_,e=null;function r(r){return new H_(r.map(function(e,i){var a=[Math.round(t(e,i,r)/I_)*I_,Math.round(n(e,i,r)/I_)*I_];a.index=i;a.data=e;return a}),e)}r.polygons=function(t){return r(t).polygons()};r.links=function(t){return r(t).links()};r.triangles=function(t){return r(t).triangles()};r.x=function(n){return arguments.length?(t=typeof n==="function"?n:r_(+n),r):t};r.y=function(t){return arguments.length?(n=typeof t==="function"?t:r_(+t),r):n};r.extent=function(t){return arguments.length?(e=t==null?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]};r.size=function(t){return arguments.length?(e=t==null?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0],e[1][1]]};return r}function V_(t){return function(){return t}}function W_(t,n,e){this.target=t;this.type=n;this.transform=e}function $_(t,n,e){this.k=t;this.x=n;this.y=e}$_.prototype={constructor:$_,scale:function(t){return t===1?this:new $_(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new $_(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Z_=new $_(1,0,0);G_.prototype=$_.prototype;function G_(t){return t.__zoom||Z_}function J_(){t.event.stopImmediatePropagation()}function Q_(){t.event.preventDefault();t.event.stopImmediatePropagation()}function K_(){return!t.event.button}function ty(){var t=this,n,e;if(t instanceof SVGElement){t=t.ownerSVGElement||t;n=t.width.baseVal.value;e=t.height.baseVal.value}else{n=t.clientWidth;e=t.clientHeight}return[[0,0],[n,e]]}function ny(){return this.__zoom||Z_}function ey(){var n=K_,e=ty,r=0,i=Infinity,a=-i,o=i,u=a,f=o,c=250,s=[],l=Ha("start","zoom","end"),h,p,v,d,_,y=500,g,m=150;function x(t){t.on("wheel.zoom",E).on("mousedown.zoom",A).on("dblclick.zoom",C).on("touchstart.zoom",z).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)").property("__zoom",ny)}x.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",ny);if(t!==e){T(t,n)}else{e.interrupt().each(function(){N(this,arguments).start().zoom(null,typeof n==="function"?n.apply(this,arguments):n).end()})}};x.scaleBy=function(t,n){x.scaleTo(t,function(){var t=this.__zoom.k,e=typeof n==="function"?n.apply(this,arguments):n;return t*e})};x.scaleTo=function(t,n){x.transform(t,function(){var t=e.apply(this,arguments),r=this.__zoom,i=k(t),a=r.invert(i),o=typeof n==="function"?n.apply(this,arguments):n;return M(b(w(r,o),i,a),t)})};x.translateBy=function(t,n,r){x.transform(t,function(){return M(this.__zoom.translate(typeof n==="function"?n.apply(this,arguments):n,typeof r==="function"?r.apply(this,arguments):r),e.apply(this,arguments))})};function w(t,n){n=Math.max(r,Math.min(i,n));return n===t.k?t:new $_(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new $_(t.k,r,i)}function M(t,n){var e=Math.min(0,t.invertX(n[0][0])-a)||Math.max(0,t.invertX(n[1][0])-o),r=Math.min(0,t.invertY(n[0][1])-u)||Math.max(0,t.invertY(n[1][1])-f);return e||r?t.translate(e,r):t}function k(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function T(t,n,r){t.on("start.zoom",function(){N(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).end()}).tween("zoom",function(){var t=this,i=arguments,a=N(t,i),o=e.apply(t,i),u=r||k(o),f=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),c=t.__zoom,s=typeof n==="function"?n.apply(t,i):n,l=za(c.invert(u).concat(f/c.k),s.invert(u).concat(f/s.k));return function(t){if(t===1)t=s;else{var n=l(t),e=f/n[2];t=new $_(e,u[0]-n[0]*e,u[1]-n[1]*e)}a.zoom(null,t)}})}function N(t,n){for(var e=0,r=s.length,i;e<r;++e){if((i=s[e]).that===t){return i}}return new S(t,n)}function S(t,n){this.that=t;this.args=n;this.index=-1;this.active=0}S.prototype={start:function(){if(++this.active===1){this.index=s.push(this)-1;this.emit("start")}return this},zoom:function(t,n){if(p&&t!=="mouse")v=n.invert(p);if(this.touch0&&t!=="touch")this.touch0[1]=n.invert(this.touch0[0]);if(this.touch1&&t!=="touch")this.touch1[1]=n.invert(this.touch1[0]);this.that.__zoom=n;this.emit("zoom");return this},end:function(){if(--this.active===0){s.splice(this.index,1);p=v=null;this.index=-1;this.emit("end")}return this},emit:function(t){rl(new W_(x,t,this.that.__zoom),l.apply,l,[t,this.that,this.args])}};function E(){if(!n.apply(this,arguments))return;var a=N(this,arguments),o=this.__zoom,u=Math.max(r,Math.min(i,o.k*Math.pow(2,-t.event.deltaY*(t.event.deltaMode?120:1)/500)));if(g){var f=ol(this);if(p[0]!==f[0]||p[1]!==f[1]){v=o.invert(p=f)}clearTimeout(g)}else if(o.k===u)return;else{a.extent=e.apply(this,arguments);v=o.invert(p=ol(this));Vh(this);a.start()}Q_();g=setTimeout(c,m);a.zoom("mouse",M(b(w(o,u),p,v),a.extent));function c(){g=null;a.end()}}function A(){if(_||!n.apply(this,arguments))return;var r=N(this,arguments),i=Ah(t.event.view).on("mousemove.zoom",a,true).on("mouseup.zoom",o,true);Zd(t.event.view);J_();h=false;r.extent=e.apply(this,arguments);v=this.__zoom.invert(p=ol(this));Vh(this);r.start();function a(){Q_();h=true;r.zoom("mouse",M(b(r.that.__zoom,p=ol(r.that),v),r.extent))}function o(){i.on("mousemove.zoom mouseup.zoom",null);Gd(t.event.view,h);Q_();r.end()}}function C(){if(!n.apply(this,arguments))return;var r=this.__zoom,i=ol(this),a=r.invert(i),o=r.k*(t.event.shiftKey?.5:2),u=M(b(w(r,o),i,a),e.apply(this,arguments));Q_();if(c>0)Ah(this).transition().duration(c).call(T,u,i);else Ah(this).call(x.transform,u)}function z(){if(!n.apply(this,arguments))return;var r=N(this,arguments),i=t.event.changedTouches,a=i.length,o,u,f;J_();for(o=0;o<a;++o){u=i[o],f=zh(this,i,u.identifier);f=[f,this.__zoom.invert(f),u.identifier];if(!r.touch0)r.touch0=f;else if(!r.touch1)r.touch1=f}if(d){d=clearTimeout(d);if(!r.touch1)return r.end(),C.apply(this,arguments)}if(t.event.touches.length===a){d=setTimeout(function(){d=null},y);Vh(this);r.extent=e.apply(this,arguments);r.start()}}function P(){var n=N(this,arguments),e=t.event.changedTouches,r=e.length,i,a,o,u;Q_();if(d)d=clearTimeout(d);for(i=0;i<r;++i){a=e[i],o=zh(this,e,a.identifier);if(n.touch0&&n.touch0[2]===a.identifier)n.touch0[0]=o;else if(n.touch1&&n.touch1[2]===a.identifier)n.touch1[0]=o}a=n.that.__zoom;if(n.touch1){var f=n.touch0[0],c=n.touch0[1],s=n.touch1[0],l=n.touch1[1],h=(h=s[0]-f[0])*h+(h=s[1]-f[1])*h,p=(p=l[0]-c[0])*p+(p=l[1]-c[1])*p;a=w(a,Math.sqrt(h/p));o=[(f[0]+s[0])/2,(f[1]+s[1])/2];u=[(c[0]+l[0])/2,(c[1]+l[1])/2]}else if(n.touch0)o=n.touch0[0],u=n.touch0[1];else return;n.zoom("touch",M(b(a,o,u),n.extent))}function L(){var n=N(this,arguments),e=t.event.changedTouches,r=e.length,i,a;J_();if(_)clearTimeout(_);_=setTimeout(function(){_=null},y);for(i=0;i<r;++i){a=e[i];if(n.touch0&&n.touch0[2]===a.identifier)delete n.touch0;else if(n.touch1&&n.touch1[2]===a.identifier)delete n.touch1}if(n.touch1&&!n.touch0)n.touch0=n.touch1,delete n.touch1;if(!n.touch0)n.end()}x.filter=function(t){return arguments.length?(n=typeof t==="function"?t:V_(!!t),x):n};x.extent=function(t){return arguments.length?(e=typeof t==="function"?t:V_([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),x):e};x.scaleExtent=function(t){return arguments.length?(r=+t[0],i=+t[1],x):[r,i]};x.translateExtent=function(t){return arguments.length?(a=+t[0][0],o=+t[1][0],u=+t[0][1],f=+t[1][1],x):[[a,u],[o,f]]};x.duration=function(t){return arguments.length?(c=+t,x):c};x.on=function(){var t=l.on.apply(l,arguments);return t===l?x:t};return x}function ry(t){return function(){return t}}function iy(t,n,e){this.target=t;this.type=n;this.selection=e}function ay(){t.event.stopImmediatePropagation()}function oy(){t.event.preventDefault();t.event.stopImmediatePropagation()}var uy={name:"drag"};var fy={name:"space"};var cy={name:"handle"};var sy={name:"center"};var ly={name:"x",handles:["e","w"].map(my),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}};var hy={name:"y",handles:["n","s"].map(my),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}};var py={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(my),input:function(t){return t},output:function(t){return t}};var vy={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var dy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"};var _y={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"};var yy={overlay:+1,selection:+1,n:null,e:+1,s:null,w:-1,nw:-1,ne:+1,se:+1,sw:-1};var gy={overlay:+1,selection:+1,n:-1,e:null,s:+1,w:null,nw:-1,ne:-1,se:+1,sw:+1};function my(t){return{type:t}}function xy(){return!t.event.button}function wy(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function by(t){while(!t.__brush)if(!(t=t.parentNode))return;return t.__brush}function My(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ky(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ty(){return Ey(ly)}function Ny(){return Ey(hy)}function Sy(){return Ey(py)}function Ey(n){var e=wy,r=xy,i=Ha(u,"start","brush","end"),a=6,o;function u(t){var e=t.property("__brush",h).selectAll(".overlay").data([my("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vy.overlay).merge(e).each(function(){var t=by(this).extent;Ah(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])});t.selectAll(".selection").data([my("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vy.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(n.handles,function(t){return t.type});r.exit().remove();r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return vy[t.type]});t.each(f).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}u.move=function(t,e){if(t.selection){t.on("start.brush",function(){c(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){c(this,arguments).end()}).tween("brush",function(){var t=this,r=t.__brush,i=c(t,arguments),a=r.selection,o=n.input(typeof e==="function"?e.apply(this,arguments):e,r.extent),u=sa(a,o);function s(n){r.selection=n===1&&My(o)?null:u(n);f.call(t);i.brush()}return a&&o?s:s(1)})}else{t.each(function(){var t=this,r=arguments,i=t.__brush,a=n.input(typeof e==="function"?e.apply(t,r):e,i.extent),o=c(t,r).beforestart();Vh(t);i.selection=a==null||My(a)?null:a;f.call(t);o.start().brush().end()})}};function f(){var t=Ah(this),n=by(this).selection;if(n){t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]);t.selectAll(".handle").style("display",null).attr("x",function(t){return t.type[t.type.length-1]==="e"?n[1][0]-a/2:n[0][0]-a/2}).attr("y",function(t){return t.type[0]==="s"?n[1][1]-a/2:n[0][1]-a/2}).attr("width",function(t){return t.type==="n"||t.type==="s"?n[1][0]-n[0][0]+a:a}).attr("height",function(t){return t.type==="e"||t.type==="w"?n[1][1]-n[0][1]+a:a})}else{t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}}function c(t,n){return t.__brush.emitter||new s(t,n)}function s(t,n){this.that=t;this.args=n;this.state=t.__brush;this.active=0}s.prototype={beforestart:function(){if(++this.active===1)this.state.emitter=this,this.starting=true;return this},start:function(){if(this.starting)this.starting=false,this.emit("start");return this},brush:function(){this.emit("brush");return this},end:function(){if(--this.active===0)delete this.state.emitter,this.emit("end");return this},emit:function(t){rl(new iy(u,t,n.output(this.state.selection)),i.apply,i,[t,this.that,this.args])}};function l(){if(t.event.touches){if(t.event.changedTouches.length<t.event.touches.length)return oy()}else if(o)return;if(!r.apply(this,arguments))return;var e=this,i=t.event.target.__data__.type,a=(t.event.metaKey?i="overlay":i)==="selection"?uy:t.event.altKey?sy:cy,u=n===hy?null:yy[i],s=n===ly?null:gy[i],l=by(e),h=l.extent,p=l.selection,v=h[0][0],d,_,y=h[0][1],g,m,x=h[1][0],w,b,M=h[1][1],k,T,N,S,E,A=u&&s&&t.event.shiftKey,C,z,P=ol(e),L=P,q=c(e,arguments).beforestart();if(i==="overlay"){l.selection=p=[[d=n===hy?v:P[0],g=n===ly?y:P[1]],[w=n===hy?x:d,k=n===ly?M:g]]}else{d=p[0][0];g=p[0][1];w=p[1][0];k=p[1][1]}_=d;m=g;b=w;T=k;var U=Ah(e).attr("pointer-events","none");var I=U.selectAll(".overlay").attr("cursor",vy[i]);if(t.event.touches){U.on("touchmove.brush",D,true).on("touchend.brush touchcancel.brush",F,true)}else{var R=Ah(t.event.view).on("keydown.brush",Y,true).on("keyup.brush",B,true).on("mousemove.brush",D,true).on("mouseup.brush",F,true);Zd(t.event.view)}ay();Vh(e);f.call(e);q.start();function D(){var t=ol(e);if(A&&!C&&!z){if(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1]))z=true;else C=true}L=t;E=true;oy();O()}function O(){var t;N=L[0]-P[0];S=L[1]-P[1];switch(a){case fy:case uy:{if(u)N=Math.max(v-d,Math.min(x-w,N)),_=d+N,b=w+N;if(s)S=Math.max(y-g,Math.min(M-k,S)),m=g+S,T=k+S;break}case cy:{if(u<0)N=Math.max(v-d,Math.min(x-d,N)),_=d+N,b=w;else if(u>0)N=Math.max(v-w,Math.min(x-w,N)),_=d,b=w+N;if(s<0)S=Math.max(y-g,Math.min(M-g,S)),m=g+S,T=k;else if(s>0)S=Math.max(y-k,Math.min(M-k,S)),m=g,T=k+S;break}case sy:{if(u)_=Math.max(v,Math.min(x,d-N*u)),b=Math.max(v,Math.min(x,w+N*u));if(s)m=Math.max(y,Math.min(M,g-S*s)),T=Math.max(y,Math.min(M,k+S*s));break}}if(b<_){u*=-1;t=d,d=w,w=t;t=_,_=b,b=t;if(i in dy)I.attr("cursor",vy[i=dy[i]])}if(T<m){s*=-1;t=g,g=k,k=t;t=m,m=T,T=t;if(i in _y)I.attr("cursor",vy[i=_y[i]])}p=l.selection;if(C)_=p[0][0],b=p[1][0];if(z)m=p[0][1],T=p[1][1];if(p[0][0]!==_||p[0][1]!==m||p[1][0]!==b||p[1][1]!==T){l.selection=[[_,m],[b,T]];f.call(e);q.brush()}}function F(){ay();if(t.event.touches){if(t.event.touches.length)return;if(o)clearTimeout(o);o=setTimeout(function(){o=null},500);U.on("touchmove.brush touchend.brush touchcancel.brush",null)}else{Gd(t.event.view,E);R.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null)}U.attr("pointer-events","all");I.attr("cursor",vy.overlay);if(My(p))l.selection=null,f.call(e);q.end()}function Y(){switch(t.event.keyCode){case 16:{A=u&&s;break}case 18:{if(a===cy){if(u)w=b-N*u,d=_+N*u;if(s)k=T-S*s,g=m+S*s;a=sy;O()}break}case 32:{if(a===cy||a===sy){if(u<0)w=b-N;else if(u>0)d=_-N;if(s<0)k=T-S;else if(s>0)g=m-S;a=fy;I.attr("cursor",vy.selection);O()}break}default:return}oy()}function B(){switch(t.event.keyCode){case 16:{if(A){C=z=A=false;O()}break}case 18:{if(a===sy){if(u<0)w=b;else if(u>0)d=_;if(s<0)k=T;else if(s>0)g=m;a=cy;O()}break}case 32:{if(a===fy){if(t.event.altKey){if(u)w=b-N*u,d=_+N*u;if(s)k=T-S*s,g=m+S*s;a=sy}else{if(u<0)w=b;else if(u>0)d=_;if(s<0)k=T;else if(s>0)g=m;a=cy}I.attr("cursor",vy[i]);O()}break}default:return}oy()}}function h(){var t=this.__brush||{selection:null};t.extent=e.apply(this,arguments);t.dim=n;return t}u.extent=function(t){return arguments.length?(e=typeof t==="function"?t:ry([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),u):e};u.filter=function(t){return arguments.length?(r=typeof t==="function"?t:ry(!!t),u):r};u.handleSize=function(t){return arguments.length?(a=+t,u):a};u.on=function(){var t=i.on.apply(i,arguments);return t===i?u:t};return u}function Ay(){return new Cy}function Cy(){this.reset()}Cy.prototype={constructor:Cy,reset:function(){this.s=this.t=0},add:function(t){Py(zy,t,this.t);Py(this,zy.s,this.s);if(this.s)this.t+=zy.t;else this.s=zy.t},valueOf:function(){return this.s}};var zy=new Cy;function Py(t,n,e){var r=t.s=n+e,i=r-n,a=r-i;t.t=n-a+(e-i)}var Ly=1e-6;var qy=1e-12;var Uy=Math.PI;var Iy=Uy/2;var Ry=Uy/4;var Dy=Uy*2;var Oy=180/Uy;var Fy=Uy/180;var Yy=Math.abs;var By=Math.atan;var jy=Math.atan2;var Hy=Math.cos;var Xy=Math.ceil;var Vy=Math.exp;var Wy=Math.log;var $y=Math.pow;var Zy=Math.sin;var Gy=Math.sign||function(t){return t>0?1:t<0?-1:0};var Jy=Math.sqrt;var Qy=Math.tan;function Ky(t){return t>1?0:t<-1?Uy:Math.acos(t)}function tg(t){return t>1?Iy:t<-1?-Iy:Math.asin(t)}function ng(t){return(t=Zy(t/2))*t}function eg(){}function rg(t,n){if(t&&ag.hasOwnProperty(t.type)){ag[t.type](t,n)}}var ig={Feature:function(t,n){rg(t.geometry,n)},FeatureCollection:function(t,n){var e=t.features,r=-1,i=e.length;while(++r<i)rg(e[r].geometry,n)}};var ag={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates;n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){var e=t.coordinates,r=-1,i=e.length;while(++r<i)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){og(t.coordinates,n,0)},MultiLineString:function(t,n){var e=t.coordinates,r=-1,i=e.length;while(++r<i)og(e[r],n,0)},Polygon:function(t,n){ug(t.coordinates,n)},MultiPolygon:function(t,n){var e=t.coordinates,r=-1,i=e.length;while(++r<i)ug(e[r],n)},GeometryCollection:function(t,n){var e=t.geometries,r=-1,i=e.length;while(++r<i)rg(e[r],n)}};function og(t,n,e){var r=-1,i=t.length-e,a;n.lineStart();while(++r<i)a=t[r],n.point(a[0],a[1],a[2]);n.lineEnd()}function ug(t,n){var e=-1,r=t.length;n.polygonStart();while(++e<r)og(t[e],n,1);n.polygonEnd()}function fg(t,n){if(t&&ig.hasOwnProperty(t.type)){ig[t.type](t,n)}else{rg(t,n)}}var cg;var sg;var lg;var hg;var pg;var vg;var dg;var _g={point:eg,lineStart:eg,lineEnd:eg,polygonStart:function(){cg.reset();_g.lineStart=yg;_g.lineEnd=gg},polygonEnd:function(){var t=+cg;sg.add(t<0?Dy+t:t);this.lineStart=this.lineEnd=this.point=eg},sphere:function(){sg.add(Dy)}};function yg(){_g.point=mg}function gg(){xg(lg,hg)}function mg(t,n){_g.point=xg;lg=t,hg=n;t*=Fy,n*=Fy;pg=t,vg=Hy(n=n/2+Ry),dg=Zy(n)}function xg(t,n){t*=Fy,n*=Fy;n=n/2+Ry;var e=t-pg,r=e>=0?1:-1,i=r*e,a=Hy(n),o=Zy(n),u=dg*o,f=vg*a+u*Hy(i),c=u*r*Zy(i);cg.add(jy(c,f));pg=t,vg=a,dg=o}function wg(t){if(sg)sg.reset();else sg=Ay(),cg=Ay();fg(t,_g);return sg*2}function bg(t){return[jy(t[1],t[0]),tg(t[2])]}function Mg(t){var n=t[0],e=t[1],r=Hy(e);return[r*Hy(n),r*Zy(n),Zy(e)]}function kg(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Tg(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ng(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Sg(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Eg(t){var n=Jy(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Ag;var Cg;var zg;var Pg;var Lg;var qg;var Ug;var Ig;var Rg;var Dg;var Og;var Fg={point:Yg,lineStart:jg,lineEnd:Hg,polygonStart:function(){Fg.point=Xg;Fg.lineStart=Vg;Fg.lineEnd=Wg;Rg.reset();_g.polygonStart()},polygonEnd:function(){_g.polygonEnd();Fg.point=Yg;Fg.lineStart=jg;Fg.lineEnd=Hg;if(cg<0)Ag=-(zg=180),Cg=-(Pg=90);else if(Rg>Ly)Pg=90;else if(Rg<-Ly)Cg=-90;Og[0]=Ag,Og[1]=zg}};function Yg(t,n){Dg.push(Og=[Ag=t,zg=t]);if(n<Cg)Cg=n;if(n>Pg)Pg=n}function Bg(t,n){var e=Mg([t*Fy,n*Fy]);if(Ig){var r=Tg(Ig,e),i=[r[1],-r[0],0],a=Tg(i,r);Eg(a);a=bg(a);var o=t-Lg,u=o>0?1:-1,f=a[0]*Oy*u,c,s=Yy(o)>180;if(s^(u*Lg<f&&f<u*t)){c=a[1]*Oy;if(c>Pg)Pg=c}else if(f=(f+360)%360-180,s^(u*Lg<f&&f<u*t)){c=-a[1]*Oy;if(c<Cg)Cg=c}else{if(n<Cg)Cg=n;if(n>Pg)Pg=n}if(s){if(t<Lg){if($g(Ag,t)>$g(Ag,zg))zg=t}else{if($g(t,zg)>$g(Ag,zg))Ag=t}}else{if(zg>=Ag){if(t<Ag)Ag=t;if(t>zg)zg=t}else{if(t>Lg){if($g(Ag,t)>$g(Ag,zg))zg=t}else{if($g(t,zg)>$g(Ag,zg))Ag=t}}}}else{Yg(t,n)}Ig=e,Lg=t}function jg(){Fg.point=Bg}function Hg(){Og[0]=Ag,Og[1]=zg;Fg.point=Yg;Ig=null}function Xg(t,n){if(Ig){var e=t-Lg;Rg.add(Yy(e)>180?e+(e>0?360:-360):e)}else{qg=t,Ug=n}_g.point(t,n);Bg(t,n)}function Vg(){_g.lineStart()}function Wg(){Xg(qg,Ug);_g.lineEnd();if(Yy(Rg)>Ly)Ag=-(zg=180);Og[0]=Ag,Og[1]=zg;Ig=null}function $g(t,n){return(n-=t)<0?n+360:n}function Zg(t,n){return t[0]-n[0]}function Gg(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function Jg(t){var n,e,r,i,a,o,u;if(Rg)Rg.reset();else Rg=Ay();Pg=zg=-(Ag=Cg=Infinity);Dg=[];fg(t,Fg);if(e=Dg.length){Dg.sort(Zg);for(n=1,r=Dg[0],a=[r];n<e;++n){i=Dg[n];if(Gg(r,i[0])||Gg(r,i[1])){if($g(r[0],i[1])>$g(r[0],r[1]))r[1]=i[1];if($g(i[0],r[1])>$g(r[0],r[1]))r[0]=i[0]}else{a.push(r=i)}}for(o=-Infinity,e=a.length-1,n=0,r=a[e];n<=e;r=i,++n){i=a[n];if((u=$g(r[1],i[0]))>o)o=u,Ag=i[0],zg=r[1]}}Dg=Og=null;return Ag===Infinity||Cg===Infinity?[[NaN,NaN],[NaN,NaN]]:[[Ag,Cg],[zg,Pg]]}var Qg;var Kg;var tm;var nm;var em;var rm;var im;var am;var om;var um;var fm;var cm;var sm;var lm;var hm;var pm;var vm={sphere:eg,point:dm,lineStart:ym,lineEnd:xm,polygonStart:function(){vm.lineStart=wm;vm.lineEnd=bm},polygonEnd:function(){vm.lineStart=ym;vm.lineEnd=xm}};function dm(t,n){t*=Fy,n*=Fy;var e=Hy(n);_m(e*Hy(t),e*Zy(t),Zy(n))}function _m(t,n,e){++Qg;tm+=(t-tm)/Qg;nm+=(n-nm)/Qg;em+=(e-em)/Qg}function ym(){vm.point=gm}function gm(t,n){t*=Fy,n*=Fy;var e=Hy(n);lm=e*Hy(t);hm=e*Zy(t);pm=Zy(n);vm.point=mm;_m(lm,hm,pm)}function mm(t,n){t*=Fy,n*=Fy;var e=Hy(n),r=e*Hy(t),i=e*Zy(t),a=Zy(n),o=jy(Jy((o=hm*a-pm*i)*o+(o=pm*r-lm*a)*o+(o=lm*i-hm*r)*o),lm*r+hm*i+pm*a);Kg+=o;rm+=o*(lm+(lm=r));im+=o*(hm+(hm=i));am+=o*(pm+(pm=a));_m(lm,hm,pm)}function xm(){vm.point=dm}function wm(){vm.point=Mm}function bm(){km(cm,sm);vm.point=dm}function Mm(t,n){cm=t,sm=n;t*=Fy,n*=Fy;vm.point=km;var e=Hy(n);lm=e*Hy(t);hm=e*Zy(t);pm=Zy(n);_m(lm,hm,pm)}function km(t,n){t*=Fy,n*=Fy;var e=Hy(n),r=e*Hy(t),i=e*Zy(t),a=Zy(n),o=hm*a-pm*i,u=pm*r-lm*a,f=lm*i-hm*r,c=Jy(o*o+u*u+f*f),s=lm*r+hm*i+pm*a,l=c&&-Ky(s)/c,h=jy(c,s);om+=l*o;um+=l*u;fm+=l*f;Kg+=h;rm+=h*(lm+(lm=r));im+=h*(hm+(hm=i));am+=h*(pm+(pm=a));_m(lm,hm,pm)}function Tm(t){Qg=Kg=tm=nm=em=rm=im=am=om=um=fm=0;fg(t,vm);var n=om,e=um,r=fm,i=n*n+e*e+r*r;if(i<qy){n=rm,e=im,r=am;if(Kg<Ly)n=tm,e=nm,r=em;i=n*n+e*e+r*r;if(i<qy)return[NaN,NaN]}return[jy(e,n)*Oy,tg(r/Jy(i))*Oy]}function Nm(t){return function(){return t}}function Sm(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}if(t.invert&&n.invert)e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])};return e}function Em(t,n){return[t>Uy?t-Dy:t<-Uy?t+Dy:t,n]}Em.invert=Em;function Am(t,n,e){return(t%=Dy)?n||e?Sm(zm(t),Pm(n,e)):zm(t):n||e?Pm(n,e):Em}function Cm(t){return function(n,e){return n+=t,[n>Uy?n-Dy:n<-Uy?n+Dy:n,e]}}function zm(t){var n=Cm(t);n.invert=Cm(-t);return n}function Pm(t,n){var e=Hy(t),r=Zy(t),i=Hy(n),a=Zy(n);function o(t,n){var o=Hy(n),u=Hy(t)*o,f=Zy(t)*o,c=Zy(n),s=c*e+u*r;return[jy(f*i-s*a,u*e-c*r),tg(s*i+f*a)]}o.invert=function(t,n){var o=Hy(n),u=Hy(t)*o,f=Zy(t)*o,c=Zy(n),s=c*i-f*a;return[jy(f*i+c*a,u*e+s*r),tg(s*e-u*r)]};return o}function Lm(t){t=Am(t[0]*Fy,t[1]*Fy,t.length>2?t[2]*Fy:0);function n(n){n=t(n[0]*Fy,n[1]*Fy);return n[0]*=Oy,n[1]*=Oy,n}n.invert=function(n){n=t.invert(n[0]*Fy,n[1]*Fy);return n[0]*=Oy,n[1]*=Oy,n};return n}function qm(t,n,e,r,i,a){if(!e)return;var o=Hy(n),u=Zy(n),f=r*e;if(i==null){i=n+r*Dy;a=n-f/2}else{i=Um(o,i);a=Um(o,a);if(r>0?i<a:i>a)i+=r*Dy}for(var c,s=i;r>0?s>a:s<a;s-=f){c=bg([o,-u*Hy(s),-u*Zy(s)]);t.point(c[0],c[1])}}function Um(t,n){n=Mg(n),n[0]-=t;Eg(n);var e=Ky(-n[1]);return((-n[2]<0?-e:e)+Dy-Ly)%Dy}function Im(){var t=Nm([0,0]),n=Nm(90),e=Nm(6),r,i,a={point:o};function o(t,n){r.push(t=i(t,n));t[0]*=Oy,t[1]*=Oy}function u(){var o=t.apply(this,arguments),u=n.apply(this,arguments)*Fy,f=e.apply(this,arguments)*Fy;r=[];i=Am(-o[0]*Fy,-o[1]*Fy,0).invert;qm(a,u,f,1);o={type:"Polygon",coordinates:[r]};r=i=null;return o}u.center=function(n){return arguments.length?(t=typeof n==="function"?n:Nm([+n[0],+n[1]]),u):t};u.radius=function(t){return arguments.length?(n=typeof t==="function"?t:Nm(+t),u):n};u.precision=function(t){return arguments.length?(e=typeof t==="function"?t:Nm(+t),u):e};return u}function Rm(){var t=[],n;return{point:function(t,e){n.push([t,e])},lineStart:function(){t.push(n=[])},lineEnd:eg,rejoin:function(){if(t.length>1)t.push(t.pop().concat(t.shift()))},result:function(){var e=t;t=[];n=null;return e}}}function Dm(t,n,e,r,i,a){var o=t[0],u=t[1],f=n[0],c=n[1],s=0,l=1,h=f-o,p=c-u,v;v=e-o;if(!h&&v>0)return;v/=h;if(h<0){if(v<s)return;if(v<l)l=v}else if(h>0){if(v>l)return;if(v>s)s=v}v=i-o;if(!h&&v<0)return;v/=h;if(h<0){if(v>l)return;if(v>s)s=v}else if(h>0){if(v<s)return;if(v<l)l=v}v=r-u;if(!p&&v>0)return;v/=p;if(p<0){if(v<s)return;if(v<l)l=v}else if(p>0){if(v>l)return;if(v>s)s=v}v=a-u;if(!p&&v<0)return;v/=p;if(p<0){if(v>l)return;if(v>s)s=v}else if(p>0){if(v<s)return;if(v<l)l=v}if(s>0)t[0]=o+s*h,t[1]=u+s*p;if(l<1)n[0]=o+l*h,n[1]=u+l*p;return true}function Om(t,n){return Yy(t[0]-n[0])<Ly&&Yy(t[1]-n[1])<Ly}function Fm(t,n,e,r){this.x=t;this.z=n;this.o=e;this.e=r;this.v=false;this.n=this.p=null}function Ym(t,n,e,r,i){var a=[],o=[],u,f;t.forEach(function(t){if((n=t.length-1)<=0)return;var n,e=t[0],r=t[n],f;if(Om(e,r)){i.lineStart();for(u=0;u<n;++u)i.point((e=t[u])[0],e[1]);i.lineEnd();return}a.push(f=new Fm(e,t,null,true));o.push(f.o=new Fm(e,null,f,false));a.push(f=new Fm(r,t,null,false));o.push(f.o=new Fm(r,null,f,true))});if(!a.length)return;o.sort(n);Bm(a);Bm(o);for(u=0,f=o.length;u<f;++u){o[u].e=e=!e}var c=a[0],s,l;while(1){var h=c,p=true;while(h.v)if((h=h.n)===c)return;s=h.z;i.lineStart();do{h.v=h.o.v=true;if(h.e){if(p){for(u=0,f=s.length;u<f;++u)i.point((l=s[u])[0],l[1])}else{r(h.x,h.n.x,1,i)}h=h.n}else{if(p){s=h.p.z;for(u=s.length-1;u>=0;--u)i.point((l=s[u])[0],l[1])}else{r(h.x,h.p.x,-1,i)}h=h.p}h=h.o;s=h.z;p=!p}while(!h.v);i.lineEnd()}}function Bm(t){if(!(n=t.length))return;var n,e=0,r=t[0],i;while(++e<n){r.n=i=t[e];i.p=r;r=i}r.n=i=t[0];i.p=r}var jm=1e9;var Hm=-jm;function Xm(t,n,e,r){function i(i,a){return t<=i&&i<=e&&n<=a&&a<=r}function a(i,a,u,c){var s=0,l=0;if(i==null||(s=o(i,u))!==(l=o(a,u))||f(i,a)<0^u>0){do c.point(s===0||s===3?t:e,s>1?r:n);while((s=(s+u+4)%4)!==l)}else{c.point(a[0],a[1])}}function o(r,i){return Yy(r[0]-t)<Ly?i>0?0:3:Yy(r[0]-e)<Ly?i>0?2:1:Yy(r[1]-n)<Ly?i>0?1:0:i>0?3:2}function u(t,n){return f(t.x,n.x)}function f(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:e===0?n[1]-t[1]:e===1?t[0]-n[0]:e===2?t[1]-n[1]:n[0]-t[0]}return function(o){var f=o,c=Rm(),s,l,h,p,v,d,_,y,g,m,x;var w={point:b,lineStart:N,lineEnd:S,polygonStart:k,polygonEnd:T};function b(t,n){if(i(t,n))f.point(t,n)}function M(){var n=0;for(var e=0,i=l.length;e<i;++e){for(var a=l[e],o=1,u=a.length,f=a[0],c,s,h=f[0],p=f[1];o<u;++o){c=h,s=p,f=a[o],h=f[0],p=f[1];if(s<=r){if(p>r&&(h-c)*(r-s)>(p-s)*(t-c))++n}else{if(p<=r&&(h-c)*(r-s)<(p-s)*(t-c))--n}}}return n}function k(){f=c,s=[],l=[],x=true}function T(){var t=M(),n=x&&t,e=(s=P(s)).length;if(n||e){o.polygonStart();if(n){o.lineStart();a(null,null,1,o);o.lineEnd()}if(e){Ym(s,u,t,a,o)}o.polygonEnd()}f=o,s=l=h=null}function N(){w.point=E;if(l)l.push(h=[]);m=true;g=false;_=y=NaN}function S(){if(s){E(p,v);if(d&&g)c.rejoin();s.push(c.result())}w.point=b;if(g)f.lineEnd()}function E(a,o){var u=i(a,o);if(l)h.push([a,o]);if(m){p=a,v=o,d=u;m=false;if(u){f.lineStart();f.point(a,o)}}else{if(u&&g)f.point(a,o);else{var c=[_=Math.max(Hm,Math.min(jm,_)),y=Math.max(Hm,Math.min(jm,y))],s=[a=Math.max(Hm,Math.min(jm,a)),o=Math.max(Hm,Math.min(jm,o))];if(Dm(c,s,t,n,e,r)){if(!g){f.lineStart();f.point(c[0],c[1])}f.point(s[0],s[1]);if(!u)f.lineEnd();x=false}else if(u){f.lineStart();f.point(a,o);x=false}}}_=a,y=o,g=u}return w}}function Vm(){var t=0,n=0,e=960,r=500,i,a,o;return o={stream:function(o){return i&&a===o?i:i=Xm(t,n,e,r)(a=o)},extent:function(u){return arguments.length?(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1],i=a=null,o):[[t,n],[e,r]]}}}var Wm;var $m;var Zm;var Gm;var Jm={sphere:eg,point:eg,lineStart:Qm,lineEnd:eg,polygonStart:eg,polygonEnd:eg};function Qm(){Jm.point=tx;Jm.lineEnd=Km}function Km(){Jm.point=Jm.lineEnd=eg}function tx(t,n){t*=Fy,n*=Fy;$m=t,Zm=Zy(n),Gm=Hy(n);Jm.point=nx}function nx(t,n){t*=Fy,n*=Fy;var e=Zy(n),r=Hy(n),i=Yy(t-$m),a=Hy(i),o=Zy(i),u=r*o,f=Gm*e-Zm*r*a,c=Zm*e+Gm*r*a;Wm.add(jy(Jy(u*u+f*f),c));$m=t,Zm=e,Gm=r}function ex(t){if(Wm)Wm.reset();else Wm=Ay();fg(t,Jm);return+Wm}var rx=[null,null];var ix={type:"LineString",coordinates:rx};function ax(t,n){rx[0]=t;rx[1]=n;return ex(ix)}function ox(t,n,e){var r=g(t,n-Ly,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ux(t,n,e){var r=g(t,n-Ly,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function fx(){var t,n,e,r,i,a,o,u,f=10,c=f,s=90,l=360,h,p,v,d,_=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return g(Xy(r/s)*s,e,s).map(v).concat(g(Xy(u/l)*l,o,l).map(d)).concat(g(Xy(n/f)*f,t,f).filter(function(t){return Yy(t%s)>Ly}).map(h)).concat(g(Xy(a/c)*c,i,c).filter(function(t){return Yy(t%l)>Ly}).map(p))}y.lines=function(){return m().map(function(t){return{type:"LineString",coordinates:t}})};y.outline=function(){return{type:"Polygon",coordinates:[v(r).concat(d(o).slice(1),v(e).reverse().slice(1),d(u).reverse().slice(1))]}};y.extent=function(t){if(!arguments.length)return y.extentMinor();return y.extentMajor(t).extentMinor(t)};y.extentMajor=function(t){if(!arguments.length)return[[r,u],[e,o]];r=+t[0][0],e=+t[1][0];u=+t[0][1],o=+t[1][1];if(r>e)t=r,r=e,e=t;if(u>o)t=u,u=o,o=t;return y.precision(_)};y.extentMinor=function(e){if(!arguments.length)return[[n,a],[t,i]];n=+e[0][0],t=+e[1][0];a=+e[0][1],i=+e[1][1];if(n>t)e=n,n=t,t=e;if(a>i)e=a,a=i,i=e;return y.precision(_)};y.step=function(t){if(!arguments.length)return y.stepMinor();return y.stepMajor(t).stepMinor(t)};y.stepMajor=function(t){if(!arguments.length)return[s,l];s=+t[0],l=+t[1];return y};y.stepMinor=function(t){if(!arguments.length)return[f,c];f=+t[0],c=+t[1];return y};y.precision=function(f){if(!arguments.length)return _;_=+f;h=ox(a,i,90);p=ux(n,t,_);v=ox(u,o,90);d=ux(r,e,_);return y};return y.extentMajor([[-180,-90+Ly],[180,90-Ly]]).extentMinor([[-180,-80-Ly],[180,80+Ly]])}function cx(t,n){var e=t[0]*Fy,r=t[1]*Fy,i=n[0]*Fy,a=n[1]*Fy,o=Hy(r),u=Zy(r),f=Hy(a),c=Zy(a),s=o*Hy(e),l=o*Zy(e),h=f*Hy(i),p=f*Zy(i),v=2*tg(Jy(ng(a-r)+o*f*ng(i-e))),d=Zy(v);var _=v?function(t){var n=Zy(t*=v)/d,e=Zy(v-t)/d,r=e*s+n*h,i=e*l+n*p,a=e*u+n*c;return[jy(i,r)*Oy,jy(a,Jy(r*r+i*i))*Oy]}:function(){return[e*Oy,r*Oy]};_.distance=v;return _}function sx(t){return t}var lx=Ay();var hx=Ay();var px;var vx;var dx;var _x;var yx={point:eg,lineStart:eg,lineEnd:eg,polygonStart:function(){yx.lineStart=gx;yx.lineEnd=wx},polygonEnd:function(){yx.lineStart=yx.lineEnd=yx.point=eg;lx.add(Yy(hx));hx.reset()},result:function(){var t=lx/2;lx.reset();return t}};function gx(){yx.point=mx}function mx(t,n){yx.point=xx;px=dx=t,vx=_x=n}function xx(t,n){hx.add(_x*t-dx*n);dx=t,_x=n}function wx(){xx(px,vx)}var bx=Infinity;var Mx=bx;var kx=-bx;var Tx=kx;var Nx={point:Sx,lineStart:eg,lineEnd:eg,polygonStart:eg,polygonEnd:eg,result:function(){var t=[[bx,Mx],[kx,Tx]];kx=Tx=-(Mx=bx=Infinity);return t}};function Sx(t,n){
  7. if(t<bx)bx=t;if(t>kx)kx=t;if(n<Mx)Mx=n;if(n>Tx)Tx=n}var Ex=0;var Ax=0;var Cx=0;var zx=0;var Px=0;var Lx=0;var qx=0;var Ux=0;var Ix=0;var Rx;var Dx;var Ox;var Fx;var Yx={point:Bx,lineStart:jx,lineEnd:Vx,polygonStart:function(){Yx.lineStart=Wx;Yx.lineEnd=$x},polygonEnd:function(){Yx.point=Bx;Yx.lineStart=jx;Yx.lineEnd=Vx},result:function(){var t=Ix?[qx/Ix,Ux/Ix]:Lx?[zx/Lx,Px/Lx]:Cx?[Ex/Cx,Ax/Cx]:[NaN,NaN];Ex=Ax=Cx=zx=Px=Lx=qx=Ux=Ix=0;return t}};function Bx(t,n){Ex+=t;Ax+=n;++Cx}function jx(){Yx.point=Hx}function Hx(t,n){Yx.point=Xx;Bx(Ox=t,Fx=n)}function Xx(t,n){var e=t-Ox,r=n-Fx,i=Jy(e*e+r*r);zx+=i*(Ox+t)/2;Px+=i*(Fx+n)/2;Lx+=i;Bx(Ox=t,Fx=n)}function Vx(){Yx.point=Bx}function Wx(){Yx.point=Zx}function $x(){Gx(Rx,Dx)}function Zx(t,n){Yx.point=Gx;Bx(Rx=Ox=t,Dx=Fx=n)}function Gx(t,n){var e=t-Ox,r=n-Fx,i=Jy(e*e+r*r);zx+=i*(Ox+t)/2;Px+=i*(Fx+n)/2;Lx+=i;i=Fx*t-Ox*n;qx+=i*(Ox+t);Ux+=i*(Fx+n);Ix+=i*3;Bx(Ox=t,Fx=n)}function Jx(t){var n=4.5;var e={point:r,lineStart:function(){e.point=i},lineEnd:o,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=o;e.point=r},pointRadius:function(t){n=t;return e},result:eg};function r(e,r){t.moveTo(e+n,r);t.arc(e,r,n,0,Dy)}function i(n,r){t.moveTo(n,r);e.point=a}function a(n,e){t.lineTo(n,e)}function o(){e.point=r}function u(){t.closePath()}return e}function Qx(){var t=Kx(4.5),n=[];var e={point:r,lineStart:o,lineEnd:u,polygonStart:function(){e.lineEnd=f},polygonEnd:function(){e.lineEnd=u;e.point=r},pointRadius:function(n){t=Kx(n);return e},result:function(){if(n.length){var t=n.join("");n=[];return t}}};function r(e,r){n.push("M",e,",",r,t)}function i(t,r){n.push("M",t,",",r);e.point=a}function a(t,e){n.push("L",t,",",e)}function o(){e.point=i}function u(){e.point=r}function f(){n.push("Z")}return e}function Kx(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function tw(){var t=4.5,n,e,r,i;function a(n){if(n){if(typeof t==="function")i.pointRadius(+t.apply(this,arguments));fg(n,e(i))}return i.result()}a.area=function(t){fg(t,e(yx));return yx.result()};a.bounds=function(t){fg(t,e(Nx));return Nx.result()};a.centroid=function(t){fg(t,e(Yx));return Yx.result()};a.projection=function(t){return arguments.length?(e=(n=t)==null?sx:t.stream,a):n};a.context=function(n){if(!arguments.length)return r;i=(r=n)==null?new Qx:new Jx(n);if(typeof t!=="function")i.pointRadius(t);return a};a.pointRadius=function(n){if(!arguments.length)return t;t=typeof n==="function"?n:(i.pointRadius(+n),+n);return a};return a.projection(null).context(null)}var nw=Ay();function ew(t,n){var e=n[0],r=n[1],i=[Zy(e),-Hy(e),0],a=0,o=0;for(var u=0,f=t.length;u<f;++u){if(!(s=(c=t[u]).length))continue;var c,s,l=c[s-1],h=l[0],p=l[1]/2+Ry,v=Zy(p),d=Hy(p);for(var _=0;_<s;++_,h=g,v=x,d=w,l=y){var y=c[_],g=y[0],m=y[1]/2+Ry,x=Zy(m),w=Hy(m),b=g-h,M=b>=0?1:-1,k=M*b,T=k>Uy,N=v*x;nw.add(jy(N*M*Zy(k),d*w+N*Hy(k)));a+=T?b+M*Dy:b;if(T^h>=e^g>=e){var S=Tg(Mg(l),Mg(y));Eg(S);var E=Tg(i,S);Eg(E);var A=(T^b>=0?-1:1)*tg(E[2]);if(r>A||r===A&&(S[0]||S[1])){o+=T^b>=0?1:-1}}}}var C=(a<-Ly||a<Ly&&nw<-Ly)^o&1;nw.reset();return C}function rw(t,n,e,r){return function(i,a){var o=n(a),u=i.invert(r[0],r[1]),f=Rm(),c=n(f),s=false,l,h,p;var v={point:d,lineStart:y,lineEnd:g,polygonStart:function(){v.point=m;v.lineStart=x;v.lineEnd=w;h=[];l=[]},polygonEnd:function(){v.point=d;v.lineStart=y;v.lineEnd=g;h=P(h);var t=ew(l,u);if(h.length){if(!s)a.polygonStart(),s=true;Ym(h,aw,t,e,a)}else if(t){if(!s)a.polygonStart(),s=true;a.lineStart();e(null,null,1,a);a.lineEnd()}if(s)a.polygonEnd(),s=false;h=l=null},sphere:function(){a.polygonStart();a.lineStart();e(null,null,1,a);a.lineEnd();a.polygonEnd()}};function d(n,e){var r=i(n,e);if(t(n=r[0],e=r[1]))a.point(n,e)}function _(t,n){var e=i(t,n);o.point(e[0],e[1])}function y(){v.point=_;o.lineStart()}function g(){v.point=d;o.lineEnd()}function m(t,n){p.push([t,n]);var e=i(t,n);c.point(e[0],e[1])}function x(){c.lineStart();p=[]}function w(){m(p[0][0],p[0][1]);c.lineEnd();var t=c.clean(),n=f.result(),e,r=n.length,i,o,u;p.pop();l.push(p);p=null;if(!r)return;if(t&1){o=n[0];if((i=o.length-1)>0){if(!s)a.polygonStart(),s=true;a.lineStart();for(e=0;e<i;++e)a.point((u=o[e])[0],u[1]);a.lineEnd()}return}if(r>1&&t&2)n.push(n.pop().concat(n.shift()));h.push(n.filter(iw))}return v}}function iw(t){return t.length>1}function aw(t,n){return((t=t.x)[0]<0?t[1]-Iy-Ly:Iy-t[1])-((n=n.x)[0]<0?n[1]-Iy-Ly:Iy-n[1])}var ow=rw(function(){return true},uw,cw,[-Uy,-Iy]);function uw(t){var n=NaN,e=NaN,r=NaN,i;return{lineStart:function(){t.lineStart();i=1},point:function(a,o){var u=a>0?Uy:-Uy,f=Yy(a-n);if(Yy(f-Uy)<Ly){t.point(n,e=(e+o)/2>0?Iy:-Iy);t.point(r,e);t.lineEnd();t.lineStart();t.point(u,e);t.point(a,e);i=0}else if(r!==u&&f>=Uy){if(Yy(n-r)<Ly)n-=r*Ly;if(Yy(a-u)<Ly)a-=u*Ly;e=fw(n,e,a,o);t.point(r,e);t.lineEnd();t.lineStart();t.point(u,e);i=0}t.point(n=a,e=o);r=u},lineEnd:function(){t.lineEnd();n=e=NaN},clean:function(){return 2-i}}}function fw(t,n,e,r){var i,a,o=Zy(t-e);return Yy(o)>Ly?By((Zy(n)*(a=Hy(r))*Zy(e)-Zy(r)*(i=Hy(n))*Zy(t))/(i*a*o)):(n+r)/2}function cw(t,n,e,r){var i;if(t==null){i=e*Iy;r.point(-Uy,i);r.point(0,i);r.point(Uy,i);r.point(Uy,0);r.point(Uy,-i);r.point(0,-i);r.point(-Uy,-i);r.point(-Uy,0);r.point(-Uy,i)}else if(Yy(t[0]-n[0])>Ly){var a=t[0]<n[0]?Uy:-Uy;i=e*a/2;r.point(-a,i);r.point(0,i);r.point(a,i)}else{r.point(n[0],n[1])}}function sw(t,n){var e=Hy(t),r=e>0,i=Yy(e)>Ly;function a(e,r,i,a){qm(a,t,n,i,e,r)}function o(t,n){return Hy(t)*Hy(n)>e}function u(t){var n,e,a,u,s;return{lineStart:function(){u=a=false;s=1},point:function(l,h){var p=[l,h],v,d=o(l,h),_=r?d?0:c(l,h):d?c(l+(l<0?Uy:-Uy),h):0;if(!n&&(u=a=d))t.lineStart();if(d!==a){v=f(n,p);if(Om(n,v)||Om(p,v)){p[0]+=Ly;p[1]+=Ly;d=o(p[0],p[1])}}if(d!==a){s=0;if(d){t.lineStart();v=f(p,n);t.point(v[0],v[1])}else{v=f(n,p);t.point(v[0],v[1]);t.lineEnd()}n=v}else if(i&&n&&r^d){var y;if(!(_&e)&&(y=f(p,n,true))){s=0;if(r){t.lineStart();t.point(y[0][0],y[0][1]);t.point(y[1][0],y[1][1]);t.lineEnd()}else{t.point(y[1][0],y[1][1]);t.lineEnd();t.lineStart();t.point(y[0][0],y[0][1])}}}if(d&&(!n||!Om(n,p))){t.point(p[0],p[1])}n=p,a=d,e=_},lineEnd:function(){if(a)t.lineEnd();n=null},clean:function(){return s|(u&&a)<<1}}}function f(t,n,r){var i=Mg(t),a=Mg(n);var o=[1,0,0],u=Tg(i,a),f=kg(u,u),c=u[0],s=f-c*c;if(!s)return!r&&t;var l=e*f/s,h=-e*c/s,p=Tg(o,u),v=Sg(o,l),d=Sg(u,h);Ng(v,d);var _=p,y=kg(v,_),g=kg(_,_),m=y*y-g*(kg(v,v)-1);if(m<0)return;var x=Jy(m),w=Sg(_,(-y-x)/g);Ng(w,v);w=bg(w);if(!r)return w;var b=t[0],M=n[0],k=t[1],T=n[1],N;if(M<b)N=b,b=M,M=N;var S=M-b,E=Yy(S-Uy)<Ly,A=E||S<Ly;if(!E&&T<k)N=k,k=T,T=N;if(A?E?k+T>0^w[1]<(Yy(w[0]-b)<Ly?k:T):k<=w[1]&&w[1]<=T:S>Uy^(b<=w[0]&&w[0]<=M)){var C=Sg(_,(-y+x)/g);Ng(C,v);return[w,bg(C)]}}function c(n,e){var i=r?t:Uy-t,a=0;if(n<-i)a|=1;else if(n>i)a|=2;if(e<-i)a|=4;else if(e>i)a|=8;return a}return rw(o,u,a,r?[0,-t]:[-Uy,t-Uy])}function lw(t){return{stream:hw(t)}}function hw(t){function n(){}var e=n.prototype=Object.create(pw.prototype);for(var r in t)e[r]=t[r];return function(t){var e=new n;e.stream=t;return e}}function pw(){}pw.prototype={point:function(t,n){this.stream.point(t,n)},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()}};var vw=16;var dw=Hy(30*Fy);function _w(t,n){return+n?gw(t,n):yw(t)}function yw(t){return hw({point:function(n,e){n=t(n,e);this.stream.point(n[0],n[1])}})}function gw(t,n){function e(r,i,a,o,u,f,c,s,l,h,p,v,d,_){var y=c-r,g=s-i,m=y*y+g*g;if(m>4*n&&d--){var x=o+h,w=u+p,b=f+v,M=Jy(x*x+w*w+b*b),k=tg(b/=M),T=Yy(Yy(b)-1)<Ly||Yy(a-l)<Ly?(a+l)/2:jy(w,x),N=t(T,k),S=N[0],E=N[1],A=S-r,C=E-i,z=g*A-y*C;if(z*z/m>n||Yy((y*A+g*C)/m-.5)>.3||o*h+u*p+f*v<dw){e(r,i,a,o,u,f,S,E,T,x/=M,w/=M,b,d,_);_.point(S,E);e(S,E,T,x,w,b,c,s,l,h,p,v,d,_)}}}return function(n){var r,i,a,o,u,f,c,s,l,h,p,v;var d={point:_,lineStart:y,lineEnd:m,polygonStart:function(){n.polygonStart();d.lineStart=x},polygonEnd:function(){n.polygonEnd();d.lineStart=y}};function _(e,r){e=t(e,r);n.point(e[0],e[1])}function y(){s=NaN;d.point=g;n.lineStart()}function g(r,i){var a=Mg([r,i]),o=t(r,i);e(s,l,c,h,p,v,s=o[0],l=o[1],c=r,h=a[0],p=a[1],v=a[2],vw,n);n.point(s,l)}function m(){d.point=_;n.lineEnd()}function x(){y();d.point=w;d.lineEnd=b}function w(t,n){g(r=t,n),i=s,a=l,o=h,u=p,f=v;d.point=g}function b(){e(s,l,c,h,p,v,i,a,r,o,u,f,vw,n);d.lineEnd=m;m()}return d}}var mw=hw({point:function(t,n){this.stream.point(t*Fy,n*Fy)}});function xw(t){return ww(function(){return t})()}function ww(t){var n,e=150,r=480,i=250,a,o,u=0,f=0,c=0,s=0,l=0,h,p,v=null,d=ow,_=null,y,g,m,x=sx,w=.5,b=_w(S,w),M,k;function T(t){t=p(t[0]*Fy,t[1]*Fy);return[t[0]*e+a,o-t[1]*e]}function N(t){t=p.invert((t[0]-a)/e,(o-t[1])/e);return t&&[t[0]*Oy,t[1]*Oy]}function S(t,r){return t=n(t,r),[t[0]*e+a,o-t[1]*e]}T.stream=function(t){return M&&k===t?M:M=mw(d(h,b(x(k=t))))};T.clipAngle=function(t){return arguments.length?(d=+t?sw(v=t*Fy,6*Fy):(v=null,ow),A()):v*Oy};T.clipExtent=function(t){return arguments.length?(x=t==null?(_=y=g=m=null,sx):Xm(_=+t[0][0],y=+t[0][1],g=+t[1][0],m=+t[1][1]),A()):_==null?null:[[_,y],[g,m]]};T.scale=function(t){return arguments.length?(e=+t,E()):e};T.translate=function(t){return arguments.length?(r=+t[0],i=+t[1],E()):[r,i]};T.center=function(t){return arguments.length?(u=t[0]%360*Fy,f=t[1]%360*Fy,E()):[u*Oy,f*Oy]};T.rotate=function(t){return arguments.length?(c=t[0]%360*Fy,s=t[1]%360*Fy,l=t.length>2?t[2]%360*Fy:0,E()):[c*Oy,s*Oy,l*Oy]};T.precision=function(t){return arguments.length?(b=_w(S,w=t*t),A()):Jy(w)};function E(){p=Sm(h=Am(c,s,l),n);var t=n(u,f);a=r-t[0]*e;o=i+t[1]*e;return A()}function A(){M=k=null;return T}return function(){n=t.apply(this,arguments);T.invert=n.invert&&N;return E()}}function bw(t){var n=0,e=Uy/3,r=ww(t),i=r(n,e);i.parallels=function(t){return arguments.length?r(n=t[0]*Fy,e=t[1]*Fy):[n*Oy,e*Oy]};return i}function Mw(t,n){var e=Zy(t),r=(e+Zy(n))/2,i=1+e*(2*r-e),a=Jy(i)/r;function o(t,n){var e=Jy(i-2*r*Zy(n))/r;return[e*Zy(t*=r),a-e*Hy(t)]}o.invert=function(t,n){var e=a-n;return[jy(t,e)/r,tg((i-(t*t+e*e)*r*r)/(2*r))]};return o}function kw(){return bw(Mw).scale(151).translate([480,347])}function Tw(){return kw().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Nw(t){var n=t.length;return{point:function(e,r){var i=-1;while(++i<n)t[i].point(e,r)},sphere:function(){var e=-1;while(++e<n)t[e].sphere()},lineStart:function(){var e=-1;while(++e<n)t[e].lineStart()},lineEnd:function(){var e=-1;while(++e<n)t[e].lineEnd()},polygonStart:function(){var e=-1;while(++e<n)t[e].polygonStart()},polygonEnd:function(){var e=-1;while(++e<n)t[e].polygonEnd()}}}function Sw(){var t,n,e=Tw(),r,i=kw().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=kw().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u,f,c={point:function(t,n){f=[t,n]}};function s(t){var n=t[0],e=t[1];return f=null,(r.point(n,e),f)||(a.point(n,e),f)||(u.point(n,e),f)}s.invert=function(t){var n=e.scale(),r=e.translate(),a=(t[0]-r[0])/n,u=(t[1]-r[1])/n;return(u>=.12&&u<.234&&a>=-.425&&a<-.214?i:u>=.166&&u<.234&&a>=-.214&&a<-.115?o:e).invert(t)};s.stream=function(r){return t&&n===r?t:t=Nw([e.stream(n=r),i.stream(r),o.stream(r)])};s.precision=function(t){if(!arguments.length)return e.precision();e.precision(t),i.precision(t),o.precision(t);return s};s.scale=function(t){if(!arguments.length)return e.scale();e.scale(t),i.scale(t*.35),o.scale(t);return s.translate(e.translate())};s.translate=function(t){if(!arguments.length)return e.translate();var n=e.scale(),f=+t[0],l=+t[1];r=e.translate(t).clipExtent([[f-.455*n,l-.238*n],[f+.455*n,l+.238*n]]).stream(c);a=i.translate([f-.307*n,l+.201*n]).clipExtent([[f-.425*n+Ly,l+.12*n+Ly],[f-.214*n-Ly,l+.234*n-Ly]]).stream(c);u=o.translate([f-.205*n,l+.212*n]).clipExtent([[f-.214*n+Ly,l+.166*n+Ly],[f-.115*n-Ly,l+.234*n-Ly]]).stream(c);return s};return s.scale(1070)}function Ew(t){return function(n,e){var r=Hy(n),i=Hy(e),a=t(r*i);return[a*i*Zy(n),a*Zy(e)]}}function Aw(t){return function(n,e){var r=Jy(n*n+e*e),i=t(r),a=Zy(i),o=Hy(i);return[jy(n*a,r*o),tg(r&&e*a/r)]}}var Cw=Ew(function(t){return Jy(2/(1+t))});Cw.invert=Aw(function(t){return 2*tg(t/2)});function zw(){return xw(Cw).scale(120).clipAngle(180-.001)}var Pw=Ew(function(t){return(t=Ky(t))&&t/Zy(t)});Pw.invert=Aw(function(t){return t});function Lw(){return xw(Pw).scale(480/Dy).clipAngle(180-.001)}function qw(t,n){return[t,Wy(Qy((Iy+n)/2))]}qw.invert=function(t,n){return[t,2*By(Vy(n))-Iy]};function Uw(){return Iw(qw)}function Iw(t){var n=xw(t),e=n.scale,r=n.translate,i=n.clipExtent,a;n.scale=function(t){return arguments.length?(e(t),a&&n.clipExtent(null),n):e()};n.translate=function(t){return arguments.length?(r(t),a&&n.clipExtent(null),n):r()};n.clipExtent=function(t){if(!arguments.length)return a?null:i();if(a=t==null){var o=Uy*e(),u=r();t=[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]}i(t);return n};return n.clipExtent(null).scale(961/Dy)}function Rw(t){return Qy((Iy+t)/2)}function Dw(t,n){var e=Hy(t),r=t===n?Zy(t):Wy(e/Hy(n))/Wy(Rw(n)/Rw(t)),i=e*$y(Rw(t),r)/r;if(!r)return qw;function a(t,n){if(i>0){if(n<-Iy+Ly)n=-Iy+Ly}else{if(n>Iy-Ly)n=Iy-Ly}var e=i/$y(Rw(n),r);return[e*Zy(r*t),i-e*Hy(r*t)]}a.invert=function(t,n){var e=i-n,a=Gy(r)*Jy(t*t+e*e);return[jy(t,e)/r,2*By($y(i/a,1/r))-Iy]};return a}function Ow(){return bw(Dw)}function Fw(t,n){return[t,n]}Fw.invert=Fw;function Yw(){return xw(Fw).scale(480/Uy)}function Bw(t,n){var e=Hy(t),r=t===n?Zy(t):(e-Hy(n))/(n-t),i=e/r+t;if(Yy(r)<Ly)return Fw;function a(t,n){var e=i-n,a=r*t;return[e*Zy(a),i-e*Hy(a)]}a.invert=function(t,n){var e=i-n;return[jy(t,e)/r,i-Gy(r)*Jy(t*t+e*e)]};return a}function jw(){return bw(Bw).scale(128).translate([480,280])}function Hw(t,n){var e=Hy(n),r=Hy(t)*e;return[e*Zy(t)/r,Zy(n)/r]}Hw.invert=Aw(By);function Xw(){return xw(Hw).scale(139).clipAngle(60)}function Vw(t,n){return[Hy(n)*Zy(t),Zy(n)]}Vw.invert=Aw(tg);function Ww(){return xw(Vw).scale(240).clipAngle(90+Ly)}function $w(t,n){var e=Hy(n),r=1+Hy(t)*e;return[e*Zy(t)/r,Zy(n)/r]}$w.invert=Aw(function(t){return 2+By(t)});function Zw(){return xw($w).scale(240).clipAngle(142)}function Gw(t,n){return[Wy(Qy((Iy+n)/2)),-t]}Gw.invert=function(t,n){return[-n,2*By(Vy(t))-Iy]};function Jw(){var t=Iw(Gw),n=t.center,e=t.rotate;t.center=function(t){return arguments.length?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])};t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])};return e([0,0,90])}t.version=n;t.bisect=o;t.bisectRight=o;t.bisectLeft=u;t.ascending=e;t.bisector=r;t.descending=f;t.deviation=l;t.extent=h;t.histogram=T;t.thresholdFreedmanDiaconis=S;t.thresholdScott=E;t.thresholdSturges=k;t.max=A;t.mean=C;t.median=z;t.merge=P;t.min=L;t.pairs=q;t.permute=U;t.quantile=N;t.range=g;t.scan=I;t.shuffle=R;t.sum=D;t.ticks=b;t.tickStep=M;t.transpose=O;t.variance=s;t.zip=Y;t.entries=nt;t.keys=K;t.values=tt;t.map=H;t.set=Q;t.nest=X;t.randomUniform=et;t.randomNormal=rt;t.randomLogNormal=it;t.randomBates=ot;t.randomIrwinHall=at;t.randomExponential=ut;t.easeLinear=ft;t.easeQuad=lt;t.easeQuadIn=ct;t.easeQuadOut=st;t.easeQuadInOut=lt;t.easeCubic=vt;t.easeCubicIn=ht;t.easeCubicOut=pt;t.easeCubicInOut=vt;t.easePoly=gt;t.easePolyIn=_t;t.easePolyOut=yt;t.easePolyInOut=gt;t.easeSin=Mt;t.easeSinIn=wt;t.easeSinOut=bt;t.easeSinInOut=Mt;t.easeExp=Nt;t.easeExpIn=kt;t.easeExpOut=Tt;t.easeExpInOut=Nt;t.easeCircle=At;t.easeCircleIn=St;t.easeCircleOut=Et;t.easeCircleInOut=At;t.easeBounce=Yt;t.easeBounceIn=Ft;t.easeBounceOut=Yt;t.easeBounceInOut=Bt;t.easeBack=Vt;t.easeBackIn=Ht;t.easeBackOut=Xt;t.easeBackInOut=Vt;t.easeElastic=Jt;t.easeElasticIn=Gt;t.easeElasticOut=Jt;t.easeElasticInOut=Qt;t.polygonArea=Kt;t.polygonCentroid=tn;t.polygonHull=an;t.polygonContains=on;t.polygonLength=un;t.path=pn;t.quadtree=Pn;t.queue=Hn;t.arc=ie;t.area=se;t.line=ce;t.pie=pe;t.radialArea=me;t.radialLine=ge;t.symbol=Oe;t.symbols=De;t.symbolCircle=xe;t.symbolCross=we;t.symbolDiamond=ke;t.symbolSquare=Ce;t.symbolStar=Ae;t.symbolTriangle=Pe;t.symbolWye=Re;t.curveBasisClosed=Xe;t.curveBasisOpen=We;t.curveBasis=je;t.curveBundle=Ze;t.curveCardinalClosed=tr;t.curveCardinalOpen=er;t.curveCardinal=Qe;t.curveCatmullRomClosed=ur;t.curveCatmullRomOpen=cr;t.curveCatmullRom=ar;t.curveLinearClosed=lr;t.curveLinear=oe;t.curveMonotoneX=mr;t.curveMonotoneY=xr;t.curveNatural=Mr;t.curveStep=Tr;t.curveStepAfter=Sr;t.curveStepBefore=Nr;t.stack=Pr;t.stackOffsetExpand=Lr;t.stackOffsetNone=Ar;t.stackOffsetSilhouette=qr;t.stackOffsetWiggle=Ur;t.stackOrderAscending=Ir;t.stackOrderDescending=Dr;t.stackOrderInsideOut=Or;t.stackOrderNone=Cr;t.stackOrderReverse=Fr;t.color=ni;t.rgb=ai;t.hsl=ci;t.lab=Mi;t.hcl=Ci;t.cubehelix=Yi;t.interpolate=sa;t.interpolateArray=ea;t.interpolateNumber=ra;t.interpolateObject=ia;t.interpolateRound=la;t.interpolateString=ca;t.interpolateTransformCss=ba;t.interpolateTransformSvg=Ma;t.interpolateZoom=za;t.interpolateRgb=Qi;t.interpolateRgbBasis=ta;t.interpolateRgbBasisClosed=na;t.interpolateHsl=La;t.interpolateHslLong=qa;t.interpolateLab=Ua;t.interpolateHcl=Ra;t.interpolateHclLong=Da;t.interpolateCubehelix=Fa;t.interpolateCubehelixLong=Ya;t.interpolateBasis=Hi;t.interpolateBasisClosed=Xi;t.quantize=Ba;t.dispatch=Ha;t.dsvFormat=Qa;t.csvParse=to;t.csvParseRows=no;t.csvFormat=eo;t.csvFormatRows=ro;t.tsvParse=ao;t.tsvParseRows=oo;t.tsvFormat=uo;t.tsvFormatRows=fo;t.request=co;t.html=po;t.json=vo;t.text=_o;t.xml=yo;t.csv=xo;t.tsv=wo;t.now=Lo;t.timer=Io;t.timerFlush=Ro;t.timeout=Bo;t.interval=jo;t.timeInterval=Vo;t.timeMillisecond=Wo;t.timeMilliseconds=$o;t.timeSecond=tu;t.timeSeconds=nu;t.timeMinute=eu;t.timeMinutes=ru;t.timeHour=iu;t.timeHours=au;t.timeDay=ou;t.timeDays=uu;t.timeWeek=cu;t.timeWeeks=_u;t.timeSunday=cu;t.timeSundays=_u;t.timeMonday=su;t.timeMondays=yu;t.timeTuesday=lu;t.timeTuesdays=gu;t.timeWednesday=hu;t.timeWednesdays=mu;t.timeThursday=pu;t.timeThursdays=xu;t.timeFriday=vu;t.timeFridays=wu;t.timeSaturday=du;t.timeSaturdays=bu;t.timeMonth=Mu;t.timeMonths=ku;t.timeYear=Tu;t.timeYears=Nu;t.utcMillisecond=Wo;t.utcMilliseconds=$o;t.utcSecond=tu;t.utcSeconds=nu;t.utcMinute=Su;t.utcMinutes=Eu;t.utcHour=Au;t.utcHours=Cu;t.utcDay=zu;t.utcDays=Pu;t.utcWeek=qu;t.utcWeeks=Yu;t.utcSunday=qu;t.utcSundays=Yu;t.utcMonday=Uu;t.utcMondays=Bu;t.utcTuesday=Iu;t.utcTuesdays=ju;t.utcWednesday=Ru;t.utcWednesdays=Hu;t.utcThursday=Du;t.utcThursdays=Xu;t.utcFriday=Ou;t.utcFridays=Vu;t.utcSaturday=Fu;t.utcSaturdays=Wu;t.utcMonth=$u;t.utcMonths=Zu;t.utcYear=Gu;t.utcYears=Ju;t.formatLocale=hf;t.formatDefaultLocale=vf;t.formatSpecifier=ff;t.precisionFixed=df;t.precisionPrefix=_f;t.precisionRound=yf;t.isoFormat=Mc;t.isoParse=Tc;t.timeFormatLocale=wf;t.timeFormatDefaultLocale=xc;t.scaleBand=zc;t.scalePoint=Lc;t.scaleIdentity=Wc;t.scaleLinear=Vc;t.scaleLog=ns;t.scaleOrdinal=Cc;t.scaleImplicit=Ac;t.scalePow=rs;t.scaleSqrt=is;t.scaleQuantile=as;t.scaleQuantize=os;t.scaleThreshold=us;t.scaleTime=gs;t.scaleUtc=ms;t.schemeCategory10=ws;t.schemeCategory20b=bs;t.schemeCategory20c=Ms;t.schemeCategory20=ks;t.scaleSequential=Us;t.interpolateCubehelixDefault=Ts;t.interpolateRainbow=As;t.interpolateWarm=Ns;t.interpolateCool=Ss;t.interpolateViridis=zs;t.interpolateMagma=Ps;t.interpolateInferno=Ls;t.interpolatePlasma=qs;t.creator=Ys;t.customEvent=rl;t.local=js;t.matcher=$s;t.mouse=ol;t.namespace=Ds;t.namespaces=Rs;t.select=Ah;t.selectAll=Ch;t.selection=Eh;t.selector=fl;t.selectorAll=ll;t.touch=zh;t.touches=Ph;t.window=Fl;t.active=$p;t.interrupt=Vh;t.transition=Yp;t.axisTop=uv;t.axisRight=fv;t.axisBottom=cv;t.axisLeft=sv;t.cluster=gv;t.hierarchy=Cv;t.pack=nd;t.packSiblings=Zv;t.packEnclose=Dv;t.partition=ud;t.stratify=pd;t.tree=bd;t.treemap=Sd;t.treemapBinary=Ed;t.treemapDice=od;t.treemapSlice=Md;t.treemapSliceDice=Ad;t.treemapSquarify=Nd;t.treemapResquarify=Cd;t.forceCenter=zd;t.forceCollide=Id;t.forceLink=Dd;t.forceManyBody=Hd;t.forceSimulation=jd;t.forceX=Xd;t.forceY=Vd;t.drag=e_;t.dragDisable=Zd;t.dragEnable=Gd;t.voronoi=X_;t.zoom=ey;t.zoomIdentity=Z_;t.zoomTransform=G_;t.brush=Sy;t.brushX=Ty;t.brushY=Ny;t.brushSelection=ky;t.geoArea=wg;t.geoBounds=Jg;t.geoCentroid=Tm;t.geoCircle=Im;t.geoClipExtent=Vm;t.geoDistance=ax;t.geoGraticule=fx;t.geoInterpolate=cx;t.geoLength=ex;t.geoPath=tw;t.geoAlbers=Tw;t.geoAlbersUsa=Sw;t.geoAzimuthalEqualArea=zw;t.geoAzimuthalEquidistant=Lw;t.geoConicConformal=Ow;t.geoConicEqualArea=kw;t.geoConicEquidistant=jw;t.geoEquirectangular=Yw;t.geoGnomonic=Xw;t.geoProjection=xw;t.geoProjectionMutator=ww;t.geoMercator=Uw;t.geoOrthographic=Ww;t.geoStereographic=Zw;t.geoTransverseMercator=Jw;t.geoRotation=Lm;t.geoStream=fg;t.geoTransform=lw;Object.defineProperty(t,"__esModule",{value:true})});