(s=t.charCodeAt(i))||s>57){O=(46===s?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!h&&(t=r(t,1/0));var E=d.length+t.length+O.length,M=E>1)+d+t+O+M.slice(E);break;default:t=M+d+t+O}return u(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),O.toString=function(){return t+""},O}return{format:l,formatPrefix:function(t,e){var n=l(((t=Vc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(zc(e)/3))),i=Math.pow(10,-r),o=tf[8+r/3];return function(t){return n(i*t)+o}}}};function nf(t){return Gc=ef(t),Kc=Gc.format,Yc=Gc.formatPrefix,Gc}nf({thousands:",",grouping:[3],currency:["$",""]});var rf=function(t){return Math.max(0,-zc(Math.abs(t)))},of=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zc(e)/3)))-zc(Math.abs(t)))},af=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,zc(e)-zc(t))+1},uf=1e-6,sf=1e-12,cf=Math.PI,ff=cf/2,lf=cf/4,df=2*cf,hf=180/cf,pf=cf/180,gf=Math.abs,mf=Math.atan,bf=Math.atan2,vf=Math.cos,yf=Math.ceil,_f=Math.exp,wf=(Math.floor,Math.hypot),Sf=Math.log,Of=Math.pow,xf=Math.sin,Ef=Math.sign||function(t){return t>0?1:t<0?-1:0},Mf=Math.sqrt,Tf=Math.tan;function $f(t){return t>1?0:t<-1?cf:Math.acos(t)}function Af(t){return t>1?ff:t<-1?-ff:Math.asin(t)}function kf(t){return(t=xf(t/2))*t}function Cf(){}function If(t,e){t&&Nf.hasOwnProperty(t.type)&&Nf[t.type](t,e)}var Pf={Feature:function(t,e){If(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=vf(e=(e*=pf)/2+lf),a=xf(e),u=Uf*a,s=Bf*o+u*vf(i),c=u*r*xf(i);Hf.add(bf(c,s)),Ff=t,Bf=o,Uf=a}var Zf,Qf,Xf,Jf,tl,el,nl,rl,il,ol,al,ul=function(t){return Vf=new C,zf(t,qf),2*Vf};function sl(t){return[bf(t[1],t[0]),Af(t[2])]}function cl(t){var e=t[0],n=t[1],r=vf(n);return[r*vf(e),r*xf(e),xf(n)]}function fl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ll(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function dl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function hl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function pl(t){var e=Mf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var gl={point:ml,lineStart:vl,lineEnd:yl,polygonStart:function(){gl.point=_l,gl.lineStart=wl,gl.lineEnd=Sl,il=new C,qf.polygonStart()},polygonEnd:function(){qf.polygonEnd(),gl.point=ml,gl.lineStart=vl,gl.lineEnd=yl,Hf<0?(Zf=-(Xf=180),Qf=-(Jf=90)):il>uf?Jf=90:il<-1e-6&&(Qf=-90),al[0]=Zf,al[1]=Xf},sphere:function(){Zf=-(Xf=180),Qf=-(Jf=90)}};function ml(t,e){ol.push(al=[Zf=t,Xf=t]),eJf&&(Jf=e)}function bl(t,e){var n=cl([t*pf,e*pf]);if(rl){var r=ll(rl,n),i=ll([r[1],-r[0],0],r);pl(i),i=sl(i);var o,a=t-tl,u=a>0?1:-1,s=i[0]*hf*u,c=gf(a)>180;c^(u*tlJf&&(Jf=o):c^(u*tl<(s=(s+360)%360-180)&&sJf&&(Jf=e)),c?tOl(Zf,Xf)&&(Xf=t):Ol(t,Xf)>Ol(Zf,Xf)&&(Zf=t):Xf>=Zf?(tXf&&(Xf=t)):t>tl?Ol(Zf,t)>Ol(Zf,Xf)&&(Xf=t):Ol(t,Xf)>Ol(Zf,Xf)&&(Zf=t)}else ol.push(al=[Zf=t,Xf=t]);eJf&&(Jf=e),rl=n,tl=t}function vl(){gl.point=bl}function yl(){al[0]=Zf,al[1]=Xf,gl.point=ml,rl=null}function _l(t,e){if(rl){var n=t-tl;il.add(gf(n)>180?n+(n>0?360:-360):n)}else el=t,nl=e;qf.point(t,e),bl(t,e)}function wl(){qf.lineStart()}function Sl(){_l(el,nl),qf.lineEnd(),gf(il)>uf&&(Zf=-(Xf=180)),al[0]=Zf,al[1]=Xf,rl=null}function Ol(t,e){return(e-=t)<0?e+360:e}function xl(t,e){return t[0]-e[0]}function El(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eOl(r[0],r[1])&&(r[1]=i[1]),Ol(i[0],r[1])>Ol(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(u=Ol(r[1],i[0]))>a&&(a=u,Zf=i[0],Xf=r[1])}return ol=al=null,Zf===1/0||Qf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zf,Qf],[Xf,Jf]]},Hl={sphere:Cf,point:Vl,lineStart:Wl,lineEnd:Yl,polygonStart:function(){Hl.lineStart=Zl,Hl.lineEnd=Ql},polygonEnd:function(){Hl.lineStart=Wl,Hl.lineEnd=Yl}};function Vl(t,e){t*=pf;var n=vf(e*=pf);ql(n*vf(t),n*xf(t),xf(e))}function ql(t,e,n){++Ml,$l+=(t-$l)/Ml,Al+=(e-Al)/Ml,kl+=(n-kl)/Ml}function Wl(){Hl.point=Gl}function Gl(t,e){t*=pf;var n=vf(e*=pf);Fl=n*vf(t),Bl=n*xf(t),Ul=xf(e),Hl.point=Kl,ql(Fl,Bl,Ul)}function Kl(t,e){t*=pf;var n=vf(e*=pf),r=n*vf(t),i=n*xf(t),o=xf(e),a=bf(Mf((a=Bl*o-Ul*i)*a+(a=Ul*r-Fl*o)*a+(a=Fl*i-Bl*r)*a),Fl*r+Bl*i+Ul*o);Tl+=a,Cl+=a*(Fl+(Fl=r)),Il+=a*(Bl+(Bl=i)),Pl+=a*(Ul+(Ul=o)),ql(Fl,Bl,Ul)}function Yl(){Hl.point=Vl}function Zl(){Hl.point=Xl}function Ql(){Jl(Dl,Ll),Hl.point=Vl}function Xl(t,e){Dl=t,Ll=e,t*=pf,e*=pf,Hl.point=Jl;var n=vf(e);Fl=n*vf(t),Bl=n*xf(t),Ul=xf(e),ql(Fl,Bl,Ul)}function Jl(t,e){t*=pf;var n=vf(e*=pf),r=n*vf(t),i=n*xf(t),o=xf(e),a=Bl*o-Ul*i,u=Ul*r-Fl*o,s=Fl*i-Bl*r,c=wf(a,u,s),f=Af(c),l=c&&-f/c;Nl.add(l*a),Rl.add(l*u),jl.add(l*s),Tl+=f,Cl+=f*(Fl+(Fl=r)),Il+=f*(Bl+(Bl=i)),Pl+=f*(Ul+(Ul=o)),ql(Fl,Bl,Ul)}var td=function(t){Ml=Tl=$l=Al=kl=Cl=Il=Pl=0,Nl=new C,Rl=new C,jl=new C,zf(t,Hl);var e=+Nl,n=+Rl,r=+jl,i=wf(e,n,r);return icf?t+Math.round(-t/df)*df:t,e]}function id(t,e,n){return(t%=df)?e||n?nd(ad(t),ud(e,n)):ad(t):e||n?ud(e,n):rd}function od(t){return function(e,n){return[(e+=t)>cf?e-df:e<-cf?e+df:e,n]}}function ad(t){var e=od(t);return e.invert=od(-t),e}function ud(t,e){var n=vf(t),r=xf(t),i=vf(e),o=xf(e);function a(t,e){var a=vf(e),u=vf(t)*a,s=xf(t)*a,c=xf(e),f=c*n+u*r;return[bf(s*i-f*o,u*n-c*r),Af(f*i+s*o)]}return a.invert=function(t,e){var a=vf(e),u=vf(t)*a,s=xf(t)*a,c=xf(e),f=c*i-s*o;return[bf(s*i+c*o,u*n+f*r),Af(f*n-u*r)]},a}rd.invert=rd;var sd=function(t){function e(e){return(e=t(e[0]*pf,e[1]*pf))[0]*=hf,e[1]*=hf,e}return t=id(t[0]*pf,t[1]*pf,t.length>2?t[2]*pf:0),e.invert=function(e){return(e=t.invert(e[0]*pf,e[1]*pf))[0]*=hf,e[1]*=hf,e},e};function cd(t,e,n,r,i,o){if(n){var a=vf(e),u=xf(e),s=r*n;null==i?(i=e+r*df,o=e-s/2):(i=fd(a,i),o=fd(a,o),(r>0?io)&&(i+=r*df));for(var c,f=i;r>0?f>o:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},hd=function(t,e){return gf(t[0]-e[0])=0;--o)i.point((f=c[o])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,h=!h}while(!d.v);i.lineEnd()}}};function md(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,M=E*x,T=M>cf,$=m*S;if(s.add(bf($*E*xf(M),b*O+$*vf(M))),a+=T?x+E*df:x,T^p>=n^_>=n){var A=ll(cl(h),cl(y));pl(A);var k=ll(o,A);pl(k);var I=(T^x>=0?-1:1)*Af(k[2]);(r>I||r===I&&(A[0]||A[1]))&&(u+=T^x>=0?1:-1)}}return(a<-1e-6||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&s&&d.push(d.pop().concat(d.shift())),a.push(d.filter(_d))}return d}};function _d(t){return t.length>1}function wd(t,e){return((t=t.x)[0]<0?t[1]-ff-uf:ff-t[1])-((e=e.x)[0]<0?e[1]-ff-uf:ff-e[1])}var Sd=yd((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var u=o>0?cf:-cf,s=gf(o-n);gf(s-cf)0?ff:-ff),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),e=0):i!==u&&s>=cf&&(gf(n-i)uf?mf((xf(e)*(o=vf(r))*xf(n)-xf(r)*(i=vf(e))*xf(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=o,r=a),i=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*ff,r.point(-cf,i),r.point(0,i),r.point(cf,i),r.point(cf,0),r.point(cf,-i),r.point(0,-i),r.point(-cf,-i),r.point(-cf,0),r.point(-cf,i);else if(gf(t[0]-e[0])>uf){var o=t[0]0,i=gf(e)>uf;function o(t,n){return vf(t)*vf(n)>e}function a(t,n,r){var i=[1,0,0],o=ll(cl(t),cl(n)),a=fl(o,o),u=o[0],s=a-u*u;if(!s)return!r&&t;var c=e*a/s,f=-e*u/s,l=ll(i,o),d=hl(i,c);dl(d,hl(o,f));var h=l,p=fl(d,h),g=fl(h,h),m=p*p-g*(fl(d,d)-1);if(!(m<0)){var b=Mf(m),v=hl(h,(-p-b)/g);if(dl(v,d),v=sl(v),!r)return v;var y,_=t[0],w=n[0],S=t[1],O=n[1];w<_&&(y=_,_=w,w=y);var x=w-_,E=gf(x-cf)0^v[1]<(gf(v[0]-_)cf^(_<=v[0]&&v[0]<=w)){var M=hl(h,(-p+b)/g);return dl(M,d),[v,sl(M)]}}}function u(e,n){var i=r?t:cf-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return yd(o,(function(t){var e,n,s,c,f;return{lineStart:function(){c=s=!1,f=1},point:function(l,d){var h,p=[l,d],g=o(l,d),m=r?g?0:u(l,d):g?u(l+(l<0?cf:-cf),d):0;if(!e&&(c=s=g)&&t.lineStart(),g!==s&&(!(h=a(e,p))||hd(e,h)||hd(p,h))&&(p[2]=1),g!==s)f=0,g?(t.lineStart(),h=a(p,e),t.point(h[0],h[1])):(h=a(e,p),t.point(h[0],h[1],2),t.lineEnd()),e=h;else if(i&&e&&r^g){var b;m&n||!(b=a(p,e,!0))||(f=0,r?(t.lineStart(),t.point(b[0][0],b[0][1]),t.point(b[1][0],b[1][1]),t.lineEnd()):(t.point(b[1][0],b[1][1]),t.lineEnd(),t.lineStart(),t.point(b[0][0],b[0][1],3)))}!g||e&&hd(e,p)||t.point(p[0],p[1]),e=p,s=g,n=m},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return f|(c&&s)<<1}}}),(function(e,r,i,o){cd(o,t,n,i,e,r)}),r?[0,-t]:[-cf,t-cf])},xd=1e9,Ed=-xd;function Md(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,u,c){var f=0,l=0;if(null==i||(f=a(i,u))!==(l=a(o,u))||s(i,o)<0^u>0)do{c.point(0===f||3===f?t:n,f>1?r:e)}while((f=(f+u+4)%4)!==l);else c.point(o[0],o[1])}function a(r,i){return gf(r[0]-t)0?0:3:gf(r[0]-n)0?2:1:gf(r[1]-e)0?1:0:i>0?3:2}function u(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,c,f,l,d,h,p,g,m,b,v,y=a,_=dd(),w={point:S,lineStart:function(){w.point=O,c&&c.push(f=[]);b=!0,m=!1,p=g=NaN},lineEnd:function(){s&&(O(l,d),h&&m&&_.rejoin(),s.push(_.result()));w.point=S,m&&y.lineEnd()},polygonStart:function(){y=_,s=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;nr&&(d-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(d-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=v&&e,i=(s=At(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&gd(s,u,e,o,a),a.polygonEnd());y=a,s=c=f=null}};function S(t,e){i(t,e)&&y.point(t,e)}function O(o,a){var u=i(o,a);if(c&&f.push([o,a]),b)l=o,d=a,h=u,b=!1,u&&(y.lineStart(),y.point(o,a));else if(u&&m)y.point(o,a);else{var s=[p=Math.max(Ed,Math.min(xd,p)),g=Math.max(Ed,Math.min(xd,g))],_=[o=Math.max(Ed,Math.min(xd,o)),a=Math.max(Ed,Math.min(xd,a))];!function(t,e,n,r,i,o){var a,u=t[0],s=t[1],c=0,f=1,l=e[0]-u,d=e[1]-s;if(a=n-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>f)return;a>c&&(c=a)}else if(l>0){if(a0)){if(a/=d,d<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>c&&(c=a)}else if(d>0){if(a0&&(t[0]=u+c*l,t[1]=s+c*d),f<1&&(e[0]=u+f*l,e[1]=s+f*d),!0}}}}}(s,_,t,e,n,r)?u&&(y.lineStart(),y.point(o,a),v=!1):(m||(y.lineStart(),y.point(s[0],s[1])),y.point(_[0],_[1]),u||y.lineEnd(),v=!1)}p=o,g=a,m=u}return w}}var Td,$d,Ad,kd,Cd=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Md(r,i,o,a)(e=n)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=e=null,n):[[r,i],[o,a]]}}},Id={sphere:Cf,point:Cf,lineStart:function(){Id.point=Nd,Id.lineEnd=Pd},lineEnd:Cf,polygonStart:Cf,polygonEnd:Cf};function Pd(){Id.point=Id.lineEnd=Cf}function Nd(t,e){$d=t*=pf,Ad=xf(e*=pf),kd=vf(e),Id.point=Rd}function Rd(t,e){t*=pf;var n=xf(e*=pf),r=vf(e),i=gf(t-$d),o=vf(i),a=r*xf(i),u=kd*n-Ad*r*o,s=Ad*n+kd*r*o;Td.add(bf(Mf(a*a+u*u),s)),$d=t,Ad=n,kd=r}var jd=function(t){return Td=new C,zf(t,Id),+Td},Dd=[null,null],Ld={type:"LineString",coordinates:Dd},Fd=function(t,e){return Dd[0]=t,Dd[1]=e,jd(Ld)},Bd={Feature:function(t,e){return zd(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Fd(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))uf})).map(s)).concat(Pt(yf(o/h)*h,i,h).filter((function(t){return gf(t%g)>uf})).map(c))}return b.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(l(a).slice(1),f(n).reverse().slice(1),l(u).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),u>a&&(t=u,u=a,a=t),b.precision(m)):[[r,u],[n,a]]},b.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),b.precision(m)):[[e,o],[t,i]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],b):[p,g]},b.stepMinor=function(t){return arguments.length?(d=+t[0],h=+t[1],b):[d,h]},b.precision=function(d){return arguments.length?(m=+d,s=Yd(o,i,90),c=Zd(e,t,m),f=Yd(u,a,90),l=Zd(r,n,m),b):m},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Xd(){return Qd()()}var Jd,th,eh,nh,rh=function(t,e){var n=t[0]*pf,r=t[1]*pf,i=e[0]*pf,o=e[1]*pf,a=vf(r),u=xf(r),s=vf(o),c=xf(o),f=a*vf(n),l=a*xf(n),d=s*vf(i),h=s*xf(i),p=2*Af(Mf(kf(o-r)+a*s*kf(i-n))),g=xf(p),m=p?function(t){var e=xf(t*=p)/g,n=xf(p-t)/g,r=n*f+e*d,i=n*l+e*h,o=n*u+e*c;return[bf(i,r)*hf,bf(o,Mf(r*r+i*i))*hf]}:function(){return[n*hf,r*hf]};return m.distance=p,m},ih=function(t){return t},oh=new C,ah=new C,uh={point:Cf,lineStart:Cf,lineEnd:Cf,polygonStart:function(){uh.lineStart=sh,uh.lineEnd=lh},polygonEnd:function(){uh.lineStart=uh.lineEnd=uh.point=Cf,oh.add(gf(ah)),ah=new C},result:function(){var t=oh/2;return oh=new C,t}};function sh(){uh.point=ch}function ch(t,e){uh.point=fh,Jd=eh=t,th=nh=e}function fh(t,e){ah.add(nh*t-eh*e),eh=t,nh=e}function lh(){fh(Jd,th)}var dh=uh,hh=1/0,ph=hh,gh=-hh,mh=gh;var bh,vh,yh,_h,wh={point:function(t,e){tgh&&(gh=t);emh&&(mh=e)},lineStart:Cf,lineEnd:Cf,polygonStart:Cf,polygonEnd:Cf,result:function(){var t=[[hh,ph],[gh,mh]];return gh=mh=-(ph=hh=1/0),t}},Sh=0,Oh=0,xh=0,Eh=0,Mh=0,Th=0,$h=0,Ah=0,kh=0,Ch={point:Ih,lineStart:Ph,lineEnd:jh,polygonStart:function(){Ch.lineStart=Dh,Ch.lineEnd=Lh},polygonEnd:function(){Ch.point=Ih,Ch.lineStart=Ph,Ch.lineEnd=jh},result:function(){var t=kh?[$h/kh,Ah/kh]:Th?[Eh/Th,Mh/Th]:xh?[Sh/xh,Oh/xh]:[NaN,NaN];return Sh=Oh=xh=Eh=Mh=Th=$h=Ah=kh=0,t}};function Ih(t,e){Sh+=t,Oh+=e,++xh}function Ph(){Ch.point=Nh}function Nh(t,e){Ch.point=Rh,Ih(yh=t,_h=e)}function Rh(t,e){var n=t-yh,r=e-_h,i=Mf(n*n+r*r);Eh+=i*(yh+t)/2,Mh+=i*(_h+e)/2,Th+=i,Ih(yh=t,_h=e)}function jh(){Ch.point=Ih}function Dh(){Ch.point=Fh}function Lh(){Bh(bh,vh)}function Fh(t,e){Ch.point=Bh,Ih(bh=yh=t,vh=_h=e)}function Bh(t,e){var n=t-yh,r=e-_h,i=Mf(n*n+r*r);Eh+=i*(yh+t)/2,Mh+=i*(_h+e)/2,Th+=i,$h+=(i=_h*t-yh*e)*(yh+t),Ah+=i*(_h+e),kh+=3*i,Ih(yh=t,_h=e)}var Uh=Ch;function zh(t){this._context=t}zh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,df)}},result:Cf};var Hh,Vh,qh,Wh,Gh,Kh=new C,Yh={point:Cf,lineStart:function(){Yh.point=Zh},lineEnd:function(){Hh&&Qh(Vh,qh),Yh.point=Cf},polygonStart:function(){Hh=!0},polygonEnd:function(){Hh=null},result:function(){var t=+Kh;return Kh=new C,t}};function Zh(t,e){Yh.point=Qh,Vh=Wh=t,qh=Gh=e}function Qh(t,e){Wh-=t,Gh-=e,Kh.add(Mf(Wh*Wh+Gh*Gh)),Wh=t,Gh=e}var Xh=Yh;function Jh(){this._string=[]}function tp(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jh.prototype={_radius:4.5,_circle:tp(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tp(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ep=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),zf(t,n(r))),r.result()}return o.area=function(t){return zf(t,n(dh)),dh.result()},o.measure=function(t){return zf(t,n(Xh)),Xh.result()},o.bounds=function(t){return zf(t,n(wh)),wh.result()},o.centroid=function(t){return zf(t,n(Uh)),Uh.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Jh):new zh(e=t),"function"!==typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"===typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},np=function(t){return{stream:rp(t)}};function rp(t){return function(e){var n=new ip;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ip(){}function op(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),zf(n,t.stream(wh)),e(wh.result()),null!=r&&t.clipExtent(r),t}function ap(t,e,n){return op(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,u])}),n)}function up(t,e,n){return ap(t,[[0,0],e],n)}function sp(t,e,n){return op(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function cp(t,e,n){return op(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}ip.prototype={constructor:ip,point:function(t,e){this.stream.point(t,e)},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 fp=vf(30*pf),lp=function(t,e){return+e?function(t,e){function n(r,i,o,a,u,s,c,f,l,d,h,p,g,m){var b=c-r,v=f-i,y=b*b+v*v;if(y>4*e&&g--){var _=a+d,w=u+h,S=s+p,O=Mf(_*_+w*w+S*S),x=Af(S/=O),E=gf(gf(S)-1)e||gf((b*A+v*k)/y-.5)>.3||a*d+u*h+s*p2?t[2]%360*pf:0,A()):[m*hf,b*hf,v*hf]},T.angle=function(t){return arguments.length?(y=t%360*pf,A()):y*hf},T.reflectX=function(t){return arguments.length?(_=t?-1:1,A()):_<0},T.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},T.precision=function(t){return arguments.length?(a=lp(u,M=t*t),k()):Mf(M)},T.fitExtent=function(t,e){return ap(T,t,e)},T.fitSize=function(t,e){return up(T,t,e)},T.fitWidth=function(t,e){return sp(T,t,e)},T.fitHeight=function(t,e){return cp(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&$,A()}}function mp(t){var e=0,n=cf/3,r=gp(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*pf,n=t[1]*pf):[e*hf,n*hf]},i}function bp(t,e){var n=xf(t),r=(n+xf(e))/2;if(gf(r)=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},f.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i0?e<-ff+uf&&(e=-ff+uf):e>ff-uf&&(e=ff-uf);var n=i/Of(kp(e),r);return[n*xf(r*t),i-n*vf(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ef(r)*Mf(t*t+n*n),a=bf(t,gf(n))*Ef(n);return n*r<0&&(a-=cf*Ef(t)*Ef(n)),[a/r,2*mf(Of(i/o,1/r))-ff]},o}var Ip=function(){return mp(Cp).scale(109.5).parallels([30,30])};function Pp(t,e){return[t,e]}Pp.invert=Pp;var Np=function(){return pp(Pp).scale(152.63)};function Rp(t,e){var n=vf(t),r=t===e?xf(t):(n-vf(e))/(e-t),i=n/r+t;if(gf(r)uf&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Kp=function(){return pp(Gp).scale(175.295)};function Yp(t,e){return[vf(e)*xf(t),xf(e)]}Yp.invert=Sp(Af);var Zp=function(){return pp(Yp).scale(249.5).clipAngle(90.000001)};function Qp(t,e){var n=vf(e),r=1+vf(t)*n;return[n*xf(t)/r,xf(e)/r]}Qp.invert=Sp((function(t){return 2*mf(t)}));var Xp=function(){return pp(Qp).scale(250).clipAngle(142)};function Jp(t,e){return[Sf(Tf((ff+e)/2)),-t]}Jp.invert=function(t,e){return[-e,2*mf(_f(t))-ff]};var tg=function(){var t=Ap(Jp),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function eg(t,e){return t.parent===e.parent?1:2}function ng(t,e){return t+e.x}function rg(t,e){return Math.max(t,e.y)}var ig=function(){var t=eg,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ng,0)/t.length}(n),e.y=function(t){return 1+t.reduce(rg,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var u=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=u.x-t(u,s)/2,f=s.x+t(s,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(f-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function og(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}var ag=u.a.mark(ug);function ug(){var t,e,n,r,i,o;return u.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=[t=this];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){a.next=8;break}return a.next=5,t;case 5:if(r=t.children)for(i=0,o=r.length;i=0;--o)s.push(r=i[o]=new hg(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(dg)}function cg(t){return t.children}function fg(t){return Array.isArray(t)?t[1]:null}function lg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function dg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function hg(t){this.data=t,this.depth=this.height=0,this.parent=null}hg.prototype=sg.prototype=Object(xe.a)({constructor:hg,count:function(){return this.eachAfter(og)},each:function(t,e){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.call(e,o,++r,this)}}catch(a){i.e(a)}finally{i.f()}return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],u=[],s=-1;o=a.pop();)if(u.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(t.call(e,o,++r,this))return o}}catch(a){i.e(a)}finally{i.f()}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return sg(this).eachBefore(lg)}},Symbol.iterator,ug);var pg=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r0&&n*n>r*r+i*i}function vg(t,e){for(var n=0;n(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*u-o*s,n.y=t.y-r*s+o*u):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*u-o*s,n.y=e.y+r*s+o*u)):(n.x=e.x+n.r,n.y=e.y)}function Og(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function xg(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Eg(t){this._=t,this.next=null,this.previous=null}function Mg(t){if(!(o=(e=t,t="object"===typeof e&&"length"in e?e:Array.from(e)).length))return 0;var e,n,r,i,o,a,u,s,c,f,l,d;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Sg(r,n,i=t[2]),n=new Eg(n),r=new Eg(r),i=new Eg(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(s=3;s0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=Ag(e),n):t},n.parentId=function(t){return arguments.length?(e=Ag(t),n):e},n};function qg(t,e){return t.parent===e.parent?1:2}function Wg(t){var e=t.children;return e?e[0]:t.t}function Gg(t){var e=t.children;return e?e[e.length-1]:t.t}function Kg(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Yg(t,e,n){return t.a.parent===e.parent?t.a:n}function Zg(t,e){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=e}Zg.prototype=Object.create(hg.prototype);var Qg=function(){var t=qg,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new Zg(t,0),u=[a];e=u.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(n=e.children[i]=new Zg(r[i],i)),n.parent=e;return(a.parent=new Zg(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(u);else{var c=i,f=i,l=i;i.eachBefore((function(t){t.xf.x&&(f=t),t.depth>l.depth&&(l=t)}));var d=c===f?1:t(c,f)/2,h=d-c.x,p=e/(f.x+d+h),g=n/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+h)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,u=n,s=o.parent.children[0],c=o.m,f=a.m,l=u.m,d=s.m;u=Gg(u),o=Wg(o),u&&o;)s=Wg(s),(a=Gg(a)).a=e,(i=u.z+l-o.z-c+t(u._,o._))>0&&(Kg(Yg(u,e,r),e,i),c+=i,f+=i),l+=u.m,c+=o.m,d+=s.m,f+=a.m;u&&!Gg(a)&&(a.t=u,a.m+=l-f),o&&!Wg(s)&&(s.t=o,s.m+=c-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Xg=function(t,e,n,r,i){for(var o,a=t.children,u=-1,s=a.length,c=t.value&&(i-n)/t.value;++ud&&(d=u),m=f*f*g,(h=Math.max(d/m,m/l))>p){f-=u;break}p=h}b.push(a={value:f,dice:s1?e:1)},n}(Jg),nm=function(){var t=em,e=!1,n=1,r=1,i=[0],o=kg,a=kg,u=kg,s=kg,c=kg;function f(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(l),i=[0],e&&t.eachBefore(Dg),t}function l(e){var n=i[e.depth],r=e.x0+n,f=e.y0+n,l=e.x1-n,d=e.y1-n;l=n-1){var f=u[e];return f.x0=i,f.y0=o,f.x1=a,void(f.y1=s)}var l=c[e],d=r/2+l,h=e+1,p=n-1;for(;h>>1;c[g]s-o){var v=r?(i*b+a*m)/r:a;t(e,h,m,i,o,v,s),t(h,n,b,v,o,a,s)}else{var y=r?(o*b+s*m)/r:s;t(e,h,m,i,o,a,y),t(h,n,b,i,y,a,s)}}(0,s,t.value,e,n,r,i)},im=function(t,e,n,r,i){(1&t.depth?Xg:Lg)(t,e,n,r,i)},om=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,u,s,c,f,l=-1,d=a.length,h=t.value;++l1?e:1)},n}(Jg),am=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},um=function(t,e){var n=kr(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},sm=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}};function cm(t){return((t=Math.exp(t))+1/t)/2}var fm=function t(e,n,r){function i(t,i){var o,a,u=t[0],s=t[1],c=t[2],f=i[0],l=i[1],d=i[2],h=f-u,p=l-s,g=h*h+p*p;if(g<1e-12)a=Math.log(d/c)/e,o=function(t){return[u+t*h,s+t*p,c*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),b=(d*d-c*c+r*g)/(2*c*n*m),v=(d*d-c*c-r*g)/(2*d*n*m),y=Math.log(Math.sqrt(b*b+1)-b),_=Math.log(Math.sqrt(v*v+1)-v);a=(_-y)/e,o=function(t){var r,i=t*a,o=cm(y),f=c/(n*m)*(o*(r=e*i+y,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[u+f*h,s+f*p,c*o/cm(e*i+y)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function lm(t){return function(e,n){var r=t((e=Sr(e)).h,(n=Sr(n)).h),i=Ir(e.s,n.s),o=Ir(e.l,n.l),a=Ir(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var dm=lm(kr),hm=lm(Ir);function pm(t,e){var n=Ir((t=Na(t)).l,(e=Na(e)).l),r=Ir(t.a,e.a),i=Ir(t.b,e.b),o=Ir(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function gm(t){return function(e,n){var r=t((e=za(e)).h,(n=za(n)).h),i=Ir(e.c,n.c),o=Ir(e.l,n.l),a=Ir(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var mm=gm(kr),bm=gm(Ir);function vm(t){return function e(n){function r(e,r){var i=t((e=tu(e)).h,(r=tu(r)).h),o=Ir(e.s,r.s),a=Ir(e.l,r.l),u=Ir(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}var ym=vm(kr),_m=vm(Ir);function wm(t,e){void 0===e&&(e=t,t=Yr);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&(n=t[a[u-2]],r=t[a[u-1]],i=t[e],(r[0]-n[0])*(i[1]-n[1])-(r[1]-n[1])*(i[0]-n[0])<=0);)--u;a[u++]=e}return a.slice(0,u)}var Tm=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)c.push(t[r[o[e]][2]]);for(e=+u;eu!==c>u&&a<(s-n)*(u-r)/(c-r)+n&&(f=!f),s=n,c=r;return f},Am=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],s=0;++r1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(km),Nm=function t(e){var n=Pm.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(km),Rm=function t(e){function n(t){return(t=+t)<=0?function(){return 0}:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(km),jm=function t(e){var n=Rm.source(e);function r(t){if(0===(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(km),Dm=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(km),Lm=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(km),Fm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(km),Bm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?function(){return 1/0}:1===t?function(){return 1}:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(km),Um=function t(e){var n=Pm.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return function(){return 0};if(r=null==r?1:+r,1===t)return function(){return-Math.log1p(-e())*r};var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?function(){return Math.pow(e(),1/t)}:function(){return 1};return function(){do{do{var t=n(),u=1+o*t}while(u<=0);u*=u*u;var s=1-e()}while(s>=1-.0331*t*t*t*t&&Math.log(s)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(km),zm=function t(e){var n=Um.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(km),Hm=function t(e){var n=Bm.source(e),r=zm.source(e);function i(t,e){return t=+t,(e=+e)>=1?function(){return t}:e<=0?function(){return 0}:function(){for(var i=0,o=t,a=e;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),s=r(u,o-u+1)();s<=a?(i+=u,o-=u,a=(a-s)/(1-s)):(o=u-1,a/=s)}for(var c=a<.5,f=n(c?a:1-a),l=f(),d=0;l<=o;++d)l+=f();return i+(c?d:o-d)}}return i.source=t,i}(km),Vm=function t(e){function n(t,n,r){var i;return 0===(t=+t)?i=function(t){return-Math.log(t)}:(t=1/t,i=function(e){return Math.pow(e,t)}),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(km),qm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(km),Wm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(km),Gm=function t(e){var n=Um.source(e),r=Hm.source(e);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=n(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var s=-Math.log1p(-e()),c=0;s<=o;++c)s-=Math.log1p(-e());return i+c}}return i.source=t,i}(km),Km=1664525,Ym=1013904223,Zm=1/4294967296;function Qm(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Math.random(),e=0|(0<=t&&t<1?t/Zm:Math.abs(t));return function(){return Zm*((e=Km*e+Ym|0)>>>0)}}function Xm(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Jm(t,e){switch(arguments.length){case 0:break;case 1:"function"===typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"===typeof e?this.interpolator(e):this.range(e)}return this}var tb=Symbol("implicit");function eb(){var t=new Map,e=[],n=[],r=tb;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==tb)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;var r,o=Object(s.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=a+"";t.has(u)||t.set(u,e.push(a))}}catch(c){o.e(c)}finally{o.f()}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return eb(e,n).unknown(r)},Xm.apply(i,arguments),i}function nb(){var t,e,n=eb().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,u=!1,s=0,c=0,f=.5;function l(){var n=r().length,l=ae&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(a[0],a[t-1])),r=t>2?fb:cb,i=o=null,l}function l(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),u,s)))(t(c(e)))}return l.invert=function(n){return c(e((o||(o=r(u,a.map(t),zr)))(n)))},l.domain=function(t){return arguments.length?(a=Array.from(t,ob),f()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),f()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),s=sm,f()},l.clamp=function(t){return arguments.length?(c=!!t||ub,f()):c!==ub},l.interpolate=function(t){return arguments.length?(s=t,f()):s},l.unknown=function(t){return arguments.length?(n=t,l):n},function(n,r){return t=n,e=r,f()}}function hb(){return db()(ub,ub)}function pb(t,e,n,r){var i,o=dt(t,e,n);switch((r=Vc(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=of(o,a))||(r.precision=i),Yc(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=af(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rf(o))||(r.precision=i-2*("%"===r.type))}return Kc(r)}function gb(t){var e=t.domain;return t.ticks=function(t){var n=e();return ft(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return pb(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,u=o.length-1,s=o[a],c=o[u],f=10;for(c0;){if((i=lt(s,c,n))===r)return o[a]=s,o[u]=c,e(o);if(i>0)s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function mb(){var t=hb();return t.copy=function(){return lb(t,mb())},Xm.apply(t,arguments),gb(t)}function bb(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,ob),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return bb(t).unknown(e)},t=arguments.length?Array.from(t,ob):[0,1],gb(n)}function vb(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0){for(;d<=h;++d)for(f=1,c=n(d);fs)break;g.push(l)}}else for(;d<=h;++d)for(f=o-1,c=n(d);f>=1;--f)if(!((l=c*f)s)break;g.push(l)}2*g.length0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Ub().domain([e,n]).range(o).unknown(t)},Xm.apply(gb(a),arguments)}function zb(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[m(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return zb().domain(e).range(n).unknown(t)},Xm.apply(i,arguments)}var Hb=new Date,Vb=new Date;function qb(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return u;do{u.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Hb.setTime(+e),Vb.setTime(+r),t(Hb),t(Vb),Math.floor(n(Hb,Vb))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t===0}:function(e){return i.count(0,e)%t===0}):i:null}),i}var Wb=qb((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wb.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qb((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Gb=Wb,Kb=Wb.range,Yb=qb((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Zb=Yb,Qb=Yb.range,Xb=1e3,Jb=6e4,tv=36e5,ev=864e5,nv=6048e5;function rv(t){return qb((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jb)/nv}))}var iv=rv(0),ov=rv(1),av=rv(2),uv=rv(3),sv=rv(4),cv=rv(5),fv=rv(6),lv=iv.range,dv=ov.range,hv=av.range,pv=uv.range,gv=sv.range,mv=cv.range,bv=fv.range,vv=qb((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jb)/ev}),(function(t){return t.getDate()-1})),yv=vv,_v=vv.range,wv=qb((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb-t.getMinutes()*Jb)}),(function(t,e){t.setTime(+t+e*tv)}),(function(t,e){return(e-t)/tv}),(function(t){return t.getHours()})),Sv=wv,Ov=wv.range,xv=qb((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb)}),(function(t,e){t.setTime(+t+e*Jb)}),(function(t,e){return(e-t)/Jb}),(function(t){return t.getMinutes()})),Ev=xv,Mv=xv.range,Tv=qb((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*Xb)}),(function(t,e){return(e-t)/Xb}),(function(t){return t.getUTCSeconds()})),$v=Tv,Av=Tv.range,kv=qb((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));kv.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qb((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):kv:null};var Cv=kv,Iv=kv.range;function Pv(t){return qb((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/nv}))}var Nv=Pv(0),Rv=Pv(1),jv=Pv(2),Dv=Pv(3),Lv=Pv(4),Fv=Pv(5),Bv=Pv(6),Uv=Nv.range,zv=Rv.range,Hv=jv.range,Vv=Dv.range,qv=Lv.range,Wv=Fv.range,Gv=Bv.range,Kv=qb((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ev}),(function(t){return t.getUTCDate()-1})),Yv=Kv,Zv=Kv.range,Qv=qb((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Qv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qb((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Xv=Qv,Jv=Qv.range;function ty(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ey(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ny(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ry(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,s=t.shortMonths,c=gy(i),f=my(i),l=gy(o),d=my(o),h=gy(a),p=my(a),g=gy(u),m=my(u),b=gy(s),v=my(s),y={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Dy,e:Dy,f:zy,g:Jy,G:e_,H:Ly,I:Fy,j:By,L:Uy,m:Hy,M:Vy,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:x_,s:E_,S:qy,u:Wy,U:Gy,V:Yy,w:Zy,W:Qy,x:null,X:null,y:Xy,Y:t_,Z:n_,"%":O_},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:r_,e:r_,f:s_,g:y_,G:w_,H:i_,I:o_,j:a_,L:u_,m:c_,M:f_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:x_,s:E_,S:l_,u:d_,U:h_,V:g_,w:m_,W:b_,x:null,X:null,y:v_,Y:__,Z:S_,"%":O_},w={a:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=b.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return x(t,e,n,r)},d:Ty,e:Ty,f:Py,g:Oy,G:Sy,H:Ay,I:Ay,j:$y,L:Iy,m:My,M:ky,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ey,Q:Ry,s:jy,S:Cy,u:vy,U:yy,V:_y,w:by,W:wy,x:function(t,e,r){return x(t,n,e,r)},X:function(t,e,n){return x(t,r,e,n)},y:Oy,Y:Sy,Z:xy,"%":Ny};function S(t,e){return function(n){var r,i,o,a=[],u=-1,s=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ey(ny(o.y,0,1))).getUTCDay(),r=i>4||0===i?Rv.ceil(r):Rv(r),r=Yv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ty(ny(o.y,0,1))).getDay(),r=i>4||0===i?ov.ceil(r):ov(r),r=yv.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ey(ny(o.y,0,1)).getUTCDay():ty(ny(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ey(o)):ty(o)}}function x(t,e,n,r){for(var i,o,a=0,u=e.length,s=n.length;a=s)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in cy?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=S(n,y),y.X=S(r,y),y.c=S(e,y),_.x=S(n,_),_.X=S(r,_),_.c=S(e,_),{format:function(t){var e=S(t+="",y);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=S(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}}}var iy,oy,ay,uy,sy,cy={"-":"",_:" ",0:"0"},fy=/^\s*\d+/,ly=/^%/,dy=/[\\^$*+?|[\]().{}]/g;function hy(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function xy(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ey(t,e,n){var r=fy.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function My(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ty(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $y(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ay(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ky(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Cy(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Iy(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Py(t,e,n){var r=fy.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ny(t,e,n){var r=ly.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ry(t,e,n){var r=fy.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jy(t,e,n){var r=fy.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Dy(t,e){return hy(t.getDate(),e,2)}function Ly(t,e){return hy(t.getHours(),e,2)}function Fy(t,e){return hy(t.getHours()%12||12,e,2)}function By(t,e){return hy(1+yv.count(Gb(t),t),e,3)}function Uy(t,e){return hy(t.getMilliseconds(),e,3)}function zy(t,e){return Uy(t,e)+"000"}function Hy(t,e){return hy(t.getMonth()+1,e,2)}function Vy(t,e){return hy(t.getMinutes(),e,2)}function qy(t,e){return hy(t.getSeconds(),e,2)}function Wy(t){var e=t.getDay();return 0===e?7:e}function Gy(t,e){return hy(iv.count(Gb(t)-1,t),e,2)}function Ky(t){var e=t.getDay();return e>=4||0===e?sv(t):sv.ceil(t)}function Yy(t,e){return t=Ky(t),hy(sv.count(Gb(t),t)+(4===Gb(t).getDay()),e,2)}function Zy(t){return t.getDay()}function Qy(t,e){return hy(ov.count(Gb(t)-1,t),e,2)}function Xy(t,e){return hy(t.getFullYear()%100,e,2)}function Jy(t,e){return hy((t=Ky(t)).getFullYear()%100,e,2)}function t_(t,e){return hy(t.getFullYear()%1e4,e,4)}function e_(t,e){var n=t.getDay();return hy((t=n>=4||0===n?sv(t):sv.ceil(t)).getFullYear()%1e4,e,4)}function n_(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+hy(e/60|0,"0",2)+hy(e%60,"0",2)}function r_(t,e){return hy(t.getUTCDate(),e,2)}function i_(t,e){return hy(t.getUTCHours(),e,2)}function o_(t,e){return hy(t.getUTCHours()%12||12,e,2)}function a_(t,e){return hy(1+Yv.count(Xv(t),t),e,3)}function u_(t,e){return hy(t.getUTCMilliseconds(),e,3)}function s_(t,e){return u_(t,e)+"000"}function c_(t,e){return hy(t.getUTCMonth()+1,e,2)}function f_(t,e){return hy(t.getUTCMinutes(),e,2)}function l_(t,e){return hy(t.getUTCSeconds(),e,2)}function d_(t){var e=t.getUTCDay();return 0===e?7:e}function h_(t,e){return hy(Nv.count(Xv(t)-1,t),e,2)}function p_(t){var e=t.getUTCDay();return e>=4||0===e?Lv(t):Lv.ceil(t)}function g_(t,e){return t=p_(t),hy(Lv.count(Xv(t),t)+(4===Xv(t).getUTCDay()),e,2)}function m_(t){return t.getUTCDay()}function b_(t,e){return hy(Rv.count(Xv(t)-1,t),e,2)}function v_(t,e){return hy(t.getUTCFullYear()%100,e,2)}function y_(t,e){return hy((t=p_(t)).getUTCFullYear()%100,e,2)}function __(t,e){return hy(t.getUTCFullYear()%1e4,e,4)}function w_(t,e){var n=t.getUTCDay();return hy((t=n>=4||0===n?Lv(t):Lv.ceil(t)).getUTCFullYear()%1e4,e,4)}function S_(){return"+0000"}function O_(){return"%"}function x_(t){return+t}function E_(t){return Math.floor(+t/1e3)}function M_(t){return iy=ry(t),oy=iy.format,ay=iy.parse,uy=iy.utcFormat,sy=iy.utcParse,iy}M_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var T_=1e3,$_=6e4,A_=36e5,k_=864e5,C_=2592e6,I_=31536e6;function P_(t){return new Date(t)}function N_(t){return t instanceof Date?+t:+new Date(+t)}function R_(t,e,n,r,i,a,u,s,c){var f=hb(),l=f.invert,d=f.domain,h=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),v=c("%b %d"),y=c("%B"),_=c("%Y"),w=[[u,1,T_],[u,5,5e3],[u,15,15e3],[u,30,3e4],[a,1,$_],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,A_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,k_],[r,2,1728e5],[n,1,6048e5],[e,1,C_],[e,3,7776e6],[t,1,I_]];function S(o){return(u(o)1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return OS.h=360*t-100,OS.s=1.5-1.5*e,OS.l=.8-.9*e,OS+""},ES=gr(),MS=Math.PI/3,TS=2*Math.PI/3,$S=function(t){var e;return t=(.5-t)*Math.PI,ES.r=255*(e=Math.sin(t))*e,ES.g=255*(e=Math.sin(t+MS))*e,ES.b=255*(e=Math.sin(t+TS))*e,ES+""},AS=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function kS(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var CS=kS(uw("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),IS=kS(uw("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),PS=kS(uw("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),NS=kS(uw("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),RS=function(t){return zn(En(t).call(document.documentElement))},jS=0;function DS(){return new LS}function LS(){this._="@"+(++jS).toString(36)}LS.prototype=DS.prototype={constructor:LS,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var FS=function(t,e){return t.target&&(t=Zr(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(function(t){return Qr(t,e)}))},BS=function(t){return"string"===typeof t?new Fn([document.querySelectorAll(t)],[document.documentElement]):new Fn([null==t?[]:Te(t)],Ln)},US=function(t){return function(){return t}},zS=Math.abs,HS=Math.atan2,VS=Math.cos,qS=Math.max,WS=Math.min,GS=Math.sin,KS=Math.sqrt,YS=1e-12,ZS=Math.PI,QS=ZS/2,XS=2*ZS;function JS(t){return t>1?0:t<-1?ZS:Math.acos(t)}function tO(t){return t>=1?QS:t<=-1?-QS:Math.asin(t)}function eO(t){return t.innerRadius}function nO(t){return t.outerRadius}function rO(t){return t.startAngle}function iO(t){return t.endAngle}function oO(t){return t&&t.padAngle}function aO(t,e,n,r,i,o,a,u){var s=n-t,c=r-e,f=a-i,l=u-o,d=l*s-f*c;if(!(d*dk*k+C*C&&(x=M,E=T),{cx:x,cy:E,x01:-f,y01:-l,x11:x*(i/w-1),y11:E*(i/w-1)}}var sO=function(){var t=eO,e=nO,n=US(0),r=null,i=rO,o=iO,a=oO,u=null;function s(){var s,c,f=+t.apply(this,arguments),l=+e.apply(this,arguments),d=i.apply(this,arguments)-QS,h=o.apply(this,arguments)-QS,p=zS(h-d),g=h>d;if(u||(u=s=da()),lYS)if(p>XS-YS)u.moveTo(l*VS(d),l*GS(d)),u.arc(0,0,l,d,h,!g),f>YS&&(u.moveTo(f*VS(h),f*GS(h)),u.arc(0,0,f,h,d,g));else{var m,b,v=d,y=h,_=d,w=h,S=p,O=p,x=a.apply(this,arguments)/2,E=x>YS&&(r?+r.apply(this,arguments):KS(f*f+l*l)),M=WS(zS(l-f)/2,+n.apply(this,arguments)),T=M,$=M;if(E>YS){var A=tO(E/f*GS(x)),k=tO(E/l*GS(x));(S-=2*A)>YS?(_+=A*=g?1:-1,w-=A):(S=0,_=w=(d+h)/2),(O-=2*k)>YS?(v+=k*=g?1:-1,y-=k):(O=0,v=y=(d+h)/2)}var C=l*VS(v),I=l*GS(v),P=f*VS(w),N=f*GS(w);if(M>YS){var R,j=l*VS(y),D=l*GS(y),L=f*VS(_),F=f*GS(_);if(pYS?$>YS?(m=uO(L,F,C,I,l,$,g),b=uO(j,D,P,N,l,$,g),u.moveTo(m.cx+m.x01,m.cy+m.y01),$YS&&S>YS?T>YS?(m=uO(P,N,j,D,f,-T,g),b=uO(C,I,L,F,f,-T,g),u.lineTo(m.cx+m.x01,m.cy+m.y01),T=f;--l)u.point(m[l],b[l]);u.lineEnd(),u.areaEnd()}g&&(m[c]=+t(d,c,s),b[c]=+e(d,c,s),u.point(r?+r(d,c,s):m[c],n?+n(d,c,s):b[c]))}if(h)return u=null,h+""||null}function c(){return gO().defined(i).curve(a).context(o)}return t="function"===typeof t?t:void 0===t?hO:US(+t),e="function"===typeof e?e:US(void 0===e?0:+e),n="function"===typeof n?n:void 0===n?pO:US(+n),s.x=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),r=null,s):t},s.x0=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),s):t},s.x1=function(t){return arguments.length?(r=null==t?null:"function"===typeof t?t:US(+t),s):r},s.y=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),n=null,s):e},s.y0=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),s):e},s.y1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:US(+t),s):n},s.lineX0=s.lineY0=function(){return c().x(t).y(e)},s.lineY1=function(){return c().x(t).y(n)},s.lineX1=function(){return c().x(r).y(e)},s.defined=function(t){return arguments.length?(i="function"===typeof t?t:US(!!t),s):i},s.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),s):o},s},bO=function(t,e){return et?1:e>=t?0:NaN},vO=function(t){return t},yO=function(){var t=vO,e=bO,n=null,r=US(0),i=US(XS),o=US(0);function a(a){var u,s,c,f,l,d=(a=fO(a)).length,h=0,p=new Array(d),g=new Array(d),m=+r.apply(this,arguments),b=Math.min(XS,Math.max(-XS,i.apply(this,arguments)-m)),v=Math.min(Math.abs(b)/d,o.apply(this,arguments)),y=v*(b<0?-1:1);for(u=0;u0&&(h+=l);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),u=0,c=h?(b-d*y)/h:0;u0?l*c:0)+y,g[s]={data:a[s],index:u,value:l,startAngle:m,endAngle:f,padAngle:v};return g}return a.value=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"===typeof t?t:US(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"===typeof t?t:US(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"===typeof t?t:US(+t),a):o},a},_O=SO(dO);function wO(t){this._curve=t}function SO(t){function e(e){return new wO(t(e))}return e._curve=t,e}function OO(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(SO(t)):e()._curve},t}wO.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var xO=function(){return OO(gO().curve(_O))},EO=function(){var t=mO().curve(_O),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return 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 OO(n())},delete t.lineX0,t.lineEndAngle=function(){return OO(r())},delete t.lineX1,t.lineInnerRadius=function(){return OO(i())},delete t.lineY0,t.lineOuterRadius=function(){return OO(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(SO(t)):e()._curve},t},MO=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]};function TO(t){return t.source}function $O(t){return t.target}function AO(t){var e=TO,n=$O,r=hO,i=pO,o=null;function a(){var a,u=cO.call(arguments),s=e.apply(this,u),c=n.apply(this,u);if(o||(o=a=da()),t(o,+r.apply(this,(u[0]=s,u)),+i.apply(this,u),+r.apply(this,(u[0]=c,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"===typeof t?t:US(+t),a):r},a.y=function(t){return arguments.length?(i="function"===typeof t?t:US(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function kO(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function CO(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function IO(t,e,n,r,i){var o=MO(e,n),a=MO(e,n=(n+i)/2),u=MO(r,n),s=MO(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],s[0],s[1])}function PO(){return AO(kO)}function NO(){return AO(CO)}function RO(){var t=AO(IO);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var jO={draw:function(t,e){var n=Math.sqrt(e/ZS);t.moveTo(n,0),t.arc(0,0,n,0,XS)}},DO={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},LO=Math.sqrt(1/3),FO=2*LO,BO={draw:function(t,e){var n=Math.sqrt(e/FO),r=n*LO;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},UO=Math.sin(ZS/10)/Math.sin(7*ZS/10),zO=Math.sin(XS/10)*UO,HO=-Math.cos(XS/10)*UO,VO={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=zO*n,i=HO*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=XS*o/5,u=Math.cos(a),s=Math.sin(a);t.lineTo(s*n,-u*n),t.lineTo(u*r-s*i,s*r+u*i)}t.closePath()}},qO={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},WO=Math.sqrt(3),GO={draw:function(t,e){var n=-Math.sqrt(e/(3*WO));t.moveTo(0,2*n),t.lineTo(-WO*n,-n),t.lineTo(WO*n,-n),t.closePath()}},KO=-.5,YO=Math.sqrt(3)/2,ZO=1/Math.sqrt(12),QO=3*(ZO/2+1),XO={draw:function(t,e){var n=Math.sqrt(e/QO),r=n/2,i=n*ZO,o=r,a=n*ZO+n,u=-o,s=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,s),t.lineTo(KO*r-YO*i,YO*r+KO*i),t.lineTo(KO*o-YO*a,YO*o+KO*a),t.lineTo(KO*u-YO*s,YO*u+KO*s),t.lineTo(KO*r+YO*i,KO*i-YO*r),t.lineTo(KO*o+YO*a,KO*a-YO*o),t.lineTo(KO*u+YO*s,KO*s-YO*u),t.closePath()}},JO=[jO,DO,BO,qO,VO,GO,XO],tx=function(t,e){var n=null;function r(){var r;if(n||(n=r=da()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return t="function"===typeof t?t:US(t||jO),e="function"===typeof e?e:US(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"===typeof e?e:US(e),r):t},r.size=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},ex=function(){};function nx(t,e,n){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+e)/6,(t._y0+4*t._y1+n)/6)}function rx(t){this._context=t}rx.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:nx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var ix=function(t){return new rx(t)};function ox(t){this._context=t}ox.prototype={areaStart:ex,areaEnd:ex,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var ax=function(t){return new ox(t)};function ux(t){this._context=t}ux.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var sx=function(t){return new ux(t)};function cx(t,e){this._basis=new rx(t),this._beta=e}cx.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,u=e[n]-o,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*a),this._beta*e[s]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var fx=function t(e){function n(t){return 1===e?new rx(t):new cx(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function lx(t,e,n){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-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function dx(t,e){this._context=t,this._k=(1-e)/6}dx.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:lx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hx=function t(e){function n(t){return new dx(t,e)}return n.tension=function(e){return t(+e)},n}(0);function px(t,e){this._context=t,this._k=(1-e)/6}px.prototype={areaStart:ex,areaEnd:ex,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var gx=function t(e){function n(t){return new px(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mx(t,e){this._context=t,this._k=(1-e)/6}mx.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bx=function t(e){function n(t){return new mx(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vx(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>YS){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>YS){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function yx(t,e){this._context=t,this._alpha=e}yx.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._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:vx(this,t,e)}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=e}};var _x=function t(e){function n(t){return e?new yx(t,e):new dx(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function wx(t,e){this._context=t,this._alpha=e}wx.prototype={areaStart:ex,areaEnd:ex,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vx(this,t,e)}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=e}};var Sx=function t(e){function n(t){return e?new wx(t,e):new px(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ox(t,e){this._context=t,this._alpha=e}Ox.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:vx(this,t,e)}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=e}};var xx=function t(e){function n(t){return e?new Ox(t,e):new mx(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ex(t){this._context=t}Ex.prototype={areaStart:ex,areaEnd:ex,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var Mx=function(t){return new Ex(t)};function Tx(t){return t<0?-1:1}function $x(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Tx(o)+Tx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Ax(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function kx(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Cx(t){this._context=t}function Ix(t){this._context=new Px(t)}function Px(t){this._context=t}function Nx(t){return new Cx(t)}function Rx(t){return new Ix(t)}function jx(t){this._context=t}function Dx(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Bx=function(t){return new Fx(t,.5)};function Ux(t){return new Fx(t,0)}function zx(t){return new Fx(t,1)}var Hx=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],u=a.length;o=0;)n[e]=e;return n};function qx(t,e){return t[e]}function Wx(t){var e=[];return e.key=t,e}var Gx=function(){var t=US([]),e=Vx,n=Hx,r=qx;function i(i){var o,a,u,c=Array.from(t.apply(this,arguments),Wx),f=c.length,l=-1,d=Object(s.a)(i);try{for(d.s();!(u=d.n()).done;){var h=u.value;for(o=0,++l;o0){for(var n,r,i,o=0,a=t[0].length;o0)for(var n,r,i,o,a,u,s=0,c=t[e[0]].length;s0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},Zx=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=e,r=n);return r}var tE=function(t){var e=t.map(eE);return Vx(t).sort((function(t,n){return e[t]-e[n]}))};function eE(t){for(var e,n=0,r=-1,i=t.length;++rr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var SE=function(){var t,e,n,r=mE,i=bE,o=wE,a=yE,u=_E,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,l=fm,d=Oe("start","zoom","end"),h=500,p=0,g=10;function m(t){t.property("__zoom",vE).on("wheel.zoom",O).on("mousedown.zoom",x).on("dblclick.zoom",E).filter(u).on("touchstart.zoom",M).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new lE(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new lE(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,r){t.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=w(t,o).event(r),u=i.apply(t,o),s=null==n?y(u):"function"===typeof n?n.apply(t,o):n,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,d="function"===typeof e?e.apply(t,o):e,h=l(f.invert(s).concat(c/f.k),d.invert(s).concat(c/d.k));return function(t){if(1===t)t=d;else{var e=h(t),n=c/e[2];t=new lE(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function w(t,e,n){return!n&&t.__zooming||new S(t,e)}function S(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function O(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1?e-1:0),a=1;ap}u.event(t).zoom("mouse",o(v(u.that.__zoom,u.mouse[0]=Qr(t,l),u.mouse[1]),u.extent,c))}function m(t){s.on("mousemove.zoom mouseup.zoom",null),Wn(t.view,u.moved),gE(t),u.event(t).end()}}function E(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a0?zn(this).transition().duration(f).call(_,h,s,t):zn(this).call(m.transform,h,s,t)}}function M(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?e-1:0),r=1;r1?r-1:0),o=1;o=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return $(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,u=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;ou&&(n=u-s),o=n;o>=0;o--){for(var l=!0,d=0;di&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128===(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function $(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,e,n,r,o){return o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(59))},function(t,e,n){"use strict";function r(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return s}));var r=n(14),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(t,e){return t.__proto__=e,t}:o,u=function(t){function e(n){void 0===n&&(n=i);var r=t.call(this,"number"===typeof n?i+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=i,a(r,e.prototype),r}return Object(r.c)(e,t),e}(Error);function s(t,e){if(!t)throw new u(e)}function c(t){return function(){return console[t].apply(console,arguments)}}!function(t){t.warn=c("warn"),t.error=c("error")}(s||(s={}));var f={env:{}};if("object"===typeof t)f=t;else try{Function("stub","process = stub")(f)}catch(l){}}).call(this,n(70))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(57);function i(t){return function e(n){return 0===arguments.length||Object(r.a)(n)?e:t.apply(this,arguments)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(284);function i(t){if("string"!==typeof t)throw new Error(Object(r.a)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},function(t,e,n){t.exports=n(719)},function(t,e,n){"use strict";n.d(e,"g",(function(){return o})),n.d(e,"k",(function(){return a})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"j",(function(){return c})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return p})),n.d(e,"i",(function(){return g}));var r=n(284);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)}function o(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map((function(t){return t+t}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(t,e){return e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}function a(t){if(0===t.indexOf("#"))return t;var e=s(t).values;return"#".concat(e.map((function(t){return function(t){var e=t.toString(16);return 1===e.length?"0".concat(e):e}(t)})).join(""))}function u(t){var e=(t=s(t)).values,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+n/30)%12;return i-o*Math.max(Math.min(e-3,9-e,1),-1)},u="rgb",f=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===t.type&&(u+="a",f.push(e[3])),c({type:u,values:f})}function s(t){if(t.type)return t;if("#"===t.charAt(0))return s(o(t));var e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,t));var i=t.substring(e+1,t.length-1).split(",");return{type:n,values:i=i.map((function(t){return parseFloat(t)}))}}function c(t){var e=t.type,n=t.values;return-1!==e.indexOf("rgb")?n=n.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e,"(").concat(n.join(", "),")")}function f(t,e){var n=l(t),r=l(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(t){var e="hsl"===(t=s(t)).type?s(u(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return l(t)>.5?p(t,e):g(t,e)}function h(t,e){return t=s(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=e,c(t)}function p(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]*=1-e;return c(t)}function g(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;return c(t)}},function(t,e,n){var r=n(29),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,s=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,d=14,h=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function b(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,n,r=1,i=t.length,o=t[0]+"";rc^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,a=0;ao[a]^n?1:-1;return s==c?0:s>c^n?1:-1}function _(t,e,n,r){if(tn||t!==s(t))throw Error(c+(r||"Argument")+("number"==typeof t?tn?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return b(t.e/d)==e&&t.c[e]%2!=0}function S(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function O(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else ek?b.c=b.e=null:t.e=10;l/=10,c++);return void(c>k?b.c=b.e=null:(b.e=c,b.c=[t]))}m=String(t)}else{if(!a.test(m=String(t)))return i(b,m,p);b.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(l=m.search(/e/i))>0?(c<0&&(c=l),c+=+m.slice(l+1),m=m.substring(0,l)):c<0&&(c=m.length)}else{if(_(e,2,R.length,"Base"),10==e)return B(b=new j(t),E+b.e+1,M);if(m=String(t),p="number"==typeof t){if(0*t!=0)return i(b,m,p,e);if(b.s=1/t<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else b.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=R.slice(0,e),c=l=0,g=m.length;lc){c=g;continue}}else if(!u&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){u=!0,l=-1,c=0;continue}return i(b,String(t),p,e)}p=!1,(c=(m=r(m,e,10,b.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(l=0;48===m.charCodeAt(l);l++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(l,++g)){if(g-=l,p&&j.DEBUG&&g>15&&(t>h||t!==s(t)))throw Error(f+b.s*t);if((c=c-l-1)>k)b.c=b.e=null;else if(c=$)?S(s,a):O(s,a,"0");else if(o=(t=B(new j(t),e,n)).e,u=(s=v(t.c)).length,1==r||2==r&&(e<=o||o<=T)){for(;uu){if(--e>0)for(s+=".";e--;s+="0");}else if((e+=o-u)>0)for(o+1==u&&(s+=".");e--;s+="0");return t.s<0&&i?"-"+s:s}function L(t,e){for(var n,r=1,i=new j(t[0]);r=10;i/=10,r++);return(n=r+n*d-1)>k?t.c=t.e=null:n=10;c/=10,i++);if((o=e-i)<0)o+=d,a=e,g=(f=m[h=0])/b[i-a-1]%10|0;else if((h=u((o+1)/d))>=m.length){if(!r)break t;for(;m.length<=h;m.push(0));f=g=0,i=1,a=(o%=d)-d+1}else{for(f=c=m[h],i=1;c>=10;c/=10,i++);g=(a=(o%=d)-d+i)<0?0:f/b[i-a-1]%10|0}if(r=r||e<0||null!=m[h+1]||(a<0?f:f%b[i-a-1]),r=n<4?(g||r)&&(0==n||n==(t.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(o>0?a>0?f/b[i-a]:0:m[h-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,r?(e-=t.e+1,m[0]=b[(d-e%d)%d],t.e=-e||0):m[0]=t.e=0,t;if(0==o?(m.length=h,c=1,h--):(m.length=h+1,c=b[d-o],m[h]=a>0?s(f/b[i-a]%b[a])*c:0),r)for(;;){if(0==h){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,m[0]==l&&(m[0]=1));break}if(m[h]+=c,m[h]!=l)break;m[h--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}t.e>k?t.c=t.e=null:t.e=$?S(e,n):O(e,n,"0"),t.s<0?"-"+e:e)}return j.clone=t,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(c+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(n=t[e],0,m,e),E=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(n=t[e],0,8,e),M=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(_(n[0],-m,0,e),_(n[1],0,m,e),T=n[0],$=n[1]):(_(n,-m,m,e),T=-($=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)_(n[0],-m,-1,e),_(n[1],1,m,e),A=n[0],k=n[1];else{if(_(n,-m,m,e),!n)throw Error(c+e+" cannot be zero: "+n);A=-(k=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(c+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw C=!n,Error(c+"crypto unavailable");C=n}else C=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(n=t[e],0,9,e),I=n),t.hasOwnProperty(e="POW_PRECISION")&&(_(n=t[e],0,m,e),P=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(c+e+" not an object: "+n);N=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(c+e+" invalid: "+n);R=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:M,EXPONENTIAL_AT:[T,$],RANGE:[A,k],CRYPTO:C,MODULO_MODE:I,POW_PRECISION:P,FORMAT:N,ALPHABET:R}},j.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!j.DEBUG)return!0;var e,n,r=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===s(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%d)<1&&(e+=d),String(r[0]).length==e){for(e=0;e=l||n!==s(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+t)},j.maximum=j.max=function(){return L(arguments,o.lt)},j.minimum=j.min=function(){return L(arguments,o.gt)},j.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return s(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,r,i,o,a,f=0,l=[],h=new j(x);if(null==t?t=E:_(t,0,m),o=u(t/d),C)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[f]=r[0],n[f+1]=r[1]):(l.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw C=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(n,f):(l.push(a%1e14),f+=7);f=o/7}if(!C)for(;f=10;a/=10,f++);fn-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,u){var s,c,f,l,d,h,p,g,m=r.indexOf("."),b=E,y=M;for(m>=0&&(l=P,P=0,r=r.replace(".",""),h=(g=new j(i)).pow(r.length-m),P=l,g.c=e(O(v(h.c),h.e,"0"),10,o,t),g.e=g.c.length),f=l=(p=e(r,i,o,u?(s=R,t):(s=t,R))).length;0==p[--l];p.pop());if(!p[0])return s.charAt(0);if(m<0?--f:(h.c=p,h.e=f,h.s=a,p=(h=n(h,g,b,y,o)).c,d=h.r,f=h.e),m=p[c=f+b+1],l=o/2,d=d||c<0||null!=p[c+1],d=y<4?(null!=m||d)&&(0==y||y==(h.s<0?3:2)):m>l||m==l&&(4==y||d||6==y&&1&p[c-1]||y==(h.s<0?8:7)),c<1||!p[0])r=d?O(s.charAt(1),-b,s.charAt(0)):s.charAt(0);else{if(p.length=c,d)for(--o;++p[--c]>o;)p[c]=0,c||(++f,p=[1].concat(p));for(l=p.length;!p[--l];);for(m=0,r="";m<=l;r+=s.charAt(p[m++]));r=O(r,f,s.charAt(0))}return r}}(),n=function(){function t(t,e,n){var r,i,o,a,u=0,s=t.length,c=e%g,f=e/g|0;for(t=t.slice();s--;)u=((i=c*(o=t[s]%g)+(r=f*o+(a=t[s]/g|0)*c)%g*g+u)/n|0)+(r/g|0)+f*a,t[s]=i%n;return u&&(t=[u].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.splice(0,1));}return function(r,i,o,a,u){var c,f,h,p,g,m,v,y,_,w,S,O,x,E,M,T,$,A=r.s==i.s?1:-1,k=r.c,C=i.c;if(!k||!k[0]||!C||!C[0])return new j(r.s&&i.s&&(k?!C||k[0]!=C[0]:C)?k&&0==k[0]||!C?0*A:A/0:NaN);for(_=(y=new j(A)).c=[],A=o+(f=r.e-i.e)+1,u||(u=l,f=b(r.e/d)-b(i.e/d),A=A/d|0),h=0;C[h]==(k[h]||0);h++);if(C[h]>(k[h]||0)&&f--,A<0)_.push(1),p=!0;else{for(E=k.length,T=C.length,h=0,A+=2,(g=s(u/(C[0]+1)))>1&&(C=t(C,g,u),k=t(k,g,u),T=C.length,E=k.length),x=T,S=(w=k.slice(0,T)).length;S=u/2&&M++;do{if(g=0,(c=e(C,w,T,S))<0){if(O=w[0],T!=S&&(O=O*u+(w[1]||0)),(g=s(O/M))>1)for(g>=u&&(g=u-1),v=(m=t(C,g,u)).length,S=w.length;1==e(m,w,v,S);)g--,n(m,T=10;A/=10,h++);B(y,o+(y.e=h+f*d-1)+1,a,p)}else y.e=f,y.r=+p;return y}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,u,s){var f,l=u?a:a.replace(i,"");if(r.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!u&&(l=l.replace(t,(function(t,e,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,s&&s!=f?t:e})),s&&(f=s,l=l.replace(e,"$1").replace(n,"0.$1")),a!=l))return new j(l,f);if(j.DEBUG)throw Error(c+"Not a"+(s?" base "+s:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new j(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return y(this,new j(t,e))},o.decimalPlaces=o.dp=function(t,e){var n,r,i,o=this;if(null!=t)return _(t,0,m),null==e?e=M:_(e,0,8),B(new j(o),t+o.e+1,e);if(!(n=o.c))return null;if(r=((i=n.length-1)-b(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},o.dividedBy=o.div=function(t,e){return n(this,new j(t,e),E,M)},o.dividedToIntegerBy=o.idiv=function(t,e){return n(this,new j(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var n,r,i,o,a,f,l,h,p=this;if((t=new j(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+U(t));if(null!=e&&(e=new j(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new j(Math.pow(+U(p),a?2-w(t):+U(t))),e?h.mod(e):h;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new j(NaN);(r=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(t)?-0:0,p.e>-1&&(o=1/o),new j(f?1/o:o);P&&(o=u(P/d+2))}for(a?(n=new j(.5),f&&(t.s=1),l=w(t)):l=(i=Math.abs(+U(t)))%2,h=new j(x);;){if(l){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(e))}if(i){if(0===(i=s(i/2)))break;l=i%2}else if(B(t=t.times(n),t.e+1,1),t.e>14)l=w(t);else{if(0===(i=+U(t)))break;l=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(e))}return r?h:(f&&(h=x.div(h)),e?h.mod(e):o?B(h,P,M,undefined):h)},o.integerValue=function(t){var e=new j(this);return null==t?t=M:_(t,0,8),B(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===y(this,new j(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return y(this,new j(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=y(this,new j(t,e)))||0===e},o.isInteger=function(){return!!this.c&&b(this.e/d)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return y(this,new j(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=y(this,new j(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var n,r,i,o,a=this,u=a.s;if(e=(t=new j(t,e)).s,!u||!e)return new j(NaN);if(u!=e)return t.s=-e,a.plus(t);var s=a.e/d,c=t.e/d,f=a.c,h=t.c;if(!s||!c){if(!f||!h)return f?(t.s=-e,t):new j(h?a:NaN);if(!f[0]||!h[0])return h[0]?(t.s=-e,t):new j(f[0]?a:3==M?-0:0)}if(s=b(s),c=b(c),f=f.slice(),u=s-c){for((o=u<0)?(u=-u,i=f):(c=s,i=h),i.reverse(),e=u;e--;i.push(0));i.reverse()}else for(r=(o=(u=f.length)<(e=h.length))?u:e,u=e=0;e0)for(;e--;f[n++]=0);for(e=l-1;r>u;){if(f[--r]