var app=function(){"use strict";function n(){}const t=n=>n;function r(n,t){for(const r in t)n[r]=t[r];return n}function e(n){return n()}function i(){return Object.create(null)}function o(n){n.forEach(e)}function u(n){return"function"==typeof n}function a(n,t){return n!=n?t==t:n!==t||n&&"object"==typeof n||"function"==typeof n}function l(n,t,r){n.$$.on_destroy.push(function(n,t){const r=n.subscribe(t);return r.unsubscribe?()=>r.unsubscribe():r}(t,r))}const c="undefined"!=typeof window;let s=c?()=>window.performance.now():()=>Date.now(),f=c?n=>requestAnimationFrame(n):n;const h=new Set;function p(n){h.forEach(t=>{t.c(n)||(h.delete(t),t.f())}),0!==h.size&&f(p)}function g(n,t){n.appendChild(t)}function d(n,t,r){n.insertBefore(t,r||null)}function v(n){n.parentNode.removeChild(n)}function m(n,t){for(let r=0;rn.removeEventListener(t,r,e)}function M(n,t,r){null==r?n.removeAttribute(t):n.getAttribute(t)!==r&&n.setAttribute(t,r)}function x(n,t,r,e){n.style.setProperty(t,r,e?"important":"")}let _;function E(n){_=n}function N(n){(function(){if(!_)throw new Error("Function called outside component initialization");return _})().$$.on_mount.push(n)}const S=[],k=[],$=[],A=[],P=Promise.resolve();let j=!1;function C(n){$.push(n)}function z(){const n=new Set;do{for(;S.length;){const n=S.shift();E(n),q(n.$$)}for(;k.length;)k.pop()();for(let t=0;t<$.length;t+=1){const r=$[t];n.has(r)||(r(),n.add(r))}$.length=0}while(S.length);for(;A.length;)A.pop()();j=!1}function q(n){null!==n.fragment&&(n.update(),o(n.before_update),n.fragment&&n.fragment.p(n.ctx,n.dirty),n.dirty=[-1],n.after_update.forEach(C))}const R=new Set;let T;function L(n,t){n&&n.i&&(R.delete(n),n.i(t))}function O(n,t,r,e){if(n&&n.o){if(R.has(n))return;R.add(n),T.c.push(()=>{R.delete(n),e&&(r&&n.d(1),e())}),n.o(t)}}function F(n,t,r){const{fragment:i,on_mount:a,on_destroy:l,after_update:c}=n.$$;i&&i.m(t,r),C(()=>{const t=a.map(e).filter(u);l?l.push(...t):o(t),n.$$.on_mount=[]}),c.forEach(C)}function I(n,t){const r=n.$$;null!==r.fragment&&(o(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function D(n,t){-1===n.$$.dirty[0]&&(S.push(n),j||(j=!0,P.then(z)),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<(h.ctx&&a(h.ctx[n],h.ctx[n]=e)&&(h.bound[n]&&h.bound[n](e),p&&D(t,n)),r)):[],h.update(),p=!0,o(h.before_update),h.fragment=!!u&&u(h.ctx),r.target&&(r.hydrate?h.fragment&&h.fragment.l(function(n){return Array.from(n.childNodes)}(r.target)):h.fragment&&h.fragment.c(),r.intro&&L(t.$$.fragment),F(t,r.target,r.anchor),z()),E(s)}class H{$destroy(){I(this,1),this.$destroy=n}$on(n,t){const r=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return r.push(t),()=>{const n=r.indexOf(t);-1!==n&&r.splice(n,1)}}$set(){}}function G(){return new Z}function Z(){this.reset()}Z.prototype={constructor:Z,reset:function(){this.s=this.t=0},add:function(n){V(U,n,this.t),V(this,U.s,this.s),this.s?this.t+=U.t:this.s=U.t},valueOf:function(){return this.s}};var U=new Z;function V(n,t,r){var e=n.s=t+r,i=e-t,o=e-i;n.t=t-o+(r-i)}var X=1e-6,K=Math.PI,Q=K/2,W=K/4,Y=2*K,J=180/K,nn=K/180,tn=Math.abs,rn=Math.atan,en=Math.atan2,on=Math.cos,un=Math.sin,an=Math.sign||function(n){return n>0?1:n<0?-1:0},ln=Math.sqrt;function cn(n){return n>1?Q:n<-1?-Q:Math.asin(n)}function sn(){}function fn(n,t){n&&pn.hasOwnProperty(n.type)&&pn[n.type](n,t)}var hn={Feature:function(n,t){fn(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,i=r.length;++eK?n+Math.round(-n/Y)*Y:n,t]}function Sn(n){return function(t,r){return[(t+=n)>K?t-Y:t<-K?t+Y:t,r]}}function kn(n){var t=Sn(n);return t.invert=Sn(-n),t}function $n(n,t){var r=on(n),e=un(n),i=on(t),o=un(t);function u(n,t){var u=on(t),a=on(n)*u,l=un(n)*u,c=un(t),s=c*r+a*e;return[en(l*i-s*o,a*r-c*e),cn(s*i+l*o)]}return u.invert=function(n,t){var u=on(t),a=on(n)*u,l=un(n)*u,c=un(t),s=c*i-l*o;return[en(l*i+c*o,a*r+s*e),cn(s*r-a*e)]},u}function An(n,t){(t=yn(t))[0]-=n,_n(t);var r,e=(r=-t[1])>1?0:r<-1?K:Math.acos(r);return((-t[2]<0?-e:e)+Y-X)%Y}function Pn(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:sn,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function jn(n,t){return tn(n[0]-t[0])=0;--o)i.point((s=c[o])[0],s[1]);else e(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function qn(n){if(t=n.length){for(var t,r,e=0,i=n[0];++et?1:n>=t?0:NaN}var On,Fn,In=(1===(On=Ln).length&&(Fn=On,On=function(n,t){return Ln(Fn(n),t)}),{left:function(n,t,r,e){for(null==r&&(r=0),null==e&&(e=n.length);r>>1;On(n[i],t)<0?r=i+1:e=i}return r},right:function(n,t,r,e){for(null==r&&(r=0),null==e&&(e=n.length);r>>1;On(n[i],t)>0?e=i:r=i+1}return r}}).right;var Dn=Math.sqrt(50),Bn=Math.sqrt(10),Hn=Math.sqrt(2);function Gn(n,t,r){var e=(t-n)/Math.max(0,r),i=Math.floor(Math.log(e)/Math.LN10),o=e/Math.pow(10,i);return i>=0?(o>=Dn?10:o>=Bn?5:o>=Hn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Dn?10:o>=Bn?5:o>=Hn?2:1)}function Zn(n){for(var t,r,e,i=n.length,o=-1,u=0;++o=0;)for(t=(e=n[i]).length;--t>=0;)r[--u]=e[t];return r}function Un(n,t,r,e){return function(i){var o,u,a,l=t(i),c=Pn(),s=t(c),f=!1,h={point:p,lineStart:d,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=b,u=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=d,h.lineEnd=v,u=Zn(u);var n=function(n,t){var r=Tn(t),e=t[1],i=un(e),o=[un(r),-on(r),0],u=0,a=0;Rn.reset(),1===i?e=Q+X:-1===i&&(e=-Q-X);for(var l=0,c=n.length;l=0?1:-1,N=E*_,S=N>K,k=d*M;if(Rn.add(en(k*E*un(N),v*x+k*on(N))),u+=S?_+E*Y:_,S^p>=r^b>=r){var $=wn(yn(h),yn(y));_n($);var A=wn(o,$);_n(A);var P=(S^_>=0?-1:1)*cn(A[2]);(e>P||e===P&&($[0]||$[1]))&&(a+=S^_>=0?1:-1)}}return(u<-X||u0){for(f||(i.polygonStart(),f=!0),i.lineStart(),n=0;n1&&2&l&&h.push(h.pop().concat(h.shift())),u.push(h.filter(Vn))}return h}}function Vn(n){return n.length>1}function Xn(n,t){return((n=n.x)[0]<0?n[1]-Q-X:Q-n[1])-((t=t.x)[0]<0?t[1]-Q-X:Q-t[1])}var Kn=Un((function(){return!0}),(function(n){var t,r=NaN,e=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var a=o>0?K:-K,l=tn(o-r);tn(l-K)0?Q:-Q),n.point(i,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(o,e),t=0):i!==a&&l>=K&&(tn(r-i)X?rn((un(t)*(o=on(e))*un(r)-un(e)*(i=on(t))*un(n))/(i*o*u)):(t+e)/2}(r,e,o,u),n.point(i,e),n.lineEnd(),n.lineStart(),n.point(a,e),t=0),n.point(r=o,e=u),i=a},lineEnd:function(){n.lineEnd(),r=e=NaN},clean:function(){return 2-t}}}),(function(n,t,r,e){var i;if(null==n)i=r*Q,e.point(-K,i),e.point(0,i),e.point(K,i),e.point(K,0),e.point(K,-i),e.point(0,-i),e.point(-K,-i),e.point(-K,0),e.point(-K,i);else if(tn(n[0]-t[0])>X){var o=n[0]0,i=tn(t)>X;function o(n,r){return on(n)*on(r)>t}function u(n,r,e){var i=[1,0,0],o=wn(yn(n),yn(r)),u=bn(o,o),a=o[0],l=u-a*a;if(!l)return!e&&n;var c=t*u/l,s=-t*a/l,f=wn(i,o),h=xn(i,c);Mn(h,xn(o,s));var p=f,g=bn(h,p),d=bn(p,p),v=g*g-d*(bn(h,h)-1);if(!(v<0)){var m=ln(v),y=xn(p,(-g-m)/d);if(Mn(y,h),y=mn(y),!e)return y;var b,w=n[0],M=r[0],x=n[1],_=r[1];M0^y[1]<(tn(y[0]-w)K^(w<=y[0]&&y[0]<=M)){var S=xn(p,(-g+m)/d);return Mn(S,h),[y,mn(S)]}}}function a(t,r){var i=e?n:K-n,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}return Un(o,(function(n){var t,r,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var p,g=[f,h],d=o(f,h),v=e?d?0:a(f,h):d?a(f+(f<0?K:-K),h):0;if(!t&&(c=l=d)&&n.lineStart(),d!==l&&(!(p=u(t,g))||jn(t,p)||jn(g,p))&&(g[0]+=X,g[1]+=X,d=o(g[0],g[1])),d!==l)s=0,d?(n.lineStart(),p=u(g,t),n.point(p[0],p[1])):(p=u(t,g),n.point(p[0],p[1]),n.lineEnd()),t=p;else if(i&&t&&e^d){var m;v&r||!(m=u(g,t,!0))||(s=0,e?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!d||t&&jn(t,g)||n.point(g[0],g[1]),t=g,l=d,r=v},lineEnd:function(){l&&n.lineEnd(),t=null},clean:function(){return s|(c&&l)<<1}}}),(function(t,e,i,o){!function(n,t,r,e,i,o){if(r){var u=on(t),a=un(t),l=e*r;null==i?(i=t+e*Y,o=t-l/2):(i=An(u,i),o=An(u,o),(e>0?io)&&(i+=e*Y));for(var c,s=i;e>0?s>o:s0)do{c.point(0===s||3===s?n:r,s>1?e:t)}while((s=(s+a+4)%4)!==f);else c.point(o[0],o[1])}function u(e,i){return tn(e[0]-n)0?0:3:tn(e[0]-r)0?2:1:tn(e[1]-t)0?1:0:i>0?3:2}function a(n,t){return l(n.x,t.x)}function l(n,t){var r=u(n,1),e=u(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(u){var l,c,s,f,h,p,g,d,v,m,y,b=u,w=Pn(),M={point:x,lineStart:function(){M.point=_,c&&c.push(s=[]);m=!0,v=!1,g=d=NaN},lineEnd:function(){l&&(_(f,h),p&&v&&w.rejoin(),l.push(w.result()));M.point=x,v&&b.lineEnd()},polygonStart:function(){b=w,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,i=c.length;re&&(h-o)*(e-u)>(p-u)*(n-o)&&++t:p<=e&&(h-o)*(e-u)<(p-u)*(n-o)&&--t;return t}(),r=y&&t,i=(l=Zn(l)).length;(r||i)&&(u.polygonStart(),r&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&zn(l,a,t,o,u),u.polygonEnd());b=u,l=c=s=null}};function x(n,t){i(n,t)&&b.point(n,t)}function _(o,u){var a=i(o,u);if(c&&s.push([o,u]),m)f=o,h=u,p=a,m=!1,a&&(b.lineStart(),b.point(o,u));else if(a&&v)b.point(o,u);else{var l=[g=Math.max(Yn,Math.min(Wn,g)),d=Math.max(Yn,Math.min(Wn,d))],w=[o=Math.max(Yn,Math.min(Wn,o)),u=Math.max(Yn,Math.min(Wn,u))];!function(n,t,r,e,i,o){var u,a=n[0],l=n[1],c=0,s=1,f=t[0]-a,h=t[1]-l;if(u=r-a,f||!(u>0)){if(u/=f,f<0){if(u0){if(u>s)return;u>c&&(c=u)}if(u=i-a,f||!(u<0)){if(u/=f,f<0){if(u>s)return;u>c&&(c=u)}else if(f>0){if(u0)){if(u/=h,h<0){if(u0){if(u>s)return;u>c&&(c=u)}if(u=o-l,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>c&&(c=u)}else if(h>0){if(u0&&(n[0]=a+c*f,n[1]=l+c*h),s<1&&(t[0]=a+s*f,t[1]=l+s*h),!0}}}}}(l,w,n,t,r,e)?a&&(b.lineStart(),b.point(o,u),y=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(w[0],w[1]),a||b.lineEnd(),y=!1)}g=o,d=u,v=a}return M}}function nt(n){return n}var tt,rt,et,it,ot=G(),ut=G(),at={point:sn,lineStart:sn,lineEnd:sn,polygonStart:function(){at.lineStart=lt,at.lineEnd=ft},polygonEnd:function(){at.lineStart=at.lineEnd=at.point=sn,ot.add(tn(ut)),ut.reset()},result:function(){var n=ot/2;return ot.reset(),n}};function lt(){at.point=ct}function ct(n,t){at.point=st,tt=et=n,rt=it=t}function st(n,t){ut.add(it*n-et*t),et=n,it=t}function ft(){st(tt,rt)}var ht=1/0,pt=ht,gt=-ht,dt=gt,vt={point:function(n,t){ngt&&(gt=n);tdt&&(dt=t)},lineStart:sn,lineEnd:sn,polygonStart:sn,polygonEnd:sn,result:function(){var n=[[ht,pt],[gt,dt]];return gt=dt=-(pt=ht=1/0),n}};var mt,yt,bt,wt,Mt=0,xt=0,_t=0,Et=0,Nt=0,St=0,kt=0,$t=0,At=0,Pt={point:jt,lineStart:Ct,lineEnd:Rt,polygonStart:function(){Pt.lineStart=Tt,Pt.lineEnd=Lt},polygonEnd:function(){Pt.point=jt,Pt.lineStart=Ct,Pt.lineEnd=Rt},result:function(){var n=At?[kt/At,$t/At]:St?[Et/St,Nt/St]:_t?[Mt/_t,xt/_t]:[NaN,NaN];return Mt=xt=_t=Et=Nt=St=kt=$t=At=0,n}};function jt(n,t){Mt+=n,xt+=t,++_t}function Ct(){Pt.point=zt}function zt(n,t){Pt.point=qt,jt(bt=n,wt=t)}function qt(n,t){var r=n-bt,e=t-wt,i=ln(r*r+e*e);Et+=i*(bt+n)/2,Nt+=i*(wt+t)/2,St+=i,jt(bt=n,wt=t)}function Rt(){Pt.point=jt}function Tt(){Pt.point=Ot}function Lt(){Ft(mt,yt)}function Ot(n,t){Pt.point=Ft,jt(mt=bt=n,yt=wt=t)}function Ft(n,t){var r=n-bt,e=t-wt,i=ln(r*r+e*e);Et+=i*(bt+n)/2,Nt+=i*(wt+t)/2,St+=i,kt+=(i=wt*n-bt*t)*(bt+n),$t+=i*(wt+t),At+=3*i,jt(bt=n,wt=t)}function It(n){this._context=n}It.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,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(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,Y)}},result:sn};var Dt,Bt,Ht,Gt,Zt,Ut=G(),Vt={point:sn,lineStart:function(){Vt.point=Xt},lineEnd:function(){Dt&&Kt(Bt,Ht),Vt.point=sn},polygonStart:function(){Dt=!0},polygonEnd:function(){Dt=null},result:function(){var n=+Ut;return Ut.reset(),n}};function Xt(n,t){Vt.point=Kt,Bt=Gt=n,Ht=Zt=t}function Kt(n,t){Gt-=n,Zt-=t,Ut.add(ln(Gt*Gt+Zt*Zt)),Gt=n,Zt=t}function Qt(){this._string=[]}function Wt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Yt(n){return function(t){var r=new Jt;for(var e in n)r[e]=n[e];return r.stream=t,r}}function Jt(){}function nr(n,t,r){var e=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=e&&n.clipExtent(null),vn(r,n.stream(vt)),t(vt.result()),null!=e&&n.clipExtent(e),n}function tr(n,t,r){return nr(n,(function(r){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(e/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),u=+t[0][0]+(e-o*(r[1][0]+r[0][0]))/2,a=+t[0][1]+(i-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,a])}),r)}Qt.prototype={_radius:4.5,_circle:Wt(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,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(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=Wt(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}},Jt.prototype={constructor:Jt,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rr=16,er=on(30*nn);function ir(n,t){return+t?function(n,t){function r(e,i,o,u,a,l,c,s,f,h,p,g,d,v){var m=c-e,y=s-i,b=m*m+y*y;if(b>4*t&&d--){var w=u+h,M=a+p,x=l+g,_=ln(w*w+M*M+x*x),E=cn(x/=_),N=tn(tn(x)-1)t||tn((m*A+y*P)/b-.5)>.3||u*h+a*p+l*g2?n[2]%360*nn:0,k()):[v*J,m*J,y*J]},N.angle=function(n){return arguments.length?(b=n%360*nn,k()):b*J},N.precision=function(n){return arguments.length?(u=ir(a,E=n*n),$()):ln(E)},N.fitExtent=function(n,t){return tr(N,n,t)},N.fitSize=function(n,t){return function(n,t,r){return tr(n,[[0,0],t],r)}(N,n,t)},N.fitWidth=function(n,t){return function(n,t,r){return nr(n,(function(r){var e=+t,i=e/(r[1][0]-r[0][0]),o=(e-i*(r[1][0]+r[0][0]))/2,u=-i*r[0][1];n.scale(150*i).translate([o,u])}),r)}(N,n,t)},N.fitHeight=function(n,t){return function(n,t,r){return nr(n,(function(r){var e=+t,i=e/(r[1][1]-r[0][1]),o=-i*r[0][0],u=(e-i*(r[1][1]+r[0][1]))/2;n.scale(150*i).translate([o,u])}),r)}(N,n,t)},function(){return t=n.apply(this,arguments),N.invert=t.invert&&S,k()}}function cr(n,t){var r=un(n),e=(r+un(t))/2;if(tn(e)vr&&(vr=n);tmr&&(mr=t)},lineStart:pr,lineEnd:pr,polygonStart:pr,polygonEnd:pr,result:function(){var n=[[gr,dr],[vr,mr]];return vr=mr=-(dr=gr=1/0),n}};function br(n,t,r){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),null!=o&&n.clipExtent(null),vn(r,n.stream(yr));var u=yr.result(),a=Math.min(e/(u[1][0]-u[0][0]),i/(u[1][1]-u[0][1])),l=+t[0][0]+(e-a*(u[1][0]+u[0][0]))/2,c=+t[0][1]+(i-a*(u[1][1]+u[0][1]))/2;return null!=o&&n.clipExtent(o),n.scale(150*a).translate([l,c])}var wr=Math.PI,Mr=2*wr,xr=Mr-1e-6;function _r(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Er(){return new _r}function Nr(){var n,t,r,e,i,o=fr().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),u=fr().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),a={point:function(n,t){i=[n,t]}};function l(n){var t=n[0],o=n[1];return i=null,r.point(t,o),i||(e.point(t,o),i)}function c(){return n=t=null,l}return l.invert=function(n){var t=o.scale(),r=o.translate(),e=(n[0]-r[0])/t,i=(n[1]-r[1])/t;return(i>=-.089&&i<.06&&e>=.029&&e<.046?u:o).invert(n)},l.stream=function(r){return n&&t===r?n:(e=[o.stream(t=r),u.stream(r)],i=e.length,n={point:function(n,t){for(var r=-1;++r1e-6)if(Math.abs(s*a-l*c)>1e-6&&i){var h=r-o,p=e-u,g=a*a+l*l,d=h*h+p*p,v=Math.sqrt(g),m=Math.sqrt(f),y=i*Math.tan((wr-Math.acos((g+f-d)/(2*v*m)))/2),b=y/m,w=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(n+b*c)+","+(t+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>c*p)+","+(this._x1=n+w*a)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=n)+","+(this._y1=t);else;},arc:function(n,t,r,e,i,o){n=+n,t=+t,o=!!o;var u=(r=+r)*Math.cos(e),a=r*Math.sin(e),l=n+u,c=t+a,s=1^o,f=o?e-i:i-e;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),r&&(f<0&&(f=f%Mr+Mr),f>xr?this._+="A"+r+","+r+",0,1,"+s+","+(n-u)+","+(t-a)+"A"+r+","+r+",0,1,"+s+","+(this._x1=l)+","+(this._y1=c):f>1e-6&&(this._+="A"+r+","+r+",0,"+ +(f>=wr)+","+s+","+(this._x1=n+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(n,t,r,e){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +e+"h"+-r+"Z"},toString:function(){return this._}};var Pr="\\s*([+-]?\\d+)\\s*",jr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zr=/^#([0-9a-f]{3,8})$/,qr=new RegExp("^rgb\\("+[Pr,Pr,Pr]+"\\)$"),Rr=new RegExp("^rgb\\("+[Cr,Cr,Cr]+"\\)$"),Tr=new RegExp("^rgba\\("+[Pr,Pr,Pr,jr]+"\\)$"),Lr=new RegExp("^rgba\\("+[Cr,Cr,Cr,jr]+"\\)$"),Or=new RegExp("^hsl\\("+[jr,Cr,Cr]+"\\)$"),Fr=new RegExp("^hsla\\("+[jr,Cr,Cr,jr]+"\\)$"),Ir={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Dr(){return this.rgb().formatHex()}function Br(){return this.rgb().formatRgb()}function Hr(n){var t,r;return n=(n+"").trim().toLowerCase(),(t=zr.exec(n))?(r=t[1].length,t=parseInt(t[1],16),6===r?Gr(t):3===r?new Xr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?new Xr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?new Xr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qr.exec(n))?new Xr(t[1],t[2],t[3],1):(t=Rr.exec(n))?new Xr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tr.exec(n))?Zr(t[1],t[2],t[3],t[4]):(t=Lr.exec(n))?Zr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Or.exec(n))?Yr(t[1],t[2]/100,t[3]/100,1):(t=Fr.exec(n))?Yr(t[1],t[2]/100,t[3]/100,t[4]):Ir.hasOwnProperty(n)?Gr(Ir[n]):"transparent"===n?new Xr(NaN,NaN,NaN,0):null}function Gr(n){return new Xr(n>>16&255,n>>8&255,255&n,1)}function Zr(n,t,r,e){return e<=0&&(n=t=r=NaN),new Xr(n,t,r,e)}function Ur(n){return n instanceof Ar||(n=Hr(n)),n?new Xr((n=n.rgb()).r,n.g,n.b,n.opacity):new Xr}function Vr(n,t,r,e){return 1===arguments.length?Ur(n):new Xr(n,t,r,null==e?1:e)}function Xr(n,t,r,e){this.r=+n,this.g=+t,this.b=+r,this.opacity=+e}function Kr(){return"#"+Wr(this.r)+Wr(this.g)+Wr(this.b)}function Qr(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===n?")":", "+n+")")}function Wr(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function Yr(n,t,r,e){return e<=0?n=t=r=NaN:r<=0||r>=1?n=t=NaN:t<=0&&(n=NaN),new ne(n,t,r,e)}function Jr(n){if(n instanceof ne)return new ne(n.h,n.s,n.l,n.opacity);if(n instanceof Ar||(n=Hr(n)),!n)return new ne;if(n instanceof ne)return n;var t=(n=n.rgb()).r/255,r=n.g/255,e=n.b/255,i=Math.min(t,r,e),o=Math.max(t,r,e),u=NaN,a=o-i,l=(o+i)/2;return a?(u=t===o?(r-e)/a+6*(r0&&l<1?0:u,new ne(u,a,l,n.opacity)}function ne(n,t,r,e){this.h=+n,this.s=+t,this.l=+r,this.opacity=+e}function te(n,t,r){return 255*(n<60?t+(r-t)*n/60:n<180?r:n<240?t+(r-t)*(240-n)/60:t)}kr(Ar,Hr,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:Dr,formatHex:Dr,formatHsl:function(){return Jr(this).formatHsl()},formatRgb:Br,toString:Br}),kr(Xr,Vr,$r(Ar,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new Xr(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Xr(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Kr,formatHex:Kr,formatRgb:Qr,toString:Qr})),kr(ne,(function(n,t,r,e){return 1===arguments.length?Jr(n):new ne(n,t,r,null==e?1:e)}),$r(Ar,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new ne(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new ne(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,e=r+(r<.5?r:1-r)*t,i=2*r-e;return new Xr(te(n>=240?n-240:n+120,i,e),te(n,i,e),te(n<120?n+240:n-120,i,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var re=Math.PI/180,ee=180/Math.PI,ie=.96422,oe=1,ue=.82521,ae=4/29,le=6/29,ce=3*le*le,se=le*le*le;function fe(n){if(n instanceof pe)return new pe(n.l,n.a,n.b,n.opacity);if(n instanceof ye)return be(n);n instanceof Xr||(n=Ur(n));var t,r,e=me(n.r),i=me(n.g),o=me(n.b),u=ge((.2225045*e+.7168786*i+.0606169*o)/oe);return e===i&&i===o?t=r=u:(t=ge((.4360747*e+.3850649*i+.1430804*o)/ie),r=ge((.0139322*e+.0971045*i+.7141733*o)/ue)),new pe(116*u-16,500*(t-u),200*(u-r),n.opacity)}function he(n,t,r,e){return 1===arguments.length?fe(n):new pe(n,t,r,null==e?1:e)}function pe(n,t,r,e){this.l=+n,this.a=+t,this.b=+r,this.opacity=+e}function ge(n){return n>se?Math.pow(n,1/3):n/ce+ae}function de(n){return n>le?n*n*n:ce*(n-ae)}function ve(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function me(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function ye(n,t,r,e){this.h=+n,this.c=+t,this.l=+r,this.opacity=+e}function be(n){if(isNaN(n.h))return new pe(n.l,0,0,n.opacity);var t=n.h*re;return new pe(n.l,Math.cos(t)*n.c,Math.sin(t)*n.c,n.opacity)}function we(n){return function(){return n}}function Me(n){return 1==(n=+n)?xe:function(t,r){return r-t?function(n,t,r){return n=Math.pow(n,r),t=Math.pow(t,r)-n,r=1/r,function(e){return Math.pow(n+e*t,r)}}(t,r,n):we(isNaN(t)?r:t)}}function xe(n,t){var r=t-n;return r?function(n,t){return function(r){return n+r*t}}(n,r):we(isNaN(n)?t:n)}kr(pe,he,$r(Ar,{brighter:function(n){return new pe(this.l+18*(null==n?1:n),this.a,this.b,this.opacity)},darker:function(n){return new pe(this.l-18*(null==n?1:n),this.a,this.b,this.opacity)},rgb:function(){var n=(this.l+16)/116,t=isNaN(this.a)?n:n+this.a/500,r=isNaN(this.b)?n:n-this.b/200;return new Xr(ve(3.1338561*(t=ie*de(t))-1.6168667*(n=oe*de(n))-.4906146*(r=ue*de(r))),ve(-.9787684*t+1.9161415*n+.033454*r),ve(.0719453*t-.2289914*n+1.4052427*r),this.opacity)}})),kr(ye,(function(n,t,r,e){return 1===arguments.length?function(n){if(n instanceof ye)return new ye(n.h,n.c,n.l,n.opacity);if(n instanceof pe||(n=fe(n)),0===n.a&&0===n.b)return new ye(NaN,0o&&(i=t.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(r=r[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:ke(r,e)})),o=Pe.lastIndex;return ot&&(r=n,n=t,t=r),c=function(r){return Math.max(n,Math.min(t,r))}),e=l>2?Ie:Fe,i=o=null,f}function f(t){return isNaN(t=+t)?r:(i||(i=e(u.map(n),a,l)))(n(c(t)))}return f.invert=function(r){return c(t((o||(o=e(a,u.map(n),ke)))(r)))},f.domain=function(n){return arguments.length?(u=Array.from(n,Re),s()):u.slice()},f.range=function(n){return arguments.length?(a=Array.from(n),s()):a.slice()},f.rangeRound=function(n){return a=Array.from(n),l=ze,s()},f.clamp=function(n){return arguments.length?(c=!!n||Le,s()):c!==Le},f.interpolate=function(n){return arguments.length?(l=n,s()):l},f.unknown=function(n){return arguments.length?(r=n,f):r},function(r,e){return n=r,t=e,s()}}function He(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function Ge(n){return(n=He(Math.abs(n)))?n[1]:NaN}var Ze,Ue=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ve(n){if(!(t=Ue.exec(n)))throw new Error("invalid format: "+n);var t;return new Xe({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Xe(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function Ke(n,t){var r=He(n,t);if(!r)return n+"";var e=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+e:e.length>i+1?e.slice(0,i+1)+"."+e.slice(i+1):e+new Array(i-e.length+2).join("0")}Ve.prototype=Xe.prototype,Xe.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Qe={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.round(n).toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return Ke(100*n,t)},r:Ke,s:function(n,t){var r=He(n,t);if(!r)return n+"";var e=r[0],i=r[1],o=i-(Ze=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+He(n,Math.max(0,t+o-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};function We(n){return n}var Ye,Je,ni,ti=Array.prototype.map,ri=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"];function ei(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?We:(t=ti.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var i=n.length,o=[],u=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>e));)a=t[u=(u+1)%t.length];return o.reverse().join(r)}),i=void 0===n.currency?"":n.currency[0]+"",o=void 0===n.currency?"":n.currency[1]+"",u=void 0===n.decimal?".":n.decimal+"",a=void 0===n.numerals?We:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(ti.call(n.numerals,String)),l=void 0===n.percent?"%":n.percent+"",c=void 0===n.minus?"-":n.minus+"",s=void 0===n.nan?"NaN":n.nan+"";function f(n){var t=(n=Ve(n)).fill,r=n.align,f=n.sign,h=n.symbol,p=n.zero,g=n.width,d=n.comma,v=n.precision,m=n.trim,y=n.type;"n"===y?(d=!0,y="g"):Qe[y]||(void 0===v&&(v=12),m=!0,y="g"),(p||"0"===t&&"="===r)&&(p=!0,t="0",r="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?o:/[%p]/.test(y)?l:"",M=Qe[y],x=/[defgprs%]/.test(y);function _(n){var i,o,l,h=b,_=w;if("c"===y)_=M(n)+_,n="";else{var E=(n=+n)<0;if(n=isNaN(n)?s:M(Math.abs(n),v),m&&(n=function(n){n:for(var t,r=n.length,e=1,i=-1;e0){if(!+n[e])break n;i=0}}return i>0?n.slice(0,i)+n.slice(t+1):n}(n)),E&&0==+n&&(E=!1),h=(E?"("===f?f:c:"-"===f||"("===f?"":f)+h,_=("s"===y?ri[8+Ze/3]:"")+_+(E&&"("===f?")":""),x)for(i=-1,o=n.length;++i(l=n.charCodeAt(i))||l>57){_=(46===l?u+n.slice(i+1):n.slice(i))+_,n=n.slice(0,i);break}}d&&!p&&(n=e(n,1/0));var N=h.length+n.length+_.length,S=N>1)+h+n+_+S.slice(N);break;default:n=S+h+n+_}return a(n)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),_.toString=function(){return n+""},_}return{format:f,formatPrefix:function(n,t){var r=f(((n=Ve(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(Ge(t)/3))),i=Math.pow(10,-e),o=ri[8+e/3];return function(n){return r(i*n)+o}}}}function ii(n,t,r,e){var i,o=function(n,t,r){var e=Math.abs(t-n)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),o=e/i;return o>=Dn?i*=10:o>=Bn?i*=5:o>=Hn&&(i*=2),t0)return[n];if((e=t0)for(n=Math.ceil(n/u),t=Math.floor(t/u),o=new Array(i=Math.ceil(t-n+1));++a0?e=Gn(a=Math.floor(a/e)*e,l=Math.ceil(l/e)*e,r):e<0&&(e=Gn(a=Math.ceil(a*e)/e,l=Math.floor(l*e)/e,r)),e>0?(i[o]=Math.floor(a/e)*e,i[u]=Math.ceil(l/e)*e,t(i)):e<0&&(i[o]=Math.ceil(a*e)/e,i[u]=Math.floor(l*e)/e,t(i)),n},n}function ui(){var n=Be()(Le,Le);return n.copy=function(){return De(n,ui())},Sr.apply(n,arguments),oi(n)}function ai(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function li(n){return n<0?-Math.sqrt(-n):Math.sqrt(n)}function ci(n){return n<0?-n*n:n*n}function si(){var n=function(n){var t=n(Le,Le),r=1;function e(){return 1===r?n(Le,Le):.5===r?n(li,ci):n(ai(r),ai(1/r))}return t.exponent=function(n){return arguments.length?(r=+n,e()):r},oi(t)}(Be());return n.copy=function(){return De(n,si()).exponent(n.exponent())},Sr.apply(n,arguments),n}function fi(){return si.apply(null,arguments).exponent(.5)}function hi(n){return n}function pi(n,t){var r=t.id,e=t.bbox,i=null==t.properties?{}:t.properties,o=function(n,t){var r=function(n){if(null==n)return hi;var t,r,e=n.scale[0],i=n.scale[1],o=n.translate[0],u=n.translate[1];return function(n,a){a||(t=r=0);var l=2,c=n.length,s=new Array(c);for(s[0]=(t+=n[0])*e+o,s[1]=(r+=n[1])*i+u;ln;const r=typeof n;if(r!==typeof t||Array.isArray(n)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(n)){const r=t.map((t,r)=>vi(n[r],t));return n=>r.map(t=>t(n))}if("object"===r){if(!n||!t)throw new Error("Object cannot be null");if(di(n)&&di(t)){n=n.getTime();const r=(t=t.getTime())-n;return t=>new Date(n+t*r)}const r=Object.keys(t),e={};return r.forEach(r=>{e[r]=vi(n[r],t[r])}),n=>{const t={};return r.forEach(r=>{t[r]=e[r](n)}),t}}if("number"===r){const r=t-n;return t=>n+t*r}throw new Error(`Cannot interpolate ${r} values`)}function mi(e,i={}){const o=function(t,r=n){let e;const i=[];function o(n){if(a(t,n)&&(t=n,e)){const n=!gi.length;for(let n=0;n{const n=i.indexOf(l);-1!==n&&i.splice(n,1),0===i.length&&(e(),e=null)}}}}(e);let u,l=e;function c(n,a){if(null==e)return o.set(e=n),Promise.resolve();l=n;let c=u,g=!1,{delay:d=0,duration:v=400,easing:m=t,interpolate:y=vi}=r(r({},i),a);const b=s()+d;let w;return u=function(n){let t;return 0===h.size&&f(p),{promise:new Promise(r=>{h.add(t={c:n,f:r})}),abort(){h.delete(t)}}}(t=>{if(tv?(o.set(e=n),!1):(o.set(e=w(m(r/v))),!0)}),u.promise}return{set:c,update:(n,t)=>c(n(l,e),t),subscribe:o.subscribe}}function yi(t){let r,e;return{c(){r=y("path"),M(r,"d",t[0]),M(r,"class","provinceShape svelte-116txg3"),M(r,"fill",t[2]),e=[w(r,"mouseover",t[4]),w(r,"mouseout",t[5])]},m(n,t){d(n,r,t)},p(n,[t]){1&t&&M(r,"d",n[0]),4&t&&M(r,"fill",n[2])},i:n,o:n,d(n){n&&v(r),o(e)}}}function bi(n,t,r){let e,{featurePath:i}=t,{initialColor:o}=t;const u=mi(o,{duration:300,interpolate:qe});l(n,u,n=>r(2,e=n));return n.$set=n=>{"featurePath"in n&&r(0,i=n.featurePath),"initialColor"in n&&r(1,o=n.initialColor)},[i,o,e,u,()=>{u.set(Vr(o).brighter(.3))},()=>{u.set(o)}]}class wi extends H{constructor(n){super(),B(this,n,bi,yi,a,{featurePath:0,initialColor:1})}}const Mi=[{name:"Perth",lat:56.396999,lon:-3.437,population:47180},{name:"Glasgow",lat:55.860916,lon:-4.251433,population:598830},{name:"Dundee",lat:56.462002,lon:-2.9707,population:148270},{name:"Dundee",lat:56.462002,lon:-2.9707,population:148270},{name:"Elgin",lat:57.653484,lon:-3.335724,population:23128},{name:"Edinburgh",lat:55.953251,lon:-3.188267,population:482005},{name:"Edinburgh",lat:55.953251,lon:-3.188267,population:482005},{name:"Inverness",lat:57.477772,lon:-4.224721,population:46870},{name:"Lerwick",lat:60.154167,lon:-1.148611,population:6958}];function xi(n,t,r){const e=n.slice();return e[13]=t[r],e}function _i(n,t,r){const e=n.slice();return e[16]=t[r],e}function Ei(n){let t;const r=new wi({props:{featurePath:n[2](n[16]),initialColor:n[1](n[16].properties.NAME_2.length)}});return{c(){var n;(n=r.$$.fragment)&&n.c()},m(n,e){F(r,n,e),t=!0},p(n,t){const e={};5&t&&(e.featurePath=n[2](n[16])),3&t&&(e.initialColor=n[1](n[16].properties.NAME_2.length)),r.$set(e)},i(n){t||(L(r.$$.fragment,n),t=!0)},o(n){O(r.$$.fragment,n),t=!1},d(n){I(r,n)}}}function Ni(n){let t,r,e,i,o;return{c(){t=y("circle"),M(t,"class","city svelte-1xdlizl"),M(t,"cx",r=n[3]([n[13].lon,n[13].lat])[0]),M(t,"cy",e=n[3]([n[13].lon,n[13].lat])[1]),M(t,"r",i=n[9](n[13].population)),M(t,"fill",o=n[10](n[13].population))},m(n,r){d(n,t,r)},p(n,i){8&i&&r!==(r=n[3]([n[13].lon,n[13].lat])[0])&&M(t,"cx",r),8&i&&e!==(e=n[3]([n[13].lon,n[13].lat])[1])&&M(t,"cy",e)},d(n){n&&v(t)}}}function Si(n){let t,r,e,i,u,a,l,c,s=n[0],f=[];for(let t=0;tO(f[n],1,1,()=>{f[n]=null});let p=Mi,_=[];for(let t=0;t{};const a=fr().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]).scale(3800).translate([ki/2,1.8*$i/2]),c=Nr().translate([ki/2,1.85*$i/2]).scale(5200),s=(n,t)=>(function(r){return function(n){return lr((function(){return n}))()}((function(e,i){e*=180/Math.PI,i*=180/Math.PI;var o=n([e,i]),u=t([e,i]);return o&&u?[(1-r)*o[0]+r*u[0],(1-r)*-o[1]+r*-u[1]]:[0,0]})).scale(1).translate([0,0])}),f=mi(a,{duration:1e3,interpolate:s});l(n,f,n=>r(3,e=n));const h=mi(0,{duration:1e3});l(n,h,n=>r(4,i=n));const p=fi().domain([0,Math.max.apply(Math,Mi.map((function(n){return n.population})))]).range([2,15]),g=fi().domain([0,Math.max.apply(Math,Mi.map((function(n){return n.population})))]).range(["#ffffff","#5555ff"]);N((async function(){const n=await fetch("https://gist.githubusercontent.com/rveciana/27272a581e975835aaa321ddf816d726/raw/c40062a328843322208b8e98c2104dc8f6ad5301/uk-counties.json"),t=await n.json(),e=(i=t,"GeometryCollection"===(a=t.objects.UK).type?{type:"FeatureCollection",features:a.geometries.map((function(n){return pi(i,n)}))}:pi(i,a));var i,a;const l={...e,features:e.features.filter(n=>"Scotland"===n.properties.NAME_1)},c=function(n,t){var r,e,i,o=n.length,u=-1;if(null==t){for(;++u=r)for(e=i=r;++ur&&(e=r),i=r)for(e=i=r;++ur&&(e=r),in.properties.NAME_2.length);r(1,u=ui().domain(c).range(["#feedde","#fd8d3c"])),r(0,o=l.features)}));let d;return n.$$.update=()=>{8&n.$$.dirty&&r(2,d=function(n,t){var r,e,i=4.5;function o(n){return n&&("function"==typeof i&&e.pointRadius(+i.apply(this,arguments)),vn(n,r(e))),e.result()}return o.area=function(n){return vn(n,r(at)),at.result()},o.measure=function(n){return vn(n,r(Vt)),Vt.result()},o.bounds=function(n){return vn(n,r(vt)),vt.result()},o.centroid=function(n){return vn(n,r(Pt)),Pt.result()},o.projection=function(t){return arguments.length?(r=null==t?(n=null,nt):(n=t).stream,o):n},o.context=function(n){return arguments.length?(e=null==n?(t=null,new Qt):new It(t=n),"function"!=typeof i&&e.pointRadius(i),o):t},o.pointRadius=function(n){return arguments.length?(i="function"==typeof n?n:(e.pointRadius(+n),+n),o):i},o.projection(n).context(t)}().projection(e))},[o,u,d,e,i,a,c,f,h,p,g,s,()=>{f.set(e===a?c:a),h.set(e===a?1:0)}]}return new class extends H{constructor(n){super(),B(this,n,Ai,Si,a,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map