// https://d3js.org/d3-geo-projection/ v2.9.0 Copyright 2020 Mike Bostock !function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("d3-geo"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-array"],r):r(n.d3=n.d3||{},n.d3,n.d3)}(this,function(n,r,e){"use strict";var t=Math.abs,o=Math.atan,i=Math.atan2,u=Math.cos,a=Math.exp,c=Math.floor,f=Math.log,l=Math.max,g=Math.min,v=Math.pow,s=Math.round,p=Math.sign||function(n){return n>0?1:n<0?-1:0},h=Math.sin,d=Math.tan,w=1e-6,y=1e-12,m=Math.PI,P=m/2,R=m/4,b=Math.SQRT1_2,j=G(2),M=G(m),E=2*m,S=180/m,k=m/180;function A(n){return n>1?P:n<-1?-P:Math.asin(n)}function x(n){return n>1?0:n<-1?m:Math.acos(n)}function G(n){return n>0?Math.sqrt(n):0}function C(n){return(a(n)-a(-n))/2}function N(n){return(a(n)+a(-n))/2}function F(n){var r=d(n/2),e=2*f(u(n/2))/(r*r);function o(n,r){var t=u(n),o=u(r),i=h(r),a=o*t,c=-((1-a?f((1+a)/2)/(1-a):-.5)+e/(1+a));return[c*o*h(n),c*i]}return o.invert=function(r,o){var a,c=G(r*r+o*o),l=-n/2,g=50;if(!c)return[0,0];do{var v=l/2,s=u(v),p=h(v),d=p/s,y=-f(t(s));l-=a=(2/d*y-e*d-c)/(-y/(p*p)+1-e/(2*s*s))*(s<0?.7:1)}while(t(a)>w&&--g>0);var m=h(l);return[i(r*m,c*u(l)),A(o*m/c)]},o}function z(n,r){var e=u(r),t=function(n){return n?n/Math.sin(n):1}(x(e*u(n/=2)));return[2*e*h(n)*t,h(r)*t]}function L(n){var r=h(n),e=u(n),o=n>=0?1:-1,a=d(o*n),c=(1+r-e)/2;function f(n,t){var f=u(t),l=u(n/=2);return[(1+f)*h(n),(o*t>-i(l,a)-.001?0:10*-o)+c+h(t)*e-(1+f)*r*l]}return f.invert=function(n,f){var l=0,g=0,v=50;do{var s=u(l),p=h(l),d=u(g),y=h(g),m=1+d,P=m*p-n,R=c+y*e-m*r*s-f,b=m*s/2,j=-p*y,M=r*m*p/2,E=e*d+r*s*y,S=j*M-E*b,k=(R*j-P*E)/S/2,A=(P*M-R*b)/S;t(A)>2&&(A/=2),l-=k,g-=A}while((t(k)>w||t(A)>w)&&--v>0);return o*g>-i(u(l),a)-.001?[2*l,g]:null},f}function H(n,r){var e=d(r/2),t=G(1-e*e),o=1+t*u(n/=2),i=h(n)*t/o,a=e/o,c=i*i,f=a*a;return[4/3*i*(3+c-3*f),4/3*a*(3+3*c-f)]}z.invert=function(n,r){if(!(n*n+4*r*r>m*m+w)){var e=n,o=r,i=25;do{var a,c=h(e),f=h(e/2),l=u(e/2),g=h(o),v=u(o),s=h(2*o),p=g*g,d=v*v,y=f*f,P=1-d*l*l,R=P?x(v*l)*G(a=1/P):a=0,b=2*R*v*f-n,j=R*g-r,M=a*(d*y+R*v*l*p),E=a*(.5*c*s-2*R*g*f),S=.25*a*(s*f-R*g*d*c),k=a*(p*l+R*y*v),A=E*S-k*M;if(!A)break;var C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]}},H.invert=function(n,r){if(r*=3/8,!(n*=3/8)&&t(r)>1)return null;var e=1+n*n+r*r,o=G((e-G(e*e-4*r*r))/2),a=A(o)/3,c=o?function(n){return f(n+G(n*n-1))}(t(r/o))/3:function(n){return f(n+G(n*n+1))}(t(n))/3,l=u(a),g=N(c),v=g*g-l*l;return[2*p(n)*i(C(c)*l,.25-v),2*p(r)*i(g*h(a),.25+v)]};var q=G(8),B=f(1+j);function W(n,r){var e=t(r);return eP){var c=i(a[1],a[0]),f=G(a[0]*a[0]+a[1]*a[1]),l=e*s((c-P)/e)+P,g=i(h(c-=l),2-u(c));c=l+A(m/f*h(g))-g,a[0]=f*u(c),a[1]=f*h(c)}return a}return a.invert=function(n,t){var a=G(n*n+t*t);if(a>P){var c=i(t,n),f=e*s((c-P)/e)+P,l=c>f?-1:1,g=a*u(f-c),v=1/d(l*x((g-m)/G(m*(m-2*g)+a*a)));c=f+2*o((v+l*G(v*v-3))/3),n=a*u(c),t=a*h(c)}return r.geoAzimuthalEquidistantRaw.invert(n,t)},a}function D(n,e){if(arguments.length<2&&(e=n),1===e)return r.geoAzimuthalEqualAreaRaw;if(e===1/0)return Q;function t(t,o){var i=r.geoAzimuthalEqualAreaRaw(t/e,o);return i[0]*=n,i}return t.invert=function(t,o){var i=r.geoAzimuthalEqualAreaRaw.invert(t/n,o);return i[0]*=e,i},t}function Q(n,r){return[n*u(r)/u(r/=2),2*h(r)]}function T(n,r,e){var o,i,u,a=100;e=void 0===e?0:+e,r=+r;do{(i=n(e))===(u=n(e+w))&&(u=i+w),e-=o=-1*w*(i-r)/(i-u)}while(a-- >0&&t(o)>w);return a<0?NaN:e}function V(n,r,e){return void 0===r&&(r=40),void 0===e&&(e=y),function(o,i,u,a){var c,f,l;u=void 0===u?0:+u,a=void 0===a?0:+a;for(var g=0;gc)u-=f/=2,a-=l/=2;else{c=h;var d=(u>0?-1:1)*e,w=(a>0?-1:1)*e,y=n(u+d,a),m=n(u,a+w),P=(y[0]-v[0])/d,R=(y[1]-v[1])/d,b=(m[0]-v[0])/w,j=(m[1]-v[1])/w,M=j*P-R*b,E=(t(M)<.5?.5:1)/M;if(u+=f=(p*b-s*j)*E,a+=l=(s*R-p*P)*E,t(f)0&&(a[1]*=1+c/1.5*a[0]*a[0]),a}return t.invert=V(t),t}function K(n,r){var e,o=n*h(r),i=30;do{r-=e=(r+h(r)-o)/(1+u(r))}while(t(e)>w&&--i>0);return r/2}function O(n,r,e){function t(t,o){return[n*t*u(o=K(e,o)),r*h(o)]}return t.invert=function(t,o){return o=A(o/r),[t/(n*u(o)),A((2*o+h(2*o))/e)]},t}W.invert=function(n,r){if((i=t(r))y&&--l>0);return[n/(u(c)*(q-1/h(c))),p(r)*c]},Q.invert=function(n,r){var e=2*A(r/2);return[n*u(e/2)/u(e),e]};var U=O(j/P,j,m);var J=2.00276,X=1.11072;function Y(n,r){var e=K(m,r);return[J*n/(1/u(r)+X/u(e)),(r+j*h(e))/J]}function Z(n){var e=0,t=r.geoProjectionMutator(n),o=t(e);return o.parallel=function(n){return arguments.length?t(e=n*k):e*S},o}function $(n,r){return[n*u(r),r]}function nn(n){if(!n)return $;var r=1/d(n);function e(e,t){var o=r+n-t,i=o?e*u(t)/o:o;return[o*h(i),r-o*u(i)]}return e.invert=function(e,t){var o=G(e*e+(t=r-t)*t),a=r+n-o;return[o/u(a)*i(e,t),a]},e}function rn(n){function r(r,e){var t=P-e,o=t?r*n*h(t)/t:t;return[t*h(o)/n,P-t*u(o)]}return r.invert=function(r,e){var t=r*n,o=P-e,u=G(t*t+o*o),a=i(t,o);return[(u?u/h(u):1)*a/n,P-u]},r}Y.invert=function(n,r){var e,o,i=J*r,a=r<0?-R:R,c=25;do{o=i-j*h(a),a-=e=(h(2*a)+2*a-m*h(o))/(2*u(2*a)+2+m*u(o)*j*u(a))}while(t(e)>w&&--c>0);return o=i-j*h(a),[n*(1/u(o)+X/u(a))/J,o]},$.invert=function(n,r){return[n/u(r),r]};var en=O(1,4/m,m);function tn(n,r,e,o,a,c){var f,l=u(c);if(t(n)>1||t(c)>1)f=x(e*a+r*o*l);else{var g=h(n/2),v=h(c/2);f=2*A(G(g*g+r*o*v*v))}return t(f)>w?[f,i(o*h(c),r*a-e*o*l)]:[0,0]}function on(n,r,e){return x((n*n+r*r-e*e)/(2*n*r))}function un(n){return n-2*m*c((n+m)/(2*m))}function an(n,r,e){for(var t,o=[[n[0],n[1],h(n[1]),u(n[1])],[r[0],r[1],h(r[1]),u(r[1])],[e[0],e[1],h(e[1]),u(e[1])]],i=o[2],a=0;a<3;++a,i=t)t=o[a],i.v=tn(t[1]-i[1],i[3],i[2],t[3],t[2],t[0]-i[0]),i.point=[0,0];var c=on(o[0].v[0],o[2].v[0],o[1].v[0]),f=on(o[0].v[0],o[1].v[0],o[2].v[0]),l=m-c;o[2].point[1]=0,o[0].point[0]=-(o[1].point[0]=o[0].v[0]/2);var g=[o[2].point[0]=o[0].point[0]+o[2].v[0]*u(c),2*(o[0].point[1]=o[1].point[1]=o[2].v[0]*h(c))];return function(n,r){var e,t=h(r),i=u(r),a=new Array(3);for(e=0;e<3;++e){var c=o[e];if(a[e]=tn(r-c[1],c[3],c[2],i,t,n-c[0]),!a[e][0])return c.point;a[e][1]=un(a[e][1]-c.v[1])}var v=g.slice();for(e=0;e<3;++e){var s=2==e?0:e+1,p=on(o[e].v[0],a[e][0],a[s][0]);a[e][1]<0&&(p=-p),e?1==e?(p=f-p,v[0]-=a[e][0]*u(p),v[1]-=a[e][0]*h(p)):(p=l-p,v[0]+=a[e][0]*u(p),v[1]+=a[e][0]*h(p)):(v[0]+=a[e][0]*u(p),v[1]-=a[e][0]*h(p))}return v[0]/=3,v[1]/=3,v}}function cn(n){return n[0]*=k,n[1]*=k,n}function fn(n,e,t){var o=r.geoCentroid({type:"MultiPoint",coordinates:[n,e,t]}),i=[-o[0],-o[1]],u=r.geoRotation(i),a=an(cn(u(n)),cn(u(e)),cn(u(t)));a.invert=V(a);var c=r.geoProjection(a).rotate(i),f=c.center;return delete c.rotate,c.center=function(n){return arguments.length?f(u(n)):u.invert(f())},c.clipAngle(90)}function ln(n,r){var e=G(1-h(r));return[2/M*n*e,M*(1-e)]}function gn(n){var r=d(n);function e(n,e){return[n,(n?n/h(n):1)*(h(e)*u(n)-r*u(e))]}return e.invert=r?function(n,e){n&&(e*=h(n)/n);var t=u(n);return[n,2*i(G(t*t+r*r-e*e)-t,r-e)]}:function(n,r){return[n,A(n?r*d(n)/n:r)]},e}ln.invert=function(n,r){var e=(e=r/M-1)*e;return[e>0?n*G(m/e)/2:0,A(1-e)]};var vn=G(3);function sn(n,r){return[vn*n*(2*u(2*r/3)-1)/M,vn*M*h(r/3)]}function pn(n){var r=u(n);function e(n,e){return[n*r,h(e)/r]}return e.invert=function(n,e){return[n/r,A(e*r)]},e}function hn(n){var r=u(n);function e(n,e){return[n*r,(1+r)*d(e/2)]}return e.invert=function(n,e){return[n/r,2*o(e/(1+r))]},e}function dn(n,r){var e=G(8/(3*m));return[e*n*(1-t(r)/m),e*r]}function wn(n,r){var e=G(4-3*h(t(r)));return[2/G(6*m)*n*e,p(r)*G(2*m/3)*(2-e)]}function yn(n,r){var e=G(m*(4+m));return[2/e*n*(1+G(1-4*r*r/(m*m))),4/e*r]}function mn(n,r){var e=(2+P)*h(r);r/=2;for(var o=0,i=1/0;o<10&&t(i)>w;o++){var a=u(r);r-=i=(r+h(r)*(a+2)-e)/(2*a*(1+a))}return[2/G(m*(4+m))*n*(1+u(r)),2*G(m/(4+m))*h(r)]}function Pn(n,r){return[n*(1+u(r))/G(2+m),2*r/G(2+m)]}function Rn(n,r){for(var e=(1+P)*h(r),o=0,i=1/0;o<10&&t(i)>w;o++)r-=i=(r+h(r)-e)/(1+u(r));return e=G(2+m),[n*(1+u(r))/e,2*r/e]}sn.invert=function(n,r){var e=3*A(r/(vn*M));return[M*n/(vn*(2*u(2*e/3)-1)),e]},dn.invert=function(n,r){var e=G(8/(3*m)),o=r/e;return[n/(e*(1-t(o)/m)),o]},wn.invert=function(n,r){var e=2-t(r)/G(2*m/3);return[n*G(6*m)/(2*e),p(r)*A((4-e*e)/3)]},yn.invert=function(n,r){var e=G(m*(4+m))/2;return[n*e/(1+G(1-r*r*(4+m)/(4*m))),r*e/2]},mn.invert=function(n,r){var e=r*G((4+m)/m)/2,t=A(e),o=u(t);return[n/(2/G(m*(4+m))*(1+o)),A((t+e*(o+2))/(2+P))]},Pn.invert=function(n,r){var e=G(2+m),t=r*e/2;return[e*n/(1+u(t)),t]},Rn.invert=function(n,r){var e=1+P,t=G(e/2);return[2*n*t/(1+u(r*=t)),A((r+h(r))/e)]};var bn=3+2*j;function jn(n,r){var e=h(n/=2),t=u(n),i=G(u(r)),a=u(r/=2),c=h(r)/(a+j*t*i),l=G(2/(1+c*c)),g=G((j*a+(t+e)*i)/(j*a+(t-e)*i));return[bn*(l*(g-1/g)-2*f(g)),bn*(l*c*(g+1/g)-2*o(c))]}jn.invert=function(n,r){if(!(e=H.invert(n/1.2,1.065*r)))return null;var e,i=e[0],a=e[1],c=20;n/=bn,r/=bn;do{var v=i/2,s=a/2,p=h(v),d=u(v),y=h(s),m=u(s),R=u(a),M=G(R),E=y/(m+j*d*M),S=E*E,k=G(2/(1+S)),A=(j*m+(d+p)*M)/(j*m+(d-p)*M),x=G(A),C=x-1/x,N=x+1/x,F=k*C-2*f(x)-n,z=k*E*N-2*o(E)-r,L=y&&b*M*p*S/y,q=(j*d*m+M)/(2*(m+j*d*M)*(m+j*d*M)*M),B=-.5*E*k*k*k,W=B*L,I=B*q,D=(D=2*m+j*M*(d-p))*D*x,Q=(j*d*m*M+R)/D,T=-j*p*y/(M*D),V=C*W-2*Q/x+k*(Q+Q/A),_=C*I-2*T/x+k*(T+T/A),K=E*N*W-2*L/(1+S)+k*N*L+k*E*(Q-Q/A),O=E*N*I-2*q/(1+S)+k*N*q+k*E*(T-T/A),U=_*K-O*V;if(!U)break;var J=(z*_-F*O)/U,X=(F*K-z*V)/U;i-=J,a=l(-P,g(P,a-X))}while((t(J)>w||t(X)>w)&&--c>0);return t(t(a)-P)a){var p=G(v),d=i(g,l),y=o*s(d/o),R=d-y,b=n*u(R),j=(n*h(R)-R*h(b))/(P-b),M=Cn(R,j),E=(m-n)/Nn(M,b,m);l=p;var S,k=50;do{l-=S=(n+Nn(M,b,l)*E-p)/(M(l)*E)}while(t(S)>w&&--k>0);g=R*h(l),la){var l=G(f),g=i(c,e),v=o*s(g/o),p=g-v;e=l*u(p),c=l*h(p);for(var d=e-P,w=h(e),R=c/w,b=ew||t(s)>w)&&--y>0);return[p,d]},l}En.invert=function(n,r){var e=r/(1+Mn);return[n&&n/(Mn*G(1-e*e)),2*o(e)]},Sn.invert=function(n,r){var e=o(r/M),t=u(e),i=2*e;return[n*M/2/(u(i)*t*t),i]};var zn=Fn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ln=Fn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var Hn=Fn(5/6*m,-.62636,-.0344,0,1.3493,-.05524,0,.045);function qn(n,r){var e=n*n,t=r*r;return[n*(1-.162388*t)*(.87-952426e-9*e*e),r*(1+t/12)]}qn.invert=function(n,r){var e,o=n,i=r,u=50;do{var a=i*i;i-=e=(i*(1+a/12)-r)/(1+a/4)}while(t(e)>w&&--u>0);u=50,n/=1-.162388*a;do{var c=(c=o*o)*c;o-=e=(o*(.87-952426e-9*c)-n)/(.87-.00476213*c)}while(t(e)>w&&--u>0);return[o,i]};var Bn=Fn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Wn(n){var r=n(P,0)[0]-n(-P,0)[0];function e(e,t){var o=e>0?-.5:.5,i=n(e+o*m,t);return i[0]-=o*r,i}return n.invert&&(e.invert=function(e,t){var o=e>0?-.5:.5,i=n.invert(e+o*r,t),u=i[0]-o*m;return u<-m?u+=2*m:u>m&&(u-=2*m),i[0]=u,i}),e}function In(n,r){var e=p(n),o=p(r),a=u(r),c=u(n)*a,f=h(n)*a,l=h(o*r);n=t(i(f,l)),r=A(c),t(n-P)>w&&(n%=P);var g=function(n,r){if(r===P)return[0,0];var e,o,i=h(r),a=i*i,c=a*a,f=1+c,l=1+3*c,g=1-c,v=A(1/G(f)),s=g+a*f*v,p=(1-i)/s,d=G(p),y=p*f,R=G(y),b=d*g;if(0===n)return[0,-(b+a*R)];var j,M=u(r),E=1/M,S=2*i*M,k=(-s*M-(-3*a+v*l)*S*(1-i))/(s*s),x=-E*S,C=-E*(a*f*k+p*l*S),N=-2*E*(g*(.5*k/d)-2*a*d*S),F=4*n/m;if(n>.222*m||r.175*m){if(e=(b+a*G(y*(1+c)-b*b))/(1+c),n>m/4)return[e,e];var z=e,L=.5*e;e=.5*(L+z),o=50;do{var H=G(y-e*e),q=e*(N+x*H)+C*A(e/R)-F;if(!q)break;q<0?L=e:z=e,e=.5*(L+z)}while(t(z-L)>w&&--o>0)}else{e=w,o=25;do{var B=e*e,W=G(y-B),I=N+x*W,D=e*I+C*A(e/R)-F,Q=I+(C-x*B)/W;e-=j=W?D/Q:0}while(t(j)>w&&--o>0)}return[e,-b-a*G(y-e*e)]}(n>m/4?P-n:n,r);return n>m/4&&(l=g[0],g[0]=-g[1],g[1]=-l),g[0]*=e,g[1]*=-o,g}function Dn(n,r){var e,i,c,f,l,g;if(r=1-w)return e=(1-r)/4,c=1/(i=N(n)),[(f=((g=a(2*(g=n)))-1)/(g+1))+e*((l=i*C(n))-n)/(i*i),c-e*f*c*(l-n),c+e*f*c*(l+n),2*o(a(n))-P+e*(l-n)/i];var v=[1,0,0,0,0,0,0,0,0],s=[G(r),0,0,0,0,0,0,0,0],p=0;for(i=G(1-r),l=1;t(s[p]/v[p])>w&&p<8;)e=v[p++],s[p]=(e-i)/2,v[p]=(e+i)/2,i=G(e*i),l*=2;c=l*v[p]*n;do{c=(A(f=s[p]*h(i=c)/v[p])+c)/2}while(--p);return[h(c),f=u(c),f/u(c-i),c]}function Qn(n,r){if(!r)return n;if(1===r)return f(d(n/2+R));for(var e=1,i=G(1-r),u=G(r),a=0;t(u)>w;a++){if(n%m){var c=o(i*d(n)/e);c<0&&(c+=m),n+=c+~~(n/m)*m}else n+=n;u=(e+i)/2,i=G(e*i),u=((e=u)-i)/2}return n/(v(2,a)*e)}function Tn(n,r){var e=(j-1)/(j+1),c=G(1-e*e),l=Qn(P,c*c),g=f(d(m/4+t(r)/2)),v=a(-1*g)/G(e),s=function(n,r){var e=n*n,t=r+1,o=1-e-r*r;return[.5*((n>=0?P:-P)-i(o,2*n)),-.25*f(o*o+4*e)+.5*f(t*t+e)]}(v*u(-1*n),v*h(-1*n)),w=function(n,r,e){var i=t(n),u=C(t(r));if(i){var a=1/h(i),c=1/(d(i)*d(i)),f=-(c+e*(u*u*a*a)-1+e),l=(-f+G(f*f-(e-1)*c*4))/2;return[Qn(o(1/G(l)),e)*p(n),Qn(o(G((l/c-1)/e)),1-e)*p(r)]}return[0,Qn(o(u),1-e)*p(r)]}(s[0],s[1],c*c);return[-w[1],(r>=0?1:-1)*(.5*l-w[0])]}function Vn(n){var r=h(n),e=u(n),o=_n(n);function a(n,i){var a=o(n,i);n=a[0],i=a[1];var c=h(i),f=u(i),l=u(n),g=x(r*c+e*f*l),v=h(g),s=t(v)>w?g/v:1;return[s*e*h(n),(t(n)>P?s:-s)*(r*f-e*c*l)]}return o.invert=_n(-n),a.invert=function(n,e){var t=G(n*n+e*e),a=-h(t),c=u(t),f=t*c,l=-e*a,g=t*r,v=G(f*f+l*l-g*g),s=i(f*g+l*v,l*g-f*v),p=(t>P?-1:1)*i(n*a,t*u(s)*c+e*h(s)*a);return o.invert(p,s)},a}function _n(n){var r=h(n),e=u(n);return function(n,t){var o=u(t),a=u(n)*o,c=h(n)*o,f=h(t);return[i(c,a*e-f*r),A(f*e+a*r)]}}In.invert=function(n,r){t(n)>1&&(n=2*p(n)-n),t(r)>1&&(r=2*p(r)-r);var e=p(n),o=p(r),a=-e*n,c=-o*r,f=c/a<1,l=function(n,r){var e=0,o=1,i=.5,a=50;for(;;){var c=i*i,f=G(i),l=A(1/G(1+c)),g=1-c+i*(1+c)*l,v=(1-f)/g,s=G(v),p=v*(1+c),h=s*(1-c),d=p-n*n,w=G(d),P=r+h+i*w;if(t(o-e)0?e=i:o=i,i=.5*(e+o)}if(!a)return null;var R=A(f),b=u(R),j=1/b,M=2*f*b,E=(-g*b-(-3*i+l*(1+3*c))*M*(1-f))/(g*g);return[m/4*(n*(-2*j*(.5*E/s*(1-c)-2*i*s*M)+-j*M*w)+-j*(i*(1+c)*E+v*(1+3*c)*M)*A(n/G(p))),R]}(f?c:a,f?a:c),g=l[0],v=l[1],s=u(v);return f&&(g=-P-g),[e*(i(h(g)*s,-h(v))+m),o*A(u(g)*s)]},Tn.invert=function(n,r){var e,t,u,c,l,g,v=(j-1)/(j+1),s=G(1-v*v),p=Qn(P,s*s),h=(t=-n,u=s*s,(e=.5*p-r)?(c=Dn(e,u),t?(g=(l=Dn(t,1-u))[1]*l[1]+u*c[0]*c[0]*l[0]*l[0],[[c[0]*l[2]/g,c[1]*c[2]*l[0]*l[1]/g],[c[1]*l[1]/g,-c[0]*c[2]*l[0]*l[2]/g],[c[2]*l[1]*l[2]/g,-u*c[0]*c[1]*l[0]/g]]):[[c[0],0],[c[1],0],[c[2],0]]):[[0,(l=Dn(t,1-u))[0]/l[1]],[1/l[1],0],[l[2]/l[1],0]]),d=function(n,r){var e=r[0]*r[0]+r[1]*r[1];return[(n[0]*r[0]+n[1]*r[1])/e,(n[1]*r[0]-n[0]*r[1])/e]}(h[0],h[1]);return[i(d[1],d[0])/-1,2*o(a(-.5*f(v*d[0]*d[0]+v*d[1]*d[1])))-P]};var Kn=A(1-1/3)*S,On=pn(0);function Un(n){var r=Kn*k,e=ln(m,r)[0]-ln(-m,r)[0],o=On(0,r)[1],i=ln(0,r)[1],u=M-i,a=E/n,f=4/E,v=o+u*u*4/E;function s(s,p){var h,d=t(p);if(d>r){var w=g(n-1,l(0,c((s+m)/a)));(h=ln(s+=m*(n-1)/n-w*a,d))[0]=h[0]*E/e-E*(n-1)/(2*n)+w*E/n,h[1]=o+4*(h[1]-i)*u/E,p<0&&(h[1]=-h[1])}else h=On(s,p);return h[0]*=f,h[1]/=v,h}return s.invert=function(r,s){r/=f;var p=t(s*=v);if(p>o){var h=g(n-1,l(0,c((r+m)/a)));r=(r+m*(n-1)/n-h*a)*e/E;var d=ln.invert(r,.25*(p-o)*E/u+i);return d[0]-=m*(n-1)/n-h*a,s<0&&(d[1]=-d[1]),d}return On.invert(r,s)},s}function Jn(n,r){return[n,1&r?90-w:Kn]}function Xn(n,r){return[n,1&r?-90+w:-Kn]}function Yn(n){return[n[0]*(1-w),n[1]]}function Zn(n){var r,e=1+n,o=A(h(1/e)),a=2*G(m/(r=m+4*o*e)),c=.5*a*(e+G(n*(2+n))),f=n*n,l=e*e;function g(g,v){var s,p,d=1-h(v);if(d&&d<2){var w,R=P-v,b=25;do{var j=h(R),M=u(R),E=o+i(j,e-M),S=1+l-2*e*M;R-=w=(R-f*o-e*j+S*E-.5*d*r)/(2*e*j*E)}while(t(w)>y&&--b>0);s=a*G(S),p=g*E/m}else s=a*(n+d),p=g*o/m;return[s*h(p),c-s*u(p)]}return g.invert=function(n,t){var u=n*n+(t-=c)*t,g=(1+l-u/(a*a))/(2*e),v=x(g),s=h(v),p=o+i(s,e-g);return[A(n/G(u))*m/p,A(1-2*(v-f*o-e*s+(1+l-2*e*g)*p)/r)]},g}var $n=.7109889596207567,nr=.0528035274542;function rr(n,r){return r>-$n?((n=U(n,r))[1]+=nr,n):$(n,r)}function er(n,r){return t(r)>$n?((n=U(n,r))[1]-=r>0?nr:-nr,n):$(n,r)}function tr(n,r,e,t){var o=G(4*m/(2*e+(1+n-r/2)*h(2*e)+(n+r)/2*h(4*e)+r/2*h(6*e))),i=G(t*h(e)*G((1+n*u(2*e)+r*u(4*e))/(1+n+r))),a=e*f(1);function c(e){return G(1+n*u(2*e)+r*u(4*e))}function f(t){var o=t*e;return(2*o+(1+n-r/2)*h(2*o)+(n+r)/2*h(4*o)+r/2*h(6*o))/e}function l(n){return c(n)*h(n)}var g=function(n,r){var t=e*T(f,a*h(r)/e,r/m);isNaN(t)&&(t=e*p(r));var l=o*c(t);return[l*i*n/m*u(t),l/i*h(t)]};return g.invert=function(n,r){var t=T(l,r*i/o);return[n*m/(u(t)*o*i*c(t)),A(e*f(t/e)/a)]},0===e&&(o=G(t/m),(g=function(n,r){return[n*o,h(r)/o]}).invert=function(n,r){return[n/o,A(r*o)]}),g}function or(n,r,e,t,o){void 0===t&&(t=1e-8),void 0===o&&(o=20);var i=n(r),u=n(.5*(r+e)),a=n(e);return function n(r,e,t,o,i,u,a,c,f,l,g){if(g.nanEncountered)return NaN;var v,s,p,h,d,w,y,m,P,R;if(s=r(e+.25*(v=t-e)),p=r(t-.25*v),isNaN(s))g.nanEncountered=!0;else{if(!isNaN(p))return R=((w=(h=v*(o+4*s+i)/12)+(d=v*(i+4*p+u)/12))-a)/15,l>f?(g.maxDepthCount++,w+R):Math.abs(R)>1;do{f[t]>n?e=t:r=t,t=r+e>>1}while(t>r);var o=f[t+1]-f[t];return o&&(o=(n-f[t+1])/o),(t+1+o)/a}var s=2*g(1)/m*u/e,d=function(n,r){var e=g(t(h(r))),i=o(e)*n;return e/=s,[i,r>=0?e:-e]};return d.invert=function(n,r){var e;return t(r*=s)<1&&(e=p(r)*A(i(t(r))*u)),[n/o(t(r)),e]},d}function ur(n,r){return t(n[0]-r[0])i[u][2][0];++u);var c=n(r-i[u][1][0],e);return c[0]+=n(i[u][1][0],o*e>o*i[u][0][1]?i[u][0][1]:e)[0],c}o?a.invert=o(a):n.invert&&(a.invert=function(r,e){for(var o=u[+(e<0)],i=t[+(e<0)],c=0,f=o.length;c=0;--c)t=(r=n[1][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(ar([[u-w,a-w],[u-w,i+w],[t+w,i+w],[t+w,o-w]],30));return{type:"Polygon",coordinates:[e.merge(f)]}}(r),t=r.map(function(n){return n.map(function(n){return[[n[0][0]*k,n[0][1]*k],[n[1][0]*k,n[1][1]*k],[n[2][0]*k,n[2][1]*k]]})}),u=t.map(function(r){return r.map(function(r){var e,t=n(r[0][0],r[0][1])[0],o=n(r[2][0],r[2][1])[0],i=n(r[1][0],r[0][1])[1],u=n(r[1][0],r[1][1])[1];return i>u&&(e=i,i=u,u=e),[[t,i],[o,u]]})}),c):t.map(function(n){return n.map(function(n){return[[n[0][0]*S,n[0][1]*S],[n[1][0]*S,n[1][1]*S],[n[2][0]*S,n[2][1]*S]]})})},null!=t&&c.lobes(t),c}rr.invert=function(n,r){return r>-$n?U.invert(n,r-nr):$.invert(n,r)},er.invert=function(n,r){return t(r)>$n?U.invert(n,r+(r>0?nr:-nr)):$.invert(n,r)};var fr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var lr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var gr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var vr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var sr=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var pr=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function hr(n,r){return[3/E*n*G(m*m/3-r*r),r]}function dr(n){function r(r,e){if(t(t(e)-P)2)return null;var u=(r/=2)*r,a=(e/=2)*e,c=2*e/(1+u+a);return c=v((1+c)/(1-c),1/n),[i(2*r,1-u-a)/n,A((c-1)/(c+1))]},r}hr.invert=function(n,r){return[E/3*n/G(m*m/3-r*r),r]};var wr=m/j;function yr(n,r){return[n*(1+G(u(r)))/2,r/(u(r/2)*u(n/6))]}function mr(n,r){var e=n*n,t=r*r;return[n*(.975534+t*(-.0143059*e-.119161+-.0547009*t)),r*(1.00384+e*(.0802894+-.02855*t+199025e-9*e)+t*(.0998909+-.0491032*t))]}function Pr(n,r){return[h(n)/u(r),d(r)*u(n)]}function Rr(n){var r=u(n),e=d(R+n/2);function o(o,i){var u=i-n,a=t(u)=0;)v=(g=n[l])[0]+c*(o=v)-f*s,s=g[1]+c*s+f*o;return[v=c*(o=v)-f*s,s=c*s+f*o]}return e.invert=function(e,a){var c=20,f=e,l=a;do{for(var g,v=r,s=n[v],p=s[0],d=s[1],y=0,m=0;--v>=0;)y=p+f*(g=y)-l*m,m=d+f*m+l*g,p=(s=n[v])[0]+f*(g=p)-l*d,d=s[1]+f*d+l*g;var P,R,b=(y=p+f*(g=y)-l*m)*y+(m=d+f*m+l*g)*m;f-=P=((p=f*(g=p)-l*d-e)*y+(d=f*d+l*g-a)*m)/b,l-=R=(d*y-p*m)/b}while(t(P)+t(R)>w*w&&--c>0);if(c){var j=G(f*f+l*l),M=2*o(.5*j),E=h(M);return[i(f*E,j*u(M)),j?A(l*E/j):0]}},e}yr.invert=function(n,r){var e=t(n),o=t(r),i=w,a=P;ow||t(P)>w)&&--i>0);return i&&[e,o]},Pr.invert=function(n,r){var e=n*n,t=r*r+1,o=e+t,i=n?b*G((o-G(o*o-4*e))/e):1/G(t);return[A(n*i),p(r)*x(i)]},br.invert=function(n,r){return[n,2.5*o(a(.8*r))-.625*m]};var Mr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Er=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Sr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],kr=[[.9245,0],[0,0],[.01943,0]],Ar=[[.721316,0],[0,0],[-.00881625,-.00617325]];function xr(n,e){var t=r.geoProjection(jr(n)).rotate(e).clipAngle(90),o=r.geoRotation(e),i=t.center;return delete t.rotate,t.center=function(n){return arguments.length?i(o(n)):o.invert(i())},t}var Gr=G(6),Cr=G(7);function Nr(n,r){var e=A(7*h(r)/(3*Gr));return[Gr*n*(2*u(2*e/3)-1)/Cr,9*h(e/3)/Cr]}function Fr(n,r){for(var e,o=(1+b)*h(r),i=r,a=0;a<25&&(i-=e=(h(i/2)+h(i)-o)/(.5*u(i/2)+u(i)),!(t(e)y&&--c>0);return[n/(.84719-.13063*(o=a*a)+(u=o*(i=o*o))*u*(.05494*o-.04515-.02326*i+.00331*u)),a]},Hr.invert=function(n,r){for(var e=r/2,o=0,i=1/0;o<10&&t(i)>w;++o){var a=u(r/2);r-=i=(r-d(r/2)-e)/(1-.5/(a*a))}return[2*n/(1+u(r)),r]};var qr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Br(n,r){var e=h(r),o=u(r),i=p(n);if(0===n||t(r)===P)return[0,r];if(0===r)return[n,0];if(t(n)===P)return[n*o,P*e];var a=m/(2*n)-2*n/m,c=2*r/m,f=(1-c*c)/(e-c),l=a*a,g=f*f,v=1+l/g,s=1+g/l,d=(a*e/f-a/2)/v,w=(g*e/l+f/2)/s,y=w*w-(g*e*e/l+f*e-1)/s;return[P*(d+G(d*d+o*o/v)*i),P*(w+G(y<0?0:y)*p(-r*a)*i)]}Br.invert=function(n,r){var e=(n/=P)*n,t=e+(r/=P)*r,o=m*m;return[n?(t-1+G((1-t)*(1-t)+4*e))/(2*n)*P:0,T(function(n){return t*(m*h(n)-2*n)*m+4*n*n*(r-h(n))+2*m*n-o*r},0)]};var Wr=1.0148,Ir=.23185,Dr=-.14499,Qr=.02406,Tr=Wr,Vr=5*Ir,_r=7*Dr,Kr=9*Qr;function Or(n,r){var e=r*r;return[n,r*(Wr+e*e*(Ir+e*(Dr+Qr*e)))]}function Ur(n,r){if(t(r)=0;)if(t=r[a],e[0]===t[0]&&e[1]===t[1]){if(i)return[i,e];i=e}}}(r.face,e.face),o=Jr(t.map(e.project),t.map(r.project));r.transform=e.transform?Xr(e.transform,o):o;for(var i=e.edges,u=0,a=i.length;u1.790857183?r=1.790857183:r<-1.790857183&&(r=-1.790857183);var e,o=r;do{var i=o*o;o-=e=(o*(Wr+i*i*(Ir+i*(Dr+Qr*i)))-r)/(Tr+i*i*(Vr+i*(_r+Kr*i)))}while(t(e)>w);return[n,o]},Ur.invert=function(n,r){if(t(r)w&&--a>0);return c=d(i),[(t(r)t^s>t&&e<(v-f)*(t-l)/(s-l)+f&&(o=!o)}return o}(n[0],e))return n.push(r),!0})||n.push([r])}),pe=[],n.length?n.length>1?{type:"MultiPolygon",coordinates:n}:{type:"Polygon",coordinates:n[0]}:null}};function ye(n){var e=n(P,0)[0]-n(-P,0)[0];function o(r,o){var i=t(r)0?r-m:r+m,o),a=(u[0]-u[1])*b,c=(u[0]+u[1])*b;if(i)return[a,c];var f=e*b,l=a>0^c>0?-1:1;return[l*a-p(c)*f,l*c-p(a)*f]}return n.invert&&(o.invert=function(r,o){var i=(r+o)*b,u=(o-r)*b,a=t(i)<.5*e&&t(u)<.5*e;if(!a){var c=e*b,f=i>0^u>0?-1:1,l=-f*r+(u>0?1:-1)*c,g=-f*o+(i>0?1:-1)*c;i=(-l-g)*b,u=(l-g)*b}var v=n.invert(i,u);return a||(v[0]+=i>0?m:-m),v}),r.geoProjection(o).rotate([-90,-90,45]).clipAngle(179.999)}function me(){return ye(Tn).scale(111.48)}function Pe(n){var r=h(n);function e(e,t){var i=r?d(e*r/2)/r:e/2;if(!t)return[2*i,-n];var a=2*o(i*h(t)),c=1/d(t);return[h(a)*c,t+(1-u(a))*c-n]}return e.invert=function(e,i){if(t(i+=n)w&&--l>0);var p=e*(g=d(f)),y=d(t(i)0?P:-P)*(v+u*(p-f)/2+u*u*(p-2*v+f)/2)]}function je(n,r){var e=function(n){function r(r,e){var t=u(e),o=(n-1)/(n-t*u(r));return[o*t*h(r),o*h(e)]}return r.invert=function(r,e){var t=r*r+e*e,o=G(t),u=(n-G(1-t*(n+1)/(n-1)))/((n-1)/o+o/(n-1));return[i(r*u,o*G(1-u*u)),o?A(e*u/o):0]},r}(n);if(!r)return e;var t=u(r),o=h(r);function a(r,i){var u=e(r,i),a=u[1],c=a*o/(n-1)+t;return[u[0]*t/c,a/c]}return a.invert=function(r,i){var u=(n-1)/(n-1-i*o);return e.invert(u*r,u*i*t)},a}Re.forEach(function(n){n[1]*=1.0144}),be.invert=function(n,r){var e=r/P,o=90*e,i=g(18,t(o/5)),u=l(0,c(i));do{var a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],s=v-a,p=v-2*f+a,h=2*(t(e)-f)/s,d=p/s,w=h*(1-d*h*(1-2*d*h));if(w>=0||1===u){o=(r>=0?5:-5)*(w+i);var m,R=50;do{w=(i=g(18,t(o)/5))-(u=c(i)),a=Re[u][1],f=Re[u+1][1],v=Re[g(19,u+2)][1],o-=(m=(r>=0?P:-P)*(f+w*(v-a)/2+w*w*(v-2*f+a)/2)-r)*S}while(t(m)>y&&--R>0);break}}while(--u>=0);var b=Re[u][0],j=Re[u+1][0],M=Re[g(19,u+2)][0];return[n/(j+w*(M-b)/2+w*w*(M-2*j+b)/2),o*k]};var Me=1e4,Ee=-180,Se=Ee+1e-4,ke=180,Ae=ke-1e-4,xe=-90,Ge=xe+1e-4,Ce=90,Ne=Ce-1e-4;function Fe(n){return n.length>0}function ze(n){return n===xe||n===Ce?[0,n]:[Ee,(r=n,Math.floor(r*Me)/Me)];var r}function Le(n){var r=n[0],e=n[1],t=!1;return r<=Se?(r=Ee,t=!0):r>=Ae&&(r=ke,t=!0),e<=Ge?(e=xe,t=!0):e>=Ne&&(e=Ce,t=!0),t?[r,e]:n}function He(n){return n.map(Le)}function qe(n,r,e){for(var t=0,o=n.length;t=Ae||l<=Ge||l>=Ne){i[u]=Le(c);for(var g=u+1;gSe&&sGe&&p=a)break;e.push({index:-1,polygon:r,ring:i=i.slice(g-1)}),i[0]=ze(i[0][1]),u=-1,a=i.length}}}}function Be(n){var r,e,t,o,i,u,a=n.length,c={},f={};for(r=0;r0?m-c:c)*S],l=r.geoProjection(n(a)).rotate(f),g=r.geoRotation(f),v=l.center;return delete l.rotate,l.center=function(n){return arguments.length?v(g(n)):g.invert(v())},l.clipAngle(90)}function Te(n){var e=u(n);function t(n,t){var o=r.geoGnomonicRaw(n,t);return o[0]*=e,o}return t.invert=function(n,t){return r.geoGnomonicRaw.invert(n/e,t)},t}function Ve(n,r){return Qe(Te,n,r)}function _e(n){if(!(n*=2))return r.geoAzimuthalEquidistantRaw;var e=-n/2,t=-e,o=n*n,a=d(t),c=.5/h(t);function f(r,i){var a=x(u(i)*u(r-e)),c=x(u(i)*u(r-t));return[((a*=a)-(c*=c))/(2*n),(i<0?-1:1)*G(4*o*c-(o-a+c)*(o-a+c))/(2*n)]}return f.invert=function(n,r){var o,f,l=r*r,g=u(G(l+(o=n+e)*o)),v=u(G(l+(o=n+t)*o));return[i(f=g-v,o=(g+v)*a),(r<0?-1:1)*x(G(o*o+f*f)*c)]},f}function Ke(n,r){return Qe(_e,n,r)}function Oe(n,r){if(t(r)w&&--c>0);return[p(n)*(G(i*i+4)+i)*m/4,P*a]};var $e=4*m+3*G(3),nt=2*G(2*m*G(3)/$e),rt=O(nt*G(3)/m,nt,$e/6);function et(n,r){return[n*G(1-3*r*r/(m*m)),r]}function tt(n,r){var e=u(r),t=u(n)*e,o=1-t,a=u(n=i(h(n)*e,-h(r))),c=h(n);return[c*(e=G(1-t*t))-a*o,-a*e-c*o]}function ot(n,r){var e=z(n,r);return[(e[0]+n/P)/2,(e[1]+r)/2]}et.invert=function(n,r){return[n/G(1-3*r*r/(m*m)),r]},tt.invert=function(n,r){var e=(n*n+r*r)/-2,t=G(-e*(2+e)),o=r*e+n*t,u=n*e-r*t,a=G(u*u+o*o);return[i(t*o,a*(1+e)),a?-A(t*u/a):0]},ot.invert=function(n,r){var e=n,o=r,i=25;do{var a,c=u(o),f=h(o),l=h(2*o),g=f*f,v=c*c,s=h(e),p=u(e/2),d=h(e/2),y=d*d,m=1-v*p*p,R=m?x(c*p)*G(a=1/m):a=0,b=.5*(2*R*c*d+e/P)-n,j=.5*(R*f+o)-r,M=.5*a*(v*y+R*c*p*g)+.5/P,E=a*(s*l/4-R*f*d),S=.125*a*(l*d-R*f*v*s),k=.5*a*(g*p+R*y*c)+.5,A=E*S-k*M,C=(j*E-b*k)/A,N=(b*S-j*M)/A;e-=C,o-=N}while((t(C)>w||t(N)>w)&&--i>0);return[e,o]},n.geoNaturalEarth=r.geoNaturalEarth1,n.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,n.geoAiry=function(){var n=P,e=r.geoProjectionMutator(F),t=e(n);return t.radius=function(r){return arguments.length?e(n=r*k):n*S},t.scale(179.976).clipAngle(147)},n.geoAiryRaw=F,n.geoAitoff=function(){return r.geoProjection(z).scale(152.63)},n.geoAitoffRaw=z,n.geoArmadillo=function(){var n=20*k,e=n>=0?1:-1,t=d(e*n),o=r.geoProjectionMutator(L),a=o(n),c=a.stream;return a.parallel=function(r){return arguments.length?(t=d((e=(n=r*k)>=0?1:-1)*n),o(n)):n*S},a.stream=function(r){var o=a.rotate(),f=c(r),l=(a.rotate([0,0]),c(r)),g=a.precision();return a.rotate(o),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=-180*e;e*r<180;r+=90*e)l.point(r,90*e);if(n)for(;e*(r-=3*e*g)>=-180;)l.point(r,e*-i(u(r*k/2),t)*S);l.lineEnd(),l.polygonEnd()},f},a.scale(218.695).center([0,28.0974])},n.geoArmadilloRaw=L,n.geoAugust=function(){return r.geoProjection(H).scale(66.1603)},n.geoAugustRaw=H,n.geoBaker=function(){return r.geoProjection(W).scale(112.314)},n.geoBakerRaw=W,n.geoBerghaus=function(){var n=5,e=r.geoProjectionMutator(I),t=e(n),o=t.stream,a=-u(.01*k),c=h(.01*k);return t.lobes=function(r){return arguments.length?e(n=+r):n},t.stream=function(r){var e=t.rotate(),f=o(r),l=(t.rotate([0,0]),o(r));return t.rotate(e),f.sphere=function(){l.polygonStart(),l.lineStart();for(var r=0,e=360/n,t=2*m/n,o=90-180/n,f=P;r=0;)n.point((r=e[o])[0],r[1]);n.lineEnd(),n.polygonEnd()},n},t.scale(79.4187).parallel(45).clipAngle(179.999)},n.geoHammerRetroazimuthalRaw=Vn,n.geoHealpix=function(){var n=4,t=r.geoProjectionMutator(Un),o=t(n),i=o.stream;return o.lobes=function(r){return arguments.length?t(n=+r):n},o.stream=function(t){var u=o.rotate(),a=i(t),c=(o.rotate([0,0]),i(t));return o.rotate(u),a.sphere=function(){var t,o;r.geoStream((t=180/n,o=[].concat(e.range(-180,180+t/2,t).map(Jn),e.range(180,-180-t/2,-t).map(Xn)),{type:"Polygon",coordinates:[180===t?o.map(Yn):o]}),c)},a},o.scale(239.75)},n.geoHealpixRaw=Un,n.geoHill=function(){var n=1,e=r.geoProjectionMutator(Zn),t=e(n);return t.ratio=function(r){return arguments.length?e(n=+r):n},t.scale(167.774).center([0,18.67])},n.geoHillRaw=Zn,n.geoHomolosine=function(){return r.geoProjection(er).scale(152.63)},n.geoHomolosineRaw=er,n.geoHufnagel=function(){var n=1,e=0,t=45*k,o=2,i=r.geoProjectionMutator(tr),u=i(n,e,t,o);return u.a=function(r){return arguments.length?i(n=+r,e,t,o):n},u.b=function(r){return arguments.length?i(n,e=+r,t,o):e},u.psiMax=function(r){return arguments.length?i(n,e,t=+r*k,o):t*S},u.ratio=function(r){return arguments.length?i(n,e,t,o=+r):o},u.scale(180.739)},n.geoHufnagelRaw=tr,n.geoHyperelliptical=function(){var n=0,e=2.5,t=1.183136,o=r.geoProjectionMutator(ir),i=o(n,e,t);return i.alpha=function(r){return arguments.length?o(n=+r,e,t):n},i.k=function(r){return arguments.length?o(n,e=+r,t):e},i.gamma=function(r){return arguments.length?o(n,e,t=+r):t},i.scale(152.63)},n.geoHyperellipticalRaw=ir,n.geoInterrupt=cr,n.geoInterruptedBoggs=function(){return cr(Y,fr).scale(160.857)},n.geoInterruptedHomolosine=function(){return cr(er,lr).scale(152.63)},n.geoInterruptedMollweide=function(){return cr(U,gr).scale(169.529)},n.geoInterruptedMollweideHemispheres=function(){return cr(U,vr).scale(169.529).rotate([20,0])},n.geoInterruptedSinuMollweide=function(){return cr(rr,sr,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoInterruptedSinusoidal=function(){return cr($,pr).scale(152.63).rotate([-20,0])},n.geoKavrayskiy7=function(){return r.geoProjection(hr).scale(158.837)},n.geoKavrayskiy7Raw=hr,n.geoLagrange=function(){var n=.5,e=r.geoProjectionMutator(dr),t=e(n);return t.spacing=function(r){return arguments.length?e(n=+r):n},t.scale(124.75)},n.geoLagrangeRaw=dr,n.geoLarrivee=function(){return r.geoProjection(yr).scale(97.2672)},n.geoLarriveeRaw=yr,n.geoLaskowski=function(){return r.geoProjection(mr).scale(139.98)},n.geoLaskowskiRaw=mr,n.geoLittrow=function(){return r.geoProjection(Pr).scale(144.049).clipAngle(89.999)},n.geoLittrowRaw=Pr,n.geoLoximuthal=function(){return Z(Rr).parallel(40).scale(158.837)},n.geoLoximuthalRaw=Rr,n.geoMiller=function(){return r.geoProjection(br).scale(108.318)},n.geoMillerRaw=br,n.geoModifiedStereographic=xr,n.geoModifiedStereographicRaw=jr,n.geoModifiedStereographicAlaska=function(){return xr(Mr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},n.geoModifiedStereographicGs48=function(){return xr(Er,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},n.geoModifiedStereographicGs50=function(){return xr(Sr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},n.geoModifiedStereographicMiller=function(){return xr(kr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},n.geoModifiedStereographicLee=function(){return xr(Ar,[165,10]).scale(250).clipAngle(130).center([-165,-10])},n.geoMollweide=function(){return r.geoProjection(U).scale(169.529)},n.geoMollweideRaw=U,n.geoMtFlatPolarParabolic=function(){return r.geoProjection(Nr).scale(164.859)},n.geoMtFlatPolarParabolicRaw=Nr,n.geoMtFlatPolarQuartic=function(){return r.geoProjection(Fr).scale(188.209)},n.geoMtFlatPolarQuarticRaw=Fr,n.geoMtFlatPolarSinusoidal=function(){return r.geoProjection(zr).scale(166.518)},n.geoMtFlatPolarSinusoidalRaw=zr,n.geoNaturalEarth2=function(){return r.geoProjection(Lr).scale(175.295)},n.geoNaturalEarth2Raw=Lr,n.geoNellHammer=function(){return r.geoProjection(Hr).scale(152.63)},n.geoNellHammerRaw=Hr,n.geoInterruptedQuarticAuthalic=function(){return cr(D(1/0),qr).rotate([20,0]).scale(152.63)},n.geoNicolosi=function(){return r.geoProjection(Br).scale(127.267)},n.geoNicolosiRaw=Br,n.geoPatterson=function(){return r.geoProjection(Or).scale(139.319)},n.geoPattersonRaw=Or,n.geoPolyconic=function(){return r.geoProjection(Ur).scale(103.74)},n.geoPolyconicRaw=Ur,n.geoPolyhedral=$r,n.geoPolyhedralButterfly=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n0?[-e[0],0]:[180-e[0],180])};var e=te.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),$r(e[0],function(n,r){return e[n<-m/2?r<0?6:4:n<0?r<0?2:0:n2||i[0]!=r[0]||i[1]!=r[1])&&(t.push(i),r=i)}return 1===t.length&&n.length>1&&t.push(e(n[n.length-1])),t}function i(n){return n.map(o)}function u(n){if(null==n)return n;var r;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(u)};break;case"Point":r={type:"Point",coordinates:e(n.coordinates)};break;case"MultiPoint":r={type:n.type,coordinates:t(n.coordinates)};break;case"LineString":r={type:n.type,coordinates:o(n.coordinates)};break;case"MultiLineString":case"Polygon":r={type:n.type,coordinates:i(n.coordinates)};break;case"MultiPolygon":r={type:"MultiPolygon",coordinates:n.coordinates.map(i)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function a(n){var r={type:"Feature",properties:n.properties,geometry:u(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),r}if(null!=n)switch(n.type){case"Feature":return a(n);case"FeatureCollection":var c={type:"FeatureCollection",features:n.features.map(a)};return null!=n.bbox&&(c.bbox=n.bbox),c;default:return u(n)}return n},n.geoQuincuncial=ye,n.geoRectangularPolyconic=function(){return Z(Pe).scale(131.215)},n.geoRectangularPolyconicRaw=Pe,n.geoRobinson=function(){return r.geoProjection(be).scale(152.63)},n.geoRobinsonRaw=be,n.geoSatellite=function(){var n=2,e=0,t=r.geoProjectionMutator(je),o=t(n,e);return o.distance=function(r){return arguments.length?t(n=+r,e):n},o.tilt=function(r){return arguments.length?t(n,e=r*k):e*S},o.scale(432.147).clipAngle(x(1/n)*S-1e-6)},n.geoSatelliteRaw=je,n.geoSinuMollweide=function(){return r.geoProjection(rr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoSinuMollweideRaw=rr,n.geoSinusoidal=function(){return r.geoProjection($).scale(152.63)},n.geoSinusoidalRaw=$,n.geoStitch=function(n){if(null==n)return n;switch(n.type){case"Feature":return We(n);case"FeatureCollection":var r={type:"FeatureCollection",features:n.features.map(We)};return null!=n.bbox&&(r.bbox=n.bbox),r;default:return Ie(n)}},n.geoTimes=function(){return r.geoProjection(De).scale(146.153)},n.geoTimesRaw=De,n.geoTwoPointAzimuthal=Ve,n.geoTwoPointAzimuthalRaw=Te,n.geoTwoPointAzimuthalUsa=function(){return Ve([-158,21.5],[-77,39]).clipAngle(60).scale(400)},n.geoTwoPointEquidistant=Ke,n.geoTwoPointEquidistantRaw=_e,n.geoTwoPointEquidistantUsa=function(){return Ke([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},n.geoVanDerGrinten=function(){return r.geoProjection(Oe).scale(79.4183)},n.geoVanDerGrintenRaw=Oe,n.geoVanDerGrinten2=function(){return r.geoProjection(Ue).scale(79.4183)},n.geoVanDerGrinten2Raw=Ue,n.geoVanDerGrinten3=function(){return r.geoProjection(Je).scale(79.4183)},n.geoVanDerGrinten3Raw=Je,n.geoVanDerGrinten4=function(){return r.geoProjection(Xe).scale(127.16)},n.geoVanDerGrinten4Raw=Xe,n.geoWagner=Ze,n.geoWagner7=function(){return Ze().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},n.geoWagnerRaw=Ye,n.geoWagner4=function(){return r.geoProjection(rt).scale(176.84)},n.geoWagner4Raw=rt,n.geoWagner6=function(){return r.geoProjection(et).scale(152.63)},n.geoWagner6Raw=et,n.geoWiechel=function(){return r.geoProjection(tt).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},n.geoWiechelRaw=tt,n.geoWinkel3=function(){return r.geoProjection(ot).scale(158.837)},n.geoWinkel3Raw=ot,Object.defineProperty(n,"__esModule",{value:!0})});