eurostat-map 4.3.14 → 4.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/222.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +69218 -66207
- package/build/eurostatmap.min.js +3 -3
- package/package.json +1 -1
package/build/eurostatmap.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! /*! eurostat-map v4.3.
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(self,(()=>(()=>{var t={6:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* Legend hover classes for lines */\n.em-flow-lines line.dimmed {\n opacity: 0;\n}\n.em-flow-lines line.highlighted {\n opacity: 1;\n}\n",""]);const s=o},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var a={},o=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],u=a[c]||0,h="".concat(c," ").concat(u);a[c]=u+1;var f=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)e[f].references++,e[f].updater(p);else{var d=r(p,i);i.byIndex=s,e.splice(s,0,{identifier:h,updater:d,references:1})}o.push(h)}return o}function r(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var a=i(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var s=n(a[o]);e[s].references--}for(var l=i(t,r),c=0;c<a.length;c++){var u=n(a[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}a=l}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},172:t=>{t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},211:(t,e,n)=>{"use strict";n.d(e,{A:()=>_});var i=n(601),r=n.n(i),a=n(314),o=n.n(a),s=n(489),l=n(666),c=n(604),u=n(470),h=n(789),f=n(991),p=n(875),d=n(765),g=o()(r());g.i(s.A),g.i(l.A),g.i(c.A),g.i(u.A),g.i(h.A),g.i(f.A),g.i(p.A),g.i(d.A),g.push([t.id,"\n",""]);const _=g},262:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* Proportional symbol and pie styles */\n\n/* muted country boundaries */\n.em--ps .em-cntbn,\n.em--pie .em-cntbn {\n stroke: grey;\n}\n\n/* muted nuts boundaries */\n.em--ps .em-bn-1,\n.em--pie .em-bn-1,\n.em--ps .em-bn-2,\n.em--pie .em-bn-2,\n.em--ps .em-bn-3,\n.em--pie .em-bn-3,\n.em--ps .em-nutsrg [lvl='3'],\n.em--pie .em-nutsrg [lvl='3'],\n.em--ps .em-nutsrg [lvl='2'],\n.em--pie .em-nutsrg [lvl='2'],\n.em--ps .em-nutsrg [lvl='1'],\n.em--pie .em-nutsrg [lvl='1'],\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke-width: 0.07px;\n}\n\n/* muted country fill */\n.em--ps .em-cntrg,\n.em--pie .em-cntrg {\n fill: #f2f2f2;\n}\n\n/* muted nuts fill */\n.em--ps .em-nutsrg,\n.em--pie .em-nutsrg {\n fill: #fdfdfd;\n}\n\n/* Hide non-nuts borders (country boundaries > that are 'other' and not coastal, not candidates, not eu and not efta) */\n.em--ps g#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta),\n.em--pie g#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0px;\n}\n\n/* Coastlines should not be drawn for choropleths, however for prop symbol maps with white regions they can be necessary */\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke: grey;\n stroke-width: 0.2px;\n}\n",""]);const s=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,a){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&o[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},373:t=>{t.exports=function(t){var e=Object(t),n=[];for(var i in e)n.unshift(i);return function t(){for(;n.length;)if((i=n.pop())in e)return t.value=i,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},387:(t,e)=>{var n,i,r;(r={}).Constants={},r.Math={},r.Accumulator={},function(t){"use strict";t.WGS84={a:6378137,f:1/298.257223563},t.version={major:2,minor:1,patch:1},t.version_string="2.1.1"}(r.Constants),function(t){"use strict";t.digits=53,t.epsilon=Math.pow(.5,t.digits-1),t.degree=Math.PI/180,t.sq=function(t){return t*t},t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.cbrt=Math.cbrt||function(t){var e=Math.pow(Math.abs(t),1/3);return t>0?e:t<0?-e:t},t.log1p=Math.log1p||function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n},t.atanh=Math.atanh||function(e){var n=Math.abs(e);return n=t.log1p(2*n/(1-n))/2,e>0?n:e<0?-n:e},t.copysign=function(t,e){return Math.abs(t)*(e<0||0===e&&1/e<0?-1:1)},t.sum=function(t,e){var n=t+e,i=n-e,r=n-i;return i-=t,{s:n,t:n?0-(i+(r-=e)):n}},t.polyval=function(t,e,n,i){for(var r=t<0?0:e[n++];--t>=0;)r=r*i+e[n++];return r},t.AngRound=function(e){var n=1/16,i=Math.abs(e);return i=i<n?n-(n-i):i,t.copysign(i,e)},t.remainder=function(t,e){return(t%=e)<-e/2?t+e:t<e/2?t:t-e},t.AngNormalize=function(e){var n=t.remainder(e,360);return 180===Math.abs(n)?t.copysign(180,e):n},t.LatFix=function(t){return Math.abs(t)>90?NaN:t},t.AngDiff=function(e,n){var i,r,a=t.sum(t.remainder(-e,360),t.remainder(n,360));return i=(a=t.sum(t.remainder(a.s,360),a.t)).s,r=a.t,0!==i&&180!==Math.abs(i)||(i=t.copysign(i,0===r?n-e:-r)),{d:i,e:r}},t.sincosd=function(e){var n,i,r,a,o,s,l;switch(n=e%360,i=(n-=90*(r=Math.round(n/90)))*this.degree,a=Math.sin(i),o=Math.cos(i),45===Math.abs(n)?(o=Math.sqrt(.5),a=t.copysign(o,i)):30===Math.abs(n)&&(o=Math.sqrt(.75),a=t.copysign(.5,i)),3&r){case 0:s=a,l=o;break;case 1:s=o,l=-a;break;case 2:s=-a,l=-o;break;default:s=-o,l=a}return l+=0,0===s&&(s=t.copysign(s,e)),{s,c:l}},t.sincosde=function(e,n){var i,r,a,o,s,l,c;switch(i=e%360,a=Math.round(i/90),r=(i=t.AngRound(i-90*a+n))*this.degree,o=Math.sin(r),s=Math.cos(r),45===Math.abs(i)?(s=Math.sqrt(.5),o=t.copysign(s,r)):30===Math.abs(i)&&(s=Math.sqrt(.75),o=t.copysign(.5,r)),3&a){case 0:l=o,c=s;break;case 1:l=s,c=-o;break;case 2:l=-o,c=-s;break;default:l=-s,c=o}return c+=0,0===l&&(l=t.copysign(l,e+n)),{s:l,c}},t.atan2d=function(e,n){var i,r=0;switch(Math.abs(e)>Math.abs(n)&&([e,n]=[n,e],r=2),t.copysign(1,n)<0&&(n=-n,++r),i=Math.atan2(e,n)/this.degree,r){case 1:i=t.copysign(180,e)-i;break;case 2:i=90-i;break;case 3:i=-90+i}return i}}(r.Math),function(t,e){"use strict";t.Accumulator=function(t){this.Set(t)},t.Accumulator.prototype.Set=function(e){e||(e=0),e.constructor===t.Accumulator?(this._s=e._s,this._t=e._t):(this._s=e,this._t=0)},t.Accumulator.prototype.Add=function(t){var n=e.sum(t,this._t),i=e.sum(n.s,this._s);n=n.t,this._s=i.s,this._t=i.t,0===this._s?this._s=n:this._t+=n},t.Accumulator.prototype.Sum=function(e){var n;return e?((n=new t.Accumulator(this)).Add(e),n._s):this._s},t.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},t.Accumulator.prototype.Remainder=function(t){this._s=e.remainder(this._s,t),this.Add(0)}}(r.Accumulator,r.Math),r.Geodesic={},r.GeodesicLine={},r.PolygonArea={},function(t,e,n,i,r){"use strict";var a,o,s,l,c,u,h,f,p,d,g,_=20+i.digits+10,m=i.epsilon,v=200*m,y=Math.sqrt(m),x=m,b=1e3*y;t.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),t.nC1_=6,t.nC1p_=6,t.nC2_=6,t.nC3_=6,t.nC4_=6,a=t.nC3_*(t.nC3_-1)/2,o=t.nC4_*(t.nC4_+1)/2,t.CAP_C1=1,t.CAP_C1p=2,t.CAP_C2=4,t.CAP_C3=8,t.CAP_C4=16,t.NONE=0,t.ARC=64,t.LATITUDE=128,t.LONGITUDE=256|t.CAP_C3,t.AZIMUTH=512,t.DISTANCE=1024|t.CAP_C1,t.STANDARD=t.LATITUDE|t.LONGITUDE|t.AZIMUTH|t.DISTANCE,t.DISTANCE_IN=2048|t.CAP_C1|t.CAP_C1p,t.REDUCEDLENGTH=4096|t.CAP_C1|t.CAP_C2,t.GEODESICSCALE=8192|t.CAP_C1|t.CAP_C2,t.AREA=16384|t.CAP_C4,t.ALL=32671,t.LONG_UNROLL=32768,t.OUT_MASK=32640|t.LONG_UNROLL,t.SinCosSeries=function(t,e,n,i){var r=i.length,a=r-(t?1:0),o=2*(n-e)*(n+e),s=1&a?i[--r]:0,l=0;for(a=Math.floor(a/2);a--;)s=o*(l=o*s-l+i[--r])-s+i[--r];return t?2*e*n*s:n*(s-l)},s=function(t,e){var n,r,a,o,s,l,c,u,h,f,p,d,g=i.sq(t),_=i.sq(e),m=(g+_-1)/6;return 0===_&&m<=0?n=0:(l=m,(s=(r=g*_/4)*(r+2*(o=m*(a=i.sq(m)))))>=0?(c=r+o,c+=c<0?-Math.sqrt(s):Math.sqrt(s),l+=(u=i.cbrt(c))+(0!==u?a/u:0)):(h=Math.atan2(Math.sqrt(-s),-(r+o)),l+=2*m*Math.cos(h/3)),f=Math.sqrt(i.sq(l)+_),d=((p=l<0?_/(f-l):l+f)-_)/(2*f),n=p/(Math.sqrt(p+i.sq(d))+d)),n},l=[1,4,64,0,256],t.A1m1f=function(t){var e=Math.floor(3);return(i.polyval(e,l,0,i.sq(t))/l[e+1]+t)/(1-t)},c=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],t.C1f=function(e,n){var r,a,o=i.sq(e),s=e,l=0;for(r=1;r<=t.nC1_;++r)a=Math.floor((t.nC1_-r)/2),n[r]=s*i.polyval(a,c,l,o)/c[l+a+1],l+=a+2,s*=e},u=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],t.C1pf=function(e,n){var r,a,o=i.sq(e),s=e,l=0;for(r=1;r<=t.nC1p_;++r)a=Math.floor((t.nC1p_-r)/2),n[r]=s*i.polyval(a,u,l,o)/u[l+a+1],l+=a+2,s*=e},h=[-11,-28,-192,0,256],t.A2m1f=function(t){var e=Math.floor(3);return(i.polyval(e,h,0,i.sq(t))/h[e+1]-t)/(1+t)},f=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],t.C2f=function(e,n){var r,a,o=i.sq(e),s=e,l=0;for(r=1;r<=t.nC2_;++r)a=Math.floor((t.nC2_-r)/2),n[r]=s*i.polyval(a,f,l,o)/f[l+a+1],l+=a+2,s*=e},t.Geodesic=function(t,e){if(this.a=t,this.f=e,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/i.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(i.sq(this.a)+i.sq(this._b)*(0===this._e2?1:(this._e2>0?i.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*y/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(6),this._C3x=new Array(a),this._C4x=new Array(o),this.A3coeff(),this.C3coeff(),this.C4coeff()},p=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],t.Geodesic.prototype.A3coeff=function(){var t,e,n=0,r=0;for(t=5;t>=0;--t)e=Math.min(6-t-1,t),this._A3x[r++]=i.polyval(e,p,n,this._n)/p[n+e+1],n+=e+2},d=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],t.Geodesic.prototype.C3coeff=function(){var e,n,r,a=0,o=0;for(e=1;e<t.nC3_;++e)for(n=t.nC3_-1;n>=e;--n)r=Math.min(t.nC3_-n-1,n),this._C3x[o++]=i.polyval(r,d,a,this._n)/d[a+r+1],a+=r+2},g=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],t.Geodesic.prototype.C4coeff=function(){var e,n,r,a=0,o=0;for(e=0;e<t.nC4_;++e)for(n=t.nC4_-1;n>=e;--n)r=t.nC4_-n-1,this._C4x[o++]=i.polyval(r,g,a,this._n)/g[a+r+1],a+=r+2},t.Geodesic.prototype.A3f=function(t){return i.polyval(5,this._A3x,0,t)},t.Geodesic.prototype.C3f=function(e,n){var r,a,o=1,s=0;for(r=1;r<t.nC3_;++r)a=t.nC3_-r-1,o*=e,n[r]=o*i.polyval(a,this._C3x,s,e),s+=a+1},t.Geodesic.prototype.C4f=function(e,n){var r,a,o=1,s=0;for(r=0;r<t.nC4_;++r)a=t.nC4_-r-1,n[r]=o*i.polyval(a,this._C4x,s,e),s+=a+1,o*=e},t.Geodesic.prototype.Lengths=function(e,n,i,r,a,o,s,l,c,u,h,f,p){var d,g,_,m,v={},y=0,x=0,b=0,w=0;if((h&=t.OUT_MASK)&(t.DISTANCE|t.REDUCEDLENGTH|t.GEODESICSCALE)&&(b=t.A1m1f(e),t.C1f(e,f),h&(t.REDUCEDLENGTH|t.GEODESICSCALE)&&(w=t.A2m1f(e),t.C2f(e,p),y=b-w,w=1+w),b=1+b),h&t.DISTANCE)d=t.SinCosSeries(!0,o,s,f)-t.SinCosSeries(!0,i,r,f),v.s12b=b*(n+d),h&(t.REDUCEDLENGTH|t.GEODESICSCALE)&&(x=y*n+(b*d-w*(t.SinCosSeries(!0,o,s,p)-t.SinCosSeries(!0,i,r,p))));else if(h&(t.REDUCEDLENGTH|t.GEODESICSCALE)){for(g=1;g<=t.nC2_;++g)p[g]=b*f[g]-w*p[g];x=y*n+(t.SinCosSeries(!0,o,s,p)-t.SinCosSeries(!0,i,r,p))}return h&t.REDUCEDLENGTH&&(v.m0=y,v.m12b=l*(r*o)-a*(i*s)-r*s*x),h&t.GEODESICSCALE&&(_=r*s+i*o,m=this._ep2*(c-u)*(c+u)/(a+l),v.M12=_+(m*o-s*x)*i/a,v.M21=_-(m*i-r*x)*o/l),v},t.Geodesic.prototype.InverseStart=function(e,n,r,a,o,l,c,u,h,f,p){var d,g,_,m,y,x,w,S,M,E,C,A,k,T,P,N,L,F,O,G,D={},z=a*n-o*e,I=o*n+a*e;return D.sig12=-1,d=a*n,d+=o*e,(g=I>=0&&z<.5&&o*c<.5)?(m=i.sq(e+a),m/=m+i.sq(n+o),D.dnm=Math.sqrt(1+this._ep2*m),_=c/(this._f1*D.dnm),y=Math.sin(_),x=Math.cos(_)):(y=u,x=h),D.salp1=o*y,D.calp1=x>=0?z+o*e*i.sq(y)/(1+x):d-o*e*i.sq(y)/(1-x),S=i.hypot(D.salp1,D.calp1),M=e*a+n*o*x,g&&S<this._etol2?(D.salp2=n*y,D.calp2=z-n*a*(x>=0?i.sq(y)/(1+x):1-x),w=i.hypot(D.salp2,D.calp2),D.salp2/=w,D.calp2/=w,D.sig12=Math.atan2(S,M)):Math.abs(this._n)>.1||M>=0||S>=6*Math.abs(this._n)*Math.PI*i.sq(n)||(G=Math.atan2(-u,-h),this.f>=0?(T=(k=i.sq(e)*this._ep2)/(2*(1+Math.sqrt(1+k))+k),E=G/(A=this.f*n*this.A3f(T)*Math.PI),C=d/(A*n)):(P=o*n-a*e,N=Math.atan2(d,P),C=c/(A=((E=(L=this.Lengths(this._n,Math.PI+N,e,-n,r,a,o,l,n,o,t.REDUCEDLENGTH,f,p)).m12b/(n*o*L.m0*Math.PI)-1)<-.01?d/E:-this.f*i.sq(n)*Math.PI)/n)),C>-v&&E>-1-b?this.f>=0?(D.salp1=Math.min(1,-E),D.calp1=-Math.sqrt(1-i.sq(D.salp1))):(D.calp1=Math.max(E>-v?0:-1,E),D.salp1=Math.sqrt(1-i.sq(D.calp1))):(F=s(E,C),O=A*(this.f>=0?-E*F/(1+F):-C*(1+F)/F),y=Math.sin(O),x=-Math.cos(O),D.salp1=o*y,D.calp1=d-o*e*i.sq(y)/(1-x))),D.salp1<=0?(D.salp1=1,D.calp1=0):(w=i.hypot(D.salp1,D.calp1),D.salp1/=w,D.calp1/=w),D},t.Geodesic.prototype.Lambda12=function(e,n,r,a,o,s,l,c,u,h,f,p,d,g){var _,m,v,y,x,b,w,S,M,E,C,A,k,T={};return 0===e&&0===c&&(c=-t.tiny_),m=l*n,v=i.hypot(c,l*e),T.ssig1=e,y=m*e,T.csig1=x=c*n,_=i.hypot(T.ssig1,T.csig1),T.ssig1/=_,T.csig1/=_,T.salp2=o!==n?m/o:l,T.calp2=o!==n||Math.abs(a)!==-e?Math.sqrt(i.sq(c*n)+(n<-e?(o-n)*(n+o):(e-a)*(e+a)))/o:Math.abs(c),T.ssig2=a,b=m*a,T.csig2=w=T.calp2*o,_=i.hypot(T.ssig2,T.csig2),T.ssig2/=_,T.csig2/=_,T.sig12=Math.atan2(Math.max(0,T.csig1*T.ssig2-T.ssig1*T.csig2),T.csig1*T.csig2+T.ssig1*T.ssig2),S=Math.max(0,x*b-y*w),M=x*w+y*b,C=Math.atan2(S*h-M*u,M*h+S*u),A=i.sq(v)*this._ep2,T.eps=A/(2*(1+Math.sqrt(1+A))+A),this.C3f(T.eps,g),E=t.SinCosSeries(!0,T.ssig2,T.csig2,g)-t.SinCosSeries(!0,T.ssig1,T.csig1,g),T.domg12=-this.f*this.A3f(T.eps)*m*(T.sig12+E),T.lam12=C+T.domg12,f&&(0===T.calp2?T.dlam12=-2*this._f1*r/e:(k=this.Lengths(T.eps,T.sig12,T.ssig1,T.csig1,r,T.ssig2,T.csig2,s,n,o,t.REDUCEDLENGTH,p,d),T.dlam12=k.m12b,T.dlam12*=this._f1/(T.calp2*o))),T},t.Geodesic.prototype.Inverse=function(e,n,r,a,o){var s,l;return o||(o=t.STANDARD),o===t.LONG_UNROLL&&(o|=t.STANDARD),o&=t.OUT_MASK,l=(s=this.InverseInt(e,n,r,a,o)).vals,o&t.AZIMUTH&&(l.azi1=i.atan2d(s.salp1,s.calp1),l.azi2=i.atan2d(s.salp2,s.calp2)),l},t.Geodesic.prototype.InverseInt=function(e,n,r,a,o){var s,l,c,u,h,f,p,d,g,v,y,b,w,S,M,E,C,A,k,T,P,N,L,F,O,G,D,z,I,R,j,B,q,U,W,H,V,$,Y,J,X,K,Z,Q,tt,et,nt,it,rt,at,ot,st,lt,ct,ut,ht,ft,pt,dt,gt,_t,mt,vt,yt,xt,bt={};if(bt.lat1=e=i.LatFix(e),bt.lat2=r=i.LatFix(r),e=i.AngRound(e),r=i.AngRound(r),l=(s=i.AngDiff(n,a)).e,s=s.d,o&t.LONG_UNROLL?(bt.lon1=n,bt.lon2=n+s+l):(bt.lon1=i.AngNormalize(n),bt.lon2=i.AngNormalize(a)),l*=c=i.copysign(1,s),M=(s*=c)*i.degree,E=(u=i.sincosde(s,l)).s,C=u.c,l=180-s-l,(h=Math.abs(e)<Math.abs(r)||isNaN(r)?-1:1)<0&&(c*=-1,[r,e]=[e,r]),e*=f=i.copysign(1,-e),r*=f,u=i.sincosd(e),p=this._f1*u.s,d=u.c,p/=u=i.hypot(p,d),d/=u,d=Math.max(t.tiny_,d),u=i.sincosd(r),g=this._f1*u.s,v=u.c,g/=u=i.hypot(g,v),v/=u,v=Math.max(t.tiny_,v),d<-p?v===d&&(g=i.copysign(p,g)):Math.abs(g)===-p&&(v=d),w=Math.sqrt(1+this._ep2*i.sq(p)),S=Math.sqrt(1+this._ep2*i.sq(g)),L=new Array(t.nC1_+1),F=new Array(t.nC2_+1),O=new Array(t.nC3_),(G=-90===e||0===E)&&(T=E,N=0,z=p,I=(k=C)*d,R=g,j=(P=1)*v,A=Math.atan2(Math.max(0,I*R-z*j),I*j+z*R),y=(D=this.Lengths(this._n,A,z,I,w,R,j,S,d,v,o|t.DISTANCE|t.REDUCEDLENGTH,L,F)).s12b,b=D.m12b,o&t.GEODESICSCALE&&(bt.M12=D.M12,bt.M21=D.M21),A<1||b>=0?((A<3*t.tiny_||A<m&&(y<0||b<0))&&(A=b=y=0),b*=this._b,y*=this._b,bt.a12=A/i.degree):G=!1),ft=2,!G&&0===p&&(this.f<=0||l>=180*this.f))k=P=0,T=N=1,y=this.a*M,A=q=M/this._f1,b=this._b*Math.sin(A),o&t.GEODESICSCALE&&(bt.M12=bt.M21=Math.cos(A)),bt.a12=s/this._f1;else if(!G)if(A=(D=this.InverseStart(p,d,w,g,v,S,M,E,C,L,F)).sig12,T=D.salp1,k=D.calp1,A>=0)N=D.salp2,P=D.calp2,U=D.dnm,y=A*this._b*U,b=i.sq(U)*this._b*Math.sin(A/U),o&t.GEODESICSCALE&&(bt.M12=bt.M21=Math.cos(A/U)),bt.a12=A/i.degree,q=M/(this._f1*U);else{for(W=0,H=t.tiny_,V=1,$=t.tiny_,Y=-1,J=!1,X=!1;K=(D=this.Lambda12(p,d,w,g,v,S,T,k,E,C,W<20,L,F,O)).lam12,N=D.salp2,P=D.calp2,A=D.sig12,z=D.ssig1,I=D.csig1,R=D.ssig2,j=D.csig2,B=D.eps,dt=D.domg12,Z=D.dlam12,!X&&Math.abs(K)>=(J?8:1)*m&&W!=_;++W)K>0&&(W<20||k/T>Y/$)?($=T,Y=k):K<0&&(W<20||k/T<V/H)&&(H=T,V=k),W<20&&Z>0&&(Q=-K/Z,Math.abs(Q)<Math.PI&&(tt=Math.sin(Q),(nt=T*(et=Math.cos(Q))+k*tt)>0))?(k=k*et-T*tt,T=nt,T/=u=i.hypot(T,k),k/=u,J=Math.abs(K)<=16*m):(T=(H+$)/2,k=(V+Y)/2,T/=u=i.hypot(T,k),k/=u,J=!1,X=Math.abs(H-T)+(V-k)<x||Math.abs(T-$)+(k-Y)<x);it=o|(o&(t.REDUCEDLENGTH|t.GEODESICSCALE)?t.DISTANCE:t.NONE),y=(D=this.Lengths(B,A,z,I,w,R,j,S,d,v,it,L,F)).s12b,b=D.m12b,o&t.GEODESICSCALE&&(bt.M12=D.M12,bt.M21=D.M21),b*=this._b,y*=this._b,bt.a12=A/i.degree,o&t.AREA&&(yt=Math.sin(dt),ft=E*(xt=Math.cos(dt))-C*yt,pt=C*xt+E*yt)}return o&t.DISTANCE&&(bt.s12=0+y),o&t.REDUCEDLENGTH&&(bt.m12=0+b),o&t.AREA&&(rt=T*d,0!==(at=i.hypot(k,T*p))&&0!==rt?(z=p,I=k*d,R=g,j=P*v,B=(st=i.sq(at)*this._ep2)/(2*(1+Math.sqrt(1+st))+st),lt=i.sq(this.a)*at*rt*this._e2,z/=u=i.hypot(z,I),I/=u,R/=u=i.hypot(R,j),j/=u,ct=new Array(t.nC4_),this.C4f(B,ct),ut=t.SinCosSeries(!1,z,I,ct),ht=t.SinCosSeries(!1,R,j,ct),bt.S12=lt*(ht-ut)):bt.S12=0,G||2!=ft||(ft=Math.sin(q),pt=Math.cos(q)),!G&&pt>-.7071&&g-p<1.75?(dt=1+pt,gt=1+d,_t=1+v,ot=2*Math.atan2(ft*(p*_t+g*gt),dt*(p*g+gt*_t))):(vt=P*k+N*T,0==(mt=N*k-P*T)&&vt<0&&(mt=t.tiny_*k,vt=-1),ot=Math.atan2(mt,vt)),bt.S12+=this._c2*ot,bt.S12*=h*c*f,bt.S12+=0),h<0&&([N,T]=[T,N],[P,k]=[k,P],o&t.GEODESICSCALE&&([bt.M21,bt.M12]=[bt.M12,bt.M21])),{vals:bt,salp1:T*=h*c,calp1:k*=h*f,salp2:N*=h*c,calp2:P*=h*f}},t.Geodesic.prototype.GenDirect=function(n,i,r,a,o,s){return s?s===t.LONG_UNROLL&&(s|=t.STANDARD):s=t.STANDARD,a||(s|=t.DISTANCE_IN),new e.GeodesicLine(this,n,i,r,s).GenPosition(a,o,s)},t.Geodesic.prototype.Direct=function(t,e,n,i,r){return this.GenDirect(t,e,n,!1,i,r)},t.Geodesic.prototype.ArcDirect=function(t,e,n,i,r){return this.GenDirect(t,e,n,!0,i,r)},t.Geodesic.prototype.Line=function(t,n,i,r){return new e.GeodesicLine(this,t,n,i,r)},t.Geodesic.prototype.DirectLine=function(t,e,n,i,r){return this.GenDirectLine(t,e,n,!1,i,r)},t.Geodesic.prototype.ArcDirectLine=function(t,e,n,i,r){return this.GenDirectLine(t,e,n,!0,i,r)},t.Geodesic.prototype.GenDirectLine=function(n,i,r,a,o,s){var l;return s||(s=t.STANDARD|t.DISTANCE_IN),a||(s|=t.DISTANCE_IN),(l=new e.GeodesicLine(this,n,i,r,s)).GenSetDistance(a,o),l},t.Geodesic.prototype.InverseLine=function(n,r,a,o,s){var l,c,u;return s||(s=t.STANDARD|t.DISTANCE_IN),l=this.InverseInt(n,r,a,o,t.ARC),u=i.atan2d(l.salp1,l.calp1),s&t.OUT_MASK&t.DISTANCE_IN&&(s|=t.DISTANCE),(c=new e.GeodesicLine(this,n,r,u,s,l.salp1,l.calp1)).SetArc(l.vals.a12),c},t.Geodesic.prototype.Polygon=function(t){return new n.PolygonArea(this,t)},t.WGS84=new t.Geodesic(r.WGS84.a,r.WGS84.f)}(r.Geodesic,r.GeodesicLine,r.PolygonArea,r.Math,r.Constants),function(t,e,n){"use strict";e.GeodesicLine=function(e,i,r,a,o,s,l){var c,u,h,f,p,d;o||(o=t.STANDARD|t.DISTANCE_IN),this.a=e.a,this.f=e.f,this._b=e._b,this._c2=e._c2,this._f1=e._f1,this.caps=o|t.LATITUDE|t.AZIMUTH|t.LONG_UNROLL,this.lat1=n.LatFix(i),this.lon1=r,void 0===s||void 0===l?(this.azi1=n.AngNormalize(a),c=n.sincosd(n.AngRound(this.azi1)),this.salp1=c.s,this.calp1=c.c):(this.azi1=a,this.salp1=s,this.calp1=l),c=n.sincosd(n.AngRound(this.lat1)),h=this._f1*c.s,u=c.c,h/=c=n.hypot(h,u),u/=c,u=Math.max(t.tiny_,u),this._dn1=Math.sqrt(1+e._ep2*n.sq(h)),this._salp0=this.salp1*u,this._calp0=n.hypot(this.calp1,this.salp1*h),this._ssig1=h,this._somg1=this._salp0*h,this._csig1=this._comg1=0!==h||0!==this.calp1?u*this.calp1:1,c=n.hypot(this._ssig1,this._csig1),this._ssig1/=c,this._csig1/=c,this._k2=n.sq(this._calp0)*e._ep2,f=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&t.CAP_C1&&(this._A1m1=t.A1m1f(f),this._C1a=new Array(t.nC1_+1),t.C1f(f,this._C1a),this._B11=t.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),p=Math.sin(this._B11),d=Math.cos(this._B11),this._stau1=this._ssig1*d+this._csig1*p,this._ctau1=this._csig1*d-this._ssig1*p),this.caps&t.CAP_C1p&&(this._C1pa=new Array(t.nC1p_+1),t.C1pf(f,this._C1pa)),this.caps&t.CAP_C2&&(this._A2m1=t.A2m1f(f),this._C2a=new Array(t.nC2_+1),t.C2f(f,this._C2a),this._B21=t.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&t.CAP_C3&&(this._C3a=new Array(t.nC3_),e.C3f(f,this._C3a),this._A3c=-this.f*this._salp0*e.A3f(f),this._B31=t.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&t.CAP_C4&&(this._C4a=new Array(t.nC4_),e.C4f(f,this._C4a),this._A4=n.sq(this.a)*this._calp0*this._salp0*e._e2,this._B41=t.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},e.GeodesicLine.prototype.GenPosition=function(e,i,r){var a,o,s,l,c,u,h,f,p,d,g,_,m,v,y,x,b,w,S,M,E,C,A,k,T,P,N={};return r?r===t.LONG_UNROLL&&(r|=t.STANDARD):r=t.STANDARD,r&=this.caps&t.OUT_MASK,N.lat1=this.lat1,N.azi1=this.azi1,N.lon1=r&t.LONG_UNROLL?this.lon1:n.AngNormalize(this.lon1),e?N.a12=i:N.s12=i,e||this.caps&t.DISTANCE_IN&t.OUT_MASK?(l=0,c=0,e?(a=i*n.degree,o=(A=n.sincosd(i)).s,s=A.c):(f=i/(this._b*(1+this._A1m1)),p=Math.sin(f),d=Math.cos(f),a=f-((l=-t.SinCosSeries(!0,this._stau1*d+this._ctau1*p,this._ctau1*d-this._stau1*p,this._C1pa))-this._B11),o=Math.sin(a),s=Math.cos(a),Math.abs(this.f)>.01&&(u=this._ssig1*s+this._csig1*o,h=this._csig1*s-this._ssig1*o,l=t.SinCosSeries(!0,u,h,this._C1a),a-=((1+this._A1m1)*(a+(l-this._B11))-i/this._b)/Math.sqrt(1+this._k2*n.sq(u)),o=Math.sin(a),s=Math.cos(a))),u=this._ssig1*s+this._csig1*o,h=this._csig1*s-this._ssig1*o,S=Math.sqrt(1+this._k2*n.sq(u)),r&(t.DISTANCE|t.REDUCEDLENGTH|t.GEODESICSCALE)&&((e||Math.abs(this.f)>.01)&&(l=t.SinCosSeries(!0,u,h,this._C1a)),c=(1+this._A1m1)*(l-this._B11)),m=this._calp0*u,0===(v=n.hypot(this._salp0,this._calp0*h))&&(v=h=t.tiny_),b=this._salp0,w=this._calp0*h,e&&r&t.DISTANCE&&(N.s12=this._b*((1+this._A1m1)*a+c)),r&t.LONGITUDE&&(y=this._salp0*u,x=h,_=n.copysign(1,this._salp0),g=((r&t.LONG_UNROLL?_*(a-(Math.atan2(u,h)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(_*y,x)-Math.atan2(_*this._somg1,this._comg1))):Math.atan2(y*this._comg1-x*this._somg1,x*this._comg1+y*this._somg1))+this._A3c*(a+(t.SinCosSeries(!0,u,h,this._C3a)-this._B31)))/n.degree,N.lon2=r&t.LONG_UNROLL?this.lon1+g:n.AngNormalize(n.AngNormalize(this.lon1)+n.AngNormalize(g))),r&t.LATITUDE&&(N.lat2=n.atan2d(m,this._f1*v)),r&t.AZIMUTH&&(N.azi2=n.atan2d(b,w)),r&(t.REDUCEDLENGTH|t.GEODESICSCALE)&&(M=t.SinCosSeries(!0,u,h,this._C2a),E=(1+this._A2m1)*(M-this._B21),C=(this._A1m1-this._A2m1)*a+(c-E),r&t.REDUCEDLENGTH&&(N.m12=this._b*(S*(this._csig1*u)-this._dn1*(this._ssig1*h)-this._csig1*h*C)),r&t.GEODESICSCALE&&(A=this._k2*(u-this._ssig1)*(u+this._ssig1)/(this._dn1+S),N.M12=s+(A*u-h*C)*this._ssig1/this._dn1,N.M21=s-(A*this._ssig1-this._csig1*C)*u/S)),r&t.AREA&&(k=t.SinCosSeries(!1,u,h,this._C4a),0===this._calp0||0===this._salp0?(T=b*this.calp1-w*this.salp1,P=w*this.calp1+b*this.salp1):(T=this._calp0*this._salp0*(s<=0?this._csig1*(1-s)+o*this._ssig1:o*(this._csig1*o/(1+s)+this._ssig1)),P=n.sq(this._salp0)+n.sq(this._calp0)*this._csig1*h),N.S12=this._c2*Math.atan2(T,P)+this._A4*(k-this._B41)),e||(N.a12=a/n.degree),N):(N.a12=NaN,N)},e.GeodesicLine.prototype.Position=function(t,e){return this.GenPosition(!1,t,e)},e.GeodesicLine.prototype.ArcPosition=function(t,e){return this.GenPosition(!0,t,e)},e.GeodesicLine.prototype.GenSetDistance=function(t,e){t?this.SetArc(e):this.SetDistance(e)},e.GeodesicLine.prototype.SetDistance=function(e){var n;this.s13=e,n=this.GenPosition(!1,this.s13,t.ARC),this.a13=0+n.a12},e.GeodesicLine.prototype.SetArc=function(e){var n;this.a13=e,n=this.GenPosition(!0,this.a13,t.DISTANCE),this.s13=0+n.s12}}(r.Geodesic,r.GeodesicLine,r.Math),function(t,e,n,i){"use strict";var r,a,o,s;r=function(t,e){var i=n.AngDiff(t,e).d;return t=n.AngNormalize(t),e=n.AngNormalize(e),i>0&&(t<0&&e>=0||t>0&&0===e)?1:i<0&&t>=0&&e<0?-1:0},a=function(t,e){return(0<=(e%=720)&&e<360||e<-360?0:1)-(0<=(t%=720)&&t<360||t<-360?0:1)},o=function(t,e,n,i,r){return t.Remainder(e),1&n&&t.Add((t.Sum()<0?1:-1)*e/2),i||t.Negate(),r?t.Sum()>e/2?t.Add(-e):t.Sum()<=-e/2&&t.Add(+e):t.Sum()>=e?t.Add(-e):t.Sum()<0&&t.Add(+e),0+t.Sum()},s=function(t,e,i,r,a){return t=n.remainder(t,e),1&i&&(t+=(t<0?1:-1)*e/2),r||(t*=-1),a?t>e/2?t-=e:t<=-e/2&&(t+=e):t>=e?t-=e:t<0&&(t+=e),0+t},t.PolygonArea=function(t,n){this._geod=t,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*t._c2,this.polyline=n||!1,this._mask=e.LATITUDE|e.LONGITUDE|e.DISTANCE|(this.polyline?e.NONE:e.AREA|e.LONG_UNROLL),this.polyline||(this._areasum=new i.Accumulator(0)),this._perimetersum=new i.Accumulator(0),this.Clear()},t.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},t.PolygonArea.prototype.AddPoint=function(t,e){var n;0===this.num?(this._lat0=this.lat=t,this._lon0=this.lon=e):(n=this._geod.Inverse(this.lat,this.lon,t,e,this._mask),this._perimetersum.Add(n.s12),this.polyline||(this._areasum.Add(n.S12),this._crossings+=r(this.lon,e)),this.lat=t,this.lon=e),++this.num},t.PolygonArea.prototype.AddEdge=function(t,e){var n;this.num&&(n=this._geod.Direct(this.lat,this.lon,t,e,this._mask),this._perimetersum.Add(e),this.polyline||(this._areasum.Add(n.S12),this._crossings+=a(this.lon,n.lon2)),this.lat=n.lat2,this.lon=n.lon2),++this.num},t.PolygonArea.prototype.Compute=function(t,e){var n,a,s={number:this.num};return this.num<2?(s.perimeter=0,this.polyline||(s.area=0),s):this.polyline?(s.perimeter=this._perimetersum.Sum(),s):(n=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),s.perimeter=this._perimetersum.Sum(n.s12),(a=new i.Accumulator(this._areasum)).Add(n.S12),s.area=o(a,this._area0,this._crossings+r(this.lon,this._lon0),t,e),s)},t.PolygonArea.prototype.TestPoint=function(t,e,n,i){var a,o,l,c,u={number:this.num+1};if(0===this.num)return u.perimeter=0,this.polyline||(u.area=0),u;for(u.perimeter=this._perimetersum.Sum(),o=this.polyline?0:this._areasum.Sum(),l=this._crossings,c=0;c<(this.polyline?1:2);++c)a=this._geod.Inverse(0===c?this.lat:t,0===c?this.lon:e,0!==c?this._lat0:t,0!==c?this._lon0:e,this._mask),u.perimeter+=a.s12,this.polyline||(o+=a.S12,l+=r(0===c?this.lon:e,0!==c?this._lon0:e));return this.polyline||(u.area=s(o,this._area0,l,n,i)),u},t.PolygonArea.prototype.TestEdge=function(t,e,n,i){var o,l,c,u={number:this.num?this.num+1:0};return 0===this.num||(u.perimeter=this._perimetersum.Sum()+e,this.polyline||(l=this._areasum.Sum(),c=this._crossings,l+=(o=this._geod.Direct(this.lat,this.lon,t,e,this._mask)).S12,c+=a(this.lon,o.lon2),c+=r(o.lon2,this._lon0),o=this._geod.Inverse(o.lat2,o.lon2,this._lat0,this._lon0,this._mask),u.perimeter+=o.s12,l+=o.S12,u.area=s(l,this._area0,c,n,i))),u}}(r.PolygonArea,r.Geodesic,r.Math,r.Accumulator),i=r,t.exports?t.exports=i:void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)},429:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* muted country boundaries */\n.em--coxcomb .em-cntbn {\n stroke: grey;\n stroke-width: 0.25px;\n}\n\n/* Coastlines should not be drawn for choropleths, however for prop symbol maps with white regions they can be necessary */\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke: grey;\n stroke-width: 0.1px;\n}\n",""]);const s=o},470:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"#em-labels {\n text-anchor: middle;\n stroke-linejoin: round;\n font-family: Arial, Helvetica, sans-serif;\n dominant-baseline: central;\n}\n\n.em-label {\n font-size: 12px;\n}\n.em-label-background {\n fill: #ffffff;\n pointer-events: none;\n opacity: 0.9;\n}\n.em-label-shadow {\n font-size: 12px;\n stroke-width: 2px;\n stroke: white;\n}\n.em-stat-label {\n opacity: 1;\n font-size: 13px;\n stroke-width: 3px;\n fill: #313131;\n font-weight: bold;\n}\n.em-stat-label-shadow {\n opacity: 1;\n font-size: 13px;\n stroke-width: 4px;\n stroke: white;\n}\n.em-label-cc {\n font-size: 12px;\n stroke: #505050;\n stroke-width: 0.5px;\n}\n.em-label-shadow-cc {\n font-size: 12px;\n stroke: white;\n stroke-width: 3px;\n}\n.em-label-countries {\n font-size: 12px;\n stroke: #505050;\n stroke-width: 0.5px;\n}\n.em-label-shadow-countries {\n font-size: 12px;\n stroke: white;\n stroke-width: 3px;\n}\n.em-label-seas {\n font-size: 9px;\n fill: #003399;\n stroke: #003399;\n stroke-width: 0.2px;\n letter-spacing: 3px;\n}\n.em-label-shadow-seas {\n font-size: 9px;\n letter-spacing: 3px;\n stroke: white;\n stroke-width: 3px;\n}\n\n.em-flow-labels {\n text-anchor: middle;\n stroke-linejoin: round;\n font-family: Arial, Helvetica, sans-serif;\n dominant-baseline: central;\n}\n.em-flow-label {\n font-size: 13px;\n fill: #333333;\n font-weight: bold;\n opacity: 0.9;\n}\n.em-flow-label-shadow {\n font-size: 13px;\n stroke-width: 3px;\n stroke: white;\n}\n",""]);const s=o},489:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var i=n(601),r=n.n(i),a=n(314),o=n.n(a),s=n(262),l=n(429),c=n(768),u=n(6),h=o()(r());h.i(s.A),h.i(l.A),h.i(c.A),h.i(u.A),h.push([t.id,"/* General text settings */\ntext {\n pointer-events: none;\n}\n\na text {\n pointer-events: all;\n}\n\n/* Main map */\n.em-map,\n.em-legend {\n font-family: Arial, Helvetica, sans-serif;\n}\n\n/* Coastal margin */\n#em-coast-margin {\n filter: url(#em-coastal-blur);\n stroke-linejoin: round;\n stroke-linecap: round;\n fill: none;\n stroke-width: 5;\n stroke: rgb(161, 198, 237);\n}\n\n/* Title and subtitle styling */\n.em-title,\n.em-inset-title {\n fill: #696969;\n stroke: none;\n}\n\n.em-title {\n font-size: 21px;\n font-weight: bold;\n}\n\n.em-inset-title {\n font-size: 11px;\n}\n\n.em-subtitle,\n.em-inset-subtitle {\n fill: #848280;\n stroke: none;\n stroke-linejoin: round;\n paint-order: stroke;\n}\n\n.em-subtitle {\n font-size: 18px;\n font-weight: 100;\n}\n\n.em-inset-subtitle {\n font-size: 12px;\n}\n\n.em-source-pretext {\n fill: #848280;\n font-size: 11px;\n transform: translate(-5px, -5px);\n}\n.em-source-dataset-link {\n font-size: 11px;\n fill: #0e47cb;\n cursor: pointer;\n text-decoration: underline;\n transform: translate(-5px, -5px);\n}\n.em-source-dataset-link:hover {\n fill: #082b7a;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.em-frame {\n stroke-width: 0;\n stroke: grey;\n}\n\n.em-insets .em-frame {\n /* this will give a frame to inset maps */\n stroke: grey;\n stroke-width: 0.3px !important;\n}\n\n.em-sea {\n fill: white;\n /* pointer-events: none; */\n}\n.em-scalebar-line {\n stroke: #696969;\n stroke-width: 0.8px;\n}\n.em-scalebar-label {\n font-size: 9px;\n text-anchor: middle;\n}\n\n/* Bottom text and symbol styling */\n.em-footnote {\n fill: #848280;\n pointer-events: all;\n cursor: pointer;\n font-size: 11px;\n transform: translate(5px, -5px);\n}\n.em-footnote a {\n fill: #0e47cb;\n text-decoration: underline;\n}\n.em-footnote a:hover {\n fill: #0a328e;\n}\n\n.em-centroid {\n cursor: pointer;\n}\n\n/* Graticule styling */\n.em-graticule {\n stroke: lightgray;\n stroke-width: 1;\n}\n\n.em-flow-link {\n cursor: pointer;\n}\n.em-flow-link-outline {\n cursor: pointer;\n}\n.em-flow-labels {\n font-size: 15px;\n stroke-width: 1px;\n fill: #696969;\n pointer-events: none;\n}\n.em-flow-labels-halo {\n font-size: 15px;\n stroke-width: 2px;\n fill: white;\n pointer-events: none;\n}\n\n.em-grid-rect,\n.em-grid-hexagon {\n stroke: white;\n}\n\n.em-flow-donuts {\n cursor: pointer;\n}\n",""]);const f=h},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},546:t=>{function e(n,i,r,a){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}t.exports=e=function(t,n,i,r){if(n)o?o(t,n,{value:i,enumerable:!r,configurable:!r,writable:!r}):t[n]=i;else{var a=function(n,i){e(t,n,(function(t){return this._invoke(n,i,t)}))};a("next",0),a("throw",1),a("return",2)}},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,i,r,a)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},579:(t,e,n)=>{var i=n(738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(i(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},601:t=>{"use strict";t.exports=function(t){return t[1]}},604:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-legend-background {\n fill: white;\n opacity: 0.7;\n rx: 0;\n ry: 0;\n pointer-events: none;\n}\n.em-legend-label {\n font-size: 15px;\n stroke: none;\n fill: #696969;\n dominant-baseline: unset;\n}\n.em-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-size-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-color-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-legend-subtitle {\n font-size: 15px;\n fill: #696969;\n opacity: 0.8;\n}\n.em-legend-separator {\n stroke: white;\n stroke-width: 1;\n}\n.em-legend-gradient {\n cursor: pointer;\n}\n.em-legend-tick {\n stroke: #696969;\n stroke-width: 1;\n}\n.em-bivariate-frame {\n fill: none;\n stroke: #696969;\n}\n.em-bivariate-nodata {\n stroke: #696969;\n stroke-width: 0.5;\n cursor: pointer;\n}\n.em-bivariate-axis-title {\n font-size: 15px;\n}\n.em-bivariate-nodata-label {\n font-size: 14px;\n dominant-baseline: middle;\n}\n.em-bivariate-tick {\n stroke: #696969;\n stroke-width: 1;\n}\n.em-bivariate-tick-label {\n text-anchor: middle;\n font-size: 12px;\n}\n.em-bivariate-square,\n.em-legend-rect {\n cursor: pointer;\n stroke: white;\n}\n\n.em-bivariate-square:hover,\n.em-legend-rect:hover {\n stroke-width: 2;\n stroke: red;\n}\n\n.em-pie-size-legend-line {\n stroke-dasharray: 2;\n stroke: grey;\n}\n\n.em-legend-diverging-line {\n stroke: #696969;\n}\n\n.em-legend-histogram-bar {\n cursor: pointer;\n}\n.em-month-label {\n font-size: 13px;\n}\n.em-legend-month-segment {\n stroke: #444;\n stroke-width: 0.3;\n opacity: 0.4;\n fill: #ccc;\n cursor: pointer;\n}\n",""]);const s=o},633:(t,e,n)=>{var i=n(172),r=n(993),a=n(869),o=n(887),s=n(791),l=n(373),c=n(579);function u(){"use strict";var e=r(),n=e.m(u),h=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))}var p={throw:1,return:2,break:3,continue:3};function d(t){var e,n;return function(i){e||(e={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(t,e){return n(i.a,p[t],e)},delegateYield:function(t,r,a){return e.resultName=r,n(i.d,c(t),a)},finish:function(t){return n(i.f,t)}},n=function(t,n,r){i.p=e.prev,i.n=e.next;try{return t(n,r)}finally{e.next=i.n}}),e.resultName&&(e[e.resultName]=i.v,e.resultName=void 0),e.sent=i.v,e.next=i.n;try{return t.call(this,e)}finally{i.p=e.prev,i.n=e.next}}}return(t.exports=u=function(){return{wrap:function(t,n,i,r){return e.w(d(t),n,i,r&&r.reverse())},isGeneratorFunction:f,mark:e.m,awrap:function(t,e){return new i(t,e)},AsyncIterator:s,async:function(t,e,n,i,r){return(f(e)?o:a)(d(t),e,n,i,r)},keys:l,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},659:t=>{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},666:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-tooltip {\n font-family: Arial;\n color: #383838;\n max-width: 250px;\n overflow: hidden;\n background: white;\n padding: 0px;\n border: 0px;\n border-radius: 0px;\n box-shadow:\n 0px 4px 6px rgba(0, 0, 0, 0.1),\n 0px 1px 3px rgba(0, 0, 0, 0.08);\n position: absolute;\n font-family: Helvetica, Arial, sans-serif;\n pointer-events: none;\n opacity: 0;\n z-index: 99999999;\n}\n.em-tooltip-text {\n background: #ffffff;\n padding: 4px;\n font-size: 15px;\n}\n.em-tooltip-bar {\n background: #515560;\n color: #ffffff;\n padding: 6px;\n font-size: 16px;\n}\n\n.em-footnote-tooltip {\n background: #ffffff;\n padding: 4px;\n font-size: 12px;\n}\n.em-tooltip-table {\n margin: 0px;\n}\n.em-tooltip-piechart-container {\n text-align: center;\n fill: #383838;\n display: flex;\n justify-content: center;\n}\n.em-tooltip-breakdown {\n display: flex;\n flex-direction: column;\n gap: 2px;\n font-size: 13px;\n line-height: 1.2;\n padding: 10px;\n padding-top: 3px;\n}\n\n.em-breakdown-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.em-breakdown-color {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n margin-right: 6px;\n flex-shrink: 0;\n}\n\n.em-breakdown-label {\n flex: 1;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.em-breakdown-value {\n margin-left: 8px;\n font-weight: 500;\n color: #222;\n white-space: nowrap;\n}\n\n.em-breakdown-item.em-total {\n border-top: 1px solid #ccc;\n margin-top: 3px;\n padding-top: 3px;\n font-weight: bold;\n}\n\n.em-cx-breakdown-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.em-tooltip-cx {\n line-height: 1;\n padding: 0px;\n}\n\n.em-tooltip-cx .em-breakdown-value,\n.em-tooltip-cx .em-breakdown-label,\n.em-tooltip-cx .em-breakdown-color {\n margin: 0;\n font-size: 11px; /* Smaller text for compactness */\n white-space: nowrap;\n}\n\n.em-tooltip-cx-table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.em-tooltip-cx-table th,\n.em-tooltip-cx-table td {\n padding: 2px 4px; /* Minimal padding */\n border: 1px solid #eee;\n}\n\n.em-tooltip-cx-table th {\n background: #f7f7f7;\n font-weight: bold;\n font-size: 11px;\n}\n\n.em-tooltip-cx-table td {\n font-size: 11px;\n white-space: nowrap;\n}\n\n/* Make the Total value bold and right-aligned */\n.em-tooltip-cx-table .em-total td[colspan] {\n text-align: right;\n font-weight: bold !important;\n}\n\n/* Also make the inner number span bold */\n.em-tooltip-cx-table .em-total td[colspan] .em-breakdown-value {\n font-weight: bold !important;\n}\n.em-total {\n font-weight: bold !important;\n}\n",""]);const s=o},738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,n)=>{var i=n(633)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},765:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-button {\n width: 35px;\n height: 35px;\n user-select: none;\n cursor: pointer;\n}\n\n.em-button rect {\n fill: white;\n stroke: #ccc;\n}\n\n.em-button rect:hover {\n fill: lightgrey;\n}\n\n.em-button text {\n text-anchor: middle;\n font-size: 20px;\n fill: #333333;\n}\n\n/* zoom */\n.em-zoom-buttons {\n transform: translate(94%, 10%);\n}\n\n/* insets */\n.em-insets-button {\n transform: translate(94%, 2%);\n}\n",""]);const s=o},768:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* muted country fill */\n.em--alpha .em-cntrg,\n.em--alpha .em-cntrg {\n fill: #f2f2f2;\n}\n\n/* muted nuts fill */\n.em--alpha .em-nutsrg,\n.em--alpha .em-nutsrg {\n fill: #fdfdfd;\n}\n\n/* Coastlines should not be drawn for choropleths, however for alpha maps with white regions they can be necessary */\n.em--alpha .em-bn-co {\n stroke: grey;\n stroke-width: 0.1px;\n}\n",""]);const s=o},789:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-annotation-group {\n /* pointer-events: none; */\n}\n",""]);const s=o},791:(t,e,n)=>{var i=n(172),r=n(546);t.exports=function t(e,n){function a(t,r,o,s){try{var l=e[t](r),c=l.value;return c instanceof i?n.resolve(c.v).then((function(t){a("next",t,o,s)}),(function(t){a("throw",t,o,s)})):n.resolve(c).then((function(t){l.value=t,o(l)}),(function(t){return a("throw",t,o,s)}))}catch(t){s(t)}}var o;this.next||(r(t.prototype),r(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),r(this,"_invoke",(function(t,e,i){function r(){return new n((function(e,n){a(t,i,e,n)}))}return o=o?o.then(r,r):r()}),!0)},t.exports.__esModule=!0,t.exports.default=t.exports},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},869:(t,e,n)=>{var i=n(887);t.exports=function(t,e,n,r,a){var o=i(t,e,n,r,a);return o.next().then((function(t){return t.done?t.value:o.next()}))},t.exports.__esModule=!0,t.exports.default=t.exports},875:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"#g_worldbn,\n.em-worldrg,\n.em-worldbn {\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.em-worldbn {\n stroke: #000;\n stroke-width: 0.3px;\n}\n\n.em-worldbn {\n fill: none;\n}\n\n.em-worldrg {\n fill: #efefef;\n cursor: pointer;\n}\n\n.em-bn-d {\n /* disputed */\n stroke: #000;\n stroke-width: 0.1;\n fill: none;\n}\n",""]);const s=o},887:(t,e,n)=>{var i=n(993),r=n(791);t.exports=function(t,e,n,a,o){return new r(i().w(t,e,n,a),o||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},991:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* STYLING OF NUTS REGIONS AND BOUNDARIES */\n/* Default region fill */\n.em-cntrg,\n.em-nutsrg,\n.em-grid-cell {\n fill: #e1e1e1;\n}\n\n.em-nutsrg,\n.em-cntrg,\n.em-grid-cell,\n#em-user-regions {\n cursor: pointer;\n}\n\n/* boundaries stroke-width */\n.em-bn-0 {\n stroke: none;\n}\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n/* when using MIXED NUTS levels, we add stroke to the regions, then show/hide those that have/dont have data */\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'],\n.em-bn-co {\n stroke-width: 0.15;\n}\n\n/* all boudnaries and regions linecap/linejoin */\n#em-nutsbn,\n.em-cntbn,\n.em-bn-0,\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-kosovo-bn,\n.em-bn-co,\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'],\n.em-cntrg,\n.em-nutsrg,\n.em-grid-cell {\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* national boundaries */\n.em-cntbn {\n stroke: #0a0a0a;\n stroke-width: 0.6px;\n}\n\n/* NUTS boundaries stroke color */\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'] {\n stroke: #696969;\n}\n\n/* coastal boundaries */\n.em-bn-co {\n stroke: white;\n}\n\n/* kosovo */\n.em-kosovo-bn {\n stroke: #000;\n stroke-width: 0.15;\n}\n\n/* dont fill certain elements */\n.em-frame,\n.em-graticule,\n.em-cntbn,\n.em-bn-0,\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-kosovo-bn,\n.em-bn-co {\n fill: none;\n}\n\n/* Hide non-nuts borders (country boundaries > that are 'other' and not coastal, not candidates, not eu and not efta) */\ng#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0px;\n}\n",""]);const s=o},993:(t,e,n)=>{var i=n(546);function r(){
|
|
1
|
+
/*! /*! eurostat-map v4.3.16 | 2025 Eurostat | EUPL License. See https://github.com/eurostat/eurostat-map/blob/master/LICENSE * / */
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(self,(()=>(()=>{var t={991:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* STYLING OF NUTS REGIONS AND BOUNDARIES */\n/* Default region fill */\n.em-cntrg,\n.em-nutsrg,\n.em-grid-cell {\n fill: #e1e1e1;\n}\n\n.em-nutsrg,\n.em-cntrg,\n.em-grid-cell,\n#em-user-regions {\n cursor: pointer;\n}\n\n/* boundaries stroke-width */\n.em-bn-0 {\n stroke: none;\n}\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n/* when using MIXED NUTS levels, we add stroke to the regions, then show/hide those that have/dont have data */\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'],\n.em-bn-co {\n stroke-width: 0.15;\n}\n\n/* all boudnaries and regions linecap/linejoin */\n#em-nutsbn,\n.em-cntbn,\n.em-bn-0,\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-kosovo-bn,\n.em-bn-co,\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'],\n.em-cntrg,\n.em-nutsrg,\n.em-grid-cell {\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* national boundaries */\n.em-cntbn {\n stroke: #0a0a0a;\n stroke-width: 0.6px;\n}\n\n/* NUTS boundaries stroke color */\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-nutsrg [lvl='3'],\n.em-nutsrg [lvl='2'],\n.em-nutsrg [lvl='1'] {\n stroke: #696969;\n}\n\n/* coastal boundaries */\n.em-bn-co {\n stroke: white;\n}\n\n/* kosovo */\n.em-kosovo-bn {\n stroke: #000;\n stroke-width: 0.15;\n}\n\n/* dont fill certain elements */\n.em-frame,\n.em-graticule,\n.em-cntbn,\n.em-bn-0,\n.em-bn-1,\n.em-bn-2,\n.em-bn-3,\n.em-kosovo-bn,\n.em-bn-co {\n fill: none;\n}\n\n/* Hide non-nuts borders (country boundaries > that are 'other' and not coastal, not candidates, not eu and not efta) */\ng#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0px;\n}\n",""]);const s=o},789:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-annotation-group {\n /* pointer-events: none; */\n}\n",""]);const s=o},211:(t,e,n)=>{"use strict";n.d(e,{A:()=>_});var i=n(601),r=n.n(i),a=n(314),o=n.n(a),s=n(489),l=n(666),c=n(604),u=n(470),h=n(789),f=n(991),d=n(875),p=n(765),g=o()(r());g.i(s.A),g.i(l.A),g.i(c.A),g.i(u.A),g.i(h.A),g.i(f.A),g.i(d.A),g.i(p.A),g.push([t.id,"\n",""]);const _=g},470:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"#em-labels {\n text-anchor: middle;\n stroke-linejoin: round;\n font-family: Arial, Helvetica, sans-serif;\n dominant-baseline: central;\n}\n\n.em-label {\n font-size: 12px;\n}\n.em-label-background {\n fill: #ffffff;\n pointer-events: none;\n opacity: 0.9;\n}\n.em-label-shadow {\n font-size: 12px;\n stroke-width: 2px;\n stroke: white;\n}\n.em-stat-label {\n opacity: 1;\n font-size: 13px;\n stroke-width: 3px;\n fill: #313131;\n font-weight: bold;\n}\n.em-stat-label-shadow {\n opacity: 1;\n font-size: 13px;\n stroke-width: 4px;\n stroke: white;\n}\n.em-label-cc {\n font-size: 12px;\n stroke: #505050;\n stroke-width: 0.5px;\n}\n.em-label-shadow-cc {\n font-size: 12px;\n stroke: white;\n stroke-width: 3px;\n}\n.em-label-countries {\n font-size: 12px;\n stroke: #505050;\n stroke-width: 0.5px;\n}\n.em-label-shadow-countries {\n font-size: 12px;\n stroke: white;\n stroke-width: 3px;\n}\n.em-label-seas {\n font-size: 9px;\n fill: #003399;\n stroke: #003399;\n stroke-width: 0.2px;\n letter-spacing: 3px;\n}\n.em-label-shadow-seas {\n font-size: 9px;\n letter-spacing: 3px;\n stroke: white;\n stroke-width: 3px;\n}\n\n.em-flow-labels {\n text-anchor: middle;\n stroke-linejoin: round;\n font-family: Arial, Helvetica, sans-serif;\n dominant-baseline: central;\n}\n.em-flow-label {\n font-size: 13px;\n fill: #333333;\n font-weight: bold;\n opacity: 0.9;\n}\n.em-flow-label-shadow {\n font-size: 13px;\n stroke-width: 3px;\n stroke: white;\n}\n",""]);const s=o},604:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-legend-background {\n fill: white;\n opacity: 0.7;\n rx: 0;\n ry: 0;\n pointer-events: none;\n}\n.em-legend-label {\n font-size: 15px;\n stroke: none;\n fill: #696969;\n dominant-baseline: unset;\n}\n.em-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-size-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-color-legend-title {\n font-size: 16px;\n fill: #696969;\n}\n.em-legend-subtitle {\n font-size: 15px;\n fill: #696969;\n opacity: 0.8;\n}\n.em-legend-separator {\n stroke: white;\n stroke-width: 1;\n}\n.em-legend-gradient {\n cursor: pointer;\n}\n.em-legend-tick {\n stroke: #696969;\n stroke-width: 1;\n}\n.em-bivariate-frame {\n fill: none;\n stroke: #696969;\n}\n.em-bivariate-nodata {\n stroke: #696969;\n stroke-width: 0.5;\n cursor: pointer;\n}\n.em-bivariate-axis-title {\n font-size: 15px;\n}\n.em-bivariate-nodata-label {\n font-size: 14px;\n dominant-baseline: middle;\n}\n.em-bivariate-tick {\n stroke: #696969;\n stroke-width: 1;\n}\n.em-bivariate-tick-label {\n text-anchor: middle;\n font-size: 12px;\n}\n.em-bivariate-square,\n.em-legend-rect {\n cursor: pointer;\n stroke: white;\n}\n\n.em-bivariate-square:hover,\n.em-legend-rect:hover {\n stroke-width: 2;\n stroke: red;\n}\n\n.em-pie-size-legend-line {\n stroke-dasharray: 2;\n stroke: grey;\n}\n\n.em-legend-diverging-line {\n stroke: #696969;\n}\n\n.em-legend-histogram-bar {\n cursor: pointer;\n}\n.em-month-label {\n font-size: 13px;\n}\n.em-legend-month-segment {\n stroke: #444;\n stroke-width: 0.3;\n opacity: 0.4;\n fill: #ccc;\n cursor: pointer;\n}\n",""]);const s=o},768:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* muted country fill */\n.em--alpha .em-cntrg,\n.em--alpha .em-cntrg {\n fill: #f2f2f2;\n}\n\n/* muted nuts fill */\n.em--alpha .em-nutsrg,\n.em--alpha .em-nutsrg {\n fill: #fdfdfd;\n}\n\n/* Coastlines should not be drawn for choropleths, however for alpha maps with white regions they can be necessary */\n.em--alpha .em-bn-co {\n stroke: grey;\n stroke-width: 0.1px;\n}\n",""]);const s=o},429:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* muted country boundaries */\n.em--coxcomb .em-cntbn {\n stroke: grey;\n stroke-width: 0.25px;\n}\n\n/* Coastlines should not be drawn for choropleths, however for prop symbol maps with white regions they can be necessary */\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke: grey;\n stroke-width: 0.1px;\n}\n",""]);const s=o},6:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* Legend hover classes for lines */\n.em-flow-lines line.dimmed {\n opacity: 0;\n}\n.em-flow-lines line.highlighted {\n opacity: 1;\n}\n",""]);const s=o},262:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"/* Proportional symbol and pie styles */\n\n/* muted country boundaries */\n.em--ps .em-cntbn,\n.em--pie .em-cntbn {\n stroke: grey;\n}\n\n/* muted nuts boundaries */\n.em--ps .em-bn-1,\n.em--pie .em-bn-1,\n.em--ps .em-bn-2,\n.em--pie .em-bn-2,\n.em--ps .em-bn-3,\n.em--pie .em-bn-3,\n.em--ps .em-nutsrg [lvl='3'],\n.em--pie .em-nutsrg [lvl='3'],\n.em--ps .em-nutsrg [lvl='2'],\n.em--pie .em-nutsrg [lvl='2'],\n.em--ps .em-nutsrg [lvl='1'],\n.em--pie .em-nutsrg [lvl='1'],\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke-width: 0.07px;\n}\n\n/* muted country fill */\n.em--ps .em-cntrg,\n.em--pie .em-cntrg {\n fill: #f2f2f2;\n}\n\n/* muted nuts fill */\n.em--ps .em-nutsrg,\n.em--pie .em-nutsrg {\n fill: #fdfdfd;\n}\n\n/* Hide non-nuts borders (country boundaries > that are 'other' and not coastal, not candidates, not eu and not efta) */\n.em--ps g#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta),\n.em--pie g#em-cntbn > .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0px;\n}\n\n/* Coastlines should not be drawn for choropleths, however for prop symbol maps with white regions they can be necessary */\n.em--ps .em-bn-co,\n.em--pie .em-bn-co {\n stroke: grey;\n stroke-width: 0.2px;\n}\n",""]);const s=o},489:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});var i=n(601),r=n.n(i),a=n(314),o=n.n(a),s=n(262),l=n(429),c=n(768),u=n(6),h=o()(r());h.i(s.A),h.i(l.A),h.i(c.A),h.i(u.A),h.push([t.id,"/* General text settings */\ntext {\n pointer-events: none;\n}\n\na text {\n pointer-events: all;\n}\n\n/* Main map */\n.em-map,\n.em-legend {\n font-family: Arial, Helvetica, sans-serif;\n}\n\n/* Coastal margin */\n#em-coast-margin {\n filter: url(#em-coastal-blur);\n stroke-linejoin: round;\n stroke-linecap: round;\n fill: none;\n stroke-width: 5;\n stroke: rgb(161, 198, 237);\n}\n\n/* Title and subtitle styling */\n.em-title,\n.em-inset-title {\n fill: #696969;\n stroke: none;\n}\n\n.em-title {\n font-size: 21px;\n font-weight: bold;\n}\n\n.em-inset-title {\n font-size: 11px;\n}\n\n.em-subtitle,\n.em-inset-subtitle {\n fill: #848280;\n stroke: none;\n stroke-linejoin: round;\n paint-order: stroke;\n}\n\n.em-subtitle {\n font-size: 18px;\n font-weight: 100;\n}\n\n.em-inset-subtitle {\n font-size: 12px;\n}\n\n.em-source-pretext {\n fill: #848280;\n font-size: 11px;\n transform: translate(-5px, -5px);\n}\n.em-source-dataset-link {\n font-size: 11px;\n fill: #0e47cb;\n cursor: pointer;\n text-decoration: underline;\n transform: translate(-5px, -5px);\n}\n.em-source-dataset-link:hover {\n fill: #082b7a;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.em-frame {\n stroke-width: 0;\n stroke: grey;\n}\n\n.em-insets .em-frame {\n /* this will give a frame to inset maps */\n stroke: grey;\n stroke-width: 0.3px !important;\n}\n\n.em-sea {\n fill: white;\n /* pointer-events: none; */\n}\n.em-scalebar-line {\n stroke: #696969;\n stroke-width: 0.8px;\n}\n.em-scalebar-label {\n font-size: 9px;\n text-anchor: middle;\n}\n\n/* Bottom text and symbol styling */\n.em-footnote {\n fill: #848280;\n pointer-events: all;\n cursor: pointer;\n font-size: 11px;\n transform: translate(5px, -5px);\n}\n.em-footnote a {\n fill: #0e47cb;\n text-decoration: underline;\n}\n.em-footnote a:hover {\n fill: #0a328e;\n}\n\n.em-centroid {\n cursor: pointer;\n}\n\n/* Graticule styling */\n.em-graticule {\n stroke: lightgray;\n stroke-width: 1;\n}\n\n.em-flow-link {\n cursor: pointer;\n}\n.em-flow-link-outline {\n cursor: pointer;\n}\n.em-flow-labels {\n font-size: 15px;\n stroke-width: 1px;\n fill: #696969;\n pointer-events: none;\n}\n.em-flow-labels-halo {\n font-size: 15px;\n stroke-width: 2px;\n fill: white;\n pointer-events: none;\n}\n\n.em-grid-rect,\n.em-grid-hexagon {\n stroke: white;\n}\n\n.em-flow-donuts {\n cursor: pointer;\n}\n",""]);const f=h},666:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-tooltip {\n font-family: Arial;\n color: #383838;\n max-width: 250px;\n overflow: hidden;\n background: white;\n padding: 0px;\n border: 0px;\n border-radius: 0px;\n box-shadow:\n 0px 4px 6px rgba(0, 0, 0, 0.1),\n 0px 1px 3px rgba(0, 0, 0, 0.08);\n position: absolute;\n font-family: Helvetica, Arial, sans-serif;\n pointer-events: none;\n opacity: 0;\n z-index: 99999999;\n}\n.em-tooltip-text {\n background: #ffffff;\n padding: 4px;\n font-size: 15px;\n}\n.em-tooltip-bar {\n background: #515560;\n color: #ffffff;\n padding: 6px;\n font-size: 16px;\n}\n\n.em-footnote-tooltip {\n background: #ffffff;\n padding: 4px;\n font-size: 12px;\n}\n.em-tooltip-table {\n margin: 0px;\n}\n.em-tooltip-piechart-container {\n text-align: center;\n fill: #383838;\n display: flex;\n justify-content: center;\n}\n.em-tooltip-breakdown {\n display: flex;\n flex-direction: column;\n gap: 2px;\n font-size: 13px;\n line-height: 1.2;\n padding: 10px;\n padding-top: 3px;\n}\n\n.em-breakdown-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.em-breakdown-color {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n margin-right: 6px;\n flex-shrink: 0;\n}\n\n.em-breakdown-label {\n flex: 1;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.em-breakdown-value {\n margin-left: 8px;\n font-weight: 500;\n color: #222;\n white-space: nowrap;\n}\n\n.em-breakdown-item.em-total {\n border-top: 1px solid #ccc;\n margin-top: 3px;\n padding-top: 3px;\n font-weight: bold;\n}\n\n.em-cx-breakdown-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.em-tooltip-cx {\n line-height: 1;\n padding: 0px;\n}\n\n.em-tooltip-cx .em-breakdown-value,\n.em-tooltip-cx .em-breakdown-label,\n.em-tooltip-cx .em-breakdown-color {\n margin: 0;\n font-size: 11px; /* Smaller text for compactness */\n white-space: nowrap;\n}\n\n.em-tooltip-cx-table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.em-tooltip-cx-table th,\n.em-tooltip-cx-table td {\n padding: 2px 4px; /* Minimal padding */\n border: 1px solid #eee;\n}\n\n.em-tooltip-cx-table th {\n background: #f7f7f7;\n font-weight: bold;\n font-size: 11px;\n}\n\n.em-tooltip-cx-table td {\n font-size: 11px;\n white-space: nowrap;\n}\n\n/* Make the Total value bold and right-aligned */\n.em-tooltip-cx-table .em-total td[colspan] {\n text-align: right;\n font-weight: bold !important;\n}\n\n/* Also make the inner number span bold */\n.em-tooltip-cx-table .em-total td[colspan] .em-breakdown-value {\n font-weight: bold !important;\n}\n.em-total {\n font-weight: bold !important;\n}\n",""]);const s=o},765:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,".em-button {\n width: 35px;\n height: 35px;\n user-select: none;\n cursor: pointer;\n}\n\n.em-button rect {\n fill: white;\n stroke: #ccc;\n}\n\n.em-button rect:hover {\n fill: lightgrey;\n}\n\n.em-button text {\n text-anchor: middle;\n font-size: 20px;\n fill: #333333;\n}\n\n/* zoom */\n.em-zoom-buttons {\n transform: translate(94%, 10%);\n}\n\n/* insets */\n.em-insets-button {\n transform: translate(94%, 2%);\n}\n",""]);const s=o},875:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(601),r=n.n(i),a=n(314),o=n.n(a)()(r());o.push([t.id,"#g_worldbn,\n.em-worldrg,\n.em-worldbn {\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.em-worldbn {\n stroke: #000;\n stroke-width: 0.3px;\n}\n\n.em-worldbn {\n fill: none;\n}\n\n.em-worldrg {\n fill: #efefef;\n cursor: pointer;\n}\n\n.em-bn-d {\n /* disputed */\n stroke: #000;\n stroke-width: 0.1;\n fill: none;\n}\n",""]);const s=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,a){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&o[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var a={},o=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],u=a[c]||0,h="".concat(c," ").concat(u);a[c]=u+1;var f=n(h),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)e[f].references++,e[f].updater(d);else{var p=r(d,i);i.byIndex=s,e.splice(s,0,{identifier:h,updater:p,references:1})}o.push(h)}return o}function r(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var a=i(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var s=n(a[o]);e[s].references--}for(var l=i(t,r),c=0;c<a.length;c++){var u=n(a[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}a=l}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},172:t=>{t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},993:(t,e,n)=>{var i=n(546);function r(){
|
|
3
3
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
4
|
-
var e,n,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function l(t,r,a,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return i(l,"_invoke",function(t,i,r){var a,o,s,l=0,u=r||[],h=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,s=e,f.n=n,c}};function p(t,i){for(o=t,s=i,n=0;!h&&l&&!r&&n<u.length;n++){var r,a=u[n],p=f.p,d=a[2];t>3?(r=d===i)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=t<2&&p<a[1])?(o=0,f.v=i,f.n=a[1]):p<d&&(r=t<3||a[0]>i||i>d)&&(a[4]=t,a[5]=i,f.n=d,o=0))}if(r||t>1)return c;throw h=!0,i}return function(r,u,d){if(l>1)throw TypeError("Generator is already running");for(h&&1===u&&p(u,d),o=u,s=d;(n=o<2?e:s)||!h;){a||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(l=2,a){if(o||(r="next"),n=a[r]){if(!(n=n.call(a,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,o<2&&(o=0)}else 1===o&&(n=a.return)&&n.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((n=(h=f.n<0)?s:t.call(i,f))!==c)break}catch(t){a=e,o=1,s=t}finally{l=1}}return{value:n,done:h}}}(t,a,o),!0),l}var c={};function u(){}function h(){}function f(){}n=Object.getPrototypeOf;var p=[][o]?n(n([][o]())):(i(n={},o,(function(){return this})),n),d=f.prototype=u.prototype=Object.create(p);function g(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,i(t,s,"GeneratorFunction")),t.prototype=Object.create(d),t}return h.prototype=f,i(d,"constructor",f),i(f,"constructor",h),h.displayName="GeneratorFunction",i(f,s,"GeneratorFunction"),i(d),i(d,s,"Generator"),i(d,o,(function(){return this})),i(d,"toString",(function(){return"[object Generator]"})),(t.exports=r=function(){return{w:l,m:g}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={id:i,exports:{}};return t[i](a,a.exports,n),a.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.u=t=>t+".eurostatmap.min.js",n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.p="/build/",n.b=document.baseURI||self.location.href,n.nc=void 0;var i={};return(()=>{"use strict";n.r(i),n.d(i,{getDefaultLabels:()=>ow,getFillPatternDefinitionFunction:()=>aw,map:()=>rw,version:()=>sw});var t={};n.r(t);var e=n(72),r=n.n(e),a=n(825),o=n.n(a),s=n(659),l=n.n(s),c=n(56),u=n.n(c),h=n(540),f=n.n(h),p=n(113),d=n.n(p),g=n(211),_={};_.styleTagTransform=d(),_.setAttributes=u(),_.insert=l().bind(null,"head"),_.domAPI=o(),_.insertStyleElement=f();r()(g.A,_);g.A&&g.A.locals&&g.A.locals;function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function v(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(t,e)||v(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(){}function w(t){return null==t?b:function(){return this.querySelector(t)}}function S(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function M(){return[]}function E(t){return null==t?M:function(){return this.querySelectorAll(t)}}function C(t){return function(){return this.matches(t)}}function A(t){return function(e){return e.matches(t)}}var k=Array.prototype.find;function T(){return this.firstElementChild}var P=Array.prototype.filter;function N(){return Array.from(this.children)}function L(t){return new Array(t.length)}function F(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function O(t,e,n,i,r,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new F(t,a[s]);for(;s<l;++s)(o=e[s])&&(r[s]=o)}function G(t,e,n,i,r,a,o){var s,l,c,u=new Map,h=e.length,f=a.length,p=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(p[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?r[s]=l:u.set(c,l));for(s=0;s<f;++s)c=o.call(t,a[s],s,a)+"",(l=u.get(c))?(i[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new F(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(p[s])===l&&(r[s]=l)}function D(t){return t.__data__}function z(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function I(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}F.prototype={constructor:F,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var R="http://www.w3.org/1999/xhtml";const j={svg:"http://www.w3.org/2000/svg",xhtml:R,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function B(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),j.hasOwnProperty(e)?{space:j[e],local:t}:t}function q(t){return function(){this.removeAttribute(t)}}function U(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function V(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Y(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function J(t){return function(){this.style.removeProperty(t)}}function X(t,e,n){return function(){this.style.setProperty(t,e,n)}}function K(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Z(t,e){return t.style.getPropertyValue(e)||Y(t).getComputedStyle(t,null).getPropertyValue(e)}function Q(t){return function(){delete this[t]}}function tt(t,e){return function(){this[t]=e}}function et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=nt(t.getAttribute("class")||"")}function at(t,e){for(var n=it(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ot(t,e){for(var n=it(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function st(t){return function(){at(this,t)}}function lt(t){return function(){ot(this,t)}}function ct(t,e){return function(){(e.apply(this,arguments)?at:ot)(this,t)}}function ut(){this.textContent=""}function ht(t){return function(){this.textContent=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function pt(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function gt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function _t(){this.nextSibling&&this.parentNode.appendChild(this)}function mt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===R&&e.documentElement.namespaceURI===R?e.createElement(t):e.createElementNS(n,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xt(t){var e=B(t);return(e.local?yt:vt)(e)}function bt(){return null}function wt(){var t=this.parentNode;t&&t.removeChild(this)}function St(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Et(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function Ct(t,e,n){return function(){var i,r=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),void(i.value=e);this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function At(t,e,n){var i=Y(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function kt(t,e){return function(){return At(this,t,e)}}function Tt(t,e){return function(){return At(this,t,e.apply(this,arguments))}}rt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Pt=[null];function Nt(t,e){this._groups=t,this._parents=e}function Lt(){return new Nt([[document.documentElement]],Pt)}Nt.prototype=Lt.prototype={constructor:Nt,select:function(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o,s=e[r],l=s.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new Nt(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return S(t.apply(this,arguments))}}(t):E(t);for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(i.push(t.call(o,o.__data__,c,s)),r.push(o));return new Nt(i,r)},selectChild:function(t){return this.select(null==t?T:function(t){return function(){return k.call(this.children,t)}}("function"==typeof t?t:A(t)))},selectChildren:function(t){return this.selectAll(null==t?N:function(t){return function(){return P.call(this.children,t)}}("function"==typeof t?t:A(t)))},filter:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Nt(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,D);var n=e?G:O,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],f=h.length,p=z(t.call(u,u&&u.__data__,c,i)),d=p.length,g=s[c]=new Array(d),_=o[c]=new Array(d);n(u,h,g,_,l[c]=new Array(f),p,e);for(var m,v,y=0,x=0;y<d;++y)if(m=g[y]){for(y>=x&&(x=y+1);!(v=_[x])&&++x<d;);m._next=v||null}}return(o=new Nt(o,i))._enter=s,o._exit=l,o},enter:function(){return new Nt(this._enter||this._groups.map(L),this._parents)},exit:function(){return new Nt(this._exit||this._groups.map(L),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,a=i.length,o=Math.min(r,a),s=new Array(r),l=0;l<o;++l)for(var c,u=n[l],h=i[l],f=u.length,p=s[l]=new Array(f),d=0;d<f;++d)(c=u[d]||h[d])&&(p[d]=c);for(;l<r;++l)s[l]=n[l];return new Nt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=I);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var o,s=n[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new Nt(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=B(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?U:q:"function"==typeof e?n.local?$:V:n.local?H:W)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?J:"function"==typeof e?K:X)(t,e,null==n?"":n)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Q:"function"==typeof e?et:tt)(t,e)):this.node()[t]},classed:function(t,e){var n=nt(t+"");if(arguments.length<2){for(var i=it(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?ct:e?st:lt)(n,e))},text:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ft:ht)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?pt:("function"==typeof t?gt:dt)(t)):this.node().innerHTML},raise:function(){return this.each(_t)},lower:function(){return this.each(mt)},append:function(t){var e="function"==typeof t?t:xt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:xt(t),i=null==e?bt:"function"==typeof e?e:w(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(wt)},clone:function(t){return this.select(t?Mt:St)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ct:Et,i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<o;++i)if((r=a[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Tt:kt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],a=0,o=r.length;a<o;++a)(i=r[a])&&(yield i)}};const Ft=Lt;function Ot(t){return"string"==typeof t?new Nt([[document.querySelector(t)]],[document.documentElement]):new Nt([[t]],Pt)}function Gt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}function Dt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}function zt(t){return null===t?NaN:+t}function It(t,e,n=zt){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,a=Math.floor(r),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(r-a)}}function Rt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function jt(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Bt(t){let e,n,i;function r(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<0?r=e+1:a=e}while(r<a)}return r}return 2!==t.length?(e=Rt,n=(e,n)=>Rt(t(e),n),i=(e,n)=>t(e)-n):(e=t===Rt||t===jt?t:qt,n=t,i=t),{left:r,center:function(t,e,n=0,a=t.length){const o=r(t,e,n,a-1);return o>n&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<=0?r=e+1:a=e}while(r<a)}return r}}}function qt(){return 0}const Ut=Bt(Rt),Wt=Ut.right,Ht=(Ut.left,Bt(zt).center,Wt);function Vt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function $t(){var t,e=[],n=[],i=[];function r(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=It(e,t/r);return a}function a(e){return null==e||isNaN(e=+e)?t:n[Ht(i,e)]}return a.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(Rt),r()},a.range=function(t){return arguments.length?(n=Array.from(t),r()):n.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return $t().domain(e).range(n).unknown(t)},Vt.apply(a,arguments)}const Yt=Math.sqrt(50),Jt=Math.sqrt(10),Xt=Math.sqrt(2);function Kt(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=Yt?10:a>=Jt?5:a>=Xt?2:1;let s,l,c;return r<0?(c=Math.pow(10,-r)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=n&&n<2?Kt(t,e,2*n):[s,l,c]}function Zt(t,e,n){return Kt(t=+t,e=+e,n=+n)[2]}function Qt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function te(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function ee(){}var ne=.7,ie=1/ne,re="\\s*([+-]?\\d+)\\s*",ae="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",se=/^#([0-9a-f]{3,8})$/,le=new RegExp(`^rgb\\(${re},${re},${re}\\)$`),ce=new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`),ue=new RegExp(`^rgba\\(${re},${re},${re},${ae}\\)$`),he=new RegExp(`^rgba\\(${oe},${oe},${oe},${ae}\\)$`),fe=new RegExp(`^hsl\\(${ae},${oe},${oe}\\)$`),pe=new RegExp(`^hsla\\(${ae},${oe},${oe},${ae}\\)$`),de={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 ge(){return this.rgb().formatHex()}function _e(){return this.rgb().formatRgb()}function me(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=se.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ve(e):3===n?new we(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ye(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ye(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=le.exec(t))?new we(e[1],e[2],e[3],1):(e=ce.exec(t))?new we(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ue.exec(t))?ye(e[1],e[2],e[3],e[4]):(e=he.exec(t))?ye(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fe.exec(t))?ke(e[1],e[2]/100,e[3]/100,1):(e=pe.exec(t))?ke(e[1],e[2]/100,e[3]/100,e[4]):de.hasOwnProperty(t)?ve(de[t]):"transparent"===t?new we(NaN,NaN,NaN,0):null}function ve(t){return new we(t>>16&255,t>>8&255,255&t,1)}function ye(t,e,n,i){return i<=0&&(t=e=n=NaN),new we(t,e,n,i)}function xe(t){return t instanceof ee||(t=me(t)),t?new we((t=t.rgb()).r,t.g,t.b,t.opacity):new we}function be(t,e,n,i){return 1===arguments.length?xe(t):new we(t,e,n,null==i?1:i)}function we(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Se(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}`}function Me(){const t=Ee(this.opacity);return`${1===t?"rgb(":"rgba("}${Ce(this.r)}, ${Ce(this.g)}, ${Ce(this.b)}${1===t?")":`, ${t})`}`}function Ee(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ce(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ae(t){return((t=Ce(t))<16?"0":"")+t.toString(16)}function ke(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Pe(t,e,n,i)}function Te(t){if(t instanceof Pe)return new Pe(t.h,t.s,t.l,t.opacity);if(t instanceof ee||(t=me(t)),!t)return new Pe;if(t instanceof Pe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,l=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n<i):n===a?(i-e)/s+2:(e-n)/s+4,s/=l<.5?a+r:2-a-r,o*=60):s=l>0&&l<1?0:o,new Pe(o,s,l,t.opacity)}function Pe(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ne(t){return(t=(t||0)%360)<0?t+360:t}function Le(t){return Math.max(0,Math.min(1,t||0))}function Fe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Oe(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}Qt(ee,me,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ge,formatHex:ge,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Te(this).formatHsl()},formatRgb:_e,toString:_e}),Qt(we,be,te(ee,{brighter(t){return t=null==t?ie:Math.pow(ie,t),new we(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ne:Math.pow(ne,t),new we(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new we(Ce(this.r),Ce(this.g),Ce(this.b),Ee(this.opacity))},displayable(){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:Se,formatHex:Se,formatHex8:function(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}${Ae(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Me,toString:Me})),Qt(Pe,(function(t,e,n,i){return 1===arguments.length?Te(t):new Pe(t,e,n,null==i?1:i)}),te(ee,{brighter(t){return t=null==t?ie:Math.pow(ie,t),new Pe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ne:Math.pow(ne,t),new Pe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new we(Fe(t>=240?t-240:t+120,r,i),Fe(t,r,i),Fe(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Pe(Ne(this.h),Le(this.s),Le(this.l),Ee(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ee(this.opacity);return`${1===t?"hsl(":"hsla("}${Ne(this.h)}, ${100*Le(this.s)}%, ${100*Le(this.l)}%${1===t?")":`, ${t})`}`}}));const Ge=t=>()=>t;function De(t,e){return function(n){return t+n*e}}function ze(t){return 1==(t=+t)?Ie:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ge(isNaN(e)?n:e)}}function Ie(t,e){var n=e-t;return n?De(t,n):Ge(isNaN(t)?e:t)}const Re=function t(e){var n=ze(e);function i(t,e){var i=n((t=be(t)).r,(e=be(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),o=Ie(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function je(t){return function(e){var n,i,r=e.length,a=new Array(r),o=new Array(r),s=new Array(r);for(n=0;n<r;++n)i=be(e[n]),a[n]=i.r||0,o[n]=i.g||0,s[n]=i.b||0;return a=t(a),o=t(o),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=o(t),i.b=s(t),i+""}}}var Be=je((function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=i<e-1?t[i+2]:2*a-r;return Oe((n-i/e)*e,o,r,a,s)}}));je((function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return Oe((n-i/e)*e,r,a,o,s)}}));function qe(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=new Array(r),o=new Array(i);for(n=0;n<r;++n)a[n]=Xe(t[n],e[n]);for(;n<i;++n)o[n]=e[n];return function(t){for(n=0;n<r;++n)o[n]=a[n](t);return o}}function Ue(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function We(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function He(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Xe(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var Ve=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$e=new RegExp(Ve.source,"g");function Ye(t,e){var n,i,r,a=Ve.lastIndex=$e.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Ve.exec(t))&&(i=$e.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:We(n,i)})),a=$e.lastIndex;return a<e.length&&(r=e.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)s[(n=l[i]).i]=n.x(t);return s.join("")})}function Je(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(n=0;n<i;++n)r[n]=t[n]*(1-a)+e[n]*a;return r}}function Xe(t,e){var n,i=typeof e;return null==e||"boolean"===i?Ge(e):("number"===i?We:"string"===i?(n=me(e))?(e=n,Re):Ye:e instanceof me?Re:e instanceof Date?Ue:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Je:Array.isArray(e)?qe:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?He:We)(t,e)}function Ke(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Ze(t){return+t}var Qe=[0,1];function tn(t){return t}function en(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function nn(t,e,n){var i=t[0],r=t[1],a=e[0],o=e[1];return r<i?(i=en(r,i),a=n(o,a)):(i=en(i,r),a=n(a,o)),function(t){return a(i(t))}}function rn(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=en(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Ht(t,e,1,i)-1;return a[n](r[n](e))}}function an(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function on(){var t,e,n,i,r,a,o=Qe,s=Qe,l=Xe,c=tn;function u(){var t=Math.min(o.length,s.length);return c!==tn&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),i=t>2?rn:nn,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=i(s,o.map(t),We)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Ze),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Ke,u()},h.clamp=function(t){return arguments.length?(c=!!t||tn,u()):c!==tn},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function sn(){return on()(tn,tn)}var ln,cn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function un(t){if(!(e=cn.exec(t)))throw new Error("invalid format: "+t);var e;return new hn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function hn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function fn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function pn(t){return(t=fn(Math.abs(t)))?t[1]:NaN}function dn(t,e){var n=fn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}un.prototype=hn.prototype,hn.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};const gn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>dn(100*t,e),r:dn,s:function(t,e){var n=fn(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(ln=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+fn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _n(t){return t}var mn,vn,yn,xn=Array.prototype.map,bn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wn(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?_n:(e=xn.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],o=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?_n:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(xn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=un(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,g=t.comma,_=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):gn[v]||(void 0===_&&(_=12),m=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var y="$"===f?r:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?a:/[%p]/.test(v)?l:"",b=gn[v],w=/[defgprs%]/.test(v);function S(t){var r,a,l,f=y,S=x;if("c"===v)S=b(t)+S,t="";else{var M=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:b(Math.abs(t),_),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==h&&(M=!1),f=(M?"("===h?h:c:"-"===h||"("===h?"":h)+f,S=("s"===v?bn[8+ln/3]:"")+S+(M&&"("===h?")":""),w)for(r=-1,a=t.length;++r<a;)if(48>(l=t.charCodeAt(r))||l>57){S=(46===l?o+t.slice(r+1):t.slice(r))+S,t=t.slice(0,r);break}}g&&!p&&(t=i(t,1/0));var E=f.length+t.length+S.length,C=E<d?new Array(d-E+1).join(e):"";switch(g&&p&&(t=i(C+t,C.length?d-S.length:1/0),C=""),n){case"<":t=f+t+S+C;break;case"=":t=f+C+t+S;break;case"^":t=C.slice(0,E=C.length>>1)+f+t+S+C.slice(E);break;default:t=C+f+t+S}return s(t)}return _=void 0===_?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),S.toString=function(){return t+""},S}return{format:h,formatPrefix:function(t,e){var n=h(((t=un(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(pn(e)/3))),r=Math.pow(10,-i),a=bn[8+i/3];return function(t){return n(r*t)+a}}}}function Sn(t){return mn=wn(t),vn=mn.format,yn=mn.formatPrefix,mn}function Mn(t,e,n,i){var r,a=function(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?Zt(e,t,n):Zt(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}(t,e,n);switch((i=un(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(pn(e)/3)))-pn(Math.abs(t)))}(a,o))||(i.precision=r),yn(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pn(e)-pn(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-pn(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return vn(i)}function En(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const i=e<t,[r,a,o]=i?Kt(e,t,n):Kt(t,e,n);if(!(a>=r))return[];const s=a-r+1,l=new Array(s);if(i)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(r+t)/-o;else for(let t=0;t<s;++t)l[t]=(r+t)*o;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Mn(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),o=0,s=a.length-1,l=a[o],c=a[s],u=10;for(c<l&&(r=l,l=c,c=r,r=o,o=s,s=r);u-- >0;){if((r=Zt(l,c,n))===i)return a[o]=l,a[s]=c,e(a);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function Cn(){var t=sn();return t.copy=function(){return an(t,Cn())},Vt.apply(t,arguments),En(t)}function An(){var t,e=0,n=1,i=1,r=[.5],a=[0,1];function o(e){return null!=e&&e<=e?a[Ht(r,e,0,i)]:t}function s(){var t=-1;for(r=new Array(i);++t<i;)r[t]=((t+1)*n-(t-i)*e)/(i+1);return o}return o.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},o.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=i?[r[i-1],n]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return r.slice()},o.copy=function(){return An().domain([e,n]).range(a).unknown(t)},Vt.apply(En(o),arguments)}function kn(){var t,e=[.5],n=[0,1],i=1;function r(r){return null!=r&&r<=r?n[Ht(e,r,0,i)]:t}return r.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(t){return arguments.length?(n=Array.from(t),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(t){var i=n.indexOf(t);return[e[i-1],e[i]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return kn().domain(e).range(n).unknown(t)},Vt.apply(r,arguments)}function Tn(t){for(var e=t.length/6|0,n=new Array(e),i=0;i<e;)n[i]="#"+t.slice(6*i,6*++i);return n}Sn({thousands:",",grouping:[3],currency:["$",""]});const Pn=t=>Be(t[t.length-1]);const Nn=Pn(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Tn));const Ln=Math.PI/180,Fn=180/Math.PI,On=.96422,Gn=.82521,Dn=4/29,zn=6/29,In=3*zn*zn,Rn=zn*zn*zn;function jn(t){if(t instanceof qn)return new qn(t.l,t.a,t.b,t.opacity);if(t instanceof Yn)return Jn(t);t instanceof we||(t=xe(t));var e,n,i=Vn(t.r),r=Vn(t.g),a=Vn(t.b),o=Un((.2225045*i+.7168786*r+.0606169*a)/1);return i===r&&r===a?e=n=o:(e=Un((.4360747*i+.3850649*r+.1430804*a)/On),n=Un((.0139322*i+.0971045*r+.7141733*a)/Gn)),new qn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Bn(t,e,n,i){return 1===arguments.length?jn(t):new qn(t,e,n,null==i?1:i)}function qn(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function Un(t){return t>Rn?Math.pow(t,1/3):t/In+Dn}function Wn(t){return t>zn?t*t*t:In*(t-Dn)}function Hn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function $n(t){if(t instanceof Yn)return new Yn(t.h,t.c,t.l,t.opacity);if(t instanceof qn||(t=jn(t)),0===t.a&&0===t.b)return new Yn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Fn;return new Yn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Yn(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Jn(t){if(isNaN(t.h))return new qn(t.l,0,0,t.opacity);var e=t.h*Ln;return new qn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Xn(t,e){var n=Ie((t=Bn(t)).l,(e=Bn(e)).l),i=Ie(t.a,e.a),r=Ie(t.b,e.b),a=Ie(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=r(e),t.opacity=a(e),t+""}}Qt(qn,Bn,te(ee,{brighter(t){return new qn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new qn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new we(Hn(3.1338561*(e=On*Wn(e))-1.6168667*(t=1*Wn(t))-.4906146*(n=Gn*Wn(n))),Hn(-.9787684*e+1.9161415*t+.033454*n),Hn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Qt(Yn,(function(t,e,n,i){return 1===arguments.length?$n(t):new Yn(t,e,n,null==i?1:i)}),te(ee,{brighter(t){return new Yn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Yn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Jn(this).rgb()}}));var Kn={value:()=>{}};function Zn(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Qn(i)}function Qn(t){this._=t}function ti(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function ei(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Kn,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Qn.prototype=Zn.prototype={constructor:Qn,on:function(t,e){var n,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)r[n]=ei(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ei(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=ti(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Qn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};const ni=Zn;var ii,ri,ai=0,oi=0,si=0,li=0,ci=0,ui=0,hi="object"==typeof performance&&performance.now?performance:Date,fi="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function pi(){return ci||(fi(di),ci=hi.now()+ui)}function di(){ci=0}function gi(){this._call=this._time=this._next=null}function _i(t,e,n){var i=new gi;return i.restart(t,e,n),i}function mi(){ci=(li=hi.now())+ui,ai=oi=0;try{!function(){pi(),++ai;for(var t,e=ii;e;)(t=ci-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ai}()}finally{ai=0,function(){var t,e,n=ii,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ii=e);ri=t,yi(i)}(),ci=0}}function vi(){var t=hi.now(),e=t-li;e>1e3&&(ui-=e,li=t)}function yi(t){ai||(oi&&(oi=clearTimeout(oi)),t-ci>24?(t<1/0&&(oi=setTimeout(mi,t-hi.now()-ui)),si&&(si=clearInterval(si))):(si||(li=hi.now(),si=setInterval(vi,1e3)),ai=1,fi(mi)))}function xi(t,e,n){var i=new gi;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}gi.prototype=_i.prototype={constructor:gi,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?pi():+n)+(null==e?0:+e),this._next||ri===this||(ri?ri._next=this:ii=this,ri=this),this._call=t,this._time=n,yi()},stop:function(){this._call&&(this._call=null,this._time=1/0,yi())}};var bi=ni("start","end","cancel","interrupt"),wi=[];function Si(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var c,u,h,f;if(1!==n.state)return l();for(c in r)if((f=r[c]).name===n.name){if(3===f.state)return xi(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete r[c])}if(xi((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=_i(a,0,n.time)}(t,n,{name:e,index:i,group:r,on:bi,tween:wi,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Mi(t,e){var n=Ci(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Ei(t,e){var n=Ci(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Ci(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ai(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[r]):o=!1;o&&delete t.__transition}}var ki,Ti=180/Math.PI,Pi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ni(t,e,n,i,r,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*Ti,skewX:Math.atan(l)*Ti,scaleX:o,scaleY:s}}function Li(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,i,r,a,o,s){if(t!==r||i!==a){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:We(t,r)},{i:l-2,x:We(i,a)})}else(r||a)&&o.push("translate("+r+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:We(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,o.rotate,s,l),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:We(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,o.skewX,s,l),function(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:We(t,n)},{i:s-2,x:We(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,n=-1,i=l.length;++n<i;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Fi=Li((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Pi:Ni(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Oi=Li((function(t){return null==t?Pi:(ki||(ki=document.createElementNS("http://www.w3.org/2000/svg","g")),ki.setAttribute("transform",t),(t=ki.transform.baseVal.consolidate())?Ni((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Pi)}),", ",")",")");function Gi(t,e){var n,i;return function(){var r=Ei(this,t),a=r.tween;if(a!==n)for(var o=0,s=(i=n=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}r.tween=i}}function Di(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=Ei(this,t),o=a.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=s;break}l===c&&r.push(s)}a.tween=r}}function zi(t,e,n){var i=t._id;return t.each((function(){var t=Ei(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Ci(t,i).value[e]}}function Ii(t,e){var n;return("number"==typeof e?We:e instanceof me?Re:(n=me(e))?(e=n,Re):Ye)(t,e)}function Ri(t){return function(){this.removeAttribute(t)}}function ji(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bi(t,e,n){var i,r,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===i?r:r=e(i=o,n)}}function qi(t,e,n){var i,r,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===i?r:r=e(i=o,n)}}function Ui(t,e,n){var i,r,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,l));this.removeAttribute(t)}}function Wi(t,e,n){var i,r,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,l));this.removeAttributeNS(t.space,t.local)}}function Hi(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Vi(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function $i(t,e){return function(){Mi(this,t).delay=+e.apply(this,arguments)}}function Yi(t,e){return e=+e,function(){Mi(this,t).delay=e}}function Ji(t,e){return function(){Ei(this,t).duration=+e.apply(this,arguments)}}function Xi(t,e){return e=+e,function(){Ei(this,t).duration=e}}var Ki=Ft.prototype.constructor;function Zi(t){return function(){this.style.removeProperty(t)}}var Qi=0;function tr(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function er(){return++Qi}var nr=Ft.prototype;tr.prototype=function(t){return Ft().transition(t)}.prototype={constructor:tr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=w(t));for(var i=this._groups,r=i.length,a=new Array(r),o=0;o<r;++o)for(var s,l,c=i[o],u=c.length,h=a[o]=new Array(u),f=0;f<u;++f)(s=c[f])&&(l=t.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),h[f]=l,Si(h[f],e,n,f,h,Ci(s,n)));return new tr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=E(t));for(var i=this._groups,r=i.length,a=[],o=[],s=0;s<r;++s)for(var l,c=i[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var f,p=t.call(l,l.__data__,h,c),d=Ci(l,n),g=0,_=p.length;g<_;++g)(f=p[g])&&Si(f,e,n,g,p,d);a.push(p),o.push(l)}return new tr(a,o,e,n)},selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new tr(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var l,c=e[s],u=n[s],h=c.length,f=o[s]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(f[p]=l);for(;s<i;++s)o[s]=e[s];return new tr(o,this._parents,this._name,this._id)},selection:function(){return new Ki(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=er(),i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=Ci(o,e);Si(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new tr(i,this._parents,t,n)},call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:function(t,e){var n=this._id;return arguments.length<2?Ci(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Mi:Ei;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}(n,t,e))},attr:function(t,e){var n=B(t),i="transform"===n?Oi:Ii;return this.attrTween(t,"function"==typeof e?(n.local?Wi:Ui)(n,i,zi(this,"attr."+t,e)):null==e?(n.local?ji:Ri)(n):(n.local?qi:Bi)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=B(t);return this.tween(n,(i.local?Hi:Vi)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Fi:Ii;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=Z(this,t),o=(this.style.removeProperty(t),Z(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}(t,i)).on("end.style."+t,Zi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var o=Z(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Z(this,t)),o===l?null:o===i&&l===r?a:(r=l,a=e(i=o,s))}}(t,i,zi(this,"style."+t,e))).each(function(t,e){var n,i,r,a,o="style."+e,s="end."+o;return function(){var l=Ei(this,t),c=l.on,u=null==l.value[o]?a||(a=Zi(e)):void 0;c===n&&r===u||(i=(n=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,a=n+"";return function(){var o=Z(this,t);return o===a?null:o===i?r:r=e(i=o,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function a(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,a,n)),i}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(zi(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Ci(this.node(),n).tween,a=0,o=r.length;a<o;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?Gi:Di)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?$i:Yi)(e,t)):Ci(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ji:Xi)(e,t)):Ci(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Ei(this,t).ease=e}}(e,t)):Ci(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Ei(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(a,o){var s={value:o},l={value:function(){0==--r&&a()}};n.each((function(){var n=Ei(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===r&&a()}))},[Symbol.iterator]:nr[Symbol.iterator]};var ir={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function rr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Ft.prototype.interrupt=function(t){return this.each((function(){Ai(this,t)}))},Ft.prototype.transition=function(t){var e,n;t instanceof tr?(e=t._id,t=t._name):(e=er(),(n=ir).time=pi(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],l=s.length,c=0;c<l;++c)(o=s[c])&&Si(o,t,e,c,s,n||rr(o,e));return new tr(i,this._parents,t,e)};const{abs:ar,max:or,min:sr}=Math;function lr(t){return[+t[0],+t[1]]}function cr(t){return[lr(t[0]),lr(t[1])]}["w","e"].map(ur),["n","s"].map(ur),["n","w","e","s","nw","ne","sw","se"].map(ur);function ur(t){return{type:t}}function hr(t){return function(){return t}}const fr=Math.abs,pr=Math.atan2,dr=Math.cos,gr=Math.max,_r=Math.min,mr=Math.sin,vr=Math.sqrt,yr=1e-12,xr=Math.PI,br=xr/2,wr=2*xr;function Sr(t){return t>=1?br:t<=-1?-br:Math.asin(t)}const Mr=Math.PI,Er=2*Mr,Cr=1e-6,Ar=Er-Cr;function kr(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Tr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?kr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return kr;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,a){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+a}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,o=this._y1,s=n-t,l=i-e,c=a-t,u=o-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>Cr)if(Math.abs(u*s-l*c)>Cr&&r){let f=n-a,p=i-o,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),m=Math.sqrt(h),v=r*Math.tan((Mr-Math.acos((d+h-g)/(2*_*m)))/2),y=v/m,x=v/_;Math.abs(y-1)>Cr&&this._append`L${t+y*c},${e+y*u}`,this._append`A${r},${r},0,0,${+(u*f>c*p)},${this._x1=t+x*s},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,i,r,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),s=n*Math.sin(i),l=t+o,c=e+s,u=1^a,h=a?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Cr||Math.abs(this._y1-c)>Cr)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%Er+Er),h>Ar?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Cr&&this._append`A${n},${n},0,${+(h>=Mr)},${u},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Pr(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Tr(e)}function Nr(t){return t.innerRadius}function Lr(t){return t.outerRadius}function Fr(t){return t.startAngle}function Or(t){return t.endAngle}function Gr(t){return t&&t.padAngle}function Dr(t,e,n,i,r,a,o){var s=t-n,l=e-i,c=(o?a:-a)/vr(s*s+l*l),u=c*l,h=-c*s,f=t+u,p=e+h,d=n+u,g=i+h,_=(f+d)/2,m=(p+g)/2,v=d-f,y=g-p,x=v*v+y*y,b=r-a,w=f*g-d*p,S=(y<0?-1:1)*vr(gr(0,b*b*x-w*w)),M=(w*y-v*S)/x,E=(-w*v-y*S)/x,C=(w*y+v*S)/x,A=(-w*v+y*S)/x,k=M-_,T=E-m,P=C-_,N=A-m;return k*k+T*T>P*P+N*N&&(M=C,E=A),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function zr(){var t=Nr,e=Lr,n=hr(0),i=null,r=Fr,a=Or,o=Gr,s=null,l=Pr(c);function c(){var c,u,h=+t.apply(this,arguments),f=+e.apply(this,arguments),p=r.apply(this,arguments)-br,d=a.apply(this,arguments)-br,g=fr(d-p),_=d>p;if(s||(s=c=l()),f<h&&(u=f,f=h,h=u),f>yr)if(g>wr-yr)s.moveTo(f*dr(p),f*mr(p)),s.arc(0,0,f,p,d,!_),h>yr&&(s.moveTo(h*dr(d),h*mr(d)),s.arc(0,0,h,d,p,_));else{var m,v,y=p,x=d,b=p,w=d,S=g,M=g,E=o.apply(this,arguments)/2,C=E>yr&&(i?+i.apply(this,arguments):vr(h*h+f*f)),A=_r(fr(f-h)/2,+n.apply(this,arguments)),k=A,T=A;if(C>yr){var P=Sr(C/h*mr(E)),N=Sr(C/f*mr(E));(S-=2*P)>yr?(b+=P*=_?1:-1,w-=P):(S=0,b=w=(p+d)/2),(M-=2*N)>yr?(y+=N*=_?1:-1,x-=N):(M=0,y=x=(p+d)/2)}var L=f*dr(y),F=f*mr(y),O=h*dr(w),G=h*mr(w);if(A>yr){var D,z=f*dr(x),I=f*mr(x),R=h*dr(b),j=h*mr(b);if(g<xr)if(D=function(t,e,n,i,r,a,o,s){var l=n-t,c=i-e,u=o-r,h=s-a,f=h*l-u*c;if(!(f*f<yr))return[t+(f=(u*(e-a)-h*(t-r))/f)*l,e+f*c]}(L,F,R,j,z,I,O,G)){var B=L-D[0],q=F-D[1],U=z-D[0],W=I-D[1],H=1/mr(function(t){return t>1?0:t<-1?xr:Math.acos(t)}((B*U+q*W)/(vr(B*B+q*q)*vr(U*U+W*W)))/2),V=vr(D[0]*D[0]+D[1]*D[1]);k=_r(A,(h-V)/(H-1)),T=_r(A,(f-V)/(H+1))}else k=T=0}M>yr?T>yr?(m=Dr(R,j,L,F,f,T,_),v=Dr(z,I,O,G,f,T,_),s.moveTo(m.cx+m.x01,m.cy+m.y01),T<A?s.arc(m.cx,m.cy,T,pr(m.y01,m.x01),pr(v.y01,v.x01),!_):(s.arc(m.cx,m.cy,T,pr(m.y01,m.x01),pr(m.y11,m.x11),!_),s.arc(0,0,f,pr(m.cy+m.y11,m.cx+m.x11),pr(v.cy+v.y11,v.cx+v.x11),!_),s.arc(v.cx,v.cy,T,pr(v.y11,v.x11),pr(v.y01,v.x01),!_))):(s.moveTo(L,F),s.arc(0,0,f,y,x,!_)):s.moveTo(L,F),h>yr&&S>yr?k>yr?(m=Dr(O,G,z,I,h,-k,_),v=Dr(L,F,R,j,h,-k,_),s.lineTo(m.cx+m.x01,m.cy+m.y01),k<A?s.arc(m.cx,m.cy,k,pr(m.y01,m.x01),pr(v.y01,v.x01),!_):(s.arc(m.cx,m.cy,k,pr(m.y01,m.x01),pr(m.y11,m.x11),!_),s.arc(0,0,h,pr(m.cy+m.y11,m.cx+m.x11),pr(v.cy+v.y11,v.cx+v.x11),_),s.arc(v.cx,v.cy,k,pr(v.y11,v.x11),pr(v.y01,v.x01),!_))):s.arc(0,0,h,w,b,_):s.lineTo(O,G)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-xr/2;return[dr(i)*n,mr(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:hr(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:hr(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:hr(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:hr(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:hr(+t),c):r},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:hr(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:hr(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}const Ir={capture:!0,passive:!1};function Rr(t){t.preventDefault(),t.stopImmediatePropagation()}function jr(t){return((t=Math.exp(t))+1/t)/2}const Br=function t(e,n,i){function r(t,r){var a,o,s=t[0],l=t[1],c=t[2],u=r[0],h=r[1],f=r[2],p=u-s,d=h-l,g=p*p+d*d;if(g<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*p,l+t*d,c*Math.exp(e*t*o)]};else{var _=Math.sqrt(g),m=(f*f-c*c+i*g)/(2*c*n*_),v=(f*f-c*c-i*g)/(2*f*n*_),y=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(v*v+1)-v);o=(x-y)/e,a=function(t){var i=t*o,r=jr(y),a=c/(n*_)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+y)-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[s+a*p,l+a*d,c*r/jr(e*i+y)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4);function qr(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const Ur=t=>()=>t;function Wr(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Hr(t,e,n){this.k=t,this.x=e,this.y=n}Hr.prototype={constructor:Hr,scale:function(t){return 1===t?this:new Hr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Vr=new Hr(1,0,0);function $r(t){t.stopImmediatePropagation()}function Yr(t){t.preventDefault(),t.stopImmediatePropagation()}function Jr(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Xr(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Kr(){return this.__zoom||Vr}function Zr(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Qr(){return navigator.maxTouchPoints||"ontouchstart"in this}function ta(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function ea(){var t,e,n,i=Jr,r=Xr,a=ta,o=Zr,s=Qr,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=Br,f=ni("start","zoom","end"),p=0,d=10;function g(t){t.property("__zoom",Kr).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",M).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new Hr(e,t.x,t.y)}function m(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new Hr(t.k,i,r)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function y(t,e,n,i){t.on("start.zoom",(function(){x(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,a=arguments,o=x(t,a).event(i),s=r.apply(t,a),l=null==n?v(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,a):e,p=h(u.invert(l).concat(c/u.k),f.invert(l).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=p(t),n=c/e[2];t=new Hr(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function w(t,...e){if(i.apply(this,arguments)){var n=x(this,e).event(t),r=this.__zoom,s=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,o.apply(this,arguments)))),u=qr(t);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=r.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(r.k===s)return;n.mouse=[u,r.invert(u)],Ai(this),n.start()}Yr(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",a(m(_(r,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(t,...e){if(!n&&i.apply(this,arguments)){var r=t.currentTarget,o=x(this,e,!0).event(t),s=Ot(t.view).on("mousemove.zoom",(function(t){if(Yr(t),!o.moved){var e=t.clientX-u,n=t.clientY-h;o.moved=e*e+n*n>p}o.event(t).zoom("mouse",a(m(o.that.__zoom,o.mouse[0]=qr(t,r),o.mouse[1]),o.extent,c))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=Ot(t).on("dragstart.drag",null);e&&(i.on("click.drag",Rr,Ir),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,o.moved),Yr(t),o.event(t).end()}),!0),l=qr(t,r),u=t.clientX,h=t.clientY;!function(t){var e=t.document.documentElement,n=Ot(t).on("dragstart.drag",Rr,Ir);"onselectstart"in e?n.on("selectstart.drag",Rr,Ir):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),$r(t),o.mouse=[l,this.__zoom.invert(l)],Ai(this),o.start()}}function M(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,o=qr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),l=n.k*(t.shiftKey?.5:2),h=a(m(_(n,l),o,s),r.apply(this,e),c);Yr(t),u>0?Ot(this).transition().duration(u).call(y,h,o,t):Ot(this).call(g.transform,h,o,t)}}function E(n,...r){if(i.apply(this,arguments)){var a,o,s,l,c=n.touches,u=c.length,h=x(this,r,n.changedTouches.length===u).event(n);for($r(n),o=0;o<u;++o)l=[l=qr(s=c[o],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,a=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),500)),Ai(this),h.start())}}function C(t,...e){if(this.__zooming){var n,i,r,o,s=x(this,e).event(t),l=t.changedTouches,u=l.length;for(Yr(t),n=0;n<u;++n)r=qr(i=l[n],this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=r);if(i=s.that.__zoom,s.touch1){var h=s.touch0[0],f=s.touch0[1],p=s.touch1[0],d=s.touch1[1],g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g,v=(v=d[0]-f[0])*v+(v=d[1]-f[1])*v;i=_(i,Math.sqrt(g/v)),r=[(h[0]+p[0])/2,(h[1]+p[1])/2],o=[(f[0]+d[0])/2,(f[1]+d[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(m(i,r,o),s.extent,c))}}function A(t,...i){if(this.__zooming){var r,a,o=x(this,i).event(t),s=t.changedTouches,l=s.length;for($r(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),r=0;r<l;++r)a=s[r],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=qr(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<d)){var c=Ot(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,n,i){var r=t.selection?t.selection():t;r.property("__zoom",Kr),t!==r?y(t,e,n,i):r.interrupt().each((function(){x(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},g.scaleBy=function(t,e,n,i){g.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},g.scaleTo=function(t,e,n,i){g.transform(t,(function(){var t=r.apply(this,arguments),i=this.__zoom,o=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n,s=i.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return a(m(_(i,l),o,s),t,c)}),n,i)},g.translateBy=function(t,e,n,i){g.transform(t,(function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}),null,i)},g.translateTo=function(t,e,n,i,o){g.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==i?v(t):"function"==typeof i?i.apply(this,arguments):i;return a(Vr.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,o)},b.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Ot(this.that).datum();f.call(t,this.that,new Wr(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:f}),e)}},g.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:Ur(+t),g):o},g.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ur(!!t),g):i},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ur(!!t),g):s},g.extent=function(t){return arguments.length?(r="function"==typeof t?t:Ur([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):r},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(u=+t,g):u},g.interpolate=function(t){return arguments.length?(h=t,g):h},g.on=function(){var t=f.on.apply(f,arguments);return t===f?g:t},g.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,g):Math.sqrt(p)},g.tapDistance=function(t){return arguments.length?(d=+t,g):d},g}function na(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ia(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ia(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ia(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ra(t,e,n){if(!t.startsWith(".")&&!t.startsWith("#"))throw new Error('Invalid selector: Must start with "." for classes or "#" for IDs.');for(var i=0,r=Array.from(document.styleSheets);i<r.length;i++){var a=r[i];try{var o,s=na(a.cssRules||a.rules);try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l.selectorText===t)return void(l.style[e]=n)}}catch(t){s.e(t)}finally{s.f()}}catch(t){console.warn("Could not access rules in stylesheet:",t)}}var c=document.getElementById("custom-styles");c||((c=document.createElement("style")).id="custom-styles",document.head.appendChild(c));try{c.sheet.insertRule("".concat(t," { ").concat(e,": ").concat(n,"; }"),c.sheet.cssRules.length)}catch(i){console.error("Failed to insert rule: ".concat(t," { ").concat(e,": ").concat(n,"; }"),i)}}Hr.prototype;var aa=function(t){var e=document.createElement("div");e.className=t,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto",e.style.width="auto",e.style.lineHeight="normal",e.style.fontSize="initial",document.body.appendChild(e);var n=parseFloat(window.getComputedStyle(e).fontSize);return document.body.removeChild(e),n||0},oa=function(t,e){var n=document.createElement("div");n.className=t,n.style.position="absolute",n.style.visibility="hidden",n.style.height="auto",n.style.lineHeight="normal",document.body.appendChild(n);var i=window.getComputedStyle(n).getPropertyValue(e);return document.body.removeChild(n),i||null};function sa(t){var e=[],n=function(){var t,e=[],n=na(document.styleSheets);try{for(n.s();!(t=n.n()).done;){var i=t.value;try{var r,a=na(i.cssRules);try{for(a.s();!(r=a.n()).done;){var o=r.value;e.push(o)}}catch(t){a.e(t)}finally{a.f()}}catch(t){console.warn("Unable to access stylesheet:",i.href,t)}}}catch(t){n.e(t)}finally{n.f()}return e}();n.forEach((function(n){t.matches(n.selectorText)&&e.push(n.style)}));var i={};return e.forEach((function(t){for(var e=0;e<t.length;e++){var n=t[e];i[n]=t.getPropertyValue(n)}})),i}var la=function(t){t.querySelectorAll("*").forEach((function(t){var e=sa(t);Object.keys(e).forEach((function(n){var i=e[n];!t.style.getPropertyValue(n)&&i&&t.style.setProperty(n,i)}))}))},ca=function(t){return t.toLocaleString("en").replace(/,/gi," ")};function ua(t){return"".concat(t,"-").concat(Math.random().toString(36).substr(2,9))}var ha=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;for(var a in t){var o=t[a];Array.isArray(o)?o.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.svgId_!==e&&n(t,i,r)})):t.svgId_!==e&&n(t,i,r)})):o.svgId_!==e&&n(o,i,r)}};function fa(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}var pa=function(t){var e,n,i;if(!t.startsWith("rgb")&&!t.startsWith("#")){var r=document.createElement("div");r.style.color=t,document.body.appendChild(r);var a=window.getComputedStyle(r).color;document.body.removeChild(r),t=a}if(t.startsWith("#")){var o=t.replace("#","");3===o.length&&(o=o.split("").map((function(t){return t+t})).join("")),e=parseInt(o.substring(0,2),16),n=parseInt(o.substring(2,4),16),i=parseInt(o.substring(4,6),16)}else{var s=t.match(/\d+/g);e=parseInt(s[0]),n=parseInt(s[1]),i=parseInt(s[2])}return e/255*.2126+n/255*.7152+i/255*.0722>.5?"black":"white"},da=function(t){return t.Geometries.userGeometries?"#em-user-regions path":t.gridCartogram_?"#em-grid-container .em-grid-cell":"WORLD"===t.geo_?"#em-worldrg path":"#em-nutsrg path:not(#em-cntrg-RS):not(#em-cntrg-EL), #em-cntrg path:not(#em-cntrg-RS):not(#em-cntrg-EL)"},ga=function(t){return t.Geometries.userGeometries?"#em-user-regions":t.gridCartogram_?"#em-grid-container":"WORLD"===t.geo_?"#em-worldrg":"#em-nutsrg, #em-cntrg"},_a=function(t){var e=.5*t.position_.z*t.width_,n=.5*t.position_.z*t.height_;return[t.position_.x-e,t.position_.y-n,t.position_.x+e,t.position_.y+n]};function ma(t){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(t)}function va(t){var e=function(t,e){if("object"!=ma(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=ma(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ma(e)?e:e+""}function ya(t,e,n){return(e=va(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xa(t){return"string"==typeof t?new Nt([document.querySelectorAll(t)],[document.documentElement]):new Nt([S(t)],Pt)}class ba{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=e[i],a=t+r,o=Math.abs(t)<Math.abs(r)?t-(a-r):r-(a-t);o&&(e[n++]=o),t=a}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,i,r=this._n,a=0;if(r>0){for(a=t[--r];r>0&&(e=a,n=t[--r],a=e+n,i=n-(a-e),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(n=2*i,e=a+n,n==e-a&&(a=e))}return a}}var wa=1e-6,Sa=1e-12,Ma=Math.PI,Ea=Ma/2,Ca=Ma/4,Aa=2*Ma,ka=180/Ma,Ta=Ma/180,Pa=Math.abs,Na=Math.atan,La=Math.atan2,Fa=Math.cos,Oa=Math.ceil,Ga=(Math.exp,Math.floor,Math.hypot),Da=(Math.log,Math.pow,Math.sin),za=Math.sign||function(t){return t>0?1:t<0?-1:0},Ia=Math.sqrt;Math.tan;function Ra(t){return t>1?Ea:t<-1?-Ea:Math.asin(t)}function ja(){}function Ba(t,e){t&&ao.hasOwnProperty(t.type)&&ao[t.type](t,e)}var qa,Ua,Wa,Ha,Va,$a,Ya,Ja,Xa,Ka,Za,Qa,to,eo,no,io,ro={Feature:function(t,e){Ba(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)Ba(n[i].geometry,e)}},ao={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){oo(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)oo(n[i],e,0)},Polygon:function(t,e){so(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)so(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)Ba(n[i],e)}};function oo(t,e,n){var i,r=-1,a=t.length-n;for(e.lineStart();++r<a;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function so(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)oo(t[n],e,1);e.polygonEnd()}function lo(t,e){t&&ro.hasOwnProperty(t.type)?ro[t.type](t,e):Ba(t,e)}var co={sphere:ja,point:uo,lineStart:fo,lineEnd:_o,polygonStart:function(){co.lineStart=mo,co.lineEnd=vo},polygonEnd:function(){co.lineStart=fo,co.lineEnd=_o}};function uo(t,e){t*=Ta;var n=Fa(e*=Ta);ho(n*Fa(t),n*Da(t),Da(e))}function ho(t,e,n){++qa,Wa+=(t-Wa)/qa,Ha+=(e-Ha)/qa,Va+=(n-Va)/qa}function fo(){co.point=po}function po(t,e){t*=Ta;var n=Fa(e*=Ta);eo=n*Fa(t),no=n*Da(t),io=Da(e),co.point=go,ho(eo,no,io)}function go(t,e){t*=Ta;var n=Fa(e*=Ta),i=n*Fa(t),r=n*Da(t),a=Da(e),o=La(Ia((o=no*a-io*r)*o+(o=io*i-eo*a)*o+(o=eo*r-no*i)*o),eo*i+no*r+io*a);Ua+=o,$a+=o*(eo+(eo=i)),Ya+=o*(no+(no=r)),Ja+=o*(io+(io=a)),ho(eo,no,io)}function _o(){co.point=uo}function mo(){co.point=yo}function vo(){xo(Qa,to),co.point=uo}function yo(t,e){Qa=t,to=e,t*=Ta,e*=Ta,co.point=xo;var n=Fa(e);eo=n*Fa(t),no=n*Da(t),io=Da(e),ho(eo,no,io)}function xo(t,e){t*=Ta;var n=Fa(e*=Ta),i=n*Fa(t),r=n*Da(t),a=Da(e),o=no*a-io*r,s=io*i-eo*a,l=eo*r-no*i,c=Ga(o,s,l),u=Ra(c),h=c&&-u/c;Xa.add(h*o),Ka.add(h*s),Za.add(h*l),Ua+=u,$a+=u*(eo+(eo=i)),Ya+=u*(no+(no=r)),Ja+=u*(io+(io=a)),ho(eo,no,io)}function bo(t){qa=Ua=Wa=Ha=Va=$a=Ya=Ja=0,Xa=new ba,Ka=new ba,Za=new ba,lo(t,co);var e=+Xa,n=+Ka,i=+Za,r=Ga(e,n,i);return r<Sa&&(e=$a,n=Ya,i=Ja,Ua<wa&&(e=Wa,n=Ha,i=Va),(r=Ga(e,n,i))<Sa)?[NaN,NaN]:[La(n,e)*ka,Ra(i/r)*ka]}function wo(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:ja,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function So(t,e){return Pa(t[0]-e[0])<wa&&Pa(t[1]-e[1])<wa}function Mo(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Eo(t,e,n,i,r){var a,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],o=t[e];if(So(i,o)){if(!i[2]&&!o[2]){for(r.lineStart(),a=0;a<e;++a)r.point((i=t[a])[0],i[1]);return void r.lineEnd()}o[0]+=2e-6}s.push(n=new Mo(i,t,null,!0)),l.push(n.o=new Mo(i,null,n,!1)),s.push(n=new Mo(o,t,null,!1)),l.push(n.o=new Mo(o,null,n,!0))}})),s.length){for(l.sort(e),Co(s),Co(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,p=!0;f.v;)if((f=f.n)===h)return;c=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,o=c.length;a<o;++a)r.point((u=c[a])[0],u[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(p)for(c=f.p.z,a=c.length-1;a>=0;--a)r.point((u=c[a])[0],u[1]);else i(f.x,f.p.x,-1,r);f=f.p}c=(f=f.o).z,p=!p}while(!f.v);r.lineEnd()}}}function Co(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}function Ao(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var ko=1e9,To=-ko;function Po(t,e,n,i){function r(r,a){return t<=r&&r<=n&&e<=a&&a<=i}function a(r,a,s,c){var u=0,h=0;if(null==r||(u=o(r,s))!==(h=o(a,s))||l(r,a)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?i:e)}while((u=(u+s+4)%4)!==h);else c.point(a[0],a[1])}function o(i,r){return Pa(i[0]-t)<wa?r>0?0:3:Pa(i[0]-n)<wa?r>0?2:1:Pa(i[1]-e)<wa?r>0?1:0:r>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),i=o(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,f,p,d,g,_,m,v,y=o,x=wo(),b={point:w,lineStart:function(){b.point=S,c&&c.push(u=[]);m=!0,_=!1,d=g=NaN},lineEnd:function(){l&&(S(h,f),p&&_&&x.rejoin(),l.push(x.result()));b.point=w,_&&y.lineEnd()},polygonStart:function(){y=x,l=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=c.length;n<r;++n)for(var a,o,s=c[n],l=1,u=s.length,h=s[0],f=h[0],p=h[1];l<u;++l)a=f,o=p,f=(h=s[l])[0],p=h[1],o<=i?p>i&&(f-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(f-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=v&&e,r=(l=Ao(l)).length;(n||r)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),r&&Eo(l,s,e,a,o),o.polygonEnd());y=o,l=c=u=null}};function w(t,e){r(t,e)&&y.point(t,e)}function S(a,o){var s=r(a,o);if(c&&u.push([a,o]),m)h=a,f=o,p=s,m=!1,s&&(y.lineStart(),y.point(a,o));else if(s&&_)y.point(a,o);else{var l=[d=Math.max(To,Math.min(ko,d)),g=Math.max(To,Math.min(ko,g))],x=[a=Math.max(To,Math.min(ko,a)),o=Math.max(To,Math.min(ko,o))];!function(t,e,n,i,r,a){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,f=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=i-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<u&&(u=o)}else if(f>0){if(o>u)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*f),u<1&&(e[0]=s+u*h,e[1]=l+u*f),!0}}}}}(l,x,t,e,n,i)?s&&(y.lineStart(),y.point(a,o),v=!1):(_||(y.lineStart(),y.point(l[0],l[1])),y.point(x[0],x[1]),s||y.lineEnd(),v=!1)}d=a,g=o,_=s}return b}}const No=t=>t;function Lo(t){return function(e){var n=new Fo;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Fo(){}Fo.prototype={constructor:Fo,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 Oo=1/0,Go=Oo,Do=-Oo,zo=Do,Io={point:function(t,e){t<Oo&&(Oo=t);t>Do&&(Do=t);e<Go&&(Go=e);e>zo&&(zo=e)},lineStart:ja,lineEnd:ja,polygonStart:ja,polygonEnd:ja,result:function(){var t=[[Oo,Go],[Do,zo]];return Do=zo=-(Go=Oo=1/0),t}};const Ro=Io;function jo(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),lo(n,t.stream(Ro)),e(Ro.result()),null!=i&&t.clipExtent(i),t}function Bo(t,e,n){return jo(t,(function(n){var i=e[1][0]-e[0][0],r=e[1][1]-e[0][1],a=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),o=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function qo(t,e,n){return Bo(t,[[0,0],e],n)}function Uo(t,e,n){return jo(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),a=(i-r*(n[1][0]+n[0][0]))/2,o=-r*n[0][1];t.scale(150*r).translate([a,o])}),n)}function Wo(t,e,n){return jo(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),a=-r*n[0][0],o=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,o])}),n)}var Ho,Vo,$o,Yo,Jo=new ba,Xo=new ba,Ko={point:ja,lineStart:ja,lineEnd:ja,polygonStart:function(){Ko.lineStart=Zo,Ko.lineEnd=es},polygonEnd:function(){Ko.lineStart=Ko.lineEnd=Ko.point=ja,Jo.add(Pa(Xo)),Xo=new ba},result:function(){var t=Jo/2;return Jo=new ba,t}};function Zo(){Ko.point=Qo}function Qo(t,e){Ko.point=ts,Ho=$o=t,Vo=Yo=e}function ts(t,e){Xo.add(Yo*t-$o*e),$o=t,Yo=e}function es(){ts(Ho,Vo)}const ns=Ko;var is,rs,as,os,ss=0,ls=0,cs=0,us=0,hs=0,fs=0,ps=0,ds=0,gs=0,_s={point:ms,lineStart:vs,lineEnd:bs,polygonStart:function(){_s.lineStart=ws,_s.lineEnd=Ss},polygonEnd:function(){_s.point=ms,_s.lineStart=vs,_s.lineEnd=bs},result:function(){var t=gs?[ps/gs,ds/gs]:fs?[us/fs,hs/fs]:cs?[ss/cs,ls/cs]:[NaN,NaN];return ss=ls=cs=us=hs=fs=ps=ds=gs=0,t}};function ms(t,e){ss+=t,ls+=e,++cs}function vs(){_s.point=ys}function ys(t,e){_s.point=xs,ms(as=t,os=e)}function xs(t,e){var n=t-as,i=e-os,r=Ia(n*n+i*i);us+=r*(as+t)/2,hs+=r*(os+e)/2,fs+=r,ms(as=t,os=e)}function bs(){_s.point=ms}function ws(){_s.point=Ms}function Ss(){Es(is,rs)}function Ms(t,e){_s.point=Es,ms(is=as=t,rs=os=e)}function Es(t,e){var n=t-as,i=e-os,r=Ia(n*n+i*i);us+=r*(as+t)/2,hs+=r*(os+e)/2,fs+=r,ps+=(r=os*t-as*e)*(as+t),ds+=r*(os+e),gs+=3*r,ms(as=t,os=e)}const Cs=_s;function As(t){this._context=t}As.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,Aa)}},result:ja};var ks,Ts,Ps,Ns,Ls,Fs=new ba,Os={point:ja,lineStart:function(){Os.point=Gs},lineEnd:function(){ks&&Ds(Ts,Ps),Os.point=ja},polygonStart:function(){ks=!0},polygonEnd:function(){ks=null},result:function(){var t=+Fs;return Fs=new ba,t}};function Gs(t,e){Os.point=Ds,Ts=Ns=t,Ps=Ls=e}function Ds(t,e){Ns-=t,Ls-=e,Fs.add(Ia(Ns*Ns+Ls*Ls)),Ns=t,Ls=e}const zs=Os;let Is,Rs,js,Bs;class qs{constructor(t){this._append=null==t?Us:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Us;if(e!==Is){const t=10**e;Is=e,Rs=function(e){let n=1;this._+=e[0];for(const i=e.length;n<i;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return Rs}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==js||this._append!==Rs){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,js=t,Rs=this._append,Bs=this._,this._=e}this._+=Bs}}result(){const t=this._;return this._="",t.length?t:null}}function Us(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Ws(t,e){let n,i,r=3,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),lo(t,n(i))),i.result()}return o.area=function(t){return lo(t,n(ns)),ns.result()},o.measure=function(t){return lo(t,n(zs)),zs.result()},o.bounds=function(t){return lo(t,n(Ro)),Ro.result()},o.centroid=function(t){return lo(t,n(Cs)),Cs.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,No):(t=e).stream,o):t},o.context=function(t){return arguments.length?(i=null==t?(e=null,new qs(r)):new As(e=t),"function"!=typeof a&&i.pointRadius(a),o):e},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);r=e}return null===e&&(i=new qs(r)),o},o.projection(t).digits(r).context(e)}function Hs(){}function Vs(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:Hs,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}var $s=1e-6,Ys=Math.PI,Js=Ys/2,Xs=Ys/4,Ks=2*Ys,Zs=180/Ys,Qs=Ys/180,tl=Math.abs,el=Math.atan,nl=Math.atan2,il=Math.cos,rl=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),al=Math.sign||function(t){return t>0?1:t<0?-1:0},ol=Math.sqrt;Math.tan;function sl(t){return t>1?Js:t<-1?-Js:Math.asin(t)}function ll(t,e){return tl(t[0]-e[0])<$s&&tl(t[1]-e[1])<$s}function cl(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function ul(t,e,n,i,r){var a,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],o=t[e];if(ll(i,o)){if(!i[2]&&!o[2]){for(r.lineStart(),a=0;a<e;++a)r.point((i=t[a])[0],i[1]);return void r.lineEnd()}o[0]+=2e-6}s.push(n=new cl(i,t,null,!0)),l.push(n.o=new cl(i,null,n,!1)),s.push(n=new cl(o,t,null,!1)),l.push(n.o=new cl(o,null,n,!0))}})),s.length){for(l.sort(e),hl(s),hl(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,p=!0;f.v;)if((f=f.n)===h)return;c=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,o=c.length;a<o;++a)r.point((u=c[a])[0],u[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(p)for(c=f.p.z,a=c.length-1;a>=0;--a)r.point((u=c[a])[0],u[1]);else i(f.x,f.p.x,-1,r);f=f.p}c=(f=f.o).z,p=!p}while(!f.v);r.lineEnd()}}}function hl(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}class fl{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=e[i],a=t+r,o=Math.abs(t)<Math.abs(r)?t-(a-r):r-(a-t);o&&(e[n++]=o),t=a}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,i,r=this._n,a=0;if(r>0){for(a=t[--r];r>0&&(e=a,n=t[--r],a=e+n,i=n-(a-e),!i););r>0&&(i<0&&t[r-1]<0||i>0&&t[r-1]>0)&&(n=2*i,e=a+n,n==e-a&&(a=e))}return a}}function pl(t){return[nl(t[1],t[0]),sl(t[2])]}function dl(t){var e=t[0],n=t[1],i=il(n);return[i*il(e),i*rl(e),rl(n)]}function gl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _l(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 ml(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function yl(t){var e=ol(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function xl(t){return tl(t[0])<=Ys?t[0]:al(t[0])*((tl(t[0])+Ys)%Ks-Ys)}function bl(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function wl(t,e,n,i){return function(r){var a,o,s,l=e(r),c=Vs(),u=e(c),h=!1,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=y,o=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,o=bl(o);var t=function(t,e){var n=xl(e),i=e[1],r=rl(i),a=[rl(n),-il(n),0],o=0,s=0,l=new fl;1===r?i=Js+$s:-1===r&&(i=-Js-$s);for(var c=0,u=t.length;c<u;++c)if(f=(h=t[c]).length)for(var h,f,p=h[f-1],d=xl(p),g=p[1]/2+Xs,_=rl(g),m=il(g),v=0;v<f;++v,d=x,_=w,m=S,p=y){var y=h[v],x=xl(y),b=y[1]/2+Xs,w=rl(b),S=il(b),M=x-d,E=M>=0?1:-1,C=E*M,A=C>Ys,k=_*w;if(l.add(nl(k*E*rl(C),m*S+k*il(C))),o+=A?M+E*Ks:M,A^d>=n^x>=n){var T=_l(dl(p),dl(y));yl(T);var P=_l(a,T);yl(P);var N=(A^M>=0?-1:1)*sl(P[2]);(i>N||i===N&&(T[0]||T[1]))&&(s+=A^M>=0?1:-1)}}return(o<-1e-6||o<$s&&l<-1e-12)^1&s}(a,i);o.length?(h||(r.polygonStart(),h=!0),ul(o,Ml,t,n,r)):t&&(h||(r.polygonStart(),h=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),h&&(r.polygonEnd(),h=!1),o=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function p(e,n){t(e,n)&&r.point(e,n)}function d(t,e){l.point(t,e)}function g(){f.point=d,l.lineStart()}function _(){f.point=p,l.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function y(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,i,l=u.clean(),f=c.result(),p=f.length;if(s.pop(),a.push(s),s=null,p)if(1&l){if((e=(n=f[0]).length-1)>0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else p>1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(Sl))}return f}}function Sl(t){return t.length>1}function Ml(t,e){return((t=t.x)[0]<0?t[1]-Js-$s:Js-t[1])-((e=e.x)[0]<0?e[1]-Js-$s:Js-e[1])}const El=wl((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Ys:-Ys,l=tl(a-n);tl(l-Ys)<$s?(t.point(n,i=(i+o)/2>0?Js:-Js),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(a,i),e=0):r!==s&&l>=Ys&&(tl(n-r)<$s&&(n-=r*$s),tl(a-s)<$s&&(a-=s*$s),i=function(t,e,n,i){var r,a,o=rl(t-n);return tl(o)>$s?el((rl(e)*(a=il(i))*rl(n)-rl(i)*(r=il(e))*rl(t))/(r*a*o)):(e+i)/2}(n,i,a,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=a,i=o),r=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*Js,i.point(-Ys,r),i.point(0,r),i.point(Ys,r),i.point(Ys,0),i.point(Ys,-r),i.point(0,-r),i.point(-Ys,-r),i.point(-Ys,0),i.point(-Ys,r);else if(tl(t[0]-e[0])>$s){var a=t[0]<e[0]?Ys:-Ys;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}),[-Ys,-Js]);function Cl(t,e,n,i,r,a){if(n){var o=il(e),s=rl(e),l=i*n;null==r?(r=e+i*Ks,a=e-l/2):(r=Al(o,r),a=Al(o,a),(i>0?r<a:r>a)&&(r+=i*Ks));for(var c,u=r;i>0?u>a:u<a;u-=l)c=pl([o,-s*il(u),-s*rl(u)]),t.point(c[0],c[1])}}function Al(t,e){(e=dl(e))[0]-=t,yl(e);var n=function(t){return t>1?0:t<-1?Ys:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+Ks-$s)%Ks}var kl=1e9,Tl=-1e9;function Pl(t,e,n,i){function r(r,a){return t<=r&&r<=n&&e<=a&&a<=i}function a(r,a,s,c){var u=0,h=0;if(null==r||(u=o(r,s))!==(h=o(a,s))||l(r,a)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?i:e)}while((u=(u+s+4)%4)!==h);else c.point(a[0],a[1])}function o(i,r){return tl(i[0]-t)<$s?r>0?0:3:tl(i[0]-n)<$s?r>0?2:1:tl(i[1]-e)<$s?r>0?1:0:r>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),i=o(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,f,p,d,g,_,m,v,y=o,x=Vs(),b={point:w,lineStart:function(){b.point=S,c&&c.push(u=[]);m=!0,_=!1,d=g=NaN},lineEnd:function(){l&&(S(h,f),p&&_&&x.rejoin(),l.push(x.result()));b.point=w,_&&y.lineEnd()},polygonStart:function(){y=x,l=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=c.length;n<r;++n)for(var a,o,s=c[n],l=1,u=s.length,h=s[0],f=h[0],p=h[1];l<u;++l)a=f,o=p,f=(h=s[l])[0],p=h[1],o<=i?p>i&&(f-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(f-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=v&&e,r=(l=bl(l)).length;(n||r)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),r&&ul(l,s,e,a,o),o.polygonEnd());y=o,l=c=u=null}};function w(t,e){r(t,e)&&y.point(t,e)}function S(a,o){var s=r(a,o);if(c&&u.push([a,o]),m)h=a,f=o,p=s,m=!1,s&&(y.lineStart(),y.point(a,o));else if(s&&_)y.point(a,o);else{var l=[d=Math.max(Tl,Math.min(kl,d)),g=Math.max(Tl,Math.min(kl,g))],x=[a=Math.max(Tl,Math.min(kl,a)),o=Math.max(Tl,Math.min(kl,o))];!function(t,e,n,i,r,a){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,f=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=i-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<u&&(u=o)}else if(f>0){if(o>u)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*f),u<1&&(e[0]=s+u*h,e[1]=l+u*f),!0}}}}}(l,x,t,e,n,i)?s&&(y.lineStart(),y.point(a,o),v=!1):(_||(y.lineStart(),y.point(l[0],l[1])),y.point(x[0],x[1]),s||y.lineEnd(),v=!1)}d=a,g=o,_=s}return b}}function Nl(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}const Ll=t=>t;function Fl(t,e){return[tl(t)>Ys?t+Math.round(-t/Ks)*Ks:t,e]}function Ol(t,e,n){return(t%=Ks)?e||n?Nl(Dl(t),zl(e,n)):Dl(t):e||n?zl(e,n):Fl}function Gl(t){return function(e,n){return[(e+=t)>Ys?e-Ks:e<-Ys?e+Ks:e,n]}}function Dl(t){var e=Gl(t);return e.invert=Gl(-t),e}function zl(t,e){var n=il(t),i=rl(t),r=il(e),a=rl(e);function o(t,e){var o=il(e),s=il(t)*o,l=rl(t)*o,c=rl(e),u=c*n+s*i;return[nl(l*r-u*a,s*n-c*i),sl(u*r+l*a)]}return o.invert=function(t,e){var o=il(e),s=il(t)*o,l=rl(t)*o,c=rl(e),u=c*r-l*a;return[nl(l*r+c*a,s*n+u*i),sl(u*n-s*i)]},o}function Il(t){return function(e){var n=new Rl;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Rl(){}function jl(t,e){t&&ql.hasOwnProperty(t.type)&&ql[t.type](t,e)}Fl.invert=Fl,Rl.prototype={constructor:Rl,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 Bl={Feature:function(t,e){jl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)jl(n[i].geometry,e)}},ql={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ul(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Ul(n[i],e,0)},Polygon:function(t,e){Wl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Wl(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)jl(n[i],e)}};function Ul(t,e,n){var i,r=-1,a=t.length-n;for(e.lineStart();++r<a;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function Wl(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)Ul(t[n],e,1);e.polygonEnd()}var Hl=1/0,Vl=Hl,$l=-Hl,Yl=$l,Jl={point:function(t,e){t<Hl&&(Hl=t);t>$l&&($l=t);e<Vl&&(Vl=e);e>Yl&&(Yl=e)},lineStart:Hs,lineEnd:Hs,polygonStart:Hs,polygonEnd:Hs,result:function(){var t=[[Hl,Vl],[$l,Yl]];return $l=Yl=-(Vl=Hl=1/0),t}};const Xl=Jl;function Kl(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),function(t,e){t&&Bl.hasOwnProperty(t.type)?Bl[t.type](t,e):jl(t,e)}(n,t.stream(Xl)),e(Xl.result()),null!=i&&t.clipExtent(i),t}function Zl(t,e,n){return Kl(t,(function(n){var i=e[1][0]-e[0][0],r=e[1][1]-e[0][1],a=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),o=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}var Ql=il(30*Qs);function tc(t,e){return+e?function(t,e){function n(i,r,a,o,s,l,c,u,h,f,p,d,g,_){var m=c-i,v=u-r,y=m*m+v*v;if(y>4*e&&g--){var x=o+f,b=s+p,w=l+d,S=ol(x*x+b*b+w*w),M=sl(w/=S),E=tl(tl(w)-1)<$s||tl(a-h)<$s?(a+h)/2:nl(b,x),C=t(E,M),A=C[0],k=C[1],T=A-i,P=k-r,N=v*T-m*P;(N*N/y>e||tl((m*T+v*P)/y-.5)>.3||o*f+s*p+l*d<Ql)&&(n(i,r,a,o,s,l,A,k,E,x/=S,b/=S,w,g,_),_.point(A,k),n(A,k,E,x,b,w,c,u,h,f,p,d,g,_))}}return function(e){var i,r,a,o,s,l,c,u,h,f,p,d,g={point:_,lineStart:m,lineEnd:y,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function _(n,i){n=t(n,i),e.point(n[0],n[1])}function m(){u=NaN,g.point=v,e.lineStart()}function v(i,r){var a=dl([i,r]),o=t(i,r);n(u,h,c,f,p,d,u=o[0],h=o[1],c=i,f=a[0],p=a[1],d=a[2],16,e),e.point(u,h)}function y(){g.point=_,e.lineEnd()}function x(){m(),g.point=b,g.lineEnd=w}function b(t,e){v(i=t,e),r=u,a=h,o=f,s=p,l=d,g.point=v}function w(){n(u,h,c,f,p,d,r,a,i,o,s,l,16,e),g.lineEnd=y,y()}return g}}(t,e):function(t){return Il({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var ec=Il({point:function(t,e){this.stream.point(t*Qs,e*Qs)}});function nc(t,e,n,i,r,a){if(!a)return function(t,e,n,i,r){function a(a,o){return[e+t*(a*=i),n-t*(o*=r)]}return a.invert=function(a,o){return[(a-e)/t*i,(n-o)/t*r]},a}(t,e,n,i,r);var o=il(a),s=rl(a),l=o*t,c=s*t,u=o/t,h=s/t,f=(s*n-o*e)/t,p=(s*e+o*n)/t;function d(t,a){return[l*(t*=i)-c*(a*=r)+e,n-c*t-l*a]}return d.invert=function(t,e){return[i*(u*t-h*e+f),r*(p-h*t-u*e)]},d}function ic(t){return function(t){var e,n,i,r,a,o,s,l,c,u,h=150,f=480,p=250,d=0,g=0,_=0,m=0,v=0,y=0,x=1,b=1,w=null,S=El,M=null,E=Ll,C=.5;function A(t){return l(t[0]*Qs,t[1]*Qs)}function k(t){return(t=l.invert(t[0],t[1]))&&[t[0]*Zs,t[1]*Zs]}function T(){var t=nc(h,0,0,x,b,y).apply(null,e(d,g)),i=nc(h,f-t[0],p-t[1],x,b,y);return n=Ol(_,m,v),s=Nl(e,i),l=Nl(n,s),o=tc(s,C),P()}function P(){return c=u=null,A}return A.stream=function(t){return c&&u===t?c:c=ec(function(t){return Il({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(S(o(E(u=t)))))},A.preclip=function(t){return arguments.length?(S=t,w=void 0,P()):S},A.postclip=function(t){return arguments.length?(E=t,M=i=r=a=null,P()):E},A.clipAngle=function(t){return arguments.length?(S=+t?function(t){var e=il(t),n=6*Qs,i=e>0,r=tl(e)>$s;function a(t,n){return il(t)*il(n)>e}function o(t,n,i){var r=[1,0,0],a=_l(dl(t),dl(n)),o=gl(a,a),s=a[0],l=o-s*s;if(!l)return!i&&t;var c=e*o/l,u=-e*s/l,h=_l(r,a),f=vl(r,c);ml(f,vl(a,u));var p=h,d=gl(f,p),g=gl(p,p),_=d*d-g*(gl(f,f)-1);if(!(_<0)){var m=ol(_),v=vl(p,(-d-m)/g);if(ml(v,f),v=pl(v),!i)return v;var y,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(y=x,x=b,b=y);var M=b-x,E=tl(M-Ys)<$s;if(!E&&S<w&&(y=w,w=S,S=y),E||M<$s?E?w+S>0^v[1]<(tl(v[0]-x)<$s?w:S):w<=v[1]&&v[1]<=S:M>Ys^(x<=v[0]&&v[0]<=b)){var C=vl(p,(-d+m)/g);return ml(C,f),[v,pl(C)]}}}function s(e,n){var r=i?t:Ys-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return wl(a,(function(t){var e,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=a(h,f),_=i?g?0:s(h,f):g?s(h+(h<0?Ys:-Ys),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=o(e,d))||ll(e,p)||ll(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=o(d,e),t.point(p[0],p[1])):(p=o(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(r&&e&&i^g){var m;_&n||!(m=o(d,e,!0))||(u=0,i?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&ll(e,d)||t.point(d[0],d[1]),e=d,l=g,n=_},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),(function(e,i,r,a){Cl(a,t,n,r,e,i)}),i?[0,-t]:[-Ys,t-Ys])}(w=t*Qs):(w=null,El),P()):w*Zs},A.clipExtent=function(t){return arguments.length?(E=null==t?(M=i=r=a=null,Ll):Pl(M=+t[0][0],i=+t[0][1],r=+t[1][0],a=+t[1][1]),P()):null==M?null:[[M,i],[r,a]]},A.scale=function(t){return arguments.length?(h=+t,T()):h},A.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],T()):[f,p]},A.center=function(t){return arguments.length?(d=t[0]%360*Qs,g=t[1]%360*Qs,T()):[d*Zs,g*Zs]},A.rotate=function(t){return arguments.length?(_=t[0]%360*Qs,m=t[1]%360*Qs,v=t.length>2?t[2]%360*Qs:0,T()):[_*Zs,m*Zs,v*Zs]},A.angle=function(t){return arguments.length?(y=t%360*Qs,T()):y*Zs},A.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},A.reflectY=function(t){return arguments.length?(b=t?-1:1,T()):b<0},A.precision=function(t){return arguments.length?(o=tc(s,C=t*t),P()):ol(C)},A.fitExtent=function(t,e){return Zl(A,t,e)},A.fitSize=function(t,e){return function(t,e,n){return Zl(t,[[0,0],e],n)}(A,t,e)},A.fitWidth=function(t,e){return function(t,e,n){return Kl(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),a=(i-r*(n[1][0]+n[0][0]))/2,o=-r*n[0][1];t.scale(150*r).translate([a,o])}),n)}(A,t,e)},A.fitHeight=function(t,e){return function(t,e,n){return Kl(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),a=-r*n[0][0],o=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,o])}),n)}(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&k,T()}}((function(){return t}))()}var rc=Math.abs,ac=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),oc=(Math.log,Math.max),sc=Math.min,lc=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),cc=lc/2,uc=(Math.SQRT1_2,fc(2),fc(lc),180/lc),hc=lc/180;function fc(t){return t>0?Math.sqrt(t):0}var pc=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function dc(t,e){var n,i=sc(18,36*rc(e)/lc),r=ac(i),a=i-r,o=(n=pc[r])[0],s=n[1],l=(n=pc[++r])[0],c=n[1],u=(n=pc[sc(19,++r)])[0],h=n[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?cc:-cc)*(c+a*(h-s)/2+a*a*(h-2*c+s)/2)]}pc.forEach((function(t){t[1]*=1.0144})),dc.invert=function(t,e){var n=e/cc,i=90*n,r=sc(18,rc(i/5)),a=oc(0,ac(r));do{var o=pc[a][1],s=pc[a+1][1],l=pc[sc(19,a+2)][1],c=l-o,u=l-2*s+o,h=2*(rc(n)-s)/c,f=u/c,p=h*(1-f*h*(1-2*f*h));if(p>=0||1===a){i=(e>=0?5:-5)*(p+r);var d,g=50;do{p=(r=sc(18,rc(i)/5))-(a=ac(r)),o=pc[a][1],s=pc[a+1][1],l=pc[sc(19,a+2)][1],i-=(d=(e>=0?cc:-cc)*(s+p*(l-o)/2+p*p*(l-2*s+o)/2)-e)*uc}while(rc(d)>1e-12&&--g>0);break}}while(--a>=0);var _=pc[a][0],m=pc[a+1][0],v=pc[sc(19,a+2)][0];return[t/(m+p*(v-_)/2+p*p*(v-2*m+_)/2),i*hc]};var gc="http://www.w3.org/1999/xhtml";const _c={svg:"http://www.w3.org/2000/svg",xhtml:gc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),_c.hasOwnProperty(e)?{space:_c[e],local:t}:t}function vc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===gc&&e.documentElement.namespaceURI===gc?e.createElement(t):e.createElementNS(n,t)}}function yc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xc(t){var e=mc(t);return(e.local?yc:vc)(e)}function bc(){}function wc(t){return null==t?bc:function(){return this.querySelector(t)}}function Sc(){return[]}function Mc(t){return new Array(t.length)}function Ec(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ec.prototype={constructor:Ec,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Cc(t,e,n,i,r,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new Ec(t,a[s]);for(;s<l;++s)(o=e[s])&&(r[s]=o)}function Ac(t,e,n,i,r,a,o){var s,l,c,u={},h=e.length,f=a.length,p=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(p[s]=c="$"+o.call(l,l.__data__,s,e),c in u?r[s]=l:u[c]=l);for(s=0;s<f;++s)(l=u[c="$"+o.call(t,a[s],s,a)])?(i[s]=l,l.__data__=a[s],u[c]=null):n[s]=new Ec(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&u[p[s]]===l&&(r[s]=l)}function kc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Tc(t){return function(){this.removeAttribute(t)}}function Pc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Nc(t,e){return function(){this.setAttribute(t,e)}}function Lc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Oc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Gc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Dc(t){return function(){this.style.removeProperty(t)}}function zc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ic(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Rc(t){return function(){delete this[t]}}function jc(t,e){return function(){this[t]=e}}function Bc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function qc(t){return t.trim().split(/^|\s+/)}function Uc(t){return t.classList||new Wc(t)}function Wc(t){this._node=t,this._names=qc(t.getAttribute("class")||"")}function Hc(t,e){for(var n=Uc(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Vc(t,e){for(var n=Uc(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function $c(t){return function(){Hc(this,t)}}function Yc(t){return function(){Vc(this,t)}}function Jc(t,e){return function(){(e.apply(this,arguments)?Hc:Vc)(this,t)}}function Xc(){this.textContent=""}function Kc(t){return function(){this.textContent=t}}function Zc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qc(){this.innerHTML=""}function tu(t){return function(){this.innerHTML=t}}function eu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function nu(){this.nextSibling&&this.parentNode.appendChild(this)}function iu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ru(){return null}function au(){var t=this.parentNode;t&&t.removeChild(this)}function ou(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function su(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}Wc.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var lu={},cu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(lu={mouseenter:"mouseover",mouseleave:"mouseout"}));function uu(t,e,n){return t=hu(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function hu(t,e,n){return function(i){var r=cu;cu=i;try{t.call(this,this.__data__,e,n)}finally{cu=r}}}function fu(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.capture);++r?e.length=r:delete this.__on}}}function pu(t,e,n){var i=lu.hasOwnProperty(t.type)?uu:hu;return function(r,a,o){var s,l=this.__on,c=i(e,a,o);if(l)for(var u=0,h=l.length;u<h;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(s):this.__on=[s]}}function du(t,e,n,i){var r=cu;t.sourceEvent=cu,cu=t;try{return e.apply(n,i)}finally{cu=r}}function gu(t,e,n){var i=Gc(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function _u(t,e){return function(){return gu(this,t,e)}}function mu(t,e){return function(){return gu(this,t,e.apply(this,arguments))}}var vu=[null];function yu(t,e){this._groups=t,this._parents=e}function xu(){return new yu([[document.documentElement]],vu)}yu.prototype=xu.prototype={constructor:yu,select:function(t){"function"!=typeof t&&(t=wc(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o,s=e[r],l=s.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new yu(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?Sc:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(i.push(t.call(o,o.__data__,c,s)),r.push(o));return new yu(i,r)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new yu(i,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n=e?Ac:Cc,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],f=h.length,p=t.call(u,u&&u.__data__,c,i),d=p.length,g=s[c]=new Array(d),_=o[c]=new Array(d);n(u,h,g,_,l[c]=new Array(f),p,e);for(var m,v,y=0,x=0;y<d;++y)if(m=g[y]){for(y>=x&&(x=y+1);!(v=_[x])&&++x<d;);m._next=v||null}}return(o=new yu(o,i))._enter=s,o._exit=l,o},enter:function(){return new yu(this._enter||this._groups.map(Mc),this._parents)},exit:function(){return new yu(this._exit||this._groups.map(Mc),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(r=e(r)),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var l,c=e[s],u=n[s],h=c.length,f=o[s]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(f[p]=l);for(;s<i;++s)o[s]=e[s];return new yu(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=kc);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var o,s=n[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new yu(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=mc(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?Pc:Tc:"function"==typeof e?n.local?Oc:Fc:n.local?Lc:Nc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Dc:"function"==typeof e?Ic:zc)(t,e,null==n?"":n)):function(t,e){return t.style.getPropertyValue(e)||Gc(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Rc:"function"==typeof e?Bc:jc)(t,e)):this.node()[t]},classed:function(t,e){var n=qc(t+"");if(arguments.length<2){for(var i=Uc(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Jc:e?$c:Yc)(n,e))},text:function(t){return arguments.length?this.each(null==t?Xc:("function"==typeof t?Zc:Kc)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qc:("function"==typeof t?eu:tu)(t)):this.node().innerHTML},raise:function(){return this.each(nu)},lower:function(){return this.each(iu)},append:function(t){var e="function"==typeof t?t:xc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:xc(t),i=null==e?ru:"function"==typeof e?e:wc(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(au)},clone:function(t){return this.select(t?su:ou)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?pu:fu,null==n&&(n=!1),i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<o;++i)if((r=a[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?mu:_u)(t,e))}};function bu(t){return"string"==typeof t?new yu([[document.querySelector(t)]],[document.documentElement]):new yu([[t]],vu)}var wu=0;function Su(){this._="@"+(++wu).toString(36)}function Mu(){for(var t,e=cu;t=e.sourceEvent;)e=t;return e}function Eu(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}function Cu(t){var e=Mu();return e.changedTouches&&(e=e.changedTouches[0]),Eu(t,e)}function Au(t,e,n){arguments.length<3&&(n=e,e=Mu().changedTouches);for(var i,r=0,a=e?e.length:0;r<a;++r)if((i=e[r]).identifier===n)return Eu(t,i);return null}Su.prototype=function(){return new Su}.prototype={constructor:Su,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 ku={value:function(){}};function Tu(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new Pu(i)}function Pu(t){this._=t}function Nu(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Lu(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=ku,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Pu.prototype=Tu.prototype={constructor:Pu,on:function(t,e){var n,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)r[n]=Lu(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Lu(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=Nu(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Pu(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};const Fu=Tu;function Ou(){cu.stopImmediatePropagation()}function Gu(){cu.preventDefault(),cu.stopImmediatePropagation()}function Du(t){return function(){return t}}function zu(t,e,n,i,r,a,o,s,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=i,this.active=r,this.x=a,this.y=o,this.dx=s,this.dy=l,this._=c}function Iu(){return!cu.button}function Ru(){return this.parentNode}function ju(t){return null==t?{x:cu.x,y:cu.y}:t}function Bu(){return"ontouchstart"in this}function qu(){var t,e,n,i,r=Iu,a=Ru,o=ju,s=Bu,l={},c=Fu("start","drag","end"),u=0,h=0;function f(t){t.on("mousedown.drag",p).filter(s).on("touchstart.drag",_).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!i&&r.apply(this,arguments)){var o=y("mouse",a.apply(this,arguments),Cu,this,arguments);o&&(bu(cu.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),function(t){var e=t.document.documentElement,n=bu(t).on("dragstart.drag",Gu,!0);"onselectstart"in e?n.on("selectstart.drag",Gu,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(cu.view),Ou(),n=!1,t=cu.clientX,e=cu.clientY,o("start"))}}function d(){if(Gu(),!n){var i=cu.clientX-t,r=cu.clientY-e;n=i*i+r*r>h}l.mouse("drag")}function g(){bu(cu.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,i=bu(t).on("dragstart.drag",null);e&&(i.on("click.drag",Gu,!0),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(cu.view,n),Gu(),l.mouse("end")}function _(){if(r.apply(this,arguments)){var t,e,n=cu.changedTouches,i=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=y(n[t].identifier,i,Au,this,arguments))&&(Ou(),e("start"))}}function m(){var t,e,n=cu.changedTouches,i=n.length;for(t=0;t<i;++t)(e=l[n[t].identifier])&&(Gu(),e("drag"))}function v(){var t,e,n=cu.changedTouches,r=n.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<r;++t)(e=l[n[t].identifier])&&(Ou(),e("end"))}function y(t,e,n,i,r){var a,s,h,p=n(e,t),d=c.copy();if(du(new zu(f,"beforestart",a,t,u,p[0],p[1],0,0,d),(function(){return null!=(cu.subject=a=o.apply(i,r))&&(s=a.x-p[0]||0,h=a.y-p[1]||0,!0)})))return function o(c){var g,_=p;switch(c){case"start":l[t]=o,g=u++;break;case"end":delete l[t],--u;case"drag":p=n(e,t),g=u}du(new zu(f,c,a,t,g,p[0]+s,p[1]+h,p[0]-_[0],p[1]-_[1],d),d.apply,d,[c,i,r])}}return f.filter=function(t){return arguments.length?(r="function"==typeof t?t:Du(!!t),f):r},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Du(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Du(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Du(!!t),f):s},f.on=function(){var t=c.on.apply(c,arguments);return t===c?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}zu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Uu=Math.PI,Wu=2*Uu,Hu=1e-6,Vu=Wu-Hu;function $u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Yu(){return new $u}$u.prototype=Yu.prototype={constructor:$u,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var a=this._x1,o=this._y1,s=n-t,l=i-e,c=a-t,u=o-e,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>Hu)if(Math.abs(u*s-l*c)>Hu&&r){var f=n-a,p=i-o,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),m=Math.sqrt(h),v=r*Math.tan((Uu-Math.acos((d+h-g)/(2*_*m)))/2),y=v/m,x=v/_;Math.abs(y-1)>Hu&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+r+","+r+",0,0,"+ +(u*f>c*p)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(i),s=n*Math.sin(i),l=t+o,c=e+s,u=1^a,h=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Hu||Math.abs(this._y1-c)>Hu)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%Wu+Wu),h>Vu?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Hu&&(this._+="A"+n+","+n+",0,"+ +(h>=Uu)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};const Ju=Yu;function Xu(t){return function(){return t}}var Ku=1e-12,Zu=Math.PI,Qu=Zu/2,th=2*Zu;function eh(t){return t.innerRadius}function nh(t){return t.outerRadius}function ih(t){return t.startAngle}function rh(t){return t.endAngle}function ah(t){return t&&t.padAngle}function oh(t){return t>=1?Qu:t<=-1?-Qu:Math.asin(t)}function sh(t,e,n,i,r,a,o){var s=t-n,l=e-i,c=(o?a:-a)/Math.sqrt(s*s+l*l),u=c*l,h=-c*s,f=t+u,p=e+h,d=n+u,g=i+h,_=(f+d)/2,m=(p+g)/2,v=d-f,y=g-p,x=v*v+y*y,b=r-a,w=f*g-d*p,S=(y<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),M=(w*y-v*S)/x,E=(-w*v-y*S)/x,C=(w*y+v*S)/x,A=(-w*v+y*S)/x,k=M-_,T=E-m,P=C-_,N=A-m;return k*k+T*T>P*P+N*N&&(M=C,E=A),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function lh(t){this._context=t}function ch(t){return new lh(t)}function uh(t){return t[0]}function hh(t){return t[1]}lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,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:this._context.lineTo(t,e)}}};!function(t){function e(e){return new fh(t(e))}e._curve=t}(ch);function fh(t){this._curve=t}fh.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))}};Math.sqrt(1/3);var ph=Math.sin(Zu/10)/Math.sin(7*Zu/10);Math.sin(th/10),Math.cos(th/10);Math.sqrt(3);Math.sqrt(3),Math.sqrt(12);function dh(){}function gh(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 _h(t){this._context=t}function mh(t){this._context=t}function vh(t){this._context=t}function yh(t,e){this._basis=new _h(t),this._beta=e}_h.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:gh(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:gh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},mh.prototype={areaStart:dh,areaEnd:dh,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:gh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},vh.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,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:gh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yh.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 i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new _h(t):new yh(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function xh(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 bh(t,e){this._context=t,this._k=(1-e)/6}bh.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:xh(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:xh(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}};(function t(e){function n(t){return new bh(t,e)}return n.tension=function(e){return t(+e)},n})(0);function wh(t,e){this._context=t,this._k=(1-e)/6}wh.prototype={areaStart:dh,areaEnd:dh,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:xh(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}};(function t(e){function n(t){return new wh(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Sh(t,e){this._context=t,this._k=(1-e)/6}Sh.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:xh(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}};(function t(e){function n(t){return new Sh(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Mh(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Ku){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ku){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function Eh(t,e){this._context=t,this._alpha=e}Eh.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Mh(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}};const Ch=function t(e){function n(t){return e?new Eh(t,e):new bh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ah(t,e){this._context=t,this._alpha=e}Ah.prototype={areaStart:dh,areaEnd:dh,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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Mh(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}};(function t(e){function n(t){return e?new Ah(t,e):new wh(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function kh(t,e){this._context=t,this._alpha=e}kh.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Mh(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}};(function t(e){function n(t){return e?new kh(t,e):new Sh(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Th(t){this._context=t}function Ph(t){return t<0?-1:1}function Nh(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return(Ph(a)+Ph(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Lh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Fh(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function Oh(t){this._context=t}function Gh(t){this._context=new Dh(t)}function Dh(t){this._context=t}function zh(t){this._context=t}function Ih(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}function Rh(t,e){this._context=t,this._t=e}Th.prototype={areaStart:dh,areaEnd:dh,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))}},Oh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Fh(this,this._t0,Lh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){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,Fh(this,Lh(this,n=Nh(this,t,e)),n);break;default:Fh(this,this._t0,n=Nh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Gh.prototype=Object.create(Oh.prototype)).point=function(t,e){Oh.prototype.point.call(this,e,t)},Dh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}},zh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Ih(t),r=Ih(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=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}};Array.prototype.slice;var jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},qh=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Uh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wh=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0},Hh=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Vh=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},$h=function(){function t(e){var n=e.x,i=void 0===n?0:n,r=e.y,a=void 0===r?0:r,o=e.nx,s=e.ny,l=e.dy,c=void 0===l?0:l,u=e.dx,h=void 0===u?0:u,f=e.color,p=void 0===f?"grey":f,d=e.data,g=e.type,_=e.subject,m=e.connector,v=e.note,y=e.disable,x=e.id,b=e.className;Bh(this,t),this._dx=void 0!==o?o-i:h,this._dy=void 0!==s?s-a:c,this._x=i,this._y=a,this._color=p,this.id=x,this._className=b||"",this._type=g||"",this.data=d,this.note=v||{},this.connector=m||{},this.subject=_||{},this.disable=y||[]}return qh(t,[{key:"updatePosition",value:function(){this.type.setPosition&&(this.type.setPosition(),this.type.subject&&0!==this.type.subject.selectAll(":not(.handle)").nodes().length&&this.type.redrawSubject())}},{key:"clearComponents",value:function(){this.type.clearComponents&&this.type.clearComponents()}},{key:"updateOffset",value:function(){this.type.setOffset&&(this.type.setOffset(),0!==this.type.connector.selectAll(":not(.handle)").nodes().length&&this.type.redrawConnector(),this.type.redrawNote())}},{key:"className",get:function(){return this._className},set:function(t){this._className=t,this.type.setClassName&&this.type.setClassName()}},{key:"type",get:function(){return this._type},set:function(t){this._type=t,this.clearComponents()}},{key:"x",get:function(){return this._x},set:function(t){this._x=t,this.updatePosition()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this.updatePosition()}},{key:"color",get:function(){return this._color},set:function(t){this._color=t,this.updatePosition()}},{key:"dx",get:function(){return this._dx},set:function(t){this._dx=t,this.updateOffset()}},{key:"dy",get:function(){return this._dy},set:function(t){this._dy=t,this.updateOffset()}},{key:"nx",set:function(t){this._dx=t-this._x,this.updateOffset()}},{key:"ny",set:function(t){this._dy=t-this._y,this.updateOffset()}},{key:"offset",get:function(){return{x:this._dx,y:this._dy}},set:function(t){var e=t.x,n=t.y;this._dx=e,this._dy=n,this.updateOffset()}},{key:"position",get:function(){return{x:this._x,y:this._y}},set:function(t){var e=t.x,n=t.y;this._x=e,this._y=n,this.updatePosition()}},{key:"translation",get:function(){return{x:this._x+this._dx,y:this._y+this._dy}}},{key:"json",get:function(){var t={x:this._x,y:this._y,dx:this._dx,dy:this._dy};return this.data&&Object.keys(this.data).length>0&&(t.data=this.data),this.type&&(t.type=this.type),this._className&&(t.className=this._className),Object.keys(this.connector).length>0&&(t.connector=this.connector),Object.keys(this.subject).length>0&&(t.subject=this.subject),Object.keys(this.note).length>0&&(t.note=this.note),t}}]),t}(),Yh=function(){function t(e){var n=e.annotations,i=e.accessors,r=e.accessorsInverse;Bh(this,t),this.accessors=i,this.accessorsInverse=r,this.annotations=n}return qh(t,[{key:"clearTypes",value:function(t){this.annotations.forEach((function(e){e.type=void 0,e.subject=t&&t.subject||e.subject,e.connector=t&&t.connector||e.connector,e.note=t&&t.note||e.note}))}},{key:"setPositionWithAccessors",value:function(){var t=this;this.annotations.forEach((function(e){e.type.setPositionWithAccessors(t.accessors)}))}},{key:"editMode",value:function(t){this.annotations.forEach((function(e){e.type&&(e.type.editMode=t,e.type.updateEditMode())}))}},{key:"updateDisable",value:function(t){this.annotations.forEach((function(e){e.disable=t,e.type&&t.forEach((function(t){e.type[t]&&(e.type[t].remove&&e.type[t].remove(),e.type[t]=void 0)}))}))}},{key:"updateTextWrap",value:function(t){this.annotations.forEach((function(e){e.type&&e.type.updateTextWrap&&e.type.updateTextWrap(t)}))}},{key:"updateText",value:function(){this.annotations.forEach((function(t){t.type&&t.type.drawText&&t.type.drawText()}))}},{key:"updateNotePadding",value:function(t){this.annotations.forEach((function(e){e.type&&(e.type.notePadding=t)}))}},{key:"json",get:function(){var t=this;return this.annotations.map((function(e){var n=e.json;return t.accessorsInverse&&e.data&&(n.data={},Object.keys(t.accessorsInverse).forEach((function(i){n.data[i]=t.accessorsInverse[i]({x:e.x,y:e.y})}))),n}))}},{key:"noteNodes",get:function(){return this.annotations.map((function(t){return Uh({},t.type.getNoteBBoxOffset(),{positionX:t.x,positionY:t.y})}))}}]),t}(),Jh=function(t,e){return"dynamic"!==t&&"left"!==t&&"right"!==t||(t=e<0?"top":"bottom"),t},Xh=function(t,e){return"dynamic"!==t&&"top"!==t&&"bottom"!==t||(t=e<0?"right":"left"),t},Kh=["topBottom","top","bottom"],Zh=["leftRight","left","right"],Qh=function(t){var e=t.data,n=t.curve,i=void 0===n?ch:n,r=t.canvasContext,a=t.className,o=t.classID,s=function(){var t=uh,e=hh,n=Xu(!0),i=null,r=ch,a=null;function o(o){var s,l,c,u=o.length,h=!1;for(null==i&&(a=r(c=Ju())),s=0;s<=u;++s)!(s<u&&n(l=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(l,s,o),+e(l,s,o));if(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Xu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Xu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Xu(!!t),o):n},o.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),o):r},o.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),o):i},o}().curve(i),l={type:"path",className:a,classID:o,data:e};return r?(s.context(r),l.pathMethods=s):l.attrs={d:s(e)},l},tf=function(t){var e=t.data,n=t.canvasContext,i={type:"path",className:t.className,classID:t.classID,data:e},r=function(){var t=eh,e=nh,n=Xu(0),i=null,r=ih,a=rh,o=ah,s=null;function l(){var l,c,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=r.apply(this,arguments)-Qu,p=a.apply(this,arguments)-Qu,d=Math.abs(p-f),g=p>f;if(s||(s=l=Ju()),h<u&&(c=h,h=u,u=c),h>Ku)if(d>th-Ku)s.moveTo(h*Math.cos(f),h*Math.sin(f)),s.arc(0,0,h,f,p,!g),u>Ku&&(s.moveTo(u*Math.cos(p),u*Math.sin(p)),s.arc(0,0,u,p,f,g));else{var _,m,v=f,y=p,x=f,b=p,w=d,S=d,M=o.apply(this,arguments)/2,E=M>Ku&&(i?+i.apply(this,arguments):Math.sqrt(u*u+h*h)),C=Math.min(Math.abs(h-u)/2,+n.apply(this,arguments)),A=C,k=C;if(E>Ku){var T=oh(E/u*Math.sin(M)),P=oh(E/h*Math.sin(M));(w-=2*T)>Ku?(x+=T*=g?1:-1,b-=T):(w=0,x=b=(f+p)/2),(S-=2*P)>Ku?(v+=P*=g?1:-1,y-=P):(S=0,v=y=(f+p)/2)}var N=h*Math.cos(v),L=h*Math.sin(v),F=u*Math.cos(b),O=u*Math.sin(b);if(C>Ku){var G=h*Math.cos(y),D=h*Math.sin(y),z=u*Math.cos(x),I=u*Math.sin(x);if(d<Zu){var R=w>Ku?function(t,e,n,i,r,a,o,s){var l=n-t,c=i-e,u=o-r,h=s-a,f=(u*(e-a)-h*(t-r))/(h*l-u*c);return[t+f*l,e+f*c]}(N,L,z,I,G,D,F,O):[F,O],j=N-R[0],B=L-R[1],q=G-R[0],U=D-R[1],W=1/Math.sin(Math.acos((j*q+B*U)/(Math.sqrt(j*j+B*B)*Math.sqrt(q*q+U*U)))/2),H=Math.sqrt(R[0]*R[0]+R[1]*R[1]);A=Math.min(C,(u-H)/(W-1)),k=Math.min(C,(h-H)/(W+1))}}S>Ku?k>Ku?(_=sh(z,I,N,L,h,k,g),m=sh(G,D,F,O,h,k,g),s.moveTo(_.cx+_.x01,_.cy+_.y01),k<C?s.arc(_.cx,_.cy,k,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(s.arc(_.cx,_.cy,k,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),s.arc(0,0,h,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,k,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):(s.moveTo(N,L),s.arc(0,0,h,v,y,!g)):s.moveTo(N,L),u>Ku&&w>Ku?A>Ku?(_=sh(F,O,G,D,u,-A,g),m=sh(N,L,z,I,u,-A,g),s.lineTo(_.cx+_.x01,_.cy+_.y01),A<C?s.arc(_.cx,_.cy,A,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(s.arc(_.cx,_.cy,A,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),s.arc(0,0,u,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,A,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):s.arc(0,0,u,b,x,g):s.lineTo(F,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-Zu/2;return[Math.cos(i)*n,Math.sin(i)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Xu(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Xu(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Xu(+t),l):n},l.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xu(+t),l):i},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Xu(+t),l):r},l.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Xu(+t),l):a},l.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Xu(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}().innerRadius(e.innerRadius||0).outerRadius(e.outerRadius||e.radius||2).startAngle(e.startAngle||0).endAngle(e.endAngle||2*Math.PI);return n?(r.context(n),i.pathMethods=lineGen):i.attrs={d:r()},i},ef=function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,o=a+i.dx,s=i.y-r.y,l=s+i.dy,c=i.subject;if("circle"===n&&(c.outerRadius||c.radius)){var u=Math.sqrt((a-o)*(a-o)+(s-l)*(s-l)),h=Math.asin(-l/u),f=c.outerRadius||c.radius+(c.radiusPadding||0);a=Math.abs(Math.cos(h)*f)*(o<0?-1:1),s=Math.abs(Math.sin(h)*f)*(l<0?-1:1)}if("rect"===n){var p=c.width,d=c.height;(p>0&&i.dx>0||p<0&&i.dx<0)&&(a=Math.abs(p)>Math.abs(i.dx)?p/2:p),(d>0&&i.dy>0||d<0&&i.dy<0)&&(s=Math.abs(d)>Math.abs(i.dy)?d/2:d),a===p/2&&s===d/2&&(a=o,s=l)}return[[a,s],[o,l]]},nf=function(t){var e=t.type,n=t.connectorData,i=t.subjectType;n||(n={}),n.points&&"number"!=typeof n.points||(n.points=rf(e.annotation.offset,n.points)),n.curve||(n.curve=Ch);var r=[];if(e.editMode){var a=n.points.map((function(t,e){return Uh({},function(t){var e=t.cx,n=void 0===e?0:e,i=t.cy;return{move:{x:n,y:void 0===i?0:i}}}({cx:t[0],cy:t[1]}),{index:e})})),o=function(t){n.points[t][0]+=cu.dx,n.points[t][1]+=cu.dy,e.redrawConnector()};r=e.mapHandles(a.map((function(t){return Uh({},t.move,{drag:o.bind(e,t.index)})})))}var s=ef({type:e,subjectType:i});return s=[s[0]].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(n.points),[s[1]]),{components:[Qh({data:s,curve:n.curve,className:"connector"})],handles:r}},rf=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=t.x/(e+1),i=t.y/(e+1),r=[],a=1;a<=e;a++)r.push([n*a+a%2*20,i*a-a%2*20]);return r},af=function(t){var e=t.subjectData,n=t.type;e.radius||e.outerRadius||(e.radius=20);var i=[],r=tf({data:e,className:"subject"});if(n.editMode){var a=function(t){var e=t.cx,n=void 0===e?0:e,i=t.cy,r=void 0===i?0:i,a=t.r1,o=t.r2,s=t.padding,l={move:{x:n,y:r}};return void 0!==a&&(l.r1={x:n+a/Math.sqrt(2),y:r+a/Math.sqrt(2)}),void 0!==o&&(l.r2={x:n+o/Math.sqrt(2),y:r+o/Math.sqrt(2)}),void 0!==s&&(l.padding={x:n+a+s,y:r}),l}({r1:r.data.outerRadius||r.data.radius,r2:r.data.innerRadius,padding:e.radiusPadding}),o=function(t){var i=e[t]+cu.dx*Math.sqrt(2);e[t]=i,n.redrawSubject(),n.redrawConnector()},s=[Uh({},a.r1,{drag:o.bind(n,void 0!==e.outerRadius?"outerRadius":"radius")})];e.innerRadius&&s.push(Uh({},a.r2,{drag:o.bind(n,"innerRadius")})),i=n.mapHandles(s)}return r.attrs["fill-opacity"]=0,{components:[r],handles:i}},of=function(){function t(e){var n=e.a,i=e.annotation,r=e.editMode,a=e.dispatcher,o=e.notePadding,s=e.accessors;if(Bh(this,t),this.a=n,this.note=-1===i.disable.indexOf("note")&&n.select("g.annotation-note"),this.noteContent=this.note&&n.select("g.annotation-note-content"),this.connector=-1===i.disable.indexOf("connector")&&n.select("g.annotation-connector"),this.subject=-1===i.disable.indexOf("subject")&&n.select("g.annotation-subject"),this.dispatcher=a,a){var l=_f.bind(null,a,i);l({component:this.note,name:"note"}),l({component:this.connector,name:"connector"}),l({component:this.subject,name:"subject"})}this.annotation=i,this.editMode=i.editMode||r,this.notePadding=void 0!==o?o:3,this.offsetCornerX=0,this.offsetCornerY=0,s&&i.data&&this.init(s)}return qh(t,[{key:"init",value:function(t){this.annotation.x||this.mapX(t),this.annotation.y||this.mapY(t)}},{key:"mapY",value:function(t){t.y&&(this.annotation.y=t.y(this.annotation.data))}},{key:"mapX",value:function(t){t.x&&(this.annotation.x=t.x(this.annotation.data))}},{key:"updateEditMode",value:function(){this.a.selectAll("circle.handle").remove()}},{key:"drawOnSVG",value:function(t,e){var n=this;Array.isArray(e)||(e=[e]),e.filter((function(t){return t})).forEach((function(e){var i=e.type,r=e.className,a=e.attrs,o=e.handles,s=e.classID;if("handle"===i)!function(t){var e=t.group,n=t.handles,i=t.r,r=void 0===i?10:i,a=e.selectAll("circle.handle").data(n);a.enter().append("circle").attr("class","handle").attr("fill","grey").attr("fill-opacity",.1).attr("cursor","move").attr("stroke-dasharray",5).attr("stroke","grey").call(qu().container(bu("g.annotations").node()).on("start",(function(t){return t.start&&t.start(t)})).on("drag",(function(t){return t.drag&&t.drag(t)})).on("end",(function(t){return t.end&&t.end(t)}))),e.selectAll("circle.handle").attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).attr("r",(function(t){return t.r||r})).attr("class",(function(t){return"handle "+(t.className||"")})),a.exit().remove()}({group:t,r:a&&a.r,handles:o});else{gf(t,[n.annotation],i,r,s);for(var l=t.select(i+"."+(s||r)),c=Object.keys(a),u=[],h=l.node().attributes,f=h.length-1;f>=0;f--){var p=h[f].name;-1===c.indexOf(p)&&"class"!==p&&u.push(p)}c.forEach((function(t){"text"===t?l.text(a[t]):l.attr(t,a[t])})),u.forEach((function(t){return l.attr(t,null)}))}}))}},{key:"getNoteBBox",value:function(){return vf(this.note,".annotation-note-content text")}},{key:"getNoteBBoxOffset",value:function(){var t=vf(this.note,".annotation-note-content"),e=this.noteContent.attr("transform").split(/\(|\,|\)/g);return t.offsetCornerX=parseFloat(e[1])+this.annotation.dx,t.offsetCornerY=parseFloat(e[2])+this.annotation.dy,t.offsetX=this.annotation.dx,t.offsetY=this.annotation.dy,t}},{key:"drawSubject",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.subject,i=e.type,r={type:this,subjectData:n},a={};"circle"===i?a=af(r):"rect"===i?a=function(t){var e=t.subjectData,n=t.type;e.width||(e.width=100),e.height||(e.height=100);var i=[],r=e.width,a=e.height,o=Qh({data:[[0,0],[r,0],[r,a],[0,a],[0,0]],className:"subject"});if(n.editMode){var s=[{x:r,y:a/2,drag:function(){e.width=cu.x,n.redrawSubject(),n.redrawConnector()}.bind(n)},{x:r/2,y:a,drag:function(){e.height=cu.y,n.redrawSubject(),n.redrawConnector()}.bind(n)}];i=n.mapHandles(s)}return o.attrs["fill-opacity"]=.1,{components:[o],handles:i}}(r):"threshold"===i?a=function(t){var e=t.subjectData,n=t.type.annotation.position,i=(void 0!==e.x1?e.x1:n.x)-n.x,r=(void 0!==e.x2?e.x2:n.x)-n.x,a=(void 0!==e.y1?e.y1:n.y)-n.y,o=(void 0!==e.y2?e.y2:n.y)-n.y;return{components:[Qh({data:[[i,a],[r,o]],className:"subject"})]}}(r):"badge"===i&&(a=function(t){var e=t.subjectData,n=void 0===e?{}:e,i=t.type,r=void 0===i?{}:i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.typeSettings&&r.typeSettings.subject;n.radius||(o&&o.radius?n.radius=o.radius:n.radius=14),n.x||o&&o.x&&(n.x=o.x),n.y||o&&o.y&&(n.y=o.y);var s=[],l=[],c=n.radius,u=.7*c,h=0,f=0,p=Math.sqrt(2)*c,d={xleftcorner:-c,xrightcorner:c,ytopcorner:-c,ybottomcorner:c,xleft:-p,xright:p,ytop:-p,ybottom:p};n.x&&!n.y?h=d["x"+n.x]:n.y&&!n.x?f=d["y"+n.y]:n.x&&n.y&&(h=d["x"+n.x+"corner"],f=d["y"+n.y+"corner"]);var g="translate("+h+", "+f+")",_=tf({className:"subject",data:{radius:c}});_.attrs.transform=g,_.attrs.fill=a.color,_.attrs["stroke-linecap"]="round",_.attrs["stroke-width"]="3px";var m=tf({className:"subject-ring",data:{outerRadius:c,innerRadius:u}});m.attrs.transform=g,m.attrs["stroke-width"]="3px",m.attrs.fill="white";var v=void 0;if(h&&f||!h&&!f)v=Qh({className:"subject-pointer",data:[[0,0],[h||0,0],[0,f||0],[0,0]]});else if(h||f){var y=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t&&t/Math.sqrt(2)/Math.sqrt(2)||e*c/Math.sqrt(2)};v=Qh({className:"subject-pointer",data:[[0,0],[y(h),y(f)],[y(h,-1),y(f,-1)],[0,0]]})}if(v&&(v.attrs.fill=a.color,v.attrs["stroke-linecap"]="round",v.attrs["stroke-width"]="3px",l.push(v)),r.editMode){var x={x:2*h,y:2*f,drag:function(){n.x=cu.x<2*-c?"left":cu.x>2*c?"right":void 0,n.y=cu.y<2*-c?"top":cu.y>2*c?"bottom":void 0,r.redrawSubject()}.bind(r)};x.x||x.y||(x.y=-c),s=r.mapHandles([x])}var b=void 0;return n.text&&(b={type:"text",className:"badge-text",attrs:{fill:"white",stroke:"none","font-size":".7em",text:n.text,"text-anchor":"middle",dy:".25em",x:h,y:f}}),l.push(_),l.push(m),l.push(b),{components:l,handles:s}}(r,this.annotation));var o=a,s=o.components,l=void 0===s?[]:s,c=o.handles,u=void 0===c?[]:c;return l.forEach((function(e){e&&e.attrs&&!e.attrs.stroke&&(e.attrs.stroke=t.annotation.color)})),this.editMode&&(u=u.concat(this.mapHandles([{drag:this.dragSubject.bind(this)}])),l.push({type:"handle",handles:u})),l}},{key:"drawConnector",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.connector,i=n.type||e.type,r={type:this,connectorData:n};r.subjectType=this.typeSettings&&this.typeSettings.subject&&this.typeSettings.subject.type;var a={};a="curve"===i?nf(r):"elbow"===i?function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,o=a+i.dx,s=i.y-r.y,l=s+i.dy,c=i.subject;if("rect"===n){var u=c.width,h=c.height;(u>0&&i.dx>0||u<0&&i.dx<0)&&(a=Math.abs(u)>Math.abs(i.dx)?u/2:u),(h>0&&i.dy>0||h<0&&i.dy<0)&&(s=Math.abs(h)>Math.abs(i.dy)?h/2:h),a===u/2&&s===h/2&&(a=o,s=l)}var f=[[a,s],[o,l]],p=l-s,d=o-a,g=o,_=l,m=l<s&&o>a||o<a&&l>s?-1:1;if(Math.abs(d)<Math.abs(p)?(g=o,_=s+d*m):(_=l,g=a+p*m),"circle"===n&&(c.outerRadius||c.radius)){var v=(c.outerRadius||c.radius)+(c.radiusPadding||0),y=v/Math.sqrt(2);if(Math.abs(d)>y&&Math.abs(p)>y)f=[[a=y*(o<0?-1:1),s=y*(l<0?-1:1)],[g,_],[o,l]];else if(Math.abs(d)>Math.abs(p)){var x=Math.asin(-l/v);f=[[a=Math.abs(Math.cos(x)*v)*(o<0?-1:1),l],[o,l]]}else{var b=Math.acos(o/v);f=[[o,s=Math.abs(Math.sin(b)*v)*(l<0?-1:1)],[o,l]]}}else f=[[a,s],[g,_],[o,l]];return{components:[Qh({data:f,className:"connector"})]}}(r):function(t){var e=ef(t);return{components:[Qh({data:e,className:"connector"})]}}(r);var o=a,s=o.components,l=void 0===s?[]:s,c=o.handles,u=void 0===c?[]:c,h=l[0];h&&(h.attrs.stroke=this.annotation.color,h.attrs.fill="none");var f=n.end||e.end,p={};if("arrow"===f){var d=h.data[1],g=h.data[0];Math.sqrt(Math.pow(d[0]-g[0],2)+Math.pow(d[1]-g[1],2))<5&&h.data[2]&&(d=h.data[2]),p=function(t){var e=t.annotation,n=t.start,i=t.end,r=t.scale,a=void 0===r?1:r,o=e.position;n=n?[-i[0]+n[0],-i[1]+n[1]]:[e.dx,e.dy],i||(i=[e.x-o.x,e.y-o.y]);var s=i[0],l=i[1],c=n[0],u=n[1],h=10*a,f=16/180*Math.PI,p=Math.atan(u/c);c<0&&(p+=Math.PI);var d=[[s,l],[Math.cos(p+f)*h+s,Math.sin(p+f)*h+l],[Math.cos(p-f)*h+s,Math.sin(p-f)*h+l],[s,l]];return{components:[Qh({data:d,className:"connector-end connector-arrow",classID:"connector-end"})]}}({annotation:this.annotation,start:d,end:g,scale:n.endScale})}else"dot"===f?p=function(t){var e=t.line,n=t.scale,i=void 0===n?1:n,r=tf({className:"connector-end connector-dot",classID:"connector-end",data:{radius:3*Math.sqrt(i)}});return r.attrs.transform="translate("+e.data[0][0]+", "+e.data[0][1]+")",{components:[r]}}({line:h,scale:n.endScale}):f&&"none"!==f||this.connector&&this.connector.select(".connector-end").remove();return p.components&&(p.components.forEach((function(e){e.attrs.fill=t.annotation.color,e.attrs.stroke=t.annotation.color})),l=l.concat(p.components)),this.editMode&&0!==u.length&&l.push({type:"handle",handles:u}),l}},{key:"drawNote",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.note,i=n.align||e.align||"dynamic",r={bbox:e.bbox,align:i,offset:this.annotation.offset},a=n.lineType||e.lineType,o={};"vertical"===a?o=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,o=t.bbox,s=t.offset;"top"===(e=Jh(e,s.y))?a-=o.height:"middle"===e&&(a-=o.height/2);var l=[[i,a],[i,a+o.height]];return{components:[Qh({data:l,className:"note-line"})]}}(r):"horizontal"===a&&(o=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,o=t.offset,s=t.bbox;"right"===(e=Xh(e,o.x))?i-=s.width:"middle"===e&&(i-=s.width/2);var l=[[i,a],[i+s.width,a]];return{components:[Qh({data:l,className:"note-line"})]}}(r));var s=o,l=s.components,c=void 0===l?[]:l,u=s.handles,h=void 0===u?[]:u;if(c.forEach((function(e){e.attrs.stroke=t.annotation.color})),this.editMode){h=this.mapHandles([{x:0,y:0,drag:this.dragNote.bind(this)}]),c.push({type:"handle",handles:h});var f=this.dragNote.bind(this),p=this.dragstarted.bind(this),d=this.dragended.bind(this);this.note.call(qu().container(bu("g.annotations").node()).on("start",(function(t){return p(t)})).on("drag",(function(t){return f(t)})).on("end",(function(t){return d(t)})))}else this.note.on("mousedown.drag",null);return c}},{key:"drawNoteContent",value:function(t){var e=this.annotation.note,n=void 0!==e.padding?e.padding:this.notePadding,i=e.orientation||t.orientation||"topBottom",r=e.lineType||t.lineType,a=e.align||t.align||"dynamic";"vertical"===r?i="leftRight":"horizontal"===r&&(i="topBottom");var o=function(t){var e=t.padding,n=void 0===e?0:e,i=t.bbox,r=void 0===i?{x:0,y:0,width:0,height:0}:i,a=t.align,o=t.orientation,s=t.offset,l=void 0===s?{x:0,y:0}:s,c=-r.x,u=0;return-1!==Kh.indexOf(o)?(a=Xh(a,l.x),l.y<0&&"topBottom"===o||"top"===o?u-=r.height+n:u+=n,"middle"===a?c-=r.width/2:"right"===a&&(c-=r.width)):-1!==Zh.indexOf(o)&&(a=Jh(a,l.y),l.x<0&&"leftRight"===o||"left"===o?c-=r.width+n:c+=n,"middle"===a?u-=r.height/2:"top"===a&&(u-=r.height)),{x:c,y:u}}({padding:n,bbox:t.bbox,offset:this.annotation.offset,orientation:i,align:a}),s=o.x,l=o.y;return this.offsetCornerX=s+this.annotation.dx,this.offsetCornerY=l+this.annotation.dy,this.note&&this.noteContent.attr("transform","translate("+s+", "+l+")"),[]}},{key:"drawOnScreen",value:function(t,e){return this.drawOnSVG(t,e)}},{key:"redrawSubject",value:function(){this.subject&&this.drawOnScreen(this.subject,this.drawSubject())}},{key:"redrawConnector",value:function(){this.connector&&this.drawOnScreen(this.connector,this.drawConnector())}},{key:"redrawNote",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNoteBBox();this.noteContent&&this.drawOnScreen(this.noteContent,this.drawNoteContent({bbox:t})),this.note&&this.drawOnScreen(this.note,this.drawNote({bbox:t}))}},{key:"setPosition",value:function(){var t=this.annotation.position;this.a.attr("transform","translate("+t.x+", "+t.y+")")}},{key:"clearComponents",value:function(){this.subject&&this.subject.select("*").remove(),this.connector&&this.connector.select("*").remove()}},{key:"setOffset",value:function(){if(this.note){var t=this.annotation.offset;this.note.attr("transform","translate("+t.x+", "+t.y+")")}}},{key:"setPositionWithAccessors",value:function(t){t&&this.annotation.data&&(this.mapX(t),this.mapY(t)),this.setPosition()}},{key:"setClassName",value:function(){this.a.attr("class","annotation "+(this.className&&this.className())+" "+(this.editMode?"editable":"")+" "+(this.annotation.className||""))}},{key:"draw",value:function(){this.setClassName(),this.setPosition(),this.setOffset(),this.redrawSubject(),this.redrawConnector(),this.redrawNote()}},{key:"dragstarted",value:function(){cu.sourceEvent.stopPropagation(),this.dispatcher&&this.dispatcher.call("dragstart",this.a,this.annotation),this.a.classed("dragging",!0),this.a.selectAll("circle.handle").style("pointer-events","none")}},{key:"dragended",value:function(){this.dispatcher&&this.dispatcher.call("dragend",this.a,this.annotation),this.a.classed("dragging",!1),this.a.selectAll("circle.handle").style("pointer-events","all")}},{key:"dragSubject",value:function(){var t=this.annotation.position;t.x+=cu.dx,t.y+=cu.dy,this.annotation.position=t}},{key:"dragNote",value:function(){var t=this.annotation.offset;t.x+=cu.dx,t.y+=cu.dy,this.annotation.offset=t}},{key:"mapHandles",value:function(t){var e=this;return t.map((function(t){return Uh({},t,{start:e.dragstarted.bind(e),end:e.dragended.bind(e)})}))}}]),t}(),sf=function(t,e,n){return function(t){function i(t){Bh(this,i);var n=Vh(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return n.typeSettings=e,e.disable&&e.disable.forEach((function(t){n[t]&&n[t].remove(),n[t]=void 0,"note"===t&&(n.noteContent=void 0)})),n}return Hh(i,t),qh(i,[{key:"className",value:function(){return""+(e.className||Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this)&&Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this).call(this)||"")}},{key:"drawSubject",value:function(t){return this.typeSettings.subject=Uh({},e.subject,this.typeSettings.subject),Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawSubject",this).call(this,Uh({},t,this.typeSettings.subject))}},{key:"drawConnector",value:function(t){return this.typeSettings.connector=Uh({},e.connector,this.typeSettings.connector),Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawConnector",this).call(this,Uh({},t,e.connector,this.typeSettings.connector))}},{key:"drawNote",value:function(t){return this.typeSettings.note=Uh({},e.note,this.typeSettings.note),Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNote",this).call(this,Uh({},t,e.note,this.typeSettings.note))}},{key:"drawNoteContent",value:function(t){return Wh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNoteContent",this).call(this,Uh({},t,e.note,this.typeSettings.note))}}],[{key:"init",value:function(t,e){return Wh(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,t,e),n&&(t=n(t,e)),t}}]),i}(t)},lf=function(t){function e(t){Bh(this,e);var n=Vh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.textWrap=t.textWrap||120,n.drawText(),n}return Hh(e,t),qh(e,[{key:"updateTextWrap",value:function(t){this.textWrap=t,this.drawText()}},{key:"drawText",value:function(){if(this.note){gf(this.note,[this.annotation],"g","annotation-note-content");var t=this.note.select("g.annotation-note-content");gf(t,[this.annotation],"rect","annotation-note-bg"),gf(t,[this.annotation],"text","annotation-note-label"),gf(t,[this.annotation],"text","annotation-note-title");var e={height:0},n=this.a.select("text.annotation-note-label"),i=this.annotation.note&&this.annotation.note.wrap||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrap||this.textWrap,r=this.annotation.note&&this.annotation.note.wrapSplitter||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrapSplitter,a=this.annotation.note&&this.annotation.note.bgPadding||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.bgPadding,o={top:0,bottom:0,left:0,right:0};if("number"==typeof a?o={top:a,bottom:a,left:a,right:a}:a&&"object"===(void 0===a?"undefined":jh(a))&&(o=Uh(o,a)),this.annotation.note.title){var s=this.a.select("text.annotation-note-title");s.text(this.annotation.note.title),s.attr("fill",this.annotation.color),s.attr("font-weight","bold"),s.call(mf,i,r),e=s.node().getBBox()}n.text(this.annotation.note.label).attr("dx","0"),n.call(mf,i,r),n.attr("y",1.1*e.height||0),n.attr("fill",this.annotation.color);var l=this.getNoteBBox();this.a.select("rect.annotation-note-bg").attr("width",l.width+o.left+o.right).attr("height",l.height+o.top+o.bottom).attr("x",l.x-o.left).attr("y",-o.top).attr("fill","white").attr("fill-opacity",0)}}}]),e}(of),cf=sf(lf,{className:"label",note:{align:"middle"}}),uf=sf(lf,{className:"callout",note:{lineType:"horizontal"}}),hf=(sf(uf,{className:"callout elbow",connector:{type:"elbow"}}),sf(uf,{className:"callout curve",connector:{type:"curve"}}),sf(of,{className:"badge",subject:{type:"badge"},disable:["connector","note"]}),sf(lf,{className:"callout circle",subject:{type:"circle"},note:{lineType:"horizontal"},connector:{type:"elbow"}})),ff=sf(lf,{className:"callout rect",subject:{type:"rect"},note:{lineType:"horizontal"},connector:{type:"elbow"}}),pf=function(t){function e(){return Bh(this,e),Vh(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Hh(e,t),qh(e,[{key:"mapY",value:function(t){Wh(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mapY",this).call(this,t);var n=this.annotation;(n.subject.x1||n.subject.x2)&&n.data&&t.y&&(n.y=t.y(n.data)),!n.subject.x1&&!n.subject.x2||n.x||(n.x=n.subject.x1||n.subject.x2)}},{key:"mapX",value:function(t){Wh(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mapX",this).call(this,t);var n=this.annotation;(n.subject.y1||n.subject.y2)&&n.data&&t.x&&(n.x=t.x(n.data)),!n.subject.y1&&!n.subject.y2||n.y||(n.y=n.subject.y1||n.subject.y2)}}]),e}(uf),df=sf(pf,{className:"callout xythreshold",subject:{type:"threshold"}}),gf=function(t,e,n,i,r){var a=t.selectAll(n+"."+(r||i)).data(e);return a.enter().append(n).merge(a).attr("class",i),a.exit().remove(),t},_f=function(t,e,n){var i=n.component,r=n.name;i&&i.on("mouseover.annotations",(function(){t.call(r+"over",i,e)})).on("mouseout.annotations",(function(){return t.call(r+"out",i,e)})).on("click.annotations",(function(){return t.call(r+"click",i,e)}))},mf=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.2;t.each((function(){for(var t=bu(this),r=t.text().split(n||/[ \t\r\n]+/).reverse().filter((function(t){return""!==t})),a=void 0,o=[],s=t.text(null).append("tspan").attr("x",0).attr("dy","0.8em");a=r.pop();)o.push(a),s.text(o.join(" ")),s.node().getComputedTextLength()>e&&o.length>1&&(o.pop(),s.text(o.join(" ")),o=[a],s=t.append("tspan").attr("x",0).attr("dy",i+"em").text(a))}))},vf=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":not(.handle)";return t?t.selectAll(e).nodes().reduce((function(t,e){var n=e.getBBox();t.x=Math.min(t.x,n.x),t.y=Math.min(t.y,n.y),t.width=Math.max(t.width,n.width);var i=e&&e.attributes&&e.attributes.y;return t.height=Math.max(t.height,(i&&parseFloat(i.value)||0)+n.height),t}),{x:0,y:0,width:0,height:0}):{x:0,y:0,width:0,height:0}};function yf(){var t=[],e=void 0,n=void 0,i=[],r={},a={},o=!1,s=void 0,l=uf,c=void 0,u=void 0,h=Fu("subjectover","subjectout","subjectclick","connectorover","connectorout","connectorclick","noteover","noteout","noteclick","dragend","dragstart"),f=void 0,p=function(n){f=n,o||n.selectAll("circle.handle").remove();var p=t.map((function(t){return t.type||(t.type=l),t.disable||(t.disable=i),new $h(t)}));e=e||new Yh({annotations:p,accessors:r,accessorsInverse:a,ids:s}),n.selectAll("g").data([e]).enter().append("g").attr("class","annotations");var d=n.select("g.annotations");gf(d,e.annotations,"g","annotation");var g=d.selectAll("g.annotation");g.each((function(t){var e=bu(this);e.attr("class","annotation"),gf(e,[t],"g","annotation-connector"),gf(e,[t],"g","annotation-subject"),gf(e,[t],"g","annotation-note"),gf(e.select("g.annotation-note"),[t],"g","annotation-note-content"),t.type="[object Object]"===t.type.toString()?t.type:new t.type({a:e,annotation:t,textWrap:c,notePadding:u,editMode:o,dispatcher:h,accessors:r}),t.type.draw(),t.type.drawText&&t.type.drawText()}))};return p.json=function(){return console.log("Annotations JSON was copied to your clipboard. Please note the annotation type is not JSON compatible. It appears in the objects array in the console, but not in the copied JSON.",e.json),window.copy(JSON.stringify(e.json.map((function(t){return delete t.type,t})))),p},p.update=function(){return t&&e&&(t=e.annotations.map((function(t){return t.type.draw(),t}))),p},p.updateText=function(){return e&&(e.updateText(c),t=e.annotations),p},p.updatedAccessors=function(){return e.setPositionWithAccessors(),t=e.annotations,p},p.disable=function(n){return arguments.length?(i=n,e&&(e.updateDisable(i),t=e.annotations),p):i},p.textWrap=function(n){return arguments.length?(c=n,e&&(e.updateTextWrap(c),t=e.annotations),p):c},p.notePadding=function(n){return arguments.length?(u=n,e&&(e.updateNotePadding(u),t=e.annotations),p):u},p.type=function(n,i){return arguments.length?(l=n,e&&(e.annotations.map((function(t){t.type.note&&t.type.note.selectAll("*:not(.annotation-note-content)").remove(),t.type.noteContent&&t.type.noteContent.selectAll("*").remove(),t.type.subject&&t.type.subject.selectAll("*").remove(),t.type.connector&&t.type.connector.selectAll("*").remove(),t.type.typeSettings={},t.type=l,t.subject=i&&i.subject||t.subject,t.connector=i&&i.connector||t.connector,t.note=i&&i.note||t.note})),t=e.annotations),p):l},p.annotations=function(n){if(!arguments.length)return e&&e.annotations||t;(t=n,e&&e.annotations)&&(t.some((function(t){return!t.type||"[object Object]"!==t.type.toString()}))?(e=null,p(f)):e.annotations=t);return p},p.context=function(t){return arguments.length?(n=t,p):n},p.accessors=function(t){return arguments.length?(r=t,p):r},p.accessorsInverse=function(t){return arguments.length?(a=t,p):a},p.ids=function(t){return arguments.length?(s=t,p):s},p.editMode=function(n){return arguments.length?(o=n,f&&f.selectAll("g.annotation").classed("editable",o),e&&(e.editMode(o),t=e.annotations),p):o},p.collection=function(t){return arguments.length?(e=t,p):e},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p}function xf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function bf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xf(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function wf(t){if(t.svg_){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);e.selectAll(".em-annotation-group").remove();var n=t.annotations_;if(n){var i={annotationLabel:cf,annotationCallout:uf,annotationCalloutRect:ff,annotationCalloutCircle:hf,annotationXYThreshold:df},r=n.annotations.map((function(t){var e=i[t.type]||cf;return bf(bf({},t),{},{type:e})})),a=yf().type(cf).annotations(r).editMode(n.editMode);e.append("g").attr("class","em-annotation-group").call(a)}}}var Sf=function(t,e){var n,i;t.labels_.config||(t.labels_.config=kf),t.labels_.statLabelsPositions||(t.labels_.statLabelsPositions=Tf);var r=e.select("#em-labels"),a=r.empty()?e.append("g").attr("id","em-labels"):r;null!==(n=t.labels_)&&void 0!==n&&n.values&&"ps"!==t._mapType&&Af(t,a);var o=(null===(i=t.labels_)||void 0===i?void 0:i.labels)||kf["".concat(t.geo,"_").concat(t.proj_,".cc")];if(o){var s,l=a.append("g").attr("class","em-label-shadows").attr("text-anchor","middle"),c=a.append("g").attr("class","em-labels").attr("text-anchor","middle");if(null!==(s=t.labels_)&&void 0!==s&&s.shadows)l.selectAll("text").data(o).enter().append("text").attr("id",(function(t){return"em-label-shadow-"+t.text.replace(/\s+/g,"-")})).attr("class",(function(t){return"em-label-shadow em-label-shadow-"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),i=n[0],r=n[1];return"translate(".concat(i,",").concat(r,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}));c.selectAll("text").data(o).enter().append("text").attr("id",(function(t){return"em-label-"+t.text.replace(/\s+/g,"-")})).attr("class",(function(t){return"em-label em-label-"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),i=n[0],r=n[1];return"translate(".concat(i,",").concat(r,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}},Mf=function(t){var e,n,i;if(t){t.svg_.selectAll("g.em-stat-label > *").remove(),t.svg_.selectAll("g.em-stat-label-shadow > *").remove();var r=t.svg_.selectAll("g.em-stat-label"),a=null!==(e=t.labels_)&&void 0!==e&&e.statLabelsFilterFunction?null===(n=t.labels_)||void 0===n?void 0:n.statLabelsFilterFunction:Cf,o=t.statData();return r.filter((function(e){return a(e,t)})).each((function(e){var n=Ot(this),i=Ef(e,o);t.labels_.backgrounds&&function(t,e){var n=5,i=2,r=e.append("text").attr("visibility","hidden").text(t).node().getBBox(),a=r.width,o=r.height;e.select('text[visibility="hidden"]').remove();var s=-a/2-n,l=-o/2-i;e.append("rect").attr("x",s).attr("y",l).attr("width",a+2*n).attr("height",o+2*i).attr("class","em-label-background")}(i,n),n.append("text").text(i).attr("class","em-stat-label-text")})),null!==(i=t.labels_)&&void 0!==i&&i.shadows&&t.svg_.selectAll("g.em-stat-label-shadow").filter((function(e){return a(e,t)})).append("text").text((function(t){return Ef(t,o)})),t}console.warn("No map specified")},Ef=function(t,e){if(e&&null!=e&&e.get){var n=e.get(t.properties.id);if(!n||!n.value&&0!==n&&0!==n.value)return"";if(":"!==n.value)return ca(n.value)}},Cf=function(t,e){var n=e.statData().get(t.properties.id);return!(!n||!n.value&&0!==n&&0!==n.value)},Af=function(t,e){var n,i=e.append("g").attr("class","em-stat-labels-shadows").attr("text-anchor","middle"),r=e.append("g").attr("class","em-stat-labels").attr("text-anchor","middle"),a=[];t.Geometries.geoJSONs.nutsrg?a="mixed"==t.nutsLevel_?t.Geometries.geoJSONs.mixed.rg0.concat(t.Geometries.geoJSONs.mixed.rg1,t.Geometries.geoJSONs.mixed.rg2,t.Geometries.geoJSONs.mixed.rg3,t.Geometries.geoJSONs.cntrg):t.Geometries.geoJSONs.nutsrg.concat(t.Geometries.geoJSONs.cntrg):t.Geometries.userGeometries&&(a=t.Geometries.statisticalRegions.features);var o=a.filter((function(t,e,n){return e===n.findIndex((function(e){return e.properties.id===t.properties.id}))}));r.selectAll("g").data(o).enter().append("g").attr("transform",(function(e){if(t.labels_.statLabelsPositions[e.properties.id]){var n=t.labels_.statLabelsPositions[e.properties.id],i=t._projection([n.x,n.y]),r=i[0].toFixed(3),a=i[1].toFixed(3);return"translate(".concat(r,",").concat(a,")")}var o=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(o=t.labels_.processValueLabelCentroids(e,o)),"translate("+o+")"})).attr("class","em-stat-label"),null!==(n=t.labels_)&&void 0!==n&&n.shadows&&i.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){if(t.labels_.statLabelsPositions[e.properties.id]){var n=t._projection([t.labels_.statLabelsPositions[e.properties.id].x,t.labels_.statLabelsPositions[e.properties.id].y]),i=n[0].toFixed(3),r=n[1].toFixed(3);return"translate(".concat(i,",").concat(r,")")}var a=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(a=t.labels_.processValueLabelCentroids(e,a)),"translate("+a+")"})).attr("class","em-stat-label-shadow")},kf={EUR_3035:{cc:[{text:"AL",x:515e4,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:269e4,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:225e4,class:"cc",size:22},{text:"HR",x:484e4,y:248e4,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:292e4,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"GE",x:6942680,y:266e4,class:"cc"},{text:"UA",x:589e4,y:305e4,class:"cc"},{text:"BA",x:4949262,y:2338688,class:"cc"},{text:"MD",x:574e4,y:279e4,class:"cc"},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:277e4,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:235e4,class:"cc",size:10},{text:"SK",x:504e4,y:286e4,class:"cc",size:12},{text:"SI",x:4675e3,y:25e5,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:417e4,y:26e5,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:398e4,y:16e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:373e4,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},Tf={AL:{x:515e4,y:2e6},AT:{x:467e4,y:274e4},BE:{x:393e4,y:306e4},BG:{x:5567e3,y:23e5},HR:{x:4657718,y:2400243},CY:{x:6426e3,y:157e4},CH:{x:417e4,y:26e5},CZ:{x:4707e3,y:295e4},DK:{x:4316e3,y:3621e3},EE:{x:522e4,y:405e4},FI:{x:515e4,y:4424e3},FR:{x:3767740,y:2662817},DE:{x:4347284,y:3093276},EL:{x:537e4,y:175e4},HU:{x:502e4,y:267e4},IS:{x:304e4,y:4833e3},IE:{x:3136e3,y:3394e3},IT:{x:45e5,y:2181963},LV:{x:529e4,y:384e4},LT:{x:519e4,y:367e4},LU:{x:412e4,y:294e4},MT:{x:488e4,y:148e4},GE:{x:6912680,y:2696554},UA:{x:5865507,y:3130158},BA:{x:4959262,y:2368688},MD:{x:5736016,y:2835957},ME:{x:5073e3,y:223e4},MK:{x:53e5,y:213e4},NL:{x:402e4,y:3208e3},NO:{x:43e5,y:4147e3},PL:{x:4964e3,y:32e5},PT:{x:276e4,y:199e4},RO:{x:5451e3,y:26e5},RS:{x:52e5,y:237e4},SK:{x:504e4,y:289e4},SI:{x:466e4,y:255e4},ES:{x:32e5,y:2e6},SE:{x:463e4,y:4e6},TR:{x:651e4,y:21e5},UK:{x:3558e3,y:325e4},RU:{x:6842086,y:3230517}};function Pf(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function Nf(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){Pf(a,i,r,o,s,"next",t)}function s(t){Pf(a,i,r,o,s,"throw",t)}o(void 0)}))}}var Lf=n(756),Ff=n.n(Lf);function Of(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Gf(t,e){return fetch(t,e).then(Of)}function Df(t){return t}function zf(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return If(t,e)}))}:If(t,e)}function If(t,e){var n=e.id,i=e.bbox,r=null==e.properties?{}:e.properties,a=function(t,e){var n=function(t){if(null==t)return Df;var e,n,i=t.scale[0],r=t.scale[1],a=t.translate[0],o=t.translate[1];return function(t,s){s||(e=n=0);var l=2,c=t.length,u=new Array(c);for(u[0]=(e+=t[0])*i+a,u[1]=(n+=t[1])*r+o;l<c;)u[l]=t[l],++l;return u}}(t.transform),i=t.arcs;function r(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a<o;++a)e.push(n(r[a],a));t<0&&function(t,e){for(var n,i=t.length,r=i-e;r<--i;)n=t[r],t[r++]=t[i],t[i]=n}(e,o)}function a(t){return n(t)}function o(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=o(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}function c(t){var e,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(c)};case"Point":e=a(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(a);break;case"LineString":e=o(t.arcs);break;case"MultiLineString":e=t.arcs.map(o);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:n,coordinates:e}}return c(e)}(t,e);return null==n&&null==i?{type:"Feature",properties:r,geometry:a}:null==i?{type:"Feature",id:n,properties:r,geometry:a}:{type:"Feature",id:n,bbox:i,properties:r,geometry:a}}var Rf={2021:{3035:{"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}},4326:{"03M":{type:"Topology",arcs:[[[1900,1275],[-30,27],[-27,-13],[-34,23],[-87,6],[25,59],[1,70],[20,34],[24,167]],[[1792,1648],[-116,1],[-62,77],[-89,-8],[-60,148],[7,86],[-4,15],[-13,60],[-45,28],[-33,-48],[-26,4],[-31,142],[-11,53],[5,43],[-19,44],[-39,8],[-40,49],[-52,-59],[-93,71],[-38,-6],[-16,-26]],[[945,2388],[-54,27],[-20,28],[-22,-3],[-17,22],[-25,1],[-10,10],[4,17],[27,14],[-15,29],[1,16],[68,1],[-8,16],[-5,30],[-14,29],[-27,42],[-25,22],[-30,41]],[[773,2730],[-89,-69],[-64,-4],[-82,-92],[-133,-15],[27,-93],[64,-43],[16,-50],[38,-44],[9,-75],[-48,-51],[5,-41],[6,-50],[-52,-84],[-78,14],[-35,-66],[-33,-61],[-45,11],[-35,-42],[-18,-72],[33,-71],[48,-55]],[[1017,2330],[-72,58]],[[307,1677],[-36,-12],[-25,-21],[-26,-10],[-76,-90],[-17,4],[-30,31],[-52,-14],[-26,-23],[-19,1]],[[2319,1185],[-116,-32],[-39,-52],[-42,70],[-68,23],[-12,58],[-43,23],[-42,-23],[-57,23]],[[2044,0],[-4,43],[-38,82],[-34,9],[-24,43],[13,97],[61,4],[32,41],[49,0],[37,82],[-26,118],[130,167],[-8,73],[74,46],[-2,18],[-9,92],[24,35],[7,49],[48,52],[-55,134]]],transform:{scale:[.0006038339283908974,.00036983475567765975],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"10M":{type:"Topology",arcs:[[[659,439],[-54,17],[17,111]],[[622,567],[-93,31],[-25,92],[-36,11],[-29,97],[-23,1],[-63,3]],[[328,822],[-33,74],[-27,44]],[[268,940],[-72,-44],[-38,-31],[27,-86],[-14,-65],[-81,-78],[16,-58]],[[353,802],[-25,20]],[[106,578],[-41,-19],[-65,-28]],[[805,408],[-54,-21],[-92,52]],[[709,0],[-22,72],[0,17],[40,36],[18,67],[53,101],[16,64],[-9,51]]],transform:{scale:[.001740521547911524,.0010740945563829907],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"20M":{type:"Topology",arcs:[[[380,252],[-21,26],[0,48]],[[359,326],[-49,17],[-56,107],[-51,11]],[[189,472],[-34,68]],[[155,540],[-66,-39],[18,-66],[-54,-68],[8,-35]],[[61,332],[-21,-13],[-10,-12],[-13,5],[-17,-7]],[[464,234],[-84,18]],[[409,0],[-14,46],[61,110],[8,78]]],transform:{scale:[.003018276831896498,.0018697201537037245],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"60M":{type:"Topology",arcs:[[[235,156],[-13,46]],[[222,202],[-96,84]],[[117,293],[-21,42]],[[96,335],[-58,-129]],[[126,286],[-9,7]],[[38,206],[-38,-17]],[[287,145],[-52,11]],[[253,0],[34,145]]],transform:{scale:[.004879722822299564,.0030138772626866006],translate:[20.352928393000074,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}}}},2024:{3035:{"03M":{type:"Topology",arcs:[[[728,1508],[-48,12],[-22,18],[-15,-5],[-16,13],[-22,-4],[-10,8],[0,13],[21,13],[-16,17],[0,13],[58,9],[-5,8],[-10,22],[-16,17],[-27,25],[-21,13],[-32,26]],[[1912,0],[-6,30],[-42,51],[-32,0],[-21,30],[0,69],[53,8],[21,35],[43,4],[26,60],[-37,81],[96,129],[-16,51],[58,43],[0,9],[-21,64],[16,26],[5,34],[32,43],[-58,85]],[[250,942],[-27,-13],[-21,-17],[-21,-8],[-59,-73],[-16,0],[-26,17],[-43,-13],[-21,-21],[-16,0]],[[1657,861],[-27,13],[-21,-13],[-32,13],[-74,-9],[16,47],[-6,47],[11,26],[5,120]],[[1529,1105],[-100,-17],[-64,47],[-75,-17],[-63,94],[-6,60],[-5,13],[-16,38],[-42,13],[-22,-38],[-21,0],[-42,94],[-16,34],[0,30],[-21,30],[-32,0],[-38,30],[-42,-47],[-85,39],[-32,-9],[-10,-21]],[[547,1726],[-69,-60],[-53,-13],[-59,-73],[-111,-25],[32,-60],[58,-22],[16,-34],[37,-26],[16,-51],[-37,-39],[5,-30],[11,-34],[-37,-64],[-64,4],[-26,-51],[-22,-47],[-42,4],[-21,-34],[-11,-52],[37,-47],[43,-30]],[[797,1478],[-69,30]],[[2029,852],[-96,-38],[-32,-39],[-42,43],[-59,4],[-16,39],[-42,13],[-32,-22],[-53,9]]],transform:{scale:[56.97629608361119,58.91534666536319],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[242,508],[-33,47],[-27,27]],[[637,0],[-25,46],[-2,12],[30,29],[7,47],[34,75],[7,45],[-12,33]],[[83,318],[-32,-18],[-51,-26]],[[552,290],[-46,5],[3,78]],[[509,373],[-79,8],[-30,59],[-30,3],[-34,62],[-19,-1],[-52,-6]],[[182,582],[-55,-39],[-28,-25],[30,-56],[-5,-45],[-59,-62],[18,-37]],[[265,498],[-23,10]],[[676,287],[-43,-21],[-81,24]]],transform:{scale:[171.07449827433382,174.72145763645509],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[50,191],[-17,-11],[-8,-10],[-11,1],[-14,-6]],[[305,224],[-44,6],[-58,68],[-44,2]],[[109,350],[-52,-36],[21,-45],[-38,-54],[10,-24]],[[159,300],[-14,6]],[[145,306],[-36,44]],[[381,0],[-17,31],[41,85],[-1,57]],[[404,173],[-74,2]],[[330,175],[-20,15],[-5,34]]],transform:{scale:[286.13294356075795,290.536823841191],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[258,111],[-47,1]],[[32,123],[-32,-17]],[[211,112],[-16,32]],[[195,144],[-94,49]],[[70,225],[-38,-102]],[[101,193],[-8,4]],[[93,197],[-23,28]],[[243,0],[15,111]]],transform:{scale:[447.98943164212585,451.9461704196305],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}}},4326:{"03M":{type:"Topology",arcs:[[[1543,0],[-4,32],[-28,65],[-24,5],[-19,33],[10,70],[47,5],[23,33],[38,0],[28,59],[-19,92],[94,124],[-5,54],[56,37],[0,11],[-9,70],[19,27],[4,38],[38,38],[-42,102]],[[1750,895],[-85,-27],[-32,-37],[-29,54],[-56,16],[-5,43],[-32,16],[-33,-16],[-43,16]],[[1435,960],[-23,22],[-19,-11],[-28,16],[-66,5],[19,44],[0,54],[14,26],[19,125]],[[230,1262],[-24,-5],[-23,-16],[-19,-11],[-56,-65],[-14,0],[-24,27],[-37,-11],[-19,-21],[-14,5]],[[1351,1241],[-84,0],[-47,59],[-71,-6],[-42,114],[5,64],[-5,11],[-9,43],[-33,22],[-24,-38],[-23,6],[-23,108],[-5,37],[0,33],[-14,32],[-28,5],[-29,38],[-42,-43],[-70,54],[-28,-5],[-10,-22]],[[582,2055],[-66,-49],[-47,-5],[-61,-70],[-103,-11],[19,-70],[51,-32],[10,-38],[28,-32],[9,-54],[-37,-44],[4,-26],[5,-38],[-37,-65],[-61,11],[-29,-49],[-23,-48],[-33,11],[-28,-33],[-14,-54],[28,-54],[33,-43]],[[769,1753],[-56,48]],[[713,1801],[-42,17],[-14,21],[-19,0],[-9,16],[-19,0],[-10,6],[5,16],[19,11],[-9,21],[0,11],[51,0],[-5,11],[-4,22],[-10,26],[-23,27],[-19,22],[-23,27]]],transform:{scale:[.0007994261320208862,.0004913384355349169],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[539,0],[-17,52],[0,13],[30,27],[13,48],[41,74],[13,47],[-8,38]],[[611,299],[-41,-16],[-69,37]],[[501,320],[-41,13],[12,81]],[[80,421],[-31,-12],[-49,-20]],[[472,414],[-71,24],[-18,66],[-28,7],[-21,72],[-18,0],[-47,2]],[[203,686],[-54,-32],[-29,-22],[21,-63],[-12,-47],[-60,-57],[11,-44]],[[269,585],[-20,16]],[[249,601],[-25,53],[-21,32]]],transform:{scale:[.002290098349828638,.0014718665962452685],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[337,0],[-12,36],[51,84],[6,62]],[[382,182],[-69,13]],[[313,195],[-17,20],[-1,37]],[[50,256],[-17,-10],[-8,-8],[-11,3],[-14,-5]],[[295,252],[-40,13],[-46,82],[-41,9]],[[127,417],[-54,-30],[15,-51],[-44,-53],[6,-27]],[[168,356],[-12,10]],[[156,366],[-29,51]]],transform:{scale:[.0036618323062750017,.0024213440887871805],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[220,0],[29,116]],[[249,116],[-45,8]],[[204,124],[-12,37]],[[192,161],[-83,66]],[[109,227],[-8,6]],[[33,163],[-33,-12]],[[83,266],[-50,-103]],[[101,233],[-18,33]]],transform:{scale:[.005617750767056427,.003795866485053587],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}}}}};function jf(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(r);++i<r;)a[i]=t+i*n;return a}function Bf(t,e,n){var i=jf(t,e-wa,n).concat(e);return function(t){return i.map((function(e){return[t,e]}))}}function qf(t,e,n){var i=jf(t,e-wa,n).concat(e);return function(t){return i.map((function(e){return[e,t]}))}}function Uf(){var t,e,n,i,r,a,o,s,l,c,u,h,f=10,p=f,d=90,g=360,_=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return jf(Oa(i/d)*d,n,d).map(u).concat(jf(Oa(s/g)*g,o,g).map(h)).concat(jf(Oa(e/f)*f,t,f).filter((function(t){return Pa(t%d)>wa})).map(l)).concat(jf(Oa(a/p)*p,r,p).filter((function(t){return Pa(t%g)>wa})).map(c))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(i).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],i>n&&(t=i,i=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(_)):[[i,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],r=+n[1][1],e>t&&(n=e,e=t,t=n),a>r&&(n=a,a=r,r=n),m.precision(_)):[[e,a],[t,r]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],m):[d,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],p=+t[1],m):[f,p]},m.precision=function(f){return arguments.length?(_=+f,l=Bf(a,r,90),c=qf(e,t,_),u=Bf(s,o,90),h=qf(i,n,_),m):_},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Wf(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function Hf(t,e){let n;return(i,r)=>(()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=Wf(i),n.then((t=>{t.onclose=()=>n=void 0}),(()=>{})),n})().then((t=>r(t.transaction(e,i).objectStore(e))))}let Vf;function $f(){return Vf||(Vf=Hf("keyval-store","keyval")),Vf}function Yf(t,e=$f()){return e("readonly",(e=>Wf(e.get(t))))}function Jf(t,e,n=$f()){return n("readwrite",(n=>(n.put(e,t),Wf(n.transaction))))}var Xf=function(t,e){var n={};return n.defaultGeoData=void 0,n.allNUTSGeoData=void 0,n.geoJSONs={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0},n.userGeometries=void 0,n.statisticalRegions=void 0,n.centroidsData=void 0,n.centroidsFeatures=void 0,n._allCentroidsFeatures=void 0,n.getRegionFeatures=function(){return"WORLD"==t.geo_?n.geoJSONs.worldrg:"mixed"===t.nutsLevel_?[n.geoJSONs.mixed.rg0,n.geoJSONs.mixed.rg1,n.geoJSONs.mixed.rg2,n.geoJSONs.mixed.rg3]:n.geoJSONs.nutsrg.concat(n.geoJSONs.cntrg)},n.getDefaultGeoData=function(t,i,r){var a=n.getDefaultGeoDataPromise();return Promise.all(a).then((function(a){return i&&(a=i(a)),n.allNUTSGeoData=a,n.defaultGeoData=a[0],e&&(n.centroidsData="mixed"===r?[a[4],a[5],a[6],a[7]]:a[1]),"WORLD"===t?(n.geoJSONs.worldrg=zf(n.defaultGeoData,n.defaultGeoData.objects.CNTR_RG_20M_2020_4326).features,n.geoJSONs.worldbn=zf(n.defaultGeoData,n.defaultGeoData.objects.CNTR_BN_20M_2020_4326).features,n.geoJSONs.kosovo=zf(n.defaultGeoData,n.defaultGeoData.objects.NUTS_BN_20M_2021_RS_XK_border).features,n.geoJSONs.graticule=[Uf().step([30,30])()]):(n.geoJSONs.graticule=zf(n.defaultGeoData,n.defaultGeoData.objects.gra).features,n.geoJSONs.nutsrg=zf(n.defaultGeoData,n.defaultGeoData.objects.nutsrg).features,n.geoJSONs.nutsbn=zf(n.defaultGeoData,n.defaultGeoData.objects.nutsbn).features,n.geoJSONs.cntrg=zf(n.defaultGeoData,n.defaultGeoData.objects.cntrg).features,n.geoJSONs.cntbn=zf(n.defaultGeoData,n.defaultGeoData.objects.cntbn).features),a})).catch((function(t){return Promise.reject(t)}))},n.getDefaultGeoDataPromise=function(){var n=[0,1,2,3],i=[],r=function(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s="".concat(t,"/").concat(e);return n&&"EUR"!==n&&"WORLD"!==n&&(s+="/".concat(n)),s+="/".concat("WORLD"==n?"4326":i),!o&&r&&(s+="/".concat(r)),s+="/".concat(o?"nutspt_":"").concat(a,".json")},a=function(){var t=Nf(Ff().mark((function t(e){var n,i,r,a,o;return Ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="geojson-cache:".concat(e),t.prev=1,t.next=4,Yf(n);case 4:if(!(i=t.sent)){t.next=10;break}if(r=i.timestamp,a=i.data,!(Date.now()-r<864e5)){t.next=10;break}return t.abrupt("return",a);case 10:t.next=16;break;case 12:throw t.prev=12,t.t0=t.catch(1),console.warn("Error reading from IndexedDB cache for ".concat(e,":"),t.t0),t.t0;case 16:return t.next=18,Gf(e);case 18:return o=t.sent,t.prev=19,t.next=22,Jf(n,{timestamp:Date.now(),data:o});case 22:t.next=28;break;case 24:throw t.prev=24,t.t1=t.catch(19),console.warn("Could not cache data in IndexedDB for ".concat(e,":"),t.t1),t.t1;case 28:return t.abrupt("return",o);case 29:case"end":return t.stop()}}),t,null,[[1,12],[19,24]])})));return function(e){return t.apply(this,arguments)}}();if(!t||!t.nuts2jsonBaseURL_)throw new Error("Missing required map context or configuration");if("mixed"===t.nutsLevel_&&"WORLD"!==t.geo_)n.forEach((function(e){var n=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e);i.push(a(n))})),e&&n.forEach((function(e){var n=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e,!0);i.push(a(n))}));else if("WORLD"===t.geo_){var o=window.location.hostname.includes("ec.europa.eu")?"https://ec.europa.eu/assets/estat/E/E4/gisco/IMAGE/WORLD_4326.json":"https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json";i.push(a(o))}else{var s=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_);if(i.push(a(s)),e){var l=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_,!0);i.push(a(l))}}return i},n.isGeoReady=function(){if(!n.defaultGeoData&&!n.userGeometries)return!1;var e=!0;return ha(t.insetTemplates_,null,(function(t){t.Geometries.isGeoReady()||(e=!1)})),e},n.setUserGeometries=function(t){var e=this;this.userGeometries=t,t.forEach((function(t){t.statisticalRegions&&(e.statisticalRegions=t)}))},n.addDefaultGeometriesToMap=function(t,e,i,r,a,o,s,l){this.geoJSONs.graticule&&e&&t.append("g").attr("id","em-graticule").attr("class","em-graticule").selectAll("path").data(this.geoJSONs.graticule).enter().append("path").attr("d",i),this.geoJSONs.cntrg&&t.append("g").attr("id","em-cntrg").attr("class","em-cntrg").selectAll("path").data(this.geoJSONs.cntrg).enter().append("path").attr("d",i).attr("id",(function(t){var e=t.properties.id;if("RS"==e||"EL"==e)return"em-cntrg-"+e})),this.geoJSONs.worldrg&&t.append("g").attr("id","em-worldrg").attr("class","em-worldrg").selectAll("path").data(this.geoJSONs.worldrg).enter().append("path").attr("d",i),this.geoJSONs.nutsrg&&("mixed"==r?(this.geoJSONs.mixed.rg0=this.geoJSONs.nutsrg,this.geoJSONs.mixed.rg1=zf(n.allNUTSGeoData[1],n.allNUTSGeoData[1].objects.nutsrg).features,this.geoJSONs.mixed.rg2=zf(n.allNUTSGeoData[2],n.allNUTSGeoData[2].objects.nutsrg).features,this.geoJSONs.mixed.rg3=zf(n.allNUTSGeoData[3],n.allNUTSGeoData[3].objects.nutsrg).features,[this.geoJSONs.mixed.rg0,this.geoJSONs.mixed.rg1,this.geoJSONs.mixed.rg2,this.geoJSONs.mixed.rg3].forEach((function(e,n){t.append("g").attr("id","em-nutsrg").attr("class","em-nutsrg em-nutsrg-".concat(n)).selectAll("path").data(e).enter().append("path").attr("d",i).attr("lvl",n)})),"EUR"!=o||"3035"!=s&&"4326"!=s||function(t,e,n,i,r){var a=Rf[r]?Rf[r][n][i]:Rf[2024][n][i],o=zf(a,"nutsbn_1").features;t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn em-bn-cc").selectAll("path").data(o).enter().append("path").attr("d",e)}(t,i,s,l,a)):t.append("g").attr("id","em-nutsrg").attr("class","em-nutsrg").selectAll("path").data(this.geoJSONs.nutsrg).enter().append("path").attr("d",i)),this.geoJSONs.cntbn&&t.append("g").attr("id","em-cntbn").attr("class","em-cntbn").selectAll("path").data(this.geoJSONs.cntbn).enter().append("path").filter((function(t){return"T"==t.properties.eu||"T"==t.properties.efta||"T"==t.properties.cc||"T"==t.properties.oth||"T"==t.properties.co?t:void 0})).attr("d",i).attr("id",(function(t){return"em-bn-"+t.properties.id})).attr("class",(function(t){var e=[];return"T"===t.properties.eu&&e.push("em-bn-eu"),"T"===t.properties.efta&&e.push("em-bn-efta"),"T"===t.properties.cc&&e.push("em-bn-cc"),"T"===t.properties.oth&&e.push("em-bn-oth"),"T"===t.properties.co&&e.push("em-bn-co"),e.join(" ")})),this.geoJSONs.nutsbn&&"mixed"!==r&&(this.geoJSONs.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),t.append("g").attr("id","em-nutsbn").attr("class","em-nutsbn").selectAll("path").data(this.geoJSONs.nutsbn).enter().filter((function(t){return"T"==t.properties.eu||"T"==t.properties.efta||"T"==t.properties.cc||"T"==t.properties.oth||"T"==t.properties.co?t:void 0})).append("path").attr("d",i).attr("class",(function(t){var e=t.properties;return e.id>1e5?"em-kosovo-bn":"T"===e.co?"em-bn-co":["em-bn-"+e.lvl].join(" ")}))),this.geoJSONs.worldbn&&t.append("g").attr("id","em-worldbn").attr("class","em-worldbn").selectAll("path").data(this.geoJSONs.worldbn).enter().append("path").attr("d",i).attr("class",(function(t){return t.properties.POL_STAT>0?"em-bn-d":"T"===t.properties.COAS_FLAG?"em-bn-co":"em-worldbn"})),this.geoJSONs.kosovo&&t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn").selectAll("path").data(this.geoJSONs.kosovo).enter().append("path").attr("d",i)},n.addUserGeometriesToMap=function(t,e,n){t.forEach((function(t){var i=e.append("g").attr("id",t.statisticalRegions?"em-user-regions":"").attr("class",t.class?t.class:"").selectAll("path").data(t.features).enter().append("path").attr("d",n);"function"==typeof t.onEach&&t.onEach(i)}))},n},Kf=function(t,e,n){var i=pv(t,n);for(var r in(t=t||{}).proj=t.proj||Qf[t.geo],t.scale=t.scale||e.insetScale_,t.footnote=t.footnote||"",t.showSourceLink=t.showSourceLink||!1,t.zoomExtent=t.zoomExtent||e.insetZoomExtent_,t.width=t.width||e.insetBoxWidth_,t.height=t.height||e.insetBoxWidth_,t.insets=t.insets||[],t.insetTemplates=t.insetTemplates||{},t.callback=t.callback||void 0,["nutsLevel_","nutsYear_","hoverColor_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","lg_","projectionFunction_","filterGeometriesFunction_","processCentroids_"].forEach((function(t){i[t]=e[t]})),["stat","statData","legend","legendObj","noDataText","language","transitionDuration","tooltip_","classToText_"].forEach((function(t){i[t]=e[t]})),t)i[r+"_"]=t[r];return i.isInset=!0,i},Zf=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],i=0;i<n.length;i++)n[i].drawGraticule=!1;return n},Qf={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"},tp=function(t,e){if(e.svg_&&(e.svg_.select("#em-stamp").remove(),t)){var n=e.svg_.append("g").attr("id","em-stamp");t.size||(t.size=60),t.x||(t.x=230),t.y||(t.y=100),t.textColor||(t.textColor="#000"),t.stampColor||(t.stampColor="#000"),t.strokeWidth||(t.strokeWidth=1),t.lineHeight||(t.lineHeight=15),n.append("circle").attr("r",t.size).attr("cx",t.x).attr("cy",t.y).attr("id","em-stamp-circle").attr("fill","none").attr("stroke",t.stampColor).attr("stroke-width",t.strokeWidth);var i=t.text,r=Math.sqrt(np(i.trim())*t.lineHeight),a=rp(ep(i.trim()),r),o=ip(a,t.lineHeight);n.append("text").attr("text-anchor","middle").attr("fill",t.textColor).attr("id","em-stamp-text").attr("transform","translate(".concat(t.x,",").concat(t.y,") scale(").concat(t.size/o,")")).selectAll("tspan").data(a).enter().append("tspan").attr("x",0).attr("y",(function(e,n){return(n-a.length/2+.8)*t.lineHeight})).text((function(t){return t.text.replaceAll("~"," ").replaceAll("¶","")}))}},ep=function(t){return t.split(/(?<=¶)|\s+/g).map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},np=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","text");n.textContent=t,e.appendChild(n),document.body.appendChild(e);var i=n.getComputedTextLength();return document.body.removeChild(e),i+10},ip=function(t,e){for(var n=0,i=0,r=t.length;i<r;++i){var a=(Math.abs(i-r/2+.5)+.5)*e,o=t[i].width/2;n=Math.max(n,Math.sqrt(Math.pow(o,2)+Math.pow(a,2)))}return n},rp=function(t,e){for(var n=[],i={width:0,text:""},r=0,a=t.length;r<a;++r)if("¶"!==t[r]){var o=(i.text?i.text+" ":"")+t[r],s=np(o);(i.width+s)/2<e?(i.width=s,i.text=o):(n.push(i),i={width:np(t[r]),text:t[r]})}else i.text&&n.push(i),i={width:0,text:""};return i.text&&n.push(i),n},ap={},op={};function sp(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function lp(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var i in t)i in e||n.push(e[i]=i)})),n}function cp(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function up(t){var e,n=t.getUTCHours(),i=t.getUTCMinutes(),r=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+cp(-e,6):e>9999?"+"+cp(e,6):cp(e,4))+"-"+cp(t.getUTCMonth()+1,2)+"-"+cp(t.getUTCDate(),2)+(a?"T"+cp(n,2)+":"+cp(i,2)+":"+cp(r,2)+"."+cp(a,3)+"Z":r?"T"+cp(n,2)+":"+cp(i,2)+":"+cp(r,2)+"Z":i||n?"T"+cp(n,2)+":"+cp(i,2)+"Z":"")}function hp(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],a=t.length,o=0,s=0,l=a<=0,c=!1;function u(){if(l)return op;if(c)return c=!1,ap;var e,i,r=o;if(34===t.charCodeAt(r)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?l=!0:10===(i=t.charCodeAt(o++))?c=!0:13===i&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(i=t.charCodeAt(e=o++)))c=!0;else if(13===i)c=!0,10===t.charCodeAt(o)&&++o;else if(i!==n)continue;return t.slice(r,e)}return l=!0,t.slice(r,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(i=u())!==op;){for(var h=[];i!==ap&&i!==op;)h.push(i),i=u();e&&null==(h=e(h,s++))||r.push(h)}return r}function r(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?up(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,a=i(t,(function(t,i){if(n)return n(t,i-1);r=t,n=e?function(t,e){var n=sp(t);return function(i,r){return e(n(i),r,t)}}(t,e):sp(t)}));return a.columns=r||[],a},parseRows:i,format:function(e,n){return null==n&&(n=lp(e)),[n.map(o).join(t)].concat(r(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=lp(t)),r(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var fp=hp(","),pp=fp.parse,dp=fp.parseRows,gp=(fp.format,fp.formatBody,fp.formatRows,fp.formatRow,fp.formatValue,function(t){return t.gridCartogramPositions_||("hexagon"===t.gridCartogramShape_?"\n ,IS, , , , , , , , , , ,\n , , , ,NO,SE,FI,EE, , , , ,\n , , , , , , ,LV, , , , ,\n ,IE,UK, , ,DK, ,LT, , , , ,\n , , , ,NL,DE,PL, , , , , ,\n , , ,BE,LU,CZ,SK,UA, , , , ,\n , ,FR,CH,LI,AT,HU,RO,MD, , , ,\n ,PT,ES, ,IT,SI,HR,RS,BG, , , ,\n , , , , , ,BA,ME,MK, , , , \n , , , , , , ,AL,EL,TR,GE, , \n , , , ,MT, , , , ,CY, , , ":"\n ,IS, , ,NO,SE,FI, , , , , ,\n , , , , , , ,EE, , , , ,\n , , , , , , ,LV, , , , ,\n ,IE,UK, , ,DK, ,LT, , , , ,\n , , , ,NL,DE,PL, , , , , ,\n , , ,BE,LU,CZ,SK,UA, , , , ,\n , ,FR,CH,LI,AT,HU,RO,MD, , , ,\n ,PT,ES, ,IT,SI,HR,RS,BG, , , ,\n , , , , , ,BA,ME,MK, , , , \n , , , , , , ,AL,EL,TR,GE, , \n , , , ,MT, , , , ,CY, , , ")}),_p=function(t){var e=new Map;return dp(t.trim(),(function(t,n){t.forEach((function(t,i){(t=t.trim())&&e.set(t,[i,n])}))})),e},mp=function(t,e){return Array.from(t,(function(t){var n=y(t,2),i=n[0],r=y(n[1],2),a=r[0],o=r[1],s=e.Geometries.geoJSONs.nutsrg.find((function(t){return t.properties.id==i}));return{id:i,col:a,row:o,properties:{id:i,name:s?s.properties.na:""}}}))},vp=function(t,e,n){var i=Math.max.apply(Math,x(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,x(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,o=n.gridCartogramCellPadding_||0,s=(n.width_-a.left-a.right)/i-o,l=(n.height_-a.top-a.bottom)/r-o,c=Math.min(s,l);t.selectAll(".em-grid-cell").data(e).enter().append("g").attr("class","em-grid-cell").attr("transform",(function(t){return"translate(".concat(t.col*(c+o)+a.left,", ").concat(t.row*(c+o)+a.top,")")})).each((function(t){Ot(this).append("rect").attr("width",c).attr("height",c).attr("class","em-grid-rect"),Ot(this).append("text").attr("class","em-grid-text").attr("text-anchor","middle").attr("font-size",15).style("pointer-events","none").attr("fill","black").text(t.id).attr("x",c/2).attr("y",c/2+5)}))},yp=function(t,e,n){var i=Math.max.apply(Math,x(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,x(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,o=n.gridCartogramCellPadding_||0,s=Math.min((n.width_-a.left-a.right)/(1.5*i),(n.height_-a.top-a.bottom)/(r*Math.sqrt(3))),l=Math.sqrt(3)*s;t.selectAll(".em-grid-cell").data(e).enter().append("g").attr("class","em-grid-cell").attr("transform",(function(t){var e=t.col*(1.5*s+o)+a.left,n=t.row*(l+o)+(t.col%2==1?(l+o)/2:0)+a.top;return"translate(".concat(e,", ").concat(n,")")})).each((function(t){Ot(this).append("path").attr("d",xp(s)).attr("class","em-grid-hexagon"),Ot(this).append("text").attr("class","em-grid-text").attr("text-anchor","middle").attr("font-size",15).style("pointer-events","none").attr("fill","black").text(t.id).attr("y",5)}))},xp=function(t){var e=Math.PI/3;return Array.from({length:6},(function(n,i){var r=t*Math.cos(e*i),a=t*Math.sin(e*i);return"".concat(0===i?"M":"L").concat(r,",").concat(a)})).join(" ")+" Z"},bp=function(t,e,n,i){t.each((function(){var r=this.getBBox(),a=(e-i.left-i.right-r.width)/2-r.x+i.left,o=(n-i.top-i.bottom-r.height)/2-r.y+i.top;t.attr("transform","translate(".concat(a,", ").concat(o,")"))}))};function wp(t){return[La(t[1],t[0]),Ra(t[2])]}function Sp(t){var e=t[0],n=t[1],i=Fa(n);return[i*Fa(e),i*Da(e),Da(n)]}function Mp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ep(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 Cp(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ap(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function kp(t){var e=Ia(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Tp(t){return Pa(t[0])<=Ma?t[0]:za(t[0])*((Pa(t[0])+Ma)%Aa-Ma)}function Pp(t,e,n,i){return function(r){var a,o,s,l=e(r),c=wo(),u=e(c),h=!1,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=y,o=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,o=Ao(o);var t=function(t,e){var n=Tp(e),i=e[1],r=Da(i),a=[Da(n),-Fa(n),0],o=0,s=0,l=new ba;1===r?i=Ea+wa:-1===r&&(i=-Ea-wa);for(var c=0,u=t.length;c<u;++c)if(f=(h=t[c]).length)for(var h,f,p=h[f-1],d=Tp(p),g=p[1]/2+Ca,_=Da(g),m=Fa(g),v=0;v<f;++v,d=x,_=w,m=S,p=y){var y=h[v],x=Tp(y),b=y[1]/2+Ca,w=Da(b),S=Fa(b),M=x-d,E=M>=0?1:-1,C=E*M,A=C>Ma,k=_*w;if(l.add(La(k*E*Da(C),m*S+k*Fa(C))),o+=A?M+E*Aa:M,A^d>=n^x>=n){var T=Ep(Sp(p),Sp(y));kp(T);var P=Ep(a,T);kp(P);var N=(A^M>=0?-1:1)*Ra(P[2]);(i>N||i===N&&(T[0]||T[1]))&&(s+=A^M>=0?1:-1)}}return(o<-1e-6||o<wa&&l<-1e-12)^1&s}(a,i);o.length?(h||(r.polygonStart(),h=!0),Eo(o,Lp,t,n,r)):t&&(h||(r.polygonStart(),h=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),h&&(r.polygonEnd(),h=!1),o=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function p(e,n){t(e,n)&&r.point(e,n)}function d(t,e){l.point(t,e)}function g(){f.point=d,l.lineStart()}function _(){f.point=p,l.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function y(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,i,l=u.clean(),f=c.result(),p=f.length;if(s.pop(),a.push(s),s=null,p)if(1&l){if((e=(n=f[0]).length-1)>0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else p>1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(Np))}return f}}function Np(t){return t.length>1}function Lp(t,e){return((t=t.x)[0]<0?t[1]-Ea-wa:Ea-t[1])-((e=e.x)[0]<0?e[1]-Ea-wa:Ea-e[1])}const Fp=Pp((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Ma:-Ma,l=Pa(a-n);Pa(l-Ma)<wa?(t.point(n,i=(i+o)/2>0?Ea:-Ea),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(a,i),e=0):r!==s&&l>=Ma&&(Pa(n-r)<wa&&(n-=r*wa),Pa(a-s)<wa&&(a-=s*wa),i=function(t,e,n,i){var r,a,o=Da(t-n);return Pa(o)>wa?Na((Da(e)*(a=Fa(i))*Da(n)-Da(i)*(r=Fa(e))*Da(t))/(r*a*o)):(e+i)/2}(n,i,a,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=a,i=o),r=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*Ea,i.point(-Ma,r),i.point(0,r),i.point(Ma,r),i.point(Ma,0),i.point(Ma,-r),i.point(0,-r),i.point(-Ma,-r),i.point(-Ma,0),i.point(-Ma,r);else if(Pa(t[0]-e[0])>wa){var a=t[0]<e[0]?Ma:-Ma;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}),[-Ma,-Ea]);function Op(t,e,n,i,r,a){if(n){var o=Fa(e),s=Da(e),l=i*n;null==r?(r=e+i*Aa,a=e-l/2):(r=Gp(o,r),a=Gp(o,a),(i>0?r<a:r>a)&&(r+=i*Aa));for(var c,u=r;i>0?u>a:u<a;u-=l)c=wp([o,-s*Fa(u),-s*Da(u)]),t.point(c[0],c[1])}}function Gp(t,e){(e=Sp(e))[0]-=t,kp(e);var n=function(t){return t>1?0:t<-1?Ma:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+Aa-wa)%Aa}function Dp(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function zp(t,e){return Pa(t)>Ma&&(t-=Math.round(t/Aa)*Aa),[t,e]}function Ip(t,e,n){return(t%=Aa)?e||n?Dp(jp(t),Bp(e,n)):jp(t):e||n?Bp(e,n):zp}function Rp(t){return function(e,n){return Pa(e+=t)>Ma&&(e-=Math.round(e/Aa)*Aa),[e,n]}}function jp(t){var e=Rp(t);return e.invert=Rp(-t),e}function Bp(t,e){var n=Fa(t),i=Da(t),r=Fa(e),a=Da(e);function o(t,e){var o=Fa(e),s=Fa(t)*o,l=Da(t)*o,c=Da(e),u=c*n+s*i;return[La(l*r-u*a,s*n-c*i),Ra(u*r+l*a)]}return o.invert=function(t,e){var o=Fa(e),s=Fa(t)*o,l=Da(t)*o,c=Da(e),u=c*r-l*a;return[La(l*r+c*a,s*n+u*i),Ra(u*n-s*i)]},o}zp.invert=zp;var qp=Fa(30*Ta);function Up(t,e){return+e?function(t,e){function n(i,r,a,o,s,l,c,u,h,f,p,d,g,_){var m=c-i,v=u-r,y=m*m+v*v;if(y>4*e&&g--){var x=o+f,b=s+p,w=l+d,S=Ia(x*x+b*b+w*w),M=Ra(w/=S),E=Pa(Pa(w)-1)<wa||Pa(a-h)<wa?(a+h)/2:La(b,x),C=t(E,M),A=C[0],k=C[1],T=A-i,P=k-r,N=v*T-m*P;(N*N/y>e||Pa((m*T+v*P)/y-.5)>.3||o*f+s*p+l*d<qp)&&(n(i,r,a,o,s,l,A,k,E,x/=S,b/=S,w,g,_),_.point(A,k),n(A,k,E,x,b,w,c,u,h,f,p,d,g,_))}}return function(e){var i,r,a,o,s,l,c,u,h,f,p,d,g={point:_,lineStart:m,lineEnd:y,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function _(n,i){n=t(n,i),e.point(n[0],n[1])}function m(){u=NaN,g.point=v,e.lineStart()}function v(i,r){var a=Sp([i,r]),o=t(i,r);n(u,h,c,f,p,d,u=o[0],h=o[1],c=i,f=a[0],p=a[1],d=a[2],16,e),e.point(u,h)}function y(){g.point=_,e.lineEnd()}function x(){m(),g.point=b,g.lineEnd=w}function b(t,e){v(i=t,e),r=u,a=h,o=f,s=p,l=d,g.point=v}function w(){n(u,h,c,f,p,d,r,a,i,o,s,l,16,e),g.lineEnd=y,y()}return g}}(t,e):function(t){return Lo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Wp,Hp=Lo({point:function(t,e){this.stream.point(t*Ta,e*Ta)}});function Vp(t,e,n,i,r,a){if(!a)return function(t,e,n,i,r){function a(a,o){return[e+t*(a*=i),n-t*(o*=r)]}return a.invert=function(a,o){return[(a-e)/t*i,(n-o)/t*r]},a}(t,e,n,i,r);var o=Fa(a),s=Da(a),l=o*t,c=s*t,u=o/t,h=s/t,f=(s*n-o*e)/t,p=(s*e+o*n)/t;function d(t,a){return[l*(t*=i)-c*(a*=r)+e,n-c*t-l*a]}return d.invert=function(t,e){return[i*(u*t-h*e+f),r*(p-h*t-u*e)]},d}function $p(t){return function(t){var e,n,i,r,a,o,s,l,c,u,h=150,f=480,p=250,d=0,g=0,_=0,m=0,v=0,y=0,x=1,b=1,w=null,S=Fp,M=null,E=No,C=.5;function A(t){return l(t[0]*Ta,t[1]*Ta)}function k(t){return(t=l.invert(t[0],t[1]))&&[t[0]*ka,t[1]*ka]}function T(){var t=Vp(h,0,0,x,b,y).apply(null,e(d,g)),i=Vp(h,f-t[0],p-t[1],x,b,y);return n=Ip(_,m,v),s=Dp(e,i),l=Dp(n,s),o=Up(s,C),P()}function P(){return c=u=null,A}return A.stream=function(t){return c&&u===t?c:c=Hp(function(t){return Lo({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(S(o(E(u=t)))))},A.preclip=function(t){return arguments.length?(S=t,w=void 0,P()):S},A.postclip=function(t){return arguments.length?(E=t,M=i=r=a=null,P()):E},A.clipAngle=function(t){return arguments.length?(S=+t?function(t){var e=Fa(t),n=2*Ta,i=e>0,r=Pa(e)>wa;function a(t,n){return Fa(t)*Fa(n)>e}function o(t,n,i){var r=[1,0,0],a=Ep(Sp(t),Sp(n)),o=Mp(a,a),s=a[0],l=o-s*s;if(!l)return!i&&t;var c=e*o/l,u=-e*s/l,h=Ep(r,a),f=Ap(r,c);Cp(f,Ap(a,u));var p=h,d=Mp(f,p),g=Mp(p,p),_=d*d-g*(Mp(f,f)-1);if(!(_<0)){var m=Ia(_),v=Ap(p,(-d-m)/g);if(Cp(v,f),v=wp(v),!i)return v;var y,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(y=x,x=b,b=y);var M=b-x,E=Pa(M-Ma)<wa;if(!E&&S<w&&(y=w,w=S,S=y),E||M<wa?E?w+S>0^v[1]<(Pa(v[0]-x)<wa?w:S):w<=v[1]&&v[1]<=S:M>Ma^(x<=v[0]&&v[0]<=b)){var C=Ap(p,(-d+m)/g);return Cp(C,f),[v,wp(C)]}}}function s(e,n){var r=i?t:Ma-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return Pp(a,(function(t){var e,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var p,d=[h,f],g=a(h,f),_=i?g?0:s(h,f):g?s(h+(h<0?Ma:-Ma),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=o(e,d))||So(e,p)||So(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=o(d,e),t.point(p[0],p[1])):(p=o(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(r&&e&&i^g){var m;_&n||!(m=o(d,e,!0))||(u=0,i?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&So(e,d)||t.point(d[0],d[1]),e=d,l=g,n=_},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),(function(e,i,r,a){Op(a,t,n,r,e,i)}),i?[0,-t]:[-Ma,t-Ma])}(w=t*Ta):(w=null,Fp),P()):w*ka},A.clipExtent=function(t){return arguments.length?(E=null==t?(M=i=r=a=null,No):Po(M=+t[0][0],i=+t[0][1],r=+t[1][0],a=+t[1][1]),P()):null==M?null:[[M,i],[r,a]]},A.scale=function(t){return arguments.length?(h=+t,T()):h},A.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],T()):[f,p]},A.center=function(t){return arguments.length?(d=t[0]%360*Ta,g=t[1]%360*Ta,T()):[d*ka,g*ka]},A.rotate=function(t){return arguments.length?(_=t[0]%360*Ta,m=t[1]%360*Ta,v=t.length>2?t[2]%360*Ta:0,T()):[_*ka,m*ka,v*ka]},A.angle=function(t){return arguments.length?(y=t%360*Ta,T()):y*ka},A.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},A.reflectY=function(t){return arguments.length?(b=t?-1:1,T()):b<0},A.precision=function(t){return arguments.length?(o=Up(s,C=t*t),P()):Ia(C)},A.fitExtent=function(t,e){return Bo(A,t,e)},A.fitSize=function(t,e){return qo(A,t,e)},A.fitWidth=function(t,e){return Uo(A,t,e)},A.fitHeight=function(t,e){return Wo(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&k,T()}}((function(){return t}))()}function Yp(t,e){return[Fa(e)*Da(t),Da(e)]}Yp.invert=(Wp=Ra,function(t,e){var n=Ia(t*t+e*e),i=Wp(n),r=Da(i),a=Fa(i);return[La(t*r,n*a),Ra(n&&e*r/n)]});var Jp=6378137,Xp=.0066943799901413165,Kp=484813681109536e-20,Zp=Math.PI/2,Qp=1e-10,td=.017453292519943295,ed=57.29577951308232,nd=Math.PI/4,id=2*Math.PI,rd=3.14159265359,ad={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const od={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var sd=/[\s_\-\/\(\)]/g;function ld(t,e){if(t[e])return t[e];for(var n,i=Object.keys(t),r=e.toLowerCase().replace(sd,""),a=-1;++a<i.length;)if((n=i[a]).toLowerCase().replace(sd,"")===r)return t[n]}function cd(t){var e,n,i,r={},a=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*td},lat_1:function(t){r.lat1=t*td},lat_2:function(t){r.lat2=t*td},lat_ts:function(t){r.lat_ts=t*td},lon_0:function(t){r.long0=t*td},lon_1:function(t){r.long1=t*td},lon_2:function(t){r.long2=t*td},alpha:function(t){r.alpha=parseFloat(t)*td},gamma:function(t){r.rectified_grid_angle=parseFloat(t)*td},lonc:function(t){r.longc=t*td},x_0:function(t){r.x0=parseFloat(t)},y_0:function(t){r.y0=parseFloat(t)},k_0:function(t){r.k0=parseFloat(t)},k:function(t){r.k0=parseFloat(t)},a:function(t){r.a=parseFloat(t)},b:function(t){r.b=parseFloat(t)},r:function(t){r.a=r.b=parseFloat(t)},r_a:function(){r.R_A=!0},zone:function(t){r.zone=parseInt(t,10)},south:function(){r.utmSouth=!0},towgs84:function(t){r.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){r.to_meter=parseFloat(t)},units:function(t){r.units=t;var e=ld(od,t);e&&(r.to_meter=e.to_meter)},from_greenwich:function(t){r.from_greenwich=t*td},pm:function(t){var e=ld(ad,t);r.from_greenwich=(e||parseFloat(t))*td},nadgrids:function(t){"@null"===t?r.datumCode="none":r.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(r.axis=t)},approx:function(){r.approx=!0}};for(e in a)n=a[e],e in o?"function"==typeof(i=o[e])?i(n):r[i]=n:r[e]=n;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r}const ud=class{static getId(t){const e=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,r=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:e,name:n,conversion_factor:i,id:r?{authority:r[1],code:parseInt(r[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const t=i[1].toUpperCase();if("E"===t)n="east";else if("N"===t)n="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);n="up"}}else n=t[2]?t[2].toLowerCase():"unknown";const r=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),a=r?parseInt(r[1],10):null,o=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:e,direction:n,unit:this.convertUnit(o),order:a}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,e)=>(t.order||0)-(e.order||0)))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,e.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const n=t.find((t=>Array.isArray(t)&&"CS"===t[0]));n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(i){const t=this.convertUnit(i);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const r=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(r){const n=this.convert(r);"ENSEMBLE"===r[0]?e.datum_ensemble=n:e.datum=n;const i=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));i&&"Greenwich"!==i[1]&&(n.prime_meridian={name:i[1],longitude:parseFloat(i[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const a=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));a&&(e.accuracy=parseFloat(a[1]));const o=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]);t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,e.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const s=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(s){const t=s.find((t=>Array.isArray(t)));e.source_crs=t?this.convert(t):null}const l=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(l){const t=l.find((t=>Array.isArray(t)));e.target_crs=t?this.convert(t):null}const c=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));e.transformation=c?this.convert(c):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,e.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=u)})),u.conversion_factor&&1!==u.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:u});break;default:e.keyword=t[0]}return e}};const hd=class extends ud{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}};const fd=class extends ud{static convert(t,e={}){super.convert(t,e);const n=t.find((t=>Array.isArray(t)&&"CS"===t[0]));n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));if(i){const t=i.find((t=>Array.isArray(t)&&"SCOPE"===t[0])),n=i.find((t=>Array.isArray(t)&&"AREA"===t[0])),r=i.find((t=>Array.isArray(t)&&"BBOX"===t[0]));e.usage={},t&&(e.usage.scope=t[1]),n&&(e.usage.area=n[1]),r&&(e.usage.bbox=r.slice(1))}return e}};function pd(t){const e=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0]))||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===e?fd:hd).convert(t)}const dd=function(t){var e=new bd(t);return e.output()};var gd=1,_d=/\s/,md=/[A-Za-z]/,vd=/[A-Za-z84_]/,yd=/[,\]]/,xd=/[\d\.E\-\+]/;function bd(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=gd}function wd(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var i=e?{}:t,r=n.reduce((function(t,e){return Sd(e,t),t}),i);e&&(t[e]=r)}function Sd(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void Sd(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var i;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&Sd(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&Sd(t[3],e[n]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void wd(e,n,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],wd(e,n,t),void(e[n].type=n);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return Sd(t,e[n]);return wd(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}bd.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;_d.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case gd:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},bd.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(yd.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},bd.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=gd)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=gd,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},bd.prototype.number=function(t){if(!xd.test(t)){if(yd.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},bd.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},bd.prototype.keyword=function(t){if(vd.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=gd)}if(!yd.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},bd.prototype.neutral=function(t){if(md.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(xd.test(t))return this.word=t,void(this.state=3);if(!yd.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},bd.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Md(t){return.017453292519943295*t}function Ed(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==e&&"lambert azimuthal equal area"!==e||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=Md(t.lat0>0?90:-90),delete t.lat1):(t.lat0=Md(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function Cd(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function Ad(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function kd(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=Ad(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-Ad(t.ellipsoid.semi_minor_axis))))}function Td(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(Td(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map((t=>t.value))),e):(Object.keys(t).forEach((n=>{const i=t[n];if(null!==i)switch(n){case"name":if(e.srsCode)break;e.name=i,e.srsCode=i;break;case"type":"GeographicCRS"===i?e.projName="longlat":"ProjectedCRS"===i&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(e.ellps=i.ellipsoid.name,kd(i,e)),i.prime_meridian&&(e.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=i.name,kd(i,e);break;case"prime_meridian":e.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis)if(e.axis=i.axis.map((t=>{const e=t.direction;if("east"===e)return"e";if("north"===e)return"n";if("west"===e)return"w";if("south"===e)return"s";throw new Error(`Unknown axis direction: ${e}`)})).join("")+"u",i.unit){const{units:t,to_meter:n}=Cd(i.unit);e.units=t,e.to_meter=n}else if(i.axis[0]&&i.axis[0].unit){const{units:t,to_meter:n}=Cd(i.axis[0].unit);e.units=t,e.to_meter=n}break;case"id":i.authority&&i.code&&(e.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(e.projName=i.method.name),i.parameters&&i.parameters.forEach((t=>{const n=t.name.toLowerCase().replace(/\s+/g,"_"),i=t.value;t.unit&&t.unit.conversion_factor?e[n]=i*t.unit.conversion_factor:"degree"===t.unit?e[n]=i*Math.PI/180:e[n]=i}));break;case"unit":i.name&&(e.units=i.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),i.conversion_factor&&(e.to_meter=i.conversion_factor);break;case"base_crs":Td(i,e),e.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name}})),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),Ed(e),e):t}var Pd=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Nd(t){for(var e=Object.keys(t),n=0,i=e.length;n<i;++n){var r=e[n];-1!==Pd.indexOf(r)&&Ld(t[r]),"object"==typeof t[r]&&Nd(t[r])}}function Ld(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var n="",i=0,r=t.AXIS.length;i<r;++i){var a=[t.AXIS[i][0].toLowerCase(),t.AXIS[i][1].toLowerCase()];-1!==a[0].indexOf("north")||("y"===a[0]||"lat"===a[0])&&"north"===a[1]?n+="n":-1!==a[0].indexOf("south")||("y"===a[0]||"lat"===a[0])&&"south"===a[1]?n+="s":-1!==a[0].indexOf("east")||("x"===a[0]||"lon"===a[0])&&"east"===a[1]?n+="e":-1===a[0].indexOf("west")&&("x"!==a[0]&&"lon"!==a[0]||"west"!==a[1])||(n+="w")}2===n.length&&(n+="u"),3===n.length&&(t.axis=n)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function s(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=Md(t.rectified_grid_angle));[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Md],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Md],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Md],["lat0","latitude_of_origin",Md],["lat0","standard_parallel_1",Md],["lat1","standard_parallel_1",Md],["lat2","standard_parallel_2",Md],["azimuth","Azimuth"],["alpha","azimuth",Md],["srsCode","name"]].forEach((function(e){return function(t,e){var n=e[0],i=e[1];!(n in t)&&i in t&&(t[n]=t[i],3===e.length&&(t[n]=e[2](t[n])))}(t,e)})),Ed(t)}function Fd(t){if("object"==typeof t)return Td(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var n=dd(t);if("WKT2"===e){return Td(pd(n))}var i=n[0],r={};return Sd(n,r),Nd(r),r[i]}function Od(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?Od[t]=cd(arguments[1]):Od[t]=Fd(arguments[1]):Od[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?Od.apply(e,t):Od(t)}));if("string"==typeof t){if(t in Od)return Od[t]}else"EPSG"in t?Od["EPSG:"+t.EPSG]=t:"ESRI"in t?Od["ESRI:"+t.ESRI]=t:"IAU2000"in t?Od["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(Od);const Gd=Od;var Dd=["3857","900913","3785","102113"];const zd=function(t){if(!function(t){return"string"==typeof t}(t))return t.projName?t:Fd(t);if(function(t){return t in Gd}(t))return Gd[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=Fd(t);if(function(t){var e=ld(t,"authority");if(e){var n=ld(e,"epsg");return n&&Dd.indexOf(n)>-1}}(e))return Gd["EPSG:3857"];var n=function(t){var e=ld(t,"extension");if(e)return ld(e,"proj4")}(e);return n?cd(n):e}return function(t){return"+"===t[0]}(t)?cd(t):void 0};function Id(t,e){var n,i;if(t=t||{},!e)return t;for(i in e)void 0!==(n=e[i])&&(t[i]=n);return t}function Rd(t,e,n){var i=t*e;return n/Math.sqrt(1-i*i)}function jd(t){return t<0?-1:1}function Bd(t){return Math.abs(t)<=rd?t:t-jd(t)*id}function qd(t,e,n){var i=t*n,r=.5*t;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(Zp-e))/i}function Ud(t,e){for(var n,i,r=.5*t,a=Zp-2*Math.atan(e),o=0;o<=15;o++)if(n=t*Math.sin(a),a+=i=Zp-2*Math.atan(e*Math.pow((1-n)/(1+n),r))-a,Math.abs(i)<=1e-10)return a;return-9999}const Wd={init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Rd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,n,i=t.x,r=t.y;if(r*ed>90&&r*ed<-90&&i*ed>180&&i*ed<-180)return null;if(Math.abs(Math.abs(r)-Zp)<=Qp)return null;if(this.sphere)e=this.x0+this.a*this.k0*Bd(i-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(nd+.5*r));else{var a=Math.sin(r),o=qd(this.e,r,a);e=this.x0+this.a*this.k0*Bd(i-this.long0),n=this.y0-this.a*this.k0*Math.log(o)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,i=t.x-this.x0,r=t.y-this.y0;if(this.sphere)n=Zp-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(-9999===(n=Ud(this.e,a)))return null}return e=Bd(this.long0+i/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]};function Hd(t){return t}var Vd=[Wd,{init:function(){},forward:Hd,inverse:Hd,names:["longlat","identity"]}],$d={},Yd=[];function Jd(t,e){var n=Yd.length;return t.names?(Yd[n]=t,t.names.forEach((function(t){$d[t.toLowerCase()]=n})),this):(console.log(e),!0)}function Xd(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const Kd={start:function(){Vd.forEach(Jd)},add:Jd,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==$d[e]&&Yd[$d[e]]||(e=Xd(e))in $d&&Yd[$d[e]]?Yd[$d[e]]:void 0}};const Zd={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},Qd=Zd.WGS84;var tg={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var eg in tg){var ng=tg[eg];ng.datumName&&(tg[ng.datumName]=ng)}const ig=tg;const rg=function(t,e,n,i,r,a,o){var s={};return s.datum_type=void 0===t||"none"===t?5:4,e&&(s.datum_params=e.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=1),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=2,s.datum_params[3]*=Kp,s.datum_params[4]*=Kp,s.datum_params[5]*=Kp,s.datum_params[6]=s.datum_params[6]/1e6+1))),o&&(s.datum_type=3,s.grids=o),s.a=n,s.b=i,s.es=r,s.ep2=a,s};var ag={};async function og(t,e){for(var n=[],i=await e.getImageCount(),r=i-1;r>=0;r--){var a=await e.getImage(r),o=await a.readRasters(),s=[a.getWidth(),a.getHeight()],l=a.getBoundingBox().map(lg),c=[a.fileDirectory.ModelPixelScale[0],a.fileDirectory.ModelPixelScale[1]].map(lg),u=l[0]+(s[0]-1)*c[0],h=l[3]-(s[1]-1)*c[1],f=o[0],p=o[1],d=[];for(let t=s[1]-1;t>=0;t--)for(let e=s[0]-1;e>=0;e--){var g=t*s[0]+e;d.push([-cg(p[g]),cg(f[g])])}n.push({del:c,lim:s,ll:[-u,h],cvs:d})}var _={header:{nSubgrids:i},subgrids:n};return ag[t]=_,_}function sg(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:ag[t]||null,isNull:!1}}function lg(t){return t*Math.PI/180}function cg(t){return t/3600*Math.PI/180}function ug(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function hg(t){return t.map((function(t){return[cg(t.longitudeShift),cg(t.latitudeShift)]}))}function fg(t,e,n){return{name:ug(t,e+8,e+16).trim(),parent:ug(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,n),upperLatitude:t.getFloat64(e+88,n),lowerLongitude:t.getFloat64(e+104,n),upperLongitude:t.getFloat64(e+120,n),latitudeInterval:t.getFloat64(e+136,n),longitudeInterval:t.getFloat64(e+152,n),gridNodeCount:t.getInt32(e+168,n)}}function pg(t,e,n,i,r){var a=e+176,o=16;!1===r&&(o=8);for(var s=[],l=0;l<n.gridNodeCount;l++){var c={latitudeShift:t.getFloat32(a+l*o,i),longitudeShift:t.getFloat32(a+l*o+4,i)};!1!==r&&(c.latitudeAccuracy=t.getFloat32(a+l*o+8,i),c.longitudeAccuracy=t.getFloat32(a+l*o+12,i)),s.push(c)}return s}function dg(t,e){if(!(this instanceof dg))return new dg(t);e=e||function(t){if(t)throw t};var n=zd(t);if("object"==typeof n){var i=dg.projections.get(n.projName);if(i){if(n.datumCode&&"none"!==n.datumCode){var r=ld(ig,n.datumCode);r&&(n.datum_params=n.datum_params||(r.towgs84?r.towgs84.split(","):null),n.ellps=r.ellipse,n.datumName=r.datumName?r.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var a=function(t,e,n,i,r){if(!t){var a=ld(Zd,i);a||(a=Qd),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<Qp)&&(r=!0,e=t),{a:t,b:e,rf:n,sphere:r}}(n.a,n.b,n.rf,n.ellps,n.sphere),o=function(t,e,n,i){var r=t*t,a=e*e,o=(r-a)/r,s=0;return i?(r=(t*=1-o*(.16666666666666666+o*(.04722222222222222+.022156084656084655*o)))*t,o=0):s=Math.sqrt(o),{es:o,e:s,ep2:(r-a)/a}}(a.a,a.b,a.rf,n.R_A),s=function(t){return void 0===t?null:t.split(",").map(sg)}(n.nadgrids),l=n.datum||rg(n.datumCode,n.datum_params,a.a,a.b,o.es,o.ep2,s);Id(this,n),Id(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=l,this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}dg.projections=Kd,dg.projections.start();const gg=dg;function _g(t,e,n){var i,r,a,o,s=t.x,l=t.y,c=t.z?t.z:0;if(l<-Zp&&l>-1.001*Zp)l=-Zp;else if(l>Zp&&l<1.001*Zp)l=Zp;else{if(l<-Zp)return{x:-1/0,y:-1/0,z:t.z};if(l>Zp)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),o=Math.cos(l),a=r*r,{x:((i=n/Math.sqrt(1-e*a))+c)*o*Math.cos(s),y:(i+c)*o*Math.sin(s),z:(i*(1-e)+c)*r}}function mg(t,e,n,i){var r,a,o,s,l,c,u,h,f,p,d,g,_,m,v,y=1e-12,x=t.x,b=t.y,w=t.z?t.z:0;if(r=Math.sqrt(x*x+b*b),a=Math.sqrt(x*x+b*b+w*w),r/n<y){if(m=0,a/n<y)return v=-i,{x:t.x,y:t.y,z:t.z}}else m=Math.atan2(b,x);o=w/a,h=(s=r/a)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*s*s)),f=o*l,_=0;do{_++,c=e*(u=n/Math.sqrt(1-e*f*f))/(u+(v=r*h+w*f-u*(1-e*f*f))),g=(d=o*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*h-(p=s*(1-c)*l)*f,h=p,f=d}while(g*g>1e-24&&_<30);return{x:m,y:Math.atan(d/Math.abs(p)),z:v}}function vg(t){return 1===t||2===t}function yg(t,e,n){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return n;if(5===t.datum_type||5===e.datum_type)return n;var i=t.a,r=t.es;if(3===t.datum_type){if(0!==xg(t,!1,n))return;i=Jp,r=Xp}var a=e.a,o=e.b,s=e.es;if(3===e.datum_type&&(a=Jp,o=6356752.314,s=Xp),r===s&&i===a&&!vg(t.datum_type)&&!vg(e.datum_type))return n;if((n=_g(n,r,i),vg(t.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(2===e){var i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6];return{x:c*(t.x-l*t.y+s*t.z)+i,y:c*(l*t.x+t.y-o*t.z)+r,z:c*(-s*t.x+o*t.y+t.z)+a}}}(n,t.datum_type,t.datum_params)),vg(e.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(2===e){var i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=(t.x-i)/c,h=(t.y-r)/c,f=(t.z-a)/c;return{x:u+l*h-s*f,y:-l*u+h+o*f,z:s*u-o*h+f}}}(n,e.datum_type,e.datum_params)),n=mg(n,s,a,o),3===e.datum_type)&&0!==xg(e,!0,n))return;return n}function xg(t,e,n){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var i={x:-n.x,y:n.y},r={x:Number.NaN,y:Number.NaN},a=[];t:for(var o=0;o<t.grids.length;o++){var s=t.grids[o];if(a.push(s.name),s.isNull){r=i;break}if(null!==s.grid)for(var l=s.grid.subgrids,c=0,u=l.length;c<u;c++){var h=l[c],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,p=h.ll[0]-f,d=h.ll[1]-f,g=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,_=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(d>i.y||p>i.x||_<i.y||g<i.x)&&(r=bg(i,e,h),!isNaN(r.x)))break t}else if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*ed+" "+i.y*ed+" tried: '"+a+"'"),-1):(n.x=-r.x,n.y=r.y,0)}function bg(t,e,n){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var r={x:t.x,y:t.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=Bd(r.x-Math.PI)+Math.PI;var a=wg(r,n);if(e){if(isNaN(a.x))return i;a.x=r.x-a.x,a.y=r.y-a.y;var o,s,l=9;do{if(s=wg(a,n),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}o={x:r.x-(s.x+a.x),y:r.y-(s.y+a.y)},a.x+=o.x,a.y+=o.y}while(l--&&Math.abs(o.x)>1e-12&&Math.abs(o.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=Bd(a.x+n.ll[0]),i.y=a.y+n.ll[1]}else isNaN(a.x)||(i.x=t.x+a.x,i.y=t.y+a.y);return i}function wg(t,e){var n,i={x:t.x/e.del[0],y:t.y/e.del[1]},r=Math.floor(i.x),a=Math.floor(i.y),o=i.x-1*r,s=i.y-1*a,l={x:Number.NaN,y:Number.NaN};if(r<0||r>=e.lim[0])return l;if(a<0||a>=e.lim[1])return l;n=a*e.lim[0]+r;var c=e.cvs[n][0],u=e.cvs[n][1];n++;var h=e.cvs[n][0],f=e.cvs[n][1];n+=e.lim[0];var p=e.cvs[n][0],d=e.cvs[n][1];n--;var g=e.cvs[n][0],_=e.cvs[n][1],m=o*s,v=o*(1-s),y=(1-o)*(1-s),x=(1-o)*s;return l.x=y*c+v*h+x*g+m*p,l.y=y*u+v*f+x*_+m*d,l}function Sg(t,e,n){var i,r,a,o=n.x,s=n.y,l=n.z||0,c={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==n.z)switch(0===a?(i=o,r=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(i=s,r=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(i=l,r="z"),t.axis[a]){case"e":case"n":c[r]=i;break;case"w":case"s":c[r]=-i;break;case"u":void 0!==n[r]&&(c.z=i);break;case"d":void 0!==n[r]&&(c.z=-i);break;default:return null}return c}function Mg(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function Eg(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Cg(t,e,n,i){var r,a=void 0!==(n=Array.isArray(n)?Mg(n):{x:n.x,y:n.y,z:n.z,m:n.m}).z;if(function(t){Eg(t.x),Eg(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=Cg(t,r=new gg("WGS84"),n,i),t=r),i&&"enu"!==t.axis&&(n=Sg(t,!1,n)),"longlat"===t.projName)n={x:n.x*td,y:n.y*td,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=yg(t.datum,e.datum,n))return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*ed,y:n.y*ed,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),i&&"enu"!==e.axis?Sg(e,!0,n):(n&&!a&&delete n.z,n)}var Ag=gg("WGS84");function kg(t,e,n,i){var r,a,o;return Array.isArray(n)?(r=Cg(t,e,n,i)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.slice(3)):[r.x,r.y,n[2]].concat(n.slice(3)):[r.x,r.y].concat(n.slice(2)):[r.x,r.y]):(a=Cg(t,e,n,i),2===(o=Object.keys(n)).length||o.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;a[i]=n[i]})),a)}function Tg(t){return t instanceof gg?t:t.oProj?t.oProj:gg(t)}const Pg=function(t,e,n){t=Tg(t);var i,r=!1;return void 0===e?(e=t,t=Ag,r=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=Ag,r=!0),e=Tg(e),n?kg(t,e,n):(i={forward:function(n,i){return kg(t,e,n,i)},inverse:function(n,i){return kg(e,t,n,i)}},r&&(i.oProj=e),i)};var Ng="AJSAJS",Lg="AFAFAF",Fg=65,Og=73,Gg=79,Dg=86,zg=90;const Ig={forward:Rg,inverse:function(t){var e=Ug(Vg(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:jg};function Rg(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,i="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(r=t.easting,a=t.northing,o=t.zoneNumber,s=Hg(o),l=Math.floor(r/1e5),c=Math.floor(a/1e5)%20,function(t,e,n){var i=n-1,r=Ng.charCodeAt(i),a=Lg.charCodeAt(i),o=r+t-1,s=a+e,l=!1;return o>zg&&(o=o-zg+Fg-1,l=!0),(o===Og||r<Og&&o>Og||(o>Og||r<Og)&&l)&&o++,(o===Gg||r<Gg&&o>Gg||(o>Gg||r<Gg)&&l)&&++o===Og&&o++,o>zg&&(o=o-zg+Fg-1),s>Dg?(s=s-Dg+Fg-1,l=!0):l=!1,(s===Og||a<Og&&s>Og||(s>Og||a<Og)&&l)&&s++,(s===Gg||a<Gg&&s>Gg||(s>Gg||a<Gg)&&l)&&++s===Og&&s++,s>Dg&&(s=s-Dg+Fg-1),String.fromCharCode(o)+String.fromCharCode(s)}(l,c,s))+n.substr(n.length-5,e)+i.substr(i.length-5,e);var r,a,o,s,l,c}(function(t){var e,n,i,r,a,o,s,l,c=t.lat,u=t.lon,h=6378137,f=.00669438,p=.9996,d=Bg(c),g=Bg(u);l=Math.floor((u+180)/6)+1,180===u&&(l=60);c>=56&&c<64&&u>=3&&u<12&&(l=32);c>=72&&c<84&&(u>=0&&u<9?l=31:u>=9&&u<21?l=33:u>=21&&u<33?l=35:u>=33&&u<42&&(l=37));s=Bg(6*(l-1)-180+3),e=f/(1-f),n=h/Math.sqrt(1-f*Math.sin(d)*Math.sin(d)),i=Math.tan(d)*Math.tan(d),r=e*Math.cos(d)*Math.cos(d),a=Math.cos(d)*(g-s),o=h*((1-f/4-3*f*f/64-5*f*f*f/256)*d-(3*f/8+3*f*f/32+45*f*f*f/1024)*Math.sin(2*d)+(15*f*f/256+45*f*f*f/1024)*Math.sin(4*d)-35*f*f*f/3072*Math.sin(6*d));var _=p*n*(a+(1-i+r)*a*a*a/6+(5-18*i+i*i+72*r-58*e)*a*a*a*a*a/120)+5e5,m=p*(o+n*Math.tan(d)*(a*a/2+(5-i+9*r+4*r*r)*a*a*a*a/24+(61-58*i+i*i+600*r-330*e)*a*a*a*a*a*a/720));c<0&&(m+=1e7);return{northing:Math.round(m),easting:Math.round(_),zoneNumber:l,zoneLetter:Wg(c)}}({lat:t[1],lon:t[0]}),e)}function jg(t){var e=Ug(Vg(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Bg(t){return t*(Math.PI/180)}function qg(t){return t/Math.PI*180}function Ug(t){var e=t.northing,n=t.easting,i=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var a,o,s,l,c,u,h,f,p,d=.9996,g=6378137,_=.00669438,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=n-5e5,y=e;i<"N"&&(y-=1e7),h=6*(r-1)-180+3,a=.006739496752268451,p=(f=y/d/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*f)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*f)+151*m*m*m/96*Math.sin(6*f),o=g/Math.sqrt(1-_*Math.sin(p)*Math.sin(p)),s=Math.tan(p)*Math.tan(p),l=a*Math.cos(p)*Math.cos(p),c=.99330562*g/Math.pow(1-_*Math.sin(p)*Math.sin(p),1.5),u=v/(o*d);var x=p-o*Math.tan(p)/c*(u*u/2-(5+3*s+10*l-4*l*l-9*a)*u*u*u*u/24+(61+90*s+298*l+45*s*s-1.6983531815716497-3*l*l)*u*u*u*u*u*u/720);x=qg(x);var b,w=(u-(1+2*s+l)*u*u*u/6+(5-2*l+28*s-3*l*l+8*a+24*s*s)*u*u*u*u*u/120)/Math.cos(p);if(w=h+qg(w),t.accuracy){var S=Ug({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:S.lat,right:S.lon,bottom:x,left:w}}else b={lat:x,lon:w};return b}function Wg(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function Hg(t){var e=t%6;return 0===e&&(e=6),e}function Vg(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,i=null,r="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;r+=e,a++}var o=parseInt(r,10);if(0===a||a+3>n)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(a++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;i=t.substring(a,a+=2);for(var l=Hg(o),c=function(t,e){var n=Ng.charCodeAt(e-1),i=1e5,r=!1;for(;n!==t.charCodeAt(0);){if(++n===Og&&n++,n===Gg&&n++,n>zg){if(r)throw"Bad character: "+t;n=Fg,r=!0}i+=1e5}return i}(i.charAt(0),l),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n=Lg.charCodeAt(e-1),i=0,r=!1;for(;n!==t.charCodeAt(0);){if(++n===Og&&n++,n===Gg&&n++,n>Dg){if(r)throw"Bad character: "+t;n=Fg,r=!0}i+=1e5}return i}(i.charAt(1),l);u<$g(s);)u+=2e6;var h=n-a;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,p,d,g=h/2,_=0,m=0;return g>0&&(f=1e5/Math.pow(10,g),p=t.substring(a,a+g),_=parseFloat(p)*f,d=t.substring(a+g),m=parseFloat(d)*f),{easting:_+c,northing:m+u,zoneLetter:s,zoneNumber:o,accuracy:f}}function $g(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Yg(t,e,n){if(!(this instanceof Yg))return new Yg(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Yg.fromMGRS=function(t){return new Yg(jg(t))},Yg.prototype.toMGRS=function(t){return Rg([this.x,this.y],t)};const Jg=Yg;var Xg=.046875,Kg=.01953125,Zg=.01068115234375;function Qg(t){var e=[];e[0]=1-t*(.25+t*(Xg+t*(Kg+t*Zg))),e[1]=t*(.75-t*(Xg+t*(Kg+t*Zg)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e}function t_(t,e,n,i){return n*=e,e*=e,i[0]*t-n*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}function e_(t,e,n){for(var i=1/(1-e),r=t,a=20;a;--a){var o=Math.sin(r),s=1-e*o*o;if(r-=s=(t_(r,o,Math.cos(r),n)-t)*(s*Math.sqrt(s))*i,Math.abs(s)<Qp)return r}return r}const n_={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Qg(this.es),this.ml0=t_(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,n,i,r=t.x,a=t.y,o=Bd(r-this.long0),s=Math.sin(a),l=Math.cos(a);if(this.es){var c=l*o,u=Math.pow(c,2),h=this.ep2*Math.pow(l,2),f=Math.pow(h,2),p=Math.abs(l)>Qp?Math.tan(a):0,d=Math.pow(p,2),g=Math.pow(d,2);e=1-this.es*Math.pow(s,2),c/=Math.sqrt(e);var _=t_(a,s,l,this.en);n=this.a*(this.k0*c*(1+u/6*(1-d+h+u/20*(5-18*d+g+14*h-58*d*h+u/42*(61+179*g-g*d-479*d)))))+this.x0,i=this.a*(this.k0*(_-this.ml0+s*o*c/2*(1+u/12*(5-d+9*h+4*f+u/30*(61+g-58*d+270*h-330*d*h+u/56*(1385+543*g-g*d-3111*d))))))+this.y0}else{var m=l*Math.sin(o);if(Math.abs(Math.abs(m)-1)<Qp)return 93;if(n=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,i=l*Math.cos(o)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(i))>=1){if(m-1>Qp)return 93;i=0}else i=Math.acos(i);a<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=n,t.y=i,t},inverse:function(t){var e,n,i,r,a=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(n=e_(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(n)<Zp){var s=Math.sin(n),l=Math.cos(n),c=Math.abs(l)>Qp?Math.tan(n):0,u=this.ep2*Math.pow(l,2),h=Math.pow(u,2),f=Math.pow(c,2),p=Math.pow(f,2);e=1-this.es*Math.pow(s,2);var d=a*Math.sqrt(e)/this.k0,g=Math.pow(d,2);i=n-(e*=c)*g/(1-this.es)*.5*(1-g/12*(5+3*f-9*u*f+u-4*h-g/30*(61+90*f-252*u*f+45*p+46*u-g/56*(1385+3633*f+4095*p+1574*p*f)))),r=Bd(this.long0+d*(1-g/6*(1+2*f+u-g/20*(5+28*f+24*p+8*u*f+6*u-g/42*(61+662*f+1320*p+720*p*f))))/l)}else i=Zp*jd(o),r=0;else{var _=Math.exp(a/this.k0),m=.5*(_-1/_),v=this.lat0+o/this.k0,y=Math.cos(v);e=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(m,2))),i=Math.asin(e),o<0&&(i=-i),r=0===m&&0===y?0:Bd(Math.atan2(m,y)+this.long0)}return t.x=r,t.y=i,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function i_(t){var e=Math.exp(t);return e=(e-1/e)/2}function r_(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),i=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(i,2))}function a_(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(r_(1,e)+1))),t<0?-e:e}function o_(t,e){for(var n,i=2*Math.cos(2*e),r=t.length-1,a=t[r],o=0;--r>=0;)n=i*a-o+t[r],o=a,a=n;return e+n*Math.sin(2*e)}function s_(t,e,n){for(var i,r,a=Math.sin(e),o=Math.cos(e),s=i_(n),l=function(t){var e=Math.exp(t);return(e+1/e)/2}(n),c=2*o*l,u=-2*a*s,h=t.length-1,f=t[h],p=0,d=0,g=0;--h>=0;)i=d,r=p,f=c*(d=f)-i-u*(p=g)+t[h],g=u*d-r+c*p;return[(c=a*l)*f-(u=o*s)*g,c*g+u*f]}const l_={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(n_.init.apply(this),this.forward=n_.forward,this.inverse=n_.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var i=o_(this.cbg,this.lat0);this.Zb=-this.Qn*(i+function(t,e){for(var n,i=2*Math.cos(e),r=t.length-1,a=t[r],o=0;--r>=0;)n=i*a-o+t[r],o=a,a=n;return Math.sin(e)*n}(this.gtu,2*i))},forward:function(t){var e=Bd(t.x-this.long0),n=t.y;n=o_(this.cbg,n);var i=Math.sin(n),r=Math.cos(n),a=Math.sin(e),o=Math.cos(e);n=Math.atan2(i,o*r),e=Math.atan2(a*r,r_(i,r*o)),e=a_(Math.tan(e));var s,l,c=s_(this.gtu,2*n,2*e);return n+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*n+this.Zb)+this.y0):(s=1/0,l=1/0),t.x=s,t.y=l,t},inverse:function(t){var e,n,i=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var a=s_(this.utg,2*r,2*i);r+=a[0],i+=a[1],i=Math.atan(i_(i));var o=Math.sin(r),s=Math.cos(r),l=Math.sin(i),c=Math.cos(i);r=Math.atan2(o*c,r_(l,c*s)),e=Bd((i=Math.atan2(l,c*s))+this.long0),n=o_(this.cgb,r)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const c_={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(Bd(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*td,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,l_.init.apply(this),this.forward=l_.forward,this.inverse=l_.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function u_(t,e){return Math.pow((1-t)/(1+t),e)}const h_={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+nd)/(Math.pow(Math.tan(.5*this.lat0+nd),this.C)*u_(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+nd),this.C)*u_(this.e*Math.sin(n),this.ratexp))-Zp,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,i=Math.pow(Math.tan(.5*n+nd)/this.K,1/this.C),r=20;r>0&&(n=2*Math.atan(i*u_(this.e*Math.sin(t.y),-.5*this.e))-Zp,!(Math.abs(n-t.y)<1e-14));--r)t.y=n;return r?(t.x=e,t.y=n,t):null},names:["gauss"]};const f_={init:function(){h_.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,i,r;return t.x=Bd(t.x-this.long0),h_.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),i=Math.cos(t.x),r=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*i),t.x=r*n*Math.sin(t.x),t.y=r*(this.cosc0*e-this.sinc0*n*i),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,i,r,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=r_(t.x,t.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),n=Math.cos(o),r=Math.asin(n*this.sinc0+t.y*e*this.cosc0/a),i=Math.atan2(t.x*e,a*this.cosc0*n-t.y*this.sinc0*e)}else r=this.phic0,i=0;return t.x=i,t.y=r,h_.inverse.apply(this,[t]),t.x=Bd(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};const p_={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Qp&&(this.k0=.5*(1+jd(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Qp&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Qp&&Math.abs(Math.cos(this.lat_ts))>Qp&&(this.k0=.5*this.cons*Rd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/qd(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Rd(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Zp,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,i,r,a,o,s=t.x,l=t.y,c=Math.sin(l),u=Math.cos(l),h=Bd(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=Qp&&Math.abs(l+this.lat0)<=Qp?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*c+this.coslat0*u*Math.cos(h)),t.x=this.a*e*u*Math.sin(h)+this.x0,t.y=this.a*e*(this.coslat0*c-this.sinlat0*u*Math.cos(h))+this.y0,t):(n=2*Math.atan(this.ssfn_(l,c,this.e))-Zp,r=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=Qp?(a=qd(this.e,l*this.con,this.con*c),o=2*this.a*this.k0*a/this.cons,t.x=this.x0+o*Math.sin(s-this.long0),t.y=this.y0-this.con*o*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)<Qp?(e=2*this.a*this.k0/(1+r*Math.cos(h)),t.y=e*i):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*r*Math.cos(h))),t.y=e*(this.cosX0*i-this.sinX0*r*Math.cos(h))+this.y0),t.x=e*r*Math.sin(h)+this.x0,t))},inverse:function(t){var e,n,i,r,a;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,n=this.lat0,o<=Qp?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(s)*this.sinlat0+t.y*Math.sin(s)*this.coslat0/o),e=Math.abs(this.coslat0)<Qp?this.lat0>0?Bd(this.long0+Math.atan2(t.x,-1*t.y)):Bd(this.long0+Math.atan2(t.x,t.y)):Bd(this.long0+Math.atan2(t.x*Math.sin(s),o*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=Qp){if(o<=Qp)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,i=o*this.cons/(2*this.a*this.k0),n=this.con*Ud(this.e,i),e=this.con*Bd(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=Qp?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/o),e=Bd(this.long0+Math.atan2(t.x*Math.sin(r),o*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),n=-1*Ud(this.e,Math.tan(.5*(Zp+a)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:function(t,e,n){return e*=n,Math.tan(.5*(Zp+t))*Math.pow((1-e)/(1+e),.5*n)}};const d_={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,i=1/this.rf,r=2*i-Math.pow(i,2),a=this.e=Math.sqrt(r);this.R=this.k0*n*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+a*e)/(1-a*e));this.K=o-this.alpha*s+this.alpha*a/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(e+n)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+o/this.alpha,l=0,c=a,u=-1e3,h=0;Math.abs(c-u)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=s,t.y=c,t},names:["somerc"]};var g_=1e-7;const __={init:function(){var t,e,n,i,r,a,o,s,l,c,u,h,f,p,d=0,g=0,_=0,m=0,v=0,y=0,x=0;this.no_off=(f=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],p="object"==typeof(h=this).projName?Object.keys(h.projName)[0]:h.projName,"no_uoff"in h||"no_off"in h||-1!==f.indexOf(p)||-1!==f.indexOf(Xd(p))),this.no_rot="no_rot"in this;var b=!1;"alpha"in this&&(b=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),b&&(x=this.alpha),w&&(d=this.rectified_grid_angle),b||w)g=this.longc;else if(_=this.long1,v=this.lat1,m=this.long2,y=this.lat2,Math.abs(v-y)<=g_||(t=Math.abs(v))<=g_||Math.abs(t-Zp)<=g_||Math.abs(Math.abs(this.lat0)-Zp)<=g_||Math.abs(Math.abs(y)-Zp)<=g_)throw new Error;var S=1-this.es;e=Math.sqrt(S),Math.abs(this.lat0)>Qp?(s=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*s*s,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*e/t,(r=(i=this.B*e/(n*Math.sqrt(t)))*i-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(qd(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=i=r=1),b||w?(b?(u=Math.asin(Math.sin(x)/i),w||(d=x)):(u=d,x=Math.asin(i*Math.sin(u))),this.lam0=g-Math.asin(.5*(r-1/r)*Math.tan(u))/this.B):(a=Math.pow(qd(this.e,v,Math.sin(v)),this.B),o=Math.pow(qd(this.e,y,Math.sin(y)),this.B),r=this.E/a,l=(o-a)/(o+a),c=((c=this.E*this.E)-o*a)/(c+o*a),(t=_-m)<-Math.pi?m-=id:t>Math.pi&&(m+=id),this.lam0=Bd(.5*(_+m)-Math.atan(c*Math.tan(.5*this.B*(_-m))/l)/this.B),u=Math.atan(2*Math.sin(this.B*Bd(_-this.lam0))/(r-1/r)),d=x=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(d),this.cosrot=Math.cos(d),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(nd-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(nd+r))},forward:function(t){var e,n,i,r,a,o,s,l,c={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Zp)>Qp){if(e=.5*((a=this.E/Math.pow(qd(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/a)),n=.5*(a+o),r=Math.sin(this.B*t.x),i=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(i)-1)<Qp)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*t.x),s=Math.abs(o)<g_?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+r*this.singam,o)}else l=t.y>0?this.v_pole_n:this.v_pole_s,s=this.ArB*t.y;return this.no_rot?(c.x=s,c.y=l):(s-=this.u_0,c.x=l*this.cosrot+s*this.sinrot,c.y=s*this.cosrot-l*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function(t){var e,n,i,r,a,o,s,l={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,e=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),a=.5*(i+1/i),s=((o=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(s)-1)<Qp)l.x=0,l.y=s<0?-Zp:Zp;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=Ud(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return l.x+=this.lam0,l},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const m_={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Qp)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),i=Rd(this.e,e,n),r=qd(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=Rd(this.e,a,o),l=qd(this.e,this.lat2,a),c=Math.abs(Math.abs(this.lat0)-Zp)<Qp?0:qd(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Qp?this.ns=Math.log(i/s)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=Qp&&(n=jd(n)*(Zp-2e-10));var i,r,a=Math.abs(Math.abs(n)-Zp);if(a>Qp)i=qd(this.e,n,Math.sin(n)),r=this.a*this.f0*Math.pow(i,this.ns);else{if((a=n*this.ns)<=0)return null;r=0}var o=this.ns*Bd(e-this.long0);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var e,n,i,r,a,o=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),n=1):(e=-Math.sqrt(o*o+s*s),n=-1);var l=0;if(0!==e&&(l=Math.atan2(n*o,n*s)),0!==e||this.ns>0){if(n=1/this.ns,i=Math.pow(e/(this.a*this.f0),n),-9999===(r=Ud(this.e,i)))return null}else r=-Zp;return a=Bd(l/this.ns+this.long0),t.x=a,t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const v_={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y,u=Bd(l-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),i=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),a=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(r)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),t.y=s*Math.cos(o)/1,t.x=s*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,i,r,a,o,s,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),n=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),t.x=this.long0-n/this.alfa,o=e,s=0;var c=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(s=1),o=t.y,c+=1}while(0===s&&c<15);return c>=15?null:t},names:["Krovak","krovak"]};function y_(t,e,n,i,r){return t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}function x_(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function b_(t){return.375*t*(1+.25*t*(1+.46875*t))}function w_(t){return.05859375*t*t*(1+.75*t)}function S_(t){return t*t*t*(35/3072)}function M_(t,e,n){var i=e*n;return t/Math.sqrt(1-i*i)}function E_(t){return Math.abs(t)<Zp?t:t-jd(t)*Math.PI}function C_(t,e,n,i,r){var a,o;a=t/e;for(var s=0;s<15;s++)if(a+=o=(t-(e*a-n*Math.sin(2*a)+i*Math.sin(4*a)-r*Math.sin(6*a)))/(e-2*n*Math.cos(2*a)+4*i*Math.cos(4*a)-6*r*Math.cos(6*a)),Math.abs(o)<=1e-10)return a;return NaN}const A_={init:function(){this.sphere||(this.e0=x_(this.es),this.e1=b_(this.es),this.e2=w_(this.es),this.e3=S_(this.es),this.ml0=this.a*y_(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Bd(i-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(r)*Math.sin(i)),n=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var a=Math.sin(r),o=Math.cos(r),s=M_(this.a,this.e,a),l=Math.tan(r)*Math.tan(r),c=i*Math.cos(r),u=c*c,h=this.es*o*o/(1-this.es);e=s*c*(1-u*l*(1/6-(8-l+8*h)*u/120)),n=this.a*y_(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*a/o*u*(.5+(5-l+6*h)*u/24)}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i=t.x/this.a,r=t.y/this.a;if(this.sphere){var a=r+this.lat0;e=Math.asin(Math.sin(a)*Math.cos(i)),n=Math.atan2(Math.tan(i),Math.cos(a))}else{var o=C_(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-Zp)<=Qp)return t.x=this.long0,t.y=Zp,r<0&&(t.y*=-1),t;var s=M_(this.a,this.e,Math.sin(o)),l=s*s*s/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(o),2),u=i*this.a/s,h=u*u;e=o-s*Math.tan(o)/l*u*u*(.5-(1+3*c)*u*u/24),n=u*(1-h*(c/3+(1+3*c)*c*h/15))/Math.cos(o)}return t.x=Bd(n+this.long0),t.y=E_(e),t},names:["Cassini","Cassini_Soldner","cass"]};function k_(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e}var T_=.3333333333333333,P_=.17222222222222222,N_=.10257936507936508,L_=.06388888888888888,F_=.0664021164021164,O_=.016415012942191543;const G_={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-Zp)<Qp?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<Qp?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=k_(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*T_,e=t*t,n[0]+=e*P_,n[1]=e*L_,e*=t,n[0]+=e*N_,n[1]+=e*F_,n[2]=e*O_,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=k_(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,i,r,a,o,s,l,c,u,h=t.x,f=t.y;if(h=Bd(h-this.long0),this.sphere){if(a=Math.sin(f),u=Math.cos(f),i=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+u*i:1+this.sinph0*a+this.cosph0*u*i)<=Qp)return null;e=(n=Math.sqrt(2/n))*u*Math.sin(h),n*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(f+this.lat0)<Qp)return null;n=nd-.5*f,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(h),n*=i}}else{switch(s=0,l=0,c=0,i=Math.cos(h),r=Math.sin(h),a=Math.sin(f),o=k_(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(s=o/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:c=1+this.sinb1*s+this.cosb1*l*i;break;case this.EQUIT:c=1+l*i;break;case this.N_POLE:c=Zp+f,o=this.qp-o;break;case this.S_POLE:c=f-Zp,o=this.qp+o}if(Math.abs(c)<Qp)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),n=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*s-this.sinb1*l*i):(c=Math.sqrt(2/(1+l*i)))*s*this.ymf,e=this.xmf*c*l*r;break;case this.N_POLE:case this.S_POLE:o>=0?(e=(c=Math.sqrt(o))*r,n=i*(this.mode===this.S_POLE?c:-c)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i,r,a,o,s,l=t.x/this.a,c=t.y/this.a;if(this.sphere){var u,h=0,f=0;if((n=.5*(u=Math.sqrt(l*l+c*c)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(n),h=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(u)<=Qp?0:Math.asin(c*f/u),l*=f,c=h*u;break;case this.OBLIQ:n=Math.abs(u)<=Qp?this.lat0:Math.asin(h*this.sinph0+c*f*this.cosph0/u),l*=f*this.cosph0,c=(h-Math.sin(n)*this.sinph0)*u;break;case this.N_POLE:c=-c,n=Zp-n;break;case this.S_POLE:n-=Zp}e=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,c):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,c*=this.dd,(o=Math.sqrt(l*l+c*c))<Qp)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*o/this.rq),i=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=i*this.sinb1+c*r*this.cosb1/o,a=this.qp*s,c=o*this.cosb1*i-c*this.sinb1*r):(s=c*r/o,a=this.qp*s,c=o*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(c=-c),!(a=l*l+c*c))return t.x=this.long0,t.y=this.lat0,t;s=1-a/this.qp,this.mode===this.S_POLE&&(s=-s)}e=Math.atan2(l,c),n=function(t,e){var n=t+t;return t+e[0]*Math.sin(n)+e[1]*Math.sin(n+n)+e[2]*Math.sin(n+n+n)}(Math.asin(s),this.apa)}return t.x=Bd(this.long0+e),t.y=n,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function D_(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const z_={init:function(){Math.abs(this.lat1+this.lat2)<Qp||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Rd(this.e3,this.sin_po,this.cos_po),this.qs1=k_(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Rd(this.e3,this.sin_po,this.cos_po),this.qs2=k_(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=k_(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Qp?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var i=k_(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,a=this.ns0*Bd(e-this.long0),o=r*Math.sin(a)+this.x0,s=this.rh-r*Math.cos(a)+this.y0;return t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1),r=0,0!==e&&(r=Math.atan2(i*t.x,i*t.y)),i=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,n)),a=Bd(r/this.ns0+this.long0),t.x=a,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,i,r,a,o=D_(.5*e);if(t<Qp)return o;for(var s=t*t,l=1;l<=25;l++)if(o+=a=.5*(r=1-(i=t*(n=Math.sin(o)))*i)*r/Math.cos(o)*(e/(1-s)-n/r+.5/t*Math.log((1-i)/(1+i))),Math.abs(a)<=1e-7)return o;return null}};const I_={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y;return i=Bd(l-this.long0),e=Math.sin(c),n=Math.cos(c),r=Math.cos(i),(a=this.sin_p14*e+this.cos_p14*n*r)>0||Math.abs(a)<=Qp?(o=this.x0+1*this.a*n*Math.sin(i)/a,s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)/a):(o=this.x0+this.infinity_dist*n*Math.sin(i),s=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*r)),t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(r=Math.atan2(e,this.rc),n=Math.sin(r),o=D_((i=Math.cos(r))*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n),a=Bd(this.long0+a)):(o=this.phic0,a=0),t.x=a,t.y=o,t},names:["gnom"]};const R_={init:function(){this.sphere||(this.k0=Rd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,i=t.x,r=t.y,a=Bd(i-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var o=k_(this.e,Math.sin(r));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=Bd(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*Zp:Zp;for(var i,r,a,o,s=Math.asin(.5*e),l=0;l<30;l++)if(r=Math.sin(s),a=Math.cos(s),o=t*r,s+=i=Math.pow(1-o*o,2)/(2*a)*(e/(1-t*t)-r/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(i)<=1e-10)return s;return NaN}(this.e,2*t.y*this.k0/this.a),e=Bd(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};const j_={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,i=Bd(e-this.long0),r=E_(n-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*r,t},inverse:function(t){var e=t.x,n=t.y;return t.x=Bd(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=E_(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const B_={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=x_(this.es),this.e1=b_(this.es),this.e2=w_(this.es),this.e3=S_(this.es),this.ml0=this.a*y_(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,i,r=t.x,a=t.y,o=Bd(r-this.long0);if(i=o*Math.sin(a),this.sphere)Math.abs(a)<=Qp?(e=this.a*o,n=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(a),n=this.a*(E_(a-this.lat0)+(1-Math.cos(i))/Math.tan(a)));else if(Math.abs(a)<=Qp)e=this.a*o,n=-1*this.ml0;else{var s=M_(this.a,this.e,Math.sin(a))/Math.tan(a);e=s*Math.sin(i),n=this.a*y_(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+s*(1-Math.cos(i))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,i,r,a,o,s,l,c;if(i=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=Qp)e=Bd(i/this.a+this.long0),n=0;else{var u;for(o=this.lat0+r/this.a,s=i*i/this.a/this.a+o*o,l=o,a=20;a;--a)if(l+=c=-1*(o*(l*(u=Math.tan(l))+1)-l-.5*(l*l+s)*u)/((l-o)/u-1),Math.abs(c)<=Qp){n=l;break}e=Bd(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=Qp)n=0,e=Bd(this.long0+i/this.a);else{var h,f,p,d,g;for(o=(this.ml0+r)/this.a,s=i*i/this.a/this.a+o*o,l=o,a=20;a;--a)if(g=this.e*Math.sin(l),h=Math.sqrt(1-g*g)*Math.tan(l),f=this.a*y_(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(o*(h*(d=f/this.a)+1)-d-.5*h*(d*d+s))/(this.es*Math.sin(2*l)*(d*d+s-2*o*d)/(4*h)+(o-d)*(h*p-2/Math.sin(2*l))-p),Math.abs(c)<=Qp){n=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=Bd(this.long0+Math.asin(i*h/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","American_Polyconic","poly"]};const q_={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,i=t.y-this.lat0,r=n-this.long0,a=i/Kp*1e-5,o=r,s=1,l=0;for(e=1;e<=10;e++)s*=a,l+=this.A[e]*s;var c,u=l,h=o,f=1,p=0,d=0,g=0;for(e=1;e<=6;e++)c=p*u+f*h,f=f*u-p*h,p=c,d=d+this.B_re[e]*f-this.B_im[e]*p,g=g+this.B_im[e]*f+this.B_re[e]*p;return t.x=g*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var e,n,i=t.x,r=t.y,a=i-this.x0,o=(r-this.y0)/this.a,s=a/this.a,l=1,c=0,u=0,h=0;for(e=1;e<=6;e++)n=c*o+l*s,l=l*o-c*s,c=n,u=u+this.C_re[e]*l-this.C_im[e]*c,h=h+this.C_im[e]*l+this.C_re[e]*c;for(var f=0;f<this.iterations;f++){var p,d=u,g=h,_=o,m=s;for(e=2;e<=6;e++)p=g*u+d*h,d=d*u-g*h,g=p,_+=(e-1)*(this.B_re[e]*d-this.B_im[e]*g),m+=(e-1)*(this.B_im[e]*d+this.B_re[e]*g);d=1,g=0;var v=this.B_re[1],y=this.B_im[1];for(e=2;e<=6;e++)p=g*u+d*h,d=d*u-g*h,g=p,v+=e*(this.B_re[e]*d-this.B_im[e]*g),y+=e*(this.B_im[e]*d+this.B_re[e]*g);var x=v*v+y*y;u=(_*v+m*y)/x,h=(m*v-_*y)/x}var b=u,w=h,S=1,M=0;for(e=1;e<=9;e++)S*=b,M+=this.D[e]*S;var E=this.lat0+M*Kp*1e5,C=this.long0+w;return t.x=C,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]};const U_={init:function(){},forward:function(t){var e=t.x,n=t.y,i=Bd(e-this.long0),r=this.x0+this.a*i,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=r,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=Bd(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t},names:["Miller_Cylindrical","mill"]};const W_={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Qg(this.es)},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Bd(i-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(r),o=20;o;--o){var s=(this.m*r+Math.sin(r)-a)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<Qp)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;e=this.a*this.C_x*i*(this.m+Math.cos(r)),n=this.a*this.C_y*r}else{var l=Math.sin(r),c=Math.cos(r);n=this.a*t_(r,l,c,this.en),e=this.a*i*c/Math.sqrt(1-this.es*l*l)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,i;return t.x-=this.x0,n=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,n/=this.C_x*(this.m+Math.cos(e)),this.m?e=D_((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=D_(Math.sin(e)/this.n)),n=Bd(n+this.long0),e=E_(e)):(e=e_(t.y/this.a,this.es,this.en),(i=Math.abs(e))<Zp?(i=Math.sin(e),n=Bd(this.long0+t.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)))):i-Qp<Zp&&(n=this.long0)),t.x=n,t.y=e,t},names:["Sinusoidal","sinu"]};const H_={init:function(){},forward:function(t){for(var e=t.x,n=t.y,i=Bd(e-this.long0),r=n,a=Math.PI*Math.sin(n);;){var o=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=o,Math.abs(o)<Qp)break}r/=2,Math.PI/2-Math.abs(n)<Qp&&(i=0);var s=.900316316158*this.a*i*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return t.x=s,t.y=l,t},inverse:function(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var i=Bd(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var r=Math.asin(n);return t.x=i,t.y=r,t},names:["Mollweide","moll"]};const V_={init:function(){Math.abs(this.lat1+this.lat2)<Qp||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=x_(this.es),this.e1=b_(this.es),this.e2=w_(this.es),this.e3=S_(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Rd(this.e,this.sinphi,this.cosphi),this.ml1=y_(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Qp?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Rd(this.e,this.sinphi,this.cosphi),this.ml2=y_(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=y_(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,n=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var r=y_(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var a=this.ns*Bd(n-this.long0),o=this.x0+e*Math.sin(a),s=this.y0+this.rh-e*Math.cos(a);return t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;return 0!==n&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere?(r=Bd(this.long0+a/this.ns),i=E_(this.g-n/this.a),t.x=r,t.y=i,t):(i=C_(this.g-n/this.a,this.e0,this.e1,this.e2,this.e3),r=Bd(this.long0+a/this.ns),t.x=r,t.y=i,t)},names:["Equidistant_Conic","eqdc"]};const $_={init:function(){this.R=this.a},forward:function(t){var e,n,i=t.x,r=t.y,a=Bd(i-this.long0);Math.abs(r)<=Qp&&(e=this.x0+this.R*a,n=this.y0);var o=D_(2*Math.abs(r/Math.PI));(Math.abs(a)<=Qp||Math.abs(Math.abs(r)-Zp)<=Qp)&&(e=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/a-a/Math.PI),l=s*s,c=Math.sin(o),u=Math.cos(o),h=u/(c+u-1),f=h*h,p=h*(2/c-1),d=p*p,g=Math.PI*this.R*(s*(h-d)+Math.sqrt(l*(h-d)*(h-d)-(d+l)*(f-d)))/(d+l);a<0&&(g=-g),e=this.x0+g;var _=l+h;return g=Math.PI*this.R*(p*_-s*Math.sqrt((d+l)*(l+1)-_*_))/(d+l),n=r>=0?this.y0+g:this.y0-g,t.x=e,t.y=n,t},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,a=(i=t.x/h)*i+(r=t.y/h)*r,h=3*(r*r/(l=-2*(o=-Math.abs(r)*(1+a))+1+2*r*r+a*a)+(2*(s=o-2*r*r+i*i)*s*s/l/l/l-9*o*s/l/l)/27)/(c=(o-s*s/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(h)>1&&(h=h>=0?1:-1),f=Math.acos(h)/3,n=t.y>=0?(-u*Math.cos(f+Math.PI/3)-s/3/l)*Math.PI:-(-u*Math.cos(f+Math.PI/3)-s/3/l)*Math.PI,e=Math.abs(i)<Qp?this.long0:Bd(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(i*i-r*r)+a*a))/2/i),t.x=e,t.y=n,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]};var Y_=n(387);const J_={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new Y_.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))},forward:function(t){var e,n,i,r,a,o,s,l,c,u,h,f,p,d,g,_=t.x,m=t.y,v=Math.sin(t.y),y=Math.cos(t.y),x=Bd(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Qp?(t.x=this.x0+this.a*(Zp-m)*Math.sin(x),t.y=this.y0-this.a*(Zp-m)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=Qp?(t.x=this.x0+this.a*(Zp+m)*Math.sin(x),t.y=this.y0+this.a*(Zp+m)*Math.cos(x),t):(c=this.sin_p12*v+this.cos_p12*y*Math.cos(x),l=(s=Math.acos(c))?s/Math.sin(s):1,t.x=this.x0+this.a*l*y*Math.sin(x),t.y=this.y0+this.a*l*(this.cos_p12*v-this.sin_p12*y*Math.cos(x)),t):(e=x_(this.es),n=b_(this.es),i=w_(this.es),r=S_(this.es),Math.abs(this.sin_p12-1)<=Qp?(a=this.a*y_(e,n,i,r,Zp),o=this.a*y_(e,n,i,r,m),t.x=this.x0+(a-o)*Math.sin(x),t.y=this.y0-(a-o)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=Qp?(a=this.a*y_(e,n,i,r,Zp),o=this.a*y_(e,n,i,r,m),t.x=this.x0+(a+o)*Math.sin(x),t.y=this.y0+(a+o)*Math.cos(x),t):Math.abs(_)<Qp&&Math.abs(m-this.lat0)<Qp?(t.x=t.y=0,t):(u=this.lat0/td,h=this.long0/td,f=m/td,p=_/td,g=(d=this.g.Inverse(u,h,f,p,this.g.AZIMUTH)).azi1*td,t.x=d.s12*Math.sin(g),t.y=d.s12*Math.cos(g),t))},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f,p,d,g,_,m;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*Zp*this.a)return;return n=e/this.a,i=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(e)<=Qp?o=this.lat0:(o=D_(r*this.sin_p12+t.y*i*this.cos_p12/e),s=Math.abs(this.lat0)-Zp,a=Math.abs(s)<=Qp?this.lat0>=0?Bd(this.long0+Math.atan2(t.x,-t.y)):Bd(this.long0-Math.atan2(-t.x,t.y)):Bd(this.long0+Math.atan2(t.x*i,e*this.cos_p12*r-t.y*this.sin_p12*i))),t.x=a,t.y=o,t}return l=x_(this.es),c=b_(this.es),u=w_(this.es),h=S_(this.es),Math.abs(this.sin_p12-1)<=Qp?(o=C_(((f=this.a*y_(l,c,u,h,Zp))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,c,u,h),a=Bd(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=o,t):Math.abs(this.sin_p12+1)<=Qp?(f=this.a*y_(l,c,u,h,Zp),o=C_(((e=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,l,c,u,h),a=Bd(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=o,t):(p=this.lat0/td,d=this.long0/td,g=Math.atan2(t.x,t.y)/td,_=Math.sqrt(t.x*t.x+t.y*t.y),m=this.g.Direct(p,d,g,_,this.g.STANDARD),t.x=m.lon2*td,t.y=m.lat2*td,t)},names:["Azimuthal_Equidistant","aeqd"]};const X_={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y;return i=Bd(l-this.long0),e=Math.sin(c),n=Math.cos(c),r=Math.cos(i),((a=this.sin_p14*e+this.cos_p14*n*r)>0||Math.abs(a)<=Qp)&&(o=1*this.a*n*Math.sin(i),s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)),t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o,s;return t.x-=this.x0,t.y-=this.y0,n=D_((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),i=Math.sin(n),r=Math.cos(n),o=this.long0,Math.abs(e)<=Qp?(s=this.lat0,t.x=o,t.y=s,t):(s=D_(r*this.sin_p14+t.y*i*this.cos_p14/e),a=Math.abs(this.lat0)-Zp,Math.abs(a)<=Qp?(o=this.lat0>=0?Bd(this.long0+Math.atan2(t.x,-t.y)):Bd(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=s,t):(o=Bd(this.long0+Math.atan2(t.x*i,e*this.cos_p14*r-t.y*this.sin_p14*i)),t.x=o,t.y=s,t))},names:["ortho"]};var K_=1,Z_=2,Q_=3,tm=4,em=5,nm=6,im=1,rm=2,am=3,om=4;function sm(t,e,n,i){var r;return t<Qp?(i.value=im,r=0):(r=Math.atan2(e,n),Math.abs(r)<=nd?i.value=im:r>nd&&r<=Zp+nd?(i.value=rm,r-=Zp):r>Zp+nd||r<=-(Zp+nd)?(i.value=am,r=r>=0?r-rd:r+rd):(i.value=om,r+=Zp)),r}function lm(t,e){var n=t+e;return n<-rd?n+=id:n>+rd&&(n-=id),n}const cm={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Zp-nd/2?this.face=em:this.lat0<=-(Zp-nd/2)?this.face=nm:Math.abs(this.long0)<=nd?this.face=K_:Math.abs(this.long0)<=Zp+nd?this.face=this.long0>0?Z_:tm:this.face=Q_,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,i,r,a,o,s={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===em)r=Zp-e,n>=nd&&n<=Zp+nd?(l.value=im,i=n-Zp):n>Zp+nd||n<=-(Zp+nd)?(l.value=rm,i=n>0?n-rd:n+rd):n>-(Zp+nd)&&n<=-nd?(l.value=am,i=n+Zp):(l.value=om,i=n);else if(this.face===nm)r=Zp+e,n>=nd&&n<=Zp+nd?(l.value=im,i=-n+Zp):n<nd&&n>=-nd?(l.value=rm,i=-n):n<-nd&&n>=-(Zp+nd)?(l.value=am,i=-n-Zp):(l.value=om,i=n>0?-n+rd:-n-rd);else{var c,u,h,f,p,d;this.face===Z_?n=lm(n,+Zp):this.face===Q_?n=lm(n,+rd):this.face===tm&&(n=lm(n,-Zp)),f=Math.sin(e),p=Math.cos(e),d=Math.sin(n),c=p*Math.cos(n),u=p*d,h=f,this.face===K_?i=sm(r=Math.acos(c),h,u,l):this.face===Z_?i=sm(r=Math.acos(u),h,-c,l):this.face===Q_?i=sm(r=Math.acos(-c),h,-u,l):this.face===tm?i=sm(r=Math.acos(-u),h,c,l):(r=i=0,l.value=im)}return o=Math.atan(12/rd*(i+Math.acos(Math.sin(i)*Math.cos(nd))-Zp)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===rm?o+=Zp:l.value===am?o+=rd:l.value===om&&(o+=1.5*rd),s.x=a*Math.cos(o),s.y=a*Math.sin(o),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f,p={lam:0,phi:0},d={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?d.value=im:t.y>=0&&t.y>=Math.abs(t.x)?(d.value=rm,e-=Zp):t.x<0&&-t.x>=Math.abs(t.y)?(d.value=am,e=e<0?e+rd:e-rd):(d.value=om,e+=Zp),c=rd/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),(s=1-(i=Math.cos(e))*i*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?s=-1:s>1&&(s=1),this.face===em)l=Math.acos(s),p.phi=Zp-l,d.value===im?p.lam=o+Zp:d.value===rm?p.lam=o<0?o+rd:o-rd:d.value===am?p.lam=o-Zp:p.lam=o;else if(this.face===nm)l=Math.acos(s),p.phi=l-Zp,d.value===im?p.lam=-o+Zp:d.value===rm?p.lam=-o:d.value===am?p.lam=-o-Zp:p.lam=o<0?-o-rd:-o+rd;else{var g,_,m;c=(g=s)*g,_=(c+=(m=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*m)>=1?0:Math.sqrt(1-c),d.value===rm?(c=_,_=-m,m=c):d.value===am?(_=-_,m=-m):d.value===om&&(c=_,_=m,m=-c),this.face===Z_?(c=g,g=-_,_=c):this.face===Q_?(g=-g,_=-_):this.face===tm&&(c=g,g=_,_=-c),p.phi=Math.acos(-m)-Zp,p.lam=Math.atan2(_,g),this.face===Z_?p.lam=lm(p.lam,-Zp):this.face===Q_?p.lam=lm(p.lam,-rd):this.face===tm&&(p.lam=lm(p.lam,+Zp))}return 0!==this.es&&(u=p.phi<0?1:0,h=Math.tan(p.phi),f=this.b/Math.sqrt(h*h+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-f*f)/(this.one_minus_f*f)),u&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var um=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],hm=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],fm=.8487,pm=1.3523,dm=ed/5,gm=1/dm,_m=18,mm=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const vm={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=Bd(t.x-this.long0),n=Math.abs(t.y),i=Math.floor(n*dm);i<0?i=0:i>=_m&&(i=17);var r={x:mm(um[i],n=ed*(n-gm*i))*e,y:mm(hm[i],n)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*fm+this.x0,r.y=r.y*this.a*pm+this.y0,r},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*fm),y:Math.abs(t.y-this.y0)/(this.a*pm)};if(e.y>=1)e.x/=um[18][0],e.y=t.y<0?-Zp:Zp;else{var n=Math.floor(e.y*_m);for(n<0?n=0:n>=_m&&(n=17);;)if(hm[n][0]>e.y)--n;else{if(!(hm[n+1][0]<=e.y))break;++n}var i=hm[n],r=5*(e.y-i[0])/(hm[n+1][0]-i[0]);r=function(t,e,n,i){for(var r=e;i;--i){var a=t(r);if(r-=a,Math.abs(a)<n)break}return r}((function(t){return(mm(i,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(i,t)}),r,Qp,100),e.x/=mm(um[n],r),e.y=(5*n+r)*td,t.y<0&&(e.y=-e.y)}return e.x=Bd(e.x+this.long0),e},names:["Robinson","robin"]};const ym={init:function(){this.name="geocent"},forward:function(t){return _g(t,this.es,this.a)},inverse:function(t){return mg(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var xm=0,bm=1,wm=2,Sm=3,Mm={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const Em={init:function(){if(Object.keys(Mm).forEach(function(t){if(void 0===this[t])this[t]=Mm[t].def;else{if(Mm[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Mm[t].num&&(this[t]=parseFloat(this[t]))}Mm[t].degrees&&(this[t]=this[t]*td)}.bind(this)),Math.abs(Math.abs(this.lat0)-Zp)<Qp?this.mode=this.lat0<0?bm:xm:Math.abs(this.lat0)<Qp?this.mode=wm:(this.mode=Sm,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,n,i,r,a=Math.sin(t.y),o=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case Sm:n=this.sinph0*a+this.cosph0*o*s;break;case wm:n=o*s;break;case bm:n=-a;break;case xm:n=a}switch(e=(n=this.pn1/(this.p-n))*o*Math.sin(t.x),this.mode){case Sm:n*=this.cosph0*a-this.sinph0*o*s;break;case wm:n*=a;break;case xm:n*=-o*s;break;case bm:n*=o*s}return r=1/((i=n*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-n*this.sg)*this.cw*r,n=i*r,t.x=e*this.a,t.y=n*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,n,i,r={x:t.x,y:t.y};i=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*i,n=this.pn1*t.y*this.cw*i,t.x=e*this.cg+n*this.sg,t.y=n*this.cg-e*this.sg;var a=r_(t.x,t.y);if(Math.abs(a)<Qp)r.x=0,r.y=t.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case Sm:r.y=Math.asin(o*this.sinph0+t.y*s*this.cosph0/a),t.y=(o-this.sinph0*Math.sin(r.y))*a,t.x*=s*this.cosph0;break;case wm:r.y=Math.asin(t.y*s/a),t.y=o*a,t.x*=s;break;case xm:r.y=Math.asin(o),t.y=-t.y;break;case bm:r.y=-Math.asin(o)}r.x=Math.atan2(t.x,t.y)}return t.x=r.x+this.long0,t.y=r.y,t},names:["Tilted_Perspective","tpers"]};const Cm={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,n,i,r,a=t.x,o=t.y;if(a-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var s=this.radius_p/r_(this.radius_p*Math.cos(o),Math.sin(o));if(n=s*Math.cos(a)*Math.cos(o),i=s*Math.sin(a)*Math.cos(o),r=s*Math.sin(o),(this.radius_g-n)*n-i*i-r*r*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/r_(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(r/r_(i,e)))}else"sphere"===this.shape&&(e=Math.cos(o),n=Math.cos(a)*e,i=Math.sin(a)*e,r=Math.sin(o),e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/r_(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(r/r_(i,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,n,i,r,a=-1,o=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*r_(1,s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*r_(1,o));var l=s/this.radius_p;if(e=o*o+l*l+a*a,(i=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-n-Math.sqrt(i))/(2*e),a=this.radius_g+r*a,o*=r,s*=r,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+s*s+a*a,(i=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-n-Math.sqrt(i))/(2*e),a=this.radius_g+r*a,o*=r,s*=r,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var Am=1.340264,km=-.081106,Tm=893e-6,Pm=.003796,Nm=Math.sqrt(3)/2;const Lm={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=Bd(t.x-this.long0),n=t.y,i=Math.asin(Nm*Math.sin(n)),r=i*i,a=r*r*r;return t.x=e*Math.cos(i)/(Nm*(Am+3*km*r+a*(7*Tm+9*Pm*r))),t.y=i*(Am+km*r+a*(Tm+Pm*r)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,n,i,r,a=t.y;for(r=0;r<12&&(a-=i=(a*(Am+km*(e=a*a)+(n=e*e*e)*(Tm+Pm*e))-t.y)/(Am+3*km*e+n*(7*Tm+9*Pm*e)),!(Math.abs(i)<1e-9));++r);return n=(e=a*a)*e*e,t.x=Nm*t.x*(Am+3*km*e+n*(7*Tm+9*Pm*e))/Math.cos(a),t.y=Math.asin(Math.sin(a)/Nm),t.x=Bd(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var Fm=1e-10;function Om(t){var e,n,i,r=Bd(t.x-(this.long0||0)),a=t.y;return e=this.am1+this.m1-t_(a,n=Math.sin(a),i=Math.cos(a),this.en),n=i*r/(e*Math.sqrt(1-this.es*n*n)),t.x=e*Math.sin(n),t.y=this.am1-e*Math.cos(n),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Gm(t){var e,n,i,r;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,n=r_(t.x,t.y=this.am1-t.y),r=e_(this.am1+this.m1-n,this.es,this.en),(e=Math.abs(r))<Zp)e=Math.sin(r),i=n*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(r);else{if(!(Math.abs(e-Zp)<=Fm))throw new Error;i=0}return t.x=Bd(i+(this.long0||0)),t.y=E_(r),t}function Dm(t){var e,n,i=Bd(t.x-(this.long0||0)),r=t.y;return n=this.cphi1+this.phi1-r,Math.abs(n)>Fm?(t.x=n*Math.sin(e=i*Math.cos(r)/n),t.y=this.cphi1-n*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function zm(t){var e,n;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i=r_(t.x,t.y=this.cphi1-t.y);if(n=this.cphi1+this.phi1-i,Math.abs(n)>Zp)throw new Error;return e=Math.abs(Math.abs(n)-Zp)<=Fm?0:i*Math.atan2(t.x,t.y)/Math.cos(n),t.x=Bd(e+(this.long0||0)),t.y=E_(n),t}const Im={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Fm)throw new Error;this.es?(this.en=Qg(this.es),this.m1=t_(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=Gm,this.forward=Om):(Math.abs(this.phi1)+Fm>=Zp?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=zm,this.forward=Dm)},names:["bonne","Bonne (Werner lat_1=90)"]};Pg.defaultDatum="WGS84",Pg.Proj=gg,Pg.WGS84=new Pg.Proj("WGS84"),Pg.Point=Jg,Pg.toPoint=Mg,Pg.defs=Gd,Pg.nadgrid=function(t,e,n){return e instanceof ArrayBuffer?function(t,e,n){var i=!0;void 0!==n&&!1===n.includeErrorFields&&(i=!1);var r=new DataView(e),a=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0),11!==e&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(r),o=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:ug(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(r,a),s=function(t,e,n,i){for(var r=176,a=[],o=0;o<e.nSubgrids;o++){var s=fg(t,r,n),l=pg(t,r,s,n,i),c=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),u=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);a.push({ll:[cg(s.lowerLongitude),cg(s.lowerLatitude)],del:[cg(s.longitudeInterval),cg(s.latitudeInterval)],lim:[c,u],count:s.gridNodeCount,cvs:hg(l)});var h=16;!1===i&&(h=8),r+=176+s.gridNodeCount*h}return a}(r,o,a,i),l={header:o,subgrids:s};return ag[t]=l,l}(t,e,n):{ready:og(t,e)}},Pg.transform=Cg,Pg.mgrs=Ig,Pg.version="__VERSION__",function(t){t.Proj.projections.add(n_),t.Proj.projections.add(l_),t.Proj.projections.add(c_),t.Proj.projections.add(f_),t.Proj.projections.add(p_),t.Proj.projections.add(d_),t.Proj.projections.add(__),t.Proj.projections.add(m_),t.Proj.projections.add(v_),t.Proj.projections.add(A_),t.Proj.projections.add(G_),t.Proj.projections.add(z_),t.Proj.projections.add(I_),t.Proj.projections.add(R_),t.Proj.projections.add(j_),t.Proj.projections.add(B_),t.Proj.projections.add(q_),t.Proj.projections.add(U_),t.Proj.projections.add(W_),t.Proj.projections.add(H_),t.Proj.projections.add(V_),t.Proj.projections.add($_),t.Proj.projections.add(J_),t.Proj.projections.add(X_),t.Proj.projections.add(cm),t.Proj.projections.add(vm),t.Proj.projections.add(ym),t.Proj.projections.add(Em),t.Proj.projections.add(Cm),t.Proj.projections.add(Lm),t.Proj.projections.add(Im)}(Pg);const Rm=Pg;var jm=function(t){var e;if(t.svg_){t.Geometries.geoJSONs.worldrg?Um(t):Gf("https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json").then((function(e){var n=zf(e,e.objects.CNTR_RG_20M_2020_4326).features;t.Geometries.geoJSONs.worldrg=n,Um(t)})).catch((function(t){return console.error("Failed to load WORLD_4326.json",t)}));var n=(null===(e=t.minimap_)||void 0===e?void 0:e.debounce)||2;window.addEventListener("estatmap:zoomed-"+t.svgId_,function(t,e){var n;return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,r)}),e)}}((function(t){var e=t.detail,n=Wm(e);if(n){var i=n.lat,r=n.lon,a=Bm(e);e._minimapProjection.rotate([-r,-i]),e._minimapProjection.scale(a),e._minimapGlobe.selectAll("path").attr("d",e._minimapPath)}}),n))}},Bm=function(t){var e=t.position_.z;if(!e||e<=0)return 50;var n=Math.log2(156543/e);return qm(n+-1)},qm=function(t){return 5*Math.pow(2,t)},Um=function(t){try{var e,n,i=t.minimap_||{},r=i.countryId,a=i.x||80,o=i.y||80,s=i.z||160,l=i.color||"#3792B6",c=i.size||160,u=t.Geometries.geoJSONs.worldrg;if(t._minimapContainer=t.svg_.append("g").attr("id","em-minimap").attr("transform","translate(".concat(a,",").concat(o,")")),t._minimapContainer.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","white").attr("stroke",l).attr("stroke-width",3),t._minimapProjection=$p(Yp).scale(249.5).clipAngle(90.000001).scale(s).translate([0,0]),t._minimapPath=Ws().projection(t._minimapProjection),r){var h=u.find((function(t){return t.properties.id===r}));if(!h)return void console.warn("Country ID ".concat(r," not found in geometries"));var f=y(t._minimapPath.bounds(h),2),p=y(f[0],2),d=p[0],g=p[1],_=y(f[1],2),m=[(d+_[0])/2,(g+_[1])/2],v=t._minimapProjection.invert(m);n=v[0],e=v[1]}else{var x=Wm(t);if(!x)return;e=x.lat,n=x.lon}if(t._minimapProjection.rotate([-n,-e]),t._minimapContainer.append("defs").append("clipPath").attr("id","minimap-clip").append("circle").attr("r",c/2).attr("cx",0).attr("cy",0),t._minimapGlobe=t._minimapContainer.append("g").attr("class","em-minimap-globe").attr("clip-path","url(#minimap-clip)"),t._minimapGlobe.selectAll("path.country").data(u).enter().append("path").attr("d",t._minimapPath).attr("fill","#e0e0e0"),r){var b=u.find((function(t){return t.properties.id===r}));t._minimapGlobe.append("path").datum(b).attr("d",t._minimapPath).attr("fill",l).attr("stroke",l).attr("stroke-width",.5)}t._minimapContainer.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","none").attr("stroke",l).attr("stroke-width",3)}catch(t){console.error("Error drawing minimap:",t)}},Wm=function(t){var e,n,i=[t.position_.x,t.position_.y];if("3035"===t.proj_){var r=y(Rm("EPSG:3035","EPSG:4326",i),2);n=r[0],e=r[1]}else if("54030"===t.proj_){var a=y(Rm("EPSG:54030","EPSG:4326",i),2);n=a[0],e=a[1]}else n=i[0],e=i[1];return{lat:e.toFixed(2),lon:n.toFixed(2)}};var Hm=function(t,e){var n=t.transform,i=(e.width_/2-n.x)/n.k,r=(e.height_/2-n.y)/n.k,a=y(e._projection.invert([i,r]),2),o=a[0],s=a[1];e.position_.x=o,e.position_.y=s,window.dispatchEvent(new CustomEvent("estatmap:zoomed-"+e.svgId_,{detail:e})),"function"==typeof e.onZoom_&&e.onZoom_(t,e)},Vm=function(t,e,n){var i,r,a=t.transform,o=(n.width_/2-a.x)/a.k,s=(n.height_/2-a.y)/a.k,l=y(n._projection.invert([o,s]),2),c=l[0],u=l[1];if(n.__programmaticZoom){var h=n.__programmaticZoom;n.position_.x=h.x,n.position_.y=h.y,n.position_.z=h.z,delete n.__programmaticZoom}else n.position_.x=c,n.position_.y=u,n.position_.z=n.__baseZ/a.k;Jm(a,n),null!==(i=n.labels_)&&void 0!==i&&i.values&&Ym(a,n),null!==(r=n.labels_)&&void 0!==r&&r.backgrounds&&$m(a,n),window.dispatchEvent(new CustomEvent("estatmap:zoomed-"+n.svgId_,{detail:n})),"function"==typeof n.onZoom_&&n.onZoom_(t,n)},$m=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).selectAll(".em-label-background"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=parseFloat(t.attr("data-width"))||parseFloat(t.attr("width")),n=parseFloat(t.attr("data-height"))||parseFloat(t.attr("height")),a=parseFloat(t.attr("data-x"))||parseFloat(t.attr("x")),o=parseFloat(t.attr("data-y"))||parseFloat(t.attr("y"));if(e>0&&n>0&&!isNaN(a)&&!isNaN(o)){t.attr("data-width")||(t.attr("data-width",e),t.attr("data-height",n),t.attr("data-x",a),t.attr("data-y",o));var s=e*(1/i),l=n*(1/i),c=a*(1/i),u=o*(1/i);r.push({element:t,targetWidth:s,targetHeight:l,targetX:c,targetY:u})}})),r.forEach((function(t){var e=t.element,n=t.targetWidth,i=t.targetHeight,r=t.targetX,a=t.targetY;e.attr("width",n).attr("height",i).attr("x",r).attr("y",a)}))},Ym=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).select("#em-labels").selectAll("*"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=window.getComputedStyle(this),n=t.attr("font-size"),a=e.fontSize,o=n||a;if(o&&parseFloat(o)>0){var s=parseFloat(t.attr("data-fs"))||parseFloat(n)||parseFloat(a);t.attr("data-fs")||t.attr("data-fs",s);var l=s/i;r.push({element:this,targetFontSize:l})}})),r.forEach((function(t){var e=t.element,n=t.targetFontSize;e.style.setProperty("font-size","".concat(n,"px"),"important")}))},Jm=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).selectAll("*"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=window.getComputedStyle(this),n=t.attr("stroke-width"),a=e.strokeWidth,o=n||a;if(o&&parseFloat(o)>0){var s=parseFloat(t.attr("data-sw"))||parseFloat(n)||parseFloat(a);t.attr("data-sw")||t.attr("data-sw",s);var l=s/i;r.push({element:this,targetStrokeWidth:l})}})),r.forEach((function(t){var e=t.element,n=t.targetStrokeWidth;e.style.setProperty("stroke-width","".concat(n,"px"),"important")}))};var Xm=hp("\t"),Km=Xm.parse;Xm.parseRows,Xm.format,Xm.formatBody,Xm.formatRows,Xm.formatRow,Xm.formatValue;function Zm(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Qm(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=void 0),function(t,e){return fetch(t,e).then(Zm)}(e,n).then((function(e){return t(e,i)}))}}var tv=Qm(pp);Qm(Km);var ev=function(t,e,n){switch(t.proj_){case"3035":return Rm("EPSG:4326","EPSG:3035",[e,n]);case"54030":return Rm("EPSG:4326","EPSG:54030",[e,n]);default:return[e,n]}};function nv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function iv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nv(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rv(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return av(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?av(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function av(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ov(t){return sv.apply(this,arguments)}function sv(){return sv=Nf(Ff().mark((function e(n){var i,r,a=arguments;return Ff().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:"https://raw.githubusercontent.com/eurostat/euronym/main/pub/v3/UTF_LATIN/20/EUR.csv",e.next=3,tv(i,t.autoType);case 3:return r=e.sent,n._placenameLabels=r,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),sv.apply(this,arguments)}function lv(){return lv=Nf(Ff().mark((function t(e){return Ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._placenameLabels){t.next=3;break}return t.next=3,ov(e);case 3:cv(e),window.addEventListener("estatmap:zoomed-"+e.svgId_,(function(t){hv(t.detail,t.detail.__lastTransform)}));case 5:case"end":return t.stop()}}),t)}))),lv.apply(this,arguments)}function cv(t){var e,n=t.svg_,i=(null===(e=t.__lastTransform)||void 0===e?void 0:e.k)||1,r=uv(t);console.log("Filtered ".concat(r.length," placenames for zoom level ").concat(i)),n.select("#em-placenames").remove();var a=n.select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-placenames").attr("class","em-placenames").attr("pointer-events","none");a.selectAll("text").data(r).join("text").attr("x",(function(t){return t.screenX})).attr("y",(function(t){return t.screenY})).text((function(t){return t.name})).attr("font-size",(function(t){return"".concat(13*t.sizeFactor/i,"px")})).attr("font-weight",(function(t){return t.sizeFactor>1?"bold":"normal"})).attr("fill","black").attr("text-anchor","middle").attr("dy","-0.35em").clone(!0).lower().attr("fill","none").attr("stroke","white").attr("opacity",.8).attr("stroke-width",3/i).attr("stroke-linejoin","round"),t.placenameGroup_=a}var uv=function(t){if(!t._placenameLabels)return[];var e,n=t._projection,i=t.width_,r=t.height_,a=t.position_.z,o=[],s=rv(t._placenameLabels||[]);try{for(s.s();!(e=s.n()).done;){var l=e.value,c=+l.rs,u=+l.r1;if(c&&!(a>c)){var h=+l.lon,f=+l.lat,p=y(ev(t,h,f),2),d=y(n([p[0],p[1]]),2),g=d[0],_=d[1];if(!(g<30||g>i-30||_<30||_>r-30)&&(o.push(iv(iv({},l),{},{screenX:g,screenY:_,sizeFactor:a>u?1:1.1})),o.length>=500))break}}}catch(t){s.e(t)}finally{s.f()}return o};function hv(t,e){t._placenameLabels&&t._projection&&cv(t)}function fv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}Sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]}),Rm.defs("EPSG:3035","+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"),Rm.defs("EPSG:54030","+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs");var pv=function(t,e,n){var i={};i._mapType=n,i.updateValuesLabels=Mf,i.svgId_="map",i.svg_=void 0,i.width_=Math.min(795,window.innerWidth),i.height_=0,i.containerId_=void 0,i.gridCartogram_=!1,i.gridCartogramShape_="square",i.gridCartogramMargins_={top:80,right:50,bottom:80,left:150},i.gridCartogramCellPadding_=4,i.gridCartogramPositions_=void 0,i.nutsLevel_=3,i.nutsYear_=2024,i.geo_="EUR",i.proj_="3035",i.projectionFunction_=void 0,i.filterGeometriesFunction_=void 0,i.scale_="20M",i.position_={x:void 0,y:void 0,z:void 0},i.placenames_=!1,i.zoomExtent_=void 0,i.translateExtent_=void 0,i.lockPanUntilZoom_=!0,i.onZoomEnd_=void 0,i.onZoom_=void 0,i.onRegionMouseOver_=void 0,i.onRegionMouseMove_=void 0,i.onRegionMouseOut_=void 0,i.geometries_=void 0,i.processCentroids_=void 0,i.dorling_=!1,i.animateDorling_=!0,i.dorlingStrength_={x:1,y:1},i.dorlingIterations_=1,i.onDorlingProgress_=void 0,i.dorlingWorker_=!1,i.dorlingWorkerD3URL_=void 0,i.title_="",i.titlePosition_=void 0,i.subtitle_="",i.subtitlePosition_=void 0,i.showScalebar_=!1,i.scalebarPosition_=[],i.scalebarUnits_=" km",i.scalebarTextOffset_=[0,12],i.scalebarMaxWidth_=150,i.scalebarHeight_=90,i.scalebarStrokeWidth_=1,i.scalebarSegmentHeight_=6,i.scalebarTickHeight_=8,i.stamp_=void 0,i.minimap_=void 0,i.zoomButtons_=!1,i.insetsButton_=!1,i.tooltip_={fontSize:"14px",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1,omitRegions:["RU","BY","IL","PS"]},i.hoverColor_="red",i.drawCoastalMargin_=!1,i.coastalMarginStdDev_=3,i.drawGraticule_=!1,i.backgroundMap_=!0,i.labels_=void 0,i.annotations_=void 0,i.annotationsAdded=!1,i.patternFill_=void 0,i.showSourceLink_=!0,i.footnote_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",i.footnoteTooltipText_='<div class="em-footnote-tooltip">The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence.</div>',i.nuts2jsonBaseURL_=window.location.hostname.includes("ec.europa.eu")?"https://ec.europa.eu/assets/estat/E/E4/gisco/pub/nuts2json/v2":"https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2",i.noDataFillStyle_="#bcbcbc",i.insets_=[],i.insetTemplates_={},i.insetBoxPosition_=void 0,i.insetBoxPadding_=5,i.insetBoxWidth_=210,i.insetZoomExtent_=null,i.insetScale_="03M";var r=function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}};for(var a in i)r(a);!function(t){t.showZoomButtons=function(e){return console.warn("showZoomButtons() is now DEPRECATED, please use zoomButtons() instead"),t.zoomButtons_=e,t},t.showInsetsButton=function(e){return console.warn("showInsetsButton() is now DEPRECATED, please use insetsButton() instead"),t.insetsButton_=e,t},t.seaFillStyle=function(e){return console.warn("seaFillStyle() is now DEPRECATED, please use the .em-sea CSS class"),ra(".em-sea","fill",e),t},t.cntrgFillStyle=function(e){return console.warn("cntrgFillStyle() is now DEPRECATED, please use the .em-cntrg CSS class"),ra(".em-cntrg","fill",e),t},t.nutsrgFillStyle=function(e){return console.warn("nutsrgFillStyle() is now DEPRECATED, please use the .em-nutsrg CSS class"),ra(".em-nutsrg","fill",e),t},t.nutsbnStroke=function(e){return console.warn("nutsbnStroke() is now DEPRECATED, please use the .bn_0, .bn_1, .bn_2, .bn_3 CSS classes"),e[0]&&ra(".bn_0","stroke",e[0]),e[1]&&ra(".bn_1","stroke",e[1]),e[2]&&ra(".bn_2","stroke",e[2]),e[3]&&ra(".bn_3","stroke",e[3]),t},t.nutsbnStrokeWidth=function(e){return console.warn("nutsbnStrokeWidth() is now DEPRECATED, please use the .bn_0, .bn_1, .bn_2, .bn_3 CSS classes"),e[0]&&ra(".bn_0","stroke-width",e[0]),e[1]&&ra(".bn_1","stroke-width",e[1]),e[2]&&ra(".bn_2","stroke-width",e[2]),e[3]&&ra(".bn_3","stroke-width",e[3]),t},t.graticuleStroke=function(e){return console.warn("graticuleStroke() is now DEPRECATED, please use the .em-graticule CSS class"),ra(".em-graticule","stroke",e),t},t.graticuleStrokeWidth=function(e){return console.warn("graticuleStrokeWidth() is now DEPRECATED, please use the .em-graticule CSS class"),ra(".em-graticule","stroke-width",e),t},t.nutsrgSelFillSty=function(e){return console.warn("nutsrgSelFillSty() is now DEPRECATED, please use hoverColor() instead"),t.hoverColor_=e,t},t.titleFontSize=function(e){return console.warn("map.titleFontSize() is now DEPRECATED. please use the .em-title CSS class"),ra(".em-title","font-size",e),t},t.subtitleFontSize=function(e){return console.warn("map.subtitleFontSize() is now DEPRECATED. please use the .em-subtitle CSS class"),ra(".em-subtitle","font-size",e),t},t.subtitleFontWeight=function(e){return console.warn("map.subtitleFontWeight() is now DEPRECATED. please use the .em-subtitle CSS class"),ra(".em-subtitle","font-weight",e),t},t.titleFill=function(e){return console.warn("map.titleFill() is now DEPRECATED. please use the .em-title CSS class"),ra(".em-title","fill",e),t},t.subtitleFill=function(e){return console.warn("map.subtitleFill() is now DEPRECATED. please use the .em-subtitle CSS class"),ra(".em-subtitle","fill",e),t},t.cntbnStroke=function(e){return console.warn("cntbnStroke() is now DEPRECATED, please use the .em-cntbn .em-bn-eu .em-bn-efta .em-bn-cc .em-bn-oth CSS classes"),e.eu&&ra(".em-bn-eu","stroke",e.eu),e.efta&&ra(".em-bn-efta","stroke",e.efta),e.cc&&ra(".em-bn-cc","stroke",e.cc),e.oth&&ra(".em-bn-oth","stroke",e.oth),e.co&&ra(".em-bn-co","stroke",e.co),t},t.cntbnStrokeWidth=function(e){return console.warn("cntbnStrokeWidth() is now DEPRECATED, please use the .em-cntbn .em-worldbn .em-bn-eu .em-bn-efta .em-bn-cc .em-bn-oth CSS classes"),e.eu&&ra(".em-bn-eu","stroke-width",e.eu),e.efta&&ra(".em-bn-efta","stroke-width",e.efta),e.cc&&ra(".em-bn-cc","stroke-width",e.cc),e.oth&&ra(".em-bn-oth","stroke-width",e.oth),e.co&&ra(".em-bn-co","stroke-width",e.co),t},t.worldStroke=function(e){return console.warn("map.worldStroke() is now DEPRECATED. please use the .em-worldbn .em-bn-co .em-bn-d CSS classes"),ra(".em-worldbn","stroke",e),t},t.worldStrokeWidth=function(e){return console.warn("map.worldStrokeWidth() is now DEPRECATED. please use the .em-worldbn .em-bn-co .em-bn-d CSS classes"),ra(".em-worldbn","stroke-width",e),t},t.worldCoastStroke=function(e){return console.warn("map.worldCoastStroke() is now DEPRECATED. please use the .em-bn-co CSS class"),ra(".em-bn-co","stroke",e),t},t.worldCoastStrokeWidth=function(e){return console.warn("map.worldCoastStrokeWidth() is now DEPRECATED. please use the .em-bn-co CSS class"),ra(".em-bn-co","stroke-width",e),t},t.worldFillStyle=function(e){return console.warn("map.worldFillStyle() is now DEPRECATED. please use the .em-worldrg CSS class"),ra(".em-worldrg","fill",e),t},t.coastalMarginWidth=function(e){return console.warn("map.coastalMarginWidth() is now DEPRECATED. please use the #em-coast-margin CSS rule"),ra("#em-coast-margin","stroke-width",e),t},t.coastalMarginColor=function(e){return console.warn("map.coastalMarginColor() is now DEPRECATED. please use the #em-coast-margin CSS rule"),ra("#em-coast-margin","stroke",e),t},t.fontFamily=function(e){return console.warn("map.fontFamily() is now DEPRECATED. please use the .em-map CSS class"),ra(".em-map","font-family",e),t},t.botTxtFontSize=function(e){return console.warn("map.botTxtFontSize() is now DEPRECATED. please use the .em-footnote CSS class"),ra(".em-footnote","font-size",e),t},t.botTxtFill=function(e){return console.warn("map.botTxtFill() is now DEPRECATED. please use the .em-footnote CSS class"),ra(".em-footnote","fill",e),t},t.scalebarFontSize=function(e){return console.warn("map.scalebarFontSize() is now DEPRECATED. please use the .em-scalebar-label CSS class"),ra(".em-scalebar-label","font-size",e),t},t.frameStroke=function(e){return console.warn("map.frameStroke() is now DEPRECATED. please use the .em-frame CSS class"),ra(".em-frame","stroke",e),t},t.frameStrokeWidth=function(e){return console.warn("map.frameStrokeWidth() is now DEPRECATED. please use the .em-frame CSS class"),ra(".em-frame","stroke-width",e),t},t.psClassifMethod=function(e){return console.warn("psClassifMethod() is now DEPRECATED. please use psClassificationMethod instead"),t.psClassificationMethod_=e,t},t.geoCenter=function(e){return console.warn("map.geoCenter() is now DEPRECATED. Please use map.position({x,y,z}) instead."),t.position_.x=e[0],t.position_.y=e[1],t},t.pixelSize=function(e){return console.warn("map.pixelSize() is now DEPRECATED. Please use the z property in map.position({x,y,z}) instead."),t.position_.z=e,t},t.pixSize=function(e){return console.warn("map.pixelSize() is now DEPRECATED. Please use the z property in map.position({x,y,z}) instead."),t.position_.z=e,t},t.tooltipText=function(e){return console.warn("map.tooltipText() is now DEPRECATED. Please use map.tooltip(config.textFunction) instead. See API reference for details."),t.tooltip_.textFunction=e,t},t.classifMethod=function(e){return console.warn("map.classifMethod() is now DEPRECATED. please use map.classificationMethod() instead."),t.classificationMethod_=e,t},t.threshold=function(e){return console.warn("map.threshold() is now DEPRECATED. please use map.thresholds() instead."),t.thresholds_=e,t},t.psThreshold=function(e){return console.warn("map.psThreshold() is now DEPRECATED. please use map.psThresholds() instead."),t.psThresholds_=e,t},t.clnb=function(e){return console.warn("map.clnb() is now DEPRECATED. please use map.numberOfClasses() instead."),t.numberOfClasses_=e,t},t.nutsLvl=function(e){return console.warn("map.nutsLvl() is now DEPRECATED. please use map.nutsLevel() instead."),t.nutsLevel_=e,t},t.lg=function(e){return console.warn("map.lg() is now DEPRECATED. please use map.language() instead."),t.language_=e,t},t.bottomText=function(e){return console.warn("bottomText is now DEPRECATED. Please use the footnote() method and em-footnote CSS class instead."),t.footnote_=e,t},t.botTxtFontSize=function(e){return console.warn("botTxtFontSize is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtFill=function(e){return console.warn("botTxtFill is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtPadding=function(e){return console.warn("botTxtPadding is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtTooltipTxt=function(e){return console.warn("botTxtTooltipTxt is now DEPRECATED. Please use footnoteTooltipText() instead."),t},t.tooltipShowFlags=function(e){return console.warn("tooltipShowFlags is now DEPRECATED. Please use out.tooltip({showFlags}) instead."),t.tooltip_.showFlags=e,t},t.colorFun=function(e){return console.warn("colorFun is now DEPRECATED. Please use out.colorFunction() instead."),t.colorFunction_=e,t},t.filtersDefinitionFun=function(e){return console.warn("filtersDefinitionFun is now DEPRECATED. Please use out.filtersDefinitionFunction() instead."),t.filtersDefinitionFunction_=e,t},t.labelling=function(e){return console.warn("labelling is now DEPRECATED. Please use out.labels({}) configuration object instead. See documentation for details."),t},t.labelsConfig=function(e){return console.warn("labelsConfig is now DEPRECATED. Please use out.labels({config:yourConfig}) configuration object instead. See documentation for details."),t.labels_=Object.assign(t.labels_||{},{config:e}),t},t.statLabelsPositions=function(e){return console.warn("statLabelsPositions is now DEPRECATED. Please use out.labels({statLabelsPositions:yourPositions}) instead. See documentation for details."),t.labels_=Object.assign(t.labels_||{},{statLabelsPositions:e}),t},t.labelsToShow=function(e){return console.warn("labelsToShow is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) function instead. See documentation for details."),t},t.labelShadowsToShow=function(e){return console.warn("labelShadowsToShow is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) function instead. See documentation for details."),t},t.labelShadow=function(e){return console.warn("labelShadow is now DEPRECATED. Please use out.labels({labelShadow:boolean}) instead. See documentation for details."),t},t.labelShadowWidth=function(e){return console.warn("labelShadow is now DEPRECATED. Please use out.labels({labelShadow:boolean}) instead. See documentation for details."),t},t.labelFilterFunction=function(e){return console.warn("labelFilterFunction is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) instead. See documentation for details."),t},t.labelFill=function(e){return console.warn("map.labelFill() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelStroke=function(e){return console.warn("map.labelStroke() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelStrokeWidth=function(e){return console.warn("map.labelStrokeWidth() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelOpacity=function(e){return console.warn("map.labelOpacity() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelValuesFontSize=function(e){return console.warn("map.labelValuesFontSize() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelShadowWidth=function(e){return console.warn("map.labelShadowWidth() is now DEPRECATED. please use the .em-stat-labels-shadows CSS class"),t},t.labelShadowColor=function(e){return console.warn("map.labelShadowColor() is now DEPRECATED. please use the .em-stat-labels-shadows CSS class"),t},t.countriesToShow=function(e){return console.warn("map.countriesToShow() is now DEPRECATED. please use the map.filterGeometriesFunction() function if you wish to filter the default geometries."),t},t.bordersToShow=function(e){return console.warn("map.bordersToShow() is now DEPRECATED. please use the map.filterGeometriesFunction() function if you wish to filter the default geometries."),t}}(i),i.geo=function(t){return arguments.length?(i.geo_=t.toUpperCase(),i):i.geo_},["tooltip_","nuts2jsonBaseURL_","processCentroids_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return i[t];if("object"!==ma(e)||null===e||Array.isArray(e))i[t]=e;else for(var n in e)i[t][n]=e[n];return i.insetTemplates_&&ha(i.insetTemplates_,i.svgId_,(function(e,n){e[t.substring(0,t.length-1)](n)}),e),i}})),i.title=function(t){return arguments.length?(i.title_=t,i.svg()&&i.svg().select("#title"+i.geo()).text(t),i):i.title_},i.subtitle=function(t){return arguments.length?(i.subtitle_=t,i.svg()&&i.svg().select("#subtitle"+i.geo()).text(t),i):i.subtitle_},i.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?i.insets_="default":1==arguments.length&&!1===arguments[0]?i.insets_=!1:1==arguments.length&&Array.isArray(arguments[0])?i.insets_=arguments[0]:i.insets_=arguments,i):i.insets_},i.drawGraticule=function(t){if(!arguments.length)return i.drawGraticule_;i.drawGraticule_=t;var e=i.svg_?i.svg().select("#em-graticule"):null,n=i.svg_?i.svg_.select("#em-zoom-group-"+i.svgId_):null;return e&&(e._groups[0][0]&&0==t?e.remove():i.Geometries.geoJSONs.graticule&&i._pathFunction&&n&&1==t&&(e.remove(),n.append("g").attr("id","em-graticule").selectAll("path").data(i.Geometries.geoJSONs.graticule).enter().append("path").attr("d",i._pathFunction).attr("class","em-graticule"),i.svg().select("#em-graticule").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])})))),i},i.drawCoastalMargin=function(t){if(!arguments.length)return i.drawCoastalMargin_;if(i.drawCoastalMargin_=t,i.svg_){var e=xa("#em-coast-margin"),n=Ot("#em-coastal-blur"),r=Ot("#em-zoom-group-"+i.svgId_)||null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&i._pathFunction&&r){e.remove(),n.remove(),i.svg_.append("filter").attr("id","em-coastal-blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var a=function(t){var e=Ot("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-coast-margin");t._geom.cntbn&&e.append("g").attr("id","em-coast-margin-cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._pathFunction),t._geom.nutsbn&&e.append("g").attr("id","em-coast-margin-nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._pathFunction),t._geom.worldbn&&e.append("g").attr("id","em-coast-margin-nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._pathFunction)};i.insetTemplates_&&i.drawCoastalMargin_&&(ha(i.insetTemplates_,i.svgId_,a),a(i)),xa("#em-coast-margin").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}}return i},i.annotations=function(t){return arguments.length?(i.annotations_=t,wf(i),i):i.annotations_},i.stamp=function(t){return arguments.length?(i.stamp_=t,tp(i.stamp_,i),i):i.stamp_},i.minimap=function(t){return arguments.length?(i.minimap_=t,jm(i),i):i.minimap_},i.labels=function(t){return arguments.length?(i.labels_=t,function(t){if(t.svg_){var e=t.svg_.selectAll("#em-labels > *");if(e&&e.remove(),t.labels_){var n=t.labels_,i=t.svg_.select("#em-zoom-group-"+t.svgId_);Sf(t,i),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t),t.insetTemplates_&&ha(t.insetTemplates_,t.svgId_,(function(t){if(n){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);t.labels_&&Sf(t,e),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t)}}))}}}(i),i):i.labels_},i.position=function(t){return arguments.length?(i.position_=t,function(t,e){if(t.svg_&&t.__zoomBehavior){var n=t.svg_,i=n.select("#em-zoom-group-"+t.svgId_),r=t.__baseZ/e.z,a=y(t._projection([e.x,e.y]),2),o=a[0],s=a[1],l=t.width_/2-o*r,c=t.height_/2-s*r,u=Vr.translate(l,c).scale(r);t.__programmaticZoom={x:e.x,y:e.y,z:e.z},t.__lastTransform=u,n.call(t.__zoomBehavior.transform,u),i.attr("data-zoom",r),t.position_.x=e.x,t.position_.y=e.y,t.position_.z=e.z}}(i,t),i):i.position_},i.Geometries=Xf(i,e),i.updateGeoMapTemplate=function(t){return i.Geometries.defaultGeoData=null,i.Geometries.allNUTSGeoData=null,i.Geometries.centroidsData=null,i.geometries_?(i.Geometries.setUserGeometries(i.geometries_),i.buildMapTemplate(),t&&t()):i.Geometries.getDefaultGeoData(i.geo_,i.filterGeometriesFunction_,i.nutsLevel_).then((function(){i.buildMapTemplate(),t&&t()})),ha(i.insetTemplates_,i.svgId_,(function(e){e.updateGeoMapTemplate(t)})),i};i.buildMapTemplateBase=function(){var t=function(t){var e=Ot("#"+t.svgId());return 0==e.size()&&(e=Ot("body").append("svg").attr("id",t.svgId())),e.attr("class","em-map"),e.classed("em--"+t._mapType,!0),"pie"!==t._mapType&&"coxcomb"!==t._mapType||e.classed("em--ps",!0),e}(i);i.svg_=t,i.containerId_||(i.containerId_=i.svgId_),i.tooltip_.containerId||(i.tooltip_.containerId=i.containerId_),xa("#"+i.svgId()+" > *").remove(),"WORLD"==i.geo_.toUpperCase()&&(i.height()||i.height(.55*i.width()),t.attr("width",i.width()).attr("height",i.height()),i.proj_=54030),i.height()||i.height(.85*i.width()),t.attr("width",i.width()).attr("height",i.height()),t.append("defs").attr("class","em-defs").append("clipPath").attr("id",i.svgId_+"-clip-path").append("path").attr("d",function(t,e,n,i){return t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),i=parseFloat(i,10),t<0||e<0||n<0||i<0?"":"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+i)+" "+t+","+(e+i)+"z"}(0,0,i.width_,i.height_)),i.drawCoastalMargin_&&t.append("filter").attr("id","em-coastal-blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var n=t.insert("g",":first-child").attr("id","em-drawing-"+i.svgId_).attr("class","em-drawing-group").attr("clip-path","url(#"+i.svgId_+"-clip-path)");n.append("g").attr("id","em-zoom-group-"+i.svgId_).attr("class","em-zoom-group");return function(t){if(t.insetTemplates_){for(var e in t.insetTemplates_){var n=Ot("#"+t.insetTemplates_[e].svgId_);n&&n.html("")}t.insetTemplates_={}}}(i),function(t,e){t.insetBoxPosition_||(t.insetBoxPosition_=[t.width_-t.insetBoxWidth_-2*t.insetBoxPadding_,2*t.insetBoxPadding_]);var n=Ot("#"+t.svgId_).select("#em-drawing-"+t.svgId_).append("g").attr("id","em-insets-group").attr("class","em-insets").attr("transform","translate("+t.insetBoxPosition_[0]+","+t.insetBoxPosition_[1]+")");"default"===t.insets_&&(t.insets_=Zf(t.insetBoxWidth_,t.insetBoxPadding_));for(var i=0;i<t.insets_.length;i++){var r=t.insets_[i];if(r.svgId=r.svgId||"inset"+r.geo+Math.random().toString(36).substring(7),0==Ot("#"+r.svgId).size()){var a=null==r.x?t.insetBoxPadding_:r.x,o=null==r.y?t.insetBoxPadding_+i*(t.insetBoxPadding_+t.insetBoxWidth_):r.y;n.append("g").attr("id","em-inset-"+r.svgId).attr("class","em-inset").attr("transform","translate("+a+","+o+")").append("svg").attr("id",r.svgId)}if(t.insetTemplates_[r.geo]){var s=Kf(r,t,e);s.buildMapTemplateBase(),t.insetTemplates_[r.geo]=[t.insetTemplates_[r.geo],s]}else{var l=Kf(r,t,e).buildMapTemplateBase();t.insetTemplates_[r.geo]=l}}}(i,e),n.append("rect").attr("id","em-frame-"+i.geo_).attr("class","em-frame").attr("x",0).attr("y",0).attr("width",i.width_).attr("height",i.height_),i.stamp_&&tp(i.stamp_,i),i},i.buildMapTemplate=function(){var t,n=i.svg().select("#em-zoom-group-"+i.svgId_);if(n.selectAll("*").remove(),1==i.gridCartogram_?(!function(t){var e=Ot("#em-zoom-group-".concat(t.svgId_)).append("g").attr("id","em-grid-container");t.gridCartogramMargins_=t.gridCartogramMargins_||{top:80,right:80,bottom:80,left:80};var n=gp(t),i=_p(n),r=mp(i,t);"hexagon"===t.gridCartogramShape_?yp(e,r,t):vp(e,r,t),bp(e,t.width_,t.height_,t.gridCartogramMargins_)}(i),i.footnote_=!1):(i.position_.x&&i.position_.y||c(),i.position_.z=i.position_.z||u(),h(),f(),(i.zoomExtent()||i.zoomButtons_)&&(i.zoomExtent_||(console.warn("Zoom buttons are enabled, but no zoom extent is defined. Setting default extent to map.zoomExtent([1,10])."),i.zoomExtent_=[1,10]),function(t){var e=Ot("#"+t.svgId()),n=Vr,i=!t.lockPanUntilZoom_,r=!1,a=t.zoomExtent_||[0,0],o=t.translateExtent_||!t.lockPanUntilZoom_?[[-t.width_,-t.height_],[2*t.width_,2*t.height_]]:[[0,0],[t.width_,t.height_]];if(t.__zoomBehavior=ea().filter((function(t){return!t.target.closest(".em-zoom-buttons")&&!t.target.closest(".em-button")})).extent([[0,0],[t.width_,t.height_]]).scaleExtent(a).translateExtent(o).on("zoom",(function(a){var o=a.transform,s=t.svg_.select("#em-zoom-group-"+t.svgId_);r?r=!1:(t.__lastTransform=o,o.k!==n.k?(t.lockPanUntilZoom_&&(i=!0),Vm(a,n,t),s.attr("data-zoom",o.k).attr("transform",o),n=o):!t.lockPanUntilZoom_||i?(Hm(a,t),s.attr("transform",o),n=o):(r=!0,e.call(t.__zoomBehavior.transform,n)))})).on("end",(function(e){var n;return null===(n=t.onZoomEnd_)||void 0===n?void 0:n.call(t,e,t)})),t.__lastTransform=n,!t.__baseZ){var s=t.height_/2,l=y(t._projection.invert([0,s]),1)[0],c=y(t._projection.invert([t.width_,s]),1)[0];t.__baseZ=(c-l)/t.width_}e.call(t.__zoomBehavior)}(i)),i.backgroundMap_&&l(i)),e&&o(i),i.labels_&&Sf(i,n),i.annotations_&&(wf(i),i.annotationsAdded=!0),i.placenames_&&function(t){lv.apply(this,arguments)}(i),i.title()){var r=i.isInset?"em-inset-title":"em-title";i.titlePosition()||i.titlePosition([10,aa(r)+(i.isInset?0:10)]),i.svg().append("text").attr("id","title"+i.geo_).attr("class",r).attr("x",i.titlePosition()[0]).attr("y",i.titlePosition()[1]).html(i.title())}if(i.subtitle()){var a=i.isInset?"em-inset-subtitle":"em-subtitle",s=i.isInset?"em-inset-title":"em-title";i.subtitlePosition()||i.subtitlePosition([10,aa(s)+aa(a)+15]),i.svg().append("text").attr("id","subtitle"+i.geo_).attr("class",a).attr("x",i.subtitlePosition()[0]).attr("y",i.subtitlePosition()[1]).html(i.subtitle())}if((i.footnote_&&d(),i.showSourceLink_)&&((t=e?i.stat("size"):i.stat())&&t.eurostatDatasetCode)){var p=t.eurostatDatasetCode,g="https://ec.europa.eu/eurostat/databrowser/view/".concat(p,"/default/table?lang=en"),m=i.svg().append("a").attr("class","em-source-dataset-link").attr("href",g).attr("target","_blank").append("text").attr("class","em-source-dataset-link-text").attr("x",i.width_).attr("y",i.height_).text("EUROSTAT").attr("text-anchor","end").node().getComputedTextLength();i.svg().append("text").attr("class","em-source-pretext").attr("x",i.width_-m-2).attr("y",i.height_).text("Source:").attr("text-anchor","end")}return i.showScalebar_&&(2!==i.scalebarPosition_.length&&(i.scalebarPosition_[0]=15,i.scalebarPosition_[1]=i.height_-50),_()),i.minimap_&&jm(i),i.zoomButtons_&&function(t){var e=Ot("#"+t.svgId()).append("g").attr("class","em-zoom-buttons").style("pointer-events","all"),n=parseInt(oa("em-button","width"))||30,i=e.append("g").attr("class","em-zoom-in em-button").style("cursor","pointer");i.append("title").text("Zoom in"),i.append("rect").attr("width",n).attr("height",n),i.append("text").attr("x",n/2).attr("y",n/2+7).text("+");var r=e.append("g").attr("class","em-zoom-out em-button").style("cursor","pointer").attr("transform","translate(0, ".concat(n,")")).style("cursor","pointer");r.append("title").text("Zoom out"),r.append("rect").attr("width",n).attr("height",n),r.append("text").attr("x",n/2).attr("y",n/2+7).text("−"),i.on("click",(function(e){e.preventDefault(),e.stopPropagation(),function(t){t.svg_.transition().call(t.__zoomBehavior.scaleBy,2)}(t)})),r.on("click",(function(e){e.preventDefault(),e.stopPropagation(),function(t){t.svg_.transition().call(t.__zoomBehavior.scaleBy,.5)}(t)}))}(i),i.insetsButton_&&function(t){var e=Ot("#"+t.svgId()),n=parseInt(oa("em-button","width"))||30,i=e.append("g").attr("class","em-insets-button em-button").attr("id","em-insets-button");i.append("title").text("Show/hide inset maps"),i.append("rect").attr("width",n).attr("height",n);var r=document.createComment("!Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.");i.node().appendChild(r);var a=n/700;i.append("path").attr("d","M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1l0 9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1l1 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24l0 4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6l29.4 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-20.7 0c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3l11.3 0c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16l7.3 0c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4l-20.9 0c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3l0 3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3l21.3 0c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z").attr("transform","translate(".concat(n/2,", ").concat(n/2,") scale(").concat(a,") translate(").concat(-256,", ").concat(-256,")")).attr("fill","#333").attr("pointer-events","none"),i.on("click",(function(t){t.preventDefault(),t.stopPropagation();var n=e.select("#em-insets-group");"none"===n.style("display")||""===n.style("display")?n.style("display","block"):n.style("display","none")}))}(i),i};var o=function(t){var e;t.Geometries.centroidsData?e="mixed"==t.nutsLevel_?[].concat(x(t.Geometries.centroidsData[0].features),x(t.Geometries.centroidsData[1].features),x(t.Geometries.centroidsData[2].features),x(t.Geometries.centroidsData[3].features)):t.Geometries.centroidsData.features:"WORLD"==t.geo_&&(e=[],t.Geometries.geoJSONs.worldrg.forEach((function(t){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fv(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);"FR"==t.properties.id?n.geometry={coordinates:[2.2,46.2],type:"Point"}:n.geometry={coordinates:bo(t),type:"Point"},e.push(n)}))),t.processCentroids_&&(e=t.processCentroids_(e));var n=e.map((function(e){var n=t._projection(e.geometry.coordinates);return e.properties.centroid=n,e}));t.Geometries._allCentroidsFeatures=x(n),t.Geometries.centroidsFeatures=n.filter((function(e){return s(e.properties.id,t)})),(i.getCentroidsGroup(t).empty()?t.svg().select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-centroids-".concat(t.svgId_)).attr("class","em-centroids"):i.getCentroidsGroup(t)).selectAll("g.em-centroid").data(t.Geometries.centroidsFeatures,(function(t){return t.properties.id})).join((function(t){return t.append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")}))}),(function(t){return t}),(function(t){return t.remove()}))};i.getCentroidsGroup=function(t){return t.svg().select("#em-centroids-".concat(t.svgId_))},i.refreshCentroids=function(t){var e=t.Geometries._allCentroidsFeatures;if(e)return t.Geometries.centroidsFeatures=e.filter((function(e){return s(e.properties.id,t)})),i.getCentroidsGroup(t).selectAll("g.em-centroid").data(t.Geometries.centroidsFeatures,(function(t){return t.properties.id})).join((function(t){return t.append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")}))}),(function(t){return t}),(function(t){return t.remove()})),t};var s=function(t,e){return!e.statCodes_||e.statCodes_.some((function(n){var i,r=null===(i=e.statData(n))||void 0===i?void 0:i.get(t);return r&&!isNaN(r.value)&&0!==r.value}))},l=function(t){var e=t.svg().select("#em-zoom-group-"+t.svgId_);e.append("rect").attr("id","sea").attr("class","em-sea").attr("x",-5*t.width_).attr("y",-5*t.height_).attr("width",11*t.width_).attr("height",11*t.height_),"WORLD"==t.geo_&&e.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",t._pathFunction).attr("class","em-graticule"),t.drawCoastalMargin_&&g(),t.geometries_?t.Geometries.addUserGeometriesToMap(t.geometries_,e,t._pathFunction):t.Geometries.addDefaultGeometriesToMap(e,t.drawGraticule_,t._pathFunction,t.nutsLevel_,t.nutsYear_,t.geo_,t.proj_,t.scale_)},c=function(){var t,e=dv[i.geo_+"_"+i.proj_];e?(i.position_.x=i.position_.x||e.geoCenter[0],i.position_.y=i.position_.y||e.geoCenter[1]):null!==(t=i.Geometries.defaultGeoData)&&void 0!==t&&t.bbox&&(i.position_.x=i.position_.x||.5*(i.Geometries.defaultGeoData.bbox[0]+i.Geometries.defaultGeoData.bbox[2]),i.position_.y=i.position_.y||.5*(i.Geometries.defaultGeoData.bbox[1]+i.Geometries.defaultGeoData.bbox[3])),p()},u=function(){var t,e=dv[i.geo_+"_"+i.proj_];return e?800*e.pixelSize/i.width_:null!==(t=i.Geometries.defaultGeoData)&&void 0!==t&&t.bbox?Math.min((i.Geometries.defaultGeoData.bbox[2]-i.Geometries.defaultGeoData.bbox[0])/i.width_,(i.Geometries.defaultGeoData.bbox[3]-i.Geometries.defaultGeoData.bbox[1])/i.height_):100},h=function(){var t;"WORLD"===i.geo_?i._projection=i.projectionFunction_||ic(dc).scale(152.63).translate([i.width_/2,i.height_/2]).scale((i.width_-20)/(2*Math.PI)):i._projection=i.projectionFunction_||function(){var t,e,n,i,r,a,o,s=1,l=0,c=0,u=1,h=1,f=0,p=null,d=1,g=1,_=Lo({point:function(t,e){var n=y([t,e]);this.stream.point(n[0],n[1])}}),m=No;function v(){return d=s*u,g=s*h,a=o=null,y}function y(n){var i=n[0]*d,r=n[1]*g;if(f){var a=r*t-i*e;i=i*t+r*e,r=a}return[i+l,r+c]}return y.invert=function(n){var i=n[0]-l,r=n[1]-c;if(f){var a=r*t+i*e;i=i*t-r*e,r=a}return[i/d,r/g]},y.stream=function(t){return a&&o===t?a:a=_(m(o=t))},y.postclip=function(t){return arguments.length?(m=t,p=n=i=r=null,v()):m},y.clipExtent=function(t){return arguments.length?(m=null==t?(p=n=i=r=null,No):Po(p=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),v()):null==p?null:[[p,n],[i,r]]},y.scale=function(t){return arguments.length?(s=+t,v()):s},y.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],v()):[l,c]},y.angle=function(n){return arguments.length?(e=Da(f=n%360*Ta),t=Fa(f),v()):f*ka},y.reflectX=function(t){return arguments.length?(u=t?-1:1,v()):u<0},y.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},y.fitExtent=function(t,e){return Bo(y,t,e)},y.fitSize=function(t,e){return qo(y,t,e)},y.fitWidth=function(t,e){return Uo(y,t,e)},y.fitHeight=function(t,e){return Wo(y,t,e)},y}().reflectY(!0).fitSize([i.width_,i.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(t=_a(i))[0],t[1]],[t[2],t[3]]]}})},f=function(){i._pathFunction=Ws().projection(i._projection)},p=function(){var t=fa("x"),e=fa("y"),n=fa("z");null==t||null==t||isNaN(+t)||(i.position_.x=+t),null==e||null==e||isNaN(+e)||(i.position_.y=+e),null==n||null==n||isNaN(+n)||(i.position_.z=+n)},d=function(){i.svg().append("text").attr("id","em-footnote").attr("class","em-footnote").attr("x",0).attr("y",i.height_).html(i.footnote_).on("mouseover",(function(){i._tooltip.mw___=i._tooltip.style("max-width"),i._tooltip.style("max-width","400px"),i.footnoteTooltipText_&&i._tooltip.mouseover(i.footnoteTooltipText_)})).on("mousemove",(function(t){i.footnoteTooltipText_&&i._tooltip.mousemove(t)})).on("mouseout",(function(t){i.footnoteTooltipText_&&i._tooltip.mouseout(t),i._tooltip.style("max-width",i._tooltip.mw___)}))},g=function(){var t=i.svg().select("#em-zoom-group-"+i.svgId_).append("g").attr("id","em-coast-margin").attr("class","em-coast-margin");i.Geometries.geoJSONs.cntbn&&t.append("g").attr("id","em-coast-margin-cnt").attr("class","em-coast-margin-cnt").selectAll("path").data(i.Geometries.geoJSONs.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._pathFunction),i.Geometries.geoJSONs.nutsbn&&t.append("g").attr("id","em-coast-margin-nuts").attr("class","em-coast-margin-nuts").selectAll("path").data(i.Geometries.geoJSONs.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._pathFunction),i.Geometries.geoJSONs.worldbn&&t.append("g").attr("id","em-coast-margin-world").attr("class","em-coast-margin-world").selectAll("path").data(i.Geometries.geoJSONs.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",i._pathFunction)},_=function(){var t=i.scalebarMaxWidth_,e=i.scalebarTextOffset_[0],n=i.scalebarTextOffset_[1],r=i.position_.z,a=m(t*r),o=a[0]/r,s=a[1],l=i.svg().append("g").attr("class","em-scalebar").attr("transform","translate(".concat(i.scalebarPosition_[0],",").concat(i.scalebarPosition_[1],")")).attr("width",t+20).attr("height",i.scalebarHeight_);l.append("line").attr("class","em-scalebar-line").attr("x1",5).attr("y1",1).attr("x2",5).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e).attr("y",i.scalebarTickHeight_+n).text("0");var c={1:4,2:2,5:5}[s],u=o/c,h=i.scalebarSegmentHeight_/2+1;if(u>=15){for(var f=1;f<c;f++)if(l.append("line").attr("class","em-scalebar-line").attr("x1",5+i.scalebarStrokeWidth_/2+f*u).attr("y1",1).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e+f*u).attr("y",i.scalebarTickHeight_+n).text(v(a[0]/c*f)),1==f)l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+i.scalebarStrokeWidth_-1).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",h);else{var p=5+i.scalebarStrokeWidth_/2+(f-1)*u;p>0&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",p).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",h)}u>=15&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+(c-1)*u).attr("y1",h).attr("x2",5+c*u).attr("y2",h)}else l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+i.scalebarStrokeWidth_-1).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+u*c).attr("y2",h);l.append("line").attr("class","em-scalebar-line").attr("x1",o+5).attr("y1",1).attr("x2",o+5).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",o+5+e).attr("y",i.scalebarTickHeight_+n).text(v(a[0])+i.scalebarUnits_)},m=function(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10)));return 5*e<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]},v=function(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3};return i},dv={EUR_3035:{geoCenter:[479e4,342e4],pixelSize:6400},IC_32628:{geoCenter:[443468,3145647],pixelSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixelSize:130},MQ_32620:{geoCenter:[716521,1621322],pixelSize:130},GF_32622:{geoCenter:[266852,444074],pixelSize:500},RE_32740:{geoCenter:[348011,7661627],pixelSize:130},YT_32738:{geoCenter:[516549,8583920],pixelSize:70},MT_3035:{geoCenter:[4719755,1441701],pixelSize:70},PT20_32626:{geoCenter:[397418,4271471],pixelSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixelSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixelSize:40},IS_3035:{geoCenter:[3011804,496e4],pixelSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixelSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixelSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixelSize:500},WORLD_54030:{geoCenter:[14,17],pixelSize:9e3}};function gv(t,e){var n,i,r,a,o=function(t,e,n){if(0===Object.entries(t).length)return null;var i,r=[];if(n&&!mv(n.name)&&(n=null),"string"==typeof t&&(t=[t]),Array.isArray(t)||_v(t)){if(t.length===e)return n&&-1===t.findIndex((function(t){return null==t}))?n.from(t):t;if(1===t.length){for(i=0;i<e;i++)r.push(t[0]);return r}}for(i=0;i<e;i++){var a=void 0===t[i]?null:t[i];r.push(a)}return r};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var s=[],l=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new gv(t);for(i in t)l++,s.push(i);this.__tree__=t,this.length=l,this.id=s;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=n=t.__tree__:this.__tree__=n=t,this.label=n.label||null,this.note=n.note||null,this.link=n.link||null,this.href=n.href||null,this.updated=n.updated||null,this.source=n.source||null,this.extension=n.extension||null;var c,u=0,h=n.size||n.dimension&&n.dimension.size;if(this.size=h,this.value=n.hasOwnProperty("value")&&null!==n.value&&0!==n.value.length?n.value:{},Array.isArray(this.value)||_v(this.value))u=this.value.length;else{var f=1;for(c=h.length;c--;)f*=h[c];u=f}if(this.value=o(this.value,u,e),this.status=n.hasOwnProperty("status")&&null!==n.status?o(n.status,u):null,n.hasOwnProperty("dimension")){var p=n.dimension,d=n.role||!n.version&&p.role||null,g=n.id||p.id,_=h.length,m=function(t){d.hasOwnProperty(t)||(d[t]=null)};if(!Array.isArray(g)||!Array.isArray(h)||g.length!=_)return;if(this.length=_,this.id=g,d&&(m("time"),m("geo"),m("metric"),m("classification")),d&&null===d.classification){var v=[],y=["time","geo","metric"],x=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(c=0;c<3;c++){var b=d[y[c]];null!==b&&(v=v.concat(b))}for(d.classification=[],c=0;c<_;c++)x(g[c],v)||d.classification.push(g[c]);0===d.classification.length&&(d.classification=null)}this.role=d,this.n=u;for(var w=0,S=this.length;w<S;w++)if(p[g[w]].category.hasOwnProperty("index")){if(Array.isArray(p[g[w]].category.index)){var M={},E=p[g[w]].category.index;for(r=E.length,a=0;a<r;a++)M[E[a]]=a;p[g[w]].category.index=M}}else{var C=0;for(i in p[g[w]].category.index={},p[g[w]].category.label)p[g[w]].category.index[i]=C++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new gv({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var A=[],k=(n=t.__tree__).category;if(!n.hasOwnProperty("category"))return;if(!k.hasOwnProperty("label"))for(i in k.label={},k.index)k.label[i]=i;for(i in k.index)A[k.index[i]]=i;this.__tree__=n,this.label=n.label||null,this.note=n.note||null,this.link=n.link||null,this.href=n.href||null,this.id=A,this.length=A.length,this.role=t.role,this.hierarchy=k.hasOwnProperty("child"),this.extension=n.extension||null;break;case"category":var T=t.child;this.id=T,this.length=null===T?0:T.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var P=t.link.item;if(this.length=Array.isArray(P)?P.length:0,this.length)for(a=0;a<this.length;a++)this.id[a]=P[a].href}}}function _v(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t.buffer)}function mv(t){return-1!==["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].indexOf(t)}function vv(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}gv.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,i){var r=t.link.item[e];i.class===r.class&&r.id&&r.size&&r.dimension&&n.push(r)}:function(t,e,i){var r=t.link.item[e];i.class!==r.class||r.id&&r.size&&r.dimension||n.push(r)}:function(t,e,i){i.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var i=0;i<this.length;i++)e(this,i,t);return n},gv.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],i=0;if("collection"===this.class){var r=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=r.length;i<e;i++)n.push(new gv(r[i]));return n}if("number"==typeof t&&t>=0&&t<r.length)return new gv(r[t]);if("string"==typeof t)for(e=r.length;i<e;i++)if(r[i].href===t)return new gv(r[i]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;i<e;i++)n.push(this.Dataset(this.id[i]));return n}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dataset(a):null}var o=this.__tree__[t];return void 0===o?null:new gv({class:"dataset",__tree__:o})},gv.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,i=[],r=this.id.length,a=function(t,e){if(null!==t)for(var n in t)for(var i=null!==t[n]?t[n].length:0;i--;)if(t[n][i]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<r;n++)i.push(this.Dimension(this.id[n]));return i}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dimension(o,e):null}var s=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<r;n++){var l=this.id[n];a(s,l)===t.role&&i.push(this.Dimension(l,e))}return void 0===i[0]?null:i}return null}var c=this.__tree__.dimension;if(void 0===c)return null;var u=c[t];return void 0===u?null:e?new gv({class:"dimension",__tree__:u,role:a(s,t)}):function(t,e){var n=[];for(var i in t)n[t[i]]=e[i];return n}(u.category.index,u.category.label)},gv.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,i=this.id.length;n<i;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var r=this.id[t];return void 0!==r?this.Category(r):null}var a=this.__tree__.category;if(void 0===a)return null;var o=a.index[t];if(void 0===o)return null;var s=a.unit&&a.unit[t]||null,l=a.coordinates&&a.coordinates[t]||null,c=a.child&&a.child[t]||null,u=a.note&&a.note[t]||null;return new gv({class:"category",index:o,label:a.label[t],note:u,child:c,unit:s,coord:l})},gv.prototype.Dice=function(t,e,n){var i,r,a,o,s=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class||null===this.value)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(i=!0),"boolean"==typeof n&&!0===n||(n=!1)):(i=s(e,"clone"),n=s(e,"drop"),r=s(e,"stringify"),a=s(e,"ovalue"),o=s(e,"ostatus"));var l,c=this.value,u=i?new gv(JSON.parse(JSON.stringify(this))):this,h=u.status,f=[],p=[],d=function(t,e){var n,i,r,a=(n=t,i=e,r={},Array.isArray(n[i])?(n[i].forEach((function(t,e){null!==t&&(r[String(e)]=t)})),r):n[i]);delete t[e],t[e]=a};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var g=Object.keys(t);return g.length>0&&(g.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach((function(n){e[n]=u.Dimension(n).id.filter((function(e){return-1===t[n].indexOf(e)}))})),e}(t)),u.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var i=[];g.forEach((function(n){var r=t[n],a=[];r.forEach((function(t){a.push(e[n]===t)})),i.push(-1!==a.indexOf(!0))})),-1===i.indexOf(!1)&&(f.push(e.value),p.push(e.status))})),g.forEach((function(e){var n=u.Dimension(e).id,i=0,r={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(r[n]=i,i++)})),u.__tree__.dimension[e].category.index=r})),u.n=f.length,u.value=u.__tree__.value=_v(c)?function(t,e){return e.from(t)}(f,c.constructor):f,u.status=u.__tree__.status=null!==h?p:null),r?((l=u.__tree__).hasOwnProperty("id")||(l.version="2.0",l.hasOwnProperty("class")||(l.class="dataset"),l.id=l.dimension.id,l.size=l.dimension.size,delete l.dimension.id,delete l.dimension.size,l.dimension.hasOwnProperty("role")&&(l.role=l.dimension.role,delete l.dimension.role)),l.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(l.status))&&delete l.status,l.hasOwnProperty("role")&&(delete l.role.classification,["geo","time","metric"].forEach((function(t){null===l.role[t]&&delete l.role[t]}))),a&&d(l,"value"),o&&l.hasOwnProperty("status")&&d(l,"status"),JSON.stringify(l)):u},gv.prototype.Slice=function(t){if(null===this||"dataset"!==this.class||0===Object.entries(this.value).length)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},gv.prototype.Data=function(t,e){var n,i,r=[],a=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class||null===this.value)return null;if(void 0===t){for(i=this.value.length,n=0;n<i;n++)r.push(this.Data(n));return r}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var o=this.value[t];return void 0===o?null:e?{value:o,status:this.status?this.status[t]:null}:o}var s="object",l=this.__tree__,c=l.size||l.dimension&&l.dimension.size,u=c.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var h=1,f=0,p=[],d=[];for(n=0;n<u;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=c[n])return null;f+=(h*=n>0?c[u-n]:1)*t[u-n-1]}else p.push(n),d.push(c[n]);if(p.length>1)return null;if(1===p.length){for(var g=0,_=d[0];g<_;g++){var m=[];for(n=0;n<u;n++)n!==p[0]?m.push(t[n]):m.push(g);r.push(this.Data(m,e))}return r}return e?{value:this.value[f],status:this.status?this.status[f]:null}:this.value[f]}s="array"}var v=function(t,e,n){var i,r=[],o={},s=t.dimension,l=t.id||s.id,c=t.size||s&&s.size;if("array"===n){for(i=e.length;i--;)o[e[i][0]]=e[i][1];e=o}for(var u=0,h=l.length;u<h;u++){var f=l[u],p=e[f];r.push("string"==typeof p?p:1===c[u]?a(s[f].category.index):null)}return r}(l,t,s),y=[],x=l.dimension,b=l.id||x.id;for(n=0,i=v.length;n<i;n++)y.push(x[b[n]].category.index[v[n]]);return this.Data(y,e)},gv.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class||null===this.value)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"!==(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&"objarr"!==t.type||void 0!==t.field||(t.field="id");var n,i,r,a,o,s,l,c,u,h="id"===t.field,f=function(t){return(h?"value":t)||"Value"},p=function(t){return(h?"status":t)||"Status"},d=this.__tree__,g=!0===t.status;if("function"==typeof e){n=this.toTable(t);var _=[],m="array"!==t.type?0:1;for(o=(R="object"!==t.type?n.slice(m):n.rows.slice(0)).length,i=0;i<o;i++){var v=e.call(this,R[i],i);void 0!==v&&_.push(v)}return"object"===t.type?{cols:n.cols,rows:_}:("array"===t.type&&_.unshift(n[0]),_)}if("arrobj"===t.type||"objarr"===t.type){var y=[],x=d.role&&d.role.metric,b=function(){},w={},S=this,M=S.id,E=t.by&&-1!==M.indexOf(t.by)?t.by:null,C=!0===t.meta,A=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],k=!0===t.comma,T=!0===t.bylabel,P=S.value.constructor,N=function(e){var n,i={},r=f(t.vlabel);return"objarr"===t.type&&(n=null===E&&mv(P.name)?function(t){i[t]=t===r?P.from(e,(function(e){return e[t]})):e.map((function(e){return e[t]}))}:function(t){i[t]=e.map((function(e){return e[t]}))},Object.keys(e[0]).forEach(n),e=i),C?(i={},M.forEach((function(t){var e=S.Dimension(t);i[t]={label:e.label,role:e.role,categories:{id:e.id,label:S.Dimension(t,!1)}}})),{meta:{label:S.label,source:S.source,updated:S.updated,id:M,status:g,unit:t.unit,by:E,bylabel:T,drop:null!==E&&A.length>0?A:null,prefix:null!==E?B||"":null,comma:k,dimensions:i},data:e}):e};E&&(t.field="id");var L=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:g})).shift();if(null===E&&t.unit&&x){if("id"!==t.content)for(var F=x.length;F--;){var O=this.Dimension(x[F]);w[x[F]]={};for(var G=O.length;G--;)w[x[F]][O.Category(G).label]=O.id[G]}b=function(e,n){if(-1!==x.indexOf(e)){var i=d.dimension[e].category;i.unit?D.unit=i.unit["id"!==t.content?w[e][n]:n]:D.unit=null}},t.unit=!0}else t.unit=!1;for(o=n.length,i=0;i<o;i++){var D={};for(r=n[i].length;r--;)D[L[r]]=n[i][r],b(L[r],n[i][r]);y.push(D)}if(k&&y.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==E){var z,I={},R=[],j={},B=void 0!==t.prefix?t.prefix:"";A.forEach((function(t,e){(!S.Dimension(t)||S.Dimension(t).length>1)&&(A[e]="")}));var q=M.filter((function(t){return t!==E&&-1===A.indexOf(t)})),U=S.Dimension(E);for(var W in"id"!==t.content?T?z=function(t,e,n){t[e][B+n[E]]=n.value}:(U.Category().forEach((function(t,e){j[t.label]=U.id[e]})),z=function(t,e,n){t[e][B+j[n[E]]]=n.value}):z=function(t,e,n){t[e][B+n[E]]=n.value},y.forEach((function(t){var e=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")}(t,q);void 0===I[e]&&(I[e]=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n}(t,q)),z(I,e,t,E)})),I)R.push(I[W]);return g=!1,N(R)}return N(y)}if("object"===t.type){var H="number"==typeof this.value[0]||null===this.value[0]?"number":"string";s=function(t,e){var n=h&&t||e||t;nt.push({id:t,label:n,type:"string"})},l=function(t,e,n){var i=f(t),r=p(e);n&&nt.push({id:"status",label:r,type:"string"}),nt.push({id:"value",label:i,type:H})},c=function(t){dt.push({v:t})},u=function(t){dt.push({v:t}),it.push({c:dt})}}else s=function(t,e){var n=h&&t||e||t;nt.push(n)},l=function(t,e,n){var i=f(t),r=p(e);n&&nt.push(r),nt.push(i),et.push(nt)},c=function(t){dt.push(t)},u=function(t){dt.push(t),et.push(dt)};var V=d.dimension,$=d.id||V.id,Y=d.size||V.size,J=$.length;if(J!=Y.length)return!1;var X=[],K=1,Z=(F=1,[]),Q=[],tt=[],et=[],nt=[],it=[];for(i=0;i<J;i++){var rt=$[i];s(rt,V[rt].label),K*=Y[i],F*=Y[i];var at=[];for(r=0;r<Y[i];r++)for(var ot in V[$[i]].category.index)if(V[$[i]].category.index[ot]===r){var st="id"!==t.content&&V[$[i]].category.label?V[$[i]].category.label[ot]:ot;at.push(st)}X.push(at),Z.push(F)}for(l(t.vlabel,t.slabel,g),o=X.length,i=0;i<o;i++){for(var lt=[],ct=0,ut=X[i].length;ct<ut;ct++)for(var ht=0;ht<K/Z[i];ht++)lt.push(X[i][ct]);Q.push(lt)}for(o=Q.length,i=0;i<o;i++){var ft=[],pt=0;for(a=0;a<K;a++)ft.push(Q[i][pt]),++pt===Q[i].length&&(pt=0);tt.push(ft)}for(a=0;a<K;a++){var dt=[];o=Q.length;for(var gt=0;gt<o;gt++)c(tt[gt][a]);g&&c(this.status?this.status[a]:null),u(this.value[a])}return"object"===t.type?{cols:nt,rows:it}:et},gv.prototype.node=function(){return this.__tree__},gv.prototype.toString=function(){return this.class};var yv=function(t){var e={__data:void 0,_data_:void 0,get:function(t){return t?e._data_?e._data_[t]:void 0:e._data_},getValue:function(t){var n=e.get(t);return n?n.value:void 0},set:function(t,n){e._data_=e._data_||{};var i=e._data_[t];return i?n.value?(i.value=n.value,i.status=n.status):i.value=n:e._data_[t]=n.value?n:{value:n},e},setData:function(t){return e.__data=t,e._data_={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},setManualMultiDate:function(t){for(var n in e._data_=e._data_||{},t){var i=t[n];for(var r in e._data_[n]={},i){var a=i[r];e._data_[n][r]={value:a}}}return e},getArray:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},getUniqueValues:function(){return Object.values(e._data_).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},getMin:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}))},getMax:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}))},isReady:function(){return null!=e._data_},metadata:void 0,unitText_:void 0,retrieveFromRemote:function(t,n,a){return e.eurostatDatasetCode_?i(t,n,a):e.csvURL_&&r(a),e},eurostatDatasetCode_:void 0,filters_:{lastTimePeriod:1},precision_:2,label_:void 0},n=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Gf(function(t,e,n,i){n=n||"en",i=i||"json";var r=[];if(r.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",i,"&lang=",n),e)for(var a in e){var o=e[a];if(Array.isArray(o))for(var s=0;s<o.length;s++)r.push("&",a,"=",o[s]);else r.push("&",a,"=",o)}return r.join("")}(e.eurostatDatasetCode_,e.filters_,n))},i=function(t,i,r){e._data_=null,n(t,i).then((function(t){var n;if(t.error)return console.error("Error retrieving Eurostat data: "+(null===(n=t.error[0])||void 0===n?void 0:n.label));var i=function(t,e,n){var i="object"==typeof e?e:null;return"function"!=typeof n&&(n=null),n||"function"!=typeof e||(n=e),"object"==typeof t?new gv(t,n):"version"===t?"1.5.3":fetch?fetch(t,i).then(vv).then((function(t){return new gv(t,n)})):void 0}(t);e.metadata={label:i.label,href:i.href,source:i.source,updated:i.updated,extension:i.extension},e.metadata.time=i.Dimension("time").id[0],e._data_=function(t){for(var e={},n=t.Dimension("geo").id,i=0;i<n.length;i++)e[n[i]]=t.Data(i);return e}(i),r&&r()}))};e.getTime=function(){var t=e.filters_.time;return t||(e._data_?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var r=function(t){e._data_=null,tv(e.csvURL_).then((function(n){e._data_=function(t,e,n){for(var i={},r=0;r<t.length;r++){var a=t[r],o=a[n];i[a[e]]=o?{value:isNaN(+o)?o:+o,status:""}:{value:":",status:""}}return i}(n,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e};function xv(t,e){var n=t.map;n.patternFill_&&n.patternFill_.forEach((function(i,r){if(i.legendLabel){var a=r*t.shapeHeight+r*t.shapePadding+15,o=e.append("g").attr("class","em-legend-item em-pattern-legend-item"),s=i.color||"#000";("#fff"===s.toLowerCase()||"white"===s.toLowerCase())&&o.append("rect").attr("x",0).attr("y",a).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill","#ddd"),o.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",a).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill","url(#".concat(i.patternId||i.pattern,")")).on("mouseover",(function(){bv(n,i.patternId||i.pattern),n.insetTemplates_&&ha(n.insetTemplates_,n.svgId,bv,i.patternId||i.pattern)})).on("mouseout",(function(){wv(n),n.insetTemplates_&&ha(n.insetTemplates_,n.svgId,wv)})),o.append("text").attr("class","em-legend-label").attr("x",t.shapeWidth+t.labelOffsets.x).attr("y",a+t.shapeHeight/2).attr("dominant-baseline","middle").attr("dy","0.35em").text(i.legendLabel)}}))}function bv(t,e){var n="url(#".concat(e,")"),i=ga(t);t.svg_.selectAll(i).selectAll("[ecl]").filter((function(){return!Ot(this).classed("pattern-fill-overlay")})).style("fill","white"),t.svg_.selectAll(".pattern-fill-overlay").style("opacity",0),t.svg_.selectAll(".pattern-fill-overlay").filter((function(){return Ot(this).attr("fill")===n})).style("opacity",1)}function wv(t){t.svg_.selectAll(".pattern-fill-overlay").style("opacity",1);var e=ga(t);t.svg_.selectAll(e).selectAll("[ecl]").filter((function(){return!Ot(this).classed("pattern-fill-overlay")})).each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}class Sv extends Map{constructor(t,e=Av){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Mv(this,t))}has(t){return super.has(Mv(this,t))}set(t,e){return super.set(Ev(this,t),e)}delete(t){return super.delete(Cv(this,t))}}Set;function Mv({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Ev({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Cv({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Av(t){return null!==t&&"object"==typeof t?t.valueOf():t}const kv=Symbol("implicit");function Tv(){var t=new Sv,e=[],n=[],i=kv;function r(r){let a=t.get(r);if(void 0===a){if(i!==kv)return i;t.set(r,a=e.push(r)-1)}return n[a%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Sv;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Tv(e,n).unknown(i)},Vt.apply(r,arguments),r}function Pv(){var t,e,n=Tv().unknown(void 0),i=n.domain,r=n.range,a=0,o=1,s=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=o<a,f=h?o:a,p=h?a:o;t=(p-f)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),f+=(p-f-t*(n-l))*u,e=t*(1-l),s&&(f=Math.round(f),e=Math.round(e));var d=jf(n).map((function(e){return f+t*e}));return r(h?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,h()):[a,o]},n.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return Pv(i(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},Vt.apply(h(),arguments)}function Nv(t){return t}var Lv=1e-6;function Fv(t){return"translate("+t+",0)"}function Ov(t){return"translate(0,"+t+")"}function Gv(t){return e=>+t(e)}function Dv(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function zv(){return!this.__axis}function Iv(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Fv:Ov;function f(f){var p=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,d=null==r?e.tickFormat?e.tickFormat.apply(e,n):Nv:r,g=Math.max(a,0)+s,_=e.range(),m=+_[0]+l,v=+_[_.length-1]+l,y=(e.bandwidth?Dv:Gv)(e.copy(),l),x=f.selection?f.selection():f,b=x.selectAll(".domain").data([null]),w=x.selectAll(".tick").data(p,e).order(),S=w.exit(),M=w.enter().append("g").attr("class","tick"),E=w.select("line"),C=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(M),E=E.merge(M.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(M.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),C=C.transition(f),S=S.transition(f).attr("opacity",Lv).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),M.attr("opacity",Lv).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),S.remove(),b.attr("d",4===t||2===t?o?"M"+c*o+","+m+"H"+l+"V"+v+"H"+c*o:"M"+l+","+m+"V"+v:o?"M"+m+","+c*o+"V"+l+"H"+v+"V"+c*o:"M"+m+","+l+"H"+v),w.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),E.attr(u+"2",c*a),C.attr(u,c*g).text(d),x.filter(zv).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=y}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function Rv(t){return Iv(3,t)}function jv(t){return Iv(4,t)}var Bv=function(t,e,n){var i=t.histogram.orientation||"horizontal",r=t.histogram.showCounts,a=t.histogram.showPercentages,o=t.histogram.labelRotation||0,s=t.histogram.margin||{top:0,right:0,bottom:0,left:0},l=t.histogram.height||200,c=t.histogram.width||270,u=t.getNumberOfClasses(t),h=t.getLabelFormatter(t),f=t.getColorClassifier(t),p=new Array(u).fill(0),d=function(t){var e=t.map;return Object.values(e.statData()._data_).map((function(t){return t.value}))}(t),g=function(t){var e=t.map;return e.colors_?e.colors_:Array.from({length:e.numberOfClasses_}).map((function(t,n){return e.classToFillStyle()(n,e.numberOfClasses_)}))}(t),_=ny(t);d.forEach((function(t){var e=f(t);"number"==typeof e&&e>=0&&e<p.length&&p[e]++}));var m=p.reduce((function(t,e){return t+e}),0),v=t.lgg.append("g").attr("class","em-legend-histogram").attr("transform","translate(".concat(e,", ").concat(n,")"));function y(e,n){var i=Ot(this).style("stroke","black").attr("ecl"),r=g.length-1-parseInt(i,10);ry(map,r),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,ry,i)}function x(e,n){Ot(this).style("stroke","none");ay(map),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,ay)}"vertical"===i?function(e){var n=p.slice().reverse(),i=n.map((function(t){return m>0?t/m*100:0})),o=_.slice().reverse(),u=Pv().domain(n.map((function(t,e){return e}))).range([s.top,l-s.bottom]).padding(.1),f=Cn().domain([0,Dt(n)]).nice().range([s.left,c-s.right]);e.selectAll("rect").data(n).join("rect").attr("class","em-legend-histogram-bar").attr("y",(function(t,e){return u(e)})).attr("x",s.left).attr("height",u.bandwidth()).attr("width",(function(t){return f(t)-s.left})).attr("fill",(function(t,e){return g[g.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",y).on("mouseout",x),(r||a)&&e.selectAll("text.em-histogram-label").data(n).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t){return f(t)+5})).attr("y",(function(t,e){return u(e)+u.bandwidth()/2})).attr("alignment-baseline","middle").text((function(t,e){return a?"".concat(i[e].toFixed(1),"%"):n[e]}));var d=e.append("g").attr("id","em-legend-histogram-y-axis").attr("transform","translate(".concat(s.left,",0)"));if("thresholds"===t.labelType){for(var v=[],b=0;b<o.length;b++){var w=u(b);void 0!==w&&v.push(w+u.bandwidth())}var S=Cn().domain([0,l]).range([0,l]);d.call(jv(S).tickValues(v).tickFormat((function(t,e){return h?h(o[e],e):o[e]})).tickSize(4).tickSizeOuter(0))}else"ranges"===t.labelType&&d.call(jv(u).tickSizeOuter(0).tickSize(0).tickFormat((function(t,e){return h?h(o[e],e):o[e]})));d.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end")}(v):function(e){var n=p.slice().reverse(),i=n.map((function(t){return m>0?t/m*100:0})),u=g.slice().reverse(),f=Pv().domain(n.map((function(t,e){return e}))).range([s.left,c-s.right]).padding(.1),d=Cn().domain([0,Dt(n)]).nice().range([l-s.bottom,s.top]);e.selectAll("rect").data(n).join("rect").attr("class","em-legend-histogram-bar").attr("x",(function(t,e){return f(e)})).attr("y",(function(t){return d(t)})).attr("width",f.bandwidth()).attr("height",(function(t){return l-s.bottom-d(t)})).attr("fill",(function(t,e){return u[e]})).attr("ecl",(function(t,e){return e})).on("mouseover",y).on("mouseout",x),(r||a)&&e.selectAll("text.em-histogram-label").data(n).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t,e){return f(e)+f.bandwidth()/2})).attr("y",(function(t){return d(t)-5})).attr("text-anchor","middle").text((function(t,e){return a?"".concat(i[e].toFixed(1),"%"):t}));var v=e.append("g").attr("id","em-legend-histogram-x-axis").attr("transform","translate(0, ".concat(l-s.bottom,")"));if("thresholds"===t.labelType){for(var b=[],w=0;w<_.length;w++){var S=_.length-w-1,M=f(S);void 0!==M&&b.push(M+f.bandwidth())}var E=Cn().domain([0,c]).range([0,c]);v.call(Rv(E).tickValues(b).tickFormat((function(t,e){return h?h(_[e],e):_[e]})).tickSize(4).tickSizeOuter(0)),v.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("dy","0em").attr("dx","-0.45em").attr("transform","rotate(-".concat(o,")"))}else"ranges"===t.labelType&&(v.call(Rv(f).tickSizeOuter(0).tickSize(0).tickFormat((function(t,e){return h?h(_[e],e):_[e]}))),v.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("dy","0.35em").attr("dx","-0.35em").attr("transform","rotate(-".concat(o,")")))}(v)};function qv(t,e,n){t.map;t._continuousLegendContainer=t.lgg.append("g").attr("class","em-continuous-legend").attr("id","em-continuous-legend").attr("transform","translate(".concat(e,", ").concat(n,")"));var i="ps"==t.map._mapType?t.colorLegend:t,r="vertical"===i.orientation,a="legend-gradient-"+Math.random().toString(36).substr(2,5),o=t.width||6*t.shapeWidth,s=r?t.shapeWidth:t.shapeHeight;if(function(t,e,n){for(var i,r=t.map,a="function"==typeof(null===(i=r.colorFunction_)||void 0===i?void 0:i.domain),o=20,s=function(t){var e=t.valueTransform_||function(t){return t},n=Uv(t);return n.map(e)}(r),l=y(3===s.length?s:[s[0],null,s[1]],3),c=l[0],u=l[1],h=l[2],f=t._continuousLegendContainer.append("defs").append("linearGradient").attr("id",e).attr("x1","0%").attr("x2",n?"0%":"100%").attr("y1",n?"100%":"0%").attr("y2","0%"),p=0;p<=o;p++){var d=p/o,g=void 0;g=3===s.length?d<.5?c+2*d*(u-c):u+2*(d-.5)*(h-u):c+d*(h-c);var _=r.colorFunction_(a?g:d);f.append("stop").attr("offset","".concat(100*d,"%")).attr("stop-color",_)}}(t,a,r),function(t,e,n,i,r){var a=Wv(e),o=e._continuousLegendContainer.append("rect").attr("class","em-legend-gradient").attr("id","em-legend-gradient").attr("x",0).attr("y",a).attr("width",r?i:n).attr("height",r?n:i).style("fill","url(#".concat(t,")"));!function(t,e,n,i){var r=e.map,a=Uv(r),o=r.valueUntransform_||function(t){return t},s=e._continuousLegendContainer,l=Wv(e),c=function(t){return"ps"==t._mapType?Yv:Vv}(r),u=function(t){return"ps"==t._mapType?Jv:$v}(r);t.on("mousemove",(function(t){var u,h=y(qr(t,this),2),f=h[0],p=h[1],d=i?p-l:f,g=Math.max(0,Math.min(n,d)),_=g/n,m=i?1-_:_;if(3===a.length){var v=y(a,3),x=v[0],b=v[1],w=v[2];if(m<.5)u=x+(b-x)*(m/.5);else u=b+(w-b)*((m-.5)/.5)}else{var S=y(a,2),M=S[0];u=M+m*(S[1]-M)}u=o(u),s.selectAll(".em-hover-line, .em-hover-tick, .em-hover-label").remove();var E=i?0:g,C=i?g+l:0;s.append("line").attr("class","em-hover-line").attr("x1",E).attr("y1",C).attr("x2",i?E+e.shapeWidth:E).attr("y2",i?C:C+e.shapeHeight).attr("stroke","black").attr("stroke-width",1).attr("pointer-events","none"),s.append("circle").attr("class","em-hover-tick").attr("cx",i?E+e.shapeWidth:E).attr("cy",i?C:C+e.shapeHeight).attr("r",3).attr("fill","black").attr("pointer-events","none");var A=iy(e);s.append("text").attr("class","em-hover-label").attr("x",i?E+e.shapeWidth+5:E).attr("y",i?C:C+e.shapeHeight+12).attr("text-anchor",i?"start":"middle").attr("alignment-baseline","middle").attr("pointer-events","none").text(A(u)),c(r,u)})),t.on("mouseout",(function(){s.selectAll(".em-hover-line, .em-hover-tick, .em-hover-label").remove(),u(r)}))}(o,e,n,r)}(a,t,o,s,r),function(t){return t.ticks>1||t.tickValues}(t)?function(t,e,n,i){var r=t.map,a=Uv(r),o=t._continuousLegendContainer.append("g").attr("class","em-legend-ticks"),s=iy(t),l=r.valueTransform_||function(t){return t},c=Wv(t),u=Array.isArray(t.tickValues)&&t.tickValues?t.tickValues.map(l):function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return t};if(Array.isArray(t)&&3===t.length){var i=y(t,3),r=i[0],a=i[1],o=i[2];return Array.from({length:e},(function(t,i){var s=i/(e-1);return n(s<.5?r+2*s*(a-r):a+2*(s-.5)*(o-a))}))}var s=y(t,2),l=s[0],c=s[1];return Array.from({length:e},(function(t,i){return n(l+i/(e-1)*(c-l))}))}(a,t.ticks,l);u.forEach((function(l,h){var f=function(t,e){if(3===e.length){var n=y(e,3),i=n[0],r=n[1],a=n[2];return t<r?.5*(t-i)/(r-i):.5+.5*(t-r)/(a-r)}return(t-e[0])/(e[1]-e[0])}(l,a);if(i){var p=n,d=e-f*e+c;o.append("line").attr("class","em-legend-tick").attr("x1",p).attr("y1",d).attr("x2",p+t.tickLength).attr("y2",d);var g=Array.isArray(t.tickLabels)&&null!=t.tickLabels[h]?t.tickLabels[h]:r.valueUntransform_?s(r.valueUntransform_(l)):s(l);o.append("text").attr("class","em-legend-label em-legend-ticklabel").attr("x",p+t.tickLength+3).attr("y",d).attr("dy","0.35em").attr("text-anchor","start").text(g)}else{var _=f*e,m=n+c;o.append("line").attr("class","em-legend-tick").attr("x1",_).attr("y1",m).attr("x2",_).attr("y2",m+t.tickLength);var v=Array.isArray(t.tickLabels)&&null!=t.tickLabels[h]?t.tickLabels[h]:r.valueUntransform_?s(r.valueUntransform_(l)):s(l);o.append("text").attr("class","em-legend-label em-legend-ticklabel").attr("x",_).attr("y",m+t.tickLength+10).attr("dy","0").attr("text-anchor",0===h?"start":h===u.length-1?"end":"middle").text(v)}}))}(t,o,s,r):function(t,e,n,i){var r=Wv(t),a=t.lowLabel,o=t.highLabel,s=t.pointOfDivergenceLabel,l=t._continuousLegendContainer;if(i){var c=e,u=n+5;a&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r+c).attr("dy","-0.2em").attr("text-anchor","start").text(a),o&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r).attr("dy","0.8em").attr("text-anchor","start").text(o),s&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r+c/2).attr("dy","0.35em").attr("text-anchor","start").text(s)}else{var h=n+r+10;a&&l.append("text").attr("class","em-legend-label").attr("x",0).attr("y",h).attr("text-anchor","start").text(a),o&&l.append("text").attr("class","em-legend-label").attr("x",e).attr("y",h).attr("text-anchor","end").text(o),s&&l.append("text").attr("class","em-legend-label").attr("x",e/2).attr("y",h).attr("text-anchor","middle").text(s)}}(t,o,s,r),t.noData){var l=(r?t.width+5:s+30)+Wv(t);i.pointOfDivergence&&i.pointOfDivergencePadding&&(l+=i.pointOfDivergencePadding);var c=t._continuousLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(l,")"));t.appendNoDataLegend(c,i.noDataText,Vv,$v)}}function Uv(t){var e;return"function"==typeof(null===(e=t.colorFunction_)||void 0===e?void 0:e.domain)?t.colorFunction_.domain():t.domain_||[0,1]}function Wv(t){return"ps"==t.map._mapType?t.colorLegend.titlePadding:t.titlePadding}function Hv(t){var e,n,i;return t&&t.legend_&&null!==(e=null!==(n=t.legend_.highlightTolerance)&&void 0!==n?n:null===(i=t.legend_.colorLegend)||void 0===i?void 0:i.highlightTolerance)&&void 0!==e?e:1}function Vv(t,e){var n=Hv(t),i=ga(t),r=t.svg_.selectAll(i).selectAll("[ecl]");r&&r.each((function(){var t=Ot(this),i=t.attr("ecl");if(i&&"nd"!==i){var r=+i;r>=e-n&&r<=e+n?t.style("fill",Ot(this).attr("fill___")):t.style("fill","white")}else{if("nd"===e)return;t.style("fill","white")}}))}function $v(t){var e=ga(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function Yv(t,e){var n=Hv(t);t.getCentroidsGroup(t).selectAll("[ecl]").each((function(){var i=Ot(this),r=i.attr("ecl");if(!r||"nd"===r)return"nd"===e?void i.style("opacity",t.psFillOpacity_):void i.style("opacity",0);var a=+r;a>=e-n&&a<=e+n?i.style("opacity",t.psFillOpacity_):i.style("opacity",0)}))}function Jv(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(){Ot(this).style("opacity",t.psFillOpacity_)}))}function Xv(t,e,n){var i,r;t._discreteLegendContainer=t.lgg.append("g").attr("class","em-discrete-legend-container").attr("transform","translate(".concat(e,",").concat(n,")")),null!==(i=t.colorLegend)&&void 0!==i&&i.title&&t._discreteLegendContainer.append("text").attr("class","em-legend-title em-color-legend-title").attr("id","em-color-legend-title").attr("x",0).attr("y",0).text(t.colorLegend.title);var a="ps"==t.map._mapType?t.colorLegend:t;if("ranges"===t.labelType||"ranges"===(null===(r=t.colorLegend)||void 0===r?void 0:r.labelType)?function(t,e){for(var n=t.map,i=t._discreteLegendContainer,r=t.getLabelFormatter(t),a=t.getNumberOfClasses(t),o=t.getHighlightFunction(n),s=t.getUnHighlightFunction(n),l=t.getClassToFillStyle(t),c=t.getColorClassifier(t),u=Kv(t),h=function(){var n=f*e.shapeHeight+u,h=0,p=t.ascending?a-f-1:f,d=l(p,a),g=i.append("g").attr("class","em-legend-item");e.pointOfDivergenceLabel&&f>=e.pointOfDivergence&&(n+=e.pointOfDivergencePadding),g.append("rect").attr("class","em-legend-rect").attr("x",h).attr("y",n).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",d).on("mouseover",(function(){Ot(this).raise(),o(t.map,p),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,o,p)})).on("mouseout",(function(){s(t.map),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,s,p)})),f>0&&g.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",n).attr("x2",e.sepLineLength).attr("y2",n),g.append("text").attr("class","em-legend-label").attr("x",Math.max(e.shapeWidth,e.sepLineLength+e.tickLength)+(e.labelOffsets.x||0)).attr("y",n+e.shapeHeight/2).attr("dy","0.3em").text(e.labels?e.labels[f]:r(c.invertExtent(p)[t.ascending?0:1],f))},f=0;f<a;f++)h();if(e.pointOfDivergenceLabel)for(var p=0;p<a;p++){var d=p*e.shapeHeight+u;p==e.pointOfDivergence&&Zv(t,d,e)}}(t,a):function(t,e){for(var n=t.map,i=t._discreteLegendContainer,r=t.getNumberOfClasses(t),a=Kv(t),o=t.getHighlightFunction(n),s=t.getUnHighlightFunction(n),l=t.getColorClassifier(t),c=t.getClassToFillStyle(t),u=t.getLabelFormatter(t),h=function(h){var f=h*e.shapeHeight+a,p=0,d=t.ascending?r-h-1:h,g=c(d,r);if(i.append("rect").attr("class","em-legend-rect").attr("x",p).attr("y",f).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",g).on("mouseover",(function(){Ot(this).raise(),o(n,d),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,o,d)})).on("mouseout",(function(){s(n),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,s,d)})),h>0&&i.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",f).attr("x2",t.sepLineLength).attr("y2",f),h>0&&i.append("line").attr("class","em-legend-tick").attr("x1",e.sepLineLength).attr("y1",f).attr("x2",e.sepLineLength+e.tickLength).attr("y2",f),h<r-1){var _=i.append("text").attr("class","em-legend-label").attr("x",Math.max(e.shapeWidth,e.sepLineLength+e.tickLength)+(e.labelOffsets.x||0)).attr("y",f+e.shapeHeight).attr("dy","0.3em").text((function(){if(e.labels)return e.labels[h];if(null!=l&&l.invertExtent){var i=l.invertExtent(d);return u(i[t.ascending?0:1])}return n.noDataText_||""}));e.pointOfDivergenceLabel&&h==e.pointOfDivergence-1&&_.attr("class","em-legend-label em-legend-label-divergence")}},f=0;f<r;f++)h(f);if(e.pointOfDivergenceLabel)for(var p=0;p<r;p++){var d=p*e.shapeHeight+a;p==e.pointOfDivergence&&Zv(t,d,e)}}(t,a),a.noData){var o=t.getNumberOfClasses(t)*a.shapeHeight+Kv(t)+3;a.pointOfDivergence&&a.pointOfDivergencePadding&&(o+=a.pointOfDivergencePadding);var s=t._discreteLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(o,")")),l=t.getHighlightFunction(t.map),c=t.getUnHighlightFunction(t.map);t.appendNoDataLegend(s,a.noDataText,l,c)}}function Kv(t){return"ps"==t.map._mapType?t.colorLegend.titlePadding:0}function Zv(t,e,n){var i,r,a,o=t._discreteLegendContainer.append("g").attr("class","em-legend-divergence-container");"ranges"==n.labelType&&(e+=n.pointOfDivergencePadding/2);var s=t._discreteLegendContainer.selectAll(".em-legend-label").nodes().reduce((function(t,e){return Math.max(t,e.getBBox().width)}),0),l=t.divergingLineLength||t.shapeWidth+(null===(i=t.labelOffsets)||void 0===i?void 0:i.x)+s+(null===(r=t.labelOffsets)||void 0===r?void 0:r.x)+15;o.append("line").attr("x1",0).attr("y1",e).attr("x2",0+l).attr("y2",e).attr("class","em-legend-diverging-line");var c=t.pointOfDivergenceLabel.split("|");if(c.length>1){var u=t.divergingArrowLength||30,h=0+l;o.append("defs").append("marker").attr("id","arrowhead").attr("markerWidth",6).attr("markerHeight",6).attr("refX",0).attr("refY",3).attr("orient","auto").append("polygon").attr("points","0 0, ".concat(6," ").concat(3,", 0 ").concat(6)).attr("fill","black"),o.append("line").attr("class","em-legend-diverging-line").attr("x1",h).attr("y1",e).attr("x2",h).attr("y2",e-u).attr("marker-end","url(#arrowhead)"),o.append("line").attr("class","em-legend-diverging-line").attr("x1",h).attr("y1",e).attr("x2",h).attr("y2",e+u).attr("marker-end","url(#arrowhead)"),o.append("text").attr("class","em-legend-label").attr("x",h+10).attr("y",e-u+10).attr("dy","0.3em").text(c[0]),o.append("text").attr("class","em-legend-label").attr("x",h+10).attr("y",e+u-10).attr("dy","0.3em").text(c[1])}else o.append("text").attr("class","em-legend-diverging-label em-legend-label").attr("x",0+l+5).attr("y",e).attr("dy","0.3em").text(t.pointOfDivergenceLabel);"thresholds"!=t.labelType&&"thresholds"!=(null===(a=t.colorLegend)||void 0===a?void 0:a.labelType)||(c.length>1?t._discreteLegendContainer.selectAll(".em-legend-label-divergence").attr("x",0+l+10):t._discreteLegendContainer.selectAll(".em-legend-label-divergence").remove())}function Qv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ty(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qv(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ey=function(t,e){var n=yx(t);if(n.labelType="thresholds",n.sepLineLength=n.shapeWidth,n.tickLength=4,n.decimals=0,n.labelOffsets={x:3,y:0},n.labels=null,n.histogram=null,n.pointOfDivergenceLabel=void 0,n.pointOfDivergence=void 0,n.pointOfDivergencePadding=7,n.divergingLineLength=void 0,n.divergingArrowLength=void 0,n.lowLabel="Low",n.highLabel="High",n.ticks=0,n.tickValues=void 0,n.tickLabels=void 0,n.orientation="vertical",e)for(var i in e)"histogram"===i&&"object"===ma(e[i])?n.histogram=ty({orientation:"horizontal",showCounts:!1,showPercentages:!1,labelRotation:0},e.histogram):n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var t=n.map;if(n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),!t.classToFillStyle())return;n.pointOfDivergenceLabel&&!n.pointOfDivergence&&(n.pointOfDivergence=t.numberOfClasses_/2);var e=n.getBaseY(),i=n.getBaseX();if(n.histogram?Bv(n,i,e):"continuous"===t.colorSchemeType_?qv(n,i,e):Xv(n,i,e),t.opacityScale_){var r=n.lgg.node().getBBox().height+10;!function(t,e,n){var i,r=t.map,a=r.statData("alpha");if(a&&a.isReady()){var o=r.opacityScale_,s=o.domain()[0],l=o.domain()[1],c=iy(t);t._alphaLegendContainer=t.lgg.append("g").attr("class","alpha-legend-container").attr("transform","translate(".concat(e,",").concat(n,")"));for(var u=0;u<40;u++){var h=s+(l-s)*u/40;t._alphaLegendContainer.append("rect").attr("x",3*u).attr("y",0).attr("width",3).attr("height",10).style("fill","#000").style("opacity",o(h))}t._alphaLegendContainer.append("text").attr("x",0).attr("y",22).attr("class","em-legend-label").text(c(s)),t._alphaLegendContainer.append("text").attr("x",120).attr("y",22).attr("text-anchor","end").attr("class","em-legend-label").text(c(l)),t._alphaLegendContainer.append("text").attr("x",60).attr("y",-5).attr("text-anchor","middle").attr("class","em-legend-label").text((null===(i=a.unitText)||void 0===i?void 0:i.call(a))||"Transparency")}}(n,i,e+r)}if(n.map.patternFill_){var a=n.lgg.node().getBBox().height,o=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(n.getBaseX(),", ").concat(a+n.boxPadding+5,")"));xv(n,o)}n.setBoxDimension()}},n.labelDecNb=function(t){return console.warn("labelDecNb is now DEPRECATED. Please use decimals instead."),n},n};function ny(t){var e=t.map,n=e.thresholds_.length>1?e.thresholds_:Array.from({length:e.numberOfClasses_}).map((function(n,i){return e.classifier().invertExtent(i)[t.ascending?0:1]})).slice(1);return n}function iy(t){if("ranges"==t.labelType){var e=ny(t);return t.labelFormatter||function(n,i){var r=vn(".".concat(t.decimals,"f"));return 0===i?"> ".concat(r(e[e.length-1])):i===e.length?"< ".concat(r(e[0])):"".concat(r(e[e.length-i-1])," - < ").concat(r(e[e.length-i])," ")}}return t.labelType,t.labelFormatter||vn(".".concat(t.decimals,"f"))}function ry(t,e){var n=ga(t),i=t.svg_.selectAll(n).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function ay(t){var e=ga(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function oy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function sy(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ly(t){return t<0?-t*t:t*t}function cy(t){var e=t(tn,tn),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(tn,tn):.5===n?t(sy,ly):t(oy(n),oy(1/n)):n},En(e)}function uy(){var t=cy(on());return t.copy=function(){return an(t,uy()).exponent(t.exponent())},Vt.apply(t,arguments),t}function hy(){return uy.apply(null,arguments).exponent(.5)}function fy(t,e){let n,i;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=i=e):(n>e&&(n=e),i<e&&(i=e)));else{let r=-1;for(let a of t)null!=(a=e(a,++r,t))&&(void 0===n?a>=a&&(n=i=a):(n>a&&(n=a),i<a&&(i=a)))}return[n,i]}const py=Pn(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Tn)),dy=(vr(3),{draw(t,e){const n=vr(e/xr);t.moveTo(n,0),t.arc(0,0,n,0,wr)}}),gy={draw(t,e){const n=vr(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()}},_y=vr(1/3),my=2*_y,vy={draw(t,e){const n=vr(e/my),i=n*_y;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},yy={draw(t,e){const n=vr(e),i=-n/2;t.rect(i,i,n,n)}},xy=mr(xr/10)/mr(7*xr/10),by=mr(wr/10)*xy,wy=-dr(wr/10)*xy,Sy={draw(t,e){const n=vr(.8908130915292852*e),i=by*n,r=wy*n;t.moveTo(0,-n),t.lineTo(i,r);for(let e=1;e<5;++e){const a=wr*e/5,o=dr(a),s=mr(a);t.lineTo(s*n,-o*n),t.lineTo(o*i-s*r,s*i+o*r)}t.closePath()}},My=vr(3),Ey={draw(t,e){const n=-vr(e/(3*My));t.moveTo(0,2*n),t.lineTo(-My*n,-n),t.lineTo(My*n,-n),t.closePath()}},Cy=(vr(3),-.5),Ay=vr(3)/2,ky=1/vr(12),Ty=3*(ky/2+1),Py={draw(t,e){const n=vr(e/Ty),i=n/2,r=n*ky,a=i,o=n*ky+n,s=-a,l=o;t.moveTo(i,r),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(Cy*i-Ay*r,Ay*i+Cy*r),t.lineTo(Cy*a-Ay*o,Ay*a+Cy*o),t.lineTo(Cy*s-Ay*l,Ay*s+Cy*l),t.lineTo(Cy*i+Ay*r,Cy*r-Ay*i),t.lineTo(Cy*a+Ay*o,Cy*o-Ay*a),t.lineTo(Cy*s+Ay*l,Cy*l-Ay*s),t.closePath()}};function Ny(t,e){let n=null,i=Pr(r);function r(){let r;if(n||(n=r=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return t="function"==typeof t?t:hr(t||dy),e="function"==typeof e?e:hr(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"==typeof e?e:hr(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:hr(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function Ly(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(Array.isArray(e)){var n=t.svg().select("defs");n.empty()&&(n=t.svg().append("defs"));var i={};e.forEach((function(e){var r,a=e.pattern,o=void 0===a?"hatching":a,s=e.regionIds,l=void 0===s?[]:s,c=e.color,u=void 0===c?"#000":c,h=e.strokeWidth,f=void 0===h?1:h,p=e.customPattern,d=e.spacing;if(p){var g=p.match(/id=['"]([^'"]+)['"]/);if(!g)return void console.warn("customPattern must include an id attribute.");r=g[1],t.svg().select("#".concat(r)).empty()&&n.node().insertAdjacentHTML("beforeend",p)}else{var _=u.replace("#","").toLowerCase();r="".concat(o,"-").concat(_,"-sw").concat(f),function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8,o=t.svg().select("defs");if(t.svg().select("#".concat(CSS.escape(e))).empty()){var s=o.append("pattern").attr("id",e).attr("patternUnits","userSpaceOnUse").attr("width",a).attr("height",a);"hatching"===n?s.append("path").attr("d","M-".concat(a/8,",").concat(a/8," l").concat(a/4,",-").concat(a/4," M0,").concat(a," l").concat(a,",-").concat(a," M").concat(a-a/8,",").concat(a+a/8," l").concat(a/4,",-").concat(a/4)).attr("stroke",i).attr("stroke-width",r):"crosshatch"===n?s.append("path").attr("d","M0,0 l".concat(a,",").concat(a," M").concat(a,",0 l-").concat(a,",").concat(a)).attr("stroke",i).attr("stroke-width",r):"dots"===n?s.append("circle").attr("cx",a/2).attr("cy",a/2).attr("r",r).attr("fill",i):(console.warn('Unknown pattern "'.concat(n,'", defaulting to hatching.')),s.append("path").attr("d","M-".concat(a/8,",").concat(a/8," l").concat(a/4,",-").concat(a/4," M0,").concat(a," l").concat(a,",-").concat(a," M").concat(a-a/8,",").concat(a+a/8," l").concat(a/4,",-").concat(a/4)).attr("stroke",i).attr("stroke-width",r))}}(t,r,o,u,f,d)}e.patternId=r,l.forEach((function(t){i[t]||(i[t]=[]),i[t].push(r)}))})),t.svg().selectAll(da(t)).each((function(t){var e,n=this,r=null==t||null===(e=t.properties)||void 0===e?void 0:e.id,a=i[r];if(a&&a.length){var o=Ot(this);a.forEach((function(t){var e=o.node().cloneNode(!0);Ot(e).attr("fill","url(#".concat(t,")")).attr("pointer-events","none").attr("class",(o.attr("class")||"")+"pattern-fill-overlay"),Ot(n.parentNode).append((function(){return e}))}))}}))}else console.warn("patternFill expects an array of configs")}const Fy=4294967296;var Oy=Math.PI*(3-Math.sqrt(5));function Gy(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),a=0,o=.6,s=new Map,l=_i(h),c=ni("tick","end"),u=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Fy)/Fy}();function h(){f(),c.call("tick",e),n<i&&(l.stop(),c.call("end",e))}function f(i){var l,c,u=t.length;void 0===i&&(i=1);for(var h=0;h<i;++h)for(n+=(a-n)*r,s.forEach((function(t){t(n)})),l=0;l<u;++l)null==(c=t[l]).fx?c.x+=c.vx*=o:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=o:(c.y=c.fy,c.vy=0);return e}function p(){for(var e,n=0,i=t.length;n<i;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var r=10*Math.sqrt(.5+n),a=n*Oy;e.x=r*Math.cos(a),e.y=r*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t,u),e}return null==t&&(t=[]),p(),e={tick:f,restart:function(){return l.restart(h),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,p(),s.forEach(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(i=+t,e):i},alphaDecay:function(t){return arguments.length?(r=+t,e):+r},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(u=t,s.forEach(d),e):u},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,i){var r,a,o,s,l,c=0,u=t.length;for(null==i?i=1/0:i*=i,c=0;c<u;++c)(o=(r=e-(s=t[c]).x)*r+(a=n-s.y)*a)<i&&(l=s,i=o);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function Dy(t){return function(){return t}}function zy(t){var e,n,i,r=Dy(.1);function a(t){for(var r,a=0,o=e.length;a<o;++a)(r=e[a]).vx+=(i[a]-r.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),i=new Array(o),a=0;a<o;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=Dy(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:Dy(+t),o(),a):r},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Dy(+e),o(),a):t},a}function Iy(t){var e,n,i,r=Dy(.1);function a(t){for(var r,a=0,o=e.length;a<o;++a)(r=e[a]).vy+=(i[a]-r.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),i=new Array(o),a=0;a<o;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=Dy(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:Dy(+t),o(),a):r},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Dy(+e),o(),a):t},a}function Ry(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,a,o,s,l,c,u,h,f,p=t._root,d={data:i},g=t._x0,_=t._y0,m=t._x1,v=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(_+v)/2))?_=o:v=o,r=p,!(p=p[h=u<<1|c]))return r[h]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&n===l)return d.next=p,r?r[h]=d:t._root=d,t;do{r=r?r[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(_+v)/2))?_=o:v=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return r[f]=p,r[h]=d,t}function jy(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function By(t){return t[0]}function qy(t){return t[1]}function Uy(t,e,n){var i=new Wy(null==e?By:e,null==n?qy:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function Wy(t,e,n,i,r,a){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=a,this._root=void 0}function Hy(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Vy=Uy.prototype=Wy.prototype;function $y(t){return 1e-6*(t()-.5)}function Yy(t){return t.x+t.vx}function Jy(t){return t.y+t.vy}function Xy(t){var e,n,i,r=1,a=1;function o(){for(var t,o,l,c,u,h,f,p=e.length,d=0;d<a;++d)for(o=Uy(e,Yy,Jy).visitAfter(s),t=0;t<p;++t)l=e[t],h=n[l.index],f=h*h,c=l.x+l.vx,u=l.y+l.vy,o.visit(g);function g(t,e,n,a,o){var s=t.data,p=t.r,d=h+p;if(!s)return e>c+d||a<c-d||n>u+d||o<u-d;if(s.index>l.index){var g=c-s.x-s.vx,_=u-s.y-s.vy,m=g*g+_*_;m<d*d&&(0===g&&(m+=(g=$y(i))*g),0===_&&(m+=(_=$y(i))*_),m=(d-(m=Math.sqrt(m)))/m*r,l.vx+=(g*=m)*(d=(p*=p)/(f+p)),l.vy+=(_*=m)*d,s.vx-=g*(d=1-d),s.vy-=_*d)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var i,r,a=e.length;for(n=new Array(a),i=0;i<a;++i)r=e[i],n[r.index]=+t(r,i,e)}}return"function"!=typeof t&&(t=Dy(null==t?1:+t)),o.initialize=function(t,n){e=t,i=n,l()},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:Dy(+e),l(),o):t},o}function Ky(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Zy(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Qy(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qy(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Qy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function tx(t,e){var i=function(i){var r,a,o,s,l,c=i.Geometries.centroidsFeatures||[];if(c.length){nx(i);var u,h=null!==(r=null===(a=i.dorlingStrength_)||void 0===a?void 0:a.x)&&void 0!==r?r:1,f=null!==(o=null===(s=i.dorlingStrength_)||void 0===s?void 0:s.y)&&void 0!==o?o:1,p=null!==(l=i.dorlingIterations_)&&void 0!==l?l:1,d=!1!==i.dorlingWorker_,g=i.dorlingWorkerD3URL_||"https://unpkg.com/d3@7/dist/d3.min.js",_=Zy(c);try{for(_.s();!(u=_.n()).done;){var m,v=u.value,y=null===(m=i._projection)||void 0===m?void 0:m.call(i,v.geometry.coordinates);y?(v.x=y[0],v.y=y[1]):(v.x=NaN,v.y=NaN)}}catch(t){_.e(t)}finally{_.f()}var x=t.getCentroidsGroup(i).selectAll("g.em-centroid"),b=function(t){t.attr("transform",(function(t){return!t||isNaN(t.x)||isNaN(t.y)?null:"translate(".concat(t.x,",").concat(t.y,")")}))};if(!1===i.animateDorling_){if(d){console.log("Running Dorling simulation asynchronously in a Web Worker");var w=new Worker(new URL(n.p+n.u(222),n.b),{type:void 0});return w.postMessage({nodes:c.map((function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ky(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ky(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)})),radii:c.map((function(t){return e(t)})),strengthX:h,strengthY:f,iterations:p,d3URL:g}),void(w.onmessage=function(t){var e=t.data,n=e.type,r=e.nodes,a=e.progress,o=e.total;"progress"!==n?"end"===n&&r&&(c.forEach((function(t,e){t.x=r[e].x,t.y=r[e].y})),b(x),ex(1,i),w.terminate()):ex(a/o,i)})}for(var S=Gy(c).force("x",zy((function(t){return t.properties.centroid[0]})).strength(h)).force("y",Iy((function(t){return t.properties.centroid[1]})).strength(f)).force("collide",Xy((function(t){return e(t)})).iterations(p)).stop(),M=Math.ceil(Math.log(S.alphaMin())/Math.log(1-S.alphaDecay())),E=0;E<M;E++)S.tick(),E%10==0&&b(x);return b(x),ex(1,i),S}return i.simulation=Gy(c).force("x",zy((function(t){return t.properties.centroid[0]})).strength(h)).force("y",Iy((function(t){return t.properties.centroid[1]})).strength(f)).force("collide",Xy((function(t){return e(t)})).iterations(p)).on("tick",(function(){return b(x)})),i.simulation}};i(t),t.insetTemplates_&&ha(t.insetTemplates_,t.svgId_,(function(t){i(t)}))}function ex(t,e){e.onDorlingProgress_&&e.onDorlingProgress_(t,e)}function nx(t){t.simulation&&(t.simulation.stop(),t.simulation.on("tick",null),t.simulation=null)}Vy.copy=function(){var t,e,n=new Wy(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=Hy(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var r=0;r<4;++r)(e=i.source[r])&&(e.length?t.push({source:e,target:i.target[r]=new Array(4)}):i.target[r]=Hy(e));return n},Vy.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Ry(this.cover(e,n),e,n,t)},Vy.addAll=function(t){var e,n,i,r,a=t.length,o=new Array(a),s=new Array(a),l=1/0,c=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(r=+this._y.call(null,e))||(o[n]=i,s[n]=r,i<l&&(l=i),i>u&&(u=i),r<c&&(c=r),r>h&&(h=r));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),n=0;n<a;++n)Ry(this,o[n],s[n],t[n]);return this},Vy.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,a=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,a=(i=Math.floor(e))+1;else{for(var o,s,l=r-n||1,c=this._root;n>t||t>=r||i>e||e>=a;)switch(s=(e<i)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:r=n+l,a=i+l;break;case 1:n=r-l,a=i+l;break;case 2:r=n+l,i=a-l;break;case 3:n=r-l,i=a-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=i,this._x1=r,this._y1=a,this},Vy.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Vy.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Vy.find=function(t,e,n){var i,r,a,o,s,l,c,u=this._x0,h=this._y0,f=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new jy(g,u,h,f,p)),null==n?n=1/0:(u=t-n,h=e-n,f=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(g=l.node)||(r=l.x0)>f||(a=l.y0)>p||(o=l.x1)<u||(s=l.y1)<h))if(g.length){var _=(r+o)/2,m=(a+s)/2;d.push(new jy(g[3],_,m,o,s),new jy(g[2],r,m,_,s),new jy(g[1],_,a,o,m),new jy(g[0],r,a,_,m)),(c=(e>=m)<<1|t>=_)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var v=t-+this._x.call(null,g.data),y=e-+this._y.call(null,g.data),x=v*v+y*y;if(x<n){var b=Math.sqrt(n=x);u=t-b,h=e-b,f=t+b,p=e+b,i=g.data}}return i},Vy.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,i,r,a,o,s,l,c,u,h,f,p=this._root,d=this._x0,g=this._y0,_=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((c=a>=(s=(d+_)/2))?d=s:_=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;p.data!==t;)if(i=p,!(p=p.next))return this;return(r=p.next)&&delete p.next,i?(r?i.next=r:delete i.next,this):e?(r?e[h]=r:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=r,this)},Vy.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Vy.root=function(){return this._root},Vy.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Vy.visit=function(t){var e,n,i,r,a,o,s=[],l=this._root;for(l&&s.push(new jy(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,r=e.y0,a=e.x1,o=e.y1)&&l.length){var c=(i+a)/2,u=(r+o)/2;(n=l[3])&&s.push(new jy(n,c,u,a,o)),(n=l[2])&&s.push(new jy(n,i,u,c,o)),(n=l[1])&&s.push(new jy(n,c,r,a,u)),(n=l[0])&&s.push(new jy(n,i,r,c,u))}return this},Vy.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new jy(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var r=e.node;if(r.length){var a,o=e.x0,s=e.y0,l=e.x1,c=e.y1,u=(o+l)/2,h=(s+c)/2;(a=r[0])&&n.push(new jy(a,o,s,u,h)),(a=r[1])&&n.push(new jy(a,u,s,l,h)),(a=r[2])&&n.push(new jy(a,o,h,u,c)),(a=r[3])&&n.push(new jy(a,u,h,l,c))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Vy.x=function(t){return arguments.length?(this._x=t,this):this._x},Vy.y=function(t){return arguments.length?(this._y=t,this):this._y};var ix=function(t){var e=bx(t,!0,"ps");function n(t){if(t.svg_&&e.classifierColor_){var n=t.statData("color");t.svg_.selectAll(".em-centroid").attr("ecl",(function(t){var i=n.get(t.properties.id);if(!i)return"nd";var r=i.value;return 0!==r&&!r||":"==r?"nd":+e.classifierColor_(+r)}))}}function i(t){return t.statData("size").getArray()?t.statData("size"):t.statData()}function r(t){e.psClassToFillStyle()||e.psClassToFillStyle(rx(e.psColorFun_,e.psColors_));var n=i(t);if(t.svg_){var r,s;t.svg_.selectAll(":not(#em-insets-group) g.em-centroid > *").remove(),e.updateSymbolsDrawOrder(t),s=e.psCustomSVG_?function(t,n){return t.getCentroidsGroup(t).selectAll("g.em-centroid").append("g").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").html(e.psCustomSVG_).attr("transform",(function(t){var i=n.get(t.properties.id),r=e.classifierSize_(+i.value);if(r)return"translate(".concat(e.psOffset_.x*r,",").concat(e.psOffset_.y*r,") scale(").concat(r,")")}))}(t,n):"bar"==e.psShape_?function(t,n){return t.getCentroidsGroup(t).selectAll("g.em-centroid").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var i=n.get(t.properties.id);return i&&i.value?e.classifierSize_(+i.value):0})).attr("transform",(function(){this.getBoundingClientRect();return"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")}))}(t,n):"circle"==e.psShape_?function(t,n){var i=t.svg().selectAll("g.em-centroid").filter((function(t){var e=n.get(t.properties.id);return e&&":"!==e.value&&e.value})).append("circle").attr("stroke-width",e.psStrokeWidth()).attr("stroke",e.psStroke()).attr("fill-opacity",e.psFillOpacity()).attr("stroke-opacity",e.psStrokeOpacity()).style("pointer-events","none").transition().duration(e.transitionDuration()).attr("r",(function(t){var i=n.get(t.properties.id),r=e.classifierSize_(+i.value);return r<0&&console.error("Negative radius for circle:",t.properties.id),isNaN(r)&&console.error("NaN radius for circle:",t.properties.id),r})).on("end",(function(){Ot(this).style("pointer-events",null)}));return i}(t,n):"spike"==e.psShape_?function(t,n){var i=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-t,"L").concat(n/2,",0")},r=t.svg().selectAll("g.em-centroid"),a=r.append("path").attr("d",(function(t){var r=n.get(t.properties.id),a=r?e.classifierSize_(+r.value):0;return i(a)})).style("fill",(function(t){return t.color||"steelblue"})).attr("fill-opacity",t.psFillOpacity_).attr("stroke",t.psStroke_).attr("stroke-width",t.psStrokeWidth_);return a}(t,n):function(t,n){return t.svg().selectAll("g.em-centroid").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){if(n){var i=n.get(t.properties.id);if(0==i||i){var r=e.classifierSize_(+i.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(r*r)();var a=ax[e.psShape_]||ax.circle;return Ny().type(a).size(r*r)()}}}))}(t,n);var l=da(t),c=t.svg().selectAll(l);if("WORLD"!==t.geo_){if("mixed"==t.nutsLevel_){!function(t,n,i){i.style("display",(function(e){if(!this.parentNode.classList.contains("em-cntrg")){var i=n.get(e.properties.id);return!i||!i.value&&0!==i&&0!==i.value?"none":"WORLD"==t.geo_?"block":void 0}})),i.style("stroke",(function(t){var e=Ot(this),i=e.attr("lvl"),r=e.style("stroke"),a=n.get(t.properties.id);if(a&&a.value)return"0"!==i?r||"#777":void 0})).style("stroke-width",(function(t){var i=Ot(this),r=i.attr("lvl"),a=i.style("stroke-width"),o=n.get(t.properties.id);if(o&&o.value)return"WORLD"==e.geo_&&"0"!==r?a||"#777":void 0}))}(t,n,c);var u=[];t.svg().selectAll("g.em-centroid").each((function(t){var e;null!==(e=t.properties)&&void 0!==e&&e.centroid&&u.push(t)})),t.Geometries.centroidsFeatures=u}c.attr("ecl",(function(t){var e=n.get(t.properties.id);return!e||!e.value&&0!==e&&0!==e.value?"ni":e&&e.value&&":"==e.value?"nd":void 0}))}!function(t){t.attr("fill-opacity",e.psFillOpacity()).attr("stroke-opacity",e.psStrokeOpacity()).attr("stroke",e.psStroke()).attr("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=Ot(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle_||"gray"}return e.psFill_})).attr("fill___",(function(){return Ot(this).style("fill")}))}(s),a(t,n),o(t),null!==(r=e.labels_)&&void 0!==r&&r.values&&e.updateValuesLabels(t),e.patternFill_&&Ly(t,e.patternFill_)}return t}e.psShape_="circle",e.psCustomShape_,e.psCustomSVG_,e.psSpikeWidth_=7,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psSizeScale_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=1,e.psStroke_="#ffffff",e.psStrokeWidth_=.2,e.psStrokeOpacity_=1,e.psClasses_=5,e.psColors_=null,e.psColorFun_=py,e.psClassToFillStyle_=void 0,e.psThresholds_=[0],e.psClassificationMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=ox,e.psCodeLabels_=!1,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStrokeOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","psSizeScale_","noDataFillStyle_","psThresholds_","psColors_","psCustomSVG_","psOffset_","psClassificationMethod_","psClasses_","dorling_","dorlingStrength_","dorlingIterations_","animateDorling_","psSpikeWidth_","psCodeLabels_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomSVG","psOffset","psClassificationMethod","psClasses","dorlingIterations_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=rx(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThresholds=function(t){return arguments.length?(e.psThresholds_=t,e.psClasses(t.length+1),e):e.psThresholds_},e.updateClassification=function(){try{return function(){var t,n;e.psSizeScale_||("spike"==e.psShape_?e.psSizeScale_="linear":e.psSizeScale_="sqrt");var i=(e.statData("size").getArray()||e.statData().getArray()).map((function(t){return+t})).filter((function(t){return isFinite(t)&&t>0})),r=fy(i),a=y(r,2),o=a[0],s=a[1],l=null!==(t=e.psMinValue_)&&void 0!==t?t:o,c=null!==(n=e.psMaxValue_)&&void 0!==n?n:s;isFinite(l)&&isFinite(c)||(l=e.statData().getMin(),c=e.statData().getMax());var u=[l,c],h="sqrt"==e.psSizeScale_?hy:Cn;e.classifierSize(h().domain(u).range([e.psMinSize_,e.psMaxSize_]))}(),e.statData("color").getArray()&&function(){var t=function(t){return x(Array(t).keys())};if("quantile"===e.psClassificationMethod_){var n=e.statData("color").getArray(),i=t(e.psClasses_);e.classifierColor($t().domain(n).range(i))}else if("equinter"===e.psClassificationMethod_){var r=e.statData("color").getArray(),a=t(e.psClasses_);e.classifierColor(An().domain([min(r),max(r)]).range(a)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassificationMethod_){e.psClasses(e.psThresholds().length+1);var o=t(e.psClasses_);e.classifierColor(kn().domain(e.psThresholds()).range(o))}}(),e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,n),n(e),e}catch(t){console.error("Error in proportional symbols classification: "+t.message),console.error(t)}};var a=function(t,n){var i,r=t.svg().selectAll("g.em-centroid");if(e.psCodeLabels_)r.filter((function(t){var e=n.get(t.properties.id);return":"!==(null==e?void 0:e.value)&&null!=(null==e?void 0:e.value)})).append("text").attr("class","em-circle-code-label").text((function(t){var e=n.get(t.properties.id);return":"===(null==e?void 0:e.value)?"":t.properties.id})).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-family","sans-serif").style("font-size",(function(t){var i,r,a=n.get(t.properties.id),o=a?e.classifierSize_(+a.value):0,s=null!==(i=e.labels_)&&void 0!==i&&i.values&&null!==(r=n.get(t.properties.id))&&void 0!==r&&r.value?.8:.9;return"square"===e.psShape_&&(s-=.4),"".concat(o*s,"px")})).attr("fill",(function(){var t,e=null===(t=window.getComputedStyle(this.parentNode.firstChild))||void 0===t?void 0:t.fill;return pa(e)})).attr("dy",(function(t){var i,r;return null!==(i=e.labels_)&&void 0!==i&&i.values&&null!==(r=n.get(t.properties.id))&&void 0!==r&&r.value?"-0.3em":"0"}));if(null!==(i=e.labels_)&&void 0!==i&&i.values)r.filter((function(t){var e=n.get(t.properties.id);return":"!==(null==e?void 0:e.value)&&null!=(null==e?void 0:e.value)})).append("text").attr("class","em-circle-stat-label").text((function(t){var e=n.get(t.properties.id);if(null!=e&&e.value)return e.value})).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-family","sans-serif").style("font-size",(function(t){var i=n.get(t.properties.id),r=i?e.classifierSize_(+i.value):0;return"".concat(.4*r,"px")})).attr("fill",(function(){var t,n=(null===(t=window.getComputedStyle(this.parentNode.firstChild))||void 0===t?void 0:t.fill)||e.psFill_;return pa(n)})).attr("dy",(function(t){return e.psCodeLabels_?"0.8em":"0"}))},o=function(t){t.svg().selectAll("g.em-centroid").on("mouseover",(function(n,i){var r=Ot(this.childNodes[0]);r.attr("fill___",r.style("fill")),r.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(i,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,i,this,t)})).on("mousemove",(function(n,i){e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,i,this,t)})).on("mouseout",(function(n,i){var r=Ot(this.childNodes[0]),a=r.attr("fill___");a&&(r.style("fill",a),e._tooltip&&e._tooltip.mouseout()),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,i,this,t)}))};return e.updateSymbolsDrawOrder=function(t){var r=e.getCentroidsGroup(t),a=i(t);t.Geometries.centroidsFeatures&&t.Geometries.centroidsFeatures.length||(t.Geometries.centroidsFeatures=t.svg().selectAll("g.em-centroid").data().filter((function(t){var e;return null==t||null===(e=t.properties)||void 0===e?void 0:e.centroid})));var o=t.Geometries.centroidsFeatures.filter((function(t){var e,n=null===(e=a.get)||void 0===e||null===(e=e.call(a,t.properties.id))||void 0===e?void 0:e.value;return null!=n&&":"!==n})).sort((function(t,e){return a.get(e.properties.id).value-a.get(t.properties.id).value}));r.selectAll("g.em-centroid").remove(),r.selectAll("g.em-centroid").data(o,(function(t){return t.properties.id})).enter().append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")})),n(t)},e.updateStyle=function(){try{if(r(e),e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,r),e.dorling_){var t=i(e);tx(e,(function(n){var i=t.get(n.properties.id),r=i?e.classifierSize_(+i.value):0;return"square"===e.psShape_?r/2*Math.SQRT2:r}))}else nx(e);return e}catch(t){console.error("Error in proportional symbols styling: "+t.message),console.error(t)}},e.getLegendConstructor=function(){return gx},e},rx=function(t,e){return t=t||py,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},ax={cross:gy,square:yy,diamond:vy,triangle:Ey,star:Sy,wye:Py,circle:dy},ox=function(t,e){var n;if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var i=t.properties.na,r=t.properties.id,a=e.statData("size").getArray()?e.statData("size"):e.statData(),o=a.get(t.properties.id),s=o&&(0===o.value||!!o.value),l=s?a.unitText():null,c="<tr><td>".concat(s?ca(o.value)+" "+(l||""):e.noDataText_,"</td></tr>"),u="",h=null!==(n=e.statData("color"))&&void 0!==n&&n.getArray()?e.statData("color"):null;if(h){var f=h.get(t.properties.id),p=f&&(0===f.value||!!f.value),d=p?h.unitText():null;u="<tr><td>".concat(p?ca(f.value)+" "+(d||""):e.noDataText_,"</td></tr>")}return'\n <div class="em-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"",'\n </div>\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n ').concat(c,"\n ").concat(u,"\n </tbody>\n </table>\n </div>\n ").trim()};function sx(t,e,n,i,r){var a,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:16;if(r){var s=aa("em-size-legend-title");o+=s,e.append("text").attr("class","em-size-legend-title").attr("id","em-size-legend-title").attr("x",0).attr("y",s).text(r)}var l=i.domain();n||(n=[Math.floor(l[1]),Math.floor(l[0])]);var c=i(Dt(n)),u=c,h=2*c+o,f=e.append("g").attr("transform","translate(".concat(u,",").concat(h,")")).attr("class","em-circle-size-legend").attr("id","em-circle-size-legend").attr("text-anchor","right").style("fill","black").selectAll("g").data(n.filter((function(t){return i(t)}))).join("g").attr("class","em-legend-item");f.append("circle").attr("class","em-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(t){return-i(t)})).attr("r",i);var p=(null===(a=t.sizeLegend)||void 0===a?void 0:a.labelFormatter)||ca;return f.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("y",(function(t,e){return-1-2*i(t)})).attr("x",c+5).text((function(t){return p(t)})),f.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(t,e){return-1-2*i(t)})).attr("x2",c+5).attr("y2",(function(t,e){return-1-2*i(t)})),t}function lx(t,e,n){var i,r=t.map;if(t._sizeLegendContainer=t.lgg.append("g").attr("class","em-size-legend-container").attr("id","em-size-legend-container").attr("transform","translate(".concat(e,",").concat(n,")")),r.psCustomSVG_||"circle"!=r.psShape_)if("spike"!=r.psShape_){var a=(null===(i=t.sizeLegend)||void 0===i?void 0:i.labelFormatter)||ca,o=r.classifierSize_.domain()[1];t.sizeLegend.values&&(t.sizeLegend.cellNb=t.sizeLegend.values.length),r.customSymbols={nodeHeights:0};for(var s=1;s<t.sizeLegend.cellNb+1;s++){var l=t.ascending?t.sizeLegend.cellNb-s+1:s,c=t.sizeLegend.values?t.sizeLegend.values[l-1]:o/l,u=r.classifierSize_(c);"bar"==r.psShape_?hx(t,c,u,s,a):"custom"==r.psShape_||r.psCustomSVG_?ux(t,c,u,s,a):cx(t,c,u,s,a)}if(t.sizeLegend.noData){var h=t._sizeLegendContainer.node().getBBox().height,f=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(h,")"));t.appendNoDataLegend(f,t.sizeLegend.noDataText,px,dx)}}else!function(t){var e=t.map,n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-t,"L").concat(n/2,",0")},i=e.classifierSize_(e.classifierSize_.domain()[1]),r=t.sizeLegend.values||e.classifierSize_.ticks(4).slice(1),a=aa("em-legend-label"),o=a-2,s=t._sizeLegendContainer.append("g").attr("id","em-spike-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(t.sizeLegend.titlePadding,")")).attr("fill","black").attr("text-anchor","middle").style("font-size","".concat(a,"px")).selectAll().data(r).join("g").attr("transform",(function(e,n){return"translate(".concat(40*n+t.boxPadding,",").concat(i+5,")")}));if(s.append("path").attr("fill",e.psFill_).attr("fill-opacity",e.psFillOpacity_).attr("stroke",e.psStroke_).attr("stroke-width",e.psStrokeWidth_).attr("d",(function(t){return n(e.classifierSize_(t))})),s.append("text").attr("class","em-legend-label").attr("dy",o).text((function(t){return e.classifierSize_.tickFormat(4,"s")(t)})),t.sizeLegend.noData){var l=i+o+a+5,c=t.boxPadding,u=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(c,",").concat(l,")"));t.appendNoDataLegend(u,t.sizeLegend.noDataText,px,dx)}}(t);else if(sx(t,t._sizeLegendContainer,t.sizeLegend.values,r.classifierSize_,t.sizeLegend.title,t.sizeLegend.titlePadding),t.sizeLegend.noData){var p=t._sizeLegendContainer.node().getBBox().height+15,d=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(p,")"));t.appendNoDataLegend(d,t.sizeLegend.noDataText,px,dx)}}function cx(t,e,n,i,r){var a=t.map,o="triangle"==a.psShape_||"diamond"==a.psShape_?n:n/2;0==t.sizeLegend._totalD3SymbolsHeight&&(t.sizeLegend._totalD3SymbolsHeight+=o+t.boxPadding);var s=a.classifierSize_(a.classifierSize_.domain()[1]),l=s,c=(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+t.sizeLegend._totalD3SymbolsHeight+(t.sizeLegend.shapePadding*i-1);t.sizeLegend._totalD3SymbolsHeight+=n;var u=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-size-legend-item"),h=fx(t).size(n*n)();u.append("g").style("fill",(function(e){return a.classifierColor_?t.sizeLegend.shapeFill:a.psFill_})).style("fill-opacity",a.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:a.psStroke()).style("stroke-width",a.psStrokeWidth()).append("path").attr("d",h).attr("transform",(function(){return"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var f=s/2+t.sizeLegend.labelOffsets.x+t.boxPadding;u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",f).attr("y",0).text(r(e))}function ux(t,e,n,i,r){var a,o=t.map,s=t.boxPadding;if(o.customSymbols.prevSymb||(a=t.boxPadding+(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+20,o.customSymbols.initialTranslateY=a,o.customSymbols.prevScale=n),o.customSymbols.prevSymb){var l=o.customSymbols.prevSymb.node().getBBox();o.customSymbols.nodeHeights=o.customSymbols.nodeHeights+l.height*o.customSymbols.prevScale,a=o.customSymbols.initialTranslateY+o.customSymbols.nodeHeights+t.sizeLegend.shapePadding*(i-1),o.customSymbols.prevScale=n}var c=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(s,",").concat(a,")")).attr("class","em-size-legend-item");o.customSymbols.prevSymb=c.append("g").attr("class","em-size-legend-symbol").style("fill",(function(e){return o.classifierColor_?t.sizeLegend.shapeFill:o.psFill_})).style("fill-opacity",o.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:o.psStroke()).style("stroke-width",o.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(o.psCustomSVG_).attr("transform",(function(){return o.psCustomSVG_?"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,") scale(").concat(n,")"):"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var u=s+o.classifierSize_(o.classifierSize_.domain()[0])+t.sizeLegend.labelOffsets.x,h=t.sizeLegend.shapeOffsets.y/2+1;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(r(e))}function hx(t,e,n,i,r){var a=t.map,o=t.boxPadding,s=t.boxPadding+(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+t.sizeLegend._totalBarsHeight+10;t.sizeLegend._totalBarsHeight+=n+10;var l=fx(t).size(n*n)(),c=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(o,",").concat(s,")")).attr("class","em-size-legend-item");c.append("g").style("fill",(function(e){return a.classifierColor_?t.sizeLegend.shapeFill:a.psFill_})).style("fill-opacity",a.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:a.psStroke()).style("stroke-width",a.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",l).attr("transform",(function(){return a.psCustomSVG_?"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,") scale(").concat(n,")"):"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var u=o+a.psBarWidth_+t.sizeLegend.labelOffsets.x,h=n/2+t.sizeLegend.labelOffsets.y;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(r(e))}function fx(t){var e,n=t.map;if(n.psCustomSVG_)e=n.psCustomSVG_;else if(n.psCustomShape_)e=n.psCustomShape_;else if("bar"==n.psShape_){e=Ny().type({draw:function(t,e){var i=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,i),t.lineTo(n.psBarWidth_,i),t.lineTo(n.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var i=ax[n.psShape_]||ax.circle;e=Ny().type(i)}return e}function px(t,e){var n=t.getCentroidsGroup(t).selectAll("[ecl]");n.each((function(t,e){Ot(this).style("opacity","0")})),n.filter("[ecl='"+e+"']").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}function dx(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}var gx=function(t,e){var n=yx(t);if(n.sizeLegend={title:null,titlePadding:15,values:void 0,cellNb:3,shapePadding:5,shapeOffsets:{x:0,y:0},shapeFill:"white",shapeStroke:null,labelOffsets:{x:10,y:0},decimals:0,labelFormatter:void 0,noData:!1,noDataText:"No data",_totalBarsHeight:0,_totalD3SymbolsHeight:0},n.colorLegend={title:null,titlePadding:10,marginTop:30,shapeWidth:25,shapeHeight:20,shapePadding:1,labelOffsets:{x:5,y:0},decimals:0,labelFormatter:void 0,labelType:"thresholds",labels:null,noData:!0,noDataText:"No data",sepLineLength:24,sepLineStroke:"black",sepLineStrokeWidth:1,tickLength:5,pointOfDivergenceLabel:void 0,pointOfDivergence:void 0,pointOfDivergencePadding:7,divergingLineLength:void 0,divergingArrowLength:void 0},e)for(var i in e)if("colorLegend"==i||"sizeLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),n.sizeLegend._totalBarsHeight=0,n.sizeLegend._totalD3SymbolsHeight=0;var e=n.getBaseY(),i=n.getBaseX();if(t.classifierSize_&&lx(n,i,e),t.classifierColor_&&n.colorLegend){var r=i,a=e;n._sizeLegendContainer&&(a+=n._sizeLegendContainer.node().getBBox().height+n.colorLegend.marginTop),Xv(n,r,a)}if(n.map.patternFill_){var o=n.lgg.node().getBBox().height,s=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(i,", ").concat(o+n.boxPadding+5,")"));xv(n,s)}n.setBoxDimension()}},n};function _x(t){if("ranges"==t.colorLegend.labelType){var e=function(t){var e=t.map,n=e.psThresholds_.length>1?e.psThresholds_:Array.from({length:e.psClasses_}).map((function(n,i){return e.classifier().invertExtent(i)[t.ascending?0:1]})).slice(1);return n}(t);return t.colorLegend.labelFormatter||function(n,i){var r=vn(".".concat(t.decimals,"f"));return 0===i?"> ".concat(r(e[e.length-1])):i===e.length?"< ".concat(r(e[0])):"".concat(r(e[e.length-i-1])," - < ").concat(r(e[e.length-i])," ")}}return t.colorLegend.labelType,t.colorLegend.labelFormatter||vn(".".concat(t.decimals,"f"))}function mx(t,e){var n=t.getCentroidsGroup(t).selectAll("[ecl]");n.each((function(t,e){Ot(this).style("opacity","0")})),n.filter("[ecl='"+e+"']").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}function vx(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}var yx=function(t){var e={};function n(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new WeakSet,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=r.maxDepth||100;if(a.has(t))return t;if(a.add(t),o>s)return console.warn("Max recursion depth (".concat(s,") reached.")),t;for(var l in e)if(e.hasOwnProperty(l)&&t.hasOwnProperty(l)){var c=e[l],u=t[l];"function"==typeof c?t[l]=c:i(c)&&i(u)?n(u,c,r,a,o+1):Array.isArray(c)&&Array.isArray(u)?t[l]=r.mergeArrays?x(new Set([].concat(x(u),x(c)))):x(c):c instanceof Date?t[l]=new Date(c.getTime()):c instanceof RegExp?t[l]=new RegExp(c):c instanceof Map?t[l]=new Map(c):c instanceof Set?t[l]=new Set(c):t[l]=c}return t}function i(t){return"[object Object]"===Object.prototype.toString.call(t)}return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxPadding=7,e.boxOpacity=.7,e.title="",e.titleFontSize=aa("em-legend-title"),e.width=150,e.titlePadding=5,e.shapeWidth=25,e.shapeHeight=20,e.shapePadding=5,e.labelFontSize=aa("em-legend-label"),e.labelOffsets={x:5,y:5},e.labelFormatter=null,Sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]}),e.noData=!0,e.noDataText="No data",e.noDataPadding=5,e.noDataShapeWidth=25,e.noDataShapeHeight=20,e.ascending=!0,e.decimals=0,e.build=function(){e.svg=Ot("#"+e.svgId),e.svg.selectAll("#em-legend-"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","em-legend-"+e.svgId).attr("class","em-legend")},e.update=function(){return console.log("Legend update function not implemented"),e},e.updateContainer=function(){var t=e.map;e.lgg.selectAll("*").remove(),e.svg.attr("id")!==t.legend_.svgId&&e.build()},e.updateConfig=function(){var t=e.map;t.legend_&&n(e,t.legend_)},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("class","em-legend-background").style("opacity",e.boxOpacity)},e.addTitle=function(){if(e.title){var t=e.lgg.append("g").attr("id","em-legend-titles"),n=aa("em-legend-title");t.append("text").attr("class","em-legend-title").attr("x",e.boxPadding).attr("y",e.boxPadding+n).text(e.title)}},e.addSubtitle=function(){if(e.subtitle){var t=e.lgg.select("#em-legend-titles"),n=aa("em-legend-title"),i=aa("em-legend-subtitle");t.append("text").attr("class","em-legend-subtitle").attr("x",e.boxPadding).attr("y",e.boxPadding+n+i+3).text(e.subtitle)}},e.getBaseY=function(){return e.boxPadding+(e.title?aa("em-legend-title"):0)+(e.subtitle?aa("em-legend-subtitle"):0)+10},e.getBaseX=function(){return e.boxPadding},e.setBoxDimension=function(){if(e.lgg.node()){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)}},e.appendNoDataLegend=function(t,n,i,r){var a=e.map;t.append("rect").attr("class","em-legend-rect").style("fill",a.noDataFillStyle()).attr("y",e.noDataPadding).attr("width",e.noDataShapeWidth).attr("height",e.noDataShapeHeight).on("mouseover",(function(){i(a,"nd"),a.insetTemplates_&&ha(a.insetTemplates_,a.svgId,i,"nd")})).on("mouseout",(function(){r(a),a.insetTemplates_&&ha(a.insetTemplates_,a.svgId,r,"nd")})),t.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",e.noDataShapeWidth+5).attr("y",e.noDataShapeHeight/2+e.noDataPadding).text(n)},e.getNumberOfClasses=function(t){var e=t.map;return"ps"===e._mapType?e.psClasses_:e.numberOfClasses_},e.getLabelFormatter=function(t){return"ps"===t.map._mapType?_x(t):iy(t)},e.getClassToFillStyle=function(t){var e=t.map;return"ps"===e._mapType?e.psClassToFillStyle_:e.classToFillStyle_},e.getColorClassifier=function(t){var e=t.map;return"ps"===e._mapType?e.classifierColor_:e.classifier_},e.getHighlightFunction=function(t){return"ps"==t._mapType?mx:ry},e.getUnHighlightFunction=function(t){return"ps"==t._mapType?vx:ay},e},xx=function(t){var e,n,i;function r(){i=Ot("#"+t.div),i.empty()&&(i=Ot("body").append("div").attr("id",t.id)),i.attr("class","em-tooltip")}return(t=t||{}).containerId=t.containerId||t.svgId||"map",t.customElement=t.customElement,t.id=t.id||"em-tooltip-".concat(t.containerId),t.offset={x:(null===(e=t.offset)||void 0===e?void 0:e.x)||t.xOffset||30,y:(null===(n=t.offset)||void 0===n?void 0:n.y)||t.yOffset||20},t.transitionDuration=0,r.mouseover=function(e){if(i.html(e),e){var n=event.pageX,a=event.pageY;r.ensureTooltipOnScreen(n,a),i.interrupt().transition().duration(t.transitionDuration).style("opacity",1)}},r.mousemove=function(t){var e=t.pageX,n=t.pageY;this.ensureTooltipOnScreen(e,n)},r.mouseout=function(){i.interrupt().transition().duration(t.transitionDuration).style("opacity",0)},r.style=function(t,e){return 1==arguments.length?i.style(t):(i.style(t,e),r)},r.attr=function(t,e){return 1==arguments.length?i.attr(t):(i.attr(t,e),r)},r.ensureTooltipOnScreen=function(e,n){var r=i.node();r.style.left=e+t.offset.x+"px",r.style.top=n-t.offset.y+"px";var a=document.getElementById(t.containerId).getBoundingClientRect(),o=a.width,s=a.height;if(r.offsetLeft>a.left+o-r.clientWidth){var l=e-r.clientWidth-t.offset.x;if(r.style.left=l+"px",r.offsetLeft+r.clientWidth>e){var c=e-r.clientWidth-t.offset.x;r.style.left=c+"px"}}r.offsetTop+r.clientHeight>a.top+s&&(r.style.top=r.offsetTop-r.clientHeight+"px")},r(),r},bx=function(t,e,n){var i=pv(t,e,n);if(i.stat_={default:void 0},i.stat=function(t,e){return arguments.length?2==arguments.length?(i.stat_[t]=e,i):"string"==typeof t||t instanceof String?i.stat_[t]:(i.stat_=t.default?t:{default:t},i):i.stat_.default},i.statData_={default:yv(),color:yv(),size:yv(),v1:yv(),v2:yv(),v3:yv()},i.statData=function(t,e){return arguments.length?1===arguments.length?(i.statData_[t]||(i.statData_[t]=yv()),i.statData_[t]):(i.statData_[t]=e,i):i.statData_.default},i.noDataText_="No data available",i.language_="en",i.transitionDuration_=500,i.tooltip_.textFunction=void 0,i.filtersDefinitionFunction_=void 0,i.callback_=void 0,i.legend_=void 0,i.legendObj_=void 0,["legend_","legendObj_","noDataText_","language_","transitionDuration_","tooltipText_","filtersDefinitionFunction_","callback_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}})),t)for(var r in t)i[r]&&null!=t[r]&&i[r](t[r]);i.legend=function(t){if(!arguments.length)return i.legend_;if(0==t){var e=i.legendObj();if(e){var n=Ot("#"+e.svgId);n.size()>0&&n.selectAll("*").remove()}return i.legend_=t,i}return i.legend_=t,i.legendObj_&&i.updateLegend(),i},i.updateLegend=function(t){return i.legendObj_&&i.legendObj().update(),i},i.build=function(){return i.projectionFunction_&&i.proj("4326"),i.buildMapTemplateBase(),i.filtersDefinitionFunction_&&i.filtersDefinitionFunction_(i.svg(),i.numberOfClasses_),i.legend()&&i.buildLegend(),i.tooltip_||i.tooltip_||(i.tooltip_={id:i.svgId()}),i._tooltip=xx(i.tooltip_),i.updateGeoData(),i.updateStatData(),i},i.buildLegend=function(){i.legendObj(i.getLegendConstructor()(i,i.legend()));var t=i.legendObj();if(0==Ot("#"+t.svgId).size()){var e=null==t.x?i.width()-100-t.boxPadding:t.x,n=null==t.y?t.boxPadding:t.y;i.svg().append("g").attr("id",t.svgId).attr("class","em-legend").attr("transform","translate("+e+","+n+")")}t.build()};var a=function(){for(var t in i.statData_){var e=!!i.stat_[t],n=!(!i.statData_[t]||!i.statData_[t].get());if((e||n)&&!i.statData_[t].isReady())return!1}return!0};return i.updateGeoData=function(){return i.updateGeoMapTemplate((function(){a()&&(i.updateStatValues(),i.callback()&&i.callback()(i))})),i},i.updateStatData=function(){for(var t in i.stat_){var e,n,r=i.stat(t),o=null===(e=(n=i.statData(t)).get)||void 0===e?void 0:e.call(n);if((r||o)&&r){var s=yv(r);i.statData(t,s);var l=i.nutsLevel_;"mixed"===l&&(l=0),s.retrieveFromRemote(l,i.language(),(function(){i.Geometries.isGeoReady()&&a()&&(i.updateStatValues(),i.callback()&&i.callback()(i))}))}}return i},i.updateStatValues=function(){return e&&i.refreshCentroids(i),i.updateClassification(),i.updateStyle(),i.legend_&&i.legendObj()&&i.legendObj().update(),i},i.updateClassification=function(){return console.log("Map updateClassification function not implemented"),i},i.updateStyle=function(){return console.log("Map updateStyle function not implemented"),i},i.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),yx},i.getTime=function(){return i.statData("default").getTime()},i.setFromURL=function(){var t=wx();return t.w&&i.width(t.w),t.h&&i.height(t.h),t.x&&t.y&&i.geoCenter([t.x,t.y]),t.z&&i.pixelSize(t.z),t.s&&i.scale(t.s),t.lvl&&i.nutsLevel(t.lvl),t.time&&(i.filters_.time=t.time,delete i.filters_.lastTimePeriod),t.proj&&i.proj(t.proj),t.geo&&i.geo(t.geo),t.ny&&i.nutsYear(t.ny),t.language&&i.language(t.language),t.numberOfClasses&&i.numberOfClasses(+t.numberOfClasses),i},i.exportMapToSVG=function(){var t=i.svg_.node().cloneNode(!0);t.hasAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.hasAttribute("xmlns:xlink")||t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),document.body.appendChild(t),la(t),document.body.removeChild(t);var e=function(t){var e='<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'+t.outerHTML,n=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(n)}(t),n=document.createElement("a");return n.href=e,n.download="eurostatmap.svg",document.body.appendChild(n),n.click(),document.body.removeChild(n),i},i.exportMapToPNG=function(t,e){var n=i.svg_.node().cloneNode(!0);la(n);var r=(new XMLSerializer).serializeToString(n),a=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(a);if(t=t||n.getAttribute("width"),e=e||n.getAttribute("height"),!t||!e)throw new Error("SVG width or height attributes are missing or invalid.");var s=new Image;return s.onload=function(){var n=document.createElement("canvas");n.width=parseFloat(t),n.height=parseFloat(e),n.getContext("2d").drawImage(s,0,0,n.width,n.height),n.toBlob((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostat-map.png",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o),URL.revokeObjectURL(e)}),"image/png")},s.src=o,i},i},wx=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","language","sl","numberOfClasses"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t};function Sx(t){return t.slice().sort((function(t,e){return t-e}))}function Mx(t,e){for(var n=[],i=0;i<t;i++){for(var r=[],a=0;a<e;a++)r.push(0);n.push(r)}return n}function Ex(t,e,n,i){var r;if(t>0){var a=(n[e]-n[t-1])/(e-t+1);r=i[e]-i[t-1]-(e-t+1)*a*a}else r=i[e]-n[e]*n[e]/(e+1);return r<0?0:r}function Cx(t,e,n,i,r,a,o){if(!(t>e)){var s=Math.floor((t+e)/2);i[n][s]=i[n-1][s-1],r[n][s]=s;var l=n;t>n&&(l=Math.max(l,r[n][t-1]||0)),l=Math.max(l,r[n-1][s]||0);var c,u,h,f=s-1;e<i[0].length-1&&(f=Math.min(f,r[n][e+1]||0));for(var p=f;p>=l&&!((c=Ex(p,s,a,o))+i[n-1][l-1]>=i[n][s]);--p)(u=Ex(l,s,a,o)+i[n-1][l-1])<i[n][s]&&(i[n][s]=u,r[n][s]=l),l++,(h=c+i[n-1][p-1])<i[n][s]&&(i[n][s]=h,r[n][s]=p);Cx(t,s-1,n,i,r,a,o),Cx(s+1,e,n,i,r,a,o)}}function Ax(t,e){if(e>t.length)throw new Error("cannot generate more classes than there are data values");var n=Sx(t),i=function(t){for(var e,n=0,i=0;i<t.length;i++)0!==i&&t[i]===e||(e=t[i],n++);return n}(n);if(1===i)return[n];var r=Mx(e,n.length),a=Mx(e,n.length);!function(t,e,n){for(var i=e[0].length,r=t[Math.floor(i/2)],a=[],o=[],s=0,l=void 0;s<i;++s)l=t[s]-r,0===s?(a.push(l),o.push(l*l)):(a.push(a[s-1]+l),o.push(o[s-1]+l*l)),e[0][s]=Ex(0,s,a,o),n[0][s]=0;for(var c=1;c<e.length;++c)Cx(c<e.length-1?c:i-1,i-1,c,e,n,a,o)}(n,r,a);for(var o=[],s=a[0].length-1,l=a.length-1;l>=0;l--){var c=a[l][s];o[l]=n.slice(c,s+1),l>0&&(s=c-1)}return o}function kx(t,e){if(e>t.length)return null;t=t.slice().sort((function(t,e){return t-e}));var n=function(t,e){var n,i,r=[],a=[],o=0;for(n=0;n<t.length+1;n++){var s=[],l=[];for(i=0;i<e+1;i++)s.push(0),l.push(0);r.push(s),a.push(l)}for(n=1;n<e+1;n++)for(r[1][n]=1,a[1][n]=0,i=2;i<t.length+1;i++)a[i][n]=Number.POSITIVE_INFINITY;for(var c=2;c<t.length+1;c++){for(var u=0,h=0,f=0,p=0,d=1;d<c+1;d++){var g=c-d+1,_=t[g-1];if(o=(h+=_*_)-(u+=_)*u/++f,0!=(p=g-1))for(i=2;i<e+1;i++)a[c][i]>=o+a[p][i-1]&&(r[c][i]=g,a[c][i]=o+a[p][i-1])}r[c][1]=1,a[c][1]=o}return{lowerClassLimits:r,varianceCombinations:a}}(t,e);return function(t,e,n){var i=t.length,r=[],a=n;for(r[n]=t[t.length-1];a>0;)r[a-1]=t[e[i][a]-1],i=e[i][a]-1,a--;return r}(t,n.lowerClassLimits,e)}var Tx=function(){this.totalCount=0,this.data={}};Tx.prototype.train=function(t,e){for(var n in this.data[e]||(this.data[e]={}),t){var i=t[n];void 0===this.data[e][n]&&(this.data[e][n]={}),void 0===this.data[e][n][i]&&(this.data[e][n][i]=0),this.data[e][n][i]++}this.totalCount++},Tx.prototype.score=function(t){var e,n={};for(var i in t){var r=t[i];for(e in this.data)n[e]={},this.data[e][i]?n[e][i+"_"+r]=(this.data[e][i][r]||0)/this.totalCount:n[e][i+"_"+r]=0}var a={};for(e in n)for(var o in a[e]=0,n[e])a[e]+=n[e][o];return a};var Px=function(){this.weights=[],this.bias=0};Px.prototype.predict=function(t){if(t.length!==this.weights.length)return null;for(var e=0,n=0;n<this.weights.length;n++)e+=this.weights[n]*t[n];return(e+=this.bias)>0?1:0},Px.prototype.train=function(t,e){if(0!==e&&1!==e)return null;t.length!==this.weights.length&&(this.weights=t,this.bias=1);var n=this.predict(t);if("number"==typeof n&&n!==e){for(var i=e-n,r=0;r<this.weights.length;r++)this.weights[r]+=i*t[r];this.bias+=i}return this};Math.log(Math.sqrt(2*Math.PI));Math.sqrt(2*Math.PI);var Nx=Math.sqrt(2*Math.PI);function Lx(t){for(var e=t,n=t,i=1;i<15;i++)e+=n*=t*t/(2*i+1);return Math.round(1e4*(.5+e/Nx*Math.exp(-t*t/2)))/1e4}for(var Fx=[],Ox=0;Ox<=3.09;Ox+=.01)Fx.push(Lx(Ox));var Gx=function(t){var e=bx(t,!1,"ch");e.numberOfClasses_=7,e.classificationMethod_="quantile",e.thresholds_=[0],e.colors_=null,e.makeClassifNice_=!0;var n=["#E9ECF6","#D4DAF0","#C1C9EB","#A8B4E6","#93A2DC","#7C90D6","#677CD2","#5169BE","#3C57B0","#2644A7","#15246B","#081132"];function i(t){var n=function(t){return x(Array(t).keys())},i=e.statData().getArray(),r=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var i=n.value;return":"===i||null===i?"nd":"continuous"===e.colorSchemeType_?i:null!=i?+e.classifier_(i):void 0}}))};if(function(){var t=n(e.numberOfClasses_);if("continuous"===e.colorSchemeType_){var r,a=e.valueTransform_||function(t){return t},o=i.map(a),s=Gt(o),l=Dt(o),c=function(t){return null!==t.pointOfDivergence_}(e);if(!("function"==typeof(null===(r=e.colorFunction_)||void 0===r?void 0:r.domain)))if(c){var u,h=a(null!==(u=e.pointOfDivergence_)&&void 0!==u?u:0);e.domain_=[s,h,l]}else e.domain_=[s,l];e.classifier((function(t){return t}))}switch(e.classificationMethod_){case"quantile":e.classifier($t().domain(i).range(t));break;case"equal-interval":case"equinter":e.classifier(An().domain([Gt(i),Dt(i)]).range(t)),e.makeClassifNice_&&e.classifier().nice();break;case"threshold":e.numberOfClasses(e.thresholds_.length+1),e.classifier(kn().domain(e.thresholds_).range(n(e.numberOfClasses_)));break;case"jenks":var f=kx(i,e.numberOfClasses_).slice(1,-1);e.classifier(kn().domain(f).range(t));break;case"ckmeans":var p=Ax(i,e.numberOfClasses_).map((function(t){return t.pop()})).slice(0,-1);e.classifier(kn().domain(p).range(t))}}(),t.svg_){var a=da(t);if(r(t.svg().selectAll(a)),"mixed"===t.nutsLevel_)r(t.svg().selectAll("path.em-nutsrg0"))}}function r(t){if(e.filtersDefinitionFunction_?e.classToFillStyle(zx()):e.classToFillStyle(Dx(e.colorFunction_,e.colors_)),t.svg_){var n=da(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",o).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),s(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",pa(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&a(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&Ly(t,e.patternFill_)}}e.colorFunction_=function(t){return function(t,e){void 0===e&&(e=t,t=Xe);for(var n=0,i=e.length-1,r=e[0],a=new Array(i<0?0:i);n<i;)a[n]=t(r,r=e[++n]);return function(t){var e=Math.max(0,Math.min(i-1,Math.floor(t*=i)));return a[e](t-e)}}(Xn,n)(Math.min(Math.max(0,t),1))},e.classToFillStyle_=void 0,e.classifier_=void 0,e.tooltip_.textFunction=Ix,e.colorSchemeType_="discrete",e.valueTransform_=function(t){return t},e.valueUntransform_=function(t){return t},e.pointOfDivergence_=null,["numberOfClasses_","classificationMethod_","thresholds_","makeClassifNice_","colorFunction_","classToFillStyle_","noDataFillStyle_","classifier_","colors_","colorFunction_","colorSchemeType_","valueTransform_","valueUntransform_","pointOfDivergence_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFunction=function(t){if(!arguments.length)return e.colorFunction_;if(e.colorFunction_=t,e.filtersDefinitionFunction_)e.classToFillStyle(zx());else{var n=Dx(e.colorFunction_,e.colors_,e.colorSchemeType_);e.classToFillStyle(n)}return e},e.threshold=function(t){return arguments.length?(e.thresholds_=t,e.numberOfClasses(t.length+1),e):e.thresholds_},e.filtersDefinitionFunction=function(t){return arguments.length?(e.filtersDefinitionFunction_=t,e.svg()&&e.filtersDefinitionFunction_(e.svg(),e.numberOfClasses_),e):e.filtersDefinitionFunction_},t&&["numberOfClasses","classificationMethod","threshold","makeClassifNice","colorFunction","classToFillStyle","noDataFillStyle","colors"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){try{return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),e}catch(t){console.error("Error in updateClassification:",t.message),console.error(t)}},e.updateStyle=function(){try{return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,r),r(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}},e.getLegendConstructor=function(){return ey};var a=function(t){t.svg().selectAll(da(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ot(this),e=t.attr("ecl"),n=t.attr("lvl"),i=e||"0"===n;if(t.style("display",i?"block":"none"),e&&"0"!==n){var r=t.style("stroke")||"#777",a=t.style("stroke-width")||.2;t.style("stroke",r).style("stroke-width",a)}}}))};var o=function(t){var n,i=Ot(this).attr("ecl"),r=e.colorSchemeType_||"discrete";if(i||"0"===i)return"nd"===i?e.noDataFillStyle_||"gray":e.filtersDefinitionFunction_?e.classToFillStyle_(i):"continuous"===r?function(t,e){var n,i=e.colorFunction_,r=e.domain_||[0,1],a="function"==typeof(null==i?void 0:i.domain),o=e.valueTransform_||function(t){return t},s=o(t);if(isNaN(s))return e.noDataFillStyle_||"gray";if(a)return i(s);if(3===r.length){var l,c=y(r,3),u=c[0],h=c[2],f=o(null!==(l=e.pointOfDivergence_)&&void 0!==l?l:0);n=s<f?.5*(s-u)/(f-u):.5+.5*(s-f)/(h-f)}else{var p=y(r,2),d=p[0];n=(s-d)/(p[1]-d)}return i(Math.min(Math.max(n,0),1))}(+i,e):null!==(n=e.Geometries)&&void 0!==n&&n.userGeometries?e.classToFillStyle_(i,e.numberOfClasses_||1):"WORLD"===e.geo_?e.classToFillStyle_(i,e.numberOfClasses_||1)||e.cntrgFillStyle_:e.classToFillStyle_(i,e.numberOfClasses_||1)},s=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.highlightRegion=function(t){if(!e.svg_)return e;var n=da(e),i=e.svg().selectAll(n).filter((function(e){return e.properties.id===t}));if(!i.empty()){var r=i.datum();if(i.style("fill",e.hoverColor_||"orange"),e._tooltip){var a=e.tooltip_.textFunction(r,e);e._tooltip.mouseover(a);var o=i.node().getBBox(),s=e.__lastTransform||{x:0,y:0,k:1},l=(o.x+o.width/2)*s.k+s.x,c=(o.y+o.height/2)*s.k+s.y,u=e.svg().node().getBoundingClientRect(),h=u.left+l,f=u.top+c;e._tooltip.ensureTooltipOnScreen(h,f)}e.onRegionMouseOver_&&e.onRegionMouseOver_(null,r,i.node(),e)}return e},e.clearHighlight=function(){if(!e.svg_)return e;var t=da(e);return e.svg().selectAll(t).each((function(){var t=Ot(this),e=t.attr("fill___");e&&t.style("fill",e)})),e._tooltip&&e._tooltip.mouseout(),e},e},Dx=function(t,e){return t=t||Nn,"continuous"===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"discrete")?function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],i=(e-n[0])/(n[1]-n[0]);return t(Math.min(Math.max(i,0),1))}:e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},zx=function(){return function(t){return"url(#pattern_"+t+")"}},Ix=function(t,e){if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var n=[],i=t.properties.na||t.properties.name,r=t.properties.id;n.push('\n <div class="em-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"","\n </div>\n "));var a=e.statData(),o=a.get(r),s=a.unitText()||"";if(!o||0!==o.value&&!o.value||":"===o.value)return n.push('\n <div class="em-tooltip-text no-data">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(e.noDataText_,"</td></tr>\n </tbody>\n </table>\n </div>\n ")),n.join("");n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(ca(o.value)," ").concat(s,"</td></tr>\n </tbody>\n </table>\n </div>\n "));var l=o.status;if(l&&e.tooltip_.showFlags){var c="short"===e.tooltip_.showFlags?l:flags[l]||l;n.push(' <span class="status-flag">'.concat(c,"</span>"))}return n.join("")};const Rx=Tn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var jx=function(t,e){var n=yx(t);if(n.order=void 0,e)for(var i in e)n[i]=e[i];function r(t,e){var n=ga(t),i=t.svg_.selectAll(n).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function a(t){var e=ga(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()&&n.map.classifier_){n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var t=n.getBaseY(),e=n.getBaseX();if(n._categoricalContainer=n.lgg.append("g").attr("class","em-legend-categorical").attr("transform","translate(".concat(e,", ").concat(t,")")),function(t){for(var e=t._categoricalContainer,n=t.map,i=n.classToFillStyle()?Object.keys(n.classToFillStyle()):n.classifier_.domain(),o=t.order?t.order:i,s=function(){var i=o[l],s=n.classifier_(i),c=n.classToFillStyle_[i],u=t.titlePadding+l*(t.shapeHeight+t.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",u).attr("width",t.shapeWidth).attr("height",t.shapeHeight).style("fill",c).on("mouseover",(function(){r(t.map,s),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.svgId_,r,s)})).on("mouseout",(function(){a(t.map),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.svgId_,a,s)})),e.append("text").attr("class","em-legend-label").attr("x",t.shapeWidth+t.labelOffsets.x).attr("y",u+.5*t.shapeHeight).attr("dy","0.35em").text(n.classToText()?n.classToText()[i]:i)},l=0;l<o.length;l++)s()}(n),n.map.patternFill_){var i=n.lgg.node().getBBox().height,o=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(e,", ").concat(i+15,")"));xv(n,o)}if(n.noData){var s=n.lgg.node().getBBox().height+10,l=e,c=n.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(l,",").concat(s+15,")"));n.appendNoDataLegend(c,n.noDataText,r,a)}n.setBoxDimension()}},n},Bx=function(t,e){var n=[];t.properties.id?n.push('<div class="em-tooltip-bar">'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="em-tooltip-bar">'+t.properties.na+"</div>");var i=e.statData().get(t.properties.id);if(!i||0!=i.value&&!i.value)return n.push(e.noDataText_),n.join("");var r=i.value;if(e.classToText_){var a=e.classToText_[r];return n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(a||r,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")}return n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(r,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")},qx=Array.prototype.slice;function Ux(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wx(t){this._context=t}function Hx(t){return new Wx(t)}function Vx(t){return t[0]}function $x(t){return t[1]}function Yx(t,e){var n=hr(!0),i=null,r=Hx,a=null,o=Pr(s);function s(s){var l,c,u,h=(s=Ux(s)).length,f=!1;for(null==i&&(a=r(u=o())),l=0;l<=h;++l)!(l<h&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(c,l,s),+e(c,l,s));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Vx:hr(t),e="function"==typeof e?e:void 0===e?$x:hr(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:hr(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:hr(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:hr(!!t),s):n},s.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),s):r},s.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),s):i},s}Wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,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:this._context.lineTo(t,e)}}};var Jx=function(t,e){var n=yx(t);if(n.squareSize=100,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.axisTitleFontSize=aa("em-bivariate-axis-title"),n.breaks1=void 0,n.breaks2=void 0,n.showBreaks=!1,n.tickLength=5,n.yAxisLabelsOffset={x:0,y:0},n.xAxisLabelsOffset={x:0,y:0},n.yAxisTitleOffset={x:0,y:0},n.xAxisTitleOffset={x:0,y:0},n.boxPadding=n.labelFontSize,n.noDataYOffset=30,n.axisArrows=!0,n.arrowHeight=15,n.arrowWidth=14,n.arrowPadding=10,e)for(var i in e)n[i]=e[i];function r(t,e,n){var i=ga(t),r=t.svg_.selectAll(i).selectAll("[ecl1]");r.style("fill","white"),r.filter("[ecl1='".concat(e,"']")).filter("[ecl2='".concat(n,"']")).each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function a(t){var e=ga(t);t.svg_.selectAll(e).selectAll("[ecl1]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n._horizontalOffset=n.axisTitleFontSize+n.arrowPadding,n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),n._y=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),function(){for(var t=n.lgg,e=n.map.numberOfClasses(),i=n.squareSize/e,o=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,s=0,l=t.append("g").attr("class","bivariate-squares-chart").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(o+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)")),c=0;c<e;c++)for(var u=function(){var t=e-c-1,o=e-h-1,u=n.map.classToFillStyle()(t,o);l.append("rect").attr("class","em-bivariate-square").attr("x",s+(e-1-c)*i).attr("y",h*i).attr("width",i).attr("height",i).style("fill",u).on("mouseover",(function(){r(n.map,t,o),n.map.insetTemplates_&&ha(n.map.insetTemplates_,n.map.svgId,r,t,o),Ot(this).raise()})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ha(n.map.insetTemplates_,n.map.svgId,a,t,o)}))},h=0;h<e;h++)u();l.append("rect").attr("class","em-bivariate-frame").attr("x",s).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("stroke-width",.7)}(),!n.breaks1&&!n.breaks2&&n.showBreaks){var e=t.classifier1_;"function"==typeof e.quantiles?n.breaks1=e.quantiles().map((function(t){return parseFloat(t.toFixed(0))})):e.domain&&(n.breaks1=e.domain().map((function(t){return parseFloat(t.toFixed(0))})));var i=t.classifier2_;"function"==typeof i.quantiles?n.breaks2=i.quantiles().map((function(t){return parseFloat(t.toFixed(0))})):i.domain&&(n.breaks2=i.domain().map((function(t){return parseFloat(t.toFixed(0))})))}var o,s;!function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.map.numberOfClasses(),r=n.squareSize/i,a=n.lgg.append("g").attr("class","bivariate-break-labels").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)"));if(n.breaks1)for(var o=0;o<n.breaks1.length;o++){var s=e+r*(o+1),l=n.squareSize+aa("em-bivariate-tick-label");a.append("text").attr("class","em-bivariate-tick-label").attr("x",s+n.xAxisLabelsOffset.x).attr("y",l+n.xAxisLabelsOffset.y).text(n.breaks1[o]),a.append("line").attr("class","em-bivariate-tick").attr("x1",s).attr("x2",s).attr("y1",n.squareSize).attr("y2",n.squareSize+n.tickLength)}if(n.breaks2)for(var c=0;c<n.breaks2.length;c++){var u=e,h=r*(c+2)-r;a.append("text").attr("class","em-bivariate-tick-label").attr("x",u+n.yAxisLabelsOffset.x).attr("y",h-n.yAxisLabelsOffset.y-(n.tickLength+2)).text(x(n.breaks2).reverse()[c]).attr("text-anchor","middle").attr("transform","rotate(-90, ".concat(u,", ").concat(h,")")),a.append("line").attr("class","em-bivariate-tick").attr("x1",u).attr("x2",u-n.tickLength).attr("y1",h).attr("y2",h)}}(),n._xAxisArrowY=0,n._yAxisArrowX=0,n.axisArrows&&function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.lgg.append("g").attr("class","bivariate-axis-arrows").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)"));n._xAxisArrowY=n.squareSize+n.tickLength+n.arrowPadding,(n.showBreaks||n.breaks1&&n.breaks2)&&(n._xAxisArrowY+=aa("em-bivariate-tick-label")/1.5);i.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Yx()([[e,n._xAxisArrowY],[e+n.squareSize,n._xAxisArrowY]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n._yAxisArrowX=-n.tickLength-n.arrowPadding,(n.showBreaks||n.breaks1&&n.breaks2)&&(n._yAxisArrowX-=n.labelFontSize/2);i.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Yx()([[n._yAxisArrowX,n.squareSize],[n._yAxisArrowX,0]])).attr("stroke","black").attr("marker-end","url(#arrowhead)")}(),function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.lgg.append("g").attr("class","bivariate-axis-titles").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)")),r=n.squareSize+n.xAxisLabelsOffset.y+(n.axisArrows?n.arrowPadding+n.arrowHeight:7),a=e;(n.showBreaks||n.breaks1&&n.breaks2)&&(r+=aa("em-bivariate-tick-label"));n.xAxisTitleOffset&&(r+=n.xAxisTitleOffset.y);n.xAxisTitleOffset&&(a+=n.xAxisTitleOffset.x);i.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-x").attr("x",a).attr("y",r).text(n.label1).attr("dominant-baseline","hanging").attr("alignment-baseline","hanging");var o=(n.axisArrows?n._yAxisArrowX-n.arrowPadding:7)+(-45==n.rotation?-4:-10);(n.showBreaks||n.breaks1&&n.breaks2)&&(r+=aa("em-bivariate-tick-label"));var s=-n.squareSize;n.yAxisTitleOffset&&(o+=n.yAxisTitleOffset.y);n.yAxisTitleOffset&&(s+=n.yAxisTitleOffset.x);i.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-y").attr("x",s).attr("y",o).text(n.label2).style("transform",n.rotation<0?"translate(".concat(n.axisArrows?-51:-15,"px, 95px) rotate(90deg)"):"rotate(-90deg)")}(),n.lgg.append("defs").append("marker").attr("viewBox","0 0 ".concat(n.arrowWidth," ").concat(n.arrowHeight)).attr("id","arrowhead").attr("refX",0).attr("refY",5).attr("markerWidth",n.arrowWidth).attr("markerHeight",n.arrowHeight).attr("orient","auto").append("path").attr("d","M 0 0 L 5 5 L 0 10").attr("marker-units","strokeWidth"),n.noData&&(o=0===n.rotation?n.noDataYOffset+n.squareSize/n.map.numberOfClasses_+n.arrowHeight/2:n.noDataYOffset,s=0===n.rotation?n._y+n.squareSize+o:n._y+1.4142*n.squareSize+2*n.boxPadding+o,n.lgg.append("rect").attr("class","em-bivariate-nodata").attr("x",n.boxPadding+n.noDataShapeWidth/2).attr("y",s+(0==n.rotation?0:-10)).attr("width",n.noDataShapeWidth).attr("height",n.noDataShapeHeight).style("fill",n.map.noDataFillStyle()).on("mouseover",(function(){("mixed"==n.map.nutsLevel_?xa("#em-nutsrg"):Ot("#em-nutsrg")).selectAll("[nd='nd']").style("fill","red")})).on("mouseout",(function(){("mixed"==n.map.nutsLevel_?xa("#em-nutsrg"):Ot("#em-nutsrg")).selectAll("[nd='nd']").style("fill",(function(){return Ot(this).attr("fill___")})),Ot(this).style("fill",n.map.noDataFillStyle())})),n.lgg.append("text").attr("class","em-bivariate-nodata-label").attr("x",n.boxPadding+n.noDataShapeWidth+(n.noDataShapeWidth/2+5)).attr("y",s+.5*n.noDataShapeHeight+1+(0==n.rotation?0:-10)).text(n.noDataText)),n.setBoxDimension()},n},Xx=function(t,e,n,i,r){for(var a=[],o=Re(e,n),s=Re(i,r),l=0;l<t;l++){for(var c=l/(t-1),u=Re(o(c),s(c)),h=[],f=0;f<t;f++)h.push(u(f/(t-1)));a.push(h)}return function(t,e){return a[t][e]}},Kx=function(t,e){var n=[],i=t.properties.na||t.properties.name;t.properties.id?n.push('<div class="em-tooltip-bar" >'+i+" ("+t.properties.id+") </div>"):n.push('<div class="em-tooltip-bar" >'+i+"</div>");var r=e.statData("v1").get(t.properties.id),a=e.statData("v1").unitText(),o=e.statData("v2").get(t.properties.id),s=e.statData("v2").unitText();return n.push('\n <div class="em-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(r&&r.value?ca(r.value):""," ").concat(a&&r&&r.value?a:"","\n ").concat(!r||0!=r.value&&!r.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n ").concat(o&&o.value?ca(o.value):""," ").concat(s&&o&&o.value?s:"","\n ").concat(!o||0!=o.value&&!o.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")},Zx=function(t,e){var n=yx(t);if(n.width=(null==e?void 0:e.width)||150,n.fontSize=(null==e?void 0:e.fontSize)||12,n.padding=(null==e?void 0:e.padding)||2,n.topText=(null==e?void 0:e.topText)||"Variable 1",n.leftText=(null==e?void 0:e.leftText)||"Variable 2",n.rightText=(null==e?void 0:e.rightText)||"Variable 3",e)for(var i in e)n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){if(!n.map.colorClassifier_)return console.error("Trivariate legend: map.colorClassifier_ missing"),n;n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),function(){var t,e,i,r,a,o,s=n.lgg,l=n.map,c=l.colorClassifier_,u=.866025,h=n.width,f=h*u,p=n.fontSize,d=n.padding,g=n.selectionColor||"red",_=l._tooltip,m=s.attr("class","em-ternary-legend").attr("width",h).attr("height",f+4*d+2*p);m.append("text").attr("x",h/2).attr("y",d+p).text(n.topText).attr("font-size",p).attr("text-anchor","middle"),m.append("text").attr("x",0).attr("y",3*d+2*p+f).text(n.leftText).attr("font-size",p).attr("text-anchor","start"),m.append("text").attr("x",h).attr("y",3*d+2*p+f).text(n.rightText).attr("font-size",p).attr("text-anchor","end");var v=m.append("g").attr("transform","translate(0,".concat(2*d+p,")")),y=function(t,e,n){t.attr("fill",e).on("mouseover",(function(t){Ot(this).attr("fill",g),_&&n&&_.mouseover(n)})).on("mousemove",(function(t){_&&n&&_.mousemove(t)})).on("mouseout",(function(t){Ot(this).attr("fill",e),_&&_.mouseout(t)}))};null!=n&&n.texts&&(c.texts=n.texts);var x=v.append("polygon").attr("points","\n 0,".concat(f," ").concat(h/3,",").concat(f," ").concat(h/2,",").concat(2*f/3," ").concat(h/6,",").concat(2*f/3,"\n"));y(x,c.colors[0],null===(t=c.texts)||void 0===t?void 0:t[0]);var b=v.append("polygon").attr("points","\n ".concat(h/2,",0 ").concat(2*h/3,",").concat(f/3," ").concat(h/2,",").concat(2*f/3," ").concat(h/3,",").concat(f/3,"\n"));y(b,c.colors[1],null===(e=c.texts)||void 0===e?void 0:e[1]);var w=v.append("polygon").attr("points","\n ".concat(h,",").concat(f," ").concat(5*h/6,",").concat(2*f/3," ").concat(h/2,",").concat(2*f/3," ").concat(2*h/3,",").concat(f,"\n"));y(w,c.colors[2],null===(i=c.texts)||void 0===i?void 0:i[2]);var S=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(5*h/6,",").concat(2*f/3," ").concat(2*h/3,",").concat(f/3,"\n"));y(S,c.mixColors[0],null===(r=c.texts)||void 0===r?void 0:r.m12);var M=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(h/3,",").concat(f," ").concat(2*h/3,",").concat(f,"\n"));y(M,c.mixColors[1],null===(a=c.texts)||void 0===a?void 0:a.m02);var E=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(h/6,",").concat(2*f/3," ").concat(h/3,",").concat(f/3,"\n"));if(y(E,c.mixColors[2],null===(o=c.texts)||void 0===o?void 0:o.m01),c.centerCoefficient){var C;y(v.append("circle").attr("cx",h/2).attr("cy",2*f/3).attr("r",c.centerCoefficient*f/3),c.centerColor,null===(C=c.texts)||void 0===C?void 0:C.center)}}(),n.setBoxDimension()}},n},Qx=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=y(n||["red","green","blue"],3),a=r[0],o=r[1],s=r[2],l=i.colorInterpolation||Xn,c=null==i.withMixedClasses||i.withMixedClasses,u=function(t,e){return l(t,e)(.5)},h=y(i.mixedColors||c?[u(o,s),u(a,s),u(a,o)]:[],3),f=h[0],p=h[1],d=h[2],g=i.centerColor||l(u(a,o),s)(.333),_=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t[0],r=t[1],a=t[2],o=y(n.center||[1/3,1/3,1/3],3),s=o[0],l=o[1],c=o[2],u=null==n.withMixedClasses||n.withMixedClasses,h=n.centerCoefficient?1-n.centerCoefficient:void 0,f=function(t){var n=e(t);if(n){var o=+t[i]/n,f=+t[r]/n,p=+t[a]/n;return o>=s&&f<=l&&p<=c?null!=h&&(p-c)*(l-h*l)>=(f-h*l)*(h*c-c)?"center":"0":o<=s&&f>=l&&p<=c?null!=h&&(p-c)*(s-h*s)>=(o-h*s)*(h*c-c)?"center":"1":o<=s&&f<=l&&p>=c?null!=h&&(f-l)*(s-h*s)>=(o-h*s)*(h*l-l)?"center":"2":o<=s&&f>=l&&p>=c?null!=h&&o>h*s?"center":u?"m12":f>p?"1":"2":o>=s&&f<=l&&p>=c?null!=h&&f>h*l?"center":u?"m02":o>p?"0":"2":o>=s&&f>=l&&p<=c?null!=h&&p>h*c?"center":u?"m01":f>o?"1":"0":"unknown"}};return f.center=[s,l,c],f.centerCoefficient=n.centerCoefficient,f}(t,e,i),m=function(t){var e=_(t);return"0"==e?a:"1"==e?o:"2"==e?s:"m12"==e?f:"m02"==e?p:"m01"==e?d:"center"==e?g:i.defaultColor||"black"};return m.center=_.center,m.centerCoefficient=i.centerCoefficient,m.colors=[a,o,s],m.mixColors=[f,p,d],m.centerColor=g,m.classifier=_,m},tb=function(t,e){var n,i,r,a=[],o=t.properties.na||"",s=t.properties.id||"";a.push('<div class="em-tooltip-bar">'.concat(o).concat(s?" (".concat(s,")"):"","</div>"));var l=e.statData("v1").get(s),c=e.statData("v2").get(s),u=e.statData("v3").get(s);return a.push('<div class="em-tooltip-text" style="background:#fff;color:#171a22;padding:4px;font-size:15px;">\n <table class="em-tooltip-table"><tbody>\n <tr><td>'.concat(e.statData("v1").label_||"Variable 1",": ").concat(null!=l&&l.value?ca(l.value):""," ").concat((null==l||null===(n=l.unitText)||void 0===n?void 0:n.call(l))||"","</td></tr>\n <tr><td>").concat(e.statData("v2").label_||"Variable 2",": ").concat(null!=c&&c.value?ca(c.value):""," ").concat((null==c||null===(i=c.unitText)||void 0===i?void 0:i.call(c))||"","</td></tr>\n <tr><td>").concat(e.statData("v3").label_||"Variable 3",": ").concat(null!=u&&u.value?ca(u.value):""," ").concat((null==u||null===(r=u.unitText)||void 0===r?void 0:r.call(u))||"","</td></tr>\n </tbody></table></div>")),a.join("")};function eb(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function nb(t){return t}function ib(){var t=nb,e=eb,n=null,i=hr(0),r=hr(wr),a=hr(0);function o(o){var s,l,c,u,h,f=(o=Ux(o)).length,p=0,d=new Array(f),g=new Array(f),_=+i.apply(this,arguments),m=Math.min(wr,Math.max(-wr,r.apply(this,arguments)-_)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),y=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[d[s]=s]=+t(o[s],s,o))>0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(o[t],o[e])})),s=0,c=p?(m-f*y)/p:0;s<f;++s,_=u)l=d[s],u=_+((h=g[l])>0?h*c:0)+y,g[l]={data:o[l],index:s,value:h,startAngle:_,endAngle:u,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:hr(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:hr(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:hr(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:hr(+t),o):a},o}const rb=Tn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var ab=function(t,e){var n=yx(t);if(e)for(var i in e)n[i]=e[i];function r(t,e){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ot(this);t.attr("data-original-fill")||t.attr("data-original-fill",t.style("fill")),t.style("fill","white")})),t.svg_.selectAll("pattern").selectAll("rect[code='"+e+"']").each((function(){var t=Ot(this);t.style("fill",t.attr("data-original-fill"))}))}function a(t){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ot(this),e=t.attr("data-original-fill");e&&t.style("fill",e)}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=t.svg(),i=n.lgg;i.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var o=0,s=t.catColors(),l=function(l){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);t.catColors()[l];i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",s[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){Ot(this).raise(),r(n.map,l),n.map.insetTemplates_&&ha(n.map.insetTemplates_,n.map.svgId,r,l)})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ha(n.map.insetTemplates_,n.map.svgId,a)})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffsets.x).attr("y",c+.5*n.shapeHeight).text(t.catLabels()[l]||l).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.hoverColor())})).on("mouseout",(function(){var n=t.catColors()[l]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",n)})),o++};for(var c in s)l(c);if(n.noData){var u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",t.noDataFillStyle()).on("mouseover",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",t.hoverColor()),Ot(this).style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));Ot(this).style("fill",t.noDataFillStyle())})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffsets.x).attr("y",u+.5*n.shapeHeight).text(n.noDataText).on("mouseover",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n};function ob(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return sb(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sb(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function sb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var lb=function(t,e){var n=yx(t);if(n.sizeLegend={title:null,titlePadding:10,values:null,labelFormatter:void 0,noData:!1,noDataText:"No data"},n.colorLegend={title:null,titlePadding:10,marginTop:33,labelOffsets:{x:5,y:5},shapeWidth:25,shapeHeight:20,shapePadding:1,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var i in e)if("colorLegend"==i||"sizeLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];function a(t,e){var n=t.svg_.selectAll(".piechart").selectAll("path[code]");n.style("opacity",0),n.filter("path[code='"+e+"']").each((function(){Ot(this).style("opacity",1)}))}function o(t){t.svg_.selectAll(".piechart").selectAll("path[code]").each((function(){Ot(this).style("opacity",1)}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var i=n.getBaseY(),r=n.getBaseX();t.classifierSize_&&(n._sizeLegendContainer=e.append("g").attr("class","em-pie-size-legend").attr("transform","translate(".concat(r,", ").concat(i,")")),sx(n,n._sizeLegendContainer,n.sizeLegend.values,t.classifierSize_,n.sizeLegend.title,n.sizeLegend.titlePadding)),function(t,e,n){var i=t.map,r=t.colorLegend;if(t._colorLegendContainer=t.lgg.append("g").attr("class","em-pie-color-legend"),t._sizeLegendContainer){var s=t._sizeLegendContainer.node().getBBox().height;t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(s+t.colorLegend.marginTop,")"))}else t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(n,")"));r.title&&t._colorLegendContainer.append("text").attr("id","em-color-legend-title").attr("class","em-color-legend-title").attr("x",0).attr("y",t.titleFontSize).text(r.title);var l=0,c=i.catColors(),u=function(e){var n=t.colorLegend.titlePadding+(r.title?t.titleFontSize:0)+l*(r.shapeHeight+r.shapePadding);i.catColors()[e];t._colorLegendContainer.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",n).attr("width",r.shapeWidth).attr("height",r.shapeHeight).style("fill",c[e]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){a(t.map,e),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,a,e)})).on("mouseout",(function(){o(t.map),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,o,e)})),t._colorLegendContainer.append("text").attr("class","em-legend-label").attr("x",r.shapeWidth+r.labelOffsets.x).attr("y",n+.5*r.shapeHeight).attr("dy","0.35em").text(i.catLabels()[e]||e),l++};for(var h in c)u(h);if(r.noData){var f=0;t._sizeLegendContainer&&(f=t._sizeLegendContainer.node().getBBox().height);var p=f+t.colorLegend.marginTop+t.boxPadding+(r.title?t.titleFontSize+t.boxPadding:0)+l*(r.shapeHeight+r.shapePadding),d=t.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(p,")"));t.appendNoDataLegend(d,t.noDataText,a,o)}}(n,r,i),n.setBoxDimension()},n};function cb(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ub(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ub(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ub(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var hb=function(t){var e=bx(t,!0,"pie");e.dorling_=(null==t?void 0:t.dorling)||!1,e.animateDorling_=!0,e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.classifierSize_=null,e.statPie_=null,e.pieTotalCode_=void 0,e.statCodes_=void 0,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_","dorling_","animateDorling_","pieTotalCode_","statCodes_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth","statCodes"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statPie=function(t,n,i,r,a,o){t.filters=t.filters||{};for(var s=0;s<i.length;s++){var l=i[s];t.filters[n]=l;var c={};for(var u in t)c[u]=t[u];for(var h in c.filters={},t.filters)c.filters[h]=t.filters[h];e.stat(l,c),a&&(e.catColors_=e.catColors_||{},e.catColors_[l]=a[s]),r&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=r[s])}if(e.statCodes_=i,o){e.pieTotalCode_=o,t.filters[n]=o;var f={};for(var p in t)f[p]=t[p];for(var d in f.filters={},t.filters)f.filters[d]=t.filters[d];e.stat(o,f)}else e.pieTotalCode_=void 0;return e},e.updateClassification=function(){return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){if(!e.statCodes_){e.statCodes_=Object.keys(e.statData_);var n=e.statCodes_.indexOf("default");n>-1&&e.statCodes_.splice(n,1)}var i,r=(i=[],e.getCentroidsGroup(e).selectAll("g.em-centroid").data().forEach((function(t){var e=t.properties.id,n=a(e);n&&i.push(n)})),fy(i));return isNaN(r[0])||(e.classifierSize_=hy().domain(r).range([e.pieMinRadius_,e.pieMaxRadius_])),e};function i(t){var n=[];if(e.svg_){var i=t.getCentroidsGroup(t);if(i){i.selectAll("g.em-centroid").append("g").attr("class","em-pie").attr("id",(function(t){return n.push(t),"pie_"+t.properties.id}));var o=da(e),s=e.svg().selectAll(o);"WORLD"!==t.geo_&&"mixed"==t.nutsLevel_&&function(t,e){e.each((function(e){var n=Ot(this);if(!this.parentNode.classList.contains("em-cntrg")){var i=n.attr("lvl"),a=r(e.properties.id),o=a?"WORLD"===t.geo_?"block":null:"none",s=null,l=null;a&&"0"!==i&&(s=n.style("stroke")||"#777","WORLD"===t.geo_&&(l=n.style("stroke-width")||"#777")),n.style("display",o).style("stroke",s).style("stroke-width",l)}}))}(t,s),function(t){t.forEach((function(t){var n=t.properties.id,i=[],o=r(n);for(var s in o)i.push({code:s,value:o[s]});if(i&&0!=i.length){var l=e.svg().selectAll("#pie_"+n),c=e.classifierSize_(a(n)),u=e.pieChartInnerRadius_,h=ib().sort(null).value((function(t){return t.value})),f=zr().innerRadius(u).outerRadius(c),p=l.append("g").attr("class","piechart").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").style("pointer-events","none"),d=h(i);p.selectAll("path").data(d).join("path").attr("fill",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).each((function(t){this._current={startAngle:t.startAngle,endAngle:t.startAngle}})).transition().delay((function(t,e){return 150*e})).duration(e.transitionDuration_).attrTween("d",(function(t){var e=Xe(this._current,t);return this._current=e(1),function(t){return f(e(t))}})).on("end",(function(){Ot(p.node()).style("pointer-events",null)}));p.on("mouseover",(function(t,n){Ot(this).style("stroke-width",e.pieStrokeWidth_+1).style("stroke","black"),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){Ot(this).style("stroke-width",e.pieStrokeWidth_).style("stroke",e.pieStrokeFill_),e._tooltip&&e._tooltip.mouseout()}))}}))}(n),function(t,n){n.on("mouseover",(function(t,n){var i=Ot(this);i.attr("fill___",i.style("fill")),i.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}(0,s)}}}e.updateStyle=function(){try{if(!e.classifierSize_)return;if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=rb[t%10]}return e.pieTotalCode_&&(e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_),e.catLabels_=e.catLabels_||{},e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),e.dorling_?tx(e,(function(t){var n=a(t.properties.id)||0;return e.classifierSize_(n)||0})):nx(e),e}catch(t){console.error("Error in pie symbols styling: "+t.message),console.error(t)}};var r=function(t){for(var n={},i=0,r=e.statCodes_,a=0;a<r.length;a++){var o=r[a],s=e.statData(o).get(t),l=null==s?void 0:s.value;if(null==l||isNaN(l)){if(e.showOnlyWhenComplete())return}else n[o]=l,i+=l}if(e.pieTotalCode_){var c=e.statData(e.pieTotalCode_).get(t),u=null==c?void 0:c.value;i=null==u||isNaN(u)?0:u}if(i&&!isNaN(i)){var h,f=cb(r);try{for(f.s();!(h=f.n()).done;){var p=h.value;void 0!==n[p]&&(n[p]/=i)}}catch(t){f.e(t)}finally{f.f()}if(e.pieTotalCode_){var d=Object.values(n).reduce((function(t,e){return t+e}),0);n.other=Math.max(0,1-d)}return n}};var a=function(t){var n,i=0;if(e.pieTotalCode_)!(n=e.statData(e.pieTotalCode_).get(t))||0!=n.value&&!n.value||isNaN(n.value)?e.showOnlyWhenComplete()&&(i=void 0):i=n.value;else for(var r=0;r<e.statCodes_.length;r++){var a=e.statCodes_[r];if(!(n=e.statData(a).get(t))||0!=n.value&&!n.value||isNaN(n.value)){if(e.showOnlyWhenComplete())return}else i+=n.value}if(0!=i)return i};e.getLegendConstructor=function(){return lb};var o=150,s=120,l=Math.min(o,s)/2-10,c=ib().sort(null).value((function(t){return t.value})),u=zr().innerRadius(0).outerRadius(.8*l),h=zr().innerRadius(.9*l).outerRadius(.9*l);return e.tooltip_.textFunction=function(t,n){var i=t.properties.na||t.properties.name,f=t.properties.id,p=r(f),d=[];for(var g in p)d.push({code:g,value:p[g]});var _="";if(_+='<div class="em-tooltip-bar">'.concat(i).concat(f?" (".concat(f,")"):"","</div>"),!d||0===d.length)return _+="<div>".concat(e.noDataText(),"</div>");var m,v="",y="",x="",b=cb(c(d));try{for(b.s();!(m=b.n()).done;){var w=m.value,S=e.catColors()[w.data.code]||"lightgray",M=u(w);if(v+='<path d="'.concat(M,'" fill="').concat(S,'" stroke="white" stroke-width="1" opacity="0.7"></path>'),w.data.value>.1){var E=u.centroid(w),C=h.centroid(w),A=h.centroid(w),k=w.startAngle+(w.endAngle-w.startAngle)/2;A[0]=.95*l*(k<Math.PI?1:-1),y+='<polyline points="'.concat(E.join(",")," ").concat(C.join(",")," ").concat(A.join(","),'"\n stroke="black" fill="none" stroke-width="1" />');var T=h.centroid(w);T[0]=.99*l*(k<Math.PI?1:-1);var P=k<Math.PI?"start":"end",N=(100*w.data.value).toFixed();isNaN(N)||(x+='<text x="'.concat(T[0],'" y="').concat(T[1],'" text-anchor="').concat(P,'" font-size="12px">\n ').concat(N,"%\n </text>"))}}}catch(t){b.e(t)}finally{b.f()}_+="\n <div class='em-tooltip-piechart-container'>\n <svg viewBox=\"".concat(-75," ").concat(-60," ").concat(o," ").concat(s,'" width="').concat(o,'" height="').concat(115,'">\n <g transform="translate(0,0)">\n ').concat(v,"\n ").concat(y,"\n ").concat(x,"\n </g>\n </svg>\n </div>\n "),_+='<div class="em-tooltip-breakdown">';var L,F=e.statCodes_.map((function(t){var n=e.statData(t).get(f);return n&&void 0!==n.value&&null!==n.value?{code:t,label:e.catLabels_[t],value:n.value,color:e.catColors()[t]||"#666"}:null})).filter(Boolean).sort((function(t,e){return e.value-t.value})),O=a(f)||F.reduce((function(t,e){return t+e.value}),0),G=cb(F);try{for(G.s();!(L=G.n()).done;){var D,z=L.value,I=O?(z.value/O*100).toFixed(0):0;_+='\n <div class="em-breakdown-item">\n <span class="em-breakdown-color" style="background:'.concat(z.color,'"></span>\n <span class="em-breakdown-label">').concat(z.label,'</span>\n <span class="em-breakdown-value">').concat(null!==(D=z.value)&&void 0!==D&&D.toFixed?ca(z.value):0," (").concat(isNaN(I)?0:I,"%)</span>\n </div>\n ")}}catch(t){G.e(t)}finally{G.f()}if(null!=O){var R=e.statData(e.statCodes_[0]).unitText()||"";_+='\n <div class="em-breakdown-item em-total">\n <span class="em-breakdown-label">Total</span>\n <span class="em-breakdown-value">'.concat(ca(O)," ").concat(R,"</span>\n </div>\n ")}return _+="</div>"},e};function fb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function pb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fb(Object(n),!0).forEach((function(e){ya(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fb(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var db=function(t){var e=bx(t,!0,"spark");e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.sparkLineChartFunction_=void 0,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_","sparkLineChartFunction_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_","sparkLineChartFunction_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.sparklineData_=void 0,e.sparklineData=function(t){var n=Object.keys(t[Object.keys(t)[0]]);return e._statDates=n,n.forEach((function(n){var i=yv(),r={};for(var a in t){var o=t[a];r[a]=o[n]}i.setData(r),e.statData(n,i)})),e},e.statSpark=function(t,n,i){t.filters=t.filters||{};for(var r=0;r<n.length;r++){var a=n[r];t.filters.time=a;var o={};for(var s in t)o[s]=t[s];for(var l in o.filters={},t.filters)o.filters[l]=t.filters[l];e.stat(a,o),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[a]=i[r])}return e._statDates=n,e},e._statDates=void 0;var n=function(t){for(var n=[],i=0,r=0;r<e._statDates.length;r++){var a=e._statDates[r],o=e.statData(a).get(t);if(!o||0!=o.value&&!o.value||isNaN(o.value)){if(e.showOnlyWhenComplete())return}else n.push({date:a,value:o.value}),i+=o.value}if(0!=i){for(var s=1;s<n.length;s++){var l=n[s-1].value,c=n[s].value;n[s].percentageChange=0===l?.001:(c-l)/l*100}return n}};function i(t,n,r,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.sparkLineChartFunction_&&e.sparkLineChartFunction_!==i)return e.sparkLineChartFunction_(t,n,r,a,o);var s=Cn().domain([0,e._statDates.length-1]).range([.5,r-.5]),l=Gt(n.map((function(t){return t.value})))||0,c=Dt(n.map((function(t){return t.value})))||1,u=Cn().domain([l,c]).range([a,0]),h=n.map((function(t,e){return pb(pb({},t),{},{scaledXValue:s(e),scaledYValue:u(t.value)})})),f=u(0);o&&(t.append("g").attr("class","axis-x").attr("transform","translate(0, ".concat(a,")")).call(Rv(s).ticks(e._statDates.length).tickFormat((function(t,n){return e._statDates[n]}))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)"),t.append("g").attr("class","axis-y").call(jv(u).ticks(5)),l<0&&c>0&&t.append("line").attr("x1",0).attr("x2",r).attr("y1",f).attr("y2",f).attr("stroke","gray").attr("stroke-dasharray","2,2").attr("stroke-width",1));var p=Yx().x((function(t){return t.scaledXValue})).y((function(t){return t.scaledYValue}));"area"===e.sparkType_&&t.append("path").datum(h).attr("fill","function"==typeof e.sparkAreaColor_?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke","none").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("d",function(t,e,n){var i=null,r=hr(!0),a=null,o=Hx,s=null,l=Pr(c);function c(c){var u,h,f,p,d,g=(c=Ux(c)).length,_=!1,m=new Array(g),v=new Array(g);for(null==a&&(s=o(d=l())),u=0;u<=g;++u){if(!(u<g&&r(p=c[u],u,c))===_)if(_=!_)h=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=h;--f)s.point(m[f],v[f]);s.lineEnd(),s.areaEnd()}_&&(m[u]=+t(p,u,c),v[u]=+e(p,u,c),s.point(i?+i(p,u,c):m[u],n?+n(p,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return Yx().defined(r).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Vx:hr(+t),e="function"==typeof e?e:hr(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?$x:hr(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:hr(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:hr(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:hr(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:hr(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:hr(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:hr(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:hr(!!t),c):r},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}().x((function(t){return t.scaledXValue})).y0(f).y1((function(t){return t.scaledYValue}))),t.append("path").datum(h).attr("fill","none").attr("opacity",e.sparkLineOpacity_).attr("stroke","function"==typeof e.sparkLineColor_?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width","function"==typeof e.sparkLineStrokeWidth_?function(t,n){return e.sparkLineStrokeWidth_(t,n)}:e.sparkLineStrokeWidth_+"px").attr("d",p),t.selectAll("circle").data(h).enter().append("circle").attr("cx",(function(t){return t.scaledXValue})).attr("cy",(function(t){return t.scaledYValue})).attr("r",e.sparkLineCircleRadius_).attr("fill","red").attr("stroke","none")}e.updateClassification=function(){if(!e._statDates){e._statDates=Object.keys(e.statData_);var t=e._statDates.indexOf("default");t>-1&&e._statDates.splice(t,1)}return e.domain=function(){var t=[];if(e.getCentroidsGroup(e).selectAll("g.em-centroid").data().forEach((function(e){var n=e.properties.id,i=r(n);void 0!==i&&t.push(i)})),0===t.length)return[0,1];return fy(t)}(),e.widthClassifier_=hy().domain(e.domain).range([0,e.sparkLineWidth_]),e.heightClassifier_=hy().domain(e.domain).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],r=(e.getCentroidsGroup(e).selectAll("g.em-centroid").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),da(e));return e.svg().selectAll(r).on("mouseover",(function(t,i){if(n(i.properties.id)){var r=Ot(this);r.attr("fill___",r.style("fill")),r.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(i,e))}})).on("mousemove",(function(t,i){n(i.properties.id)&&e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.style("fill");t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){var r=e.svg().select("#spark_"+t),a=n(t);a&&i(r,a,e.sparkLineWidth_,e.sparkLineHeight_)})),e},e.tooltip_.textFunction=function(t,r){var a=[],o=t.properties.na,s=t.properties.id;a.push('\n <div class="em-tooltip-bar">\n <b>'.concat(o,"</b>").concat(s?" (".concat(s,")"):"","\n </div>\n "));var l,c=e.sparkTooltipChart_.height,u=e.sparkTooltipChart_.width,h=e.sparkTooltipChart_.margin,f=n(t.properties.id);if(f){var p=u+h.left+h.right,d=c+h.top+h.bottom,g=(l="div",Ot(xt(l).call(document.documentElement))).attr("class","em-tooltip-chart-container");i(g.append("svg").attr("class","em-tooltip-chart-svg").attr("width",p).attr("height",d).append("g").attr("transform","translate(".concat(h.left,", ").concat(h.top,")")),f,u,c,!0),a.push(g.node().outerHTML)}return a.join("")};var r=function(t){for(var n=0,i=0;i<e._statDates.length;i++){var r=e._statDates[i],a=e.statData(r);if(a&&"function"==typeof a.get){var o=a.get(t);if(!o||0!==o.value&&!o.value||isNaN(o.value)){if(e.showOnlyWhenComplete())return}else o.value>n&&(n=o.value)}}if(0!==n)return n};return e.getLegendConstructor=function(){return ey},e},gb=function(t,e){var n=yx(t);if(n.flowWidthLegend={title:null,titlePadding:17,values:null,marginTop:5},n.donutSizeLegend={title:null,titlePadding:25,values:null,marginTop:20},n.flowColorLegend={title:null,titlePadding:0,marginTop:33},n.regionColorLegend={title:null,titlePadding:15,marginTop:30},e)for(var i in e)if("colorLegend"==i||"flowWidthLegend"==i||"donutSizeLegend"==i||"flowColorLegend"==i||"regionColorLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;if(t.legend_)for(var i in t.legend_)if("colorLegend"==i||"flowWidthLegend"==i||"donutSizeLegend"==i||"flowColorLegend"==i||"regionColorLegend"==i)for(var r in n[i])void 0!==t.legend_[i][r]&&(n[i][r]=t.legend_[i][r]);else n[i]=t.legend_[i];e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),function(t){var e=t.map,n=t.getBaseX(),i=t.getBaseY();!function(t,e,n){var i=t.map;if(!i.strokeWidthScale)return;t._flowWidthContainer=t.lgg.append("g").attr("class","em-flow-width-legend").attr("transform","translate(".concat(e,", ").concat(n,")")),t.flowWidthLegend.title&&t._flowWidthContainer.append("text").attr("class","em-size-legend-title").text(t.flowWidthLegend.title||"Flow width");var r=i.strokeWidthScale,a=r.domain(),o=t.flowWidthLegend.values||[a[0],a[a.length-1]],s=t.flowWidthLegend.titlePadding||10,l=7,c=0;o.forEach((function(e,n){var i=r(e);if(n>0){var a=r(o[n-1]);s+=a/2+i/n+l}t._flowWidthContainer.append("line").attr("x1",c).attr("x2",c+40).attr("y1",s).attr("y2",s).attr("stroke","#6b6b6b").attr("stroke-width",i),t._flowWidthContainer.append("text").attr("x",c+50).attr("y",s).attr("dy","0.35em").attr("class","em-legend-label").text(ca(e))}))}(t,n,i+t.flowWidthLegend.marginTop);var r=t._flowWidthContainer.node().getBBox().height;if(e.flowDonuts_&&e.donutSizeScale){t._donutLegendContainer=t.lgg.append("g").attr("class","em-donut-legend").attr("transform","translate(".concat(n,", ").concat(i+r,")")),t._donutSizeContainer=t._donutLegendContainer.append("g").attr("class","em-donut-size-legend").attr("transform","translate(".concat(0,", ",t.donutSizeLegend.marginTop,")")),sx(t,t._donutSizeContainer,t.donutSizeLegend.values,e.donutSizeScale,t.donutSizeLegend.title,t.donutSizeLegend.titlePadding);var a=t.donutSizeLegend.marginTop+t._donutSizeContainer.node().getBBox().height+t.flowColorLegend.marginTop;!function(t,e,n){var i,r=t.map,a=Array.from(r.topLocationKeys||[]),o=r.locationColorScale;null===(i=t._donutColorContainer)||void 0===i||i.remove(),t._donutColorContainer=t._donutLegendContainer.append("g").attr("class","em-donut-color-legend").attr("transform","translate(".concat(e,", ").concat(n,")"));var s=t._donutColorContainer.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("dy","0.35em").text(t.flowColorLegend.title||"Destination"),l=a.map((function(t){return{label:r.nodeNameMap.get(t)||t,color:o(t)}}));l.push({label:"Other",color:"#ccc"});var c=s.node().getBBox().height+t.flowColorLegend.titlePadding,u=function(t){r.svg_.selectAll("g.em-flow-container line").classed("highlighted",(function(){return this.getAttribute("stroke")===t})).classed("dimmed",(function(){return this.getAttribute("stroke")!==t}))},h=function(){r.svg_.selectAll("g.em-flow-container line").classed("highlighted",!1).classed("dimmed",!1)};l.forEach((function(e,n){var i=t._donutColorContainer.append("g").attr("class","em-donut-color-item").attr("transform","translate(0, ".concat(22*n+c,")")).style("cursor","pointer").on("mouseover",(function(){u(e.color),Ot(this).select("text").style("font-weight","bold"),Ot(this).select("rect").attr("stroke","black").attr("stroke-width",2)})).on("mouseout",(function(){h(),Ot(this).select("text").style("font-weight","normal"),Ot(this).select("rect").attr("stroke","none")}));i.append("rect").attr("width",18).attr("height",18).attr("fill",e.color),i.append("text").attr("x",25).attr("y",14).attr("class","em-legend-label").text(e.label)}))}(t,0,a)}if(e.importerRegionIds.length>0||e.exporterRegionIds.length>0){var o=i+t.flowWidthLegend.marginTop+r+t.regionColorLegend.marginTop;e.flowDonuts_&&e.donutSizeScale&&(o+=t.donutSizeLegend.marginTop,o+=t._donutLegendContainer.node().getBBox().height),function(t,e,n){t._colorLegendContainer||(t._colorLegendContainer=t.lgg.append("g").attr("class","em-color-legend").attr("transform","translate(".concat(e,", ").concat(n,")")));var i=t._colorLegendContainer.append("g").attr("class","em-flow-overlay-color-legend"),r=(i.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("dy","0.35em").text(t.regionColorLegend.title||"Region fill colors"),t.map),a={"Net Exporter":r.flowOverlayColors_[0],"Net Importer":r.flowOverlayColors_[1]},o=t.regionColorLegend.titlePadding;Object.entries(a).forEach((function(e,n){var r=y(e,2),a=r[0],s=r[1];i.append("rect").attr("x",0).attr("y",o+20*n).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill",s),i.append("text").attr("x",t.shapeWidth+5).attr("y",o+20*n+15).attr("class","em-legend-label").text(a)}))}(t,n,o)}}(n),n.setBoxDimension()},n};class _b{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function mb(t){return new _b(t,!0)}function vb(t){return t.source}function yb(t){return t.target}function xb(t){let e=vb,n=yb,i=Vx,r=$x,a=null,o=null,s=Pr(l);function l(){let l;const c=qx.call(arguments),u=e.apply(this,c),h=n.apply(this,c);if(null==a&&(o=t(l=s())),o.lineStart(),c[0]=u,o.point(+i.apply(this,c),+r.apply(this,c)),c[0]=h,o.point(+i.apply(this,c),+r.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.x=function(t){return arguments.length?(i="function"==typeof t?t:hr(+t),l):i},l.y=function(t){return arguments.length?(r="function"==typeof t?t:hr(+t),l):r},l.context=function(e){return arguments.length?(null==e?a=o=null:o=t(a=e),l):a},l}function bb(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function wb(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Sb(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sb(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Sb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Mb(t,e){var n=t.svg_,i=(t.flowGraph_,function(t){var e=t.flowGraph_;return function(t){var e,n=t.nodes,i=wb(n);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.value=Math.max(bb(r.sourceLinks,(function(t){return t.value})),bb(r.targetLinks,(function(t){return t.value})))}}catch(t){i.e(t)}finally{i.f()}}(e),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var o,s=wb(i);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.depth=a;var c,u=wb(l.sourceLinks);try{for(u.s();!(c=u.n()).done;){var h=c.value.target;r.add(h)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(e),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var o,s=wb(i);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.height=a;var c,u=wb(l.targetLinks);try{for(u.s();!(c=u.n()).done;){var h=c.value.source;r.add(h)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(e),function(t,e){var n,i=e.nodes,r=wb(i);try{for(r.s();!(n=r.n()).done;){var a=n.value;a.sourceLinks.forEach((function(e){return e.width=t.strokeWidthScale(e.value)})),a.targetLinks.forEach((function(e){return e.width=t.strokeWidthScale(e.value)}));var o=Math.max(bb(a.sourceLinks,(function(t){return t.width})),bb(a.targetLinks,(function(t){return t.width})));a.x0=a.x1=a.x,a.y0=a.y-o/2,a.y1=a.y+o/2}}catch(t){r.e(t)}finally{r.f()}!function(t){var e,n=wb(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.sourceLinks,a=i.targetLinks;r.sort(kb),a.sort(Tb)}}catch(t){n.e(t)}finally{n.f()}}(i)}(t,e),function(t){var e,n=t.nodes,i=wb(n);try{for(i.s();!(e=i.n()).done;){var r,a=e.value,o=a.y0,s=wb(a.sourceLinks);try{for(s.s();!(r=s.n()).done;){var l=r.value;l.y0=o+l.width/2,o+=l.width}}catch(t){s.e(t)}finally{s.f()}var c,u=a.y0,h=wb(a.targetLinks);try{for(h.s();!(c=h.n()).done;){var f=c.value;f.y1=u+f.width/2,u+=f.width}}catch(t){h.e(t)}finally{h.f()}}}catch(t){i.e(t)}finally{i.f()}}(e),e}(t)),r=i.nodes,a=i.links;t.flowStack_||a.forEach((function(t){var e=(t.source.y0+t.source.y1)/2;t.y0=e}));var o=n.append("defs"),s=ua("arrow"),l=ua("arrow-outline"),c=a.map((function(){return ua("gradient")}));return t.flowArrows_&&(Eb(t,o,s,t.flowColor_),Eb(t,o,l,"#ffffff")),t.flowGradient_&&function(t,e,n,i){var r=i.filter((function(t){var e,n;return null!=(null===(e=t.source)||void 0===e?void 0:e.x1)&&null!=(null===(n=t.target)||void 0===n?void 0:n.x0)&&null!=t.y0&&null!=t.y1}));e.selectAll("linearGradient").data(r).join("linearGradient").attr("id",(function(t,e){return n[e]})).attr("gradientUnits","userSpaceOnUse").attr("x1",(function(t){return t.source.x1})).attr("x2",(function(t){return t.target.x0})).attr("y1",(function(t){return t.y0})).attr("y2",(function(t){return t.y1})).call((function(e){return e.append("stop").attr("offset","5%").attr("stop-color",t.flowOverlayColors_[0])})).call((function(e){return e.append("stop").attr("offset","50%").attr("stop-color",t.flowColor_)}))}(t,o,c,a),function(t,e,n,i,r,a){var o=e.append("g").attr("class","em-flow-lines").attr("id","em-flow-lines");n.forEach((function(e,n){t.flowOutlines_&&o.append("path").attr("d",Pb()(e)).attr("fill","none").attr("stroke","#ffffff").attr("class","em-flow-link-outline").attr("stroke-width",e.width+1.5).attr("marker-end","url(#".concat(r,")")),o.append("path").attr("d",Pb()(e)).attr("fill","none").attr("class","em-flow-link").attr("stroke",t.flowGradient_?"url(#".concat(a[n],")"):t.flowColor_).attr("stroke-width",e.width).attr("marker-end",t.flowArrows_?"url(#".concat(i,")"):"").on("mouseover",(function(n){var r=t.hoverColor_;Ot(this).attr("stroke",r),t.flowArrows_&&Ot(this).attr("marker-end","url(#".concat(i+"mouseover",")")),t._tooltip&&t._tooltip.mouseover(t.tooltip_.textFunction(e,t))})).on("mousemove",(function(e){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(){t.flowGradient_?Ot(this).attr("stroke","url(#".concat(a[n],")")):Ot(this).attr("stroke",t.flowColor_),t.flowArrows_&&Ot(this).attr("marker-end","url(#".concat(i,")")),t._tooltip&&t._tooltip.mouseout()}))}))}(t,e,a,s,l,c),function(t,e,n){e.append("g").attr("class","em-flow-fill-in-gaps").selectAll("rect").data(n).join("rect").filter((function(t){return t.depth&&t.height})).attr("x",(function(t){return t.x0-.5})).attr("y",(function(t){return t.y0})).attr("width",1).attr("height",(function(t){return t.y1-t.y0})).attr("fill",t.flowColor_)}(t,e,r),n.node()}function Eb(t,e,n,i){e.append("marker").attr("id",n).attr("markerHeight",7).attr("markerWidth",7).attr("refX",.5).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",i).attr("d","M0,0 q0,1,0.5,1.5 q-0.5,0.5,-0.5,1.5 q0.75,-0.75,2,-1.5 q-1.25,-0.75,-2,-1.5Z"),e.append("marker").attr("id",n+"mouseover").attr("markerHeight",7).attr("markerWidth",7).attr("refX",.5).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",t.hoverColor_).attr("d","M0,0 q0,1,0.5,1.5 q-0.5,0.5,-0.5,1.5 q0.75,-0.75,2,-1.5 q-1.25,-0.75,-2,-1.5Z")}function Cb(t){return[t.source.x1,t.y0]}function Ab(t){return[t.target.x0,t.y1]}var kb=function(t,e){return t.target.y-e.target.y},Tb=function(t,e){return t.source.y-e.source.y},Pb=function(){return xb(mb).source(Cb).target(Ab)};function Nb(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Lb(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lb(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Lb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Fb(t,e){!function(t,e){var n=e.append("g").attr("class","em-flow-lines").attr("id","em-flow-lines"),i=t.flowGraph_,r=i.nodes,a=i.links,o=new Map(r.map((function(t){return[t.id,[t.x,t.y]]}))),s=new Map;a.forEach((function(t){var e="object"===ma(t.source)?t.source.id:t.source,n="object"===ma(t.target)?t.target.id:t.target,i=o.get(e),r=o.get(n);if(i&&r){var a=e<n?"".concat(e,"|").concat(n):"".concat(n,"|").concat(e);s.has(a)||s.set(a,{idA:e<n?e:n,idB:e<n?n:e,coordsA:e<n?i:r,coordsB:e<n?r:i,flowAB:0,flowBA:0});var l=s.get(a);e<n?l.flowAB+=t.value:l.flowBA+=t.value}}));var l,c=Nb(s.values());try{var u=function(){var e=l.value,i=e.idA,r=e.idB,a=e.coordsA,o=e.coordsB,s=e.flowAB,c=e.flowBA,u=(a[0]+o[0])/2,g=(a[1]+o[1])/2,_=function(){return h(t,i,r)},m=function(){return h(t,r,i)};s>0&&c>0?(n.append("line").attr("data-nb",s).attr("x1",u).attr("y1",g).attr("x2",o[0]).attr("y2",o[1]).attr("data-origin",i).attr("data-dest",r).attr("stroke",_).attr("stroke-width",t.strokeWidthScale(s).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,i,r,s)).on("mousemove",p(t)).on("mouseout",d(t,_)),n.append("line").attr("data-nb",c).attr("x1",u).attr("y1",g).attr("x2",a[0]).attr("y2",a[1]).attr("data-origin",r).attr("data-dest",i).attr("stroke",m).attr("stroke-width",t.strokeWidthScale(c).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,r,i,c)).on("mousemove",p(t)).on("mouseout",d(t,m))):s>0&&0===c?n.append("line").attr("data-nb",s).attr("x1",a[0]).attr("y1",a[1]).attr("x2",o[0]).attr("y2",o[1]).attr("data-origin",i).attr("data-dest",r).attr("stroke",_).attr("stroke-width",t.strokeWidthScale(s).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,i,r,s)).on("mousemove",p(t)).on("mouseout",d(t,_)):c>0&&0===s&&n.append("line").attr("data-nb",c).attr("x1",o[0]).attr("y1",o[1]).attr("x2",a[0]).attr("y2",a[1]).attr("data-origin",r).attr("data-dest",i).attr("stroke",m).attr("stroke-width",t.strokeWidthScale(c).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,r,i,c)).on("mousemove",p(t)).on("mouseout",d(t,m))};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}function h(t,e,n,i){if(!t.topLocationKeys||!t.flowTopLocations_)return t.flowColor_;var r=t.flowTopLocationsType_||"sum";return"origin"===r?t.topLocationKeys.has(e)?t.locationColorScale(e):t.flowColor_:"destination"===r?t.topLocationKeys.has(n)?t.locationColorScale(n):t.flowColor_:t.topLocationKeys.has(n)?t.locationColorScale(n):t.topLocationKeys.has(e)?t.locationColorScale(e):t.flowColor_}function f(t,e,n,i){return function(r){var a=t.hoverColor_||"black";if(Ot(this).attr("stroke",a),t._tooltip){var o=t.flowGraph_.nodes.find((function(t){return t.id===e})),s=t.flowGraph_.nodes.find((function(t){return t.id===n})),l={source:o,target:s,value:i};t._tooltip.mouseover(t.tooltip_.textFunction(l,t))}}}function p(t){return function(e){t._tooltip&&t._tooltip.mousemove(e)}}function d(t,e){return function(){Ot(this).attr("stroke",e()),t._tooltip&&t._tooltip.mouseout()}}}(t,e)}function Ob(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gb(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gb(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Gb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Db(t,e){var n=e.data.parent.id;xa("g.em-flow-container line").classed("highlighted",(function(){return this.getAttribute("data-origin")===n||this.getAttribute("data-dest")===n})).classed("dimmed",(function(){return this.getAttribute("data-origin")!==n&&this.getAttribute("data-dest")!==n}))}function zb(t){xa("g.em-flow-container line").classed("highlighted",!1).classed("dimmed",!1)}function Ib(t,e){var n,i,r=vn(".0%"),a=t.data.parent,o=bb(a.donutValues,(function(t){return t.value})),s=null===(n=e.statData)||void 0===n?void 0:n.call(e),l=(null==s||null===(i=s.unitText)||void 0===i?void 0:i.call(s))||"",c=[];c.push('\n <div class="em-tooltip-bar">\n <b>'.concat(a.name||a.id||"Unknown location","</b>\n </div>\n ")),c.push('<div class="em-tooltip-text"><table class="em-tooltip-table"><tbody>');var u=Bb(a.id,e),h=bb(u,(function(t){return t.value}));if(h>0){var f=r(h/o);c.push('\n <tr><td style="padding-top:3px;">Incoming:</td>\n <td>'.concat(ca(h)," (").concat(f,")</td>\n </tr>\n ")),u.forEach((function(t){var e=r(t.value/o);c.push('\n <tr>\n <td style="padding-left:1.5em;">\n <span style="\n display:inline-block;\n width:10px;\n height:10px;\n border-radius:50%;\n background:'.concat(t.color,';\n margin-right:6px;\n "></span> ').concat(t.name||t.key,'\n </td>\n <td style="text-align:right">\n ').concat(ca(t.value)," (").concat(e,")\n </td>\n </tr>\n "))}))}var p=qb(a.id,e),d=bb(p,(function(t){return t.value}));if(d>0){var g=r(d/o);c.push('\n <tr><td style="padding-top:3px;">Outgoing:</td>\n <td>'.concat(ca(d)," (").concat(g,")</td>\n </tr>\n ")),p.forEach((function(t){var e=r(t.value/o);c.push('\n <tr>\n <td style="padding-left:1.5em;">\n <span style="\n display:inline-block;\n width:10px;\n height:10px;\n border-radius:50%;\n background:'.concat(t.color,';\n margin-right:6px;\n "></span> ').concat(t.name||t.key,'\n </td>\n <td style="text-align:right">\n ').concat(ca(t.value)," (").concat(e,")\n </td>\n </tr>\n "))}))}return c.push('\n <tr class="em-tooltip-total">\n <td colspan="2" style="padding-top:4px; font-weight:bold;">\n Total: '.concat(ca(o)," ").concat(l,"\n </td>\n </tr>\n ")),c.push("</tbody></table></div>"),c.join("")}var Rb=function(t,e){var n=+e.attr("data-zoom")||1;Ot(t.target.parentNode).selectAll("path").each((function(){var t=Ot(this),e=+t.attr("stroke-width")||0;t.attr("data-stroke-width",e)})).attr("stroke","black").attr("stroke-width",2/n)},jb=function(t,e){var n=+e.attr("data-zoom")||1;Ot(t.target.parentNode).selectAll("path").attr("stroke","white").attr("stroke-width",(function(){return(+Ot(this).attr("data-stroke-width")||0)/n}))};function Bb(t,e){var n,i=e.topLocationKeys,r=e.flowTopLocationsType_,a=e.flowInternal_,o={},s=Ob(e.flowGraph_.links);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.source.id,u=l.target.id;if(u===t)if(c!==u){var h=void 0;o[h="destination"===r?t:"origin"===r?i.has(c)?c:"Other":i.has(c)||i.has(t)?i.has(c)?c:t:"Other"]=(o[h]||0)+l.value}else a&&(o.Internal=(o.Internal||0)+l.value)}}catch(t){s.e(t)}finally{s.f()}return Ub(Object.entries(o).map((function(n){var i,r=y(n,2),a=r[0],o=r[1];return{key:a,name:(null===(i=e.nodeNameMap)||void 0===i?void 0:i.get(a))||a,value:o,color:Wb(a,t,e)}})))}function qb(t,e){var n,i=e.topLocationKeys,r=e.flowTopLocationsType_,a=e.flowInternal_,o={},s=Ob(e.flowGraph_.links);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.source.id,u=l.target.id;if(c===t)if(c!==u){var h=void 0;o[h="origin"===r?t:"destination"===r?i.has(u)?u:"Other":i.has(u)||i.has(t)?i.has(u)?u:t:"Other"]=(o[h]||0)+l.value}else a&&(o.Internal=(o.Internal||0)+l.value)}}catch(t){s.e(t)}finally{s.f()}return Ub(Object.entries(o).map((function(n){var i,r=y(n,2),a=r[0],o=r[1];return{key:a,name:(null===(i=e.nodeNameMap)||void 0===i?void 0:i.get(a))||a,value:o,color:Wb(a,t,e)}})))}function Ub(t){return t.sort((function(t,e){return"Other"===t.key?1:"Other"===e.key?-1:e.value-t.value}))}function Wb(t,e,n){var i=n.topLocationKeys||new Set,r=n.locationColorScale;return"Other"===t?"#666":"Internal"===t?i.has(e)?r(e):"#999":i.has(t)?r(t):"#666"}function Hb(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vb(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vb(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Vb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var $b=function(t){var e=bx(t,!0,"flow");return e.strokeWidthScale=Cn(),e.labelFormatter=function(t){return vn(".2s")(t)},e.tooltip_.textFunction=Jb,e.flowMapType_="sankey",e.flowDonuts_=!1,e.flowColor_="#848484ff",e.flowOverlayColors_=["#bbd7ee","#c7e3c6"],e.flowMaxWidth_=30,e.flowMinWidth_=1,e.flowArrows_=!0,e.flowOutlines_=!0,e.flowGradient_=!0,e.flowStack_=!1,e.flowLabelOffsets_={x:3,y:0},e.flowOpacity_=.5,e.flowInternal_=!0,e.flowTopLocations_=5,e.flowTopLocationsType_="destination",["flowGraph_","flowColor_","flowOverlayColors_","flowArrows_","flowMaxWidth_","flowMinWidth_","flowOutlines_","flowGradient_","flowStack_","flowDonuts_","flowLabelOffsets_","flowMapType_","flowDonutSizeScale_","flowOpacity_","flowInternal_","flowTopLocations_","flowTopLocationsType_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.updateStyle=function(){var t,n=e.flowGraph_.links;e.strokeWidthScale=Cn().domain([Gt(n,(function(t){return t.value})),Dt(n,(function(t){return t.value}))]).range([e.flowMinWidth_,e.flowMaxWidth_]),e.flowDonuts_&&0==e.flowTopLocations_&&(e.flowTopLocations_=4),function(t){(function(t){t.flowGraph_.nodes.forEach((function(e){if("number"!=typeof e.x||"number"!=typeof e.y)if(t.Geometries.centroidsFeatures){var n=t.Geometries.centroidsFeatures.find((function(t){return e.id==t.properties.id}));if(n){var i=y(n.geometry.coordinates,2),r=i[0],a=i[1];e.x=r,e.y=a}else console.error("could not find coordinates for",e.id)}else{var o,s,l,c=null===(o=(s=t.Geometries).getRegionFeatures)||void 0===o?void 0:o.call(s),u=null==c?void 0:c.find((function(t){return t.properties.id===e.id})),h=y((null==u||null===(l=u.properties)||void 0===l?void 0:l.centroid)||t._pathFunction.centroid(u),2),f=h[0],p=h[1];e.x=f,e.y=p}}))})(t),function(t){var e,n=t.flowGraph_.nodes,i=Hb(n);try{for(i.s();!(e=i.n()).done;){var r=e.value,a=t._projection([r.x,r.y]);r.x=a[0],r.y=a[1]}}catch(t){i.e(t)}finally{i.f()}}(t),function(t){var e=t.flowGraph_,n=e.nodes,i=e.links,r=new Map;i.forEach((function(t){r.set(t.source,(r.get(t.source)||0)+t.value),r.set(t.target,(r.get(t.target)||0)+t.value)})),n.forEach((function(t){t.value=r.get(t.id)||0}))}(t),function(t){var e,n=t.flowGraph_.nodes,i=t.flowGraph_.links,r=function(t){return t.id},a=Hb(n.entries());try{for(a.s();!(e=a.n()).done;){var o=y(e.value,2),s=o[0],l=o[1];l.index=s,l.sourceLinks=[],l.targetLinks=[]}}catch(t){a.e(t)}finally{a.f()}var c,u=new Map(n.map((function(t,e){return[r(t,e,n),t]}))),h=Hb(i.entries());try{for(h.s();!(c=h.n()).done;){var f=y(c.value,2),p=f[0],d=f[1];d.index=p;var g=d.source,_=d.target;"object"!==ma(g)&&(g=d.source=Yb(u,g)),"object"!==ma(_)&&(_=d.target=Yb(u,_)),g.sourceLinks.push(d),_.targetLinks.push(d)}}catch(t){h.e(t)}finally{h.f()}}(t),t.flowTopLocations_&&function(t){var e=t.flowGraph_.nodes,n=t.flowTopLocations_,i=t.flowTopLocationsType_||"sum";e.forEach((function(t){var e=t.sourceLinks.reduce((function(t,e){return t+e.value}),0),n=t.targetLinks.reduce((function(t,e){return t+e.value}),0);t.topScore="origin"===i?e:"destination"===i?n:e+n}));var r=x(e).sort((function(t,e){return e.topScore-t.topScore})).slice(0,n);t.topLocationKeys=new Set(r.map((function(t){return t.id}))),t.locationColorScale=Tv().domain(r.map((function(t){return t.id}))).range(["#00B3E3","#FBBA00","#2BA966","#D23142","#005289","#93397F","#E73E11","#4E4084","#056731","#00667E","#B5B900"])}(t);t.nodeNameMap=new Map(t.flowGraph_.nodes.map((function(t){return[t.id,t.name||t.id]})))}(e);var i=Ot("#em-zoom-group-"+e.svgId_).append("g").attr("class","em-flow-container");!function(t){var e=t.flowGraph_,n=[],i=[],r=t.Geometries.getRegionFeatures();if(!r)return;if(e.nodes.forEach((function(t){var e=t.sourceLinks.reduce((function(t,e){return t+e.value}),0),a=t.targetLinks.reduce((function(t,e){return t+e.value}),0);r.find((function(e){return e.properties.id===t.id}))?a>e?n.push(t.id):e>a&&i.push(t.id):console.warn("could not find region geometry for",t.id)})),t.importerRegionIds=n,t.exporterRegionIds=i,0===n.length&&0===i.length)return void console.warn("No importer or exporter regions found in the flow graph.");var a=da(t),o=t.svg_.selectAll(a);o.each((function(){var e=this.__data__.properties.id;Ot(this).style("fill",(function(){return n.includes(e)?t.flowOverlayColors_[1]:i.includes(e)?t.flowOverlayColors_[0]:null})).attr("class",(function(){return n.includes(e)?"em-flow-importer":i.includes(e)?"em-flow-exporter":null}))}))}(e),"sankey"===e.flowMapType_?Mb(e,i):Fb(e,i),e.flowDonuts_&&(function(t){var e,n=t.flowGraph_.nodes,i=t.topLocationKeys||new Set,r=(t.locationColorScale,t.flowTopLocationsType_),a=Ob(n);try{var o=function(){var n,a=e.value,o=new Map,s=0,l=Ob(a.targetLinks);try{for(l.s();!(n=l.n()).done;){var c=n.value,u=c.source.id;if(u!==a.id){var h=void 0;h="origin"===r?i.has(u)?u:"Other":"destination"===r?i.has(a.id)?a.id:"Other":i.has(u)||i.has(a.id)?i.has(a.id)?a.id:u:"Other",o.set(h,(o.get(h)||0)+c.value)}else t.flowInternal_&&(s+=c.value)}}catch(t){l.e(t)}finally{l.f()}var f,p=Ob(a.sourceLinks);try{for(p.s();!(f=p.n()).done;){var d=f.value,g=d.target.id;if(g!==a.id){var _=void 0;_="origin"===r?i.has(a.id)?a.id:"Other":"destination"===r?i.has(g)?g:"Other":i.has(g)||i.has(a.id)?i.has(g)?g:a.id:"Other",o.set(_,(o.get(_)||0)+d.value)}else t.flowInternal_&&(s+=d.value)}}catch(t){p.e(t)}finally{p.f()}a.donutValues=Array.from(o.entries()).map((function(e){var n=y(e,2),i=n[0];return{label:i,value:n[1],color:Wb(i,a.id,t)}})),t.flowInternal_&&s>0&&a.donutValues.push({label:"Internal",value:s,color:"#999"})};for(a.s();!(e=a.n()).done;)o()}catch(t){a.e(t)}finally{a.f()}}(e),function(t){var e,n={},i=Ob(t.flowGraph_.nodes);try{for(i.s();!(e=i.n()).done;){var r=e.value;n[r.id]={x:r.x,y:r.y,incoming:0,outgoing:0,internal:0}}}catch(t){i.e(t)}finally{i.f()}var a,o=Ob(t.flowGraph_.links);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=s.source.id,c=s.target.id;n[l]&&(n[l].outgoing+=s.value),n[c]&&(n[c].incoming+=s.value),l===c&&(n[l].internal+=s.value)}}catch(t){o.e(t)}finally{o.f()}t.locationStats=n}(e),function(t,e){var n=e.append("g").attr("class","donuts").attr("id","donuts"),i=Dt(t.flowGraph_.nodes,(function(t){return bb(t.donutValues,(function(t){return t.value}))}));t.donutSizeScale=t.flowDonutSizeScale_||hy().domain([0,i]).range([3,10]);var r=zr().innerRadius(5),a=ib().value((function(t){return t.value})).sort(null);Object.entries(t.locationStats).forEach((function(e){var i=y(e,2),o=i[0],s=i[1],l=s.x,c=s.y,u=s.incoming,h=s.outgoing,f=s.internal,p=t.flowInternal_?u+h+f:u+h;if(0!==p){var d=Bb(o,t),g=qb(o,t),_=[].concat(x(d),x(g)),m=new Map;_.forEach((function(t){var e=t.color;m.set(e,(m.get(e)||0)+t.value)}));var v=Array.from(m,(function(t){var e=y(t,2),n=e[0];return{label:n,value:e[1],color:n}})),b=a(v);b.forEach((function(e){e.data.parent={id:o,name:t.nodeNameMap.get(o)||o,donutValues:v}}));var w=n.append("g").attr("class","donut-group").attr("transform","translate(".concat(l,",").concat(c,")")).attr("data-total",p);w.selectAll("path").data(b).join("path").attr("d",r.innerRadius(.4*t.donutSizeScale(p)).outerRadius(t.donutSizeScale(p))).attr("fill",(function(t){return t.data.color})).attr("stroke","white").attr("stroke-width",.5).style("cursor","pointer").on("mouseover",(function(e,n){t._tooltip&&t._tooltip.mouseover(Ib(n,t)),Rb(e,t.svg_),Db(0,n)})).on("mousemove",(function(e,n){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(e,n){t._tooltip&&t._tooltip.mouseout(),jb(e,t.svg_),zb()})),w.append("circle").attr("r",.4*t.donutSizeScale(p)).attr("fill","white").style("cursor","pointer").on("mouseover",(function(e){var n=b[0];t._tooltip&&t._tooltip.mouseover(Ib(n,t)),Rb(e,t.svg_),Db(0,n)})).on("mousemove",(function(e){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(e){t._tooltip&&t._tooltip.mouseout(),jb(e,t.svg_),zb()}))}}))}(e,i)),null!==(t=e.labels_)&&void 0!==t&&t.values&&function(t,e){var n,i=t.flowGraph_.nodes,r=i.filter((function(t){return t.targetLinks&&0===t.sourceLinks.length})),a=e.append("g").attr("class","em-flow-labels");if(null!==(n=t.labels_)&&void 0!==n&&n.shadows){a.append("g").attr("class","em-flow-label-shadow").selectAll("text").data(r).join("text").attr("text-anchor",(function(t){return t.x>t.targetLinks[0].source.x?"start":"end"})).attr("x",(function(e){return e.x>e.targetLinks[0].source.x?e.x+t.flowLabelOffsets_.x:e.x-t.flowLabelOffsets_.x})).attr("y",(function(e){return e.y+t.flowLabelOffsets_.y})).text((function(e){return t.labelFormatter(e.value)}))}var o=a.append("g").attr("class","em-flow-label").selectAll("g").data(r).join("g").attr("transform",(function(t){return"translate(".concat(t.x,", ").concat(t.y,")")}));o.append("text").attr("class","em-label-text").attr("text-anchor",(function(t){return t.x>t.targetLinks[0].source.x?"start":"end"})).attr("x",(function(e){return e.x>e.targetLinks[0].source.x?t.flowLabelOffsets_.x:-t.flowLabelOffsets_.x})).attr("y",t.flowLabelOffsets_.y).text((function(e){return t.labelFormatter(e.value)})),t.labels_.backgrounds&&o.each((function(){var t=Ot(this).select("text").node().getBBox(),e=5,n=2;Ot(this).insert("rect","text").attr("class","em-label-background").attr("x",t.x-e).attr("y",t.y-n).attr("width",t.width+2*e).attr("height",t.height+2*n)}))}(e,i)},e.updateClassification=function(){},e.getLegendConstructor=function(){return gb},e};function Yb(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Jb=function(t,e){var n=[],i=e.statData().unitText()||"",r="".concat(t.source.name||t.source.id," to ").concat(t.target.name||t.target.id);return n.push('\n <div class="em-tooltip-bar">\n <b>'.concat(r,"</b>\n </div>\n ")),n.push("<div class='em-tooltip-text'>\n <table class=\"em-tooltip-table\">\n <tbody>\n <tr><td>".concat(ca(t.value)," ").concat(i,"</td></tr>\n </tbody>\n </table> \n </div>")),n.join("")};function Xb(t){return Math.sign(t)*t*t}function Kb(){var t,e=sn(),n=[0,1],i=!1;function r(n){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(r)?t:i?Math.round(r):r}return r.invert=function(t){return e.invert(Xb(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain()},r.range=function(t){return arguments.length?(e.range((n=Array.from(t,Ze)).map(Xb)),r):n.slice()},r.rangeRound=function(t){return r.range(t).round(!0)},r.round=function(t){return arguments.length?(i=!!t,r):i},r.clamp=function(t){return arguments.length?(e.clamp(t),r):e.clamp()},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return Kb(e.domain(),n).round(i).clamp(e.clamp()).unknown(t)},Vt.apply(r,arguments),En(r)}function Zb(t,e){if((r=t.length)>1)for(var n,i,r,a=1,o=t[e[0]],s=o.length;a<r;++a)for(i=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Qb(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function tw(t,e){return t[e]}function ew(t){const e=[];return e.key=t,e}var nw=function(t,e){var n=yx(t);if(n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,titlePadding:15,marginTop:23,labelOffsets:{x:5,y:5},shapeWidth:25,shapeHeight:20,shapePadding:1,noData:!0,noDataText:"No data"},n.monthLegend={title:null,marginTop:10},n._sizeLegendHeight=0,e)for(var i in e)if("colorLegend"===i||"sizeLegend"===i)for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);else n[i]=e[i];function a(t,e){var n=t.svg_.selectAll(".em-coxcomb-chart").selectAll("path[code]");n.style("fill","white"),n.filter("path[code='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function o(t){t.svg_.selectAll(".em-coxcomb-chart").selectAll("path[code]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){n.updateConfig(),n.updateContainer();var e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var i=n.getBaseY(),r=n.getBaseX();if(t.classifierSize_){var s=e.append("g").attr("class","em-coxcomb-size-legend").attr("transform","translate(".concat(r,", ").concat(i,")"));n._sizeLegendContainer=s,sx(n,s,n.sizeLegend.values,n.map.classifierSize_,n.sizeLegend.title,n.sizeLegend.titlePadding)}!function(t,e,n){var i=t.map,r=t.colorLegend;t._colorLegendContainer=t.lgg.append("g").attr("class","em-coxcomb-color-legend");var s=0;t._sizeLegendContainer?(s=t._sizeLegendContainer.node().getBBox().height,t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(s+t.colorLegend.marginTop,")"))):t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(n,")"));r.title&&t._colorLegendContainer.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("x",0).attr("y",t.titleFontSize).text(r.title);var l=0,c=i.catColors(),u=function(e){var n=t.colorLegend.titlePadding+(r.title?t.titleFontSize:0)+l*(r.shapeHeight+r.shapePadding),s=i.catColors()[e]||"lightgray";t._colorLegendContainer.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",n).attr("width",r.shapeWidth).attr("height",r.shapeHeight).style("fill",s).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){a(t.map,e),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,a,e)})).on("mouseout",(function(){o(t.map),t.map.insetTemplates_&&ha(t.map.insetTemplates_,t.map.svgId,o,e)})),t._colorLegendContainer.append("text").attr("class","em-legend-label").attr("x",r.shapeWidth+r.labelOffsets.x).attr("y",n+.5*r.shapeHeight).attr("dy","0.35em").text(i.catLabels()[e]||e),l++};for(var h in c)u(h);if(r.noData){var f=s+t.colorLegend.marginTop+(r.title?t.titleFontSize+t.boxPadding:0)+l*(r.shapeHeight+r.shapePadding),p=t.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(f,")"));t.appendNoDataLegend(p,t.noDataText,a,o)}}(n,r,i),function(t,e,n){var i,r,a=t.map._coxcombMonths||[],o=40;if(!a.length)return;var s=n,l=e;t._sizeLegendContainer&&(s+=t._sizeLegendContainer.node().getBBox().height);t._colorLegendContainer&&(s+=t._colorLegendContainer.node().getBBox().height,s+=t.colorLegend.marginTop||0);s+=(null===(i=t.monthLegend)||void 0===i?void 0:i.marginTop)||0,s+=o;var c=18,u=2*Math.PI/a.length,h=(null===(r=t._colorLegendContainer)||void 0===r||null===(r=r.node())||void 0===r?void 0:r.getBBox().width)||0,f=l+h/2+c,p=t.lgg.append("g").attr("class","em-coxcomb-month-legend").attr("transform","translate(".concat(f,", ").concat(s+o,")")),d=zr().innerRadius(0).outerRadius(o).startAngle((function(t,e){return e*u})).endAngle((function(t,e){return(e+1)*u}));p.selectAll("path").data(a).join("path").attr("d",(function(t,e){return d(t,e)})).attr("fill","#ccc").attr("class","em-legend-month-segment");var g=o+c,_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];p.selectAll("text.month-label").data(a).join("text").attr("class","em-legend-label em-month-label").attr("x",(function(t,e){return Math.sin(e*u+u/2)*g})).attr("y",(function(t,e){return-Math.cos(e*u+u/2)*g})).attr("text-anchor","middle").attr("alignment-baseline","middle").text((function(t){var e=t.toString().slice(5,7);return _[parseInt(e,10)-1]||t})),p.selectAll("path").on("mouseover",(function(e,n){var i=n;(t.map.svg_||t.map.svg()).selectAll(".em-coxcomb-chart path").style("opacity",(function(t){return t.data.month===i?1:0})),Ot(this).style("stroke-width",1.5).style("opacity",.8)})).on("mouseout",(function(){(t.map.svg_||t.map.svg()).selectAll(".em-coxcomb-chart path").style("opacity",1),Ot(this).style("stroke-width",.3).style("opacity",.4)}))}(n,r,i),n.setBoxDimension()},n},iw=function(t){var e=bx(t,!0,"coxcomb");function n(t){var n=e.yearlyTotals;return void 0!==n[t]?n[t]:void 0}function i(t){if(e.catLabels_=e.catLabels_||{},e.svg_){var i=t.getCentroidsGroup(t);if(i){var r=i.selectAll("g.em-centroid"),a=r.data().filter((function(t){return void 0!==n(t.properties.id)}));a.forEach((function(t){r.filter((function(e){return e.properties.id===t.properties.id})).append("g").attr("class","em-coxcomb").attr("id","cox_"+t.properties.id)})),function(t){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)},r=da(t),a=t.svg().selectAll(r),o=t.svg().selectAll("g.em-centroid");[a,o].forEach((function(t){t.on("mouseover",(function(t,r){if(!i(r.properties.id)&&n(r.properties.id)){var a=Ot(this);a.attr("fill___",a.style("fill")),a.style("fill",e.hoverColor_),a.select("circle.em-coxcomb-max-outline").attr("stroke-width",2),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))}})).on("mousemove",(function(t,r){i(r.properties.id)||n(r.properties.id)&&e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mouseout",(function(t,r){if(!i(r.properties.id)&&n(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")||e.noDataFillStyle_),a.attr("fill___",null),a.select("circle.em-coxcomb-max-outline").attr("stroke-width",.3),e._tooltip&&e._tooltip.mouseout()}})).on("click",(function(t,r){i(r.properties.id)||n(r.properties.id)&&e._tooltip&&e._tooltip.click(r,e)}))}))}(t),function(t){var n=e._coxcombMonths,i=e._coxcombCauses,r=function(t){return Pv().domain(t).range([0,2*Math.PI]).align(0)}(n);t.forEach((function(t){var a=t.properties.id,o=function(t,n,i){var r=n.map((function(n){var r={month:n},a=0;if(i.forEach((function(i){var o,s=null===(o=e.statData("".concat(n,":").concat(i)))||void 0===o?void 0:o.get(t),l=(null==s?void 0:s.value)||0;r[i]=l,a+=l})),e.totalCode_){var o,s=null===(o=e.statData("".concat(n,":").concat(e.totalCode_)))||void 0===o?void 0:o.get(t),l=(null==s?void 0:s.value)||0,c=l>a?l-a:0;c>0&&(r.other=c)}return Object.values(r).some((function(t){return t&&t>0}))?r:null})).filter(Boolean),a=r.some((function(t){return(t.other||0)>0}));if(!a){var o,s;r.forEach((function(t){return delete t.other})),null===(o=e.catColors_)||void 0===o||delete o.other,null===(s=e.catLabels_)||void 0===s||delete s.other}return r}(a,n,i);if(o.length){var s=function(t,e){var n=x(e);t.some((function(t){return(t.other||0)>0}))&&n.push("other");return n}(o,i),l=function(){var t=hr([]),e=Qb,n=Zb,i=tw;function r(r){var a,o,s=Array.from(t.apply(this,arguments),ew),l=s.length,c=-1;for(const t of r)for(a=0,++c;a<l;++a)(s[a][c]=[0,+i(t,s[a].key,c,r)]).data=t;for(a=0,o=Ux(e(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:hr(Array.from(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:hr(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?Qb:"function"==typeof t?t:hr(Array.from(t)),r):e},r.offset=function(t){return arguments.length?(n=null==t?Zb:t,r):n},r}().keys(s);!function(t,n,i,r){var a=e.svg().selectAll("#cox_"+t);if(e.coxcombRings_){var o=e.yearlyTotals[t]||0,s=e.classifierSize_(o);a.append("circle").attr("class","em-coxcomb-max-outline").attr("r",0).attr("fill","none").attr("stroke","#000").attr("stroke-width",.3).attr("opacity",.5).attr("pointer-events","none").transition().duration(e.transitionDuration_/2).attr("r",s)}var l=zr().startAngle((function(t){return r(t.data.month)})).endAngle((function(t){return r(t.data.month)+r.bandwidth()})).padAngle(.01).padRadius(0);i.forEach((function(r){a.append("g").attr("class","em-coxcomb-chart").attr("stroke","#ffffff").attr("stroke-width",.3).selectAll("path").data(n[i.indexOf(r)]).join("path").attr("fill",e.catColors_[r]||("other"===r?"#FFCC80":"lightgray")).attr("fill___",e.catColors_[r]||("other"===r?"#FFCC80":"lightgray")).attr("code",r).attr("month",(function(t){return t.data.month})).transition().delay((function(t,e){return 120*e})).duration(e.transitionDuration_).attrTween("d",(function(n){var i=Xe(0,e.classifierChartSize_(n[0],t)),r=Xe(0,e.classifierChartSize_(n[1],t));return function(t){return l.innerRadius(i(t)).outerRadius(r(t))(n)}}))}))}(a,l(o),s,r)}}))}(a),e.dorling_?tx(e,(function(t){var i=n(t.properties.id)||0;return e.classifierSize_(i)||0})):stopDorlingSimulation(e)}}}return e.coxcombMinRadius_=10,e.coxcombMaxRadius_=80,e.coxcombStrokeFill_="white",e.coxcombStrokeWidth_=.3,e.coxcombRings_=!0,e.catColors_=void 0,e.catLabels_=void 0,e.classifierSize_=null,["catColors_","catLabels_","noDataFillStyle_","coxcombMaxRadius_","coxcombMinRadius_","coxcombRings_","coxcombStrokeFill_","coxcombStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","noDataFillStyle","coxcombMaxRadius","coxcombMinRadius","coxcombInnerRadius","coxcombStrokeFill","coxcombStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statCodes_=void 0,e.totalCode_=void 0,e.statCoxcomb=function(t,n,i,r,a,o,s){return e._coxcombMonths=n,e._coxcombCauses=x(r),e._coxcombDim=i,t.filters=t.filters||{},n.forEach((function(n){if(r.forEach((function(s){t.filters.time=n,t.filters[i]=s;var l={};for(var c in t)l[c]=t[c];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];var h="".concat(n,":").concat(s);e.stat(h,l),o&&(e.catColors_=e.catColors_||{},e.catColors_[s]=o[r.indexOf(s)]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[s]=a[r.indexOf(s)])})),s){t.filters.time=n,t.filters[i]=s;var l={};for(var c in t)l[c]=t[c];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];var h="".concat(n,":").concat(s);e.stat(h,l)}})),s&&(e.totalCode_=s,e.catColors_.other="#FFCC80",e.catLabels_.other="Other"),e},e.updateClassification=function(){if(!e.statCodes_){e.statCodes_=Object.keys(e.statData_);var t=e.statCodes_.indexOf("default");t>-1&&e.statCodes_.splice(t,1)}var n,i,r,a,o,s;return function(){var t={},n={};e.totalCode_?e._coxcombMonths.forEach((function(i){var r=e.statData("".concat(i,":").concat(e.totalCode_));if(r&&r._data_)for(var a in r._data_){var o,s=(null===(o=r._data_[a])||void 0===o?void 0:o.value)||0;n[a]=n[a]||{},n[a][i]=s,t[a]=(t[a]||0)+s}})):e._coxcombMonths.forEach((function(i){var r={};for(var a in e._coxcombCauses.forEach((function(t){var n=e.statData("".concat(i,":").concat(t));if(n&&n._data_)for(var a in n._data_){var o,s=(null===(o=n._data_[a])||void 0===o?void 0:o.value)||0;r[a]=(r[a]||0)+s}})),r)n[a]=n[a]||{},n[a][i]=r[a],t[a]=(t[a]||0)+r[a]}));e.yearlyTotals=t,e.monthlyTotals=n}(),n=Object.values(e.yearlyTotals),i=e.coxcombMinRadius_||0,r=e.coxcombMaxRadius_||80,a=Gt(n)||0,o=Dt(n)||0,s=Kb().domain([a,o]).range([i,r]),e.classifierChartSize_=function(t,n){var i=s(e.yearlyTotals[n]||0),r=t/Math.max.apply(Math,x(Object.values(e.monthlyTotals[n]||{0:1})));return Math.sqrt(r)*i},e.classifierSize_=s,e},e.updateStyle=function(){if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=rb[t%10]}try{return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),e.dorling_?tx(e,(function(t){var i=n(t.properties.id)||0;return e.classifierSize_(i)||0})):stopDorlingSimulation(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}return e},e.getLegendConstructor=function(){return nw},e.tooltip_.textFunction=function(t,n){var i,r=t.properties.na||t.properties.name,a=t.properties.id,o=e._coxcombMonths||[],s=x(e._coxcombCauses),l=o.some((function(t){var n,i=(null===(n=e.statData("".concat(t,":").concat(e.totalCode_)))||void 0===n||null===(n=n.get(a))||void 0===n?void 0:n.value)||0,r=e._coxcombCauses.reduce((function(n,i){var r;return n+((null===(r=e.statData("".concat(t,":").concat(i)))||void 0===r||null===(r=r.get(a))||void 0===r?void 0:r.value)||0)}),0);return i>r}));l&&s.push("other");var c='<div class="em-tooltip-bar">'.concat(r).concat(a?" (".concat(a,")"):"","</div>"),u=['<th class="em-breakdown-label">Month</th>'];s.forEach((function(t){var n=e.catLabels_[t]||t,i=e.catColors_[t]||("other"===t?"#FFCC80":"#999");u.push('<th class="em-breakdown-label" style="color:'.concat(i,'">').concat(n,"</th>"))})),u.push('<th class="em-breakdown-label">Total</th>');var h="<tr>".concat(u.join(""),"</tr>"),f=e.yearlyTotals||{},p=e.monthlyTotals||{},d=f[a]||0,g=o.map((function(t){var n,i=['<td class="em-breakdown-label">'.concat(t,"</td>")],r=(null===(n=p[a])||void 0===n?void 0:n[t])||0;return s.forEach((function(n){var r=0;if("other"===n){var o,l=(null===(o=e.statData("".concat(t,":").concat(e.totalCode_)))||void 0===o||null===(o=o.get(a))||void 0===o?void 0:o.value)||0,c=s.filter((function(t){return"other"!==t})).reduce((function(n,i){var r;return n+((null===(r=e.statData("".concat(t,":").concat(i)))||void 0===r||null===(r=r.get(a))||void 0===r?void 0:r.value)||0)}),0);r=Math.max(l-c,0)}else{var u;r=(null===(u=e.statData("".concat(t,":").concat(n)))||void 0===u||null===(u=u.get(a))||void 0===u?void 0:u.value)||0}i.push(r>0?'<td><span class="em-breakdown-value">'.concat(ca(r),"</span></td>"):"<td></td>")})),i.push(r>0?'<td><span class="em-breakdown-value">'.concat(ca(r),"</span></td>"):"<td></td>"),"<tr>".concat(i.join(""),"</tr>")})),_=(null===(i=e.statData(e.statCodes_[0]))||void 0===i?void 0:i.unitText())||"";return c+='<div class="em-tooltip-breakdown em-tooltip-cx"><table class="em-tooltip-cx-table">',c+=h+g.join(""),d>0&&(c+='\n <tr class="em-total">\n <td class="em-breakdown-label">Year total</td>\n <td colspan="'.concat(s.length,'"></td>\n <td>\n <span class="em-breakdown-value">').concat(ca(d)," ").concat(_,"</span>\n </td>\n </tr>")),c+="</table></div>"},e};var rw=function(t,e){try{return"choropleth"==t||"ch"==t?Gx(e):"categorical"==t||"ct"==t?function(t){var e=bx(t,!1,"ct");e.classToFillStyle_=void 0,e.classToText_=void 0,e.tooltip_.textFunction=Bx,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){var n=e.statData().getUniqueValues(),i=x(Array(n.length).keys()),r=e.classToFillStyle_?e.classToFillStyle():void 0;if(r){var a=Object.keys(r);e.classifier(Tv().domain(a).range(a.map((function(t,e){return e}))))}else e.classifier(Tv().domain(n).range(i));var o=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var i=n.value;if(":"===i)return"nd";var r=isNaN(i)?i:+i;if(e.classifier().domain().includes(r))return e.classifier()(r)}}))},s=da(t);o(t.svg().selectAll(s)),"mixed"===t.nutsLevel_&&o(t.svg().selectAll("path.em-nutsrg0"))};function i(t){if(t.svg_){var n=da(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",a).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),o(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",pa(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&r(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&Ly(t,e.patternFill_)}}e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=Rx[r%12];e.classToFillStyle(t)}return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(da(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=Ot(this),n=e.attr("ecl"),i=e.attr("lvl");return n||"0"===i?"block":"none"}})).style("stroke",(function(){var t=Ot(this),e=t.attr("lvl"),n=t.attr("ecl"),i=t.style("stroke");return n&&"0"!==e?i||"#777":null})).style("stroke-width",(function(){var t=Ot(this),e=t.attr("lvl"),n=t.attr("ecl"),i=t.style("stroke-width");return n&&"0"!==e?i||.2:null}))},a=function(t){var n=Ot(this).attr("ecl");return e.Geometries.userGeometries?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:oa("em-nutsrg","fill"):"WORLD"===e.geo_?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]||e.cntrgFillStyle_:e.cntrgFillStyle_:(t.properties.id.slice(0,2),n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:oa("em-nutsrg","fill"))},o=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return jx},e}(e):"proportionalSymbol"==t||"proportionalSymbols"==t||"ps"==t?ix(e):"bivariateChoropleth"==t||"chbi"==t?function(t){var e=bx(t,!1,"chbi");function n(t){var n=function(t){t.attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier1_(+i)}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier2_(+i)}})).attr("nd",(function(t){var n=e.statData("v1").get(t.properties.id),i=e.statData("v2").get(t.properties.id);if(n&&i){var r=n.value;return 0!=r&&!r||":"==r||0!=(r=i.value)&&!r||":"==r?"nd":""}}))};if(function(){var t=e.statData("v1").getArray(),n=e.statData("v2").getArray(),i=x(Array(e.numberOfClasses()).keys());if(e.classifier1_||(e.breaks1_?e.classifier1(kn().domain(e.breaks1_).range(i)):e.classifier1($t().domain(t).range(i))),e.classifier2_||(e.breaks2_?e.classifier2(kn().domain(e.breaks2_).range(i)):e.classifier2($t().domain(n).range(i))),!e.classToFillStyle_){var r=Xx(e.numberOfClasses(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(r)}}(),t.svg_){var i=da(t);n(t.svg().selectAll(i)),"mixed"===t.nutsLevel_&&n(t.svg().selectAll("path.em-nutsrg0"))}}function i(t){if(t.svg()){var n=da(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",(function(t){var n=Ot(this).attr("ecl1");if("nd"===n)return e.noDataFillStyle()||"gray";var i=Ot(this).attr("ecl2");return n||i?"nd"===i?e.noDataFillStyle()||"gray":e.classToFillStyle_(+n,+i):oa("em-nutsrg","fill")})).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),a(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",pa(t))}))}),(function(t){})),"mixed"==e.nutsLevel_&&r(t)}}e.numberOfClasses_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.classifier1_=void 0,e.classifier2_=void 0,e.breaks1_=void 0,e.breaks2_=void 0,e.tooltip_.textFunction=Kx,["numberOfClasses_","breaks1_","breaks2_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["numberOfClasses","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,n),n(e),e},e.updateStyle=function(){return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(da(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ot(this),e=t.attr("ecl1"),n=t.attr("ecl2"),i=t.attr("lvl"),r=e||n||"0"===i;if(t.style("display",r?"block":"none"),(e||n)&&"0"!==i){var a=t.style("stroke")||"#777",o=t.style("stroke-width")||.2;t.style("stroke",a).style("stroke-width",o)}}}))},a=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){var a;i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),null===(a=e._tooltip)||void 0===a||a.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){var a;i(r.properties.id)||(null===(a=e._tooltip)||void 0===a||a.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a,o=Ot(this),s=o.attr("fill___");s&&(o.style("fill",s),null===(a=e._tooltip)||void 0===a||a.mouseout()),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return Jx},e}(e):"trivariateChoropleth"==t||"chbi"==t?function(t){var e=bx(t,!1,"chtri");function n(t){if(t.svg_){var n=da(t);t.svg().selectAll(n).each((function(n){var i,r,a,o=+(null===(i=t.statData("v1").get(n.properties.id))||void 0===i?void 0:i.value)||0,s=+(null===(r=t.statData("v2").get(n.properties.id))||void 0===r?void 0:r.value)||0,l=+(null===(a=t.statData("v3").get(n.properties.id))||void 0===a?void 0:a.value)||0,c={value1:o,value2:s,value3:l};if(o+s+l){var u=e.colorClassifier_(c);Ot(this).attr("regionClass","tri").style("fill",u)}else Ot(this).attr("regionClass","nd").style("fill",e.noDataFillStyle())}))}}function i(t){if(t.svg()){var n=da(t);t.svg().selectAll(n).transition().duration(e.transitionDuration()).style("fill",(function(n){var i,r,a,o=+(null===(i=t.statData("v1").get(n.properties.id))||void 0===i?void 0:i.value)||0,s=+(null===(r=t.statData("v2").get(n.properties.id))||void 0===r?void 0:r.value)||0,l=+(null===(a=t.statData("v3").get(n.properties.id))||void 0===a?void 0:a.value)||0,c={value1:o,value2:s,value3:l};return o+s+l?e.colorClassifier_(c):e.noDataFillStyle()})).end().then((function(){t.svg().selectAll(n).each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))}))}))}}e.color1_=(null==t?void 0:t.color1)||"#e41a1c",e.color2_=(null==t?void 0:t.color2)||"#4daf4a",e.color3_=(null==t?void 0:t.color3)||"#377eb8",e.startColor_=(null==t?void 0:t.startColor)||"#e8e8e8",e.centerCoefficient_=(null==t?void 0:t.centerCoefficient)||.2,e.noDataFillStyle_=(null==t?void 0:t.noDataFillStyle)||"#ccc",e.colorClassifier_=null,e.tooltip_.textFunction=tb,["color1_","color2_","color3_","centerCoefficient_","noDataFillStyle_","colorClassifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.updateClassification=function(){return e.statData("v1")&&e.statData("v2")&&e.statData("v3")?(e.colorClassifier_=Qx(["value1","value2","value3"],(function(t){return(+t.value1||0)+(+t.value2||0)+(+t.value3||0)}),[e.color1(),e.color2(),e.color3()],{centerCoefficient:e.centerCoefficient(),withMixedClasses:!0,defaultColor:e.noDataFillStyle()}),e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,n),n(e),e):e},e.updateStyle=function(){return e.insetTemplates_&&ha(e.insetTemplates_,e.svgId_,i),i(e),r(e,e.svg().selectAll(da(e))),e};var r=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return Zx},e}(e):"stripeComposition"==t||"scomp"==t?function(t){var e=bx(t,!1,"scomp");e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,i,r,a,o){t.filters=t.filters||{};for(var s=0;s<r.length;s++){var l=r[s];t.filters[i]=l;var c={};for(var u in t)c[u]=t[u];for(var h in c.filters={},t.filters)c.filters[h]=t.filters[h];e.stat(l,c),o&&(e.catColors_=e.catColors_||{},e.catColors_[l]=o[s]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=a[s])}return n=r,e};var n=void 0,i=function(t){for(var i={},r=0,a=0;a<n.length;a++){var o=n[a],s=e.statData(o).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[o]=s.value,r+=s.value}if(0!=r){for(var l=0;l<n.length;l++)i[n[l]]/=r;return i}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=rb[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll(da(e)).style("fill",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var n=t.properties.id,r=i(n);if(!r)return e.noDataFillStyle()||"gray";var a=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&a.attr("patternTransform","rotate("+e.stripeOrientation()+")"),a.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var o=0;for(var s in r){var l=r[s];if(l){l*=e.stripeWidth();var c=e.catColors()[s]||"lightgray";a.append("rect").attr("x",o).attr("y",0).attr("height",1).style("stroke","none").attr("code",s).style("fill",c).style("pointer-events","none").transition().duration(e.transitionDuration()).on("end",(function(){Ot(this).style("pointer-events",null)})).attr("width",l),o+=l}}return"url(#pattern_"+n+")"}})).attr("nd",(function(t){return i(t.properties.id)?"":"nd"}));var r=da(e);return e.svg().selectAll(r).on("mouseover",(function(t,n){var i=Ot(this);i.attr("fill___",i.style("fill")),i.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.style("fill"),t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return ab},e.tooltip_.textFunction=function(t,n){var r=t.properties.na||t.properties.name,a=t.properties.id,o=i(a),s=[];for(var l in o)s.push({code:l,value:o[l]});var c="";if(c+='<div class="em-tooltip-bar">\n <b>'.concat(r,"</b>").concat(a?" (".concat(a,")"):"","\n </div>"),!s||0===s.length)return c+"<div>".concat(e.noDataText(),"</div>");var u,h=e.pieChartRadius(),f=e.pieChartInnerRadius(),p=ib().sort(null).value((function(t){return t.value})),d=zr().innerRadius(f).outerRadius(h),g="",_=ob(p(s));try{for(_.s();!(u=_.n()).done;){var m=u.value,v=e.catColors()[m.data.code]||"lightgray",y=d(m);g+='<path d="'.concat(y,'" fill="').concat(v,'" stroke="darkgray"></path>')}}catch(t){_.e(t)}finally{_.f()}return c+'\n <div style="display: flex; justify-content: center;">\n <svg viewBox="'.concat(-h," ").concat(-h," ").concat(2*h," ").concat(2*h,'" width="').concat(2*h,'">\n <g>').concat(g,"</g>\n </svg>\n </div>\n ")},e}(e):"pieChart"==t||"pie"==t?hb(e):"sparkline"==t||"spark"==t||"sparklines"==t?db(e):"flow"==t||"flowmap"==t?$b(e):"coxcomb"==t||"polar"==t?iw(e):"alpha"==t||"valueByAlpha"==t?function(t){var e=Gx(t);e.alphaData_=null,e.opacityScale_=null,e.opacityScale=function(t){return arguments.length?(e.opacityScale_=t,e):e.opacityScale_};var n=e.updateStatValues;e.updateStatValues=function(){var t=e.statData("alpha");if(!t||!t.isReady())return e.alphaData_=null,e;e.alphaData_=t;var i=t.getArray().filter((function(t){return null!=t&&":"!==t&&!isNaN(+t)}));if(!e.opacityScale_){var r=Gt(i),a=Dt(i);e.opacityScale_=i.length>0?Cn().domain([r,a]).range([.1,1]):null}return n.call(e),e.updateStyle()};var i=e.updateStyle;return e.updateStyle=function(){if(!e.svg_||!e.opacityScale_)return e;e.svg_.classed("em--alpha",!0);var t=e.statData();if(!t||!t.isReady())return e;var n=e.statData("alpha");if(!n||!n.isReady())return e;var r=da(e);return e.svg().selectAll(r).each((function(i){var r,a,o=Ot(this),s=null===(r=t.get(i.properties.id))||void 0===r?void 0:r.value,l=null===(a=n.get(i.properties.id))||void 0===a?void 0:a.value;if(null!=s&&":"!==s)if("nd"!==l&&null!=l)o.style("opacity",e.opacityScale_(+l));else{var c=e.noDataFillStyle_||"gray";o.attr("ecl","nd").attr("force-grey","1").style("fill",c).attr("fill","grey").attr("fill___",c).style("opacity",1)}})),i.call(e),e},e.getLegendConstructor=function(){return ey},e.tooltip_.textFunction=function(t,e){var n,i,r=[],a=t.properties.na||t.properties.name,o=t.properties.id;r.push('<div class="em-tooltip-bar"><b>'.concat(a,"</b>").concat(o?" (".concat(o,")"):"","</div>"));var s=e.statData(),l=e.alphaData_||e.statData("alpha"),c=s.get(o),u=null==l?void 0:l.get(o),h=(null===(n=s.unitText)||void 0===n?void 0:n.call(s))||"",f=(null==l||null===(i=l.unitText)||void 0===i?void 0:i.call(l))||"",p=s.label_?s.label_+": ":"",d=null!=l&&l.label_?(null==l?void 0:l.label_)+": ":"";return!c||0!==c.value&&!c.value||":"===c.value?(r.push('\n <div class="em-tooltip-text no-data">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(e.noDataText_,"</td></tr>\n </tbody>\n </table>\n </div>\n ")),r.join("")):(r.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>'.concat(p).concat(ca(c.value)," ").concat(h,"</td>\n </tr>\n <tr>\n <td>").concat(u&&":"!==u.value&&null!=u.value?"".concat(d).concat(ca(u.value)," ").concat(f):"".concat(d).concat(e.noDataText_),"</td>\n </tr>\n </tbody>\n </table>\n </div>\n")),r.join(""))},e}(e):(console.log("Unexpected map type: "+t),bx(e,!0,t))}catch(t){console.error("Error in eurostat-map.map: "+t.message),console.error(t)}},aw=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,i=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(r,a){r.selectAll(".em-fill-pattern").remove();for(var o=0;o<a;o++){var s=n+(i-n)*o/(a-1),l=r.append("pattern").attr("class","em-fill-pattern").attr("id","pattern_"+o).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");l.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?l.append("rect").attr("x",0).attr("y",0).attr("width",s).attr("height",s).style("stroke","none").style("fill",t.symbColor):l.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*s).style("stroke","none").style("fill",t.symbColor)}}},ow=function(){return kf},sw="4.3.14"})(),i})()));
|
|
4
|
+
var e,n,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function l(t,r,a,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return i(l,"_invoke",function(t,i,r){var a,o,s,l=0,u=r||[],h=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,o=0,s=e,f.n=n,c}};function d(t,i){for(o=t,s=i,n=0;!h&&l&&!r&&n<u.length;n++){var r,a=u[n],d=f.p,p=a[2];t>3?(r=p===i)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=d&&((r=t<2&&d<a[1])?(o=0,f.v=i,f.n=a[1]):d<p&&(r=t<3||a[0]>i||i>p)&&(a[4]=t,a[5]=i,f.n=p,o=0))}if(r||t>1)return c;throw h=!0,i}return function(r,u,p){if(l>1)throw TypeError("Generator is already running");for(h&&1===u&&d(u,p),o=u,s=p;(n=o<2?e:s)||!h;){a||(o?o<3?(o>1&&(f.n=-1),d(o,s)):f.n=s:f.v=s);try{if(l=2,a){if(o||(r="next"),n=a[r]){if(!(n=n.call(a,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,o<2&&(o=0)}else 1===o&&(n=a.return)&&n.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((n=(h=f.n<0)?s:t.call(i,f))!==c)break}catch(t){a=e,o=1,s=t}finally{l=1}}return{value:n,done:h}}}(t,a,o),!0),l}var c={};function u(){}function h(){}function f(){}n=Object.getPrototypeOf;var d=[][o]?n(n([][o]())):(i(n={},o,(function(){return this})),n),p=f.prototype=u.prototype=Object.create(d);function g(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,i(t,s,"GeneratorFunction")),t.prototype=Object.create(p),t}return h.prototype=f,i(p,"constructor",f),i(f,"constructor",h),h.displayName="GeneratorFunction",i(f,s,"GeneratorFunction"),i(p),i(p,s,"Generator"),i(p,o,(function(){return this})),i(p,"toString",(function(){return"[object Generator]"})),(t.exports=r=function(){return{w:l,m:g}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},869:(t,e,n)=>{var i=n(887);t.exports=function(t,e,n,r,a){var o=i(t,e,n,r,a);return o.next().then((function(t){return t.done?t.value:o.next()}))},t.exports.__esModule=!0,t.exports.default=t.exports},887:(t,e,n)=>{var i=n(993),r=n(791);t.exports=function(t,e,n,a,o){return new r(i().w(t,e,n,a),o||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},791:(t,e,n)=>{var i=n(172),r=n(546);t.exports=function t(e,n){function a(t,r,o,s){try{var l=e[t](r),c=l.value;return c instanceof i?n.resolve(c.v).then((function(t){a("next",t,o,s)}),(function(t){a("throw",t,o,s)})):n.resolve(c).then((function(t){l.value=t,o(l)}),(function(t){return a("throw",t,o,s)}))}catch(t){s(t)}}var o;this.next||(r(t.prototype),r(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),r(this,"_invoke",(function(t,e,i){function r(){return new n((function(e,n){a(t,i,e,n)}))}return o=o?o.then(r,r):r()}),!0)},t.exports.__esModule=!0,t.exports.default=t.exports},546:t=>{function e(n,i,r,a){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}t.exports=e=function(t,n,i,r){function a(n,i){e(t,n,(function(t){return this._invoke(n,i,t)}))}n?o?o(t,n,{value:i,enumerable:!r,configurable:!r,writable:!r}):t[n]=i:(a("next",0),a("throw",1),a("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,i,r,a)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},373:t=>{t.exports=function(t){var e=Object(t),n=[];for(var i in e)n.unshift(i);return function t(){for(;n.length;)if((i=n.pop())in e)return t.value=i,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},633:(t,e,n)=>{var i=n(172),r=n(993),a=n(869),o=n(887),s=n(791),l=n(373),c=n(579);function u(){"use strict";var e=r(),n=e.m(u),h=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))}var d={throw:1,return:2,break:3,continue:3};function p(t){var e,n;return function(i){e||(e={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(t,e){return n(i.a,d[t],e)},delegateYield:function(t,r,a){return e.resultName=r,n(i.d,c(t),a)},finish:function(t){return n(i.f,t)}},n=function(t,n,r){i.p=e.prev,i.n=e.next;try{return t(n,r)}finally{e.next=i.n}}),e.resultName&&(e[e.resultName]=i.v,e.resultName=void 0),e.sent=i.v,e.next=i.n;try{return t.call(this,e)}finally{i.p=e.prev,i.n=e.next}}}return(t.exports=u=function(){return{wrap:function(t,n,i,r){return e.w(p(t),n,i,r&&r.reverse())},isGeneratorFunction:f,mark:e.m,awrap:function(t,e){return new i(t,e)},AsyncIterator:s,async:function(t,e,n,i,r){return(f(e)?o:a)(p(t),e,n,i,r)},keys:l,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},579:(t,e,n)=>{var i=n(738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(i(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,n)=>{var i=n(633)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={id:i,exports:{}};return t[i](a,a.exports,n),a.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.u=t=>t+".eurostatmap.min.js",n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.p="/build/",n.b=document.baseURI||self.location.href,n.nc=void 0;var i={};return(()=>{"use strict";n.r(i),n.d(i,{getDefaultLabels:()=>Jx,getFillPatternDefinitionFunction:()=>Yx,map:()=>$x,version:()=>Xx});var t={};n.r(t);var e=n(72),r=n.n(e),a=n(825),o=n.n(a),s=n(659),l=n.n(s),c=n(56),u=n.n(c),h=n(540),f=n.n(h),d=n(113),p=n.n(d),g=n(211),_={};_.styleTagTransform=p(),_.setAttributes=u(),_.insert=l().bind(null,"head"),_.domAPI=o(),_.insertStyleElement=f();r()(g.A,_);g.A&&g.A.locals&&g.A.locals;function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function v(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(t,e)||v(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(){}function w(t){return null==t?b:function(){return this.querySelector(t)}}function S(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function M(){return[]}function E(t){return null==t?M:function(){return this.querySelectorAll(t)}}function k(t){return function(){return this.matches(t)}}function C(t){return function(e){return e.matches(t)}}var T=Array.prototype.find;function A(){return this.firstElementChild}var P=Array.prototype.filter;function F(){return Array.from(this.children)}function L(t){return new Array(t.length)}function N(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function O(t,e,n,i,r,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new N(t,a[s]);for(;s<l;++s)(o=e[s])&&(r[s]=o)}function z(t,e,n,i,r,a,o){var s,l,c,u=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(d[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?r[s]=l:u.set(c,l));for(s=0;s<f;++s)c=o.call(t,a[s],s,a)+"",(l=u.get(c))?(i[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new N(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(d[s])===l&&(r[s]=l)}function G(t){return t.__data__}function D(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function I(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}N.prototype={constructor:N,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var R="http://www.w3.org/1999/xhtml";const j={svg:"http://www.w3.org/2000/svg",xhtml:R,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function B(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),j.hasOwnProperty(e)?{space:j[e],local:t}:t}function q(t){return function(){this.removeAttribute(t)}}function W(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function V(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Y(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function J(t){return function(){this.style.removeProperty(t)}}function X(t,e,n){return function(){this.style.setProperty(t,e,n)}}function K(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Z(t,e){return t.style.getPropertyValue(e)||Y(t).getComputedStyle(t,null).getPropertyValue(e)}function Q(t){return function(){delete this[t]}}function tt(t,e){return function(){this[t]=e}}function et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=nt(t.getAttribute("class")||"")}function at(t,e){for(var n=it(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ot(t,e){for(var n=it(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function st(t){return function(){at(this,t)}}function lt(t){return function(){ot(this,t)}}function ct(t,e){return function(){(e.apply(this,arguments)?at:ot)(this,t)}}function ut(){this.textContent=""}function ht(t){return function(){this.textContent=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function dt(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function gt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function _t(){this.nextSibling&&this.parentNode.appendChild(this)}function mt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===R&&e.documentElement.namespaceURI===R?e.createElement(t):e.createElementNS(n,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xt(t){var e=B(t);return(e.local?yt:vt)(e)}function bt(){return null}function wt(){var t=this.parentNode;t&&t.removeChild(this)}function St(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Et(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function kt(t,e,n){return function(){var i,r=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),void(i.value=e);this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Ct(t,e,n){var i=Y(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Tt(t,e){return function(){return Ct(this,t,e)}}function At(t,e){return function(){return Ct(this,t,e.apply(this,arguments))}}rt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Pt=[null];function Ft(t,e){this._groups=t,this._parents=e}function Lt(){return new Ft([[document.documentElement]],Pt)}Ft.prototype=Lt.prototype={constructor:Ft,select:function(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o,s=e[r],l=s.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new Ft(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return S(t.apply(this,arguments))}}(t):E(t);for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(i.push(t.call(o,o.__data__,c,s)),r.push(o));return new Ft(i,r)},selectChild:function(t){return this.select(null==t?A:function(t){return function(){return T.call(this.children,t)}}("function"==typeof t?t:C(t)))},selectChildren:function(t){return this.selectAll(null==t?F:function(t){return function(){return P.call(this.children,t)}}("function"==typeof t?t:C(t)))},filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Ft(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,G);var n=e?z:O,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],f=h.length,d=D(t.call(u,u&&u.__data__,c,i)),p=d.length,g=s[c]=new Array(p),_=o[c]=new Array(p);n(u,h,g,_,l[c]=new Array(f),d,e);for(var m,v,y=0,x=0;y<p;++y)if(m=g[y]){for(y>=x&&(x=y+1);!(v=_[x])&&++x<p;);m._next=v||null}}return(o=new Ft(o,i))._enter=s,o._exit=l,o},enter:function(){return new Ft(this._enter||this._groups.map(L),this._parents)},exit:function(){return new Ft(this._exit||this._groups.map(L),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,a=i.length,o=Math.min(r,a),s=new Array(r),l=0;l<o;++l)for(var c,u=n[l],h=i[l],f=u.length,d=s[l]=new Array(f),p=0;p<f;++p)(c=u[p]||h[p])&&(d[p]=c);for(;l<r;++l)s[l]=n[l];return new Ft(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=I);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var o,s=n[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new Ft(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=B(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?W:q:"function"==typeof e?n.local?$:V:n.local?H:U)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?J:"function"==typeof e?K:X)(t,e,null==n?"":n)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Q:"function"==typeof e?et:tt)(t,e)):this.node()[t]},classed:function(t,e){var n=nt(t+"");if(arguments.length<2){for(var i=it(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?ct:e?st:lt)(n,e))},text:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ft:ht)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?gt:pt)(t)):this.node().innerHTML},raise:function(){return this.each(_t)},lower:function(){return this.each(mt)},append:function(t){var e="function"==typeof t?t:xt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:xt(t),i=null==e?bt:"function"==typeof e?e:w(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(wt)},clone:function(t){return this.select(t?Mt:St)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?kt:Et,i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<o;++i)if((r=a[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?At:Tt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],a=0,o=r.length;a<o;++a)(i=r[a])&&(yield i)}};const Nt=Lt;function Ot(t){return"string"==typeof t?new Ft([[document.querySelector(t)]],[document.documentElement]):new Ft([[t]],Pt)}function zt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var Gt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return zt(e(t),n)}),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)<0?i=a+1:r=a}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)>0?r=a:i=a+1}return i}}}(zt);Gt.right,Gt.left;function Dt(t,e){var n,i,r,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(i=r=n;++o<a;)null!=(n=t[o])&&(i>n&&(i=n),r<n&&(r=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(i=r=n;++o<a;)null!=(n=e(t[o],o,t))&&(i>n&&(i=n),r<n&&(r=n));return[i,r]}var It=Array.prototype;It.slice,It.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function Rt(t,e){var n,i,r=t.length,a=-1;if(null==e){for(;++a<r;)if(null!=(n=t[a])&&n>=n)for(i=n;++a<r;)null!=(n=t[a])&&n>i&&(i=n)}else for(;++a<r;)if(null!=(n=e(t[a],a,t))&&n>=n)for(i=n;++a<r;)null!=(n=e(t[a],a,t))&&n>i&&(i=n);return i}function jt(t){for(var e,n,i,r=t.length,a=-1,o=0;++a<r;)o+=t[a].length;for(n=new Array(o);--r>=0;)for(e=(i=t[r]).length;--e>=0;)n[--o]=i[e];return n}function Bt(t,e){var n,i,r=t.length,a=-1;if(null==e){for(;++a<r;)if(null!=(n=t[a])&&n>=n)for(i=n;++a<r;)null!=(n=t[a])&&i>n&&(i=n)}else for(;++a<r;)if(null!=(n=e(t[a],a,t))&&n>=n)for(i=n;++a<r;)null!=(n=e(t[a],a,t))&&i>n&&(i=n);return i}function qt(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(r);++i<r;)a[i]=t+i*n;return a}function Wt(t,e){var n,i=t.length,r=-1,a=0;if(null==e)for(;++r<i;)(n=+t[r])&&(a+=n);else for(;++r<i;)(n=+e(t[r],r,t))&&(a+=n);return a}function Ut(t){return null===t?NaN:+t}function Ht(t,e,n=Ut){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,a=Math.floor(r),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(r-a)}}function Vt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $t(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Yt(t){let e,n,i;function r(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<0?r=e+1:a=e}while(r<a)}return r}return 2!==t.length?(e=Vt,n=(e,n)=>Vt(t(e),n),i=(e,n)=>t(e)-n):(e=t===Vt||t===$t?t:Jt,n=t,i=t),{left:r,center:function(t,e,n=0,a=t.length){const o=r(t,e,n,a-1);return o>n&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,r=0,a=t.length){if(r<a){if(0!==e(i,i))return a;do{const e=r+a>>>1;n(t[e],i)<=0?r=e+1:a=e}while(r<a)}return r}}}function Jt(){return 0}const Xt=Yt(Vt),Kt=Xt.right,Zt=(Xt.left,Yt(Ut).center,Kt);function Qt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function te(){var t,e=[],n=[],i=[];function r(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=Ht(e,t/r);return a}function a(e){return null==e||isNaN(e=+e)?t:n[Zt(i,e)]}return a.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(Vt),r()},a.range=function(t){return arguments.length?(n=Array.from(t),r()):n.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return te().domain(e).range(n).unknown(t)},Qt.apply(a,arguments)}const ee=Math.sqrt(50),ne=Math.sqrt(10),ie=Math.sqrt(2);function re(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=ee?10:a>=ne?5:a>=ie?2:1;let s,l,c;return r<0?(c=Math.pow(10,-r)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=n&&n<2?re(t,e,2*n):[s,l,c]}function ae(t,e,n){return re(t=+t,e=+e,n=+n)[2]}function oe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function se(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function le(){}var ce=.7,ue=1/ce,he="\\s*([+-]?\\d+)\\s*",fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",de="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pe=/^#([0-9a-f]{3,8})$/,ge=new RegExp(`^rgb\\(${he},${he},${he}\\)$`),_e=new RegExp(`^rgb\\(${de},${de},${de}\\)$`),me=new RegExp(`^rgba\\(${he},${he},${he},${fe}\\)$`),ve=new RegExp(`^rgba\\(${de},${de},${de},${fe}\\)$`),ye=new RegExp(`^hsl\\(${fe},${de},${de}\\)$`),xe=new RegExp(`^hsla\\(${fe},${de},${de},${fe}\\)$`),be={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 we(){return this.rgb().formatHex()}function Se(){return this.rgb().formatRgb()}function Me(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=pe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ee(e):3===n?new Ae(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ke(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ke(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ge.exec(t))?new Ae(e[1],e[2],e[3],1):(e=_e.exec(t))?new Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=me.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=ve.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ye.exec(t))?ze(e[1],e[2]/100,e[3]/100,1):(e=xe.exec(t))?ze(e[1],e[2]/100,e[3]/100,e[4]):be.hasOwnProperty(t)?Ee(be[t]):"transparent"===t?new Ae(NaN,NaN,NaN,0):null}function Ee(t){return new Ae(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ae(t,e,n,i)}function Ce(t){return t instanceof le||(t=Me(t)),t?new Ae((t=t.rgb()).r,t.g,t.b,t.opacity):new Ae}function Te(t,e,n,i){return 1===arguments.length?Ce(t):new Ae(t,e,n,null==i?1:i)}function Ae(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Pe(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}`}function Fe(){const t=Le(this.opacity);return`${1===t?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${1===t?")":`, ${t})`}`}function Le(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ne(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oe(t){return((t=Ne(t))<16?"0":"")+t.toString(16)}function ze(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new De(t,e,n,i)}function Ge(t){if(t instanceof De)return new De(t.h,t.s,t.l,t.opacity);if(t instanceof le||(t=Me(t)),!t)return new De;if(t instanceof De)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,l=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n<i):n===a?(i-e)/s+2:(e-n)/s+4,s/=l<.5?a+r:2-a-r,o*=60):s=l>0&&l<1?0:o,new De(o,s,l,t.opacity)}function De(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ie(t){return(t=(t||0)%360)<0?t+360:t}function Re(t){return Math.max(0,Math.min(1,t||0))}function je(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Be(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}oe(le,Me,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:we,formatHex:we,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ge(this).formatHsl()},formatRgb:Se,toString:Se}),oe(Ae,Te,se(le,{brighter(t){return t=null==t?ue:Math.pow(ue,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ce:Math.pow(ce,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ae(Ne(this.r),Ne(this.g),Ne(this.b),Le(this.opacity))},displayable(){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:Pe,formatHex:Pe,formatHex8:function(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}${Oe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Fe,toString:Fe})),oe(De,(function(t,e,n,i){return 1===arguments.length?Ge(t):new De(t,e,n,null==i?1:i)}),se(le,{brighter(t){return t=null==t?ue:Math.pow(ue,t),new De(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ce:Math.pow(ce,t),new De(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ae(je(t>=240?t-240:t+120,r,i),je(t,r,i),je(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new De(Ie(this.h),Re(this.s),Re(this.l),Le(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Le(this.opacity);return`${1===t?"hsl(":"hsla("}${Ie(this.h)}, ${100*Re(this.s)}%, ${100*Re(this.l)}%${1===t?")":`, ${t})`}`}}));const qe=t=>()=>t;function We(t,e){return function(n){return t+n*e}}function Ue(t){return 1==(t=+t)?He:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):qe(isNaN(e)?n:e)}}function He(t,e){var n=e-t;return n?We(t,n):qe(isNaN(t)?e:t)}const Ve=function t(e){var n=Ue(e);function i(t,e){var i=n((t=Te(t)).r,(e=Te(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),o=He(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function $e(t){return function(e){var n,i,r=e.length,a=new Array(r),o=new Array(r),s=new Array(r);for(n=0;n<r;++n)i=Te(e[n]),a[n]=i.r||0,o[n]=i.g||0,s[n]=i.b||0;return a=t(a),o=t(o),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=o(t),i.b=s(t),i+""}}}var Ye=$e((function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=i<e-1?t[i+2]:2*a-r;return Be((n-i/e)*e,o,r,a,s)}}));$e((function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return Be((n-i/e)*e,r,a,o,s)}}));function Je(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=new Array(r),o=new Array(i);for(n=0;n<r;++n)a[n]=rn(t[n],e[n]);for(;n<i;++n)o[n]=e[n];return function(t){for(n=0;n<r;++n)o[n]=a[n](t);return o}}function Xe(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ke(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ze(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=rn(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var Qe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tn=new RegExp(Qe.source,"g");function en(t,e){var n,i,r,a=Qe.lastIndex=tn.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Qe.exec(t))&&(i=tn.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Ke(n,i)})),a=tn.lastIndex;return a<e.length&&(r=e.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)s[(n=l[i]).i]=n.x(t);return s.join("")})}function nn(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(n=0;n<i;++n)r[n]=t[n]*(1-a)+e[n]*a;return r}}function rn(t,e){var n,i=typeof e;return null==e||"boolean"===i?qe(e):("number"===i?Ke:"string"===i?(n=Me(e))?(e=n,Ve):en:e instanceof Me?Ve:e instanceof Date?Xe:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?nn:Array.isArray(e)?Je:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ze:Ke)(t,e)}function an(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function on(t){return+t}var sn=[0,1];function ln(t){return t}function cn(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function un(t,e,n){var i=t[0],r=t[1],a=e[0],o=e[1];return r<i?(i=cn(r,i),a=n(o,a)):(i=cn(i,r),a=n(a,o)),function(t){return a(i(t))}}function hn(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),a=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=cn(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Zt(t,e,1,i)-1;return a[n](r[n](e))}}function fn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function dn(){var t,e,n,i,r,a,o=sn,s=sn,l=rn,c=ln;function u(){var t=Math.min(o.length,s.length);return c!==ln&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),i=t>2?hn:un,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=i(s,o.map(t),Ke)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,on),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=an,u()},h.clamp=function(t){return arguments.length?(c=!!t||ln,u()):c!==ln},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function pn(){return dn()(ln,ln)}var gn,_n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mn(t){if(!(e=_n.exec(t)))throw new Error("invalid format: "+t);var e;return new vn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function vn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function xn(t){return(t=yn(Math.abs(t)))?t[1]:NaN}function bn(t,e){var n=yn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}mn.prototype=vn.prototype,vn.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};const wn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>bn(100*t,e),r:bn,s:function(t,e){var n=yn(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(gn=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+yn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Sn(t){return t}var Mn,En,kn,Cn=Array.prototype.map,Tn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function An(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Sn:(e=Cn.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],o=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Sn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Cn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=mn(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,_=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):wn[v]||(void 0===_&&(_=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var y="$"===f?r:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?a:/[%p]/.test(v)?l:"",b=wn[v],w=/[defgprs%]/.test(v);function S(t){var r,a,l,f=y,S=x;if("c"===v)S=b(t)+S,t="";else{var M=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:b(Math.abs(t),_),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==h&&(M=!1),f=(M?"("===h?h:c:"-"===h||"("===h?"":h)+f,S=("s"===v?Tn[8+gn/3]:"")+S+(M&&"("===h?")":""),w)for(r=-1,a=t.length;++r<a;)if(48>(l=t.charCodeAt(r))||l>57){S=(46===l?o+t.slice(r+1):t.slice(r))+S,t=t.slice(0,r);break}}g&&!d&&(t=i(t,1/0));var E=f.length+t.length+S.length,k=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=i(k+t,k.length?p-S.length:1/0),k=""),n){case"<":t=f+t+S+k;break;case"=":t=f+k+t+S;break;case"^":t=k.slice(0,E=k.length>>1)+f+t+S+k.slice(E);break;default:t=k+f+t+S}return s(t)}return _=void 0===_?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),S.toString=function(){return t+""},S}return{format:h,formatPrefix:function(t,e){var n=h(((t=mn(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(xn(e)/3))),r=Math.pow(10,-i),a=Tn[8+i/3];return function(t){return n(r*t)+a}}}}function Pn(t){return Mn=An(t),En=Mn.format,kn=Mn.formatPrefix,Mn}function Fn(t,e,n,i){var r,a=function(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?ae(e,t,n):ae(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}(t,e,n);switch((i=mn(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(xn(e)/3)))-xn(Math.abs(t)))}(a,o))||(i.precision=r),kn(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,xn(e)-xn(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-xn(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return En(i)}function Ln(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const i=e<t,[r,a,o]=i?re(e,t,n):re(t,e,n);if(!(a>=r))return[];const s=a-r+1,l=new Array(s);if(i)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(r+t)/-o;else for(let t=0;t<s;++t)l[t]=(r+t)*o;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Fn(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),o=0,s=a.length-1,l=a[o],c=a[s],u=10;for(c<l&&(r=l,l=c,c=r,r=o,o=s,s=r);u-- >0;){if((r=ae(l,c,n))===i)return a[o]=l,a[s]=c,e(a);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function Nn(){var t=pn();return t.copy=function(){return fn(t,Nn())},Qt.apply(t,arguments),Ln(t)}function On(){var t,e=0,n=1,i=1,r=[.5],a=[0,1];function o(e){return null!=e&&e<=e?a[Zt(r,e,0,i)]:t}function s(){var t=-1;for(r=new Array(i);++t<i;)r[t]=((t+1)*n-(t-i)*e)/(i+1);return o}return o.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},o.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=i?[r[i-1],n]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return r.slice()},o.copy=function(){return On().domain([e,n]).range(a).unknown(t)},Qt.apply(Ln(o),arguments)}function zn(){var t,e=[.5],n=[0,1],i=1;function r(r){return null!=r&&r<=r?n[Zt(e,r,0,i)]:t}return r.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(t){return arguments.length?(n=Array.from(t),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(t){var i=n.indexOf(t);return[e[i-1],e[i]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return zn().domain(e).range(n).unknown(t)},Qt.apply(r,arguments)}function Gn(t){for(var e=t.length/6|0,n=new Array(e),i=0;i<e;)n[i]="#"+t.slice(6*i,6*++i);return n}Pn({thousands:",",grouping:[3],currency:["$",""]});const Dn=t=>Ye(t[t.length-1]);const In=Dn(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Gn));const Rn=Math.PI/180,jn=180/Math.PI,Bn=.96422,qn=.82521,Wn=4/29,Un=6/29,Hn=3*Un*Un,Vn=Un*Un*Un;function $n(t){if(t instanceof Jn)return new Jn(t.l,t.a,t.b,t.opacity);if(t instanceof ei)return ni(t);t instanceof Ae||(t=Ce(t));var e,n,i=Qn(t.r),r=Qn(t.g),a=Qn(t.b),o=Xn((.2225045*i+.7168786*r+.0606169*a)/1);return i===r&&r===a?e=n=o:(e=Xn((.4360747*i+.3850649*r+.1430804*a)/Bn),n=Xn((.0139322*i+.0971045*r+.7141733*a)/qn)),new Jn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Yn(t,e,n,i){return 1===arguments.length?$n(t):new Jn(t,e,n,null==i?1:i)}function Jn(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function Xn(t){return t>Vn?Math.pow(t,1/3):t/Hn+Wn}function Kn(t){return t>Un?t*t*t:Hn*(t-Wn)}function Zn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ti(t){if(t instanceof ei)return new ei(t.h,t.c,t.l,t.opacity);if(t instanceof Jn||(t=$n(t)),0===t.a&&0===t.b)return new ei(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*jn;return new ei(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ei(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function ni(t){if(isNaN(t.h))return new Jn(t.l,0,0,t.opacity);var e=t.h*Rn;return new Jn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function ii(t,e){var n=He((t=Yn(t)).l,(e=Yn(e)).l),i=He(t.a,e.a),r=He(t.b,e.b),a=He(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=r(e),t.opacity=a(e),t+""}}oe(Jn,Yn,se(le,{brighter(t){return new Jn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Jn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ae(Zn(3.1338561*(e=Bn*Kn(e))-1.6168667*(t=1*Kn(t))-.4906146*(n=qn*Kn(n))),Zn(-.9787684*e+1.9161415*t+.033454*n),Zn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),oe(ei,(function(t,e,n,i){return 1===arguments.length?ti(t):new ei(t,e,n,null==i?1:i)}),se(le,{brighter(t){return new ei(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ei(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return ni(this).rgb()}}));var ri={value:()=>{}};function ai(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new oi(i)}function oi(t){this._=t}function si(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function li(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=ri,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}oi.prototype=ai.prototype={constructor:oi,on:function(t,e){var n,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)r[n]=li(r[n],t.name,e);else if(null==e)for(n in r)r[n]=li(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=si(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new oi(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};const ci=ai;var ui,hi,fi=0,di=0,pi=0,gi=0,_i=0,mi=0,vi="object"==typeof performance&&performance.now?performance:Date,yi="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function xi(){return _i||(yi(bi),_i=vi.now()+mi)}function bi(){_i=0}function wi(){this._call=this._time=this._next=null}function Si(t,e,n){var i=new wi;return i.restart(t,e,n),i}function Mi(){_i=(gi=vi.now())+mi,fi=di=0;try{!function(){xi(),++fi;for(var t,e=ui;e;)(t=_i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fi}()}finally{fi=0,function(){var t,e,n=ui,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ui=e);hi=t,ki(i)}(),_i=0}}function Ei(){var t=vi.now(),e=t-gi;e>1e3&&(mi-=e,gi=t)}function ki(t){fi||(di&&(di=clearTimeout(di)),t-_i>24?(t<1/0&&(di=setTimeout(Mi,t-vi.now()-mi)),pi&&(pi=clearInterval(pi))):(pi||(gi=vi.now(),pi=setInterval(Ei,1e3)),fi=1,yi(Mi)))}function Ci(t,e,n){var i=new wi;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}wi.prototype=Si.prototype={constructor:wi,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?xi():+n)+(null==e?0:+e),this._next||hi===this||(hi?hi._next=this:ui=this,hi=this),this._call=t,this._time=n,ki()},stop:function(){this._call&&(this._call=null,this._time=1/0,ki())}};var Ti=ci("start","end","cancel","interrupt"),Ai=[];function Pi(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var c,u,h,f;if(1!==n.state)return l();for(c in r)if((f=r[c]).name===n.name){if(3===f.state)return Ci(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete r[c])}if(Ci((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=Si(a,0,n.time)}(t,n,{name:e,index:i,group:r,on:Ti,tween:Ai,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Fi(t,e){var n=Ni(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Li(t,e){var n=Ni(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Ni(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Oi(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[r]):o=!1;o&&delete t.__transition}}var zi,Gi=180/Math.PI,Di={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ii(t,e,n,i,r,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*Gi,skewX:Math.atan(l)*Gi,scaleX:o,scaleY:s}}function Ri(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,i,r,a,o,s){if(t!==r||i!==a){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:Ke(t,r)},{i:l-2,x:Ke(i,a)})}else(r||a)&&o.push("translate("+r+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Ke(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,o.rotate,s,l),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Ke(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,o.skewX,s,l),function(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Ke(t,n)},{i:s-2,x:Ke(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,n=-1,i=l.length;++n<i;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var ji=Ri((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Di:Ii(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Bi=Ri((function(t){return null==t?Di:(zi||(zi=document.createElementNS("http://www.w3.org/2000/svg","g")),zi.setAttribute("transform",t),(t=zi.transform.baseVal.consolidate())?Ii((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Di)}),", ",")",")");function qi(t,e){var n,i;return function(){var r=Li(this,t),a=r.tween;if(a!==n)for(var o=0,s=(i=n=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}r.tween=i}}function Wi(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=Li(this,t),o=a.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=s;break}l===c&&r.push(s)}a.tween=r}}function Ui(t,e,n){var i=t._id;return t.each((function(){var t=Li(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Ni(t,i).value[e]}}function Hi(t,e){var n;return("number"==typeof e?Ke:e instanceof Me?Ve:(n=Me(e))?(e=n,Ve):en)(t,e)}function Vi(t){return function(){this.removeAttribute(t)}}function $i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yi(t,e,n){var i,r,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===i?r:r=e(i=o,n)}}function Ji(t,e,n){var i,r,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===i?r:r=e(i=o,n)}}function Xi(t,e,n){var i,r,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,l));this.removeAttribute(t)}}function Ki(t,e,n){var i,r,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===i&&s===r?a:(r=s,a=e(i=o,l));this.removeAttributeNS(t.space,t.local)}}function Zi(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Qi(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function tr(t,e){return function(){Fi(this,t).delay=+e.apply(this,arguments)}}function er(t,e){return e=+e,function(){Fi(this,t).delay=e}}function nr(t,e){return function(){Li(this,t).duration=+e.apply(this,arguments)}}function ir(t,e){return e=+e,function(){Li(this,t).duration=e}}var rr=Nt.prototype.constructor;function ar(t){return function(){this.style.removeProperty(t)}}var or=0;function sr(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function lr(){return++or}var cr=Nt.prototype;sr.prototype=function(t){return Nt().transition(t)}.prototype={constructor:sr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=w(t));for(var i=this._groups,r=i.length,a=new Array(r),o=0;o<r;++o)for(var s,l,c=i[o],u=c.length,h=a[o]=new Array(u),f=0;f<u;++f)(s=c[f])&&(l=t.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),h[f]=l,Pi(h[f],e,n,f,h,Ni(s,n)));return new sr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=E(t));for(var i=this._groups,r=i.length,a=[],o=[],s=0;s<r;++s)for(var l,c=i[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var f,d=t.call(l,l.__data__,h,c),p=Ni(l,n),g=0,_=d.length;g<_;++g)(f=d[g])&&Pi(f,e,n,g,d,p);a.push(d),o.push(l)}return new sr(a,o,e,n)},selectChild:cr.selectChild,selectChildren:cr.selectChildren,filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new sr(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var l,c=e[s],u=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(l=c[d]||u[d])&&(f[d]=l);for(;s<i;++s)o[s]=e[s];return new sr(o,this._parents,this._name,this._id)},selection:function(){return new rr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=lr(),i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=Ni(o,e);Pi(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new sr(i,this._parents,t,n)},call:cr.call,nodes:cr.nodes,node:cr.node,size:cr.size,empty:cr.empty,each:cr.each,on:function(t,e){var n=this._id;return arguments.length<2?Ni(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Fi:Li;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}(n,t,e))},attr:function(t,e){var n=B(t),i="transform"===n?Bi:Hi;return this.attrTween(t,"function"==typeof e?(n.local?Ki:Xi)(n,i,Ui(this,"attr."+t,e)):null==e?(n.local?$i:Vi)(n):(n.local?Ji:Yi)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=B(t);return this.tween(n,(i.local?Zi:Qi)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?ji:Hi;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=Z(this,t),o=(this.style.removeProperty(t),Z(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}(t,i)).on("end.style."+t,ar(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var o=Z(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Z(this,t)),o===l?null:o===i&&l===r?a:(r=l,a=e(i=o,s))}}(t,i,Ui(this,"style."+t,e))).each(function(t,e){var n,i,r,a,o="style."+e,s="end."+o;return function(){var l=Li(this,t),c=l.on,u=null==l.value[o]?a||(a=ar(e)):void 0;c===n&&r===u||(i=(n=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,a=n+"";return function(){var o=Z(this,t);return o===a?null:o===i?r:r=e(i=o,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function a(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,a,n)),i}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ui(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Ni(this.node(),n).tween,a=0,o=r.length;a<o;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?qi:Wi)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?tr:er)(e,t)):Ni(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nr:ir)(e,t)):Ni(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Li(this,t).ease=e}}(e,t)):Ni(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Li(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise((function(a,o){var s={value:o},l={value:function(){0==--r&&a()}};n.each((function(){var n=Li(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===r&&a()}))},[Symbol.iterator]:cr[Symbol.iterator]};var ur={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function hr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Nt.prototype.interrupt=function(t){return this.each((function(){Oi(this,t)}))},Nt.prototype.transition=function(t){var e,n;t instanceof sr?(e=t._id,t=t._name):(e=lr(),(n=ur).time=xi(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],l=s.length,c=0;c<l;++c)(o=s[c])&&Pi(o,t,e,c,s,n||hr(o,e));return new sr(i,this._parents,t,e)};const{abs:fr,max:dr,min:pr}=Math;function gr(t){return[+t[0],+t[1]]}function _r(t){return[gr(t[0]),gr(t[1])]}["w","e"].map(mr),["n","s"].map(mr),["n","w","e","s","nw","ne","sw","se"].map(mr);function mr(t){return{type:t}}function vr(t){return function(){return t}}const yr=Math.abs,xr=Math.atan2,br=Math.cos,wr=Math.max,Sr=Math.min,Mr=Math.sin,Er=Math.sqrt,kr=1e-12,Cr=Math.PI,Tr=Cr/2,Ar=2*Cr;function Pr(t){return t>=1?Tr:t<=-1?-Tr:Math.asin(t)}const Fr=Math.PI,Lr=2*Fr,Nr=1e-6,Or=Lr-Nr;function zr(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Gr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?zr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zr;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,a){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+a}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,o=this._y1,s=n-t,l=i-e,c=a-t,u=o-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>Nr)if(Math.abs(u*s-l*c)>Nr&&r){let f=n-a,d=i-o,p=s*s+l*l,g=f*f+d*d,_=Math.sqrt(p),m=Math.sqrt(h),v=r*Math.tan((Fr-Math.acos((p+h-g)/(2*_*m)))/2),y=v/m,x=v/_;Math.abs(y-1)>Nr&&this._append`L${t+y*c},${e+y*u}`,this._append`A${r},${r},0,0,${+(u*f>c*d)},${this._x1=t+x*s},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,i,r,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),s=n*Math.sin(i),l=t+o,c=e+s,u=1^a,h=a?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Nr||Math.abs(this._y1-c)>Nr)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%Lr+Lr),h>Or?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Nr&&this._append`A${n},${n},0,${+(h>=Fr)},${u},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Dr(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Gr(e)}function Ir(t){return t.innerRadius}function Rr(t){return t.outerRadius}function jr(t){return t.startAngle}function Br(t){return t.endAngle}function qr(t){return t&&t.padAngle}function Wr(t,e,n,i,r,a,o){var s=t-n,l=e-i,c=(o?a:-a)/Er(s*s+l*l),u=c*l,h=-c*s,f=t+u,d=e+h,p=n+u,g=i+h,_=(f+p)/2,m=(d+g)/2,v=p-f,y=g-d,x=v*v+y*y,b=r-a,w=f*g-p*d,S=(y<0?-1:1)*Er(wr(0,b*b*x-w*w)),M=(w*y-v*S)/x,E=(-w*v-y*S)/x,k=(w*y+v*S)/x,C=(-w*v+y*S)/x,T=M-_,A=E-m,P=k-_,F=C-m;return T*T+A*A>P*P+F*F&&(M=k,E=C),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function Ur(){var t=Ir,e=Rr,n=vr(0),i=null,r=jr,a=Br,o=qr,s=null,l=Dr(c);function c(){var c,u,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=r.apply(this,arguments)-Tr,p=a.apply(this,arguments)-Tr,g=yr(p-d),_=p>d;if(s||(s=c=l()),f<h&&(u=f,f=h,h=u),f>kr)if(g>Ar-kr)s.moveTo(f*br(d),f*Mr(d)),s.arc(0,0,f,d,p,!_),h>kr&&(s.moveTo(h*br(p),h*Mr(p)),s.arc(0,0,h,p,d,_));else{var m,v,y=d,x=p,b=d,w=p,S=g,M=g,E=o.apply(this,arguments)/2,k=E>kr&&(i?+i.apply(this,arguments):Er(h*h+f*f)),C=Sr(yr(f-h)/2,+n.apply(this,arguments)),T=C,A=C;if(k>kr){var P=Pr(k/h*Mr(E)),F=Pr(k/f*Mr(E));(S-=2*P)>kr?(b+=P*=_?1:-1,w-=P):(S=0,b=w=(d+p)/2),(M-=2*F)>kr?(y+=F*=_?1:-1,x-=F):(M=0,y=x=(d+p)/2)}var L=f*br(y),N=f*Mr(y),O=h*br(w),z=h*Mr(w);if(C>kr){var G,D=f*br(x),I=f*Mr(x),R=h*br(b),j=h*Mr(b);if(g<Cr)if(G=function(t,e,n,i,r,a,o,s){var l=n-t,c=i-e,u=o-r,h=s-a,f=h*l-u*c;if(!(f*f<kr))return[t+(f=(u*(e-a)-h*(t-r))/f)*l,e+f*c]}(L,N,R,j,D,I,O,z)){var B=L-G[0],q=N-G[1],W=D-G[0],U=I-G[1],H=1/Mr(function(t){return t>1?0:t<-1?Cr:Math.acos(t)}((B*W+q*U)/(Er(B*B+q*q)*Er(W*W+U*U)))/2),V=Er(G[0]*G[0]+G[1]*G[1]);T=Sr(C,(h-V)/(H-1)),A=Sr(C,(f-V)/(H+1))}else T=A=0}M>kr?A>kr?(m=Wr(R,j,L,N,f,A,_),v=Wr(D,I,O,z,f,A,_),s.moveTo(m.cx+m.x01,m.cy+m.y01),A<C?s.arc(m.cx,m.cy,A,xr(m.y01,m.x01),xr(v.y01,v.x01),!_):(s.arc(m.cx,m.cy,A,xr(m.y01,m.x01),xr(m.y11,m.x11),!_),s.arc(0,0,f,xr(m.cy+m.y11,m.cx+m.x11),xr(v.cy+v.y11,v.cx+v.x11),!_),s.arc(v.cx,v.cy,A,xr(v.y11,v.x11),xr(v.y01,v.x01),!_))):(s.moveTo(L,N),s.arc(0,0,f,y,x,!_)):s.moveTo(L,N),h>kr&&S>kr?T>kr?(m=Wr(O,z,D,I,h,-T,_),v=Wr(L,N,R,j,h,-T,_),s.lineTo(m.cx+m.x01,m.cy+m.y01),T<C?s.arc(m.cx,m.cy,T,xr(m.y01,m.x01),xr(v.y01,v.x01),!_):(s.arc(m.cx,m.cy,T,xr(m.y01,m.x01),xr(m.y11,m.x11),!_),s.arc(0,0,h,xr(m.cy+m.y11,m.cx+m.x11),xr(v.cy+v.y11,v.cx+v.x11),_),s.arc(v.cx,v.cy,T,xr(v.y11,v.x11),xr(v.y01,v.x01),!_))):s.arc(0,0,h,w,b,_):s.lineTo(O,z)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-Cr/2;return[br(i)*n,Mr(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:vr(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:vr(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:vr(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vr(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:vr(+t),c):r},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:vr(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:vr(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}const Hr={capture:!0,passive:!1};function Vr(t){t.preventDefault(),t.stopImmediatePropagation()}function $r(t){return((t=Math.exp(t))+1/t)/2}const Yr=function t(e,n,i){function r(t,r){var a,o,s=t[0],l=t[1],c=t[2],u=r[0],h=r[1],f=r[2],d=u-s,p=h-l,g=d*d+p*p;if(g<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*d,l+t*p,c*Math.exp(e*t*o)]};else{var _=Math.sqrt(g),m=(f*f-c*c+i*g)/(2*c*n*_),v=(f*f-c*c-i*g)/(2*f*n*_),y=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(v*v+1)-v);o=(x-y)/e,a=function(t){var i=t*o,r=$r(y),a=c/(n*_)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+y)-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[s+a*d,l+a*p,c*r/$r(e*i+y)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4);function Jr(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const Xr=t=>()=>t;function Kr(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Zr(t,e,n){this.k=t,this.x=e,this.y=n}Zr.prototype={constructor:Zr,scale:function(t){return 1===t?this:new Zr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Zr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Qr=new Zr(1,0,0);function ta(t){t.stopImmediatePropagation()}function ea(t){t.preventDefault(),t.stopImmediatePropagation()}function na(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ia(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ra(){return this.__zoom||Qr}function aa(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function oa(){return navigator.maxTouchPoints||"ontouchstart"in this}function sa(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function la(){var t,e,n,i=na,r=ia,a=sa,o=aa,s=oa,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=Yr,f=ci("start","zoom","end"),d=0,p=10;function g(t){t.property("__zoom",ra).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",M).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",C).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new Zr(e,t.x,t.y)}function m(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new Zr(t.k,i,r)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function y(t,e,n,i){t.on("start.zoom",(function(){x(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,a=arguments,o=x(t,a).event(i),s=r.apply(t,a),l=null==n?v(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=h(u.invert(l).concat(c/u.k),f.invert(l).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=c/e[2];t=new Zr(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function w(t,...e){if(i.apply(this,arguments)){var n=x(this,e).event(t),r=this.__zoom,s=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,o.apply(this,arguments)))),u=Jr(t);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=r.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(r.k===s)return;n.mouse=[u,r.invert(u)],Oi(this),n.start()}ea(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",a(m(_(r,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(t,...e){if(!n&&i.apply(this,arguments)){var r=t.currentTarget,o=x(this,e,!0).event(t),s=Ot(t.view).on("mousemove.zoom",(function(t){if(ea(t),!o.moved){var e=t.clientX-u,n=t.clientY-h;o.moved=e*e+n*n>d}o.event(t).zoom("mouse",a(m(o.that.__zoom,o.mouse[0]=Jr(t,r),o.mouse[1]),o.extent,c))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=Ot(t).on("dragstart.drag",null);e&&(i.on("click.drag",Vr,Hr),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,o.moved),ea(t),o.event(t).end()}),!0),l=Jr(t,r),u=t.clientX,h=t.clientY;!function(t){var e=t.document.documentElement,n=Ot(t).on("dragstart.drag",Vr,Hr);"onselectstart"in e?n.on("selectstart.drag",Vr,Hr):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),ta(t),o.mouse=[l,this.__zoom.invert(l)],Oi(this),o.start()}}function M(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,o=Jr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),l=n.k*(t.shiftKey?.5:2),h=a(m(_(n,l),o,s),r.apply(this,e),c);ea(t),u>0?Ot(this).transition().duration(u).call(y,h,o,t):Ot(this).call(g.transform,h,o,t)}}function E(n,...r){if(i.apply(this,arguments)){var a,o,s,l,c=n.touches,u=c.length,h=x(this,r,n.changedTouches.length===u).event(n);for(ta(n),o=0;o<u;++o)l=[l=Jr(s=c[o],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,a=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),500)),Oi(this),h.start())}}function k(t,...e){if(this.__zooming){var n,i,r,o,s=x(this,e).event(t),l=t.changedTouches,u=l.length;for(ea(t),n=0;n<u;++n)r=Jr(i=l[n],this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=r);if(i=s.that.__zoom,s.touch1){var h=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],g=(g=d[0]-h[0])*g+(g=d[1]-h[1])*g,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;i=_(i,Math.sqrt(g/v)),r=[(h[0]+d[0])/2,(h[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(m(i,r,o),s.extent,c))}}function C(t,...i){if(this.__zooming){var r,a,o=x(this,i).event(t),s=t.changedTouches,l=s.length;for(ta(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),r=0;r<l;++r)a=s[r],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=Jr(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<p)){var c=Ot(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,n,i){var r=t.selection?t.selection():t;r.property("__zoom",ra),t!==r?y(t,e,n,i):r.interrupt().each((function(){x(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},g.scaleBy=function(t,e,n,i){g.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},g.scaleTo=function(t,e,n,i){g.transform(t,(function(){var t=r.apply(this,arguments),i=this.__zoom,o=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n,s=i.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return a(m(_(i,l),o,s),t,c)}),n,i)},g.translateBy=function(t,e,n,i){g.transform(t,(function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}),null,i)},g.translateTo=function(t,e,n,i,o){g.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==i?v(t):"function"==typeof i?i.apply(this,arguments):i;return a(Qr.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,o)},b.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Ot(this.that).datum();f.call(t,this.that,new Kr(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:f}),e)}},g.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:Xr(+t),g):o},g.filter=function(t){return arguments.length?(i="function"==typeof t?t:Xr(!!t),g):i},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Xr(!!t),g):s},g.extent=function(t){return arguments.length?(r="function"==typeof t?t:Xr([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):r},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(u=+t,g):u},g.interpolate=function(t){return arguments.length?(h=t,g):h},g.on=function(){var t=f.on.apply(f,arguments);return t===f?g:t},g.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,g):Math.sqrt(d)},g.tapDistance=function(t){return arguments.length?(p=+t,g):p},g}function ca(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ua(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ua(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ha(t,e,n){if(!t.startsWith(".")&&!t.startsWith("#"))throw new Error('Invalid selector: Must start with "." for classes or "#" for IDs.');for(var i=0,r=Array.from(document.styleSheets);i<r.length;i++){var a=r[i];try{var o,s=ca(a.cssRules||a.rules);try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l.selectorText===t)return void(l.style[e]=n)}}catch(t){s.e(t)}finally{s.f()}}catch(t){console.warn("Could not access rules in stylesheet:",t)}}var c=document.getElementById("custom-styles");c||((c=document.createElement("style")).id="custom-styles",document.head.appendChild(c));try{c.sheet.insertRule("".concat(t," { ").concat(e,": ").concat(n,"; }"),c.sheet.cssRules.length)}catch(i){console.error("Failed to insert rule: ".concat(t," { ").concat(e,": ").concat(n,"; }"),i)}}Zr.prototype;var fa=function(t){var e=document.createElement("div");e.className=t,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto",e.style.width="auto",e.style.lineHeight="normal",e.style.fontSize="initial",document.body.appendChild(e);var n=parseFloat(window.getComputedStyle(e).fontSize);return document.body.removeChild(e),n||0},da=function(t,e){var n=document.createElement("div");n.className=t,n.style.position="absolute",n.style.visibility="hidden",n.style.height="auto",n.style.lineHeight="normal",document.body.appendChild(n);var i=window.getComputedStyle(n).getPropertyValue(e);return document.body.removeChild(n),i||null};function pa(t){var e=[],n=function(){var t,e=[],n=ca(document.styleSheets);try{for(n.s();!(t=n.n()).done;){var i=t.value;try{var r,a=ca(i.cssRules);try{for(a.s();!(r=a.n()).done;){var o=r.value;e.push(o)}}catch(t){a.e(t)}finally{a.f()}}catch(t){console.warn("Unable to access stylesheet:",i.href,t)}}}catch(t){n.e(t)}finally{n.f()}return e}();n.forEach((function(n){t.matches(n.selectorText)&&e.push(n.style)}));var i={};return e.forEach((function(t){for(var e=0;e<t.length;e++){var n=t[e];i[n]=t.getPropertyValue(n)}})),i}var ga=function(t){t.querySelectorAll("*").forEach((function(t){var e=pa(t);Object.keys(e).forEach((function(n){var i=e[n];!t.style.getPropertyValue(n)&&i&&t.style.setProperty(n,i)}))}))},_a=function(t){return t.toLocaleString("en").replace(/,/gi," ")};function ma(t){return"".concat(t,"-").concat(Math.random().toString(36).substr(2,9))}var va=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;for(var a in t){var o=t[a];Array.isArray(o)?o.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.svgId_!==e&&n(t,i,r)})):t.svgId_!==e&&n(t,i,r)})):o.svgId_!==e&&n(o,i,r)}};function ya(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}var xa=function(t){var e,n,i;if(!t.startsWith("rgb")&&!t.startsWith("#")){var r=document.createElement("div");r.style.color=t,document.body.appendChild(r);var a=window.getComputedStyle(r).color;document.body.removeChild(r),t=a}if(t.startsWith("#")){var o=t.replace("#","");3===o.length&&(o=o.split("").map((function(t){return t+t})).join("")),e=parseInt(o.substring(0,2),16),n=parseInt(o.substring(2,4),16),i=parseInt(o.substring(4,6),16)}else{var s=t.match(/\d+/g);e=parseInt(s[0]),n=parseInt(s[1]),i=parseInt(s[2])}return e/255*.2126+n/255*.7152+i/255*.0722>.5?"black":"white"},ba=function(t){return t.Geometries.userGeometries?"#em-user-regions path":t.gridCartogram_?"#em-grid-container .em-grid-cell":"WORLD"===t.geo_?"#em-worldrg path":"#em-nutsrg path:not(#em-cntrg-RS):not(#em-cntrg-EL), #em-cntrg path:not(#em-cntrg-RS):not(#em-cntrg-EL)"},wa=function(t){return t.Geometries.userGeometries?"#em-user-regions":t.gridCartogram_?"#em-grid-container":"WORLD"===t.geo_?"#em-worldrg":"#em-nutsrg, #em-cntrg"},Sa=function(t){var e=.5*t.position_.z*t.width_,n=.5*t.position_.z*t.height_;return[t.position_.x-e,t.position_.y-n,t.position_.x+e,t.position_.y+n]};function Ma(t){return Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(t)}function Ea(t){var e=function(t,e){if("object"!=Ma(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Ma(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ma(e)?e:e+""}function ka(t,e,n){return(e=Ea(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ca(t){return"string"==typeof t?new Ft([document.querySelectorAll(t)],[document.documentElement]):new Ft([S(t)],Pt)}var Ta=1e-6,Aa=Math.PI,Pa=Aa/2,Fa=Aa/4,La=2*Aa,Na=180/Aa,Oa=Aa/180,za=Math.abs,Ga=Math.atan,Da=Math.atan2,Ia=Math.cos,Ra=Math.ceil,ja=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Ba=Math.sign||function(t){return t>0?1:t<0?-1:0},qa=Math.sqrt;Math.tan;function Wa(t){return t>1?Pa:t<-1?-Pa:Math.asin(t)}function Ua(){}function Ha(t,e){t&&co.hasOwnProperty(t.type)&&co[t.type](t,e)}var Va,$a,Ya,Ja,Xa,Ka,Za,Qa,to,eo,no,io,ro,ao,oo,so,lo={Feature:function(t,e){Ha(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)Ha(n[i].geometry,e)}},co={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){uo(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)uo(n[i],e,0)},Polygon:function(t,e){ho(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)ho(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)Ha(n[i],e)}};function uo(t,e,n){var i,r=-1,a=t.length-n;for(e.lineStart();++r<a;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function ho(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)uo(t[n],e,1);e.polygonEnd()}function fo(t,e){t&&lo.hasOwnProperty(t.type)?lo[t.type](t,e):Ha(t,e)}var po={sphere:Ua,point:go,lineStart:mo,lineEnd:xo,polygonStart:function(){po.lineStart=bo,po.lineEnd=wo},polygonEnd:function(){po.lineStart=mo,po.lineEnd=xo}};function go(t,e){t*=Oa;var n=Ia(e*=Oa);_o(n*Ia(t),n*ja(t),ja(e))}function _o(t,e,n){++Va,Ya+=(t-Ya)/Va,Ja+=(e-Ja)/Va,Xa+=(n-Xa)/Va}function mo(){po.point=vo}function vo(t,e){t*=Oa;var n=Ia(e*=Oa);ao=n*Ia(t),oo=n*ja(t),so=ja(e),po.point=yo,_o(ao,oo,so)}function yo(t,e){t*=Oa;var n=Ia(e*=Oa),i=n*Ia(t),r=n*ja(t),a=ja(e),o=Da(qa((o=oo*a-so*r)*o+(o=so*i-ao*a)*o+(o=ao*r-oo*i)*o),ao*i+oo*r+so*a);$a+=o,Ka+=o*(ao+(ao=i)),Za+=o*(oo+(oo=r)),Qa+=o*(so+(so=a)),_o(ao,oo,so)}function xo(){po.point=go}function bo(){po.point=So}function wo(){Mo(io,ro),po.point=go}function So(t,e){io=t,ro=e,t*=Oa,e*=Oa,po.point=Mo;var n=Ia(e);ao=n*Ia(t),oo=n*ja(t),so=ja(e),_o(ao,oo,so)}function Mo(t,e){t*=Oa;var n=Ia(e*=Oa),i=n*Ia(t),r=n*ja(t),a=ja(e),o=oo*a-so*r,s=so*i-ao*a,l=ao*r-oo*i,c=qa(o*o+s*s+l*l),u=Wa(c),h=c&&-u/c;to+=h*o,eo+=h*s,no+=h*l,$a+=u,Ka+=u*(ao+(ao=i)),Za+=u*(oo+(oo=r)),Qa+=u*(so+(so=a)),_o(ao,oo,so)}function Eo(t){Va=$a=Ya=Ja=Xa=Ka=Za=Qa=to=eo=no=0,fo(t,po);var e=to,n=eo,i=no,r=e*e+n*n+i*i;return r<1e-12&&(e=Ka,n=Za,i=Qa,$a<Ta&&(e=Ya,n=Ja,i=Xa),(r=e*e+n*n+i*i)<1e-12)?[NaN,NaN]:[Da(n,e)*Na,Wa(i/qa(r))*Na]}function ko(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:Ua,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Co(t,e){return za(t[0]-e[0])<Ta&&za(t[1]-e[1])<Ta}function To(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Ao(t,e,n,i,r){var a,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],o=t[e];if(Co(i,o)){if(!i[2]&&!o[2]){for(r.lineStart(),a=0;a<e;++a)r.point((i=t[a])[0],i[1]);return void r.lineEnd()}o[0]+=2e-6}s.push(n=new To(i,t,null,!0)),l.push(n.o=new To(i,null,n,!1)),s.push(n=new To(o,t,null,!1)),l.push(n.o=new To(o,null,n,!0))}})),s.length){for(l.sort(e),Po(s),Po(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;c=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=c.length;a<o;++a)r.point((u=c[a])[0],u[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;a>=0;--a)r.point((u=c[a])[0],u[1]);else i(f.x,f.p.x,-1,r);f=f.p}c=(f=f.o).z,d=!d}while(!f.v);r.lineEnd()}}}function Po(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}var Fo=1e9,Lo=-Fo;function No(t,e,n,i){function r(r,a){return t<=r&&r<=n&&e<=a&&a<=i}function a(r,a,s,c){var u=0,h=0;if(null==r||(u=o(r,s))!==(h=o(a,s))||l(r,a)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?i:e)}while((u=(u+s+4)%4)!==h);else c.point(a[0],a[1])}function o(i,r){return za(i[0]-t)<Ta?r>0?0:3:za(i[0]-n)<Ta?r>0?2:1:za(i[1]-e)<Ta?r>0?1:0:r>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),i=o(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,f,d,p,g,_,m,v,y=o,x=ko(),b={point:w,lineStart:function(){b.point=S,c&&c.push(u=[]);m=!0,_=!1,p=g=NaN},lineEnd:function(){l&&(S(h,f),d&&_&&x.rejoin(),l.push(x.result()));b.point=w,_&&y.lineEnd()},polygonStart:function(){y=x,l=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=c.length;n<r;++n)for(var a,o,s=c[n],l=1,u=s.length,h=s[0],f=h[0],d=h[1];l<u;++l)a=f,o=d,f=(h=s[l])[0],d=h[1],o<=i?d>i&&(f-a)*(i-o)>(d-o)*(t-a)&&++e:d<=i&&(f-a)*(i-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,r=(l=jt(l)).length;(n||r)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),r&&Ao(l,s,e,a,o),o.polygonEnd());y=o,l=c=u=null}};function w(t,e){r(t,e)&&y.point(t,e)}function S(a,o){var s=r(a,o);if(c&&u.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(y.lineStart(),y.point(a,o));else if(s&&_)y.point(a,o);else{var l=[p=Math.max(Lo,Math.min(Fo,p)),g=Math.max(Lo,Math.min(Fo,g))],x=[a=Math.max(Lo,Math.min(Fo,a)),o=Math.max(Lo,Math.min(Fo,o))];!function(t,e,n,i,r,a){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,f=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=i-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<u&&(u=o)}else if(f>0){if(o>u)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*f),u<1&&(e[0]=s+u*h,e[1]=l+u*f),!0}}}}}(l,x,t,e,n,i)?s&&(y.lineStart(),y.point(a,o),v=!1):(_||(y.lineStart(),y.point(l[0],l[1])),y.point(x[0],x[1]),s||y.lineEnd(),v=!1)}p=a,g=o,_=s}return b}}function Oo(t){return t}function zo(t){return function(e){var n=new Go;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Go(){}Go.prototype={constructor:Go,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 Do=1/0,Io=Do,Ro=-Do,jo=Ro,Bo={point:function(t,e){t<Do&&(Do=t);t>Ro&&(Ro=t);e<Io&&(Io=e);e>jo&&(jo=e)},lineStart:Ua,lineEnd:Ua,polygonStart:Ua,polygonEnd:Ua,result:function(){var t=[[Do,Io],[Ro,jo]];return Ro=jo=-(Io=Do=1/0),t}};const qo=Bo;function Wo(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),fo(n,t.stream(qo)),e(qo.result()),null!=i&&t.clipExtent(i),t}function Uo(t,e,n){return Wo(t,(function(n){var i=e[1][0]-e[0][0],r=e[1][1]-e[0][1],a=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),o=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Ho(t,e,n){return Uo(t,[[0,0],e],n)}function Vo(t,e,n){return Wo(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),a=(i-r*(n[1][0]+n[0][0]))/2,o=-r*n[0][1];t.scale(150*r).translate([a,o])}),n)}function $o(t,e,n){return Wo(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),a=-r*n[0][0],o=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,o])}),n)}function Yo(){return new Jo}function Jo(){this.reset()}Jo.prototype={constructor:Jo,reset:function(){this.s=this.t=0},add:function(t){Ko(Xo,t,this.t),Ko(this,Xo.s,this.s),this.s?this.t+=Xo.t:this.s=Xo.t},valueOf:function(){return this.s}};var Xo=new Jo;function Ko(t,e,n){var i=t.s=e+n,r=i-e,a=i-r;t.t=e-a+(n-r)}var Zo,Qo,ts,es,ns=Yo(),is=Yo(),rs={point:Ua,lineStart:Ua,lineEnd:Ua,polygonStart:function(){rs.lineStart=as,rs.lineEnd=ls},polygonEnd:function(){rs.lineStart=rs.lineEnd=rs.point=Ua,ns.add(za(is)),is.reset()},result:function(){var t=ns/2;return ns.reset(),t}};function as(){rs.point=os}function os(t,e){rs.point=ss,Zo=ts=t,Qo=es=e}function ss(t,e){is.add(es*t-ts*e),ts=t,es=e}function ls(){ss(Zo,Qo)}const cs=rs;var us,hs,fs,ds,ps=0,gs=0,_s=0,ms=0,vs=0,ys=0,xs=0,bs=0,ws=0,Ss={point:Ms,lineStart:Es,lineEnd:Ts,polygonStart:function(){Ss.lineStart=As,Ss.lineEnd=Ps},polygonEnd:function(){Ss.point=Ms,Ss.lineStart=Es,Ss.lineEnd=Ts},result:function(){var t=ws?[xs/ws,bs/ws]:ys?[ms/ys,vs/ys]:_s?[ps/_s,gs/_s]:[NaN,NaN];return ps=gs=_s=ms=vs=ys=xs=bs=ws=0,t}};function Ms(t,e){ps+=t,gs+=e,++_s}function Es(){Ss.point=ks}function ks(t,e){Ss.point=Cs,Ms(fs=t,ds=e)}function Cs(t,e){var n=t-fs,i=e-ds,r=qa(n*n+i*i);ms+=r*(fs+t)/2,vs+=r*(ds+e)/2,ys+=r,Ms(fs=t,ds=e)}function Ts(){Ss.point=Ms}function As(){Ss.point=Fs}function Ps(){Ls(us,hs)}function Fs(t,e){Ss.point=Ls,Ms(us=fs=t,hs=ds=e)}function Ls(t,e){var n=t-fs,i=e-ds,r=qa(n*n+i*i);ms+=r*(fs+t)/2,vs+=r*(ds+e)/2,ys+=r,xs+=(r=ds*t-fs*e)*(fs+t),bs+=r*(ds+e),ws+=3*r,Ms(fs=t,ds=e)}const Ns=Ss;function Os(t){this._context=t}Os.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,La)}},result:Ua};var zs,Gs,Ds,Is,Rs,js=Yo(),Bs={point:Ua,lineStart:function(){Bs.point=qs},lineEnd:function(){zs&&Ws(Gs,Ds),Bs.point=Ua},polygonStart:function(){zs=!0},polygonEnd:function(){zs=null},result:function(){var t=+js;return js.reset(),t}};function qs(t,e){Bs.point=Ws,Gs=Is=t,Ds=Rs=e}function Ws(t,e){Is-=t,Rs-=e,js.add(qa(Is*Is+Rs*Rs)),Is=t,Rs=e}const Us=Bs;function Hs(){this._string=[]}function Vs(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function $s(t,e){var n,i,r=4.5;function a(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),fo(t,n(i))),i.result()}return a.area=function(t){return fo(t,n(cs)),cs.result()},a.measure=function(t){return fo(t,n(Us)),Us.result()},a.bounds=function(t){return fo(t,n(qo)),qo.result()},a.centroid=function(t){return fo(t,n(Ns)),Ns.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Oo):(t=e).stream,a):t},a.context=function(t){return arguments.length?(i=null==t?(e=null,new Hs):new Os(e=t),"function"!=typeof r&&i.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(i.pointRadius(+t),+t),a):r},a.projection(t).context(e)}function Ys(t){return[Da(t[1],t[0]),Wa(t[2])]}function Js(t){var e=t[0],n=t[1],i=Ia(n);return[i*Ia(e),i*ja(e),ja(n)]}function Xs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ks(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 Zs(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Qs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function tl(t){var e=qa(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}Hs.prototype={_radius:4.5,_circle:Vs(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=Vs(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 el=Yo();function nl(t){return za(t[0])<=Aa?t[0]:Ba(t[0])*((za(t[0])+Aa)%La-Aa)}function il(t,e,n,i){return function(r){var a,o,s,l=e(r),c=ko(),u=e(c),h=!1,f={point:d,lineStart:g,lineEnd:_,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=y,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=_,o=jt(o);var t=function(t,e){var n=nl(e),i=e[1],r=ja(i),a=[ja(n),-Ia(n),0],o=0,s=0;el.reset(),1===r?i=Pa+Ta:-1===r&&(i=-Pa-Ta);for(var l=0,c=t.length;l<c;++l)if(h=(u=t[l]).length)for(var u,h,f=u[h-1],d=nl(f),p=f[1]/2+Fa,g=ja(p),_=Ia(p),m=0;m<h;++m,d=y,g=b,_=w,f=v){var v=u[m],y=nl(v),x=v[1]/2+Fa,b=ja(x),w=Ia(x),S=y-d,M=S>=0?1:-1,E=M*S,k=E>Aa,C=g*b;if(el.add(Da(C*M*ja(E),_*w+C*Ia(E))),o+=k?S+M*La:S,k^d>=n^y>=n){var T=Ks(Js(f),Js(v));tl(T);var A=Ks(a,T);tl(A);var P=(k^S>=0?-1:1)*Wa(A[2]);(i>P||i===P&&(T[0]||T[1]))&&(s+=k^S>=0?1:-1)}}return(o<-1e-6||o<Ta&&el<-1e-6)^1&s}(a,i);o.length?(h||(r.polygonStart(),h=!0),Ao(o,al,t,n,r)):t&&(h||(r.polygonStart(),h=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),h&&(r.polygonEnd(),h=!1),o=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function d(e,n){t(e,n)&&r.point(e,n)}function p(t,e){l.point(t,e)}function g(){f.point=p,l.lineStart()}function _(){f.point=d,l.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function y(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,i,l=u.clean(),f=c.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&l){if((e=(n=f[0]).length-1)>0){for(h||(r.polygonStart(),h=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else d>1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(rl))}return f}}function rl(t){return t.length>1}function al(t,e){return((t=t.x)[0]<0?t[1]-Pa-Ta:Pa-t[1])-((e=e.x)[0]<0?e[1]-Pa-Ta:Pa-e[1])}const ol=il((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Aa:-Aa,l=za(a-n);za(l-Aa)<Ta?(t.point(n,i=(i+o)/2>0?Pa:-Pa),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(a,i),e=0):r!==s&&l>=Aa&&(za(n-r)<Ta&&(n-=r*Ta),za(a-s)<Ta&&(a-=s*Ta),i=function(t,e,n,i){var r,a,o=ja(t-n);return za(o)>Ta?Ga((ja(e)*(a=Ia(i))*ja(n)-ja(i)*(r=Ia(e))*ja(t))/(r*a*o)):(e+i)/2}(n,i,a,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=a,i=o),r=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*Pa,i.point(-Aa,r),i.point(0,r),i.point(Aa,r),i.point(Aa,0),i.point(Aa,-r),i.point(0,-r),i.point(-Aa,-r),i.point(-Aa,0),i.point(-Aa,r);else if(za(t[0]-e[0])>Ta){var a=t[0]<e[0]?Aa:-Aa;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}),[-Aa,-Pa]);function sl(t,e,n,i,r,a){if(n){var o=Ia(e),s=ja(e),l=i*n;null==r?(r=e+i*La,a=e-l/2):(r=ll(o,r),a=ll(o,a),(i>0?r<a:r>a)&&(r+=i*La));for(var c,u=r;i>0?u>a:u<a;u-=l)c=Ys([o,-s*Ia(u),-s*ja(u)]),t.point(c[0],c[1])}}function ll(t,e){(e=Js(e))[0]-=t,tl(e);var n=function(t){return t>1?0:t<-1?Aa:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+La-Ta)%La}function cl(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function ul(t,e){return[za(t)>Aa?t+Math.round(-t/La)*La:t,e]}function hl(t,e,n){return(t%=La)?e||n?cl(dl(t),pl(e,n)):dl(t):e||n?pl(e,n):ul}function fl(t){return function(e,n){return[(e+=t)>Aa?e-La:e<-Aa?e+La:e,n]}}function dl(t){var e=fl(t);return e.invert=fl(-t),e}function pl(t,e){var n=Ia(t),i=ja(t),r=Ia(e),a=ja(e);function o(t,e){var o=Ia(e),s=Ia(t)*o,l=ja(t)*o,c=ja(e),u=c*n+s*i;return[Da(l*r-u*a,s*n-c*i),Wa(u*r+l*a)]}return o.invert=function(t,e){var o=Ia(e),s=Ia(t)*o,l=ja(t)*o,c=ja(e),u=c*r-l*a;return[Da(l*r+c*a,s*n+u*i),Wa(u*n-s*i)]},o}ul.invert=ul;var gl=Ia(30*Oa);function _l(t,e){return+e?function(t,e){function n(i,r,a,o,s,l,c,u,h,f,d,p,g,_){var m=c-i,v=u-r,y=m*m+v*v;if(y>4*e&&g--){var x=o+f,b=s+d,w=l+p,S=qa(x*x+b*b+w*w),M=Wa(w/=S),E=za(za(w)-1)<Ta||za(a-h)<Ta?(a+h)/2:Da(b,x),k=t(E,M),C=k[0],T=k[1],A=C-i,P=T-r,F=v*A-m*P;(F*F/y>e||za((m*A+v*P)/y-.5)>.3||o*f+s*d+l*p<gl)&&(n(i,r,a,o,s,l,C,T,E,x/=S,b/=S,w,g,_),_.point(C,T),n(C,T,E,x,b,w,c,u,h,f,d,p,g,_))}}return function(e){var i,r,a,o,s,l,c,u,h,f,d,p,g={point:_,lineStart:m,lineEnd:y,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function _(n,i){n=t(n,i),e.point(n[0],n[1])}function m(){u=NaN,g.point=v,e.lineStart()}function v(i,r){var a=Js([i,r]),o=t(i,r);n(u,h,c,f,d,p,u=o[0],h=o[1],c=i,f=a[0],d=a[1],p=a[2],16,e),e.point(u,h)}function y(){g.point=_,e.lineEnd()}function x(){m(),g.point=b,g.lineEnd=w}function b(t,e){v(i=t,e),r=u,a=h,o=f,s=d,l=p,g.point=v}function w(){n(u,h,c,f,d,p,r,a,i,o,s,l,16,e),g.lineEnd=y,y()}return g}}(t,e):function(t){return zo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var ml=zo({point:function(t,e){this.stream.point(t*Oa,e*Oa)}});function vl(t,e,n,i,r){function a(a,o){return[e+t*(a*=i),n-t*(o*=r)]}return a.invert=function(a,o){return[(a-e)/t*i,(n-o)/t*r]},a}function yl(t,e,n,i,r,a){var o=Ia(a),s=ja(a),l=o*t,c=s*t,u=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[l*(t*=i)-c*(a*=r)+e,n-c*t-l*a]}return p.invert=function(t,e){return[i*(u*t-h*e+f),r*(d-h*t-u*e)]},p}function xl(t){return function(t){var e,n,i,r,a,o,s,l,c,u,h=150,f=480,d=250,p=0,g=0,_=0,m=0,v=0,y=0,x=1,b=1,w=null,S=ol,M=null,E=Oo,k=.5;function C(t){return l(t[0]*Oa,t[1]*Oa)}function T(t){return(t=l.invert(t[0],t[1]))&&[t[0]*Na,t[1]*Na]}function A(){var t=yl(h,0,0,x,b,y).apply(null,e(p,g)),i=(y?yl:vl)(h,f-t[0],d-t[1],x,b,y);return n=hl(_,m,v),s=cl(e,i),l=cl(n,s),o=_l(s,k),P()}function P(){return c=u=null,C}return C.stream=function(t){return c&&u===t?c:c=ml(function(t){return zo({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(S(o(E(u=t)))))},C.preclip=function(t){return arguments.length?(S=t,w=void 0,P()):S},C.postclip=function(t){return arguments.length?(E=t,M=i=r=a=null,P()):E},C.clipAngle=function(t){return arguments.length?(S=+t?function(t){var e=Ia(t),n=6*Oa,i=e>0,r=za(e)>Ta;function a(t,n){return Ia(t)*Ia(n)>e}function o(t,n,i){var r=[1,0,0],a=Ks(Js(t),Js(n)),o=Xs(a,a),s=a[0],l=o-s*s;if(!l)return!i&&t;var c=e*o/l,u=-e*s/l,h=Ks(r,a),f=Qs(r,c);Zs(f,Qs(a,u));var d=h,p=Xs(f,d),g=Xs(d,d),_=p*p-g*(Xs(f,f)-1);if(!(_<0)){var m=qa(_),v=Qs(d,(-p-m)/g);if(Zs(v,f),v=Ys(v),!i)return v;var y,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(y=x,x=b,b=y);var M=b-x,E=za(M-Aa)<Ta;if(!E&&S<w&&(y=w,w=S,S=y),E||M<Ta?E?w+S>0^v[1]<(za(v[0]-x)<Ta?w:S):w<=v[1]&&v[1]<=S:M>Aa^(x<=v[0]&&v[0]<=b)){var k=Qs(d,(-p+m)/g);return Zs(k,f),[v,Ys(k)]}}}function s(e,n){var r=i?t:Aa-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return il(a,(function(t){var e,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,f){var d,p=[h,f],g=a(h,f),_=i?g?0:s(h,f):g?s(h+(h<0?Aa:-Aa),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(d=o(e,p))||Co(e,d)||Co(p,d))&&(p[2]=1),g!==l)u=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(r&&e&&i^g){var m;_&n||!(m=o(p,e,!0))||(u=0,i?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Co(e,p)||t.point(p[0],p[1]),e=p,l=g,n=_},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),(function(e,i,r,a){sl(a,t,n,r,e,i)}),i?[0,-t]:[-Aa,t-Aa])}(w=t*Oa):(w=null,ol),P()):w*Na},C.clipExtent=function(t){return arguments.length?(E=null==t?(M=i=r=a=null,Oo):No(M=+t[0][0],i=+t[0][1],r=+t[1][0],a=+t[1][1]),P()):null==M?null:[[M,i],[r,a]]},C.scale=function(t){return arguments.length?(h=+t,A()):h},C.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],A()):[f,d]},C.center=function(t){return arguments.length?(p=t[0]%360*Oa,g=t[1]%360*Oa,A()):[p*Na,g*Na]},C.rotate=function(t){return arguments.length?(_=t[0]%360*Oa,m=t[1]%360*Oa,v=t.length>2?t[2]%360*Oa:0,A()):[_*Na,m*Na,v*Na]},C.angle=function(t){return arguments.length?(y=t%360*Oa,A()):y*Na},C.reflectX=function(t){return arguments.length?(x=t?-1:1,A()):x<0},C.reflectY=function(t){return arguments.length?(b=t?-1:1,A()):b<0},C.precision=function(t){return arguments.length?(o=_l(s,k=t*t),P()):qa(k)},C.fitExtent=function(t,e){return Uo(C,t,e)},C.fitSize=function(t,e){return Ho(C,t,e)},C.fitWidth=function(t,e){return Vo(C,t,e)},C.fitHeight=function(t,e){return $o(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&T,A()}}((function(){return t}))()}var bl=Math.abs,wl=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),Sl=(Math.log,Math.max),Ml=Math.min,El=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),kl=El/2,Cl=(Math.SQRT1_2,Al(2),Al(El),180/El),Tl=El/180;function Al(t){return t>0?Math.sqrt(t):0}var Pl=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function Fl(t,e){var n,i=Ml(18,36*bl(e)/El),r=wl(i),a=i-r,o=(n=Pl[r])[0],s=n[1],l=(n=Pl[++r])[0],c=n[1],u=(n=Pl[Ml(19,++r)])[0],h=n[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?kl:-kl)*(c+a*(h-s)/2+a*a*(h-2*c+s)/2)]}Pl.forEach((function(t){t[1]*=1.0144})),Fl.invert=function(t,e){var n=e/kl,i=90*n,r=Ml(18,bl(i/5)),a=Sl(0,wl(r));do{var o=Pl[a][1],s=Pl[a+1][1],l=Pl[Ml(19,a+2)][1],c=l-o,u=l-2*s+o,h=2*(bl(n)-s)/c,f=u/c,d=h*(1-f*h*(1-2*f*h));if(d>=0||1===a){i=(e>=0?5:-5)*(d+r);var p,g=50;do{d=(r=Ml(18,bl(i)/5))-(a=wl(r)),o=Pl[a][1],s=Pl[a+1][1],l=Pl[Ml(19,a+2)][1],i-=(p=(e>=0?kl:-kl)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*Cl}while(bl(p)>1e-12&&--g>0);break}}while(--a>=0);var _=Pl[a][0],m=Pl[a+1][0],v=Pl[Ml(19,a+2)][0];return[t/(m+d*(v-_)/2+d*d*(v-2*m+_)/2),i*Tl]};var Ll="http://www.w3.org/1999/xhtml";const Nl={svg:"http://www.w3.org/2000/svg",xhtml:Ll,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ol(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Nl.hasOwnProperty(e)?{space:Nl[e],local:t}:t}function zl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ll&&e.documentElement.namespaceURI===Ll?e.createElement(t):e.createElementNS(n,t)}}function Gl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dl(t){var e=Ol(t);return(e.local?Gl:zl)(e)}function Il(){}function Rl(t){return null==t?Il:function(){return this.querySelector(t)}}function jl(){return[]}function Bl(t){return new Array(t.length)}function ql(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ql.prototype={constructor:ql,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Wl(t,e,n,i,r,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new ql(t,a[s]);for(;s<l;++s)(o=e[s])&&(r[s]=o)}function Ul(t,e,n,i,r,a,o){var s,l,c,u={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(d[s]=c="$"+o.call(l,l.__data__,s,e),c in u?r[s]=l:u[c]=l);for(s=0;s<f;++s)(l=u[c="$"+o.call(t,a[s],s,a)])?(i[s]=l,l.__data__=a[s],u[c]=null):n[s]=new ql(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&u[d[s]]===l&&(r[s]=l)}function Hl(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Vl(t){return function(){this.removeAttribute(t)}}function $l(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yl(t,e){return function(){this.setAttribute(t,e)}}function Jl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Kl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Zl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ql(t){return function(){this.style.removeProperty(t)}}function tc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ec(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function nc(t){return function(){delete this[t]}}function ic(t,e){return function(){this[t]=e}}function rc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ac(t){return t.trim().split(/^|\s+/)}function oc(t){return t.classList||new sc(t)}function sc(t){this._node=t,this._names=ac(t.getAttribute("class")||"")}function lc(t,e){for(var n=oc(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function cc(t,e){for(var n=oc(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function uc(t){return function(){lc(this,t)}}function hc(t){return function(){cc(this,t)}}function fc(t,e){return function(){(e.apply(this,arguments)?lc:cc)(this,t)}}function dc(){this.textContent=""}function pc(t){return function(){this.textContent=t}}function gc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function _c(){this.innerHTML=""}function mc(t){return function(){this.innerHTML=t}}function vc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function yc(){this.nextSibling&&this.parentNode.appendChild(this)}function xc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bc(){return null}function wc(){var t=this.parentNode;t&&t.removeChild(this)}function Sc(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Mc(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}sc.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ec={},kc=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ec={mouseenter:"mouseover",mouseleave:"mouseout"}));function Cc(t,e,n){return t=Tc(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Tc(t,e,n){return function(i){var r=kc;kc=i;try{t.call(this,this.__data__,e,n)}finally{kc=r}}}function Ac(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.capture);++r?e.length=r:delete this.__on}}}function Pc(t,e,n){var i=Ec.hasOwnProperty(t.type)?Cc:Tc;return function(r,a,o){var s,l=this.__on,c=i(e,a,o);if(l)for(var u=0,h=l.length;u<h;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(s):this.__on=[s]}}function Fc(t,e,n,i){var r=kc;t.sourceEvent=kc,kc=t;try{return e.apply(n,i)}finally{kc=r}}function Lc(t,e,n){var i=Zl(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function Nc(t,e){return function(){return Lc(this,t,e)}}function Oc(t,e){return function(){return Lc(this,t,e.apply(this,arguments))}}var zc=[null];function Gc(t,e){this._groups=t,this._parents=e}function Dc(){return new Gc([[document.documentElement]],zc)}Gc.prototype=Dc.prototype={constructor:Gc,select:function(t){"function"!=typeof t&&(t=Rl(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o,s=e[r],l=s.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new Gc(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?jl:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(i.push(t.call(o,o.__data__,c,s)),r.push(o));return new Gc(i,r)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,l=i[r]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Gc(i,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?Ul:Wl,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],f=h.length,d=t.call(u,u&&u.__data__,c,i),p=d.length,g=s[c]=new Array(p),_=o[c]=new Array(p);n(u,h,g,_,l[c]=new Array(f),d,e);for(var m,v,y=0,x=0;y<p;++y)if(m=g[y]){for(y>=x&&(x=y+1);!(v=_[x])&&++x<p;);m._next=v||null}}return(o=new Gc(o,i))._enter=s,o._exit=l,o},enter:function(){return new Gc(this._enter||this._groups.map(Bl),this._parents)},exit:function(){return new Gc(this._exit||this._groups.map(Bl),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,a=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(r=e(r)),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var l,c=e[s],u=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(l=c[d]||u[d])&&(f[d]=l);for(;s<i;++s)o[s]=e[s];return new Gc(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Hl);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var o,s=n[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new Gc(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=Ol(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?$l:Vl:"function"==typeof e?n.local?Kl:Xl:n.local?Jl:Yl)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ql:"function"==typeof e?ec:tc)(t,e,null==n?"":n)):function(t,e){return t.style.getPropertyValue(e)||Zl(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?nc:"function"==typeof e?rc:ic)(t,e)):this.node()[t]},classed:function(t,e){var n=ac(t+"");if(arguments.length<2){for(var i=oc(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?fc:e?uc:hc)(n,e))},text:function(t){return arguments.length?this.each(null==t?dc:("function"==typeof t?gc:pc)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?_c:("function"==typeof t?vc:mc)(t)):this.node().innerHTML},raise:function(){return this.each(yc)},lower:function(){return this.each(xc)},append:function(t){var e="function"==typeof t?t:Dl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Dl(t),i=null==e?bc:"function"==typeof e?e:Rl(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(wc)},clone:function(t){return this.select(t?Mc:Sc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Pc:Ac,null==n&&(n=!1),i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<o;++i)if((r=a[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Oc:Nc)(t,e))}};function Ic(t){return"string"==typeof t?new Gc([[document.querySelector(t)]],[document.documentElement]):new Gc([[t]],zc)}var Rc=0;function jc(){this._="@"+(++Rc).toString(36)}function Bc(){for(var t,e=kc;t=e.sourceEvent;)e=t;return e}function qc(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}function Wc(t){var e=Bc();return e.changedTouches&&(e=e.changedTouches[0]),qc(t,e)}function Uc(t,e,n){arguments.length<3&&(n=e,e=Bc().changedTouches);for(var i,r=0,a=e?e.length:0;r<a;++r)if((i=e[r]).identifier===n)return qc(t,i);return null}jc.prototype=function(){return new jc}.prototype={constructor:jc,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 Hc={value:function(){}};function Vc(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new $c(i)}function $c(t){this._=t}function Yc(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Jc(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Hc,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}$c.prototype=Vc.prototype={constructor:$c,on:function(t,e){var n,i,r=this._,a=(i=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)r[n]=Jc(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Jc(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=Yc(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new $c(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};const Xc=Vc;function Kc(){kc.stopImmediatePropagation()}function Zc(){kc.preventDefault(),kc.stopImmediatePropagation()}function Qc(t){return function(){return t}}function tu(t,e,n,i,r,a,o,s,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=i,this.active=r,this.x=a,this.y=o,this.dx=s,this.dy=l,this._=c}function eu(){return!kc.button}function nu(){return this.parentNode}function iu(t){return null==t?{x:kc.x,y:kc.y}:t}function ru(){return"ontouchstart"in this}function au(){var t,e,n,i,r=eu,a=nu,o=iu,s=ru,l={},c=Xc("start","drag","end"),u=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",_).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!i&&r.apply(this,arguments)){var o=y("mouse",a.apply(this,arguments),Wc,this,arguments);o&&(Ic(kc.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),function(t){var e=t.document.documentElement,n=Ic(t).on("dragstart.drag",Zc,!0);"onselectstart"in e?n.on("selectstart.drag",Zc,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(kc.view),Kc(),n=!1,t=kc.clientX,e=kc.clientY,o("start"))}}function p(){if(Zc(),!n){var i=kc.clientX-t,r=kc.clientY-e;n=i*i+r*r>h}l.mouse("drag")}function g(){Ic(kc.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,i=Ic(t).on("dragstart.drag",null);e&&(i.on("click.drag",Zc,!0),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(kc.view,n),Zc(),l.mouse("end")}function _(){if(r.apply(this,arguments)){var t,e,n=kc.changedTouches,i=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=y(n[t].identifier,i,Uc,this,arguments))&&(Kc(),e("start"))}}function m(){var t,e,n=kc.changedTouches,i=n.length;for(t=0;t<i;++t)(e=l[n[t].identifier])&&(Zc(),e("drag"))}function v(){var t,e,n=kc.changedTouches,r=n.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<r;++t)(e=l[n[t].identifier])&&(Kc(),e("end"))}function y(t,e,n,i,r){var a,s,h,d=n(e,t),p=c.copy();if(Fc(new tu(f,"beforestart",a,t,u,d[0],d[1],0,0,p),(function(){return null!=(kc.subject=a=o.apply(i,r))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(c){var g,_=d;switch(c){case"start":l[t]=o,g=u++;break;case"end":delete l[t],--u;case"drag":d=n(e,t),g=u}Fc(new tu(f,c,a,t,g,d[0]+s,d[1]+h,d[0]-_[0],d[1]-_[1],p),p.apply,p,[c,i,r])}}return f.filter=function(t){return arguments.length?(r="function"==typeof t?t:Qc(!!t),f):r},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Qc(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Qc(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Qc(!!t),f):s},f.on=function(){var t=c.on.apply(c,arguments);return t===c?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}tu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ou=Math.PI,su=2*ou,lu=1e-6,cu=su-lu;function uu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hu(){return new uu}uu.prototype=hu.prototype={constructor:uu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var a=this._x1,o=this._y1,s=n-t,l=i-e,c=a-t,u=o-e,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>lu)if(Math.abs(u*s-l*c)>lu&&r){var f=n-a,d=i-o,p=s*s+l*l,g=f*f+d*d,_=Math.sqrt(p),m=Math.sqrt(h),v=r*Math.tan((ou-Math.acos((p+h-g)/(2*_*m)))/2),y=v/m,x=v/_;Math.abs(y-1)>lu&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+r+","+r+",0,0,"+ +(u*f>c*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(i),s=n*Math.sin(i),l=t+o,c=e+s,u=1^a,h=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>lu||Math.abs(this._y1-c)>lu)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%su+su),h>cu?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>lu&&(this._+="A"+n+","+n+",0,"+ +(h>=ou)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};const fu=hu;function du(t){return function(){return t}}var pu=1e-12,gu=Math.PI,_u=gu/2,mu=2*gu;function vu(t){return t.innerRadius}function yu(t){return t.outerRadius}function xu(t){return t.startAngle}function bu(t){return t.endAngle}function wu(t){return t&&t.padAngle}function Su(t){return t>=1?_u:t<=-1?-_u:Math.asin(t)}function Mu(t,e,n,i,r,a,o){var s=t-n,l=e-i,c=(o?a:-a)/Math.sqrt(s*s+l*l),u=c*l,h=-c*s,f=t+u,d=e+h,p=n+u,g=i+h,_=(f+p)/2,m=(d+g)/2,v=p-f,y=g-d,x=v*v+y*y,b=r-a,w=f*g-p*d,S=(y<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),M=(w*y-v*S)/x,E=(-w*v-y*S)/x,k=(w*y+v*S)/x,C=(-w*v+y*S)/x,T=M-_,A=E-m,P=k-_,F=C-m;return T*T+A*A>P*P+F*F&&(M=k,E=C),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function Eu(t){this._context=t}function ku(t){return new Eu(t)}function Cu(t){return t[0]}function Tu(t){return t[1]}Eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,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:this._context.lineTo(t,e)}}};!function(t){function e(e){return new Au(t(e))}e._curve=t}(ku);function Au(t){this._curve=t}Au.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))}};Math.sqrt(1/3);var Pu=Math.sin(gu/10)/Math.sin(7*gu/10);Math.sin(mu/10),Math.cos(mu/10);Math.sqrt(3);Math.sqrt(3),Math.sqrt(12);function Fu(){}function Lu(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 Nu(t){this._context=t}function Ou(t){this._context=t}function zu(t){this._context=t}function Gu(t,e){this._basis=new Nu(t),this._beta=e}Nu.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:Lu(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:Lu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ou.prototype={areaStart:Fu,areaEnd:Fu,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:Lu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},zu.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,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Lu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gu.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 i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new Nu(t):new Gu(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Du(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 Iu(t,e){this._context=t,this._k=(1-e)/6}Iu.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:Du(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:Du(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}};(function t(e){function n(t){return new Iu(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ru(t,e){this._context=t,this._k=(1-e)/6}Ru.prototype={areaStart:Fu,areaEnd:Fu,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:Du(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}};(function t(e){function n(t){return new Ru(t,e)}return n.tension=function(e){return t(+e)},n})(0);function ju(t,e){this._context=t,this._k=(1-e)/6}ju.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:Du(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}};(function t(e){function n(t){return new ju(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Bu(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>pu){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>pu){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function qu(t,e){this._context=t,this._alpha=e}qu.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Bu(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}};const Wu=function t(e){function n(t){return e?new qu(t,e):new Iu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Uu(t,e){this._context=t,this._alpha=e}Uu.prototype={areaStart:Fu,areaEnd:Fu,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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Bu(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}};(function t(e){function n(t){return e?new Uu(t,e):new Ru(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Hu(t,e){this._context=t,this._alpha=e}Hu.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Bu(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}};(function t(e){function n(t){return e?new Hu(t,e):new ju(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Vu(t){this._context=t}function $u(t){return t<0?-1:1}function Yu(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return($u(a)+$u(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ju(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Xu(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function Ku(t){this._context=t}function Zu(t){this._context=new Qu(t)}function Qu(t){this._context=t}function th(t){this._context=t}function eh(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}function nh(t,e){this._context=t,this._t=e}Vu.prototype={areaStart:Fu,areaEnd:Fu,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))}},Ku.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xu(this,this._t0,Ju(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){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,Xu(this,Ju(this,n=Yu(this,t,e)),n);break;default:Xu(this,this._t0,n=Yu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Zu.prototype=Object.create(Ku.prototype)).point=function(t,e){Ku.prototype.point.call(this,e,t)},Qu.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}},th.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=eh(t),r=eh(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=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}};Array.prototype.slice;var ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rh=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ah=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),oh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},sh=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0},lh=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},ch=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},uh=function(){function t(e){var n=e.x,i=void 0===n?0:n,r=e.y,a=void 0===r?0:r,o=e.nx,s=e.ny,l=e.dy,c=void 0===l?0:l,u=e.dx,h=void 0===u?0:u,f=e.color,d=void 0===f?"grey":f,p=e.data,g=e.type,_=e.subject,m=e.connector,v=e.note,y=e.disable,x=e.id,b=e.className;rh(this,t),this._dx=void 0!==o?o-i:h,this._dy=void 0!==s?s-a:c,this._x=i,this._y=a,this._color=d,this.id=x,this._className=b||"",this._type=g||"",this.data=p,this.note=v||{},this.connector=m||{},this.subject=_||{},this.disable=y||[]}return ah(t,[{key:"updatePosition",value:function(){this.type.setPosition&&(this.type.setPosition(),this.type.subject&&0!==this.type.subject.selectAll(":not(.handle)").nodes().length&&this.type.redrawSubject())}},{key:"clearComponents",value:function(){this.type.clearComponents&&this.type.clearComponents()}},{key:"updateOffset",value:function(){this.type.setOffset&&(this.type.setOffset(),0!==this.type.connector.selectAll(":not(.handle)").nodes().length&&this.type.redrawConnector(),this.type.redrawNote())}},{key:"className",get:function(){return this._className},set:function(t){this._className=t,this.type.setClassName&&this.type.setClassName()}},{key:"type",get:function(){return this._type},set:function(t){this._type=t,this.clearComponents()}},{key:"x",get:function(){return this._x},set:function(t){this._x=t,this.updatePosition()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this.updatePosition()}},{key:"color",get:function(){return this._color},set:function(t){this._color=t,this.updatePosition()}},{key:"dx",get:function(){return this._dx},set:function(t){this._dx=t,this.updateOffset()}},{key:"dy",get:function(){return this._dy},set:function(t){this._dy=t,this.updateOffset()}},{key:"nx",set:function(t){this._dx=t-this._x,this.updateOffset()}},{key:"ny",set:function(t){this._dy=t-this._y,this.updateOffset()}},{key:"offset",get:function(){return{x:this._dx,y:this._dy}},set:function(t){var e=t.x,n=t.y;this._dx=e,this._dy=n,this.updateOffset()}},{key:"position",get:function(){return{x:this._x,y:this._y}},set:function(t){var e=t.x,n=t.y;this._x=e,this._y=n,this.updatePosition()}},{key:"translation",get:function(){return{x:this._x+this._dx,y:this._y+this._dy}}},{key:"json",get:function(){var t={x:this._x,y:this._y,dx:this._dx,dy:this._dy};return this.data&&Object.keys(this.data).length>0&&(t.data=this.data),this.type&&(t.type=this.type),this._className&&(t.className=this._className),Object.keys(this.connector).length>0&&(t.connector=this.connector),Object.keys(this.subject).length>0&&(t.subject=this.subject),Object.keys(this.note).length>0&&(t.note=this.note),t}}]),t}(),hh=function(){function t(e){var n=e.annotations,i=e.accessors,r=e.accessorsInverse;rh(this,t),this.accessors=i,this.accessorsInverse=r,this.annotations=n}return ah(t,[{key:"clearTypes",value:function(t){this.annotations.forEach((function(e){e.type=void 0,e.subject=t&&t.subject||e.subject,e.connector=t&&t.connector||e.connector,e.note=t&&t.note||e.note}))}},{key:"setPositionWithAccessors",value:function(){var t=this;this.annotations.forEach((function(e){e.type.setPositionWithAccessors(t.accessors)}))}},{key:"editMode",value:function(t){this.annotations.forEach((function(e){e.type&&(e.type.editMode=t,e.type.updateEditMode())}))}},{key:"updateDisable",value:function(t){this.annotations.forEach((function(e){e.disable=t,e.type&&t.forEach((function(t){e.type[t]&&(e.type[t].remove&&e.type[t].remove(),e.type[t]=void 0)}))}))}},{key:"updateTextWrap",value:function(t){this.annotations.forEach((function(e){e.type&&e.type.updateTextWrap&&e.type.updateTextWrap(t)}))}},{key:"updateText",value:function(){this.annotations.forEach((function(t){t.type&&t.type.drawText&&t.type.drawText()}))}},{key:"updateNotePadding",value:function(t){this.annotations.forEach((function(e){e.type&&(e.type.notePadding=t)}))}},{key:"json",get:function(){var t=this;return this.annotations.map((function(e){var n=e.json;return t.accessorsInverse&&e.data&&(n.data={},Object.keys(t.accessorsInverse).forEach((function(i){n.data[i]=t.accessorsInverse[i]({x:e.x,y:e.y})}))),n}))}},{key:"noteNodes",get:function(){return this.annotations.map((function(t){return oh({},t.type.getNoteBBoxOffset(),{positionX:t.x,positionY:t.y})}))}}]),t}(),fh=function(t,e){return"dynamic"!==t&&"left"!==t&&"right"!==t||(t=e<0?"top":"bottom"),t},dh=function(t,e){return"dynamic"!==t&&"top"!==t&&"bottom"!==t||(t=e<0?"right":"left"),t},ph=["topBottom","top","bottom"],gh=["leftRight","left","right"],_h=function(t){var e=t.data,n=t.curve,i=void 0===n?ku:n,r=t.canvasContext,a=t.className,o=t.classID,s=function(){var t=Cu,e=Tu,n=du(!0),i=null,r=ku,a=null;function o(o){var s,l,c,u=o.length,h=!1;for(null==i&&(a=r(c=fu())),s=0;s<=u;++s)!(s<u&&n(l=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(l,s,o),+e(l,s,o));if(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:du(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:du(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:du(!!t),o):n},o.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),o):r},o.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),o):i},o}().curve(i),l={type:"path",className:a,classID:o,data:e};return r?(s.context(r),l.pathMethods=s):l.attrs={d:s(e)},l},mh=function(t){var e=t.data,n=t.canvasContext,i={type:"path",className:t.className,classID:t.classID,data:e},r=function(){var t=vu,e=yu,n=du(0),i=null,r=xu,a=bu,o=wu,s=null;function l(){var l,c,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=r.apply(this,arguments)-_u,d=a.apply(this,arguments)-_u,p=Math.abs(d-f),g=d>f;if(s||(s=l=fu()),h<u&&(c=h,h=u,u=c),h>pu)if(p>mu-pu)s.moveTo(h*Math.cos(f),h*Math.sin(f)),s.arc(0,0,h,f,d,!g),u>pu&&(s.moveTo(u*Math.cos(d),u*Math.sin(d)),s.arc(0,0,u,d,f,g));else{var _,m,v=f,y=d,x=f,b=d,w=p,S=p,M=o.apply(this,arguments)/2,E=M>pu&&(i?+i.apply(this,arguments):Math.sqrt(u*u+h*h)),k=Math.min(Math.abs(h-u)/2,+n.apply(this,arguments)),C=k,T=k;if(E>pu){var A=Su(E/u*Math.sin(M)),P=Su(E/h*Math.sin(M));(w-=2*A)>pu?(x+=A*=g?1:-1,b-=A):(w=0,x=b=(f+d)/2),(S-=2*P)>pu?(v+=P*=g?1:-1,y-=P):(S=0,v=y=(f+d)/2)}var F=h*Math.cos(v),L=h*Math.sin(v),N=u*Math.cos(b),O=u*Math.sin(b);if(k>pu){var z=h*Math.cos(y),G=h*Math.sin(y),D=u*Math.cos(x),I=u*Math.sin(x);if(p<gu){var R=w>pu?function(t,e,n,i,r,a,o,s){var l=n-t,c=i-e,u=o-r,h=s-a,f=(u*(e-a)-h*(t-r))/(h*l-u*c);return[t+f*l,e+f*c]}(F,L,D,I,z,G,N,O):[N,O],j=F-R[0],B=L-R[1],q=z-R[0],W=G-R[1],U=1/Math.sin(Math.acos((j*q+B*W)/(Math.sqrt(j*j+B*B)*Math.sqrt(q*q+W*W)))/2),H=Math.sqrt(R[0]*R[0]+R[1]*R[1]);C=Math.min(k,(u-H)/(U-1)),T=Math.min(k,(h-H)/(U+1))}}S>pu?T>pu?(_=Mu(D,I,F,L,h,T,g),m=Mu(z,G,N,O,h,T,g),s.moveTo(_.cx+_.x01,_.cy+_.y01),T<k?s.arc(_.cx,_.cy,T,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(s.arc(_.cx,_.cy,T,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),s.arc(0,0,h,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,T,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):(s.moveTo(F,L),s.arc(0,0,h,v,y,!g)):s.moveTo(F,L),u>pu&&w>pu?C>pu?(_=Mu(N,O,z,G,u,-C,g),m=Mu(F,L,D,I,u,-C,g),s.lineTo(_.cx+_.x01,_.cy+_.y01),C<k?s.arc(_.cx,_.cy,C,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(s.arc(_.cx,_.cy,C,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),s.arc(0,0,u,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,C,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):s.arc(0,0,u,b,x,g):s.lineTo(N,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-gu/2;return[Math.cos(i)*n,Math.sin(i)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:du(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:du(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:du(+t),l):n},l.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:du(+t),l):i},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:du(+t),l):r},l.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:du(+t),l):a},l.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:du(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}().innerRadius(e.innerRadius||0).outerRadius(e.outerRadius||e.radius||2).startAngle(e.startAngle||0).endAngle(e.endAngle||2*Math.PI);return n?(r.context(n),i.pathMethods=lineGen):i.attrs={d:r()},i},vh=function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,o=a+i.dx,s=i.y-r.y,l=s+i.dy,c=i.subject;if("circle"===n&&(c.outerRadius||c.radius)){var u=Math.sqrt((a-o)*(a-o)+(s-l)*(s-l)),h=Math.asin(-l/u),f=c.outerRadius||c.radius+(c.radiusPadding||0);a=Math.abs(Math.cos(h)*f)*(o<0?-1:1),s=Math.abs(Math.sin(h)*f)*(l<0?-1:1)}if("rect"===n){var d=c.width,p=c.height;(d>0&&i.dx>0||d<0&&i.dx<0)&&(a=Math.abs(d)>Math.abs(i.dx)?d/2:d),(p>0&&i.dy>0||p<0&&i.dy<0)&&(s=Math.abs(p)>Math.abs(i.dy)?p/2:p),a===d/2&&s===p/2&&(a=o,s=l)}return[[a,s],[o,l]]},yh=function(t){var e=t.type,n=t.connectorData,i=t.subjectType;n||(n={}),n.points&&"number"!=typeof n.points||(n.points=xh(e.annotation.offset,n.points)),n.curve||(n.curve=Wu);var r=[];if(e.editMode){var a=n.points.map((function(t,e){return oh({},function(t){var e=t.cx,n=void 0===e?0:e,i=t.cy;return{move:{x:n,y:void 0===i?0:i}}}({cx:t[0],cy:t[1]}),{index:e})})),o=function(t){n.points[t][0]+=kc.dx,n.points[t][1]+=kc.dy,e.redrawConnector()};r=e.mapHandles(a.map((function(t){return oh({},t.move,{drag:o.bind(e,t.index)})})))}var s=vh({type:e,subjectType:i});return s=[s[0]].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(n.points),[s[1]]),{components:[_h({data:s,curve:n.curve,className:"connector"})],handles:r}},xh=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=t.x/(e+1),i=t.y/(e+1),r=[],a=1;a<=e;a++)r.push([n*a+a%2*20,i*a-a%2*20]);return r},bh=function(t){var e=t.subjectData,n=t.type;e.radius||e.outerRadius||(e.radius=20);var i=[],r=mh({data:e,className:"subject"});if(n.editMode){var a=function(t){var e=t.cx,n=void 0===e?0:e,i=t.cy,r=void 0===i?0:i,a=t.r1,o=t.r2,s=t.padding,l={move:{x:n,y:r}};return void 0!==a&&(l.r1={x:n+a/Math.sqrt(2),y:r+a/Math.sqrt(2)}),void 0!==o&&(l.r2={x:n+o/Math.sqrt(2),y:r+o/Math.sqrt(2)}),void 0!==s&&(l.padding={x:n+a+s,y:r}),l}({r1:r.data.outerRadius||r.data.radius,r2:r.data.innerRadius,padding:e.radiusPadding}),o=function(t){var i=e[t]+kc.dx*Math.sqrt(2);e[t]=i,n.redrawSubject(),n.redrawConnector()},s=[oh({},a.r1,{drag:o.bind(n,void 0!==e.outerRadius?"outerRadius":"radius")})];e.innerRadius&&s.push(oh({},a.r2,{drag:o.bind(n,"innerRadius")})),i=n.mapHandles(s)}return r.attrs["fill-opacity"]=0,{components:[r],handles:i}},wh=function(){function t(e){var n=e.a,i=e.annotation,r=e.editMode,a=e.dispatcher,o=e.notePadding,s=e.accessors;if(rh(this,t),this.a=n,this.note=-1===i.disable.indexOf("note")&&n.select("g.annotation-note"),this.noteContent=this.note&&n.select("g.annotation-note-content"),this.connector=-1===i.disable.indexOf("connector")&&n.select("g.annotation-connector"),this.subject=-1===i.disable.indexOf("subject")&&n.select("g.annotation-subject"),this.dispatcher=a,a){var l=Lh.bind(null,a,i);l({component:this.note,name:"note"}),l({component:this.connector,name:"connector"}),l({component:this.subject,name:"subject"})}this.annotation=i,this.editMode=i.editMode||r,this.notePadding=void 0!==o?o:3,this.offsetCornerX=0,this.offsetCornerY=0,s&&i.data&&this.init(s)}return ah(t,[{key:"init",value:function(t){this.annotation.x||this.mapX(t),this.annotation.y||this.mapY(t)}},{key:"mapY",value:function(t){t.y&&(this.annotation.y=t.y(this.annotation.data))}},{key:"mapX",value:function(t){t.x&&(this.annotation.x=t.x(this.annotation.data))}},{key:"updateEditMode",value:function(){this.a.selectAll("circle.handle").remove()}},{key:"drawOnSVG",value:function(t,e){var n=this;Array.isArray(e)||(e=[e]),e.filter((function(t){return t})).forEach((function(e){var i=e.type,r=e.className,a=e.attrs,o=e.handles,s=e.classID;if("handle"===i)!function(t){var e=t.group,n=t.handles,i=t.r,r=void 0===i?10:i,a=e.selectAll("circle.handle").data(n);a.enter().append("circle").attr("class","handle").attr("fill","grey").attr("fill-opacity",.1).attr("cursor","move").attr("stroke-dasharray",5).attr("stroke","grey").call(au().container(Ic("g.annotations").node()).on("start",(function(t){return t.start&&t.start(t)})).on("drag",(function(t){return t.drag&&t.drag(t)})).on("end",(function(t){return t.end&&t.end(t)}))),e.selectAll("circle.handle").attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).attr("r",(function(t){return t.r||r})).attr("class",(function(t){return"handle "+(t.className||"")})),a.exit().remove()}({group:t,r:a&&a.r,handles:o});else{Fh(t,[n.annotation],i,r,s);for(var l=t.select(i+"."+(s||r)),c=Object.keys(a),u=[],h=l.node().attributes,f=h.length-1;f>=0;f--){var d=h[f].name;-1===c.indexOf(d)&&"class"!==d&&u.push(d)}c.forEach((function(t){"text"===t?l.text(a[t]):l.attr(t,a[t])})),u.forEach((function(t){return l.attr(t,null)}))}}))}},{key:"getNoteBBox",value:function(){return Oh(this.note,".annotation-note-content text")}},{key:"getNoteBBoxOffset",value:function(){var t=Oh(this.note,".annotation-note-content"),e=this.noteContent.attr("transform").split(/\(|\,|\)/g);return t.offsetCornerX=parseFloat(e[1])+this.annotation.dx,t.offsetCornerY=parseFloat(e[2])+this.annotation.dy,t.offsetX=this.annotation.dx,t.offsetY=this.annotation.dy,t}},{key:"drawSubject",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.subject,i=e.type,r={type:this,subjectData:n},a={};"circle"===i?a=bh(r):"rect"===i?a=function(t){var e=t.subjectData,n=t.type;e.width||(e.width=100),e.height||(e.height=100);var i=[],r=e.width,a=e.height,o=_h({data:[[0,0],[r,0],[r,a],[0,a],[0,0]],className:"subject"});if(n.editMode){var s=[{x:r,y:a/2,drag:function(){e.width=kc.x,n.redrawSubject(),n.redrawConnector()}.bind(n)},{x:r/2,y:a,drag:function(){e.height=kc.y,n.redrawSubject(),n.redrawConnector()}.bind(n)}];i=n.mapHandles(s)}return o.attrs["fill-opacity"]=.1,{components:[o],handles:i}}(r):"threshold"===i?a=function(t){var e=t.subjectData,n=t.type.annotation.position,i=(void 0!==e.x1?e.x1:n.x)-n.x,r=(void 0!==e.x2?e.x2:n.x)-n.x,a=(void 0!==e.y1?e.y1:n.y)-n.y,o=(void 0!==e.y2?e.y2:n.y)-n.y;return{components:[_h({data:[[i,a],[r,o]],className:"subject"})]}}(r):"badge"===i&&(a=function(t){var e=t.subjectData,n=void 0===e?{}:e,i=t.type,r=void 0===i?{}:i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.typeSettings&&r.typeSettings.subject;n.radius||(o&&o.radius?n.radius=o.radius:n.radius=14),n.x||o&&o.x&&(n.x=o.x),n.y||o&&o.y&&(n.y=o.y);var s=[],l=[],c=n.radius,u=.7*c,h=0,f=0,d=Math.sqrt(2)*c,p={xleftcorner:-c,xrightcorner:c,ytopcorner:-c,ybottomcorner:c,xleft:-d,xright:d,ytop:-d,ybottom:d};n.x&&!n.y?h=p["x"+n.x]:n.y&&!n.x?f=p["y"+n.y]:n.x&&n.y&&(h=p["x"+n.x+"corner"],f=p["y"+n.y+"corner"]);var g="translate("+h+", "+f+")",_=mh({className:"subject",data:{radius:c}});_.attrs.transform=g,_.attrs.fill=a.color,_.attrs["stroke-linecap"]="round",_.attrs["stroke-width"]="3px";var m=mh({className:"subject-ring",data:{outerRadius:c,innerRadius:u}});m.attrs.transform=g,m.attrs["stroke-width"]="3px",m.attrs.fill="white";var v=void 0;if(h&&f||!h&&!f)v=_h({className:"subject-pointer",data:[[0,0],[h||0,0],[0,f||0],[0,0]]});else if(h||f){var y=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t&&t/Math.sqrt(2)/Math.sqrt(2)||e*c/Math.sqrt(2)};v=_h({className:"subject-pointer",data:[[0,0],[y(h),y(f)],[y(h,-1),y(f,-1)],[0,0]]})}if(v&&(v.attrs.fill=a.color,v.attrs["stroke-linecap"]="round",v.attrs["stroke-width"]="3px",l.push(v)),r.editMode){var x={x:2*h,y:2*f,drag:function(){n.x=kc.x<2*-c?"left":kc.x>2*c?"right":void 0,n.y=kc.y<2*-c?"top":kc.y>2*c?"bottom":void 0,r.redrawSubject()}.bind(r)};x.x||x.y||(x.y=-c),s=r.mapHandles([x])}var b=void 0;return n.text&&(b={type:"text",className:"badge-text",attrs:{fill:"white",stroke:"none","font-size":".7em",text:n.text,"text-anchor":"middle",dy:".25em",x:h,y:f}}),l.push(_),l.push(m),l.push(b),{components:l,handles:s}}(r,this.annotation));var o=a,s=o.components,l=void 0===s?[]:s,c=o.handles,u=void 0===c?[]:c;return l.forEach((function(e){e&&e.attrs&&!e.attrs.stroke&&(e.attrs.stroke=t.annotation.color)})),this.editMode&&(u=u.concat(this.mapHandles([{drag:this.dragSubject.bind(this)}])),l.push({type:"handle",handles:u})),l}},{key:"drawConnector",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.connector,i=n.type||e.type,r={type:this,connectorData:n};r.subjectType=this.typeSettings&&this.typeSettings.subject&&this.typeSettings.subject.type;var a={};a="curve"===i?yh(r):"elbow"===i?function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,o=a+i.dx,s=i.y-r.y,l=s+i.dy,c=i.subject;if("rect"===n){var u=c.width,h=c.height;(u>0&&i.dx>0||u<0&&i.dx<0)&&(a=Math.abs(u)>Math.abs(i.dx)?u/2:u),(h>0&&i.dy>0||h<0&&i.dy<0)&&(s=Math.abs(h)>Math.abs(i.dy)?h/2:h),a===u/2&&s===h/2&&(a=o,s=l)}var f=[[a,s],[o,l]],d=l-s,p=o-a,g=o,_=l,m=l<s&&o>a||o<a&&l>s?-1:1;if(Math.abs(p)<Math.abs(d)?(g=o,_=s+p*m):(_=l,g=a+d*m),"circle"===n&&(c.outerRadius||c.radius)){var v=(c.outerRadius||c.radius)+(c.radiusPadding||0),y=v/Math.sqrt(2);if(Math.abs(p)>y&&Math.abs(d)>y)f=[[a=y*(o<0?-1:1),s=y*(l<0?-1:1)],[g,_],[o,l]];else if(Math.abs(p)>Math.abs(d)){var x=Math.asin(-l/v);f=[[a=Math.abs(Math.cos(x)*v)*(o<0?-1:1),l],[o,l]]}else{var b=Math.acos(o/v);f=[[o,s=Math.abs(Math.sin(b)*v)*(l<0?-1:1)],[o,l]]}}else f=[[a,s],[g,_],[o,l]];return{components:[_h({data:f,className:"connector"})]}}(r):function(t){var e=vh(t);return{components:[_h({data:e,className:"connector"})]}}(r);var o=a,s=o.components,l=void 0===s?[]:s,c=o.handles,u=void 0===c?[]:c,h=l[0];h&&(h.attrs.stroke=this.annotation.color,h.attrs.fill="none");var f=n.end||e.end,d={};if("arrow"===f){var p=h.data[1],g=h.data[0];Math.sqrt(Math.pow(p[0]-g[0],2)+Math.pow(p[1]-g[1],2))<5&&h.data[2]&&(p=h.data[2]),d=function(t){var e=t.annotation,n=t.start,i=t.end,r=t.scale,a=void 0===r?1:r,o=e.position;n=n?[-i[0]+n[0],-i[1]+n[1]]:[e.dx,e.dy],i||(i=[e.x-o.x,e.y-o.y]);var s=i[0],l=i[1],c=n[0],u=n[1],h=10*a,f=16/180*Math.PI,d=Math.atan(u/c);c<0&&(d+=Math.PI);var p=[[s,l],[Math.cos(d+f)*h+s,Math.sin(d+f)*h+l],[Math.cos(d-f)*h+s,Math.sin(d-f)*h+l],[s,l]];return{components:[_h({data:p,className:"connector-end connector-arrow",classID:"connector-end"})]}}({annotation:this.annotation,start:p,end:g,scale:n.endScale})}else"dot"===f?d=function(t){var e=t.line,n=t.scale,i=void 0===n?1:n,r=mh({className:"connector-end connector-dot",classID:"connector-end",data:{radius:3*Math.sqrt(i)}});return r.attrs.transform="translate("+e.data[0][0]+", "+e.data[0][1]+")",{components:[r]}}({line:h,scale:n.endScale}):f&&"none"!==f||this.connector&&this.connector.select(".connector-end").remove();return d.components&&(d.components.forEach((function(e){e.attrs.fill=t.annotation.color,e.attrs.stroke=t.annotation.color})),l=l.concat(d.components)),this.editMode&&0!==u.length&&l.push({type:"handle",handles:u}),l}},{key:"drawNote",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.annotation.note,i=n.align||e.align||"dynamic",r={bbox:e.bbox,align:i,offset:this.annotation.offset},a=n.lineType||e.lineType,o={};"vertical"===a?o=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,o=t.bbox,s=t.offset;"top"===(e=fh(e,s.y))?a-=o.height:"middle"===e&&(a-=o.height/2);var l=[[i,a],[i,a+o.height]];return{components:[_h({data:l,className:"note-line"})]}}(r):"horizontal"===a&&(o=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,o=t.offset,s=t.bbox;"right"===(e=dh(e,o.x))?i-=s.width:"middle"===e&&(i-=s.width/2);var l=[[i,a],[i+s.width,a]];return{components:[_h({data:l,className:"note-line"})]}}(r));var s=o,l=s.components,c=void 0===l?[]:l,u=s.handles,h=void 0===u?[]:u;if(c.forEach((function(e){e.attrs.stroke=t.annotation.color})),this.editMode){h=this.mapHandles([{x:0,y:0,drag:this.dragNote.bind(this)}]),c.push({type:"handle",handles:h});var f=this.dragNote.bind(this),d=this.dragstarted.bind(this),p=this.dragended.bind(this);this.note.call(au().container(Ic("g.annotations").node()).on("start",(function(t){return d(t)})).on("drag",(function(t){return f(t)})).on("end",(function(t){return p(t)})))}else this.note.on("mousedown.drag",null);return c}},{key:"drawNoteContent",value:function(t){var e=this.annotation.note,n=void 0!==e.padding?e.padding:this.notePadding,i=e.orientation||t.orientation||"topBottom",r=e.lineType||t.lineType,a=e.align||t.align||"dynamic";"vertical"===r?i="leftRight":"horizontal"===r&&(i="topBottom");var o=function(t){var e=t.padding,n=void 0===e?0:e,i=t.bbox,r=void 0===i?{x:0,y:0,width:0,height:0}:i,a=t.align,o=t.orientation,s=t.offset,l=void 0===s?{x:0,y:0}:s,c=-r.x,u=0;return-1!==ph.indexOf(o)?(a=dh(a,l.x),l.y<0&&"topBottom"===o||"top"===o?u-=r.height+n:u+=n,"middle"===a?c-=r.width/2:"right"===a&&(c-=r.width)):-1!==gh.indexOf(o)&&(a=fh(a,l.y),l.x<0&&"leftRight"===o||"left"===o?c-=r.width+n:c+=n,"middle"===a?u-=r.height/2:"top"===a&&(u-=r.height)),{x:c,y:u}}({padding:n,bbox:t.bbox,offset:this.annotation.offset,orientation:i,align:a}),s=o.x,l=o.y;return this.offsetCornerX=s+this.annotation.dx,this.offsetCornerY=l+this.annotation.dy,this.note&&this.noteContent.attr("transform","translate("+s+", "+l+")"),[]}},{key:"drawOnScreen",value:function(t,e){return this.drawOnSVG(t,e)}},{key:"redrawSubject",value:function(){this.subject&&this.drawOnScreen(this.subject,this.drawSubject())}},{key:"redrawConnector",value:function(){this.connector&&this.drawOnScreen(this.connector,this.drawConnector())}},{key:"redrawNote",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNoteBBox();this.noteContent&&this.drawOnScreen(this.noteContent,this.drawNoteContent({bbox:t})),this.note&&this.drawOnScreen(this.note,this.drawNote({bbox:t}))}},{key:"setPosition",value:function(){var t=this.annotation.position;this.a.attr("transform","translate("+t.x+", "+t.y+")")}},{key:"clearComponents",value:function(){this.subject&&this.subject.select("*").remove(),this.connector&&this.connector.select("*").remove()}},{key:"setOffset",value:function(){if(this.note){var t=this.annotation.offset;this.note.attr("transform","translate("+t.x+", "+t.y+")")}}},{key:"setPositionWithAccessors",value:function(t){t&&this.annotation.data&&(this.mapX(t),this.mapY(t)),this.setPosition()}},{key:"setClassName",value:function(){this.a.attr("class","annotation "+(this.className&&this.className())+" "+(this.editMode?"editable":"")+" "+(this.annotation.className||""))}},{key:"draw",value:function(){this.setClassName(),this.setPosition(),this.setOffset(),this.redrawSubject(),this.redrawConnector(),this.redrawNote()}},{key:"dragstarted",value:function(){kc.sourceEvent.stopPropagation(),this.dispatcher&&this.dispatcher.call("dragstart",this.a,this.annotation),this.a.classed("dragging",!0),this.a.selectAll("circle.handle").style("pointer-events","none")}},{key:"dragended",value:function(){this.dispatcher&&this.dispatcher.call("dragend",this.a,this.annotation),this.a.classed("dragging",!1),this.a.selectAll("circle.handle").style("pointer-events","all")}},{key:"dragSubject",value:function(){var t=this.annotation.position;t.x+=kc.dx,t.y+=kc.dy,this.annotation.position=t}},{key:"dragNote",value:function(){var t=this.annotation.offset;t.x+=kc.dx,t.y+=kc.dy,this.annotation.offset=t}},{key:"mapHandles",value:function(t){var e=this;return t.map((function(t){return oh({},t,{start:e.dragstarted.bind(e),end:e.dragended.bind(e)})}))}}]),t}(),Sh=function(t,e,n){return function(t){function i(t){rh(this,i);var n=ch(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return n.typeSettings=e,e.disable&&e.disable.forEach((function(t){n[t]&&n[t].remove(),n[t]=void 0,"note"===t&&(n.noteContent=void 0)})),n}return lh(i,t),ah(i,[{key:"className",value:function(){return""+(e.className||sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this)&&sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this).call(this)||"")}},{key:"drawSubject",value:function(t){return this.typeSettings.subject=oh({},e.subject,this.typeSettings.subject),sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawSubject",this).call(this,oh({},t,this.typeSettings.subject))}},{key:"drawConnector",value:function(t){return this.typeSettings.connector=oh({},e.connector,this.typeSettings.connector),sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawConnector",this).call(this,oh({},t,e.connector,this.typeSettings.connector))}},{key:"drawNote",value:function(t){return this.typeSettings.note=oh({},e.note,this.typeSettings.note),sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNote",this).call(this,oh({},t,e.note,this.typeSettings.note))}},{key:"drawNoteContent",value:function(t){return sh(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNoteContent",this).call(this,oh({},t,e.note,this.typeSettings.note))}}],[{key:"init",value:function(t,e){return sh(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,t,e),n&&(t=n(t,e)),t}}]),i}(t)},Mh=function(t){function e(t){rh(this,e);var n=ch(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.textWrap=t.textWrap||120,n.drawText(),n}return lh(e,t),ah(e,[{key:"updateTextWrap",value:function(t){this.textWrap=t,this.drawText()}},{key:"drawText",value:function(){if(this.note){Fh(this.note,[this.annotation],"g","annotation-note-content");var t=this.note.select("g.annotation-note-content");Fh(t,[this.annotation],"rect","annotation-note-bg"),Fh(t,[this.annotation],"text","annotation-note-label"),Fh(t,[this.annotation],"text","annotation-note-title");var e={height:0},n=this.a.select("text.annotation-note-label"),i=this.annotation.note&&this.annotation.note.wrap||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrap||this.textWrap,r=this.annotation.note&&this.annotation.note.wrapSplitter||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrapSplitter,a=this.annotation.note&&this.annotation.note.bgPadding||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.bgPadding,o={top:0,bottom:0,left:0,right:0};if("number"==typeof a?o={top:a,bottom:a,left:a,right:a}:a&&"object"===(void 0===a?"undefined":ih(a))&&(o=oh(o,a)),this.annotation.note.title){var s=this.a.select("text.annotation-note-title");s.text(this.annotation.note.title),s.attr("fill",this.annotation.color),s.attr("font-weight","bold"),s.call(Nh,i,r),e=s.node().getBBox()}n.text(this.annotation.note.label).attr("dx","0"),n.call(Nh,i,r),n.attr("y",1.1*e.height||0),n.attr("fill",this.annotation.color);var l=this.getNoteBBox();this.a.select("rect.annotation-note-bg").attr("width",l.width+o.left+o.right).attr("height",l.height+o.top+o.bottom).attr("x",l.x-o.left).attr("y",-o.top).attr("fill","white").attr("fill-opacity",0)}}}]),e}(wh),Eh=Sh(Mh,{className:"label",note:{align:"middle"}}),kh=Sh(Mh,{className:"callout",note:{lineType:"horizontal"}}),Ch=(Sh(kh,{className:"callout elbow",connector:{type:"elbow"}}),Sh(kh,{className:"callout curve",connector:{type:"curve"}}),Sh(wh,{className:"badge",subject:{type:"badge"},disable:["connector","note"]}),Sh(Mh,{className:"callout circle",subject:{type:"circle"},note:{lineType:"horizontal"},connector:{type:"elbow"}})),Th=Sh(Mh,{className:"callout rect",subject:{type:"rect"},note:{lineType:"horizontal"},connector:{type:"elbow"}}),Ah=function(t){function e(){return rh(this,e),ch(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return lh(e,t),ah(e,[{key:"mapY",value:function(t){sh(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mapY",this).call(this,t);var n=this.annotation;(n.subject.x1||n.subject.x2)&&n.data&&t.y&&(n.y=t.y(n.data)),!n.subject.x1&&!n.subject.x2||n.x||(n.x=n.subject.x1||n.subject.x2)}},{key:"mapX",value:function(t){sh(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mapX",this).call(this,t);var n=this.annotation;(n.subject.y1||n.subject.y2)&&n.data&&t.x&&(n.x=t.x(n.data)),!n.subject.y1&&!n.subject.y2||n.y||(n.y=n.subject.y1||n.subject.y2)}}]),e}(kh),Ph=Sh(Ah,{className:"callout xythreshold",subject:{type:"threshold"}}),Fh=function(t,e,n,i,r){var a=t.selectAll(n+"."+(r||i)).data(e);return a.enter().append(n).merge(a).attr("class",i),a.exit().remove(),t},Lh=function(t,e,n){var i=n.component,r=n.name;i&&i.on("mouseover.annotations",(function(){t.call(r+"over",i,e)})).on("mouseout.annotations",(function(){return t.call(r+"out",i,e)})).on("click.annotations",(function(){return t.call(r+"click",i,e)}))},Nh=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.2;t.each((function(){for(var t=Ic(this),r=t.text().split(n||/[ \t\r\n]+/).reverse().filter((function(t){return""!==t})),a=void 0,o=[],s=t.text(null).append("tspan").attr("x",0).attr("dy","0.8em");a=r.pop();)o.push(a),s.text(o.join(" ")),s.node().getComputedTextLength()>e&&o.length>1&&(o.pop(),s.text(o.join(" ")),o=[a],s=t.append("tspan").attr("x",0).attr("dy",i+"em").text(a))}))},Oh=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":not(.handle)";return t?t.selectAll(e).nodes().reduce((function(t,e){var n=e.getBBox();t.x=Math.min(t.x,n.x),t.y=Math.min(t.y,n.y),t.width=Math.max(t.width,n.width);var i=e&&e.attributes&&e.attributes.y;return t.height=Math.max(t.height,(i&&parseFloat(i.value)||0)+n.height),t}),{x:0,y:0,width:0,height:0}):{x:0,y:0,width:0,height:0}};function zh(){var t=[],e=void 0,n=void 0,i=[],r={},a={},o=!1,s=void 0,l=kh,c=void 0,u=void 0,h=Xc("subjectover","subjectout","subjectclick","connectorover","connectorout","connectorclick","noteover","noteout","noteclick","dragend","dragstart"),f=void 0,d=function(n){f=n,o||n.selectAll("circle.handle").remove();var d=t.map((function(t){return t.type||(t.type=l),t.disable||(t.disable=i),new uh(t)}));e=e||new hh({annotations:d,accessors:r,accessorsInverse:a,ids:s}),n.selectAll("g").data([e]).enter().append("g").attr("class","annotations");var p=n.select("g.annotations");Fh(p,e.annotations,"g","annotation");var g=p.selectAll("g.annotation");g.each((function(t){var e=Ic(this);e.attr("class","annotation"),Fh(e,[t],"g","annotation-connector"),Fh(e,[t],"g","annotation-subject"),Fh(e,[t],"g","annotation-note"),Fh(e.select("g.annotation-note"),[t],"g","annotation-note-content"),t.type="[object Object]"===t.type.toString()?t.type:new t.type({a:e,annotation:t,textWrap:c,notePadding:u,editMode:o,dispatcher:h,accessors:r}),t.type.draw(),t.type.drawText&&t.type.drawText()}))};return d.json=function(){return console.log("Annotations JSON was copied to your clipboard. Please note the annotation type is not JSON compatible. It appears in the objects array in the console, but not in the copied JSON.",e.json),window.copy(JSON.stringify(e.json.map((function(t){return delete t.type,t})))),d},d.update=function(){return t&&e&&(t=e.annotations.map((function(t){return t.type.draw(),t}))),d},d.updateText=function(){return e&&(e.updateText(c),t=e.annotations),d},d.updatedAccessors=function(){return e.setPositionWithAccessors(),t=e.annotations,d},d.disable=function(n){return arguments.length?(i=n,e&&(e.updateDisable(i),t=e.annotations),d):i},d.textWrap=function(n){return arguments.length?(c=n,e&&(e.updateTextWrap(c),t=e.annotations),d):c},d.notePadding=function(n){return arguments.length?(u=n,e&&(e.updateNotePadding(u),t=e.annotations),d):u},d.type=function(n,i){return arguments.length?(l=n,e&&(e.annotations.map((function(t){t.type.note&&t.type.note.selectAll("*:not(.annotation-note-content)").remove(),t.type.noteContent&&t.type.noteContent.selectAll("*").remove(),t.type.subject&&t.type.subject.selectAll("*").remove(),t.type.connector&&t.type.connector.selectAll("*").remove(),t.type.typeSettings={},t.type=l,t.subject=i&&i.subject||t.subject,t.connector=i&&i.connector||t.connector,t.note=i&&i.note||t.note})),t=e.annotations),d):l},d.annotations=function(n){if(!arguments.length)return e&&e.annotations||t;(t=n,e&&e.annotations)&&(t.some((function(t){return!t.type||"[object Object]"!==t.type.toString()}))?(e=null,d(f)):e.annotations=t);return d},d.context=function(t){return arguments.length?(n=t,d):n},d.accessors=function(t){return arguments.length?(r=t,d):r},d.accessorsInverse=function(t){return arguments.length?(a=t,d):a},d.ids=function(t){return arguments.length?(s=t,d):s},d.editMode=function(n){return arguments.length?(o=n,f&&f.selectAll("g.annotation").classed("editable",o),e&&(e.editMode(o),t=e.annotations),d):o},d.collection=function(t){return arguments.length?(e=t,d):e},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d}function Gh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Dh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Gh(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gh(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ih(t){if(t.svg_){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);e.selectAll(".em-annotation-group").remove();var n=t.annotations_;if(n){var i={annotationLabel:Eh,annotationCallout:kh,annotationCalloutRect:Th,annotationCalloutCircle:Ch,annotationXYThreshold:Ph},r=n.annotations.map((function(t){var e=i[t.type]||Eh;return Dh(Dh({},t),{},{type:e})})),a=zh().type(Eh).annotations(r).editMode(n.editMode);e.append("g").attr("class","em-annotation-group").call(a)}}}var Rh=function(t,e){var n,i;t.labels_.config||(t.labels_.config=Uh),t.labels_.statLabelsPositions||(t.labels_.statLabelsPositions=Hh);var r=e.select("#em-labels"),a=r.empty()?e.append("g").attr("id","em-labels"):r;null!==(n=t.labels_)&&void 0!==n&&n.values&&"ps"!==t._mapType&&Wh(t,a);var o=(null===(i=t.labels_)||void 0===i?void 0:i.labels)||Uh["".concat(t.geo,"_").concat(t.proj_,".cc")];if(o){var s,l=a.append("g").attr("class","em-label-shadows").attr("text-anchor","middle"),c=a.append("g").attr("class","em-labels").attr("text-anchor","middle");if(null!==(s=t.labels_)&&void 0!==s&&s.shadows)l.selectAll("text").data(o).enter().append("text").attr("id",(function(t){return"em-label-shadow-"+t.text.replace(/\s+/g,"-")})).attr("class",(function(t){return"em-label-shadow em-label-shadow-"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),i=n[0],r=n[1];return"translate(".concat(i,",").concat(r,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}));c.selectAll("text").data(o).enter().append("text").attr("id",(function(t){return"em-label-"+t.text.replace(/\s+/g,"-")})).attr("class",(function(t){return"em-label em-label-"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),i=n[0],r=n[1];return"translate(".concat(i,",").concat(r,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}},jh=function(t){var e,n,i;if(t){t.svg_.selectAll("g.em-stat-label > *").remove(),t.svg_.selectAll("g.em-stat-label-shadow > *").remove();var r=t.svg_.selectAll("g.em-stat-label"),a=null!==(e=t.labels_)&&void 0!==e&&e.statLabelsFilterFunction?null===(n=t.labels_)||void 0===n?void 0:n.statLabelsFilterFunction:qh,o=t.statData();return r.filter((function(e){return a(e,t)})).each((function(e){var n=Ot(this),i=Bh(e,o);t.labels_.backgrounds&&function(t,e){var n=5,i=2,r=e.append("text").attr("visibility","hidden").text(t).node().getBBox(),a=r.width,o=r.height;e.select('text[visibility="hidden"]').remove();var s=-a/2-n,l=-o/2-i;e.append("rect").attr("x",s).attr("y",l).attr("width",a+2*n).attr("height",o+2*i).attr("class","em-label-background")}(i,n),n.append("text").text(i).attr("class","em-stat-label-text")})),null!==(i=t.labels_)&&void 0!==i&&i.shadows&&t.svg_.selectAll("g.em-stat-label-shadow").filter((function(e){return a(e,t)})).append("text").text((function(t){return Bh(t,o)})),t}console.warn("No map specified")},Bh=function(t,e){if(e&&null!=e&&e.get){var n=e.get(t.properties.id);if(!n||!n.value&&0!==n&&0!==n.value)return"";if(":"!==n.value)return _a(n.value)}},qh=function(t,e){var n=e.statData().get(t.properties.id);return!(!n||!n.value&&0!==n&&0!==n.value)},Wh=function(t,e){var n,i=e.append("g").attr("class","em-stat-labels-shadows").attr("text-anchor","middle"),r=e.append("g").attr("class","em-stat-labels").attr("text-anchor","middle"),a=[];t.Geometries.geoJSONs.nutsrg?a="mixed"==t.nutsLevel_?t.Geometries.geoJSONs.mixed.rg0.concat(t.Geometries.geoJSONs.mixed.rg1,t.Geometries.geoJSONs.mixed.rg2,t.Geometries.geoJSONs.mixed.rg3,t.Geometries.geoJSONs.cntrg):t.Geometries.geoJSONs.nutsrg.concat(t.Geometries.geoJSONs.cntrg):t.Geometries.userGeometries&&(a=t.Geometries.statisticalRegions.features);var o=a.filter((function(t,e,n){return e===n.findIndex((function(e){return e.properties.id===t.properties.id}))}));r.selectAll("g").data(o).enter().append("g").attr("transform",(function(e){if(t.labels_.statLabelsPositions[e.properties.id]){var n=t.labels_.statLabelsPositions[e.properties.id],i=t._projection([n.x,n.y]),r=i[0].toFixed(3),a=i[1].toFixed(3);return"translate(".concat(r,",").concat(a,")")}var o=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(o=t.labels_.processValueLabelCentroids(e,o)),"translate("+o+")"})).attr("class","em-stat-label"),null!==(n=t.labels_)&&void 0!==n&&n.shadows&&i.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){if(t.labels_.statLabelsPositions[e.properties.id]){var n=t._projection([t.labels_.statLabelsPositions[e.properties.id].x,t.labels_.statLabelsPositions[e.properties.id].y]),i=n[0].toFixed(3),r=n[1].toFixed(3);return"translate(".concat(i,",").concat(r,")")}var a=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(a=t.labels_.processValueLabelCentroids(e,a)),"translate("+a+")"})).attr("class","em-stat-label-shadow")},Uh={EUR_3035:{cc:[{text:"AL",x:515e4,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:269e4,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:225e4,class:"cc",size:22},{text:"HR",x:484e4,y:248e4,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:292e4,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"GE",x:6942680,y:266e4,class:"cc"},{text:"UA",x:589e4,y:305e4,class:"cc"},{text:"BA",x:4949262,y:2338688,class:"cc"},{text:"MD",x:574e4,y:279e4,class:"cc"},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:277e4,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:235e4,class:"cc",size:10},{text:"SK",x:504e4,y:286e4,class:"cc",size:12},{text:"SI",x:4675e3,y:25e5,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:417e4,y:26e5,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:398e4,y:16e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:373e4,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},Hh={AL:{x:515e4,y:2e6},AT:{x:467e4,y:274e4},BE:{x:393e4,y:306e4},BG:{x:5567e3,y:23e5},HR:{x:4657718,y:2400243},CY:{x:6426e3,y:157e4},CH:{x:417e4,y:26e5},CZ:{x:4707e3,y:295e4},DK:{x:4316e3,y:3621e3},EE:{x:522e4,y:405e4},FI:{x:515e4,y:4424e3},FR:{x:3767740,y:2662817},DE:{x:4347284,y:3093276},EL:{x:537e4,y:175e4},HU:{x:502e4,y:267e4},IS:{x:304e4,y:4833e3},IE:{x:3136e3,y:3394e3},IT:{x:45e5,y:2181963},LV:{x:529e4,y:384e4},LT:{x:519e4,y:367e4},LU:{x:412e4,y:294e4},MT:{x:488e4,y:148e4},GE:{x:6912680,y:2696554},UA:{x:5865507,y:3130158},BA:{x:4959262,y:2368688},MD:{x:5736016,y:2835957},ME:{x:5073e3,y:223e4},MK:{x:53e5,y:213e4},NL:{x:402e4,y:3208e3},NO:{x:43e5,y:4147e3},PL:{x:4964e3,y:32e5},PT:{x:276e4,y:199e4},RO:{x:5451e3,y:26e5},RS:{x:52e5,y:237e4},SK:{x:504e4,y:289e4},SI:{x:466e4,y:255e4},ES:{x:32e5,y:2e6},SE:{x:463e4,y:4e6},TR:{x:651e4,y:21e5},UK:{x:3558e3,y:325e4},RU:{x:6842086,y:3230517}};function Vh(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function $h(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){Vh(a,i,r,o,s,"next",t)}function s(t){Vh(a,i,r,o,s,"throw",t)}o(void 0)}))}}var Yh=n(756),Jh=n.n(Yh);function Xh(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Kh(t,e){return fetch(t,e).then(Xh)}function Zh(t){return t}function Qh(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return tf(t,e)}))}:tf(t,e)}function tf(t,e){var n=e.id,i=e.bbox,r=null==e.properties?{}:e.properties,a=function(t,e){var n=function(t){if(null==t)return Zh;var e,n,i=t.scale[0],r=t.scale[1],a=t.translate[0],o=t.translate[1];return function(t,s){s||(e=n=0);var l=2,c=t.length,u=new Array(c);for(u[0]=(e+=t[0])*i+a,u[1]=(n+=t[1])*r+o;l<c;)u[l]=t[l],++l;return u}}(t.transform),i=t.arcs;function r(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a<o;++a)e.push(n(r[a],a));t<0&&function(t,e){for(var n,i=t.length,r=i-e;r<--i;)n=t[r],t[r++]=t[i],t[i]=n}(e,o)}function a(t){return n(t)}function o(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=o(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}function c(t){var e,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(c)};case"Point":e=a(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(a);break;case"LineString":e=o(t.arcs);break;case"MultiLineString":e=t.arcs.map(o);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:n,coordinates:e}}return c(e)}(t,e);return null==n&&null==i?{type:"Feature",properties:r,geometry:a}:null==i?{type:"Feature",id:n,properties:r,geometry:a}:{type:"Feature",id:n,bbox:i,properties:r,geometry:a}}var ef={2021:{3035:{"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}},4326:{"03M":{type:"Topology",arcs:[[[1900,1275],[-30,27],[-27,-13],[-34,23],[-87,6],[25,59],[1,70],[20,34],[24,167]],[[1792,1648],[-116,1],[-62,77],[-89,-8],[-60,148],[7,86],[-4,15],[-13,60],[-45,28],[-33,-48],[-26,4],[-31,142],[-11,53],[5,43],[-19,44],[-39,8],[-40,49],[-52,-59],[-93,71],[-38,-6],[-16,-26]],[[945,2388],[-54,27],[-20,28],[-22,-3],[-17,22],[-25,1],[-10,10],[4,17],[27,14],[-15,29],[1,16],[68,1],[-8,16],[-5,30],[-14,29],[-27,42],[-25,22],[-30,41]],[[773,2730],[-89,-69],[-64,-4],[-82,-92],[-133,-15],[27,-93],[64,-43],[16,-50],[38,-44],[9,-75],[-48,-51],[5,-41],[6,-50],[-52,-84],[-78,14],[-35,-66],[-33,-61],[-45,11],[-35,-42],[-18,-72],[33,-71],[48,-55]],[[1017,2330],[-72,58]],[[307,1677],[-36,-12],[-25,-21],[-26,-10],[-76,-90],[-17,4],[-30,31],[-52,-14],[-26,-23],[-19,1]],[[2319,1185],[-116,-32],[-39,-52],[-42,70],[-68,23],[-12,58],[-43,23],[-42,-23],[-57,23]],[[2044,0],[-4,43],[-38,82],[-34,9],[-24,43],[13,97],[61,4],[32,41],[49,0],[37,82],[-26,118],[130,167],[-8,73],[74,46],[-2,18],[-9,92],[24,35],[7,49],[48,52],[-55,134]]],transform:{scale:[.0006038339283908974,.00036983475567765975],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"10M":{type:"Topology",arcs:[[[659,439],[-54,17],[17,111]],[[622,567],[-93,31],[-25,92],[-36,11],[-29,97],[-23,1],[-63,3]],[[328,822],[-33,74],[-27,44]],[[268,940],[-72,-44],[-38,-31],[27,-86],[-14,-65],[-81,-78],[16,-58]],[[353,802],[-25,20]],[[106,578],[-41,-19],[-65,-28]],[[805,408],[-54,-21],[-92,52]],[[709,0],[-22,72],[0,17],[40,36],[18,67],[53,101],[16,64],[-9,51]]],transform:{scale:[.001740521547911524,.0010740945563829907],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"20M":{type:"Topology",arcs:[[[380,252],[-21,26],[0,48]],[[359,326],[-49,17],[-56,107],[-51,11]],[[189,472],[-34,68]],[[155,540],[-66,-39],[18,-66],[-54,-68],[8,-35]],[[61,332],[-21,-13],[-10,-12],[-13,5],[-17,-7]],[[464,234],[-84,18]],[[409,0],[-14,46],[61,110],[8,78]]],transform:{scale:[.003018276831896498,.0018697201537037245],translate:[20.35292839300007,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}},"60M":{type:"Topology",arcs:[[[235,156],[-13,46]],[[222,202],[-96,84]],[[117,293],[-21,42]],[[96,335],[-58,-129]],[[126,286],[-9,7]],[[38,206],[-38,-17]],[[287,145],[-52,11]],[[253,0],[34,145]]],transform:{scale:[.004879722822299564,.0030138772626866006],translate:[20.352928393000074,42.26281764300006]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000002,co:"F",oth:"F"}},{type:"LineString",arcs:[1],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000003,co:"F",oth:"F"}},{type:"LineString",arcs:[2],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000004,co:"F",oth:"F"}},{type:"LineString",arcs:[3],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000005,co:"F",oth:"F"}},{type:"LineString",arcs:[4],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000006,co:"F",oth:"F"}},{type:"LineString",arcs:[5],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000001,co:"F",oth:"F"}},{type:"LineString",arcs:[6],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000007,co:"F",oth:"F"}},{type:"LineString",arcs:[7],properties:{eu:"F",efta:"F",cc:"T",lvl:0,id:1000008,co:"F",oth:"F"}}]}}}}},2024:{3035:{"03M":{type:"Topology",arcs:[[[728,1508],[-48,12],[-22,18],[-15,-5],[-16,13],[-22,-4],[-10,8],[0,13],[21,13],[-16,17],[0,13],[58,9],[-5,8],[-10,22],[-16,17],[-27,25],[-21,13],[-32,26]],[[1912,0],[-6,30],[-42,51],[-32,0],[-21,30],[0,69],[53,8],[21,35],[43,4],[26,60],[-37,81],[96,129],[-16,51],[58,43],[0,9],[-21,64],[16,26],[5,34],[32,43],[-58,85]],[[250,942],[-27,-13],[-21,-17],[-21,-8],[-59,-73],[-16,0],[-26,17],[-43,-13],[-21,-21],[-16,0]],[[1657,861],[-27,13],[-21,-13],[-32,13],[-74,-9],[16,47],[-6,47],[11,26],[5,120]],[[1529,1105],[-100,-17],[-64,47],[-75,-17],[-63,94],[-6,60],[-5,13],[-16,38],[-42,13],[-22,-38],[-21,0],[-42,94],[-16,34],[0,30],[-21,30],[-32,0],[-38,30],[-42,-47],[-85,39],[-32,-9],[-10,-21]],[[547,1726],[-69,-60],[-53,-13],[-59,-73],[-111,-25],[32,-60],[58,-22],[16,-34],[37,-26],[16,-51],[-37,-39],[5,-30],[11,-34],[-37,-64],[-64,4],[-26,-51],[-22,-47],[-42,4],[-21,-34],[-11,-52],[37,-47],[43,-30]],[[797,1478],[-69,30]],[[2029,852],[-96,-38],[-32,-39],[-42,43],[-59,4],[-16,39],[-42,13],[-32,-22],[-53,9]]],transform:{scale:[56.97629608361119,58.91534666536319],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[242,508],[-33,47],[-27,27]],[[637,0],[-25,46],[-2,12],[30,29],[7,47],[34,75],[7,45],[-12,33]],[[83,318],[-32,-18],[-51,-26]],[[552,290],[-46,5],[3,78]],[[509,373],[-79,8],[-30,59],[-30,3],[-34,62],[-19,-1],[-52,-6]],[[182,582],[-55,-39],[-28,-25],[30,-56],[-5,-45],[-59,-62],[18,-37]],[[265,498],[-23,10]],[[676,287],[-43,-21],[-81,24]]],transform:{scale:[171.07449827433382,174.72145763645509],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[50,191],[-17,-11],[-8,-10],[-11,1],[-14,-6]],[[305,224],[-44,6],[-58,68],[-44,2]],[[109,350],[-52,-36],[21,-45],[-38,-54],[10,-24]],[[159,300],[-14,6]],[[145,306],[-36,44]],[[381,0],[-17,31],[41,85],[-1,57]],[[404,173],[-74,2]],[[330,175],[-20,15],[-5,34]]],transform:{scale:[286.13294356075795,290.536823841191],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[258,111],[-47,1]],[[32,123],[-32,-17]],[[211,112],[-16,32]],[[195,144],[-94,49]],[[70,225],[-38,-102]],[[101,193],[-8,4]],[[93,197],[-23,28]],[[243,0],[15,111]]],transform:{scale:[447.98943164212585,451.9461704196305],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}}},4326:{"03M":{type:"Topology",arcs:[[[1543,0],[-4,32],[-28,65],[-24,5],[-19,33],[10,70],[47,5],[23,33],[38,0],[28,59],[-19,92],[94,124],[-5,54],[56,37],[0,11],[-9,70],[19,27],[4,38],[38,38],[-42,102]],[[1750,895],[-85,-27],[-32,-37],[-29,54],[-56,16],[-5,43],[-32,16],[-33,-16],[-43,16]],[[1435,960],[-23,22],[-19,-11],[-28,16],[-66,5],[19,44],[0,54],[14,26],[19,125]],[[230,1262],[-24,-5],[-23,-16],[-19,-11],[-56,-65],[-14,0],[-24,27],[-37,-11],[-19,-21],[-14,5]],[[1351,1241],[-84,0],[-47,59],[-71,-6],[-42,114],[5,64],[-5,11],[-9,43],[-33,22],[-24,-38],[-23,6],[-23,108],[-5,37],[0,33],[-14,32],[-28,5],[-29,38],[-42,-43],[-70,54],[-28,-5],[-10,-22]],[[582,2055],[-66,-49],[-47,-5],[-61,-70],[-103,-11],[19,-70],[51,-32],[10,-38],[28,-32],[9,-54],[-37,-44],[4,-26],[5,-38],[-37,-65],[-61,11],[-29,-49],[-23,-48],[-33,11],[-28,-33],[-14,-54],[28,-54],[33,-43]],[[769,1753],[-56,48]],[[713,1801],[-42,17],[-14,21],[-19,0],[-9,16],[-19,0],[-10,6],[5,16],[19,11],[-9,21],[0,11],[51,0],[-5,11],[-4,22],[-10,26],[-23,27],[-19,22],[-23,27]]],transform:{scale:[.0007994261320208862,.0004913384355349169],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[539,0],[-17,52],[0,13],[30,27],[13,48],[41,74],[13,47],[-8,38]],[[611,299],[-41,-16],[-69,37]],[[501,320],[-41,13],[12,81]],[[80,421],[-31,-12],[-49,-20]],[[472,414],[-71,24],[-18,66],[-28,7],[-21,72],[-18,0],[-47,2]],[[203,686],[-54,-32],[-29,-22],[21,-63],[-12,-47],[-60,-57],[11,-44]],[[269,585],[-20,16]],[[249,601],[-25,53],[-21,32]]],transform:{scale:[.002290098349828638,.0014718665962452685],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[337,0],[-12,36],[51,84],[6,62]],[[382,182],[-69,13]],[[313,195],[-17,20],[-1,37]],[[50,256],[-17,-10],[-8,-8],[-11,3],[-14,-5]],[[295,252],[-40,13],[-46,82],[-41,9]],[[127,417],[-54,-30],[15,-51],[-44,-53],[6,-27]],[[168,356],[-12,10]],[[156,366],[-29,51]]],transform:{scale:[.0036618323062750017,.0024213440887871805],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[220,0],[29,116]],[[249,116],[-45,8]],[[204,124],[-12,37]],[[192,161],[-83,66]],[[109,227],[-8,6]],[[33,163],[-33,-12]],[[83,266],[-50,-103]],[[101,233],[-18,33]]],transform:{scale:[.005617750767056427,.003795866485053587],translate:[20.35361768088405,42.262163108155406]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:"1000008",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:"1000007",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:"1000002",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:"1000003",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:"1000006",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[5],properties:{id:"1000001",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[6],properties:{id:"1000005",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[7],properties:{id:"1000004",lvl:0,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}}}}};function nf(t,e,n){var i=qt(t,e-Ta,n).concat(e);return function(t){return i.map((function(e){return[t,e]}))}}function rf(t,e,n){var i=qt(t,e-Ta,n).concat(e);return function(t){return i.map((function(e){return[e,t]}))}}function af(){var t,e,n,i,r,a,o,s,l,c,u,h,f=10,d=f,p=90,g=360,_=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return qt(Ra(i/p)*p,n,p).map(u).concat(qt(Ra(s/g)*g,o,g).map(h)).concat(qt(Ra(e/f)*f,t,f).filter((function(t){return za(t%p)>Ta})).map(l)).concat(qt(Ra(a/d)*d,r,d).filter((function(t){return za(t%g)>Ta})).map(c))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(i).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],i>n&&(t=i,i=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(_)):[[i,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],r=+n[1][1],e>t&&(n=e,e=t,t=n),a>r&&(n=a,a=r,r=n),m.precision(_)):[[e,a],[t,r]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(_=+f,l=nf(a,r,90),c=rf(e,t,_),u=nf(s,o,90),h=rf(i,n,_),m):_},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function of(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function sf(t,e){let n;return(i,r)=>(()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=of(i),n.then((t=>{t.onclose=()=>n=void 0}),(()=>{})),n})().then((t=>r(t.transaction(e,i).objectStore(e))))}let lf;function cf(){return lf||(lf=sf("keyval-store","keyval")),lf}function uf(t,e=cf()){return e("readonly",(e=>of(e.get(t))))}function hf(t,e,n=cf()){return n("readwrite",(n=>(n.put(e,t),of(n.transaction))))}var ff=function(t,e){var n={};return n.defaultGeoData=void 0,n.allNUTSGeoData=void 0,n.geoJSONs={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0},n.userGeometries=void 0,n.statisticalRegions=void 0,n.centroidsData=void 0,n.centroidsFeatures=void 0,n._allCentroidsFeatures=void 0,n.getRegionFeatures=function(){return"WORLD"==t.geo_?n.geoJSONs.worldrg:"mixed"===t.nutsLevel_?[n.geoJSONs.mixed.rg0,n.geoJSONs.mixed.rg1,n.geoJSONs.mixed.rg2,n.geoJSONs.mixed.rg3]:n.geoJSONs.nutsrg.concat(n.geoJSONs.cntrg)},n.getDefaultGeoData=function(t,i,r){var a=n.getDefaultGeoDataPromise();return Promise.all(a).then((function(a){return i&&(a=i(a)),n.allNUTSGeoData=a,n.defaultGeoData=a[0],e&&(n.centroidsData="mixed"===r?[a[4],a[5],a[6],a[7]]:a[1]),"WORLD"===t?(n.geoJSONs.worldrg=Qh(n.defaultGeoData,n.defaultGeoData.objects.CNTR_RG_20M_2020_4326).features,n.geoJSONs.worldbn=Qh(n.defaultGeoData,n.defaultGeoData.objects.CNTR_BN_20M_2020_4326).features,n.geoJSONs.kosovo=Qh(n.defaultGeoData,n.defaultGeoData.objects.NUTS_BN_20M_2021_RS_XK_border).features,n.geoJSONs.graticule=[af().step([30,30])()]):(n.geoJSONs.graticule=Qh(n.defaultGeoData,n.defaultGeoData.objects.gra).features,n.geoJSONs.nutsrg=Qh(n.defaultGeoData,n.defaultGeoData.objects.nutsrg).features,n.geoJSONs.nutsbn=Qh(n.defaultGeoData,n.defaultGeoData.objects.nutsbn).features,n.geoJSONs.cntrg=Qh(n.defaultGeoData,n.defaultGeoData.objects.cntrg).features,n.geoJSONs.cntbn=Qh(n.defaultGeoData,n.defaultGeoData.objects.cntbn).features),a})).catch((function(t){return Promise.reject(t)}))},n.getDefaultGeoDataPromise=function(){var n=[0,1,2,3],i=[],r=function(t,e,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s="".concat(t,"/").concat(e);return n&&"EUR"!==n&&"WORLD"!==n&&(s+="/".concat(n)),s+="/".concat("WORLD"==n?"4326":i),!o&&r&&(s+="/".concat(r)),s+="/".concat(o?"nutspt_":"").concat(a,".json")},a=function(){var t=$h(Jh().mark((function t(e){var n,i,r,a,o;return Jh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="geojson-cache:".concat(e),t.prev=1,t.next=4,uf(n);case 4:if(!(i=t.sent)){t.next=10;break}if(r=i.timestamp,a=i.data,!(Date.now()-r<864e5)){t.next=10;break}return t.abrupt("return",a);case 10:t.next=16;break;case 12:throw t.prev=12,t.t0=t.catch(1),console.warn("Error reading from IndexedDB cache for ".concat(e,":"),t.t0),t.t0;case 16:return t.next=18,Kh(e);case 18:return o=t.sent,t.prev=19,t.next=22,hf(n,{timestamp:Date.now(),data:o});case 22:t.next=28;break;case 24:throw t.prev=24,t.t1=t.catch(19),console.warn("Could not cache data in IndexedDB for ".concat(e,":"),t.t1),t.t1;case 28:return t.abrupt("return",o);case 29:case"end":return t.stop()}}),t,null,[[1,12],[19,24]])})));return function(e){return t.apply(this,arguments)}}();if(!t||!t.nuts2jsonBaseURL_)throw new Error("Missing required map context or configuration");if("mixed"===t.nutsLevel_&&"WORLD"!==t.geo_)n.forEach((function(e){var n=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e);i.push(a(n))})),e&&n.forEach((function(e){var n=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e,!0);i.push(a(n))}));else if("WORLD"===t.geo_){var o=window.location.hostname.includes("ec.europa.eu")?"https://ec.europa.eu/assets/estat/E/E4/gisco/IMAGE/WORLD_4326.json":"https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json";i.push(a(o))}else{var s=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_);if(i.push(a(s)),e){var l=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_,!0);i.push(a(l))}}return i},n.isGeoReady=function(){if(!n.defaultGeoData&&!n.userGeometries)return!1;var e=!0;return va(t.insetTemplates_,null,(function(t){t.Geometries.isGeoReady()||(e=!1)})),e},n.setUserGeometries=function(t){var e=this;this.userGeometries=t,t.forEach((function(t){t.statisticalRegions&&(e.statisticalRegions=t)}))},n.addDefaultGeometriesToMap=function(t,e,i,r,a,o,s,l){this.geoJSONs.graticule&&e&&t.append("g").attr("id","em-graticule").attr("class","em-graticule").selectAll("path").data(this.geoJSONs.graticule).enter().append("path").attr("d",i),this.geoJSONs.cntrg&&t.append("g").attr("id","em-cntrg").attr("class","em-cntrg").selectAll("path").data(this.geoJSONs.cntrg).enter().append("path").attr("d",i).attr("id",(function(t){var e=t.properties.id;if("RS"==e||"EL"==e)return"em-cntrg-"+e})),this.geoJSONs.worldrg&&t.append("g").attr("id","em-worldrg").attr("class","em-worldrg").selectAll("path").data(this.geoJSONs.worldrg).enter().append("path").attr("d",i),this.geoJSONs.nutsrg&&("mixed"==r?(this.geoJSONs.mixed.rg0=this.geoJSONs.nutsrg,this.geoJSONs.mixed.rg1=Qh(n.allNUTSGeoData[1],n.allNUTSGeoData[1].objects.nutsrg).features,this.geoJSONs.mixed.rg2=Qh(n.allNUTSGeoData[2],n.allNUTSGeoData[2].objects.nutsrg).features,this.geoJSONs.mixed.rg3=Qh(n.allNUTSGeoData[3],n.allNUTSGeoData[3].objects.nutsrg).features,[this.geoJSONs.mixed.rg0,this.geoJSONs.mixed.rg1,this.geoJSONs.mixed.rg2,this.geoJSONs.mixed.rg3].forEach((function(e,n){t.append("g").attr("id","em-nutsrg").attr("class","em-nutsrg em-nutsrg-".concat(n)).selectAll("path").data(e).enter().append("path").attr("d",i).attr("lvl",n)})),"EUR"!=o||"3035"!=s&&"4326"!=s||function(t,e,n,i,r){var a=ef[r]?ef[r][n][i]:ef[2024][n][i],o=Qh(a,"nutsbn_1").features;t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn em-bn-cc").selectAll("path").data(o).enter().append("path").attr("d",e)}(t,i,s,l,a)):t.append("g").attr("id","em-nutsrg").attr("class","em-nutsrg").selectAll("path").data(this.geoJSONs.nutsrg).enter().append("path").attr("d",i)),this.geoJSONs.cntbn&&t.append("g").attr("id","em-cntbn").attr("class","em-cntbn").selectAll("path").data(this.geoJSONs.cntbn).enter().append("path").filter((function(t){return"T"==t.properties.eu||"T"==t.properties.efta||"T"==t.properties.cc||"T"==t.properties.oth||"T"==t.properties.co?t:void 0})).attr("d",i).attr("id",(function(t){return"em-bn-"+t.properties.id})).attr("class",(function(t){var e=[];return"T"===t.properties.eu&&e.push("em-bn-eu"),"T"===t.properties.efta&&e.push("em-bn-efta"),"T"===t.properties.cc&&e.push("em-bn-cc"),"T"===t.properties.oth&&e.push("em-bn-oth"),"T"===t.properties.co&&e.push("em-bn-co"),e.join(" ")})),this.geoJSONs.nutsbn&&"mixed"!==r&&(this.geoJSONs.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),t.append("g").attr("id","em-nutsbn").attr("class","em-nutsbn").selectAll("path").data(this.geoJSONs.nutsbn).enter().filter((function(t){return"T"==t.properties.eu||"T"==t.properties.efta||"T"==t.properties.cc||"T"==t.properties.oth||"T"==t.properties.co?t:void 0})).append("path").attr("d",i).attr("class",(function(t){var e=t.properties;return e.id>1e5?"em-kosovo-bn":"T"===e.co?"em-bn-co":["em-bn-"+e.lvl].join(" ")}))),this.geoJSONs.worldbn&&t.append("g").attr("id","em-worldbn").attr("class","em-worldbn").selectAll("path").data(this.geoJSONs.worldbn).enter().append("path").attr("d",i).attr("class",(function(t){return t.properties.POL_STAT>0?"em-bn-d":"T"===t.properties.COAS_FLAG?"em-bn-co":"em-worldbn"})),this.geoJSONs.kosovo&&t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn").selectAll("path").data(this.geoJSONs.kosovo).enter().append("path").attr("d",i)},n.addUserGeometriesToMap=function(t,e,n){t.forEach((function(t){var i=e.append("g").attr("id",t.statisticalRegions?"em-user-regions":"").attr("class",t.class?t.class:"").selectAll("path").data(t.features).enter().append("path").attr("d",n);"function"==typeof t.onEach&&t.onEach(i)}))},n},df=function(t,e,n){var i=om(t,n);for(var r in(t=t||{}).proj=t.proj||gf[t.geo],t.scale=t.scale||e.insetScale_,t.footnote=t.footnote||"",t.showSourceLink=t.showSourceLink||!1,t.zoomExtent=t.zoomExtent||e.insetZoomExtent_,t.width=t.width||e.insetBoxWidth_,t.height=t.height||e.insetBoxWidth_,t.insets=t.insets||[],t.insetTemplates=t.insetTemplates||{},t.callback=t.callback||void 0,["nutsLevel_","nutsYear_","hoverColor_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","lg_","projectionFunction_","filterGeometriesFunction_","processCentroids_"].forEach((function(t){i[t]=e[t]})),["stat","statData","legend","legendObj","noDataText","language","transitionDuration","tooltip_","classToText_"].forEach((function(t){i[t]=e[t]})),t)i[r+"_"]=t[r];return i.isInset=!0,i},pf=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],i=0;i<n.length;i++)n[i].drawGraticule=!1;return n},gf={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"},_f=function(t,e){if(e.svg_&&(e.svg_.select("#em-stamp").remove(),t)){var n=e.svg_.append("g").attr("id","em-stamp");t.size||(t.size=60),t.x||(t.x=230),t.y||(t.y=100),t.textColor||(t.textColor="#000"),t.stampColor||(t.stampColor="#000"),t.strokeWidth||(t.strokeWidth=1),t.lineHeight||(t.lineHeight=15),n.append("circle").attr("r",t.size).attr("cx",t.x).attr("cy",t.y).attr("id","em-stamp-circle").attr("fill","none").attr("stroke",t.stampColor).attr("stroke-width",t.strokeWidth);var i=t.text,r=Math.sqrt(vf(i.trim())*t.lineHeight),a=xf(mf(i.trim()),r),o=yf(a,t.lineHeight);n.append("text").attr("text-anchor","middle").attr("fill",t.textColor).attr("id","em-stamp-text").attr("transform","translate(".concat(t.x,",").concat(t.y,") scale(").concat(t.size/o,")")).selectAll("tspan").data(a).enter().append("tspan").attr("x",0).attr("y",(function(e,n){return(n-a.length/2+.8)*t.lineHeight})).text((function(t){return t.text.replaceAll("~"," ").replaceAll("¶","")}))}},mf=function(t){return t.split(/(?<=¶)|\s+/g).map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},vf=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","text");n.textContent=t,e.appendChild(n),document.body.appendChild(e);var i=n.getComputedTextLength();return document.body.removeChild(e),i+10},yf=function(t,e){for(var n=0,i=0,r=t.length;i<r;++i){var a=(Math.abs(i-r/2+.5)+.5)*e,o=t[i].width/2;n=Math.max(n,Math.sqrt(Math.pow(o,2)+Math.pow(a,2)))}return n},xf=function(t,e){for(var n=[],i={width:0,text:""},r=0,a=t.length;r<a;++r)if("¶"!==t[r]){var o=(i.text?i.text+" ":"")+t[r],s=vf(o);(i.width+s)/2<e?(i.width=s,i.text=o):(n.push(i),i={width:vf(t[r]),text:t[r]})}else i.text&&n.push(i),i={width:0,text:""};return i.text&&n.push(i),n},bf={},wf={};function Sf(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Mf(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var i in t)i in e||n.push(e[i]=i)})),n}function Ef(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function kf(t){var e,n=t.getUTCHours(),i=t.getUTCMinutes(),r=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ef(-e,6):e>9999?"+"+Ef(e,6):Ef(e,4))+"-"+Ef(t.getUTCMonth()+1,2)+"-"+Ef(t.getUTCDate(),2)+(a?"T"+Ef(n,2)+":"+Ef(i,2)+":"+Ef(r,2)+"."+Ef(a,3)+"Z":r?"T"+Ef(n,2)+":"+Ef(i,2)+":"+Ef(r,2)+"Z":i||n?"T"+Ef(n,2)+":"+Ef(i,2)+"Z":"")}function Cf(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],a=t.length,o=0,s=0,l=a<=0,c=!1;function u(){if(l)return wf;if(c)return c=!1,bf;var e,i,r=o;if(34===t.charCodeAt(r)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?l=!0:10===(i=t.charCodeAt(o++))?c=!0:13===i&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(i=t.charCodeAt(e=o++)))c=!0;else if(13===i)c=!0,10===t.charCodeAt(o)&&++o;else if(i!==n)continue;return t.slice(r,e)}return l=!0,t.slice(r,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(i=u())!==wf;){for(var h=[];i!==bf&&i!==wf;)h.push(i),i=u();e&&null==(h=e(h,s++))||r.push(h)}return r}function r(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?kf(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,a=i(t,(function(t,i){if(n)return n(t,i-1);r=t,n=e?function(t,e){var n=Sf(t);return function(i,r){return e(n(i),r,t)}}(t,e):Sf(t)}));return a.columns=r||[],a},parseRows:i,format:function(e,n){return null==n&&(n=Mf(e)),[n.map(o).join(t)].concat(r(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Mf(t)),r(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Tf,Af=Cf(","),Pf=Af.parse,Ff=Af.parseRows,Lf=(Af.format,Af.formatBody,Af.formatRows,Af.formatRow,Af.formatValue,function(t){return t.gridCartogramPositions_||("hexagon"===t.gridCartogramShape_?"\n ,IS, , , , , , , , , , ,\n , , , ,NO,SE,FI,EE, , , , ,\n , , , , , , ,LV, , , , ,\n ,IE,UK, , ,DK, ,LT, , , , ,\n , , , ,NL,DE,PL, , , , , ,\n , , ,BE,LU,CZ,SK,UA, , , , ,\n , ,FR,CH,LI,AT,HU,RO,MD, , , ,\n ,PT,ES, ,IT,SI,HR,RS,BG, , , ,\n , , , , , ,BA,ME,MK, , , , \n , , , , , , ,AL,EL,TR,GE, , \n , , , ,MT, , , , ,CY, , , ":"\n ,IS, , ,NO,SE,FI, , , , , ,\n , , , , , , ,EE, , , , ,\n , , , , , , ,LV, , , , ,\n ,IE,UK, , ,DK, ,LT, , , , ,\n , , , ,NL,DE,PL, , , , , ,\n , , ,BE,LU,CZ,SK,UA, , , , ,\n , ,FR,CH,LI,AT,HU,RO,MD, , , ,\n ,PT,ES, ,IT,SI,HR,RS,BG, , , ,\n , , , , , ,BA,ME,MK, , , , \n , , , , , , ,AL,EL,TR,GE, , \n , , , ,MT, , , , ,CY, , , ")}),Nf=function(t){var e=new Map;return Ff(t.trim(),(function(t,n){t.forEach((function(t,i){(t=t.trim())&&e.set(t,[i,n])}))})),e},Of=function(t,e){return Array.from(t,(function(t){var n=y(t,2),i=n[0],r=y(n[1],2),a=r[0],o=r[1],s=e.Geometries.geoJSONs.nutsrg.find((function(t){return t.properties.id==i}));return{id:i,col:a,row:o,properties:{id:i,name:s?s.properties.na:""}}}))},zf=function(t,e,n){var i=Math.max.apply(Math,x(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,x(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,o=n.gridCartogramCellPadding_||0,s=(n.width_-a.left-a.right)/i-o,l=(n.height_-a.top-a.bottom)/r-o,c=Math.min(s,l);t.selectAll(".em-grid-cell").data(e).enter().append("g").attr("class","em-grid-cell").attr("transform",(function(t){return"translate(".concat(t.col*(c+o)+a.left,", ").concat(t.row*(c+o)+a.top,")")})).each((function(t){Ot(this).append("rect").attr("width",c).attr("height",c).attr("class","em-grid-rect"),Ot(this).append("text").attr("class","em-grid-text").attr("text-anchor","middle").attr("font-size",15).style("pointer-events","none").attr("fill","black").text(t.id).attr("x",c/2).attr("y",c/2+5)}))},Gf=function(t,e,n){var i=Math.max.apply(Math,x(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,x(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,o=n.gridCartogramCellPadding_||0,s=Math.min((n.width_-a.left-a.right)/(1.5*i),(n.height_-a.top-a.bottom)/(r*Math.sqrt(3))),l=Math.sqrt(3)*s;t.selectAll(".em-grid-cell").data(e).enter().append("g").attr("class","em-grid-cell").attr("transform",(function(t){var e=t.col*(1.5*s+o)+a.left,n=t.row*(l+o)+(t.col%2==1?(l+o)/2:0)+a.top;return"translate(".concat(e,", ").concat(n,")")})).each((function(t){Ot(this).append("path").attr("d",Df(s)).attr("class","em-grid-hexagon"),Ot(this).append("text").attr("class","em-grid-text").attr("text-anchor","middle").attr("font-size",15).style("pointer-events","none").attr("fill","black").text(t.id).attr("y",5)}))},Df=function(t){var e=Math.PI/3;return Array.from({length:6},(function(n,i){var r=t*Math.cos(e*i),a=t*Math.sin(e*i);return"".concat(0===i?"M":"L").concat(r,",").concat(a)})).join(" ")+" Z"},If=function(t,e,n,i){t.each((function(){var r=this.getBBox(),a=(e-i.left-i.right-r.width)/2-r.x+i.left,o=(n-i.top-i.bottom-r.height)/2-r.y+i.top;t.attr("transform","translate(".concat(a,", ").concat(o,")"))}))};function Rf(t,e){return[Ia(e)*ja(t),ja(e)]}Rf.invert=(Tf=Wa,function(t,e){var n=qa(t*t+e*e),i=Tf(n),r=ja(i),a=Ia(i);return[Da(t*r,n*a),Wa(n&&e*r/n)]});var jf=6378137,Bf=.0066943799901413165,qf=484813681109536e-20,Wf=Math.PI/2,Uf=1e-10,Hf=.017453292519943295,Vf=57.29577951308232,$f=Math.PI/4,Yf=2*Math.PI,Jf=3.14159265359,Xf={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const Kf=Xf,Zf={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var Qf=/[\s_\-\/\(\)]/g;function td(t,e){if(t[e])return t[e];for(var n,i=Object.keys(t),r=e.toLowerCase().replace(Qf,""),a=-1;++a<i.length;)if((n=i[a]).toLowerCase().replace(Qf,"")===r)return t[n]}function ed(t){var e,n,i,r={},a=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*Hf},lat_1:function(t){r.lat1=t*Hf},lat_2:function(t){r.lat2=t*Hf},lat_ts:function(t){r.lat_ts=t*Hf},lon_0:function(t){r.long0=t*Hf},lon_1:function(t){r.long1=t*Hf},lon_2:function(t){r.long2=t*Hf},alpha:function(t){r.alpha=parseFloat(t)*Hf},gamma:function(t){r.rectified_grid_angle=parseFloat(t)*Hf},lonc:function(t){r.longc=t*Hf},x_0:function(t){r.x0=parseFloat(t)},y_0:function(t){r.y0=parseFloat(t)},k_0:function(t){r.k0=parseFloat(t)},k:function(t){r.k0=parseFloat(t)},a:function(t){r.a=parseFloat(t)},b:function(t){r.b=parseFloat(t)},r:function(t){r.a=r.b=parseFloat(t)},r_a:function(){r.R_A=!0},zone:function(t){r.zone=parseInt(t,10)},south:function(){r.utmSouth=!0},towgs84:function(t){r.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){r.to_meter=parseFloat(t)},units:function(t){r.units=t;var e=td(Zf,t);e&&(r.to_meter=e.to_meter)},from_greenwich:function(t){r.from_greenwich=t*Hf},pm:function(t){var e=td(Kf,t);r.from_greenwich=(e||parseFloat(t))*Hf},nadgrids:function(t){"@null"===t?r.datumCode="none":r.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(r.axis=t)},approx:function(){r.approx=!0}};for(e in a)n=a[e],e in o?"function"==typeof(i=o[e])?i(n):r[i]=n:r[e]=n;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r}const nd=class{static getId(t){const e=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,r=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:e,name:n,conversion_factor:i,id:r?{authority:r[1],code:parseInt(r[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const t=i[1].toUpperCase();if("E"===t)n="east";else if("N"===t)n="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);n="up"}}else n=t[2]?t[2].toLowerCase():"unknown";const r=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),a=r?parseInt(r[1],10):null,o=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:e,direction:n,unit:this.convertUnit(o),order:a}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,e)=>(t.order||0)-(e.order||0)))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,e.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const n=t.find((t=>Array.isArray(t)&&"CS"===t[0]));n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(i){const t=this.convertUnit(i);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const r=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(r){const n=this.convert(r);"ENSEMBLE"===r[0]?e.datum_ensemble=n:e.datum=n;const i=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));i&&"Greenwich"!==i[1]&&(n.prime_meridian={name:i[1],longitude:parseFloat(i[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const a=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));a&&(e.accuracy=parseFloat(a[1]));const o=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]);t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,e.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const s=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(s){const t=s.find((t=>Array.isArray(t)));e.source_crs=t?this.convert(t):null}const l=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(l){const t=l.find((t=>Array.isArray(t)));e.target_crs=t?this.convert(t):null}const c=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));e.transformation=c?this.convert(c):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,e.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=u)})),u.conversion_factor&&1!==u.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:u});break;default:e.keyword=t[0]}return e}};const id=class extends nd{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}};const rd=class extends nd{static convert(t,e={}){super.convert(t,e);const n=t.find((t=>Array.isArray(t)&&"CS"===t[0]));n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));if(i){const t=i.find((t=>Array.isArray(t)&&"SCOPE"===t[0])),n=i.find((t=>Array.isArray(t)&&"AREA"===t[0])),r=i.find((t=>Array.isArray(t)&&"BBOX"===t[0]));e.usage={},t&&(e.usage.scope=t[1]),n&&(e.usage.area=n[1]),r&&(e.usage.bbox=r.slice(1))}return e}};function ad(t){const e=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0]))||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===e?rd:id).convert(t)}const od=function(t){var e=new dd(t);return e.output()};var sd=1,ld=/\s/,cd=/[A-Za-z]/,ud=/[A-Za-z84_]/,hd=/[,\]]/,fd=/[\d\.E\-\+]/;function dd(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=sd}function pd(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var i=e?{}:t,r=n.reduce((function(t,e){return gd(e,t),t}),i);e&&(t[e]=r)}function gd(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void gd(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var i;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&gd(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&gd(t[3],e[n]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void pd(e,n,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],pd(e,n,t),void(e[n].type=n);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return gd(t,e[n]);return pd(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}dd.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;ld.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case sd:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},dd.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(hd.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},dd.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=sd)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=sd,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},dd.prototype.number=function(t){if(!fd.test(t)){if(hd.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},dd.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},dd.prototype.keyword=function(t){if(ud.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=sd)}if(!hd.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},dd.prototype.neutral=function(t){if(cd.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(fd.test(t))return this.word=t,void(this.state=3);if(!hd.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},dd.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function _d(t){return.017453292519943295*t}function md(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==e&&"lambert azimuthal equal area"!==e||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=_d(t.lat0>0?90:-90),delete t.lat1):(t.lat0=_d(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function vd(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function yd(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function xd(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=yd(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-yd(t.ellipsoid.semi_minor_axis))))}function bd(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(bd(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map((t=>t.value))),e):(Object.keys(t).forEach((n=>{const i=t[n];if(null!==i)switch(n){case"name":if(e.srsCode)break;e.name=i,e.srsCode=i;break;case"type":"GeographicCRS"===i?e.projName="longlat":"ProjectedCRS"===i&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(e.ellps=i.ellipsoid.name,xd(i,e)),i.prime_meridian&&(e.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=i.name,xd(i,e);break;case"prime_meridian":e.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis)if(e.axis=i.axis.map((t=>{const e=t.direction;if("east"===e)return"e";if("north"===e)return"n";if("west"===e)return"w";if("south"===e)return"s";throw new Error(`Unknown axis direction: ${e}`)})).join("")+"u",i.unit){const{units:t,to_meter:n}=vd(i.unit);e.units=t,e.to_meter=n}else if(i.axis[0]&&i.axis[0].unit){const{units:t,to_meter:n}=vd(i.axis[0].unit);e.units=t,e.to_meter=n}break;case"id":i.authority&&i.code&&(e.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(e.projName=i.method.name),i.parameters&&i.parameters.forEach((t=>{const n=t.name.toLowerCase().replace(/\s+/g,"_"),i=t.value;t.unit&&t.unit.conversion_factor?e[n]=i*t.unit.conversion_factor:"degree"===t.unit?e[n]=i*Math.PI/180:e[n]=i}));break;case"unit":i.name&&(e.units=i.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),i.conversion_factor&&(e.to_meter=i.conversion_factor);break;case"base_crs":bd(i,e),e.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name}})),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),md(e),e):t}var wd=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Sd(t){for(var e=Object.keys(t),n=0,i=e.length;n<i;++n){var r=e[n];-1!==wd.indexOf(r)&&Md(t[r]),"object"==typeof t[r]&&Sd(t[r])}}function Md(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var n="",i=0,r=t.AXIS.length;i<r;++i){var a=[t.AXIS[i][0].toLowerCase(),t.AXIS[i][1].toLowerCase()];-1!==a[0].indexOf("north")||("y"===a[0]||"lat"===a[0])&&"north"===a[1]?n+="n":-1!==a[0].indexOf("south")||("y"===a[0]||"lat"===a[0])&&"south"===a[1]?n+="s":-1!==a[0].indexOf("east")||("x"===a[0]||"lon"===a[0])&&"east"===a[1]?n+="e":-1===a[0].indexOf("west")&&("x"!==a[0]&&"lon"!==a[0]||"west"!==a[1])||(n+="w")}2===n.length&&(n+="u"),3===n.length&&(t.axis=n)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function s(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=_d(t.rectified_grid_angle));[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",_d],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",_d],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",_d],["lat0","latitude_of_origin",_d],["lat0","standard_parallel_1",_d],["lat1","standard_parallel_1",_d],["lat2","standard_parallel_2",_d],["azimuth","Azimuth"],["alpha","azimuth",_d],["srsCode","name"]].forEach((function(e){return function(t,e){var n=e[0],i=e[1];!(n in t)&&i in t&&(t[n]=t[i],3===e.length&&(t[n]=e[2](t[n])))}(t,e)})),md(t)}function Ed(t){if("object"==typeof t)return bd(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var n=od(t);if("WKT2"===e){return bd(ad(n))}var i=n[0],r={};return gd(n,r),Sd(r),r[i]}function kd(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?kd[t]=ed(arguments[1]):kd[t]=Ed(arguments[1]):kd[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){return Array.isArray(t)?kd.apply(e,t):kd(t)}));if("string"==typeof t){if(t in kd)return kd[t]}else"EPSG"in t?kd["EPSG:"+t.EPSG]=t:"ESRI"in t?kd["ESRI:"+t.ESRI]=t:"IAU2000"in t?kd["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(kd);const Cd=kd;var Td=["3857","900913","3785","102113"];const Ad=function(t){if(!function(t){return"string"==typeof t}(t))return"projName"in t?t:Ed(t);if(function(t){return t in Cd}(t))return Cd[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=Ed(t);if(function(t){var e=td(t,"authority");if(e){var n=td(e,"epsg");return n&&Td.indexOf(n)>-1}}(e))return Cd["EPSG:3857"];var n=function(t){var e=td(t,"extension");if(e)return td(e,"proj4")}(e);return n?ed(n):e}return function(t){return"+"===t[0]}(t)?ed(t):void 0};function Pd(t,e){var n,i;if(t=t||{},!e)return t;for(i in e)void 0!==(n=e[i])&&(t[i]=n);return t}function Fd(t,e,n){var i=t*e;return n/Math.sqrt(1-i*i)}function Ld(t){return t<0?-1:1}function Nd(t){return Math.abs(t)<=Jf?t:t-Ld(t)*Yf}function Od(t,e,n){var i=t*n,r=.5*t;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(Wf-e))/i}function zd(t,e){for(var n,i,r=.5*t,a=Wf-2*Math.atan(e),o=0;o<=15;o++)if(n=t*Math.sin(a),a+=i=Wf-2*Math.atan(e*Math.pow((1-n)/(1+n),r))-a,Math.abs(i)<=1e-10)return a;return-9999}const Gd={init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Fd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,n,i=t.x,r=t.y;if(r*Vf>90&&r*Vf<-90&&i*Vf>180&&i*Vf<-180)return null;if(Math.abs(Math.abs(r)-Wf)<=Uf)return null;if(this.sphere)e=this.x0+this.a*this.k0*Nd(i-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan($f+.5*r));else{var a=Math.sin(r),o=Od(this.e,r,a);e=this.x0+this.a*this.k0*Nd(i-this.long0),n=this.y0-this.a*this.k0*Math.log(o)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,i=t.x-this.x0,r=t.y-this.y0;if(this.sphere)n=Wf-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(-9999===(n=zd(this.e,a)))return null}return e=Nd(this.long0+i/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]};function Dd(t){return t}var Id=[Gd,{init:function(){},forward:Dd,inverse:Dd,names:["longlat","identity"]}],Rd={},jd=[];function Bd(t,e){var n=jd.length;return t.names?(jd[n]=t,t.names.forEach((function(t){Rd[t.toLowerCase()]=n})),this):(console.log(e),!0)}function qd(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const Wd={start:function(){Id.forEach(Bd)},add:Bd,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==Rd[e]&&jd[Rd[e]]||(e=qd(e))in Rd&&jd[Rd[e]]?jd[Rd[e]]:void 0}};const Ud={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},Hd=Ud.WGS84;var Vd={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var $d in Vd){var Yd=Vd[$d];Yd.datumName&&(Vd[Yd.datumName]=Yd)}const Jd=Vd;const Xd=function(t,e,n,i,r,a,o){var s={};return s.datum_type=void 0===t||"none"===t?5:4,e&&(s.datum_params=e.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=1),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=2,s.datum_params[3]*=qf,s.datum_params[4]*=qf,s.datum_params[5]*=qf,s.datum_params[6]=s.datum_params[6]/1e6+1))),o&&(s.datum_type=3,s.grids=o),s.a=n,s.b=i,s.es=r,s.ep2=a,s};var Kd={};async function Zd(t,e){for(var n=[],i=await e.getImageCount(),r=i-1;r>=0;r--){var a=await e.getImage(r),o=await a.readRasters(),s=[a.getWidth(),a.getHeight()],l=a.getBoundingBox().map(tp),c=[a.fileDirectory.ModelPixelScale[0],a.fileDirectory.ModelPixelScale[1]].map(tp),u=l[0]+(s[0]-1)*c[0],h=l[3]-(s[1]-1)*c[1],f=o[0],d=o[1],p=[];for(let t=s[1]-1;t>=0;t--)for(let e=s[0]-1;e>=0;e--){var g=t*s[0]+e;p.push([-ep(d[g]),ep(f[g])])}n.push({del:c,lim:s,ll:[-u,h],cvs:p})}var _={header:{nSubgrids:i},subgrids:n};return Kd[t]=_,_}function Qd(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:Kd[t]||null,isNull:!1}}function tp(t){return t*Math.PI/180}function ep(t){return t/3600*Math.PI/180}function np(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function ip(t){return t.map((function(t){return[ep(t.longitudeShift),ep(t.latitudeShift)]}))}function rp(t,e,n){return{name:np(t,e+8,e+16).trim(),parent:np(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,n),upperLatitude:t.getFloat64(e+88,n),lowerLongitude:t.getFloat64(e+104,n),upperLongitude:t.getFloat64(e+120,n),latitudeInterval:t.getFloat64(e+136,n),longitudeInterval:t.getFloat64(e+152,n),gridNodeCount:t.getInt32(e+168,n)}}function ap(t,e,n,i,r){var a=e+176,o=16;!1===r&&(o=8);for(var s=[],l=0;l<n.gridNodeCount;l++){var c={latitudeShift:t.getFloat32(a+l*o,i),longitudeShift:t.getFloat32(a+l*o+4,i)};!1!==r&&(c.latitudeAccuracy=t.getFloat32(a+l*o+8,i),c.longitudeAccuracy=t.getFloat32(a+l*o+12,i)),s.push(c)}return s}function op(t,e){if(!(this instanceof op))return new op(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,e=e||function(t){if(t)throw t};var n=Ad(t);if("object"==typeof n){var i=op.projections.get(n.projName);if(i){if(n.datumCode&&"none"!==n.datumCode){var r=td(Jd,n.datumCode);r&&(n.datum_params=n.datum_params||(r.towgs84?r.towgs84.split(","):null),n.ellps=r.ellipse,n.datumName=r.datumName?r.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var a=function(t,e,n,i,r){if(!t){var a=td(Ud,i);a||(a=Hd),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<Uf)&&(r=!0,e=t),{a:t,b:e,rf:n,sphere:r}}(n.a,n.b,n.rf,n.ellps,n.sphere),o=function(t,e,n,i){var r=t*t,a=e*e,o=(r-a)/r,s=0;return i?(r=(t*=1-o*(.16666666666666666+o*(.04722222222222222+.022156084656084655*o)))*t,o=0):s=Math.sqrt(o),{es:o,e:s,ep2:(r-a)/a}}(a.a,a.b,a.rf,n.R_A),s=function(t){return void 0===t?null:t.split(",").map(Qd)}(n.nadgrids),l=n.datum||Xd(n.datumCode,n.datum_params,a.a,a.b,o.es,o.ep2,s);Pd(this,n),Pd(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=l,"init"in this&&"function"==typeof this.init&&this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}op.projections=Wd,op.projections.start();const sp=op;function lp(t,e,n){var i,r,a,o,s=t.x,l=t.y,c=t.z?t.z:0;if(l<-Wf&&l>-1.001*Wf)l=-Wf;else if(l>Wf&&l<1.001*Wf)l=Wf;else{if(l<-Wf)return{x:-1/0,y:-1/0,z:t.z};if(l>Wf)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),o=Math.cos(l),a=r*r,{x:((i=n/Math.sqrt(1-e*a))+c)*o*Math.cos(s),y:(i+c)*o*Math.sin(s),z:(i*(1-e)+c)*r}}function cp(t,e,n,i){var r,a,o,s,l,c,u,h,f,d,p,g,_,m,v,y=1e-12,x=t.x,b=t.y,w=t.z?t.z:0;if(r=Math.sqrt(x*x+b*b),a=Math.sqrt(x*x+b*b+w*w),r/n<y){if(m=0,a/n<y)return v=-i,{x:t.x,y:t.y,z:t.z}}else m=Math.atan2(b,x);o=w/a,h=(s=r/a)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*s*s)),f=o*l,_=0;do{_++,c=e*(u=n/Math.sqrt(1-e*f*f))/(u+(v=r*h+w*f-u*(1-e*f*f))),g=(p=o*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*h-(d=s*(1-c)*l)*f,h=d,f=p}while(g*g>1e-24&&_<30);return{x:m,y:Math.atan(p/Math.abs(d)),z:v}}function up(t){return 1===t||2===t}function hp(t,e,n){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return n;if(5===t.datum_type||5===e.datum_type)return n;var i=t.a,r=t.es;if(3===t.datum_type){if(0!==fp(t,!1,n))return;i=jf,r=Bf}var a=e.a,o=e.b,s=e.es;if(3===e.datum_type&&(a=jf,o=6356752.314,s=Bf),r===s&&i===a&&!up(t.datum_type)&&!up(e.datum_type))return n;if((n=lp(n,r,i),up(t.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(2===e){var i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6];return{x:c*(t.x-l*t.y+s*t.z)+i,y:c*(l*t.x+t.y-o*t.z)+r,z:c*(-s*t.x+o*t.y+t.z)+a}}}(n,t.datum_type,t.datum_params)),up(e.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(2===e){var i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=(t.x-i)/c,h=(t.y-r)/c,f=(t.z-a)/c;return{x:u+l*h-s*f,y:-l*u+h+o*f,z:s*u-o*h+f}}}(n,e.datum_type,e.datum_params)),n=cp(n,s,a,o),3===e.datum_type)&&0!==fp(e,!0,n))return;return n}function fp(t,e,n){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var i={x:-n.x,y:n.y},r={x:Number.NaN,y:Number.NaN},a=[];t:for(var o=0;o<t.grids.length;o++){var s=t.grids[o];if(a.push(s.name),s.isNull){r=i;break}if(null!==s.grid)for(var l=s.grid.subgrids,c=0,u=l.length;c<u;c++){var h=l[c],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,d=h.ll[0]-f,p=h.ll[1]-f,g=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,_=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(p>i.y||d>i.x||_<i.y||g<i.x)&&(r=dp(i,e,h),!isNaN(r.x)))break t}else if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*Vf+" "+i.y*Vf+" tried: '"+a+"'"),-1):(n.x=-r.x,n.y=r.y,0)}function dp(t,e,n){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var r={x:t.x,y:t.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=Nd(r.x-Math.PI)+Math.PI;var a=pp(r,n);if(e){if(isNaN(a.x))return i;a.x=r.x-a.x,a.y=r.y-a.y;var o,s,l=9;do{if(s=pp(a,n),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}o={x:r.x-(s.x+a.x),y:r.y-(s.y+a.y)},a.x+=o.x,a.y+=o.y}while(l--&&Math.abs(o.x)>1e-12&&Math.abs(o.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=Nd(a.x+n.ll[0]),i.y=a.y+n.ll[1]}else isNaN(a.x)||(i.x=t.x+a.x,i.y=t.y+a.y);return i}function pp(t,e){var n,i={x:t.x/e.del[0],y:t.y/e.del[1]},r=Math.floor(i.x),a=Math.floor(i.y),o=i.x-1*r,s=i.y-1*a,l={x:Number.NaN,y:Number.NaN};if(r<0||r>=e.lim[0])return l;if(a<0||a>=e.lim[1])return l;n=a*e.lim[0]+r;var c=e.cvs[n][0],u=e.cvs[n][1];n++;var h=e.cvs[n][0],f=e.cvs[n][1];n+=e.lim[0];var d=e.cvs[n][0],p=e.cvs[n][1];n--;var g=e.cvs[n][0],_=e.cvs[n][1],m=o*s,v=o*(1-s),y=(1-o)*(1-s),x=(1-o)*s;return l.x=y*c+v*h+x*g+m*d,l.y=y*u+v*f+x*_+m*p,l}function gp(t,e,n){var i,r,a,o=n.x,s=n.y,l=n.z||0,c={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==n.z)switch(0===a?(i=o,r=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(i=s,r=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(i=l,r="z"),t.axis[a]){case"e":case"n":c[r]=i;break;case"w":case"s":c[r]=-i;break;case"u":void 0!==n[r]&&(c.z=i);break;case"d":void 0!==n[r]&&(c.z=-i);break;default:return null}return c}function _p(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function mp(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function vp(t,e,n,i){var r,a=void 0!==(n=Array.isArray(n)?_p(n):{x:n.x,y:n.y,z:n.z,m:n.m}).z;if(function(t){mp(t.x),mp(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=vp(t,r=new sp("WGS84"),n,i),t=r),i&&"enu"!==t.axis&&(n=gp(t,!1,n)),"longlat"===t.projName)n={x:n.x*Hf,y:n.y*Hf,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=hp(t.datum,e.datum,n))return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*Vf,y:n.y*Vf,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),i&&"enu"!==e.axis?gp(e,!0,n):(n&&!a&&delete n.z,n)}var yp=sp("WGS84");function xp(t,e,n,i){var r,a,o;return Array.isArray(n)?(r=vp(t,e,n,i)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.slice(3)):[r.x,r.y,n[2]].concat(n.slice(3)):[r.x,r.y].concat(n.slice(2)):[r.x,r.y]):(a=vp(t,e,n,i),2===(o=Object.keys(n)).length||o.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;a[i]=n[i]})),a)}function bp(t){return t instanceof sp?t:"object"==typeof t&&"oProj"in t?t.oProj:sp(t)}const wp=function(t,e,n){var i,r,a,o=!1;return void 0===e?(r=bp(t),i=yp,o=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,r=bp(t),i=yp,o=!0),i||(i=bp(t)),r||(r=bp(e)),n?xp(i,r,n):(a={forward:function(t,e){return xp(i,r,t,e)},inverse:function(t,e){return xp(r,i,t,e)}},o&&(a.oProj=r),a)};var Sp="AJSAJS",Mp="AFAFAF",Ep=65,kp=73,Cp=79,Tp=86,Ap=90;const Pp={forward:Fp,inverse:function(t){var e=zp(Ip(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:Lp};function Fp(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,i="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(r=t.easting,a=t.northing,o=t.zoneNumber,s=Dp(o),l=Math.floor(r/1e5),c=Math.floor(a/1e5)%20,function(t,e,n){var i=n-1,r=Sp.charCodeAt(i),a=Mp.charCodeAt(i),o=r+t-1,s=a+e,l=!1;return o>Ap&&(o=o-Ap+Ep-1,l=!0),(o===kp||r<kp&&o>kp||(o>kp||r<kp)&&l)&&o++,(o===Cp||r<Cp&&o>Cp||(o>Cp||r<Cp)&&l)&&++o===kp&&o++,o>Ap&&(o=o-Ap+Ep-1),s>Tp?(s=s-Tp+Ep-1,l=!0):l=!1,(s===kp||a<kp&&s>kp||(s>kp||a<kp)&&l)&&s++,(s===Cp||a<Cp&&s>Cp||(s>Cp||a<Cp)&&l)&&++s===kp&&s++,s>Tp&&(s=s-Tp+Ep-1),String.fromCharCode(o)+String.fromCharCode(s)}(l,c,s))+n.substr(n.length-5,e)+i.substr(i.length-5,e);var r,a,o,s,l,c}(function(t){var e,n,i,r,a,o,s,l,c=t.lat,u=t.lon,h=6378137,f=.00669438,d=.9996,p=Np(c),g=Np(u);l=Math.floor((u+180)/6)+1,180===u&&(l=60);c>=56&&c<64&&u>=3&&u<12&&(l=32);c>=72&&c<84&&(u>=0&&u<9?l=31:u>=9&&u<21?l=33:u>=21&&u<33?l=35:u>=33&&u<42&&(l=37));s=Np(6*(l-1)-180+3),e=f/(1-f),n=h/Math.sqrt(1-f*Math.sin(p)*Math.sin(p)),i=Math.tan(p)*Math.tan(p),r=e*Math.cos(p)*Math.cos(p),a=Math.cos(p)*(g-s),o=h*((1-f/4-3*f*f/64-5*f*f*f/256)*p-(3*f/8+3*f*f/32+45*f*f*f/1024)*Math.sin(2*p)+(15*f*f/256+45*f*f*f/1024)*Math.sin(4*p)-35*f*f*f/3072*Math.sin(6*p));var _=d*n*(a+(1-i+r)*a*a*a/6+(5-18*i+i*i+72*r-58*e)*a*a*a*a*a/120)+5e5,m=d*(o+n*Math.tan(p)*(a*a/2+(5-i+9*r+4*r*r)*a*a*a*a/24+(61-58*i+i*i+600*r-330*e)*a*a*a*a*a*a/720));c<0&&(m+=1e7);return{northing:Math.round(m),easting:Math.round(_),zoneNumber:l,zoneLetter:Gp(c)}}({lat:t[1],lon:t[0]}),e)}function Lp(t){var e=zp(Ip(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Np(t){return t*(Math.PI/180)}function Op(t){return t/Math.PI*180}function zp(t){var e=t.northing,n=t.easting,i=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var a,o,s,l,c,u,h,f,d,p=.9996,g=6378137,_=.00669438,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=n-5e5,y=e;i<"N"&&(y-=1e7),h=6*(r-1)-180+3,a=.006739496752268451,d=(f=y/p/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*f)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*f)+151*m*m*m/96*Math.sin(6*f),o=g/Math.sqrt(1-_*Math.sin(d)*Math.sin(d)),s=Math.tan(d)*Math.tan(d),l=a*Math.cos(d)*Math.cos(d),c=.99330562*g/Math.pow(1-_*Math.sin(d)*Math.sin(d),1.5),u=v/(o*p);var x=d-o*Math.tan(d)/c*(u*u/2-(5+3*s+10*l-4*l*l-9*a)*u*u*u*u/24+(61+90*s+298*l+45*s*s-1.6983531815716497-3*l*l)*u*u*u*u*u*u/720);x=Op(x);var b,w=(u-(1+2*s+l)*u*u*u/6+(5-2*l+28*s-3*l*l+8*a+24*s*s)*u*u*u*u*u/120)/Math.cos(d);if(w=h+Op(w),t.accuracy){var S=zp({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:S.lat,right:S.lon,bottom:x,left:w}}else b={lat:x,lon:w};return b}function Gp(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function Dp(t){var e=t%6;return 0===e&&(e=6),e}function Ip(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,i=null,r="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;r+=e,a++}var o=parseInt(r,10);if(0===a||a+3>n)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(a++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;i=t.substring(a,a+=2);for(var l=Dp(o),c=function(t,e){var n=Sp.charCodeAt(e-1),i=1e5,r=!1;for(;n!==t.charCodeAt(0);){if(++n===kp&&n++,n===Cp&&n++,n>Ap){if(r)throw"Bad character: "+t;n=Ep,r=!0}i+=1e5}return i}(i.charAt(0),l),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n=Mp.charCodeAt(e-1),i=0,r=!1;for(;n!==t.charCodeAt(0);){if(++n===kp&&n++,n===Cp&&n++,n>Tp){if(r)throw"Bad character: "+t;n=Ep,r=!0}i+=1e5}return i}(i.charAt(1),l);u<Rp(s);)u+=2e6;var h=n-a;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,d,p,g=h/2,_=0,m=0;return g>0&&(f=1e5/Math.pow(10,g),d=t.substring(a,a+g),_=parseFloat(d)*f,p=t.substring(a+g),m=parseFloat(p)*f),{easting:_+c,northing:m+u,zoneLetter:s,zoneNumber:o,accuracy:f}}function Rp(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function jp(t,e,n){if(!(this instanceof jp))return new jp(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var i=t.split(",");this.x=parseFloat(i[0]),this.y=parseFloat(i[1]),this.z=parseFloat(i[2])||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}jp.fromMGRS=function(t){return new jp(Lp(t))},jp.prototype.toMGRS=function(t){return Fp([this.x,this.y],t)};const Bp=jp;var qp=.046875,Wp=.01953125,Up=.01068115234375;function Hp(t){var e=[];e[0]=1-t*(.25+t*(qp+t*(Wp+t*Up))),e[1]=t*(.75-t*(qp+t*(Wp+t*Up)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e}function Vp(t,e,n,i){return n*=e,e*=e,i[0]*t-n*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}function $p(t,e,n){for(var i=1/(1-e),r=t,a=20;a;--a){var o=Math.sin(r),s=1-e*o*o;if(r-=s=(Vp(r,o,Math.cos(r),n)-t)*(s*Math.sqrt(s))*i,Math.abs(s)<Uf)return r}return r}const Yp={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Hp(this.es),this.ml0=Vp(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,n,i,r=t.x,a=t.y,o=Nd(r-this.long0),s=Math.sin(a),l=Math.cos(a);if(this.es){var c=l*o,u=Math.pow(c,2),h=this.ep2*Math.pow(l,2),f=Math.pow(h,2),d=Math.abs(l)>Uf?Math.tan(a):0,p=Math.pow(d,2),g=Math.pow(p,2);e=1-this.es*Math.pow(s,2),c/=Math.sqrt(e);var _=Vp(a,s,l,this.en);n=this.a*(this.k0*c*(1+u/6*(1-p+h+u/20*(5-18*p+g+14*h-58*p*h+u/42*(61+179*g-g*p-479*p)))))+this.x0,i=this.a*(this.k0*(_-this.ml0+s*o*c/2*(1+u/12*(5-p+9*h+4*f+u/30*(61+g-58*p+270*h-330*p*h+u/56*(1385+543*g-g*p-3111*p))))))+this.y0}else{var m=l*Math.sin(o);if(Math.abs(Math.abs(m)-1)<Uf)return 93;if(n=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,i=l*Math.cos(o)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(i))>=1){if(m-1>Uf)return 93;i=0}else i=Math.acos(i);a<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=n,t.y=i,t},inverse:function(t){var e,n,i,r,a=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(n=$p(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(n)<Wf){var s=Math.sin(n),l=Math.cos(n),c=Math.abs(l)>Uf?Math.tan(n):0,u=this.ep2*Math.pow(l,2),h=Math.pow(u,2),f=Math.pow(c,2),d=Math.pow(f,2);e=1-this.es*Math.pow(s,2);var p=a*Math.sqrt(e)/this.k0,g=Math.pow(p,2);i=n-(e*=c)*g/(1-this.es)*.5*(1-g/12*(5+3*f-9*u*f+u-4*h-g/30*(61+90*f-252*u*f+45*d+46*u-g/56*(1385+3633*f+4095*d+1574*d*f)))),r=Nd(this.long0+p*(1-g/6*(1+2*f+u-g/20*(5+28*f+24*d+8*u*f+6*u-g/42*(61+662*f+1320*d+720*d*f))))/l)}else i=Wf*Ld(o),r=0;else{var _=Math.exp(a/this.k0),m=.5*(_-1/_),v=this.lat0+o/this.k0,y=Math.cos(v);e=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(m,2))),i=Math.asin(e),o<0&&(i=-i),r=0===m&&0===y?0:Nd(Math.atan2(m,y)+this.long0)}return t.x=r,t.y=i,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Jp(t){var e=Math.exp(t);return e=(e-1/e)/2}function Xp(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),i=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(i,2))}function Kp(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(Xp(1,e)+1))),t<0?-e:e}function Zp(t,e){for(var n,i=2*Math.cos(2*e),r=t.length-1,a=t[r],o=0;--r>=0;)n=i*a-o+t[r],o=a,a=n;return e+n*Math.sin(2*e)}function Qp(t,e,n){for(var i,r,a=Math.sin(e),o=Math.cos(e),s=Jp(n),l=function(t){var e=Math.exp(t);return(e+1/e)/2}(n),c=2*o*l,u=-2*a*s,h=t.length-1,f=t[h],d=0,p=0,g=0;--h>=0;)i=p,r=d,f=c*(p=f)-i-u*(d=g)+t[h],g=u*p-r+c*d;return[(c=a*l)*f-(u=o*s)*g,c*g+u*f]}const tg={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Yp.init.apply(this),this.forward=Yp.forward,this.inverse=Yp.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var i=Zp(this.cbg,this.lat0);this.Zb=-this.Qn*(i+function(t,e){for(var n,i=2*Math.cos(e),r=t.length-1,a=t[r],o=0;--r>=0;)n=i*a-o+t[r],o=a,a=n;return Math.sin(e)*n}(this.gtu,2*i))},forward:function(t){var e=Nd(t.x-this.long0),n=t.y;n=Zp(this.cbg,n);var i=Math.sin(n),r=Math.cos(n),a=Math.sin(e),o=Math.cos(e);n=Math.atan2(i,o*r),e=Math.atan2(a*r,Xp(i,r*o)),e=Kp(Math.tan(e));var s,l,c=Qp(this.gtu,2*n,2*e);return n+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*n+this.Zb)+this.y0):(s=1/0,l=1/0),t.x=s,t.y=l,t},inverse:function(t){var e,n,i=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var a=Qp(this.utg,2*r,2*i);r+=a[0],i+=a[1],i=Math.atan(Jp(i));var o=Math.sin(r),s=Math.cos(r),l=Math.sin(i),c=Math.cos(i);r=Math.atan2(o*c,Xp(l,c*s)),e=Nd((i=Math.atan2(l,c*s))+this.long0),n=Zp(this.cgb,r)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const eg={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(Nd(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*Hf,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,tg.init.apply(this),this.forward=tg.forward,this.inverse=tg.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function ng(t,e){return Math.pow((1-t)/(1+t),e)}const ig={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+$f)/(Math.pow(Math.tan(.5*this.lat0+$f),this.C)*ng(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+$f),this.C)*ng(this.e*Math.sin(n),this.ratexp))-Wf,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,i=Math.pow(Math.tan(.5*n+$f)/this.K,1/this.C),r=20;r>0&&(n=2*Math.atan(i*ng(this.e*Math.sin(t.y),-.5*this.e))-Wf,!(Math.abs(n-t.y)<1e-14));--r)t.y=n;return r?(t.x=e,t.y=n,t):null},names:["gauss"]};const rg={init:function(){ig.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,i,r;return t.x=Nd(t.x-this.long0),ig.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),i=Math.cos(t.x),r=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*i),t.x=r*n*Math.sin(t.x),t.y=r*(this.cosc0*e-this.sinc0*n*i),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,i,r,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Xp(t.x,t.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),n=Math.cos(o),r=Math.asin(n*this.sinc0+t.y*e*this.cosc0/a),i=Math.atan2(t.x*e,a*this.cosc0*n-t.y*this.sinc0*e)}else r=this.phic0,i=0;return t.x=i,t.y=r,ig.inverse.apply(this,[t]),t.x=Nd(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function ag(t,e,n){return e*=n,Math.tan(.5*(Wf+t))*Math.pow((1-e)/(1+e),.5*n)}const og={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Uf&&(this.k0=.5*(1+Ld(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Uf&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Uf&&Math.abs(Math.cos(this.lat_ts))>Uf&&(this.k0=.5*this.cons*Fd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Od(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Fd(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(ag(this.lat0,this.sinlat0,this.e))-Wf,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,i,r,a,o,s=t.x,l=t.y,c=Math.sin(l),u=Math.cos(l),h=Nd(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=Uf&&Math.abs(l+this.lat0)<=Uf?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*c+this.coslat0*u*Math.cos(h)),t.x=this.a*e*u*Math.sin(h)+this.x0,t.y=this.a*e*(this.coslat0*c-this.sinlat0*u*Math.cos(h))+this.y0,t):(n=2*Math.atan(ag(l,c,this.e))-Wf,r=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=Uf?(a=Od(this.e,l*this.con,this.con*c),o=2*this.a*this.k0*a/this.cons,t.x=this.x0+o*Math.sin(s-this.long0),t.y=this.y0-this.con*o*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)<Uf?(e=2*this.a*this.k0/(1+r*Math.cos(h)),t.y=e*i):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*r*Math.cos(h))),t.y=e*(this.cosX0*i-this.sinX0*r*Math.cos(h))+this.y0),t.x=e*r*Math.sin(h)+this.x0,t))},inverse:function(t){var e,n,i,r,a;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,n=this.lat0,o<=Uf?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(s)*this.sinlat0+t.y*Math.sin(s)*this.coslat0/o),e=Math.abs(this.coslat0)<Uf?this.lat0>0?Nd(this.long0+Math.atan2(t.x,-1*t.y)):Nd(this.long0+Math.atan2(t.x,t.y)):Nd(this.long0+Math.atan2(t.x*Math.sin(s),o*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=Uf){if(o<=Uf)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,i=o*this.cons/(2*this.a*this.k0),n=this.con*zd(this.e,i),e=this.con*Nd(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=Uf?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/o),e=Nd(this.long0+Math.atan2(t.x*Math.sin(r),o*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),n=-1*zd(this.e,Math.tan(.5*(Wf+a)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:ag};const sg={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,i=1/this.rf,r=2*i-Math.pow(i,2),a=this.e=Math.sqrt(r);this.R=this.k0*n*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+a*e)/(1-a*e));this.K=o-this.alpha*s+this.alpha*a/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(e+n)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+o/this.alpha,l=0,c=a,u=-1e3,h=0;Math.abs(c-u)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=s,t.y=c,t},names:["somerc"]};var lg=1e-7;const cg={init:function(){var t,e,n,i,r,a,o,s,l,c,u,h,f,d,p=0,g=0,_=0,m=0,v=0,y=0,x=0;this.no_off=(f=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],d="object"==typeof(h=this).projName?Object.keys(h.projName)[0]:h.projName,"no_uoff"in h||"no_off"in h||-1!==f.indexOf(d)||-1!==f.indexOf(qd(d))),this.no_rot="no_rot"in this;var b=!1;"alpha"in this&&(b=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),b&&(x=this.alpha),w&&(p=this.rectified_grid_angle),b||w)g=this.longc;else if(_=this.long1,v=this.lat1,m=this.long2,y=this.lat2,Math.abs(v-y)<=lg||(t=Math.abs(v))<=lg||Math.abs(t-Wf)<=lg||Math.abs(Math.abs(this.lat0)-Wf)<=lg||Math.abs(Math.abs(y)-Wf)<=lg)throw new Error;var S=1-this.es;e=Math.sqrt(S),Math.abs(this.lat0)>Uf?(s=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*s*s,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*e/t,(r=(i=this.B*e/(n*Math.sqrt(t)))*i-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(Od(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=i=r=1),b||w?(b?(u=Math.asin(Math.sin(x)/i),w||(p=x)):(u=p,x=Math.asin(i*Math.sin(u))),this.lam0=g-Math.asin(.5*(r-1/r)*Math.tan(u))/this.B):(a=Math.pow(Od(this.e,v,Math.sin(v)),this.B),o=Math.pow(Od(this.e,y,Math.sin(y)),this.B),r=this.E/a,l=(o-a)/(o+a),c=((c=this.E*this.E)-o*a)/(c+o*a),(t=_-m)<-Math.PI?m-=Yf:t>Math.PI&&(m+=Yf),this.lam0=Nd(.5*(_+m)-Math.atan(c*Math.tan(.5*this.B*(_-m))/l)/this.B),u=Math.atan(2*Math.sin(this.B*Nd(_-this.lam0))/(r-1/r)),p=x=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(p),this.cosrot=Math.cos(p),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan($f-r)),this.v_pole_s=this.ArB*Math.log(Math.tan($f+r))},forward:function(t){var e,n,i,r,a,o,s,l,c={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Wf)>Uf){if(e=.5*((a=this.E/Math.pow(Od(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/a)),n=.5*(a+o),r=Math.sin(this.B*t.x),i=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(i)-1)<Uf)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*t.x),s=Math.abs(o)<lg?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+r*this.singam,o)}else l=t.y>0?this.v_pole_n:this.v_pole_s,s=this.ArB*t.y;return this.no_rot?(c.x=s,c.y=l):(s-=this.u_0,c.x=l*this.cosrot+s*this.sinrot,c.y=s*this.cosrot-l*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function(t){var e,n,i,r,a,o,s,l={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,e=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),a=.5*(i+1/i),s=((o=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(s)-1)<Uf)l.x=0,l.y=s<0?-Wf:Wf;else{if(l.y=this.E/Math.sqrt((1+s)/(1-s)),l.y=zd(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return l.x+=this.lam0,l},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const ug={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Uf)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),i=Fd(this.e,e,n),r=Od(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=Fd(this.e,a,o),l=Od(this.e,this.lat2,a),c=Math.abs(Math.abs(this.lat0)-Wf)<Uf?0:Od(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Uf?this.ns=Math.log(i/s)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=Uf&&(n=Ld(n)*(Wf-2e-10));var i,r,a=Math.abs(Math.abs(n)-Wf);if(a>Uf)i=Od(this.e,n,Math.sin(n)),r=this.a*this.f0*Math.pow(i,this.ns);else{if((a=n*this.ns)<=0)return null;r=0}var o=this.ns*Nd(e-this.long0);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var e,n,i,r,a,o=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),n=1):(e=-Math.sqrt(o*o+s*s),n=-1);var l=0;if(0!==e&&(l=Math.atan2(n*o,n*s)),0!==e||this.ns>0){if(n=1/this.ns,i=Math.pow(e/(this.a*this.f0),n),-9999===(r=zd(this.e,i)))return null}else r=-Wf;return a=Nd(l/this.ns+this.long0),t.x=a,t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const hg={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y,u=Nd(l-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),i=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),a=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(r)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),t.y=s*Math.cos(o)/1,t.x=s*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,i,r,a,o,s,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),n=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),t.x=this.long0-n/this.alfa,o=e,s=0;var c=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(s=1),o=t.y,c+=1}while(0===s&&c<15);return c>=15?null:t},names:["Krovak","krovak"]};function fg(t,e,n,i,r){return t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}function dg(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function pg(t){return.375*t*(1+.25*t*(1+.46875*t))}function gg(t){return.05859375*t*t*(1+.75*t)}function _g(t){return t*t*t*(35/3072)}function mg(t,e,n){var i=e*n;return t/Math.sqrt(1-i*i)}function vg(t){return Math.abs(t)<Wf?t:t-Ld(t)*Math.PI}function yg(t,e,n,i,r){var a,o;a=t/e;for(var s=0;s<15;s++)if(a+=o=(t-(e*a-n*Math.sin(2*a)+i*Math.sin(4*a)-r*Math.sin(6*a)))/(e-2*n*Math.cos(2*a)+4*i*Math.cos(4*a)-6*r*Math.cos(6*a)),Math.abs(o)<=1e-10)return a;return NaN}const xg={init:function(){this.sphere||(this.e0=dg(this.es),this.e1=pg(this.es),this.e2=gg(this.es),this.e3=_g(this.es),this.ml0=this.a*fg(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Nd(i-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(r)*Math.sin(i)),n=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var a=Math.sin(r),o=Math.cos(r),s=mg(this.a,this.e,a),l=Math.tan(r)*Math.tan(r),c=i*Math.cos(r),u=c*c,h=this.es*o*o/(1-this.es);e=s*c*(1-u*l*(1/6-(8-l+8*h)*u/120)),n=this.a*fg(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*a/o*u*(.5+(5-l+6*h)*u/24)}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i=t.x/this.a,r=t.y/this.a;if(this.sphere){var a=r+this.lat0;e=Math.asin(Math.sin(a)*Math.cos(i)),n=Math.atan2(Math.tan(i),Math.cos(a))}else{var o=yg(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-Wf)<=Uf)return t.x=this.long0,t.y=Wf,r<0&&(t.y*=-1),t;var s=mg(this.a,this.e,Math.sin(o)),l=s*s*s/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(o),2),u=i*this.a/s,h=u*u;e=o-s*Math.tan(o)/l*u*u*(.5-(1+3*c)*u*u/24),n=u*(1-h*(c/3+(1+3*c)*c*h/15))/Math.cos(o)}return t.x=Nd(n+this.long0),t.y=vg(e),t},names:["Cassini","Cassini_Soldner","cass"]};function bg(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e}var wg=.3333333333333333,Sg=.17222222222222222,Mg=.10257936507936508,Eg=.06388888888888888,kg=.0664021164021164,Cg=.016415012942191543;const Tg={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-Wf)<Uf?this.mode=this.lat0<0?1:2:Math.abs(e)<Uf?this.mode=3:this.mode=4,this.es>0)switch(this.qp=bg(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*wg,e=t*t,n[0]+=e*Sg,n[1]=e*Eg,e*=t,n[0]+=e*Mg,n[1]+=e*kg,n[2]=e*Cg,n}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=bg(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,i,r,a,o,s,l,c,u,h=t.x,f=t.y;if(h=Nd(h-this.long0),this.sphere){if(a=Math.sin(f),u=Math.cos(f),i=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+u*i:1+this.sinph0*a+this.cosph0*u*i)<=Uf)return null;e=(n=Math.sqrt(2/n))*u*Math.sin(h),n*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(f+this.lat0)<Uf)return null;n=$f-.5*f,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(h),n*=i}}else{switch(s=0,l=0,c=0,i=Math.cos(h),r=Math.sin(h),a=Math.sin(f),o=bg(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(s=o/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:c=1+this.sinb1*s+this.cosb1*l*i;break;case this.EQUIT:c=1+l*i;break;case this.N_POLE:c=Wf+f,o=this.qp-o;break;case this.S_POLE:c=f-Wf,o=this.qp+o}if(Math.abs(c)<Uf)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),n=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*s-this.sinb1*l*i):(c=Math.sqrt(2/(1+l*i)))*s*this.ymf,e=this.xmf*c*l*r;break;case this.N_POLE:case this.S_POLE:o>=0?(e=(c=Math.sqrt(o))*r,n=i*(this.mode===this.S_POLE?c:-c)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i,r,a,o,s,l=t.x/this.a,c=t.y/this.a;if(this.sphere){var u,h=0,f=0;if((n=.5*(u=Math.sqrt(l*l+c*c)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(n),h=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(u)<=Uf?0:Math.asin(c*f/u),l*=f,c=h*u;break;case this.OBLIQ:n=Math.abs(u)<=Uf?this.lat0:Math.asin(h*this.sinph0+c*f*this.cosph0/u),l*=f*this.cosph0,c=(h-Math.sin(n)*this.sinph0)*u;break;case this.N_POLE:c=-c,n=Wf-n;break;case this.S_POLE:n-=Wf}e=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,c):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,c*=this.dd,(o=Math.sqrt(l*l+c*c))<Uf)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*o/this.rq),i=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=i*this.sinb1+c*r*this.cosb1/o,a=this.qp*s,c=o*this.cosb1*i-c*this.sinb1*r):(s=c*r/o,a=this.qp*s,c=o*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(c=-c),!(a=l*l+c*c))return t.x=this.long0,t.y=this.lat0,t;s=1-a/this.qp,this.mode===this.S_POLE&&(s=-s)}e=Math.atan2(l,c),n=function(t,e){var n=t+t;return t+e[0]*Math.sin(n)+e[1]*Math.sin(n+n)+e[2]*Math.sin(n+n+n)}(Math.asin(s),this.apa)}return t.x=Nd(this.long0+e),t.y=n,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Ag(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const Pg={init:function(){Math.abs(this.lat1+this.lat2)<Uf||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Fd(this.e3,this.sin_po,this.cos_po),this.qs1=bg(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Fd(this.e3,this.sin_po,this.cos_po),this.qs2=bg(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=bg(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Uf?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var i=bg(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,a=this.ns0*Nd(e-this.long0),o=r*Math.sin(a)+this.x0,s=this.rh-r*Math.cos(a)+this.y0;return t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1),r=0,0!==e&&(r=Math.atan2(i*t.x,i*t.y)),i=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,n)),a=Nd(r/this.ns0+this.long0),t.x=a,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,i,r,a,o=Ag(.5*e);if(t<Uf)return o;for(var s=t*t,l=1;l<=25;l++)if(o+=a=.5*(r=1-(i=t*(n=Math.sin(o)))*i)*r/Math.cos(o)*(e/(1-s)-n/r+.5/t*Math.log((1-i)/(1+i))),Math.abs(a)<=1e-7)return o;return null}};const Fg={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y;return i=Nd(l-this.long0),e=Math.sin(c),n=Math.cos(c),r=Math.cos(i),(a=this.sin_p14*e+this.cos_p14*n*r)>0||Math.abs(a)<=Uf?(o=this.x0+1*this.a*n*Math.sin(i)/a,s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)/a):(o=this.x0+this.infinity_dist*n*Math.sin(i),s=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*r)),t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(r=Math.atan2(e,this.rc),n=Math.sin(r),o=Ag((i=Math.cos(r))*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n),a=Nd(this.long0+a)):(o=this.phic0,a=0),t.x=a,t.y=o,t},names:["gnom"]};const Lg={init:function(){this.sphere||(this.k0=Fd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,i=t.x,r=t.y,a=Nd(i-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var o=bg(this.e,Math.sin(r));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=Nd(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*Wf:Wf;for(var i,r,a,o,s=Math.asin(.5*e),l=0;l<30;l++)if(r=Math.sin(s),a=Math.cos(s),o=t*r,s+=i=Math.pow(1-o*o,2)/(2*a)*(e/(1-t*t)-r/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(i)<=1e-10)return s;return NaN}(this.e,2*t.y*this.k0/this.a),e=Nd(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};const Ng={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,i=Nd(e-this.long0),r=vg(n-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*r,t},inverse:function(t){var e=t.x,n=t.y;return t.x=Nd(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=vg(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const Og={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=dg(this.es),this.e1=pg(this.es),this.e2=gg(this.es),this.e3=_g(this.es),this.ml0=this.a*fg(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,i,r=t.x,a=t.y,o=Nd(r-this.long0);if(i=o*Math.sin(a),this.sphere)Math.abs(a)<=Uf?(e=this.a*o,n=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(a),n=this.a*(vg(a-this.lat0)+(1-Math.cos(i))/Math.tan(a)));else if(Math.abs(a)<=Uf)e=this.a*o,n=-1*this.ml0;else{var s=mg(this.a,this.e,Math.sin(a))/Math.tan(a);e=s*Math.sin(i),n=this.a*fg(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+s*(1-Math.cos(i))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,i,r,a,o,s,l,c;if(i=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=Uf)e=Nd(i/this.a+this.long0),n=0;else{var u;for(o=this.lat0+r/this.a,s=i*i/this.a/this.a+o*o,l=o,a=20;a;--a)if(l+=c=-1*(o*(l*(u=Math.tan(l))+1)-l-.5*(l*l+s)*u)/((l-o)/u-1),Math.abs(c)<=Uf){n=l;break}e=Nd(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=Uf)n=0,e=Nd(this.long0+i/this.a);else{var h,f,d,p,g;for(o=(this.ml0+r)/this.a,s=i*i/this.a/this.a+o*o,l=o,a=20;a;--a)if(g=this.e*Math.sin(l),h=Math.sqrt(1-g*g)*Math.tan(l),f=this.a*fg(this.e0,this.e1,this.e2,this.e3,l),d=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(o*(h*(p=f/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*o*p)/(4*h)+(o-p)*(h*d-2/Math.sin(2*l))-d),Math.abs(c)<=Uf){n=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=Nd(this.long0+Math.asin(i*h/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","American_Polyconic","poly"]};const zg={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,i=t.y-this.lat0,r=n-this.long0,a=i/qf*1e-5,o=r,s=1,l=0;for(e=1;e<=10;e++)s*=a,l+=this.A[e]*s;var c,u=l,h=o,f=1,d=0,p=0,g=0;for(e=1;e<=6;e++)c=d*u+f*h,f=f*u-d*h,d=c,p=p+this.B_re[e]*f-this.B_im[e]*d,g=g+this.B_im[e]*f+this.B_re[e]*d;return t.x=g*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var e,n,i=t.x,r=t.y,a=i-this.x0,o=(r-this.y0)/this.a,s=a/this.a,l=1,c=0,u=0,h=0;for(e=1;e<=6;e++)n=c*o+l*s,l=l*o-c*s,c=n,u=u+this.C_re[e]*l-this.C_im[e]*c,h=h+this.C_im[e]*l+this.C_re[e]*c;for(var f=0;f<this.iterations;f++){var d,p=u,g=h,_=o,m=s;for(e=2;e<=6;e++)d=g*u+p*h,p=p*u-g*h,g=d,_+=(e-1)*(this.B_re[e]*p-this.B_im[e]*g),m+=(e-1)*(this.B_im[e]*p+this.B_re[e]*g);p=1,g=0;var v=this.B_re[1],y=this.B_im[1];for(e=2;e<=6;e++)d=g*u+p*h,p=p*u-g*h,g=d,v+=e*(this.B_re[e]*p-this.B_im[e]*g),y+=e*(this.B_im[e]*p+this.B_re[e]*g);var x=v*v+y*y;u=(_*v+m*y)/x,h=(m*v-_*y)/x}var b=u,w=h,S=1,M=0;for(e=1;e<=9;e++)S*=b,M+=this.D[e]*S;var E=this.lat0+M*qf*1e5,k=this.long0+w;return t.x=k,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]};const Gg={init:function(){},forward:function(t){var e=t.x,n=t.y,i=Nd(e-this.long0),r=this.x0+this.a*i,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=r,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=Nd(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t},names:["Miller_Cylindrical","mill"]};const Dg={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Hp(this.es)},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Nd(i-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(r),o=20;o;--o){var s=(this.m*r+Math.sin(r)-a)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<Uf)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;e=this.a*this.C_x*i*(this.m+Math.cos(r)),n=this.a*this.C_y*r}else{var l=Math.sin(r),c=Math.cos(r);n=this.a*Vp(r,l,c,this.en),e=this.a*i*c/Math.sqrt(1-this.es*l*l)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,i;return t.x-=this.x0,n=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,n/=this.C_x*(this.m+Math.cos(e)),this.m?e=Ag((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Ag(Math.sin(e)/this.n)),n=Nd(n+this.long0),e=vg(e)):(e=$p(t.y/this.a,this.es,this.en),(i=Math.abs(e))<Wf?(i=Math.sin(e),n=Nd(this.long0+t.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)))):i-Uf<Wf&&(n=this.long0)),t.x=n,t.y=e,t},names:["Sinusoidal","sinu"]};const Ig={init:function(){},forward:function(t){for(var e=t.x,n=t.y,i=Nd(e-this.long0),r=n,a=Math.PI*Math.sin(n);;){var o=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=o,Math.abs(o)<Uf)break}r/=2,Math.PI/2-Math.abs(n)<Uf&&(i=0);var s=.900316316158*this.a*i*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return t.x=s,t.y=l,t},inverse:function(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var i=Nd(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var r=Math.asin(n);return t.x=i,t.y=r,t},names:["Mollweide","moll"]};const Rg={init:function(){Math.abs(this.lat1+this.lat2)<Uf||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=dg(this.es),this.e1=pg(this.es),this.e2=gg(this.es),this.e3=_g(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=Fd(this.e,this.sin_phi,this.cos_phi),this.ml1=fg(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Uf?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=Fd(this.e,this.sin_phi,this.cos_phi),this.ml2=fg(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=fg(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,n=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var r=fg(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var a=this.ns*Nd(n-this.long0),o=this.x0+e*Math.sin(a),s=this.y0+this.rh-e*Math.cos(a);return t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;return 0!==n&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere?(r=Nd(this.long0+a/this.ns),i=vg(this.g-n/this.a),t.x=r,t.y=i,t):(i=yg(this.g-n/this.a,this.e0,this.e1,this.e2,this.e3),r=Nd(this.long0+a/this.ns),t.x=r,t.y=i,t)},names:["Equidistant_Conic","eqdc"]};const jg={init:function(){this.R=this.a},forward:function(t){var e,n,i=t.x,r=t.y,a=Nd(i-this.long0);Math.abs(r)<=Uf&&(e=this.x0+this.R*a,n=this.y0);var o=Ag(2*Math.abs(r/Math.PI));(Math.abs(a)<=Uf||Math.abs(Math.abs(r)-Wf)<=Uf)&&(e=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/a-a/Math.PI),l=s*s,c=Math.sin(o),u=Math.cos(o),h=u/(c+u-1),f=h*h,d=h*(2/c-1),p=d*d,g=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(f-p)))/(p+l);a<0&&(g=-g),e=this.x0+g;var _=l+h;return g=Math.PI*this.R*(d*_-s*Math.sqrt((p+l)*(l+1)-_*_))/(p+l),n=r>=0?this.y0+g:this.y0-g,t.x=e,t.y=n,t},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,a=(i=t.x/h)*i+(r=t.y/h)*r,h=3*(r*r/(l=-2*(o=-Math.abs(r)*(1+a))+1+2*r*r+a*a)+(2*(s=o-2*r*r+i*i)*s*s/l/l/l-9*o*s/l/l)/27)/(c=(o-s*s/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(h)>1&&(h=h>=0?1:-1),f=Math.acos(h)/3,n=t.y>=0?(-u*Math.cos(f+Math.PI/3)-s/3/l)*Math.PI:-(-u*Math.cos(f+Math.PI/3)-s/3/l)*Math.PI,e=Math.abs(i)<Uf?this.long0:Nd(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(i*i-r*r)+a*a))/2/i),t.x=e,t.y=n,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]};const Bg={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,n,i,r,a,o,s,l,c,u,h,f=t.x,d=t.y,p=Math.sin(t.y),g=Math.cos(t.y),_=Nd(f-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Uf?(t.x=this.x0+this.a*(Wf-d)*Math.sin(_),t.y=this.y0-this.a*(Wf-d)*Math.cos(_),t):Math.abs(this.sin_p12+1)<=Uf?(t.x=this.x0+this.a*(Wf+d)*Math.sin(_),t.y=this.y0+this.a*(Wf+d)*Math.cos(_),t):(c=this.sin_p12*p+this.cos_p12*g*Math.cos(_),l=(s=Math.acos(c))?s/Math.sin(s):1,t.x=this.x0+this.a*l*g*Math.sin(_),t.y=this.y0+this.a*l*(this.cos_p12*p-this.sin_p12*g*Math.cos(_)),t):(e=dg(this.es),n=pg(this.es),i=gg(this.es),r=_g(this.es),Math.abs(this.sin_p12-1)<=Uf?(a=this.a*fg(e,n,i,r,Wf),o=this.a*fg(e,n,i,r,d),t.x=this.x0+(a-o)*Math.sin(_),t.y=this.y0-(a-o)*Math.cos(_),t):Math.abs(this.sin_p12+1)<=Uf?(a=this.a*fg(e,n,i,r,Wf),o=this.a*fg(e,n,i,r,d),t.x=this.x0+(a+o)*Math.sin(_),t.y=this.y0+(a+o)*Math.cos(_),t):Math.abs(f)<Uf&&Math.abs(d-this.lat0)<Uf?(t.x=t.y=0,t):(u=function(t,e,n,i,r,a){const o=i-e,s=Math.atan((1-a)*Math.tan(t)),l=Math.atan((1-a)*Math.tan(n)),c=Math.sin(s),u=Math.cos(s),h=Math.sin(l),f=Math.cos(l);let d,p,g,_,m,v,y,x,b,w,S,M,E,k,C,T=o,A=100;do{if(p=Math.sin(T),g=Math.cos(T),_=Math.sqrt(f*p*(f*p)+(u*h-c*f*g)*(u*h-c*f*g)),0===_)return{azi1:0,s12:0};m=c*h+u*f*g,v=Math.atan2(_,m),y=u*f*p/_,x=1-y*y,b=0!==x?m-2*c*h/x:0,w=a/16*x*(4+a*(4-3*x)),d=T,T=o+(1-w)*a*y*(v+w*_*(b+w*m*(2*b*b-1)))}while(Math.abs(T-d)>1e-12&&--A>0);return 0===A?{azi1:NaN,s12:NaN}:(S=x*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),M=1+S/16384*(4096+S*(S*(320-175*S)-768)),E=S/1024*(256+S*(S*(74-47*S)-128)),k=E*_*(b+E/4*(m*(2*b*b-1)-E/6*b*(4*_*_-3)*(4*b*b-3))),C=r*(1-a)*M*(v-k),{azi1:Math.atan2(f*p,u*h-c*f*g),s12:C})}(this.lat0,this.long0,d,f,this.a,this.f),h=u.azi1,t.x=u.s12*Math.sin(h),t.y=u.s12*Math.cos(h),t))},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f,d,p,g;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*Wf*this.a)return;return n=e/this.a,i=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(e)<=Uf?o=this.lat0:(o=Ag(r*this.sin_p12+t.y*i*this.cos_p12/e),s=Math.abs(this.lat0)-Wf,a=Math.abs(s)<=Uf?this.lat0>=0?Nd(this.long0+Math.atan2(t.x,-t.y)):Nd(this.long0-Math.atan2(-t.x,t.y)):Nd(this.long0+Math.atan2(t.x*i,e*this.cos_p12*r-t.y*this.sin_p12*i))),t.x=a,t.y=o,t}return l=dg(this.es),c=pg(this.es),u=gg(this.es),h=_g(this.es),Math.abs(this.sin_p12-1)<=Uf?(o=yg(((f=this.a*fg(l,c,u,h,Wf))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,c,u,h),a=Nd(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=o,t):Math.abs(this.sin_p12+1)<=Uf?(f=this.a*fg(l,c,u,h,Wf),o=yg(((e=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,l,c,u,h),a=Nd(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=o,t):(d=Math.atan2(t.x,t.y),p=Math.sqrt(t.x*t.x+t.y*t.y),g=function(t,e,n,i,r,a){const o=Math.atan((1-a)*Math.tan(t)),s=Math.sin(o),l=Math.cos(o),c=Math.sin(n),u=Math.cos(n),h=Math.atan2(s,l*u),f=l*c,d=1-f*f,p=d*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),g=1+p/16384*(4096+p*(p*(320-175*p)-768)),_=p/1024*(256+p*(p*(74-47*p)-128));let m,v,y,x,b,w=i/(r*(1-a)*g),S=100;do{v=Math.cos(2*h+w),y=Math.sin(w),x=Math.cos(w),b=_*y*(v+_/4*(x*(2*v*v-1)-_/6*v*(4*y*y-3)*(4*v*v-3))),m=w,w=i/(r*(1-a)*g)+b}while(Math.abs(w-m)>1e-12&&--S>0);if(0===S)return{lat2:NaN,lon2:NaN};const M=s*y-l*x*u,E=a/16*d*(4+a*(4-3*d));return{lat2:Math.atan2(s*x+l*y*u,(1-a)*Math.sqrt(f*f+M*M)),lon2:e+(Math.atan2(y*c,l*x-s*y*u)-(1-E)*a*f*(w+E*y*(v+E*x*(2*v*v-1))))}}(this.lat0,this.long0,d,p,this.a,this.f),t.x=g.lon2,t.y=g.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]};const qg={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,i,r,a,o,s,l=t.x,c=t.y;return i=Nd(l-this.long0),e=Math.sin(c),n=Math.cos(c),r=Math.cos(i),((a=this.sin_p14*e+this.cos_p14*n*r)>0||Math.abs(a)<=Uf)&&(o=1*this.a*n*Math.sin(i),s=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)),t.x=o,t.y=s,t},inverse:function(t){var e,n,i,r,a,o,s;return t.x-=this.x0,t.y-=this.y0,n=Ag((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),i=Math.sin(n),r=Math.cos(n),o=this.long0,Math.abs(e)<=Uf?(s=this.lat0,t.x=o,t.y=s,t):(s=Ag(r*this.sin_p14+t.y*i*this.cos_p14/e),a=Math.abs(this.lat0)-Wf,Math.abs(a)<=Uf?(o=this.lat0>=0?Nd(this.long0+Math.atan2(t.x,-t.y)):Nd(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=s,t):(o=Nd(this.long0+Math.atan2(t.x*i,e*this.cos_p14*r-t.y*this.sin_p14*i)),t.x=o,t.y=s,t))},names:["ortho"]};var Wg=1,Ug=2,Hg=3,Vg=4,$g=5,Yg=6,Jg=1,Xg=2,Kg=3,Zg=4;function Qg(t,e,n,i){var r;return t<Uf?(i.value=Jg,r=0):(r=Math.atan2(e,n),Math.abs(r)<=$f?i.value=Jg:r>$f&&r<=Wf+$f?(i.value=Xg,r-=Wf):r>Wf+$f||r<=-(Wf+$f)?(i.value=Kg,r=r>=0?r-Jf:r+Jf):(i.value=Zg,r+=Wf)),r}function t_(t,e){var n=t+e;return n<-Jf?n+=Yf:n>+Jf&&(n-=Yf),n}const e_={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Wf-$f/2?this.face=$g:this.lat0<=-(Wf-$f/2)?this.face=Yg:Math.abs(this.long0)<=$f?this.face=Wg:Math.abs(this.long0)<=Wf+$f?this.face=this.long0>0?Ug:Vg:this.face=Hg,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,i,r,a,o,s={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===$g)r=Wf-e,n>=$f&&n<=Wf+$f?(l.value=Jg,i=n-Wf):n>Wf+$f||n<=-(Wf+$f)?(l.value=Xg,i=n>0?n-Jf:n+Jf):n>-(Wf+$f)&&n<=-$f?(l.value=Kg,i=n+Wf):(l.value=Zg,i=n);else if(this.face===Yg)r=Wf+e,n>=$f&&n<=Wf+$f?(l.value=Jg,i=-n+Wf):n<$f&&n>=-$f?(l.value=Xg,i=-n):n<-$f&&n>=-(Wf+$f)?(l.value=Kg,i=-n-Wf):(l.value=Zg,i=n>0?-n+Jf:-n-Jf);else{var c,u,h,f,d,p;this.face===Ug?n=t_(n,+Wf):this.face===Hg?n=t_(n,+Jf):this.face===Vg&&(n=t_(n,-Wf)),f=Math.sin(e),d=Math.cos(e),p=Math.sin(n),c=d*Math.cos(n),u=d*p,h=f,this.face===Wg?i=Qg(r=Math.acos(c),h,u,l):this.face===Ug?i=Qg(r=Math.acos(u),h,-c,l):this.face===Hg?i=Qg(r=Math.acos(-c),h,-u,l):this.face===Vg?i=Qg(r=Math.acos(-u),h,c,l):(r=i=0,l.value=Jg)}return o=Math.atan(12/Jf*(i+Math.acos(Math.sin(i)*Math.cos($f))-Wf)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===Xg?o+=Wf:l.value===Kg?o+=Jf:l.value===Zg&&(o+=1.5*Jf),s.x=a*Math.cos(o),s.y=a*Math.sin(o),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t},inverse:function(t){var e,n,i,r,a,o,s,l,c,u,h,f,d={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=Jg:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=Xg,e-=Wf):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=Kg,e=e<0?e+Jf:e-Jf):(p.value=Zg,e+=Wf),c=Jf/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),(s=1-(i=Math.cos(e))*i*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?s=-1:s>1&&(s=1),this.face===$g)l=Math.acos(s),d.phi=Wf-l,p.value===Jg?d.lam=o+Wf:p.value===Xg?d.lam=o<0?o+Jf:o-Jf:p.value===Kg?d.lam=o-Wf:d.lam=o;else if(this.face===Yg)l=Math.acos(s),d.phi=l-Wf,p.value===Jg?d.lam=-o+Wf:p.value===Xg?d.lam=-o:p.value===Kg?d.lam=-o-Wf:d.lam=o<0?-o-Jf:-o+Jf;else{var g,_,m;c=(g=s)*g,_=(c+=(m=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*m)>=1?0:Math.sqrt(1-c),p.value===Xg?(c=_,_=-m,m=c):p.value===Kg?(_=-_,m=-m):p.value===Zg&&(c=_,_=m,m=-c),this.face===Ug?(c=g,g=-_,_=c):this.face===Hg?(g=-g,_=-_):this.face===Vg&&(c=g,g=_,_=-c),d.phi=Math.acos(-m)-Wf,d.lam=Math.atan2(_,g),this.face===Ug?d.lam=t_(d.lam,-Wf):this.face===Hg?d.lam=t_(d.lam,-Jf):this.face===Vg&&(d.lam=t_(d.lam,+Wf))}return 0!==this.es&&(u=d.phi<0?1:0,h=Math.tan(d.phi),f=this.b/Math.sqrt(h*h+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-f*f)/(this.one_minus_f*f)),u&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var n_=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],i_=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],r_=.8487,a_=1.3523,o_=Vf/5,s_=1/o_,l_=18,c_=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const u_={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=Nd(t.x-this.long0),n=Math.abs(t.y),i=Math.floor(n*o_);i<0?i=0:i>=l_&&(i=17);var r={x:c_(n_[i],n=Vf*(n-s_*i))*e,y:c_(i_[i],n)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*r_+this.x0,r.y=r.y*this.a*a_+this.y0,r},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*r_),y:Math.abs(t.y-this.y0)/(this.a*a_)};if(e.y>=1)e.x/=n_[18][0],e.y=t.y<0?-Wf:Wf;else{var n=Math.floor(e.y*l_);for(n<0?n=0:n>=l_&&(n=17);;)if(i_[n][0]>e.y)--n;else{if(!(i_[n+1][0]<=e.y))break;++n}var i=i_[n],r=5*(e.y-i[0])/(i_[n+1][0]-i[0]);r=function(t,e,n,i){for(var r=e;i;--i){var a=t(r);if(r-=a,Math.abs(a)<n)break}return r}((function(t){return(c_(i,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(i,t)}),r,Uf,100),e.x/=c_(n_[n],r),e.y=(5*n+r)*Hf,t.y<0&&(e.y=-e.y)}return e.x=Nd(e.x+this.long0),e},names:["Robinson","robin"]};const h_={init:function(){this.name="geocent"},forward:function(t){return lp(t,this.es,this.a)},inverse:function(t){return cp(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var f_=0,d_=1,p_=2,g_=3,__={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const m_={init:function(){if(Object.keys(__).forEach(function(t){if(void 0===this[t])this[t]=__[t].def;else{if(__[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);__[t].num&&(this[t]=parseFloat(this[t]))}__[t].degrees&&(this[t]=this[t]*Hf)}.bind(this)),Math.abs(Math.abs(this.lat0)-Wf)<Uf?this.mode=this.lat0<0?d_:f_:Math.abs(this.lat0)<Uf?this.mode=p_:(this.mode=g_,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,n,i,r,a=Math.sin(t.y),o=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case g_:n=this.sinph0*a+this.cosph0*o*s;break;case p_:n=o*s;break;case d_:n=-a;break;case f_:n=a}switch(e=(n=this.pn1/(this.p-n))*o*Math.sin(t.x),this.mode){case g_:n*=this.cosph0*a-this.sinph0*o*s;break;case p_:n*=a;break;case f_:n*=-o*s;break;case d_:n*=o*s}return r=1/((i=n*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-n*this.sg)*this.cw*r,n=i*r,t.x=e*this.a,t.y=n*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,n,i,r={x:t.x,y:t.y};i=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*i,n=this.pn1*t.y*this.cw*i,t.x=e*this.cg+n*this.sg,t.y=n*this.cg-e*this.sg;var a=Xp(t.x,t.y);if(Math.abs(a)<Uf)r.x=0,r.y=t.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case g_:r.y=Math.asin(o*this.sinph0+t.y*s*this.cosph0/a),t.y=(o-this.sinph0*Math.sin(r.y))*a,t.x*=s*this.cosph0;break;case p_:r.y=Math.asin(t.y*s/a),t.y=o*a,t.x*=s;break;case f_:r.y=Math.asin(o),t.y=-t.y;break;case d_:r.y=-Math.asin(o)}r.x=Math.atan2(t.x,t.y)}return t.x=r.x+this.long0,t.y=r.y,t},names:["Tilted_Perspective","tpers"]};const v_={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,n,i,r,a=t.x,o=t.y;if(a-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var s=this.radius_p/Xp(this.radius_p*Math.cos(o),Math.sin(o));if(n=s*Math.cos(a)*Math.cos(o),i=s*Math.sin(a)*Math.cos(o),r=s*Math.sin(o),(this.radius_g-n)*n-i*i-r*r*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/Xp(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(r/Xp(i,e)))}else"sphere"===this.shape&&(e=Math.cos(o),n=Math.cos(a)*e,i=Math.sin(a)*e,r=Math.sin(o),e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/Xp(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(r/Xp(i,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,n,i,r,a=-1,o=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Xp(1,s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Xp(1,o));var l=s/this.radius_p;if(e=o*o+l*l+a*a,(i=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-n-Math.sqrt(i))/(2*e),a=this.radius_g+r*a,o*=r,s*=r,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(o=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+s*s+a*a,(i=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-n-Math.sqrt(i))/(2*e),a=this.radius_g+r*a,o*=r,s*=r,t.x=Math.atan2(o,a),t.y=Math.atan(s*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var y_=1.340264,x_=-.081106,b_=893e-6,w_=.003796,S_=Math.sqrt(3)/2;const M_={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=Nd(t.x-this.long0),n=t.y,i=Math.asin(S_*Math.sin(n)),r=i*i,a=r*r*r;return t.x=e*Math.cos(i)/(S_*(y_+3*x_*r+a*(7*b_+9*w_*r))),t.y=i*(y_+x_*r+a*(b_+w_*r)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,n,i,r,a=t.y;for(r=0;r<12&&(a-=i=(a*(y_+x_*(e=a*a)+(n=e*e*e)*(b_+w_*e))-t.y)/(y_+3*x_*e+n*(7*b_+9*w_*e)),!(Math.abs(i)<1e-9));++r);return n=(e=a*a)*e*e,t.x=S_*t.x*(y_+3*x_*e+n*(7*b_+9*w_*e))/Math.cos(a),t.y=Math.asin(Math.sin(a)/S_),t.x=Nd(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var E_=1e-10;function k_(t){var e,n,i,r=Nd(t.x-(this.long0||0)),a=t.y;return e=this.am1+this.m1-Vp(a,n=Math.sin(a),i=Math.cos(a),this.en),n=i*r/(e*Math.sqrt(1-this.es*n*n)),t.x=e*Math.sin(n),t.y=this.am1-e*Math.cos(n),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function C_(t){var e,n,i,r;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,n=Xp(t.x,t.y=this.am1-t.y),r=$p(this.am1+this.m1-n,this.es,this.en),(e=Math.abs(r))<Wf)e=Math.sin(r),i=n*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(r);else{if(!(Math.abs(e-Wf)<=E_))throw new Error;i=0}return t.x=Nd(i+(this.long0||0)),t.y=vg(r),t}function T_(t){var e,n,i=Nd(t.x-(this.long0||0)),r=t.y;return n=this.cphi1+this.phi1-r,Math.abs(n)>E_?(t.x=n*Math.sin(e=i*Math.cos(r)/n),t.y=this.cphi1-n*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function A_(t){var e,n;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i=Xp(t.x,t.y=this.cphi1-t.y);if(n=this.cphi1+this.phi1-i,Math.abs(n)>Wf)throw new Error;return e=Math.abs(Math.abs(n)-Wf)<=E_?0:i*Math.atan2(t.x,t.y)/Math.cos(n),t.x=Nd(e+(this.long0||0)),t.y=vg(n),t}const P_={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<E_)throw new Error;this.es?(this.en=Hp(this.es),this.m1=Vp(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=C_,this.forward=k_):(Math.abs(this.phi1)+E_>=Wf?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=A_,this.forward=T_)},names:["bonne","Bonne (Werner lat_1=90)"]};const F_=Object.assign(wp,{defaultDatum:"WGS84",Proj:sp,WGS84:new sp("WGS84"),Point:Bp,toPoint:_p,defs:Cd,nadgrid:function(t,e,n){return e instanceof ArrayBuffer?function(t,e,n){var i=!0;void 0!==n&&!1===n.includeErrorFields&&(i=!1);var r=new DataView(e),a=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0),11!==e&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(r),o=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:np(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(r,a),s=function(t,e,n,i){for(var r=176,a=[],o=0;o<e.nSubgrids;o++){var s=rp(t,r,n),l=ap(t,r,s,n,i),c=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),u=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);a.push({ll:[ep(s.lowerLongitude),ep(s.lowerLatitude)],del:[ep(s.longitudeInterval),ep(s.latitudeInterval)],lim:[c,u],count:s.gridNodeCount,cvs:ip(l)});var h=16;!1===i&&(h=8),r+=176+s.gridNodeCount*h}return a}(r,o,a,i),l={header:o,subgrids:s};return Kd[t]=l,l}(t,e,n):{ready:Zd(t,e)}},transform:vp,mgrs:Pp,version:"__VERSION__"});!function(t){t.Proj.projections.add(Yp),t.Proj.projections.add(tg),t.Proj.projections.add(eg),t.Proj.projections.add(rg),t.Proj.projections.add(og),t.Proj.projections.add(sg),t.Proj.projections.add(cg),t.Proj.projections.add(ug),t.Proj.projections.add(hg),t.Proj.projections.add(xg),t.Proj.projections.add(Tg),t.Proj.projections.add(Pg),t.Proj.projections.add(Fg),t.Proj.projections.add(Lg),t.Proj.projections.add(Ng),t.Proj.projections.add(Og),t.Proj.projections.add(zg),t.Proj.projections.add(Gg),t.Proj.projections.add(Dg),t.Proj.projections.add(Ig),t.Proj.projections.add(Rg),t.Proj.projections.add(jg),t.Proj.projections.add(Bg),t.Proj.projections.add(qg),t.Proj.projections.add(e_),t.Proj.projections.add(u_),t.Proj.projections.add(h_),t.Proj.projections.add(m_),t.Proj.projections.add(v_),t.Proj.projections.add(M_),t.Proj.projections.add(P_)}(F_);const L_=F_;var N_=function(t){var e;if(t.svg_){t.Geometries.geoJSONs.worldrg?G_(t):Kh("https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json").then((function(e){var n=Qh(e,e.objects.CNTR_RG_20M_2020_4326).features;t.Geometries.geoJSONs.worldrg=n,G_(t)})).catch((function(t){return console.error("Failed to load WORLD_4326.json",t)}));var n=(null===(e=t.minimap_)||void 0===e?void 0:e.debounce)||2;window.addEventListener("estatmap:zoomed-"+t.svgId_,function(t,e){var n;return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,r)}),e)}}((function(t){var e=t.detail,n=D_(e);if(n){var i=n.lat,r=n.lon,a=O_(e);e._minimapProjection.rotate([-r,-i]),e._minimapProjection.scale(a),e._minimapGlobe.selectAll("path").attr("d",e._minimapPath)}}),n))}},O_=function(t){var e=t.position_.z;if(!e||e<=0)return 50;var n=Math.log2(156543/e);return z_(n+-1)},z_=function(t){return 5*Math.pow(2,t)},G_=function(t){try{var e,n,i=t.minimap_||{},r=i.countryId,a=i.x||80,o=i.y||80,s=i.z||160,l=i.color||"#3792B6",c=i.size||160,u=t.Geometries.geoJSONs.worldrg;if(t._minimapContainer=t.svg_.append("g").attr("id","em-minimap").attr("transform","translate(".concat(a,",").concat(o,")")),t._minimapContainer.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","white").attr("stroke",l).attr("stroke-width",3),t._minimapProjection=xl(Rf).scale(249.5).clipAngle(90.000001).scale(s).translate([0,0]),t._minimapPath=$s().projection(t._minimapProjection),r){var h=u.find((function(t){return t.properties.id===r}));if(!h)return void console.warn("Country ID ".concat(r," not found in geometries"));var f=y(t._minimapPath.bounds(h),2),d=y(f[0],2),p=d[0],g=d[1],_=y(f[1],2),m=[(p+_[0])/2,(g+_[1])/2],v=t._minimapProjection.invert(m);n=v[0],e=v[1]}else{var x=D_(t);if(!x)return;e=x.lat,n=x.lon}if(t._minimapProjection.rotate([-n,-e]),t._minimapContainer.append("defs").append("clipPath").attr("id","minimap-clip").append("circle").attr("r",c/2).attr("cx",0).attr("cy",0),t._minimapGlobe=t._minimapContainer.append("g").attr("class","em-minimap-globe").attr("clip-path","url(#minimap-clip)"),t._minimapGlobe.selectAll("path.country").data(u).enter().append("path").attr("d",t._minimapPath).attr("fill","#e0e0e0"),r){var b=u.find((function(t){return t.properties.id===r}));t._minimapGlobe.append("path").datum(b).attr("d",t._minimapPath).attr("fill",l).attr("stroke",l).attr("stroke-width",.5)}t._minimapContainer.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","none").attr("stroke",l).attr("stroke-width",3)}catch(t){console.error("Error drawing minimap:",t)}},D_=function(t){var e,n,i=[t.position_.x,t.position_.y];if("3035"===t.proj_){var r=y(L_("EPSG:3035","EPSG:4326",i),2);n=r[0],e=r[1]}else if("54030"===t.proj_){var a=y(L_("EPSG:54030","EPSG:4326",i),2);n=a[0],e=a[1]}else n=i[0],e=i[1];return{lat:e.toFixed(2),lon:n.toFixed(2)}};var I_=function(t,e){var n=t.transform,i=(e.width_/2-n.x)/n.k,r=(e.height_/2-n.y)/n.k,a=y(e._projection.invert([i,r]),2),o=a[0],s=a[1];e.position_.x=o,e.position_.y=s,window.dispatchEvent(new CustomEvent("estatmap:zoomed-"+e.svgId_,{detail:e})),"function"==typeof e.onZoom_&&e.onZoom_(t,e)},R_=function(t,e,n){var i,r,a=t.transform,o=(n.width_/2-a.x)/a.k,s=(n.height_/2-a.y)/a.k,l=y(n._projection.invert([o,s]),2),c=l[0],u=l[1];if(n.__programmaticZoom){var h=n.__programmaticZoom;n.position_.x=h.x,n.position_.y=h.y,n.position_.z=h.z,delete n.__programmaticZoom}else n.position_.x=c,n.position_.y=u,n.position_.z=n.__baseZ/a.k;q_(a,n),null!==(i=n.labels_)&&void 0!==i&&i.values&&B_(a,n),null!==(r=n.labels_)&&void 0!==r&&r.backgrounds&&j_(a,n),window.dispatchEvent(new CustomEvent("estatmap:zoomed-"+n.svgId_,{detail:n})),"function"==typeof n.onZoom_&&n.onZoom_(t,n)},j_=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).selectAll(".em-label-background"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=parseFloat(t.attr("data-width"))||parseFloat(t.attr("width")),n=parseFloat(t.attr("data-height"))||parseFloat(t.attr("height")),a=parseFloat(t.attr("data-x"))||parseFloat(t.attr("x")),o=parseFloat(t.attr("data-y"))||parseFloat(t.attr("y"));if(e>0&&n>0&&!isNaN(a)&&!isNaN(o)){t.attr("data-width")||(t.attr("data-width",e),t.attr("data-height",n),t.attr("data-x",a),t.attr("data-y",o));var s=e*(1/i),l=n*(1/i),c=a*(1/i),u=o*(1/i);r.push({element:t,targetWidth:s,targetHeight:l,targetX:c,targetY:u})}})),r.forEach((function(t){var e=t.element,n=t.targetWidth,i=t.targetHeight,r=t.targetX,a=t.targetY;e.attr("width",n).attr("height",i).attr("x",r).attr("y",a)}))},B_=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).select("#em-labels").selectAll("*"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=window.getComputedStyle(this),n=t.attr("font-size"),a=e.fontSize,o=n||a;if(o&&parseFloat(o)>0){var s=parseFloat(t.attr("data-fs"))||parseFloat(n)||parseFloat(a);t.attr("data-fs")||t.attr("data-fs",s);var l=s/i;r.push({element:this,targetFontSize:l})}})),r.forEach((function(t){var e=t.element,n=t.targetFontSize;e.style.setProperty("font-size","".concat(n,"px"),"important")}))},q_=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).selectAll("*"),i=t.k,r=[];n.each((function(){var t=Ot(this),e=window.getComputedStyle(this),n=t.attr("stroke-width"),a=e.strokeWidth,o=n||a;if(o&&parseFloat(o)>0){var s=parseFloat(t.attr("data-sw"))||parseFloat(n)||parseFloat(a);t.attr("data-sw")||t.attr("data-sw",s);var l=s/i;r.push({element:this,targetStrokeWidth:l})}})),r.forEach((function(t){var e=t.element,n=t.targetStrokeWidth;e.style.setProperty("stroke-width","".concat(n,"px"),"important")}))};var W_=Cf("\t"),U_=W_.parse;W_.parseRows,W_.format,W_.formatBody,W_.formatRows,W_.formatRow,W_.formatValue;function H_(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function V_(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=void 0),function(t,e){return fetch(t,e).then(H_)}(e,n).then((function(e){return t(e,i)}))}}var $_=V_(Pf);V_(U_);var Y_=function(t,e,n){switch(t.proj_){case"3035":return L_("EPSG:4326","EPSG:3035",[e,n]);case"54030":return L_("EPSG:4326","EPSG:54030",[e,n]);default:return[e,n]}};function J_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function X_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J_(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function K_(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Z_(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Z_(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Q_(t){return tm.apply(this,arguments)}function tm(){return tm=$h(Jh().mark((function e(n){var i,r,a=arguments;return Jh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:"https://raw.githubusercontent.com/eurostat/euronym/main/pub/v3/UTF_LATIN/20/EUR.csv",e.next=3,$_(i,t.autoType);case 3:return r=e.sent,n._placenameLabels=r,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),tm.apply(this,arguments)}function em(){return em=$h(Jh().mark((function t(e){return Jh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._placenameLabels){t.next=3;break}return t.next=3,Q_(e);case 3:nm(e),window.addEventListener("estatmap:zoomed-"+e.svgId_,(function(t){rm(t.detail,t.detail.__lastTransform)}));case 5:case"end":return t.stop()}}),t)}))),em.apply(this,arguments)}function nm(t){var e,n=t.svg_,i=(null===(e=t.__lastTransform)||void 0===e?void 0:e.k)||1,r=im(t);console.log("Filtered ".concat(r.length," placenames for zoom level ").concat(i)),n.select("#em-placenames").remove();var a=n.select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-placenames").attr("class","em-placenames").attr("pointer-events","none");a.selectAll("text").data(r).join("text").attr("x",(function(t){return t.screenX})).attr("y",(function(t){return t.screenY})).text((function(t){return t.name})).attr("font-size",(function(t){return"".concat(13*t.sizeFactor/i,"px")})).attr("font-weight",(function(t){return t.sizeFactor>1?"bold":"normal"})).attr("fill","black").attr("text-anchor","middle").attr("dy","-0.35em").clone(!0).lower().attr("fill","none").attr("stroke","white").attr("opacity",.8).attr("stroke-width",3/i).attr("stroke-linejoin","round"),t.placenameGroup_=a}var im=function(t){if(!t._placenameLabels)return[];var e,n=t._projection,i=t.width_,r=t.height_,a=t.position_.z,o=[],s=K_(t._placenameLabels||[]);try{for(s.s();!(e=s.n()).done;){var l=e.value,c=+l.rs,u=+l.r1;if(c&&!(a>c)){var h=+l.lon,f=+l.lat,d=y(Y_(t,h,f),2),p=y(n([d[0],d[1]]),2),g=p[0],_=p[1];if(!(g<30||g>i-30||_<30||_>r-30)&&(o.push(X_(X_({},l),{},{screenX:g,screenY:_,sizeFactor:a>u?1:1.1})),o.length>=500))break}}}catch(t){s.e(t)}finally{s.f()}return o};function rm(t,e){t._placenameLabels&&t._projection&&nm(t)}function am(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}Pn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]}),L_.defs("EPSG:3035","+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"),L_.defs("EPSG:54030","+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs");var om=function(t,e,n){var i={};i._mapType=n,i.updateValuesLabels=jh,i.svgId_="map",i.svg_=void 0,i.width_=Math.min(795,window.innerWidth),i.height_=0,i.containerId_=void 0,i.gridCartogram_=!1,i.gridCartogramShape_="square",i.gridCartogramMargins_={top:80,right:50,bottom:80,left:150},i.gridCartogramCellPadding_=4,i.gridCartogramPositions_=void 0,i.nutsLevel_=3,i.nutsYear_=2024,i.geo_="EUR",i.proj_="3035",i.projectionFunction_=void 0,i.filterGeometriesFunction_=void 0,i.scale_="20M",i.position_={x:void 0,y:void 0,z:void 0},i.placenames_=!1,i.zoomExtent_=void 0,i.translateExtent_=void 0,i.lockPanUntilZoom_=!0,i.onZoomEnd_=void 0,i.onZoom_=void 0,i.onRegionMouseOver_=void 0,i.onRegionMouseMove_=void 0,i.onRegionMouseOut_=void 0,i.geometries_=void 0,i.processCentroids_=void 0,i.dorling_=!1,i.animateDorling_=!0,i.dorlingStrength_={x:1,y:1},i.dorlingIterations_=1,i.onDorlingProgress_=void 0,i.dorlingWorker_=!1,i.dorlingWorkerD3URL_=void 0,i.title_="",i.titlePosition_=void 0,i.subtitle_="",i.subtitlePosition_=void 0,i.showScalebar_=!1,i.scalebarPosition_=[],i.scalebarUnits_=" km",i.scalebarTextOffset_=[0,12],i.scalebarMaxWidth_=150,i.scalebarHeight_=90,i.scalebarStrokeWidth_=1,i.scalebarSegmentHeight_=6,i.scalebarTickHeight_=8,i.stamp_=void 0,i.minimap_=void 0,i.zoomButtons_=!1,i.insetsButton_=!1,i.tooltip_={fontSize:"14px",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1,omitRegions:["RU","BY","IL","PS"]},i.hoverColor_="red",i.drawCoastalMargin_=!1,i.coastalMarginStdDev_=3,i.drawGraticule_=!1,i.backgroundMap_=!0,i.labels_=void 0,i.annotations_=void 0,i.annotationsAdded=!1,i.patternFill_=void 0,i.showSourceLink_=!0,i.footnote_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",i.footnoteTooltipText_='<div class="em-footnote-tooltip">The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence.</div>',i.nuts2jsonBaseURL_=window.location.hostname.includes("ec.europa.eu")?"https://ec.europa.eu/assets/estat/E/E4/gisco/pub/nuts2json/v2":"https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2",i.noDataFillStyle_="#bcbcbc",i.insets_=[],i.insetTemplates_={},i.insetBoxPosition_=void 0,i.insetBoxPadding_=5,i.insetBoxWidth_=210,i.insetZoomExtent_=null,i.insetScale_="03M";var r=function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}};for(var a in i)r(a);!function(t){t.showZoomButtons=function(e){return console.warn("showZoomButtons() is now DEPRECATED, please use zoomButtons() instead"),t.zoomButtons_=e,t},t.showInsetsButton=function(e){return console.warn("showInsetsButton() is now DEPRECATED, please use insetsButton() instead"),t.insetsButton_=e,t},t.seaFillStyle=function(e){return console.warn("seaFillStyle() is now DEPRECATED, please use the .em-sea CSS class"),ha(".em-sea","fill",e),t},t.cntrgFillStyle=function(e){return console.warn("cntrgFillStyle() is now DEPRECATED, please use the .em-cntrg CSS class"),ha(".em-cntrg","fill",e),t},t.nutsrgFillStyle=function(e){return console.warn("nutsrgFillStyle() is now DEPRECATED, please use the .em-nutsrg CSS class"),ha(".em-nutsrg","fill",e),t},t.nutsbnStroke=function(e){return console.warn("nutsbnStroke() is now DEPRECATED, please use the .bn_0, .bn_1, .bn_2, .bn_3 CSS classes"),e[0]&&ha(".bn_0","stroke",e[0]),e[1]&&ha(".bn_1","stroke",e[1]),e[2]&&ha(".bn_2","stroke",e[2]),e[3]&&ha(".bn_3","stroke",e[3]),t},t.nutsbnStrokeWidth=function(e){return console.warn("nutsbnStrokeWidth() is now DEPRECATED, please use the .bn_0, .bn_1, .bn_2, .bn_3 CSS classes"),e[0]&&ha(".bn_0","stroke-width",e[0]),e[1]&&ha(".bn_1","stroke-width",e[1]),e[2]&&ha(".bn_2","stroke-width",e[2]),e[3]&&ha(".bn_3","stroke-width",e[3]),t},t.graticuleStroke=function(e){return console.warn("graticuleStroke() is now DEPRECATED, please use the .em-graticule CSS class"),ha(".em-graticule","stroke",e),t},t.graticuleStrokeWidth=function(e){return console.warn("graticuleStrokeWidth() is now DEPRECATED, please use the .em-graticule CSS class"),ha(".em-graticule","stroke-width",e),t},t.nutsrgSelFillSty=function(e){return console.warn("nutsrgSelFillSty() is now DEPRECATED, please use hoverColor() instead"),t.hoverColor_=e,t},t.titleFontSize=function(e){return console.warn("map.titleFontSize() is now DEPRECATED. please use the .em-title CSS class"),ha(".em-title","font-size",e),t},t.subtitleFontSize=function(e){return console.warn("map.subtitleFontSize() is now DEPRECATED. please use the .em-subtitle CSS class"),ha(".em-subtitle","font-size",e),t},t.subtitleFontWeight=function(e){return console.warn("map.subtitleFontWeight() is now DEPRECATED. please use the .em-subtitle CSS class"),ha(".em-subtitle","font-weight",e),t},t.titleFill=function(e){return console.warn("map.titleFill() is now DEPRECATED. please use the .em-title CSS class"),ha(".em-title","fill",e),t},t.subtitleFill=function(e){return console.warn("map.subtitleFill() is now DEPRECATED. please use the .em-subtitle CSS class"),ha(".em-subtitle","fill",e),t},t.cntbnStroke=function(e){return console.warn("cntbnStroke() is now DEPRECATED, please use the .em-cntbn .em-bn-eu .em-bn-efta .em-bn-cc .em-bn-oth CSS classes"),e.eu&&ha(".em-bn-eu","stroke",e.eu),e.efta&&ha(".em-bn-efta","stroke",e.efta),e.cc&&ha(".em-bn-cc","stroke",e.cc),e.oth&&ha(".em-bn-oth","stroke",e.oth),e.co&&ha(".em-bn-co","stroke",e.co),t},t.cntbnStrokeWidth=function(e){return console.warn("cntbnStrokeWidth() is now DEPRECATED, please use the .em-cntbn .em-worldbn .em-bn-eu .em-bn-efta .em-bn-cc .em-bn-oth CSS classes"),e.eu&&ha(".em-bn-eu","stroke-width",e.eu),e.efta&&ha(".em-bn-efta","stroke-width",e.efta),e.cc&&ha(".em-bn-cc","stroke-width",e.cc),e.oth&&ha(".em-bn-oth","stroke-width",e.oth),e.co&&ha(".em-bn-co","stroke-width",e.co),t},t.worldStroke=function(e){return console.warn("map.worldStroke() is now DEPRECATED. please use the .em-worldbn .em-bn-co .em-bn-d CSS classes"),ha(".em-worldbn","stroke",e),t},t.worldStrokeWidth=function(e){return console.warn("map.worldStrokeWidth() is now DEPRECATED. please use the .em-worldbn .em-bn-co .em-bn-d CSS classes"),ha(".em-worldbn","stroke-width",e),t},t.worldCoastStroke=function(e){return console.warn("map.worldCoastStroke() is now DEPRECATED. please use the .em-bn-co CSS class"),ha(".em-bn-co","stroke",e),t},t.worldCoastStrokeWidth=function(e){return console.warn("map.worldCoastStrokeWidth() is now DEPRECATED. please use the .em-bn-co CSS class"),ha(".em-bn-co","stroke-width",e),t},t.worldFillStyle=function(e){return console.warn("map.worldFillStyle() is now DEPRECATED. please use the .em-worldrg CSS class"),ha(".em-worldrg","fill",e),t},t.coastalMarginWidth=function(e){return console.warn("map.coastalMarginWidth() is now DEPRECATED. please use the #em-coast-margin CSS rule"),ha("#em-coast-margin","stroke-width",e),t},t.coastalMarginColor=function(e){return console.warn("map.coastalMarginColor() is now DEPRECATED. please use the #em-coast-margin CSS rule"),ha("#em-coast-margin","stroke",e),t},t.fontFamily=function(e){return console.warn("map.fontFamily() is now DEPRECATED. please use the .em-map CSS class"),ha(".em-map","font-family",e),t},t.botTxtFontSize=function(e){return console.warn("map.botTxtFontSize() is now DEPRECATED. please use the .em-footnote CSS class"),ha(".em-footnote","font-size",e),t},t.botTxtFill=function(e){return console.warn("map.botTxtFill() is now DEPRECATED. please use the .em-footnote CSS class"),ha(".em-footnote","fill",e),t},t.scalebarFontSize=function(e){return console.warn("map.scalebarFontSize() is now DEPRECATED. please use the .em-scalebar-label CSS class"),ha(".em-scalebar-label","font-size",e),t},t.frameStroke=function(e){return console.warn("map.frameStroke() is now DEPRECATED. please use the .em-frame CSS class"),ha(".em-frame","stroke",e),t},t.frameStrokeWidth=function(e){return console.warn("map.frameStrokeWidth() is now DEPRECATED. please use the .em-frame CSS class"),ha(".em-frame","stroke-width",e),t},t.psClassifMethod=function(e){return console.warn("psClassifMethod() is now DEPRECATED. please use psClassificationMethod instead"),t.psClassificationMethod_=e,t},t.geoCenter=function(e){return console.warn("map.geoCenter() is now DEPRECATED. Please use map.position({x,y,z}) instead."),t.position_.x=e[0],t.position_.y=e[1],t},t.pixelSize=function(e){return console.warn("map.pixelSize() is now DEPRECATED. Please use the z property in map.position({x,y,z}) instead."),t.position_.z=e,t},t.pixSize=function(e){return console.warn("map.pixelSize() is now DEPRECATED. Please use the z property in map.position({x,y,z}) instead."),t.position_.z=e,t},t.tooltipText=function(e){return console.warn("map.tooltipText() is now DEPRECATED. Please use map.tooltip(config.textFunction) instead. See API reference for details."),t.tooltip_.textFunction=e,t},t.classifMethod=function(e){return console.warn("map.classifMethod() is now DEPRECATED. please use map.classificationMethod() instead."),t.classificationMethod_=e,t},t.threshold=function(e){return console.warn("map.threshold() is now DEPRECATED. please use map.thresholds() instead."),t.thresholds_=e,t},t.psThreshold=function(e){return console.warn("map.psThreshold() is now DEPRECATED. please use map.psThresholds() instead."),t.psThresholds_=e,t},t.clnb=function(e){return console.warn("map.clnb() is now DEPRECATED. please use map.numberOfClasses() instead."),t.numberOfClasses_=e,t},t.nutsLvl=function(e){return console.warn("map.nutsLvl() is now DEPRECATED. please use map.nutsLevel() instead."),t.nutsLevel_=e,t},t.lg=function(e){return console.warn("map.lg() is now DEPRECATED. please use map.language() instead."),t.language_=e,t},t.bottomText=function(e){return console.warn("bottomText is now DEPRECATED. Please use the footnote() method and em-footnote CSS class instead."),t.footnote_=e,t},t.botTxtFontSize=function(e){return console.warn("botTxtFontSize is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtFill=function(e){return console.warn("botTxtFill is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtPadding=function(e){return console.warn("botTxtPadding is now DEPRECATED. Please use the em-footnote CSS class instead."),t},t.botTxtTooltipTxt=function(e){return console.warn("botTxtTooltipTxt is now DEPRECATED. Please use footnoteTooltipText() instead."),t},t.tooltipShowFlags=function(e){return console.warn("tooltipShowFlags is now DEPRECATED. Please use out.tooltip({showFlags}) instead."),t.tooltip_.showFlags=e,t},t.colorFun=function(e){return console.warn("colorFun is now DEPRECATED. Please use out.colorFunction() instead."),t.colorFunction_=e,t},t.filtersDefinitionFun=function(e){return console.warn("filtersDefinitionFun is now DEPRECATED. Please use out.filtersDefinitionFunction() instead."),t.filtersDefinitionFunction_=e,t},t.labelling=function(e){return console.warn("labelling is now DEPRECATED. Please use out.labels({}) configuration object instead. See documentation for details."),t},t.labelsConfig=function(e){return console.warn("labelsConfig is now DEPRECATED. Please use out.labels({config:yourConfig}) configuration object instead. See documentation for details."),t.labels_=Object.assign(t.labels_||{},{config:e}),t},t.statLabelsPositions=function(e){return console.warn("statLabelsPositions is now DEPRECATED. Please use out.labels({statLabelsPositions:yourPositions}) instead. See documentation for details."),t.labels_=Object.assign(t.labels_||{},{statLabelsPositions:e}),t},t.labelsToShow=function(e){return console.warn("labelsToShow is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) function instead. See documentation for details."),t},t.labelShadowsToShow=function(e){return console.warn("labelShadowsToShow is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) function instead. See documentation for details."),t},t.labelShadow=function(e){return console.warn("labelShadow is now DEPRECATED. Please use out.labels({labelShadow:boolean}) instead. See documentation for details."),t},t.labelShadowWidth=function(e){return console.warn("labelShadow is now DEPRECATED. Please use out.labels({labelShadow:boolean}) instead. See documentation for details."),t},t.labelFilterFunction=function(e){return console.warn("labelFilterFunction is now DEPRECATED. Please use out.labels({labelFilterFunction:yourFunction(region,map)}) instead. See documentation for details."),t},t.labelFill=function(e){return console.warn("map.labelFill() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelStroke=function(e){return console.warn("map.labelStroke() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelStrokeWidth=function(e){return console.warn("map.labelStrokeWidth() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelOpacity=function(e){return console.warn("map.labelOpacity() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelValuesFontSize=function(e){return console.warn("map.labelValuesFontSize() is now DEPRECATED. please use the .em-stat-labels CSS class"),t},t.labelShadowWidth=function(e){return console.warn("map.labelShadowWidth() is now DEPRECATED. please use the .em-stat-labels-shadows CSS class"),t},t.labelShadowColor=function(e){return console.warn("map.labelShadowColor() is now DEPRECATED. please use the .em-stat-labels-shadows CSS class"),t},t.countriesToShow=function(e){return console.warn("map.countriesToShow() is now DEPRECATED. please use the map.filterGeometriesFunction() function if you wish to filter the default geometries."),t},t.bordersToShow=function(e){return console.warn("map.bordersToShow() is now DEPRECATED. please use the map.filterGeometriesFunction() function if you wish to filter the default geometries."),t}}(i),i.geo=function(t){return arguments.length?(i.geo_=t.toUpperCase(),i):i.geo_},["tooltip_","nuts2jsonBaseURL_","processCentroids_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return i[t];if("object"!==Ma(e)||null===e||Array.isArray(e))i[t]=e;else for(var n in e)i[t][n]=e[n];return i.insetTemplates_&&va(i.insetTemplates_,i.svgId_,(function(e,n){e[t.substring(0,t.length-1)](n)}),e),i}})),i.title=function(t){return arguments.length?(i.title_=t,i.svg()&&i.svg().select("#title"+i.geo()).text(t),i):i.title_},i.subtitle=function(t){return arguments.length?(i.subtitle_=t,i.svg()&&i.svg().select("#subtitle"+i.geo()).text(t),i):i.subtitle_},i.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?i.insets_="default":1==arguments.length&&!1===arguments[0]?i.insets_=!1:1==arguments.length&&Array.isArray(arguments[0])?i.insets_=arguments[0]:i.insets_=arguments,i):i.insets_},i.drawGraticule=function(t){if(!arguments.length)return i.drawGraticule_;i.drawGraticule_=t;var e=i.svg_?i.svg().select("#em-graticule"):null,n=i.svg_?i.svg_.select("#em-zoom-group-"+i.svgId_):null;return e&&(e._groups[0][0]&&0==t?e.remove():i.Geometries.geoJSONs.graticule&&i._pathFunction&&n&&1==t&&(e.remove(),n.append("g").attr("id","em-graticule").selectAll("path").data(i.Geometries.geoJSONs.graticule).enter().append("path").attr("d",i._pathFunction).attr("class","em-graticule"),i.svg().select("#em-graticule").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])})))),i},i.drawCoastalMargin=function(t){if(!arguments.length)return i.drawCoastalMargin_;if(i.drawCoastalMargin_=t,i.svg_){var e=Ca("#em-coast-margin"),n=Ot("#em-coastal-blur"),r=Ot("#em-zoom-group-"+i.svgId_)||null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&i._pathFunction&&r){e.remove(),n.remove(),i.svg_.append("filter").attr("id","em-coastal-blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var a=function(t){var e=Ot("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-coast-margin");t._geom.cntbn&&e.append("g").attr("id","em-coast-margin-cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._pathFunction),t._geom.nutsbn&&e.append("g").attr("id","em-coast-margin-nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._pathFunction),t._geom.worldbn&&e.append("g").attr("id","em-coast-margin-nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._pathFunction)};i.insetTemplates_&&i.drawCoastalMargin_&&(va(i.insetTemplates_,i.svgId_,a),a(i)),Ca("#em-coast-margin").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}}return i},i.annotations=function(t){return arguments.length?(i.annotations_=t,Ih(i),i):i.annotations_},i.stamp=function(t){return arguments.length?(i.stamp_=t,_f(i.stamp_,i),i):i.stamp_},i.minimap=function(t){return arguments.length?(i.minimap_=t,N_(i),i):i.minimap_},i.labels=function(t){return arguments.length?(i.labels_=t,function(t){if(t.svg_){var e=t.svg_.selectAll("#em-labels > *");if(e&&e.remove(),t.labels_){var n=t.labels_,i=t.svg_.select("#em-zoom-group-"+t.svgId_);Rh(t,i),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t),t.insetTemplates_&&va(t.insetTemplates_,t.svgId_,(function(t){if(n){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);t.labels_&&Rh(t,e),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t)}}))}}}(i),i):i.labels_},i.position=function(t){return arguments.length?(i.position_=t,function(t,e){if(t.svg_&&t.__zoomBehavior){var n=t.svg_,i=n.select("#em-zoom-group-"+t.svgId_),r=t.__baseZ/e.z,a=y(t._projection([e.x,e.y]),2),o=a[0],s=a[1],l=t.width_/2-o*r,c=t.height_/2-s*r,u=Qr.translate(l,c).scale(r);t.__programmaticZoom={x:e.x,y:e.y,z:e.z},t.__lastTransform=u,n.call(t.__zoomBehavior.transform,u),i.attr("data-zoom",r),t.position_.x=e.x,t.position_.y=e.y,t.position_.z=e.z}}(i,t),i):i.position_},i.Geometries=ff(i,e),i.updateGeoMapTemplate=function(t){return i.Geometries.defaultGeoData=null,i.Geometries.allNUTSGeoData=null,i.Geometries.centroidsData=null,i.geometries_?(i.Geometries.setUserGeometries(i.geometries_),i.buildMapTemplate(),t&&t()):i.Geometries.getDefaultGeoData(i.geo_,i.filterGeometriesFunction_,i.nutsLevel_).then((function(){i.buildMapTemplate(),t&&t()})),va(i.insetTemplates_,i.svgId_,(function(e){e.updateGeoMapTemplate(t)})),i};i.buildMapTemplateBase=function(){var t=function(t){var e=Ot("#"+t.svgId());return 0==e.size()&&(e=Ot("body").append("svg").attr("id",t.svgId())),e.attr("class","em-map"),e.classed("em--"+t._mapType,!0),"pie"!==t._mapType&&"coxcomb"!==t._mapType||e.classed("em--ps",!0),e}(i);i.svg_=t,i.containerId_||(i.containerId_=i.svgId_),i.tooltip_.containerId||(i.tooltip_.containerId=i.containerId_),Ca("#"+i.svgId()+" > *").remove(),"WORLD"==i.geo_.toUpperCase()&&(i.height()||i.height(.55*i.width()),t.attr("width",i.width()).attr("height",i.height()),i.proj_=54030),i.height()||i.height(.85*i.width()),t.attr("width",i.width()).attr("height",i.height()),t.append("defs").attr("class","em-defs").append("clipPath").attr("id",i.svgId_+"-clip-path").append("path").attr("d",function(t,e,n,i){return t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),i=parseFloat(i,10),t<0||e<0||n<0||i<0?"":"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+i)+" "+t+","+(e+i)+"z"}(0,0,i.width_,i.height_)),i.drawCoastalMargin_&&t.append("filter").attr("id","em-coastal-blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var n=t.insert("g",":first-child").attr("id","em-drawing-"+i.svgId_).attr("class","em-drawing-group").attr("clip-path","url(#"+i.svgId_+"-clip-path)");n.append("g").attr("id","em-zoom-group-"+i.svgId_).attr("class","em-zoom-group");return function(t){if(t.insetTemplates_){for(var e in t.insetTemplates_){var n=Ot("#"+t.insetTemplates_[e].svgId_);n&&n.html("")}t.insetTemplates_={}}}(i),function(t,e){t.insetBoxPosition_||(t.insetBoxPosition_=[t.width_-t.insetBoxWidth_-2*t.insetBoxPadding_,2*t.insetBoxPadding_]);var n=Ot("#"+t.svgId_).select("#em-drawing-"+t.svgId_).append("g").attr("id","em-insets-group").attr("class","em-insets").attr("transform","translate("+t.insetBoxPosition_[0]+","+t.insetBoxPosition_[1]+")");"default"===t.insets_&&(t.insets_=pf(t.insetBoxWidth_,t.insetBoxPadding_));for(var i=0;i<t.insets_.length;i++){var r=t.insets_[i];if(r.svgId=r.svgId||"inset"+r.geo+Math.random().toString(36).substring(7),0==Ot("#"+r.svgId).size()){var a=null==r.x?t.insetBoxPadding_:r.x,o=null==r.y?t.insetBoxPadding_+i*(t.insetBoxPadding_+t.insetBoxWidth_):r.y;n.append("g").attr("id","em-inset-"+r.svgId).attr("class","em-inset").attr("transform","translate("+a+","+o+")").append("svg").attr("id",r.svgId)}if(t.insetTemplates_[r.geo]){var s=df(r,t,e);s.buildMapTemplateBase(),t.insetTemplates_[r.geo]=[t.insetTemplates_[r.geo],s]}else{var l=df(r,t,e).buildMapTemplateBase();t.insetTemplates_[r.geo]=l}}}(i,e),n.append("rect").attr("id","em-frame-"+i.geo_).attr("class","em-frame").attr("x",0).attr("y",0).attr("width",i.width_).attr("height",i.height_),i.stamp_&&_f(i.stamp_,i),i},i.buildMapTemplate=function(){var t,n=i.svg().select("#em-zoom-group-"+i.svgId_);if(n.selectAll("*").remove(),1==i.gridCartogram_?(!function(t){var e=Ot("#em-zoom-group-".concat(t.svgId_)).append("g").attr("id","em-grid-container");t.gridCartogramMargins_=t.gridCartogramMargins_||{top:80,right:80,bottom:80,left:80};var n=Lf(t),i=Nf(n),r=Of(i,t);"hexagon"===t.gridCartogramShape_?Gf(e,r,t):zf(e,r,t),If(e,t.width_,t.height_,t.gridCartogramMargins_)}(i),i.footnote_=!1):(i.position_.x&&i.position_.y||c(),i.position_.z=i.position_.z||u(),h(),f(),(i.zoomExtent()||i.zoomButtons_)&&(i.zoomExtent_||(console.warn("Zoom buttons are enabled, but no zoom extent is defined. Setting default extent to map.zoomExtent([1,10])."),i.zoomExtent_=[1,10]),function(t){var e=Ot("#"+t.svgId()),n=Qr,i=!t.lockPanUntilZoom_,r=!1,a=t.zoomExtent_||[0,0],o=t.translateExtent_||!t.lockPanUntilZoom_?[[-t.width_,-t.height_],[2*t.width_,2*t.height_]]:[[0,0],[t.width_,t.height_]];if(t.__zoomBehavior=la().filter((function(t){return!t.target.closest(".em-zoom-buttons")&&!t.target.closest(".em-button")})).extent([[0,0],[t.width_,t.height_]]).scaleExtent(a).translateExtent(o).on("zoom",(function(a){var o=a.transform,s=t.svg_.select("#em-zoom-group-"+t.svgId_);r?r=!1:(t.__lastTransform=o,o.k!==n.k?(t.lockPanUntilZoom_&&(i=!0),R_(a,n,t),s.attr("data-zoom",o.k).attr("transform",o),n=o):!t.lockPanUntilZoom_||i?(I_(a,t),s.attr("transform",o),n=o):(r=!0,e.call(t.__zoomBehavior.transform,n)))})).on("end",(function(e){var n;return null===(n=t.onZoomEnd_)||void 0===n?void 0:n.call(t,e,t)})),t.__lastTransform=n,!t.__baseZ){var s=t.height_/2,l=y(t._projection.invert([0,s]),1)[0],c=y(t._projection.invert([t.width_,s]),1)[0];t.__baseZ=(c-l)/t.width_}e.call(t.__zoomBehavior)}(i)),i.backgroundMap_&&l(i)),e&&o(i),i.labels_&&Rh(i,n),i.annotations_&&(Ih(i),i.annotationsAdded=!0),i.placenames_&&function(t){em.apply(this,arguments)}(i),i.title()){var r=i.isInset?"em-inset-title":"em-title";i.titlePosition()||i.titlePosition([10,fa(r)+(i.isInset?0:10)]),i.svg().append("text").attr("id","title"+i.geo_).attr("class",r).attr("x",i.titlePosition()[0]).attr("y",i.titlePosition()[1]).html(i.title())}if(i.subtitle()){var a=i.isInset?"em-inset-subtitle":"em-subtitle",s=i.isInset?"em-inset-title":"em-title";i.subtitlePosition()||i.subtitlePosition([10,fa(s)+fa(a)+15]),i.svg().append("text").attr("id","subtitle"+i.geo_).attr("class",a).attr("x",i.subtitlePosition()[0]).attr("y",i.subtitlePosition()[1]).html(i.subtitle())}if((i.footnote_&&p(),i.showSourceLink_)&&((t=e?i.stat("size"):i.stat())&&t.eurostatDatasetCode)){var d=t.eurostatDatasetCode,g="https://ec.europa.eu/eurostat/databrowser/view/".concat(d,"/default/table?lang=en"),m=i.svg().append("a").attr("class","em-source-dataset-link").attr("href",g).attr("target","_blank").append("text").attr("class","em-source-dataset-link-text").attr("x",i.width_).attr("y",i.height_).text("EUROSTAT").attr("text-anchor","end").node().getComputedTextLength();i.svg().append("text").attr("class","em-source-pretext").attr("x",i.width_-m-2).attr("y",i.height_).text("Source:").attr("text-anchor","end")}return i.showScalebar_&&(2!==i.scalebarPosition_.length&&(i.scalebarPosition_[0]=15,i.scalebarPosition_[1]=i.height_-50),_()),i.minimap_&&N_(i),i.zoomButtons_&&function(t){var e=Ot("#"+t.svgId()).append("g").attr("class","em-zoom-buttons").style("pointer-events","all"),n=parseInt(da("em-button","width"))||30,i=e.append("g").attr("class","em-zoom-in em-button").style("cursor","pointer");i.append("title").text("Zoom in"),i.append("rect").attr("width",n).attr("height",n),i.append("text").attr("x",n/2).attr("y",n/2+7).text("+");var r=e.append("g").attr("class","em-zoom-out em-button").style("cursor","pointer").attr("transform","translate(0, ".concat(n,")")).style("cursor","pointer");r.append("title").text("Zoom out"),r.append("rect").attr("width",n).attr("height",n),r.append("text").attr("x",n/2).attr("y",n/2+7).text("−"),i.on("click",(function(e){e.preventDefault(),e.stopPropagation(),function(t){t.svg_.transition().call(t.__zoomBehavior.scaleBy,2)}(t)})),r.on("click",(function(e){e.preventDefault(),e.stopPropagation(),function(t){t.svg_.transition().call(t.__zoomBehavior.scaleBy,.5)}(t)}))}(i),i.insetsButton_&&function(t){var e=Ot("#"+t.svgId()),n=parseInt(da("em-button","width"))||30,i=e.append("g").attr("class","em-insets-button em-button").attr("id","em-insets-button");i.append("title").text("Show/hide inset maps"),i.append("rect").attr("width",n).attr("height",n);var r=document.createComment("!Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.");i.node().appendChild(r);var a=n/700;i.append("path").attr("d","M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1l0 9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1l1 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24l0 4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6l29.4 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-20.7 0c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3l11.3 0c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16l7.3 0c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4l-20.9 0c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3l0 3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3l21.3 0c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z").attr("transform","translate(".concat(n/2,", ").concat(n/2,") scale(").concat(a,") translate(").concat(-256,", ").concat(-256,")")).attr("fill","#333").attr("pointer-events","none"),i.on("click",(function(t){t.preventDefault(),t.stopPropagation();var n=e.select("#em-insets-group");"none"===n.style("display")||""===n.style("display")?n.style("display","block"):n.style("display","none")}))}(i),i};var o=function(t){var e;t.Geometries.centroidsData?e="mixed"==t.nutsLevel_?[].concat(x(t.Geometries.centroidsData[0].features),x(t.Geometries.centroidsData[1].features),x(t.Geometries.centroidsData[2].features),x(t.Geometries.centroidsData[3].features)):t.Geometries.centroidsData.features:"WORLD"==t.geo_&&(e=[],t.Geometries.geoJSONs.worldrg.forEach((function(t){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?am(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):am(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);"FR"==t.properties.id?n.geometry={coordinates:[2.2,46.2],type:"Point"}:n.geometry={coordinates:Eo(t),type:"Point"},e.push(n)}))),t.processCentroids_&&(e=t.processCentroids_(e));var n=e.map((function(e){var n=t._projection(e.geometry.coordinates);return e.properties.centroid=n,e}));t.Geometries._allCentroidsFeatures=x(n),t.Geometries.centroidsFeatures=n.filter((function(e){return s(e.properties.id,t)})),(i.getCentroidsGroup(t).empty()?t.svg().select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-centroids-".concat(t.svgId_)).attr("class","em-centroids"):i.getCentroidsGroup(t)).selectAll("g.em-centroid").data(t.Geometries.centroidsFeatures,(function(t){return t.properties.id})).join((function(t){return t.append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")}))}),(function(t){return t}),(function(t){return t.remove()}))};i.getCentroidsGroup=function(t){return t.svg().select("#em-centroids-".concat(t.svgId_))},i.refreshCentroids=function(t){var e=t.Geometries._allCentroidsFeatures;if(e)return t.Geometries.centroidsFeatures=e.filter((function(e){return s(e.properties.id,t)})),i.getCentroidsGroup(t).selectAll("g.em-centroid").data(t.Geometries.centroidsFeatures,(function(t){return t.properties.id})).join((function(t){return t.append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")}))}),(function(t){return t}),(function(t){return t.remove()})),t};var s=function(t,e){return!e.statCodes_||e.statCodes_.some((function(n){var i,r=null===(i=e.statData(n))||void 0===i?void 0:i.get(t);return r&&!isNaN(r.value)&&0!==r.value}))},l=function(t){var e=t.svg().select("#em-zoom-group-"+t.svgId_);e.append("rect").attr("id","sea").attr("class","em-sea").attr("x",-5*t.width_).attr("y",-5*t.height_).attr("width",11*t.width_).attr("height",11*t.height_),"WORLD"==t.geo_&&e.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",t._pathFunction).attr("class","em-graticule"),t.drawCoastalMargin_&&g(),t.geometries_?t.Geometries.addUserGeometriesToMap(t.geometries_,e,t._pathFunction):t.Geometries.addDefaultGeometriesToMap(e,t.drawGraticule_,t._pathFunction,t.nutsLevel_,t.nutsYear_,t.geo_,t.proj_,t.scale_)},c=function(){var t,e=sm[i.geo_+"_"+i.proj_];e?(i.position_.x=i.position_.x||e.geoCenter[0],i.position_.y=i.position_.y||e.geoCenter[1]):null!==(t=i.Geometries.defaultGeoData)&&void 0!==t&&t.bbox&&(i.position_.x=i.position_.x||.5*(i.Geometries.defaultGeoData.bbox[0]+i.Geometries.defaultGeoData.bbox[2]),i.position_.y=i.position_.y||.5*(i.Geometries.defaultGeoData.bbox[1]+i.Geometries.defaultGeoData.bbox[3])),d()},u=function(){var t,e=sm[i.geo_+"_"+i.proj_];return e?800*e.pixelSize/i.width_:null!==(t=i.Geometries.defaultGeoData)&&void 0!==t&&t.bbox?Math.min((i.Geometries.defaultGeoData.bbox[2]-i.Geometries.defaultGeoData.bbox[0])/i.width_,(i.Geometries.defaultGeoData.bbox[3]-i.Geometries.defaultGeoData.bbox[1])/i.height_):100},h=function(){var t;"WORLD"===i.geo_?i._projection=i.projectionFunction_||xl(Fl).scale(152.63).translate([i.width_/2,i.height_/2]).scale((i.width_-20)/(2*Math.PI)):i._projection=i.projectionFunction_||function(){var t,e,n,i,r,a,o,s=1,l=0,c=0,u=1,h=1,f=0,d=null,p=1,g=1,_=zo({point:function(t,e){var n=y([t,e]);this.stream.point(n[0],n[1])}}),m=Oo;function v(){return p=s*u,g=s*h,a=o=null,y}function y(n){var i=n[0]*p,r=n[1]*g;if(f){var a=r*t-i*e;i=i*t+r*e,r=a}return[i+l,r+c]}return y.invert=function(n){var i=n[0]-l,r=n[1]-c;if(f){var a=r*t+i*e;i=i*t-r*e,r=a}return[i/p,r/g]},y.stream=function(t){return a&&o===t?a:a=_(m(o=t))},y.postclip=function(t){return arguments.length?(m=t,d=n=i=r=null,v()):m},y.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=i=r=null,Oo):No(d=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),v()):null==d?null:[[d,n],[i,r]]},y.scale=function(t){return arguments.length?(s=+t,v()):s},y.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],v()):[l,c]},y.angle=function(n){return arguments.length?(e=ja(f=n%360*Oa),t=Ia(f),v()):f*Na},y.reflectX=function(t){return arguments.length?(u=t?-1:1,v()):u<0},y.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},y.fitExtent=function(t,e){return Uo(y,t,e)},y.fitSize=function(t,e){return Ho(y,t,e)},y.fitWidth=function(t,e){return Vo(y,t,e)},y.fitHeight=function(t,e){return $o(y,t,e)},y}().reflectY(!0).fitSize([i.width_,i.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(t=Sa(i))[0],t[1]],[t[2],t[3]]]}})},f=function(){i._pathFunction=$s().projection(i._projection)},d=function(){var t=ya("x"),e=ya("y"),n=ya("z");null==t||null==t||isNaN(+t)||(i.position_.x=+t),null==e||null==e||isNaN(+e)||(i.position_.y=+e),null==n||null==n||isNaN(+n)||(i.position_.z=+n)},p=function(){i.svg().append("text").attr("id","em-footnote").attr("class","em-footnote").attr("x",0).attr("y",i.height_).html(i.footnote_).on("mouseover",(function(){i._tooltip.mw___=i._tooltip.style("max-width"),i._tooltip.style("max-width","400px"),i.footnoteTooltipText_&&i._tooltip.mouseover(i.footnoteTooltipText_)})).on("mousemove",(function(t){i.footnoteTooltipText_&&i._tooltip.mousemove(t)})).on("mouseout",(function(t){i.footnoteTooltipText_&&i._tooltip.mouseout(t),i._tooltip.style("max-width",i._tooltip.mw___)}))},g=function(){var t=i.svg().select("#em-zoom-group-"+i.svgId_).append("g").attr("id","em-coast-margin").attr("class","em-coast-margin");i.Geometries.geoJSONs.cntbn&&t.append("g").attr("id","em-coast-margin-cnt").attr("class","em-coast-margin-cnt").selectAll("path").data(i.Geometries.geoJSONs.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._pathFunction),i.Geometries.geoJSONs.nutsbn&&t.append("g").attr("id","em-coast-margin-nuts").attr("class","em-coast-margin-nuts").selectAll("path").data(i.Geometries.geoJSONs.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._pathFunction),i.Geometries.geoJSONs.worldbn&&t.append("g").attr("id","em-coast-margin-world").attr("class","em-coast-margin-world").selectAll("path").data(i.Geometries.geoJSONs.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",i._pathFunction)},_=function(){var t=i.scalebarMaxWidth_,e=i.scalebarTextOffset_[0],n=i.scalebarTextOffset_[1],r=i.position_.z,a=m(t*r),o=a[0]/r,s=a[1],l=i.svg().append("g").attr("class","em-scalebar").attr("transform","translate(".concat(i.scalebarPosition_[0],",").concat(i.scalebarPosition_[1],")")).attr("width",t+20).attr("height",i.scalebarHeight_);l.append("line").attr("class","em-scalebar-line").attr("x1",5).attr("y1",1).attr("x2",5).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e).attr("y",i.scalebarTickHeight_+n).text("0");var c={1:4,2:2,5:5}[s],u=o/c,h=i.scalebarSegmentHeight_/2+1;if(u>=15){for(var f=1;f<c;f++)if(l.append("line").attr("class","em-scalebar-line").attr("x1",5+i.scalebarStrokeWidth_/2+f*u).attr("y1",1).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e+f*u).attr("y",i.scalebarTickHeight_+n).text(v(a[0]/c*f)),1==f)l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+i.scalebarStrokeWidth_-1).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",h);else{var d=5+i.scalebarStrokeWidth_/2+(f-1)*u;d>0&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",d).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+f*u).attr("y2",h)}u>=15&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+(c-1)*u).attr("y1",h).attr("x2",5+c*u).attr("y2",h)}else l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+i.scalebarStrokeWidth_-1).attr("y1",h).attr("x2",5+i.scalebarStrokeWidth_/2+u*c).attr("y2",h);l.append("line").attr("class","em-scalebar-line").attr("x1",o+5).attr("y1",1).attr("x2",o+5).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",o+5+e).attr("y",i.scalebarTickHeight_+n).text(v(a[0])+i.scalebarUnits_)},m=function(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10)));return 5*e<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]},v=function(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3};return i},sm={EUR_3035:{geoCenter:[479e4,342e4],pixelSize:6400},IC_32628:{geoCenter:[443468,3145647],pixelSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixelSize:130},MQ_32620:{geoCenter:[716521,1621322],pixelSize:130},GF_32622:{geoCenter:[266852,444074],pixelSize:500},RE_32740:{geoCenter:[348011,7661627],pixelSize:130},YT_32738:{geoCenter:[516549,8583920],pixelSize:70},MT_3035:{geoCenter:[4719755,1441701],pixelSize:70},PT20_32626:{geoCenter:[397418,4271471],pixelSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixelSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixelSize:40},IS_3035:{geoCenter:[3011804,496e4],pixelSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixelSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixelSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixelSize:500},WORLD_54030:{geoCenter:[14,17],pixelSize:9e3}};function lm(t){var e,n,i,r,a=function(t,e){var n,i=[];if("string"==typeof t&&(t=[t]),Array.isArray(t)){if(t.length===e)return t;if(1===t.length){for(n=0;n<e;n++)i.push(t[0]);return i}}for(n=0;n<e;n++){var r=void 0===t[n]?null:t[n];i.push(r)}return i};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var o=[],s=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new lm(t);for(n in t)s++,o.push(n);this.__tree__=t,this.length=s,this.id=o;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=e=t.__tree__:this.__tree__=e=t,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.updated=e.updated||null,this.source=e.source||null,this.extension=e.extension||null;var l,c=0,u=e.size||e.dimension&&e.dimension.size;if(this.size=u,this.value=e.hasOwnProperty("value")&&null!==e.value&&0!==e.value.length?e.value:{},Array.isArray(this.value))c=this.value.length;else{var h=1;for(l=u.length;l--;)h*=u[l];c=h}if(this.value=a(this.value,c),this.status=e.hasOwnProperty("status")?a(e.status,c):null,e.hasOwnProperty("dimension")){var f=e.dimension,d=e.role||!e.version&&f.role||null,p=e.id||f.id,g=u.length,_=function(t){d.hasOwnProperty(t)||(d[t]=null)};if(!Array.isArray(p)||!Array.isArray(u)||p.length!=g)return;if(this.length=g,this.id=p,d&&(_("time"),_("geo"),_("metric"),_("classification")),d&&null===d.classification){var m=[],v=["time","geo","metric"],y=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(l=0;l<3;l++){var x=d[v[l]];null!==x&&(m=m.concat(x))}for(d.classification=[],l=0;l<g;l++)y(p[l],m)||d.classification.push(p[l]);0===d.classification.length&&(d.classification=null)}this.role=d,this.n=c;for(var b=0,w=this.length;b<w;b++)if(f[p[b]].category.hasOwnProperty("index")){if(Array.isArray(f[p[b]].category.index)){var S={},M=f[p[b]].category.index;for(i=M.length,r=0;r<i;r++)S[M[r]]=r;f[p[b]].category.index=S}}else{var E=0;for(n in f[p[b]].category.index={},f[p[b]].category.label)f[p[b]].category.index[n]=E++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new lm({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var k=[],C=(e=t.__tree__).category;if(!e.hasOwnProperty("category"))return;if(!C.hasOwnProperty("label"))for(n in C.label={},C.index)C.label[n]=n;for(n in C.index)k[C.index[n]]=n;this.__tree__=e,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.id=k,this.length=k.length,this.role=t.role,this.hierarchy=C.hasOwnProperty("child"),this.extension=e.extension||null;break;case"category":var T=t.child;this.id=T,this.length=null===T?0:T.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var A=t.link.item;if(this.length=Array.isArray(A)?A.length:0,this.length)for(r=0;r<this.length;r++)this.id[r]=A[r].href}}}function cm(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}lm.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,i){var r=t.link.item[e];i.class===r.class&&r.id&&r.size&&r.dimension&&n.push(r)}:function(t,e,i){var r=t.link.item[e];i.class!==r.class||r.id&&r.size&&r.dimension||n.push(r)}:function(t,e,i){i.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var i=0;i<this.length;i++)e(this,i,t);return n},lm.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],i=0;if("collection"===this.class){var r=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=r.length;i<e;i++)n.push(new lm(r[i]));return n}if("number"==typeof t&&t>=0&&t<r.length)return new lm(r[t]);if("string"==typeof t)for(e=r.length;i<e;i++)if(r[i].href===t)return new lm(r[i]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;i<e;i++)n.push(this.Dataset(this.id[i]));return n}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dataset(a):null}var o=this.__tree__[t];return void 0===o?null:new lm({class:"dataset",__tree__:o})},lm.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,i=[],r=this.id.length,a=function(t,e){if(null!==t)for(var n in t)for(var i=null!==t[n]?t[n].length:0;i--;)if(t[n][i]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<r;n++)i.push(this.Dimension(this.id[n]));return i}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dimension(o,e):null}var s=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<r;n++){var l=this.id[n];a(s,l)===t.role&&i.push(this.Dimension(l,e))}return void 0===i[0]?null:i}return null}var c=this.__tree__.dimension;if(void 0===c)return null;var u=c[t];return void 0===u?null:e?new lm({class:"dimension",__tree__:u,role:a(s,t)}):function(t,e){var n=[];for(var i in t)n[t[i]]=e[i];return n}(u.category.index,u.category.label)},lm.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,i=this.id.length;n<i;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var r=this.id[t];return void 0!==r?this.Category(r):null}var a=this.__tree__.category;if(void 0===a)return null;var o=a.index[t];if(void 0===o)return null;var s=a.unit&&a.unit[t]||null,l=a.coordinates&&a.coordinates[t]||null,c=a.child&&a.child[t]||null,u=a.note&&a.note[t]||null;return new lm({class:"category",index:o,label:a.label[t],note:u,child:c,unit:s,coord:l})},lm.prototype.Dice=function(t,e,n){var i,r,a,o,s=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(i=!0),"boolean"==typeof n&&!0===n||(n=!1)):(i=s(e,"clone"),n=s(e,"drop"),r=s(e,"stringify"),a=s(e,"ovalue"),o=s(e,"ostatus"));var l,c=i?new lm(JSON.parse(JSON.stringify(this))):this,u=c.status,h=[],f=[],d=function(t,e){var n,i,r,a=(n=t,i=e,r={},"[object Array]"===Object.prototype.toString.call(n[i])?(n[i].forEach((function(t,e){null!==t&&(r[String(e)]=t)})),r):n[i]);delete t[e],t[e]=a};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var p=Object.keys(t);return p.length>0&&(p.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach((n=>e[n]=c.Dimension(n).id.filter((e=>-1===t[n].indexOf(e))))),e}(t)),c.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var i=[];p.forEach((function(n){var r=t[n],a=[];r.forEach((function(t){a.push(e[n]===t)})),i.push(-1!==a.indexOf(!0))})),-1===i.indexOf(!1)&&(h.push(e.value),f.push(e.status))})),p.forEach((function(e){var n=c.Dimension(e).id,i=0,r={};c.size[c.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(r[n]=i,i++)})),c.__tree__.dimension[e].category.index=r})),c.n=h.length,c.value=c.__tree__.value=h,c.status=c.__tree__.status=null!==u?f:null),r?((l=c.__tree__).hasOwnProperty("id")||(l.version="2.0",l.hasOwnProperty("class")||(l.class="dataset"),l.id=l.dimension.id,l.size=l.dimension.size,delete l.dimension.id,delete l.dimension.size,l.dimension.hasOwnProperty("role")&&(l.role=l.dimension.role,delete l.dimension.role)),l.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(l.status))&&delete l.status,l.hasOwnProperty("role")&&(delete l.role.classification,["geo","time","metric"].forEach((function(t){null===l.role[t]&&delete l.role[t]}))),a&&d(l,"value"),o&&l.hasOwnProperty("status")&&d(l,"status"),JSON.stringify(l)):c},lm.prototype.Slice=function(t){if(null===this||"dataset"!==this.class)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},lm.prototype.Data=function(t,e){var n,i,r=[],a=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(i=this.value.length,n=0;n<i;n++)r.push(this.Data(n));return r}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var o=this.value[t];return void 0===o?null:e?{value:o,status:this.status?this.status[t]:null}:o}var s="object",l=this.__tree__,c=l.size||l.dimension&&l.dimension.size,u=c.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var h=1,f=0,d=[],p=[];for(n=0;n<u;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=c[n])return null;f+=(h*=n>0?c[u-n]:1)*t[u-n-1]}else d.push(n),p.push(c[n]);if(d.length>1)return null;if(1===d.length){for(var g=0,_=p[0];g<_;g++){var m=[];for(n=0;n<u;n++)n!==d[0]?m.push(t[n]):m.push(g);r.push(this.Data(m,e))}return r}return e?{value:this.value[f],status:this.status?this.status[f]:null}:this.value[f]}s="array"}var v=function(t,e,n){var i,r=[],o={},s=t.dimension,l=t.id||s.id,c=t.size||s&&s.size;if("array"===n){for(i=e.length;i--;)o[e[i][0]]=e[i][1];e=o}for(var u=0,h=l.length;u<h;u++){var f=l[u],d=e[f];r.push("string"==typeof d?d:1===c[u]?a(s[f].category.index):null)}return r}(l,t,s),y=[],x=l.dimension,b=l.id||x.id;for(n=0,i=v.length;n<i;n++)y.push(x[b[n]].category.index[v[n]]);return this.Data(y,e)},lm.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"===(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&void 0===t.field&&(t.field="id");var n,i,r,a,o,s=this.__tree__,l=!0===t.status;if("function"==typeof e){n=this.toTable(t);var c=[],u="array"!==t.type?0:1;for(o=(F="object"!==t.type?n.slice(u):n.rows.slice(0)).length,i=0;i<o;i++){var h=e.call(this,F[i],i);void 0!==h&&c.push(h)}return"object"===t.type?{cols:n.cols,rows:c}:("array"===t.type&&c.unshift(n[0]),c)}if("arrobj"===t.type){var f=[],d=s.role&&s.role.metric,p=function(){},g={},_=this,m=_.id,v=t.by&&-1!==m.indexOf(t.by)?t.by:null,y=!0===t.meta,x=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],b=!0===t.comma,w=!0===t.bylabel,S=function(e){if(y){var n={};return m.forEach((function(t){var e=_.Dimension(t);n[t]={label:e.label,role:e.role,categories:{id:e.id,label:_.Dimension(t,!1)}}})),{meta:{label:_.label,source:_.source,updated:_.updated,id:m,status:l,unit:t.unit,by:v,bylabel:w,drop:null!==v&&x.length>0?x:null,prefix:null!==v?N||"":null,comma:b,dimensions:n},data:e}}return e};v&&(t.field="id");var M=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:l})).shift();if(null===v&&t.unit&&d){if("id"!==t.content)for(var E=d.length;E--;){var k=this.Dimension(d[E]);g[d[E]]={};for(var C=k.length;C--;)g[d[E]][k.Category(C).label]=k.id[C]}p=function(e,n){if(-1!==d.indexOf(e)){var i=s.dimension[e].category;i.unit?T.unit=i.unit["id"!==t.content?g[e][n]:n]:T.unit=null}},t.unit=!0}else t.unit=!1;for(o=n.length,i=0;i<o;i++){var T={};for(r=n[i].length;r--;)T[M[r]]=n[i][r],p(M[r],n[i][r]);f.push(T)}if(b&&f.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==v){var A,P={},F=[],L={},N=void 0!==t.prefix?t.prefix:"";x.forEach((function(t,e){(!_.Dimension(t)||_.Dimension(t).length>1)&&(x[e]="")}));var O=m.filter((function(t){return t!==v&&-1===x.indexOf(t)})),z=_.Dimension(v);for(var G in"id"!==t.content?w?A=function(t,e,n){t[e][N+n[v]]=n.value}:(z.Category().forEach((function(t,e){L[t.label]=z.id[e]})),A=function(t,e,n){t[e][N+L[n[v]]]=n.value}):A=function(t,e,n){t[e][N+n[v]]=n.value},f.forEach((function(t){var e=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")}(t,O);void 0===P[e]&&(P[e]=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n}(t,O)),A(P,e,t,v)})),P)F.push(P[G]);return l=!1,S(F)}return S(f)}var D,I,R,j,B="id"===t.field;if("object"===t.type){var q="number"==typeof this.value[0]||null===this.value[0]?"number":"string";D=function(t,e){var n=B&&t||e||t;Q.push({id:t,label:n,type:"string"})},I=function(t,e,n){var i=(B?"value":t)||"Value",r=(B?"status":e)||"Status";n&&Q.push({id:"status",label:r,type:"string"}),Q.push({id:"value",label:i,type:q})},R=function(t){ht.push({v:t})},j=function(t){ht.push({v:t}),tt.push({c:ht})}}else D=function(t,e){var n=B&&t||e||t;Q.push(n)},I=function(t,e,n){var i=(B?"value":t)||"Value",r=(B?"status":e)||"Status";n&&Q.push(r),Q.push(i),Z.push(Q)},R=function(t){ht.push(t)},j=function(t){ht.push(t),Z.push(ht)};var W=s.dimension,U=s.id||W.id,H=s.size||W.size,V=U.length;if(V!=H.length)return!1;var $=[],Y=1,J=(E=1,[]),X=[],K=[],Z=[],Q=[],tt=[];for(i=0;i<V;i++){var et=U[i];D(et,W[et].label),Y*=H[i],E*=H[i];var nt=[];for(r=0;r<H[i];r++)for(var it in W[U[i]].category.index)if(W[U[i]].category.index[it]===r){var rt="id"!==t.content&&W[U[i]].category.label?W[U[i]].category.label[it]:it;nt.push(rt)}$.push(nt),J.push(E)}for(I(t.vlabel,t.slabel,l),o=$.length,i=0;i<o;i++){for(var at=[],ot=0,st=$[i].length;ot<st;ot++)for(var lt=0;lt<Y/J[i];lt++)at.push($[i][ot]);X.push(at)}for(o=X.length,i=0;i<o;i++){var ct=[],ut=0;for(a=0;a<Y;a++)ct.push(X[i][ut]),++ut===X[i].length&&(ut=0);K.push(ct)}for(a=0;a<Y;a++){var ht=[];o=X.length;for(var ft=0;ft<o;ft++)R(K[ft][a]);l&&R(this.status?this.status[a]:null),j(this.value[a])}return"object"===t.type?{cols:Q,rows:tt}:Z},lm.prototype.node=function(){return this.__tree__},lm.prototype.toString=function(){return this.class};var um=function(t){var e={__data:void 0,_data_:void 0,get:function(t){return t?e._data_?e._data_[t]:void 0:e._data_},getValue:function(t){var n=e.get(t);return n?n.value:void 0},set:function(t,n){e._data_=e._data_||{};var i=e._data_[t];return i?n.value?(i.value=n.value,i.status=n.status):i.value=n:e._data_[t]=n.value?n:{value:n},e},setData:function(t){return e.__data=t,e._data_={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},setManualMultiDate:function(t){for(var n in e._data_=e._data_||{},t){var i=t[n];for(var r in e._data_[n]={},i){var a=i[r];e._data_[n][r]={value:a}}}return e},getArray:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},getUniqueValues:function(){return Object.values(e._data_).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},getMin:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}))},getMax:function(){if(e._data_)return Object.values(e._data_).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}))},isReady:function(){return null!=e._data_},metadata:void 0,unitText_:void 0,retrieveFromRemote:function(t,n,a){return e.eurostatDatasetCode_?i(t,n,a):e.csvURL_&&r(a),e},eurostatDatasetCode_:void 0,filters_:{lastTimePeriod:1},precision_:2,label_:void 0},n=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Kh(function(t,e,n,i){n=n||"en",i=i||"json";var r=[];if(r.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",i,"&lang=",n),e)for(var a in e){var o=e[a];if(Array.isArray(o))for(var s=0;s<o.length;s++)r.push("&",a,"=",o[s]);else r.push("&",a,"=",o)}return r.join("")}(e.eurostatDatasetCode_,e.filters_,n))},i=function(t,i,r){e._data_=null,n(t,i).then((function(t){var n;if(t.error)return console.error("Error retrieving Eurostat data: "+(null===(n=t.error[0])||void 0===n?void 0:n.label));var i,a,o="object"==typeof(i=t)?new lm(i):"version"===i?"1.3.1":fetch?fetch(i,a).then(cm).then((function(t){return new lm(t)})):void 0;e.metadata={label:o.label,href:o.href,source:o.source,updated:o.updated,extension:o.extension},e.metadata.time=o.Dimension("time").id[0],e._data_=function(t){for(var e={},n=t.Dimension("geo").id,i=0;i<n.length;i++)e[n[i]]=t.Data(i);return e}(o),r&&r()}))};e.getTime=function(){var t=e.filters_.time;return t||(e._data_?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var r=function(t){e._data_=null,$_(e.csvURL_).then((function(n){e._data_=function(t,e,n){for(var i={},r=0;r<t.length;r++){var a=t[r],o=a[n];i[a[e]]=o?{value:isNaN(+o)?o:+o,status:""}:{value:":",status:""}}return i}(n,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e};function hm(t,e){var n=t.map;n.patternFill_&&n.patternFill_.forEach((function(i,r){if(i.legendLabel){var a=r*t.shapeHeight+r*t.shapePadding+15,o=e.append("g").attr("class","em-legend-item em-pattern-legend-item"),s=i.color||"#000";("#fff"===s.toLowerCase()||"white"===s.toLowerCase())&&o.append("rect").attr("x",0).attr("y",a).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill","#ddd"),o.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",a).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill","url(#".concat(i.patternId||i.pattern,")")).on("mouseover",(function(){fm(n,i.patternId||i.pattern),n.insetTemplates_&&va(n.insetTemplates_,n.svgId,fm,i.patternId||i.pattern)})).on("mouseout",(function(){dm(n),n.insetTemplates_&&va(n.insetTemplates_,n.svgId,dm)})),o.append("text").attr("class","em-legend-label").attr("x",t.shapeWidth+t.labelOffsets.x).attr("y",a+t.shapeHeight/2).attr("dominant-baseline","middle").attr("dy","0.35em").text(i.legendLabel)}}))}function fm(t,e){var n="url(#".concat(e,")"),i=wa(t);t.svg_.selectAll(i).selectAll("[ecl]").filter((function(){return!Ot(this).classed("pattern-fill-overlay")})).style("fill","white"),t.svg_.selectAll(".pattern-fill-overlay").style("opacity",0),t.svg_.selectAll(".pattern-fill-overlay").filter((function(){return Ot(this).attr("fill")===n})).style("opacity",1)}function dm(t){t.svg_.selectAll(".pattern-fill-overlay").style("opacity",1);var e=wa(t);t.svg_.selectAll(e).selectAll("[ecl]").filter((function(){return!Ot(this).classed("pattern-fill-overlay")})).each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}class pm extends Map{constructor(t,e=vm){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(gm(this,t))}has(t){return super.has(gm(this,t))}set(t,e){return super.set(_m(this,t),e)}delete(t){return super.delete(mm(this,t))}}Set;function gm({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function _m({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function mm({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function vm(t){return null!==t&&"object"==typeof t?t.valueOf():t}const ym=Symbol("implicit");function xm(){var t=new pm,e=[],n=[],i=ym;function r(r){let a=t.get(r);if(void 0===a){if(i!==ym)return i;t.set(r,a=e.push(r)-1)}return n[a%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new pm;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return xm(e,n).unknown(i)},Qt.apply(r,arguments),r}function bm(){var t,e,n=xm().unknown(void 0),i=n.domain,r=n.range,a=0,o=1,s=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=o<a,f=h?o:a,d=h?a:o;t=(d-f)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),f+=(d-f-t*(n-l))*u,e=t*(1-l),s&&(f=Math.round(f),e=Math.round(e));var p=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(r);++i<r;)a[i]=t+i*n;return a}(n).map((function(e){return f+t*e}));return r(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,h()):[a,o]},n.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return bm(i(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},Qt.apply(h(),arguments)}function wm(t){return t}var Sm=1e-6;function Mm(t){return"translate("+t+",0)"}function Em(t){return"translate(0,"+t+")"}function km(t){return e=>+t(e)}function Cm(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Tm(){return!this.__axis}function Am(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Mm:Em;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,p=null==r?e.tickFormat?e.tickFormat.apply(e,n):wm:r,g=Math.max(a,0)+s,_=e.range(),m=+_[0]+l,v=+_[_.length-1]+l,y=(e.bandwidth?Cm:km)(e.copy(),l),x=f.selection?f.selection():f,b=x.selectAll(".domain").data([null]),w=x.selectAll(".tick").data(d,e).order(),S=w.exit(),M=w.enter().append("g").attr("class","tick"),E=w.select("line"),k=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(M),E=E.merge(M.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),k=k.merge(M.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),k=k.transition(f),S=S.transition(f).attr("opacity",Sm).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),M.attr("opacity",Sm).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),S.remove(),b.attr("d",4===t||2===t?o?"M"+c*o+","+m+"H"+l+"V"+v+"H"+c*o:"M"+l+","+m+"V"+v:o?"M"+m+","+c*o+"V"+l+"H"+v+"V"+c*o:"M"+m+","+l+"H"+v),w.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),E.attr(u+"2",c*a),k.attr(u,c*g).text(p),x.filter(Tm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=y}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function Pm(t){return Am(3,t)}function Fm(t){return Am(4,t)}var Lm=function(t,e,n){var i=t.histogram.orientation||"horizontal",r=t.histogram.showCounts,a=t.histogram.showPercentages,o=t.histogram.labelRotation||0,s=t.histogram.margin||{top:0,right:0,bottom:0,left:0},l=t.histogram.height||200,c=t.histogram.width||270,u=t.getNumberOfClasses(t),h=t.getLabelFormatter(t),f=t.getColorClassifier(t),d=new Array(u).fill(0),p=function(t){var e=t.map;return Object.values(e.statData()._data_).map((function(t){return t.value}))}(t),g=function(t){var e=t.map;return e.colors_?e.colors_:Array.from({length:e.numberOfClasses_}).map((function(t,n){return e.classToFillStyle()(n,e.numberOfClasses_)}))}(t),_=$m(t);p.forEach((function(t){var e=f(t);"number"==typeof e&&e>=0&&e<d.length&&d[e]++}));var m=d.reduce((function(t,e){return t+e}),0),v=t.lgg.append("g").attr("class","em-legend-histogram").attr("transform","translate(".concat(e,", ").concat(n,")"));function y(e,n){var i=Ot(this).style("stroke","black").attr("ecl"),r=g.length-1-parseInt(i,10);Jm(t.map,r),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,Jm,i)}function x(e,n){Ot(this).style("stroke","none");Xm(t.map),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,Xm)}"vertical"===i?function(e){var n=d.slice().reverse(),i=n.map((function(t){return m>0?t/m*100:0})),o=_.slice().reverse(),u=bm().domain(n.map((function(t,e){return e}))).range([s.top,l-s.bottom]).padding(.1),f=Nn().domain([0,Rt(n)]).nice().range([s.left,c-s.right]);e.selectAll("rect").data(n).join("rect").attr("class","em-legend-histogram-bar").attr("y",(function(t,e){return u(e)})).attr("x",s.left).attr("height",u.bandwidth()).attr("width",(function(t){return f(t)-s.left})).attr("fill",(function(t,e){return g[g.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",y).on("mouseout",x),(r||a)&&e.selectAll("text.em-histogram-label").data(n).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t){return f(t)+5})).attr("y",(function(t,e){return u(e)+u.bandwidth()/2})).attr("alignment-baseline","middle").text((function(t,e){return a?"".concat(i[e].toFixed(1),"%"):n[e]}));var p=e.append("g").attr("id","em-legend-histogram-y-axis").attr("transform","translate(".concat(s.left,",0)"));if("thresholds"===t.labelType){for(var v=[],b=0;b<o.length;b++){var w=u(b);void 0!==w&&v.push(w+u.bandwidth())}var S=Nn().domain([0,l]).range([0,l]);p.call(Fm(S).tickValues(v).tickFormat((function(t,e){return h?h(o[e],e):o[e]})).tickSize(4).tickSizeOuter(0))}else"ranges"===t.labelType&&p.call(Fm(u).tickSizeOuter(0).tickSize(0).tickFormat((function(t,e){return h?h(o[e],e):o[e]})));p.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end")}(v):function(e){var n=d.slice().reverse(),i=n.map((function(t){return m>0?t/m*100:0})),u=g.slice().reverse(),f=bm().domain(n.map((function(t,e){return e}))).range([s.left,c-s.right]).padding(.1),p=Nn().domain([0,Rt(n)]).nice().range([l-s.bottom,s.top]);e.selectAll("rect").data(n).join("rect").attr("class","em-legend-histogram-bar").attr("x",(function(t,e){return f(e)})).attr("y",(function(t){return p(t)})).attr("width",f.bandwidth()).attr("height",(function(t){return l-s.bottom-p(t)})).attr("fill",(function(t,e){return u[e]})).attr("ecl",(function(t,e){return e})).on("mouseover",y).on("mouseout",x),(r||a)&&e.selectAll("text.em-histogram-label").data(n).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t,e){return f(e)+f.bandwidth()/2})).attr("y",(function(t){return p(t)-5})).attr("text-anchor","middle").text((function(t,e){return a?"".concat(i[e].toFixed(1),"%"):t}));var v=e.append("g").attr("id","em-legend-histogram-x-axis").attr("transform","translate(0, ".concat(l-s.bottom,")"));if("thresholds"===t.labelType){for(var b=[],w=0;w<_.length;w++){var S=_.length-w-1,M=f(S);void 0!==M&&b.push(M+f.bandwidth())}var E=Nn().domain([0,c]).range([0,c]);v.call(Pm(E).tickValues(b).tickFormat((function(t,e){return h?h(_[e],e):_[e]})).tickSize(4).tickSizeOuter(0)),v.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("dy","0em").attr("dx","-0.45em").attr("transform","rotate(-".concat(o,")"))}else"ranges"===t.labelType&&(v.call(Pm(f).tickSizeOuter(0).tickSize(0).tickFormat((function(t,e){return h?h(_[e],e):_[e]}))),v.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("dy","0.35em").attr("dx","-0.35em").attr("transform","rotate(-".concat(o,")")))}(v)};function Nm(t,e,n){t.map;t._continuousLegendContainer=t.lgg.append("g").attr("class","em-continuous-legend").attr("id","em-continuous-legend").attr("transform","translate(".concat(e,", ").concat(n,")"));var i="ps"==t.map._mapType?t.colorLegend:t,r="vertical"===i.orientation,a="legend-gradient-"+Math.random().toString(36).substr(2,5),o=t.width||6*t.shapeWidth,s=r?t.shapeWidth:t.shapeHeight;if(function(t,e,n){for(var i,r=t.map,a="function"==typeof(null===(i=r.colorFunction_)||void 0===i?void 0:i.domain),o=20,s=function(t){var e=t.valueTransform_||function(t){return t},n=Om(t);return n.map(e)}(r),l=y(3===s.length?s:[s[0],null,s[1]],3),c=l[0],u=l[1],h=l[2],f=t._continuousLegendContainer.append("defs").append("linearGradient").attr("id",e).attr("x1","0%").attr("x2",n?"0%":"100%").attr("y1",n?"100%":"0%").attr("y2","0%"),d=0;d<=o;d++){var p=d/o,g=void 0;g=3===s.length?p<.5?c+2*p*(u-c):u+2*(p-.5)*(h-u):c+p*(h-c);var _=r.colorFunction_(a?g:p);f.append("stop").attr("offset","".concat(100*p,"%")).attr("stop-color",_)}}(t,a,r),function(t,e,n,i,r){var a=zm(e),o=e._continuousLegendContainer.append("rect").attr("class","em-legend-gradient").attr("id","em-legend-gradient").attr("x",0).attr("y",a).attr("width",r?i:n).attr("height",r?n:i).style("fill","url(#".concat(t,")"));!function(t,e,n,i){var r=e.map,a=Om(r),o=r.valueUntransform_||function(t){return t},s=e._continuousLegendContainer,l=zm(e),c=function(t){return"ps"==t._mapType?Rm:Dm}(r),u=function(t){return"ps"==t._mapType?jm:Im}(r);t.on("mousemove",(function(t){var u,h=y(Jr(t,this),2),f=h[0],d=h[1],p=i?d-l:f,g=Math.max(0,Math.min(n,p)),_=g/n,m=i?1-_:_;if(3===a.length){var v=y(a,3),x=v[0],b=v[1],w=v[2];if(m<.5)u=x+(b-x)*(m/.5);else u=b+(w-b)*((m-.5)/.5)}else{var S=y(a,2),M=S[0];u=M+m*(S[1]-M)}u=o(u),s.selectAll(".em-hover-line, .em-hover-tick, .em-hover-label").remove();var E=i?0:g,k=i?g+l:0;s.append("line").attr("class","em-hover-line").attr("x1",E).attr("y1",k).attr("x2",i?E+e.shapeWidth:E).attr("y2",i?k:k+e.shapeHeight).attr("stroke","black").attr("stroke-width",1).attr("pointer-events","none"),s.append("circle").attr("class","em-hover-tick").attr("cx",i?E+e.shapeWidth:E).attr("cy",i?k:k+e.shapeHeight).attr("r",3).attr("fill","black").attr("pointer-events","none");var C=Ym(e);s.append("text").attr("class","em-hover-label").attr("x",i?E+e.shapeWidth+5:E).attr("y",i?k:k+e.shapeHeight+12).attr("text-anchor",i?"start":"middle").attr("alignment-baseline","middle").attr("pointer-events","none").text(C(u)),c(r,u)})),t.on("mouseout",(function(){s.selectAll(".em-hover-line, .em-hover-tick, .em-hover-label").remove(),u(r)}))}(o,e,n,r)}(a,t,o,s,r),function(t){return t.ticks>1||t.tickValues}(t)?function(t,e,n,i){var r=t.map,a=Om(r),o=t._continuousLegendContainer.append("g").attr("class","em-legend-ticks"),s=Ym(t),l=r.valueTransform_||function(t){return t},c=zm(t),u=Array.isArray(t.tickValues)&&t.tickValues?t.tickValues.map(l):function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return t};if(Array.isArray(t)&&3===t.length){var i=y(t,3),r=i[0],a=i[1],o=i[2];return Array.from({length:e},(function(t,i){var s=i/(e-1);return n(s<.5?r+2*s*(a-r):a+2*(s-.5)*(o-a))}))}var s=y(t,2),l=s[0],c=s[1];return Array.from({length:e},(function(t,i){return n(l+i/(e-1)*(c-l))}))}(a,t.ticks,l);u.forEach((function(l,h){var f=function(t,e){if(3===e.length){var n=y(e,3),i=n[0],r=n[1],a=n[2];return t<r?.5*(t-i)/(r-i):.5+.5*(t-r)/(a-r)}return(t-e[0])/(e[1]-e[0])}(l,a);if(i){var d=n,p=e-f*e+c;o.append("line").attr("class","em-legend-tick").attr("x1",d).attr("y1",p).attr("x2",d+t.tickLength).attr("y2",p);var g=Array.isArray(t.tickLabels)&&null!=t.tickLabels[h]?t.tickLabels[h]:r.valueUntransform_?s(r.valueUntransform_(l)):s(l);o.append("text").attr("class","em-legend-label em-legend-ticklabel").attr("x",d+t.tickLength+3).attr("y",p).attr("dy","0.35em").attr("text-anchor","start").text(g)}else{var _=f*e,m=n+c;o.append("line").attr("class","em-legend-tick").attr("x1",_).attr("y1",m).attr("x2",_).attr("y2",m+t.tickLength);var v=Array.isArray(t.tickLabels)&&null!=t.tickLabels[h]?t.tickLabels[h]:r.valueUntransform_?s(r.valueUntransform_(l)):s(l);o.append("text").attr("class","em-legend-label em-legend-ticklabel").attr("x",_).attr("y",m+t.tickLength+10).attr("dy","0").attr("text-anchor",0===h?"start":h===u.length-1?"end":"middle").text(v)}}))}(t,o,s,r):function(t,e,n,i){var r=zm(t),a=t.lowLabel,o=t.highLabel,s=t.pointOfDivergenceLabel,l=t._continuousLegendContainer;if(i){var c=e,u=n+5;a&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r+c).attr("dy","-0.2em").attr("text-anchor","start").text(a),o&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r).attr("dy","0.8em").attr("text-anchor","start").text(o),s&&l.append("text").attr("class","em-legend-label").attr("x",u).attr("y",r+c/2).attr("dy","0.35em").attr("text-anchor","start").text(s)}else{var h=n+r+10;a&&l.append("text").attr("class","em-legend-label").attr("x",0).attr("y",h).attr("text-anchor","start").text(a),o&&l.append("text").attr("class","em-legend-label").attr("x",e).attr("y",h).attr("text-anchor","end").text(o),s&&l.append("text").attr("class","em-legend-label").attr("x",e/2).attr("y",h).attr("text-anchor","middle").text(s)}}(t,o,s,r),t.noData){var l=(r?t.width+5:s+30)+zm(t);i.pointOfDivergence&&i.pointOfDivergencePadding&&(l+=i.pointOfDivergencePadding);var c=t._continuousLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(l,")"));t.appendNoDataLegend(c,i.noDataText,Dm,Im)}}function Om(t){var e;return"function"==typeof(null===(e=t.colorFunction_)||void 0===e?void 0:e.domain)?t.colorFunction_.domain():t.domain_||[0,1]}function zm(t){return"ps"==t.map._mapType?t.colorLegend.titlePadding:t.titlePadding}function Gm(t){var e,n,i;return t&&t.legend_&&null!==(e=null!==(n=t.legend_.highlightTolerance)&&void 0!==n?n:null===(i=t.legend_.colorLegend)||void 0===i?void 0:i.highlightTolerance)&&void 0!==e?e:1}function Dm(t,e){var n=Gm(t),i=wa(t),r=t.svg_.selectAll(i).selectAll("[ecl]");r&&r.each((function(){var t=Ot(this),i=t.attr("ecl");if(i&&"nd"!==i){var r=+i;r>=e-n&&r<=e+n?t.style("fill",Ot(this).attr("fill___")):t.style("fill","white")}else{if("nd"===e)return;t.style("fill","white")}}))}function Im(t){var e=wa(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function Rm(t,e){var n=Gm(t);t.getCentroidsGroup(t).selectAll("[ecl]").each((function(){var i=Ot(this),r=i.attr("ecl");if(!r||"nd"===r)return"nd"===e?void i.style("opacity",t.psFillOpacity_):void i.style("opacity",0);var a=+r;a>=e-n&&a<=e+n?i.style("opacity",t.psFillOpacity_):i.style("opacity",0)}))}function jm(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(){Ot(this).style("opacity",t.psFillOpacity_)}))}function Bm(t,e,n){var i,r;t._discreteLegendContainer=t.lgg.append("g").attr("class","em-discrete-legend-container").attr("transform","translate(".concat(e,",").concat(n,")")),null!==(i=t.colorLegend)&&void 0!==i&&i.title&&t._discreteLegendContainer.append("text").attr("class","em-legend-title em-color-legend-title").attr("id","em-color-legend-title").attr("x",0).attr("y",0).text(t.colorLegend.title);var a="ps"==t.map._mapType?t.colorLegend:t;if("ranges"===t.labelType||"ranges"===(null===(r=t.colorLegend)||void 0===r?void 0:r.labelType)?function(t,e){for(var n=t.map,i=t._discreteLegendContainer,r=t.getLabelFormatter(t),a=t.getNumberOfClasses(t),o=t.getHighlightFunction(n),s=t.getUnHighlightFunction(n),l=t.getClassToFillStyle(t),c=t.getColorClassifier(t),u=qm(t),h=function(){var n=f*e.shapeHeight+u,h=0,d=t.ascending?a-f-1:f,p=l(d,a),g=i.append("g").attr("class","em-legend-item");e.pointOfDivergenceLabel&&f>=e.pointOfDivergence&&(n+=e.pointOfDivergencePadding),g.append("rect").attr("class","em-legend-rect").attr("x",h).attr("y",n).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",p).on("mouseover",(function(){Ot(this).raise(),o(t.map,d),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,o,d)})).on("mouseout",(function(){s(t.map),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,s,d)})),f>0&&g.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",n).attr("x2",e.sepLineLength).attr("y2",n),g.append("text").attr("class","em-legend-label").attr("x",Math.max(e.shapeWidth,e.sepLineLength+e.tickLength)+(e.labelOffsets.x||0)).attr("y",n+e.shapeHeight/2).attr("dy","0.3em").text(e.labels?e.labels[f]:r(c.invertExtent(d)[t.ascending?0:1],f))},f=0;f<a;f++)h();if(e.pointOfDivergenceLabel)for(var d=0;d<a;d++){var p=d*e.shapeHeight+u;d==e.pointOfDivergence&&Wm(t,p,e)}}(t,a):function(t,e){for(var n=t.map,i=t._discreteLegendContainer,r=t.getNumberOfClasses(t),a=qm(t),o=t.getHighlightFunction(n),s=t.getUnHighlightFunction(n),l=t.getColorClassifier(t),c=t.getClassToFillStyle(t),u=t.getLabelFormatter(t),h=function(h){var f=h*e.shapeHeight+a,d=0,p=t.ascending?r-h-1:h,g=c(p,r);if(i.append("rect").attr("class","em-legend-rect").attr("x",d).attr("y",f).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",g).on("mouseover",(function(){Ot(this).raise(),o(n,p),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,o,p)})).on("mouseout",(function(){s(n),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,s,p)})),h>0&&i.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",f).attr("x2",t.sepLineLength).attr("y2",f),h>0&&i.append("line").attr("class","em-legend-tick").attr("x1",e.sepLineLength).attr("y1",f).attr("x2",e.sepLineLength+e.tickLength).attr("y2",f),h<r-1){var _=i.append("text").attr("class","em-legend-label").attr("x",Math.max(e.shapeWidth,e.sepLineLength+e.tickLength)+(e.labelOffsets.x||0)).attr("y",f+e.shapeHeight).attr("dy","0.3em").text((function(){if(e.labels)return e.labels[h];if(null!=l&&l.invertExtent){var i=l.invertExtent(p);return u(i[t.ascending?0:1])}return n.noDataText_||""}));e.pointOfDivergenceLabel&&h==e.pointOfDivergence-1&&_.attr("class","em-legend-label em-legend-label-divergence")}},f=0;f<r;f++)h(f);if(e.pointOfDivergenceLabel)for(var d=0;d<r;d++){var p=d*e.shapeHeight+a;d==e.pointOfDivergence&&Wm(t,p,e)}}(t,a),a.noData){var o=t.getNumberOfClasses(t)*a.shapeHeight+qm(t)+3;a.pointOfDivergence&&a.pointOfDivergencePadding&&(o+=a.pointOfDivergencePadding);var s=t._discreteLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(o,")")),l=t.getHighlightFunction(t.map),c=t.getUnHighlightFunction(t.map);t.appendNoDataLegend(s,a.noDataText,l,c)}}function qm(t){return"ps"==t.map._mapType?t.colorLegend.titlePadding:0}function Wm(t,e,n){var i,r,a,o=t._discreteLegendContainer.append("g").attr("class","em-legend-divergence-container");"ranges"==n.labelType&&(e+=n.pointOfDivergencePadding/2);var s=t._discreteLegendContainer.selectAll(".em-legend-label").nodes().reduce((function(t,e){return Math.max(t,e.getBBox().width)}),0),l=t.divergingLineLength||t.shapeWidth+(null===(i=t.labelOffsets)||void 0===i?void 0:i.x)+s+(null===(r=t.labelOffsets)||void 0===r?void 0:r.x)+15;o.append("line").attr("x1",0).attr("y1",e).attr("x2",0+l).attr("y2",e).attr("class","em-legend-diverging-line");var c=t.pointOfDivergenceLabel.split("|");if(c.length>1){var u=t.divergingArrowLength||30,h=0+l;o.append("defs").append("marker").attr("id","arrowhead").attr("markerWidth",6).attr("markerHeight",6).attr("refX",0).attr("refY",3).attr("orient","auto").append("polygon").attr("points","0 0, ".concat(6," ").concat(3,", 0 ").concat(6)).attr("fill","black"),o.append("line").attr("class","em-legend-diverging-line").attr("x1",h).attr("y1",e).attr("x2",h).attr("y2",e-u).attr("marker-end","url(#arrowhead)"),o.append("line").attr("class","em-legend-diverging-line").attr("x1",h).attr("y1",e).attr("x2",h).attr("y2",e+u).attr("marker-end","url(#arrowhead)"),o.append("text").attr("class","em-legend-label").attr("x",h+10).attr("y",e-u+10).attr("dy","0.3em").text(c[0]),o.append("text").attr("class","em-legend-label").attr("x",h+10).attr("y",e+u-10).attr("dy","0.3em").text(c[1])}else o.append("text").attr("class","em-legend-diverging-label em-legend-label").attr("x",0+l+5).attr("y",e).attr("dy","0.3em").text(t.pointOfDivergenceLabel);"thresholds"!=t.labelType&&"thresholds"!=(null===(a=t.colorLegend)||void 0===a?void 0:a.labelType)||(c.length>1?t._discreteLegendContainer.selectAll(".em-legend-label-divergence").attr("x",0+l+10):t._discreteLegendContainer.selectAll(".em-legend-label-divergence").remove())}function Um(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Hm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Um(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Um(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Vm=function(t,e){var n=cy(t);if(n.labelType="thresholds",n.sepLineLength=n.shapeWidth,n.tickLength=4,n.decimals=0,n.labelOffsets={x:3,y:0},n.labels=null,n.histogram=null,n.pointOfDivergenceLabel=void 0,n.pointOfDivergence=void 0,n.pointOfDivergencePadding=7,n.divergingLineLength=void 0,n.divergingArrowLength=void 0,n.lowLabel="Low",n.highLabel="High",n.ticks=0,n.tickValues=void 0,n.tickLabels=void 0,n.orientation="vertical",e)for(var i in e)"histogram"===i&&"object"===Ma(e[i])?n.histogram=Hm({orientation:"horizontal",showCounts:!1,showPercentages:!1,labelRotation:0},e.histogram):n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var t=n.map;if(n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),!t.classToFillStyle())return;n.pointOfDivergenceLabel&&!n.pointOfDivergence&&(n.pointOfDivergence=t.numberOfClasses_/2);var e=n.getBaseY(),i=n.getBaseX();if(n.histogram?Lm(n,i,e):"continuous"===t.colorSchemeType_?Nm(n,i,e):Bm(n,i,e),t.opacityScale_){var r=n.lgg.node().getBBox().height+10;!function(t,e,n){var i,r=t.map,a=r.statData("alpha");if(a&&a.isReady()){var o=r.opacityScale_,s=o.domain()[0],l=o.domain()[1],c=Ym(t);t._alphaLegendContainer=t.lgg.append("g").attr("class","alpha-legend-container").attr("transform","translate(".concat(e,",").concat(n,")"));for(var u=0;u<40;u++){var h=s+(l-s)*u/40;t._alphaLegendContainer.append("rect").attr("x",3*u).attr("y",0).attr("width",3).attr("height",10).style("fill","#000").style("opacity",o(h))}t._alphaLegendContainer.append("text").attr("x",0).attr("y",22).attr("class","em-legend-label").text(c(s)),t._alphaLegendContainer.append("text").attr("x",120).attr("y",22).attr("text-anchor","end").attr("class","em-legend-label").text(c(l)),t._alphaLegendContainer.append("text").attr("x",60).attr("y",-5).attr("text-anchor","middle").attr("class","em-legend-label").text((null===(i=a.unitText)||void 0===i?void 0:i.call(a))||"Transparency")}}(n,i,e+r)}if(n.map.patternFill_){var a=n.lgg.node().getBBox().height,o=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(n.getBaseX(),", ").concat(a+n.boxPadding+5,")"));hm(n,o)}n.setBoxDimension()}},n.labelDecNb=function(t){return console.warn("labelDecNb is now DEPRECATED. Please use decimals instead."),n},n};function $m(t){var e=t.map,n=e.thresholds_.length>1?e.thresholds_:Array.from({length:e.numberOfClasses_}).map((function(n,i){return e.classifier().invertExtent(i)[t.ascending?0:1]})).slice(1);return n}function Ym(t){if("ranges"==t.labelType){var e=$m(t);return t.labelFormatter||function(n,i){var r=En(".".concat(t.decimals,"f"));return 0===i?"> ".concat(r(e[e.length-1])):i===e.length?"< ".concat(r(e[0])):"".concat(r(e[e.length-i-1])," - < ").concat(r(e[e.length-i])," ")}}return t.labelType,t.labelFormatter||En(".".concat(t.decimals,"f"))}function Jm(t,e){var n=wa(t),i=t.svg_.selectAll(n).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function Xm(t){var e=wa(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function Km(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Zm(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Qm(t){return t<0?-t*t:t*t}function tv(t){var e=t(ln,ln),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(ln,ln):.5===n?t(Zm,Qm):t(Km(n),Km(1/n)):n},Ln(e)}function ev(){var t=tv(dn());return t.copy=function(){return fn(t,ev()).exponent(t.exponent())},Qt.apply(t,arguments),t}function nv(){return ev.apply(null,arguments).exponent(.5)}const iv=Dn(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Gn)),rv=(Er(3),{draw(t,e){const n=Er(e/Cr);t.moveTo(n,0),t.arc(0,0,n,0,Ar)}}),av={draw(t,e){const n=Er(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()}},ov=Er(1/3),sv=2*ov,lv={draw(t,e){const n=Er(e/sv),i=n*ov;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},cv={draw(t,e){const n=Er(e),i=-n/2;t.rect(i,i,n,n)}},uv=Mr(Cr/10)/Mr(7*Cr/10),hv=Mr(Ar/10)*uv,fv=-br(Ar/10)*uv,dv={draw(t,e){const n=Er(.8908130915292852*e),i=hv*n,r=fv*n;t.moveTo(0,-n),t.lineTo(i,r);for(let e=1;e<5;++e){const a=Ar*e/5,o=br(a),s=Mr(a);t.lineTo(s*n,-o*n),t.lineTo(o*i-s*r,s*i+o*r)}t.closePath()}},pv=Er(3),gv={draw(t,e){const n=-Er(e/(3*pv));t.moveTo(0,2*n),t.lineTo(-pv*n,-n),t.lineTo(pv*n,-n),t.closePath()}},_v=(Er(3),-.5),mv=Er(3)/2,vv=1/Er(12),yv=3*(vv/2+1),xv={draw(t,e){const n=Er(e/yv),i=n/2,r=n*vv,a=i,o=n*vv+n,s=-a,l=o;t.moveTo(i,r),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(_v*i-mv*r,mv*i+_v*r),t.lineTo(_v*a-mv*o,mv*a+_v*o),t.lineTo(_v*s-mv*l,mv*s+_v*l),t.lineTo(_v*i+mv*r,_v*r-mv*i),t.lineTo(_v*a+mv*o,_v*o-mv*a),t.lineTo(_v*s+mv*l,_v*l-mv*s),t.closePath()}};function bv(t,e){let n=null,i=Dr(r);function r(){let r;if(n||(n=r=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return t="function"==typeof t?t:vr(t||rv),e="function"==typeof e?e:vr(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"==typeof e?e:vr(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:vr(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function wv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(Array.isArray(e)){var n=t.svg().select("defs");n.empty()&&(n=t.svg().append("defs"));var i={};e.forEach((function(e){var r,a=e.pattern,o=void 0===a?"hatching":a,s=e.regionIds,l=void 0===s?[]:s,c=e.color,u=void 0===c?"#000":c,h=e.strokeWidth,f=void 0===h?1:h,d=e.customPattern,p=e.spacing;if(d){var g=d.match(/id=['"]([^'"]+)['"]/);if(!g)return void console.warn("customPattern must include an id attribute.");r=g[1],t.svg().select("#".concat(r)).empty()&&n.node().insertAdjacentHTML("beforeend",d)}else{var _=u.replace("#","").toLowerCase();r="".concat(o,"-").concat(_,"-sw").concat(f),function(t,e,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8,o=t.svg().select("defs");if(t.svg().select("#".concat(CSS.escape(e))).empty()){var s=o.append("pattern").attr("id",e).attr("patternUnits","userSpaceOnUse").attr("width",a).attr("height",a);"hatching"===n?s.append("path").attr("d","M-".concat(a/8,",").concat(a/8," l").concat(a/4,",-").concat(a/4," M0,").concat(a," l").concat(a,",-").concat(a," M").concat(a-a/8,",").concat(a+a/8," l").concat(a/4,",-").concat(a/4)).attr("stroke",i).attr("stroke-width",r):"crosshatch"===n?s.append("path").attr("d","M0,0 l".concat(a,",").concat(a," M").concat(a,",0 l-").concat(a,",").concat(a)).attr("stroke",i).attr("stroke-width",r):"dots"===n?s.append("circle").attr("cx",a/2).attr("cy",a/2).attr("r",r).attr("fill",i):(console.warn('Unknown pattern "'.concat(n,'", defaulting to hatching.')),s.append("path").attr("d","M-".concat(a/8,",").concat(a/8," l").concat(a/4,",-").concat(a/4," M0,").concat(a," l").concat(a,",-").concat(a," M").concat(a-a/8,",").concat(a+a/8," l").concat(a/4,",-").concat(a/4)).attr("stroke",i).attr("stroke-width",r))}}(t,r,o,u,f,p)}e.patternId=r,l.forEach((function(t){i[t]||(i[t]=[]),i[t].push(r)}))})),t.svg().selectAll(ba(t)).each((function(t){var e,n=this,r=null==t||null===(e=t.properties)||void 0===e?void 0:e.id,a=i[r];if(a&&a.length){var o=Ot(this);a.forEach((function(t){var e=o.node().cloneNode(!0);Ot(e).attr("fill","url(#".concat(t,")")).attr("pointer-events","none").attr("class",(o.attr("class")||"")+"pattern-fill-overlay"),Ot(n.parentNode).append((function(){return e}))}))}}))}else console.warn("patternFill expects an array of configs")}const Sv=4294967296;var Mv=Math.PI*(3-Math.sqrt(5));function Ev(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),a=0,o=.6,s=new Map,l=Si(h),c=ci("tick","end"),u=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Sv)/Sv}();function h(){f(),c.call("tick",e),n<i&&(l.stop(),c.call("end",e))}function f(i){var l,c,u=t.length;void 0===i&&(i=1);for(var h=0;h<i;++h)for(n+=(a-n)*r,s.forEach((function(t){t(n)})),l=0;l<u;++l)null==(c=t[l]).fx?c.x+=c.vx*=o:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=o:(c.y=c.fy,c.vy=0);return e}function d(){for(var e,n=0,i=t.length;n<i;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var r=10*Math.sqrt(.5+n),a=n*Mv;e.x=r*Math.cos(a),e.y=r*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,u),e}return null==t&&(t=[]),d(),e={tick:f,restart:function(){return l.restart(h),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(i=+t,e):i},alphaDecay:function(t){return arguments.length?(r=+t,e):+r},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(u=t,s.forEach(p),e):u},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,i){var r,a,o,s,l,c=0,u=t.length;for(null==i?i=1/0:i*=i,c=0;c<u;++c)(o=(r=e-(s=t[c]).x)*r+(a=n-s.y)*a)<i&&(l=s,i=o);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function kv(t){return function(){return t}}function Cv(t){var e,n,i,r=kv(.1);function a(t){for(var r,a=0,o=e.length;a<o;++a)(r=e[a]).vx+=(i[a]-r.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),i=new Array(o),a=0;a<o;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=kv(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:kv(+t),o(),a):r},a.x=function(e){return arguments.length?(t="function"==typeof e?e:kv(+e),o(),a):t},a}function Tv(t){var e,n,i,r=kv(.1);function a(t){for(var r,a=0,o=e.length;a<o;++a)(r=e[a]).vy+=(i[a]-r.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),i=new Array(o),a=0;a<o;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=kv(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:kv(+t),o(),a):r},a.y=function(e){return arguments.length?(t="function"==typeof e?e:kv(+e),o(),a):t},a}function Av(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,a,o,s,l,c,u,h,f,d=t._root,p={data:i},g=t._x0,_=t._y0,m=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(_+v)/2))?_=o:v=o,r=d,!(d=d[h=u<<1|c]))return r[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return p.next=d,r?r[h]=p:t._root=p,t;do{r=r?r[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(_+v)/2))?_=o:v=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return r[f]=d,r[h]=p,t}function Pv(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function Fv(t){return t[0]}function Lv(t){return t[1]}function Nv(t,e,n){var i=new Ov(null==e?Fv:e,null==n?Lv:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function Ov(t,e,n,i,r,a){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=a,this._root=void 0}function zv(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Gv=Nv.prototype=Ov.prototype;function Dv(t){return 1e-6*(t()-.5)}function Iv(t){return t.x+t.vx}function Rv(t){return t.y+t.vy}function jv(t){var e,n,i,r=1,a=1;function o(){for(var t,o,l,c,u,h,f,d=e.length,p=0;p<a;++p)for(o=Nv(e,Iv,Rv).visitAfter(s),t=0;t<d;++t)l=e[t],h=n[l.index],f=h*h,c=l.x+l.vx,u=l.y+l.vy,o.visit(g);function g(t,e,n,a,o){var s=t.data,d=t.r,p=h+d;if(!s)return e>c+p||a<c-p||n>u+p||o<u-p;if(s.index>l.index){var g=c-s.x-s.vx,_=u-s.y-s.vy,m=g*g+_*_;m<p*p&&(0===g&&(m+=(g=Dv(i))*g),0===_&&(m+=(_=Dv(i))*_),m=(p-(m=Math.sqrt(m)))/m*r,l.vx+=(g*=m)*(p=(d*=d)/(f+d)),l.vy+=(_*=m)*p,s.vx-=g*(p=1-p),s.vy-=_*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var i,r,a=e.length;for(n=new Array(a),i=0;i<a;++i)r=e[i],n[r.index]=+t(r,i,e)}}return"function"!=typeof t&&(t=kv(null==t?1:+t)),o.initialize=function(t,n){e=t,i=n,l()},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:kv(+e),l(),o):t},o}function Bv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function qv(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Wv(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wv(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Wv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Uv(t,e){var i=function(i){var r,a,o,s,l,c=i.Geometries.centroidsFeatures||[];if(c.length){Vv(i);var u,h=null!==(r=null===(a=i.dorlingStrength_)||void 0===a?void 0:a.x)&&void 0!==r?r:1,f=null!==(o=null===(s=i.dorlingStrength_)||void 0===s?void 0:s.y)&&void 0!==o?o:1,d=null!==(l=i.dorlingIterations_)&&void 0!==l?l:1,p=!1!==i.dorlingWorker_,g=i.dorlingWorkerD3URL_||"https://unpkg.com/d3@7/dist/d3.min.js",_=qv(c);try{for(_.s();!(u=_.n()).done;){var m,v=u.value,y=null===(m=i._projection)||void 0===m?void 0:m.call(i,v.geometry.coordinates);y?(v.x=y[0],v.y=y[1]):(v.x=NaN,v.y=NaN)}}catch(t){_.e(t)}finally{_.f()}var x=t.getCentroidsGroup(i).selectAll("g.em-centroid"),b=function(t){t.attr("transform",(function(t){return!t||isNaN(t.x)||isNaN(t.y)?null:"translate(".concat(t.x,",").concat(t.y,")")}))};if(!1===i.animateDorling_){if(p){console.log("Running Dorling simulation asynchronously in a Web Worker");var w=new Worker(new URL(n.p+n.u(222),n.b),{type:void 0});return w.postMessage({nodes:c.map((function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bv(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t)})),radii:c.map((function(t){return e(t)})),strengthX:h,strengthY:f,iterations:d,d3URL:g}),void(w.onmessage=function(t){var e=t.data,n=e.type,r=e.nodes,a=e.progress,o=e.total;"progress"!==n?"end"===n&&r&&(c.forEach((function(t,e){t.x=r[e].x,t.y=r[e].y})),b(x),Hv(1,i),w.terminate()):Hv(a/o,i)})}for(var S=Ev(c).force("x",Cv((function(t){return t.properties.centroid[0]})).strength(h)).force("y",Tv((function(t){return t.properties.centroid[1]})).strength(f)).force("collide",jv((function(t){return e(t)})).iterations(d)).stop(),M=Math.ceil(Math.log(S.alphaMin())/Math.log(1-S.alphaDecay())),E=0;E<M;E++)S.tick(),E%10==0&&b(x);return b(x),Hv(1,i),S}return i.simulation=Ev(c).force("x",Cv((function(t){return t.properties.centroid[0]})).strength(h)).force("y",Tv((function(t){return t.properties.centroid[1]})).strength(f)).force("collide",jv((function(t){return e(t)})).iterations(d)).on("tick",(function(){return b(x)})),i.simulation}};i(t),t.insetTemplates_&&va(t.insetTemplates_,t.svgId_,(function(t){i(t)}))}function Hv(t,e){e.onDorlingProgress_&&e.onDorlingProgress_(t,e)}function Vv(t){t.simulation&&(t.simulation.stop(),t.simulation.on("tick",null),t.simulation=null)}Gv.copy=function(){var t,e,n=new Ov(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=zv(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var r=0;r<4;++r)(e=i.source[r])&&(e.length?t.push({source:e,target:i.target[r]=new Array(4)}):i.target[r]=zv(e));return n},Gv.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Av(this.cover(e,n),e,n,t)},Gv.addAll=function(t){var e,n,i,r,a=t.length,o=new Array(a),s=new Array(a),l=1/0,c=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(r=+this._y.call(null,e))||(o[n]=i,s[n]=r,i<l&&(l=i),i>u&&(u=i),r<c&&(c=r),r>h&&(h=r));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),n=0;n<a;++n)Av(this,o[n],s[n],t[n]);return this},Gv.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,a=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,a=(i=Math.floor(e))+1;else{for(var o,s,l=r-n||1,c=this._root;n>t||t>=r||i>e||e>=a;)switch(s=(e<i)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:r=n+l,a=i+l;break;case 1:n=r-l,a=i+l;break;case 2:r=n+l,i=a-l;break;case 3:n=r-l,i=a-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=i,this._x1=r,this._y1=a,this},Gv.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Gv.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Gv.find=function(t,e,n){var i,r,a,o,s,l,c,u=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Pv(g,u,h,f,d)),null==n?n=1/0:(u=t-n,h=e-n,f=t+n,d=e+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(r=l.x0)>f||(a=l.y0)>d||(o=l.x1)<u||(s=l.y1)<h))if(g.length){var _=(r+o)/2,m=(a+s)/2;p.push(new Pv(g[3],_,m,o,s),new Pv(g[2],r,m,_,s),new Pv(g[1],_,a,o,m),new Pv(g[0],r,a,_,m)),(c=(e>=m)<<1|t>=_)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=l)}else{var v=t-+this._x.call(null,g.data),y=e-+this._y.call(null,g.data),x=v*v+y*y;if(x<n){var b=Math.sqrt(n=x);u=t-b,h=e-b,f=t+b,d=e+b,i=g.data}}return i},Gv.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,i,r,a,o,s,l,c,u,h,f,d=this._root,p=this._x0,g=this._y0,_=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+_)/2))?p=s:_=s,(u=o>=(l=(g+m)/2))?g=l:m=l,e=d,!(d=d[h=u<<1|c]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(i=d,!(d=d.next))return this;return(r=d.next)&&delete d.next,i?(r?i.next=r:delete i.next,this):e?(r?e[h]=r:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=r,this)},Gv.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Gv.root=function(){return this._root},Gv.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Gv.visit=function(t){var e,n,i,r,a,o,s=[],l=this._root;for(l&&s.push(new Pv(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,r=e.y0,a=e.x1,o=e.y1)&&l.length){var c=(i+a)/2,u=(r+o)/2;(n=l[3])&&s.push(new Pv(n,c,u,a,o)),(n=l[2])&&s.push(new Pv(n,i,u,c,o)),(n=l[1])&&s.push(new Pv(n,c,r,a,u)),(n=l[0])&&s.push(new Pv(n,i,r,c,u))}return this},Gv.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new Pv(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var r=e.node;if(r.length){var a,o=e.x0,s=e.y0,l=e.x1,c=e.y1,u=(o+l)/2,h=(s+c)/2;(a=r[0])&&n.push(new Pv(a,o,s,u,h)),(a=r[1])&&n.push(new Pv(a,u,s,l,h)),(a=r[2])&&n.push(new Pv(a,o,h,u,c)),(a=r[3])&&n.push(new Pv(a,u,h,l,c))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Gv.x=function(t){return arguments.length?(this._x=t,this):this._x},Gv.y=function(t){return arguments.length?(this._y=t,this):this._y};var $v=function(t){var e=hy(t,!0,"ps");function n(t){if(t.svg_&&e.classifierColor_){var n=t.statData("color");t.svg_.selectAll(".em-centroid").attr("ecl",(function(t){var i=n.get(t.properties.id);if(!i)return"nd";var r=i.value;return 0!==r&&!r||":"==r?"nd":+e.classifierColor_(+r)}))}}function i(t){return t.statData("size").getArray()?t.statData("size"):t.statData()}function r(t){e.psClassToFillStyle()||e.psClassToFillStyle(Yv(e.psColorFun_,e.psColors_));var n=i(t);if(t.svg_){var r,s;t.svg_.selectAll(":not(#em-insets-group) g.em-centroid > *").remove(),e.updateSymbolsDrawOrder(t),s=e.psCustomSVG_?function(t,n){return t.getCentroidsGroup(t).selectAll("g.em-centroid").append("g").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").html(e.psCustomSVG_).attr("transform",(function(t){var i=n.get(t.properties.id),r=e.classifierSize_(+i.value);if(r)return"translate(".concat(e.psOffset_.x*r,",").concat(e.psOffset_.y*r,") scale(").concat(r,")")}))}(t,n):"bar"==e.psShape_?function(t,n){return t.getCentroidsGroup(t).selectAll("g.em-centroid").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var i=n.get(t.properties.id);return i&&i.value?e.classifierSize_(+i.value):0})).attr("transform",(function(){this.getBoundingClientRect();return"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")}))}(t,n):"circle"==e.psShape_?function(t,n){var i=t.svg().selectAll("g.em-centroid").filter((function(t){var e=n.get(t.properties.id);return e&&":"!==e.value&&e.value})).append("circle").attr("stroke-width",e.psStrokeWidth()).attr("stroke",e.psStroke()).attr("fill-opacity",e.psFillOpacity()).attr("stroke-opacity",e.psStrokeOpacity()).style("pointer-events","none").transition().duration(e.transitionDuration()).attr("r",(function(t){var i=n.get(t.properties.id),r=e.classifierSize_(+i.value);return r<0&&console.error("Negative radius for circle:",t.properties.id),isNaN(r)&&console.error("NaN radius for circle:",t.properties.id),r})).on("end",(function(){Ot(this).style("pointer-events",null)}));return i}(t,n):"spike"==e.psShape_?function(t,n){var i=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-t,"L").concat(n/2,",0")},r=t.svg().selectAll("g.em-centroid"),a=r.append("path").attr("d",(function(t){var r=n.get(t.properties.id),a=r?e.classifierSize_(+r.value):0;return i(a)})).style("fill",(function(t){return t.color||"steelblue"})).attr("fill-opacity",t.psFillOpacity_).attr("stroke",t.psStroke_).attr("stroke-width",t.psStrokeWidth_);return a}(t,n):function(t,n){return t.svg().selectAll("g.em-centroid").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){if(n){var i=n.get(t.properties.id);if(0==i||i){var r=e.classifierSize_(+i.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(r*r)();var a=Jv[e.psShape_]||Jv.circle;return bv().type(a).size(r*r)()}}}))}(t,n);var l=ba(t),c=t.svg().selectAll(l);if("WORLD"!==t.geo_){if("mixed"==t.nutsLevel_){!function(t,n,i){i.style("display",(function(e){if(!this.parentNode.classList.contains("em-cntrg")){var i=n.get(e.properties.id);return!i||!i.value&&0!==i&&0!==i.value?"none":"WORLD"==t.geo_?"block":void 0}})),i.style("stroke",(function(t){var e=Ot(this),i=e.attr("lvl"),r=e.style("stroke"),a=n.get(t.properties.id);if(a&&a.value)return"0"!==i?r||"#777":void 0})).style("stroke-width",(function(t){var i=Ot(this),r=i.attr("lvl"),a=i.style("stroke-width"),o=n.get(t.properties.id);if(o&&o.value)return"WORLD"==e.geo_&&"0"!==r?a||"#777":void 0}))}(t,n,c);var u=[];t.svg().selectAll("g.em-centroid").each((function(t){var e;null!==(e=t.properties)&&void 0!==e&&e.centroid&&u.push(t)})),t.Geometries.centroidsFeatures=u}c.attr("ecl",(function(t){var e=n.get(t.properties.id);return!e||!e.value&&0!==e&&0!==e.value?"ni":e&&e.value&&":"==e.value?"nd":void 0}))}!function(t){t.attr("fill-opacity",e.psFillOpacity()).attr("stroke-opacity",e.psStrokeOpacity()).attr("stroke",e.psStroke()).attr("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=Ot(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle_||"gray"}return e.psFill_})).attr("fill___",(function(){return Ot(this).style("fill")}))}(s),a(t,n),o(t),null!==(r=e.labels_)&&void 0!==r&&r.values&&e.updateValuesLabels(t),e.patternFill_&&wv(t,e.patternFill_)}return t}e.psShape_="circle",e.psCustomShape_,e.psCustomSVG_,e.psSpikeWidth_=7,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psSizeScale_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=1,e.psStroke_="#ffffff",e.psStrokeWidth_=.2,e.psStrokeOpacity_=1,e.psClasses_=5,e.psColors_=null,e.psColorFun_=iv,e.psClassToFillStyle_=void 0,e.psThresholds_=[0],e.psClassificationMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=Xv,e.psCodeLabels_=!1,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStrokeOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","psSizeScale_","noDataFillStyle_","psThresholds_","psColors_","psCustomSVG_","psOffset_","psClassificationMethod_","psClasses_","dorling_","dorlingStrength_","dorlingIterations_","animateDorling_","psSpikeWidth_","psCodeLabels_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomSVG","psOffset","psClassificationMethod","psClasses","dorlingIterations_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=Yv(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThresholds=function(t){return arguments.length?(e.psThresholds_=t,e.psClasses(t.length+1),e):e.psThresholds_},e.updateClassification=function(){try{return function(){var t,n;e.psSizeScale_||("spike"==e.psShape_?e.psSizeScale_="linear":e.psSizeScale_="sqrt");var i=(e.statData("size").getArray()||e.statData().getArray()).map((function(t){return+t})).filter((function(t){return isFinite(t)&&t>0})),r=Dt(i),a=y(r,2),o=a[0],s=a[1],l=null!==(t=e.psMinValue_)&&void 0!==t?t:o,c=null!==(n=e.psMaxValue_)&&void 0!==n?n:s;isFinite(l)&&isFinite(c)||(l=e.statData().getMin(),c=e.statData().getMax());var u=[l,c],h="sqrt"==e.psSizeScale_?nv:Nn;e.classifierSize(h().domain(u).range([e.psMinSize_,e.psMaxSize_]))}(),e.statData("color").getArray()&&function(){var t=function(t){return x(Array(t).keys())};if("quantile"===e.psClassificationMethod_){var n=e.statData("color").getArray(),i=t(e.psClasses_);e.classifierColor(te().domain(n).range(i))}else if("equinter"===e.psClassificationMethod_){var r=e.statData("color").getArray(),a=t(e.psClasses_);e.classifierColor(On().domain([min(r),max(r)]).range(a)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassificationMethod_){e.psClasses(e.psThresholds().length+1);var o=t(e.psClasses_);e.classifierColor(zn().domain(e.psThresholds()).range(o))}}(),e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(e),e}catch(t){console.error("Error in proportional symbols classification: "+t.message),console.error(t)}};var a=function(t,n){var i,r=t.svg().selectAll("g.em-centroid");if(e.psCodeLabels_)r.filter((function(t){var e=n.get(t.properties.id);return":"!==(null==e?void 0:e.value)&&null!=(null==e?void 0:e.value)})).append("text").attr("class","em-circle-code-label").text((function(t){var e=n.get(t.properties.id);return":"===(null==e?void 0:e.value)?"":t.properties.id})).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-family","sans-serif").style("font-size",(function(t){var i,r,a=n.get(t.properties.id),o=a?e.classifierSize_(+a.value):0,s=null!==(i=e.labels_)&&void 0!==i&&i.values&&null!==(r=n.get(t.properties.id))&&void 0!==r&&r.value?.8:.9;return"square"===e.psShape_&&(s-=.4),"".concat(o*s,"px")})).attr("fill",(function(){var t,e=null===(t=window.getComputedStyle(this.parentNode.firstChild))||void 0===t?void 0:t.fill;return xa(e)})).attr("dy",(function(t){var i,r;return null!==(i=e.labels_)&&void 0!==i&&i.values&&null!==(r=n.get(t.properties.id))&&void 0!==r&&r.value?"-0.3em":"0"}));if(null!==(i=e.labels_)&&void 0!==i&&i.values)r.filter((function(t){var e=n.get(t.properties.id);return":"!==(null==e?void 0:e.value)&&null!=(null==e?void 0:e.value)})).append("text").attr("class","em-circle-stat-label").text((function(t){var e=n.get(t.properties.id);if(null!=e&&e.value)return e.value})).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("font-family","sans-serif").style("font-size",(function(t){var i=n.get(t.properties.id),r=i?e.classifierSize_(+i.value):0;return"".concat(.4*r,"px")})).attr("fill",(function(){var t,n=(null===(t=window.getComputedStyle(this.parentNode.firstChild))||void 0===t?void 0:t.fill)||e.psFill_;return xa(n)})).attr("dy",(function(t){return e.psCodeLabels_?"0.8em":"0"}))},o=function(t){t.svg().selectAll("g.em-centroid").on("mouseover",(function(n,i){var r=Ot(this.childNodes[0]);r.attr("fill___",r.style("fill")),r.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(i,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,i,this,t)})).on("mousemove",(function(n,i){e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,i,this,t)})).on("mouseout",(function(n,i){var r=Ot(this.childNodes[0]),a=r.attr("fill___");a&&(r.style("fill",a),e._tooltip&&e._tooltip.mouseout()),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,i,this,t)}))};return e.updateSymbolsDrawOrder=function(t){var r=e.getCentroidsGroup(t),a=i(t);t.Geometries.centroidsFeatures&&t.Geometries.centroidsFeatures.length||(t.Geometries.centroidsFeatures=t.svg().selectAll("g.em-centroid").data().filter((function(t){var e;return null==t||null===(e=t.properties)||void 0===e?void 0:e.centroid})));var o=t.Geometries.centroidsFeatures.filter((function(t){var e,n=null===(e=a.get)||void 0===e||null===(e=e.call(a,t.properties.id))||void 0===e?void 0:e.value;return null!=n&&":"!==n})).sort((function(t,e){return a.get(e.properties.id).value-a.get(t.properties.id).value}));r.selectAll("g.em-centroid").remove(),r.selectAll("g.em-centroid").data(o,(function(t){return t.properties.id})).enter().append("g").attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id})).attr("transform",(function(t){return"translate(".concat(t.properties.centroid[0].toFixed(3),",").concat(t.properties.centroid[1].toFixed(3),")")})),n(t)},e.updateStyle=function(){try{if(r(e),e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,r),e.dorling_){var t=i(e);Uv(e,(function(n){var i=t.get(n.properties.id),r=i?e.classifierSize_(+i.value):0;return"square"===e.psShape_?r/2*Math.SQRT2:r}))}else Vv(e);return e}catch(t){console.error("Error in proportional symbols styling: "+t.message),console.error(t)}},e.getLegendConstructor=function(){return ay},e},Yv=function(t,e){return t=t||iv,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Jv={cross:av,square:cv,diamond:lv,triangle:gv,star:dv,wye:xv,circle:rv},Xv=function(t,e){var n;if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var i=t.properties.na,r=t.properties.id,a=e.statData("size").getArray()?e.statData("size"):e.statData(),o=a.get(t.properties.id),s=o&&(0===o.value||!!o.value),l=s?a.unitText():null,c="<tr><td>".concat(s?_a(o.value)+" "+(l||""):e.noDataText_,"</td></tr>"),u="",h=null!==(n=e.statData("color"))&&void 0!==n&&n.getArray()?e.statData("color"):null;if(h){var f=h.get(t.properties.id),d=f&&(0===f.value||!!f.value),p=d?h.unitText():null;u="<tr><td>".concat(d?_a(f.value)+" "+(p||""):e.noDataText_,"</td></tr>")}return'\n <div class="em-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"",'\n </div>\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n ').concat(c,"\n ").concat(u,"\n </tbody>\n </table>\n </div>\n ").trim()};function Kv(t,e,n,i,r){var a,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:16;if(r){var s=fa("em-size-legend-title");o+=s,e.append("text").attr("class","em-size-legend-title").attr("id","em-size-legend-title").attr("x",0).attr("y",s).text(r)}var l=i.domain();n||(n=[Math.floor(l[1]),Math.floor(l[0])]);var c=i(Rt(n)),u=c,h=2*c+o,f=e.append("g").attr("transform","translate(".concat(u,",").concat(h,")")).attr("class","em-circle-size-legend").attr("id","em-circle-size-legend").attr("text-anchor","right").style("fill","black").selectAll("g").data(n.filter((function(t){return i(t)}))).join("g").attr("class","em-legend-item");f.append("circle").attr("class","em-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(t){return-i(t)})).attr("r",i);var d=(null===(a=t.sizeLegend)||void 0===a?void 0:a.labelFormatter)||_a;return f.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("y",(function(t,e){return-1-2*i(t)})).attr("x",c+5).text((function(t){return d(t)})),f.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(t,e){return-1-2*i(t)})).attr("x2",c+5).attr("y2",(function(t,e){return-1-2*i(t)})),t}function Zv(t,e,n){var i,r=t.map;if(t._sizeLegendContainer=t.lgg.append("g").attr("class","em-size-legend-container").attr("id","em-size-legend-container").attr("transform","translate(".concat(e,",").concat(n,")")),r.psCustomSVG_||"circle"!=r.psShape_)if("spike"!=r.psShape_){var a=(null===(i=t.sizeLegend)||void 0===i?void 0:i.labelFormatter)||_a,o=r.classifierSize_.domain()[1];t.sizeLegend.values&&(t.sizeLegend.cellNb=t.sizeLegend.values.length),r.customSymbols={nodeHeights:0};for(var s=1;s<t.sizeLegend.cellNb+1;s++){var l=t.ascending?t.sizeLegend.cellNb-s+1:s,c=t.sizeLegend.values?t.sizeLegend.values[l-1]:o/l,u=r.classifierSize_(c);"bar"==r.psShape_?ey(t,c,u,s,a):"custom"==r.psShape_||r.psCustomSVG_?ty(t,c,u,s,a):Qv(t,c,u,s,a)}if(t.sizeLegend.noData){var h=t._sizeLegendContainer.node().getBBox().height,f=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(h,")"));t.appendNoDataLegend(f,t.sizeLegend.noDataText,iy,ry)}}else!function(t){var e=t.map,n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-t,"L").concat(n/2,",0")},i=e.classifierSize_(e.classifierSize_.domain()[1]),r=t.sizeLegend.values||e.classifierSize_.ticks(4).slice(1),a=fa("em-legend-label"),o=a-2,s=t._sizeLegendContainer.append("g").attr("id","em-spike-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(t.sizeLegend.titlePadding,")")).attr("fill","black").attr("text-anchor","middle").style("font-size","".concat(a,"px")).selectAll().data(r).join("g").attr("transform",(function(e,n){return"translate(".concat(40*n+t.boxPadding,",").concat(i+5,")")}));if(s.append("path").attr("fill",e.psFill_).attr("fill-opacity",e.psFillOpacity_).attr("stroke",e.psStroke_).attr("stroke-width",e.psStrokeWidth_).attr("d",(function(t){return n(e.classifierSize_(t))})),s.append("text").attr("class","em-legend-label").attr("dy",o).text((function(t){return e.classifierSize_.tickFormat(4,"s")(t)})),t.sizeLegend.noData){var l=i+o+a+5,c=t.boxPadding,u=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(c,",").concat(l,")"));t.appendNoDataLegend(u,t.sizeLegend.noDataText,iy,ry)}}(t);else if(Kv(t,t._sizeLegendContainer,t.sizeLegend.values,r.classifierSize_,t.sizeLegend.title,t.sizeLegend.titlePadding),t.sizeLegend.noData){var d=t._sizeLegendContainer.node().getBBox().height+15,p=t._sizeLegendContainer.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(0,",").concat(d,")"));t.appendNoDataLegend(p,t.sizeLegend.noDataText,iy,ry)}}function Qv(t,e,n,i,r){var a=t.map,o="triangle"==a.psShape_||"diamond"==a.psShape_?n:n/2;0==t.sizeLegend._totalD3SymbolsHeight&&(t.sizeLegend._totalD3SymbolsHeight+=o+t.boxPadding);var s=a.classifierSize_(a.classifierSize_.domain()[1]),l=s,c=(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+t.sizeLegend._totalD3SymbolsHeight+(t.sizeLegend.shapePadding*i-1);t.sizeLegend._totalD3SymbolsHeight+=n;var u=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-size-legend-item"),h=ny(t).size(n*n)();u.append("g").style("fill",(function(e){return a.classifierColor_?t.sizeLegend.shapeFill:a.psFill_})).style("fill-opacity",a.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:a.psStroke()).style("stroke-width",a.psStrokeWidth()).append("path").attr("d",h).attr("transform",(function(){return"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var f=s/2+t.sizeLegend.labelOffsets.x+t.boxPadding;u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",f).attr("y",0).text(r(e))}function ty(t,e,n,i,r){var a,o=t.map,s=t.boxPadding;if(o.customSymbols.prevSymb||(a=t.boxPadding+(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+20,o.customSymbols.initialTranslateY=a,o.customSymbols.prevScale=n),o.customSymbols.prevSymb){var l=o.customSymbols.prevSymb.node().getBBox();o.customSymbols.nodeHeights=o.customSymbols.nodeHeights+l.height*o.customSymbols.prevScale,a=o.customSymbols.initialTranslateY+o.customSymbols.nodeHeights+t.sizeLegend.shapePadding*(i-1),o.customSymbols.prevScale=n}var c=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(s,",").concat(a,")")).attr("class","em-size-legend-item");o.customSymbols.prevSymb=c.append("g").attr("class","em-size-legend-symbol").style("fill",(function(e){return o.classifierColor_?t.sizeLegend.shapeFill:o.psFill_})).style("fill-opacity",o.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:o.psStroke()).style("stroke-width",o.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(o.psCustomSVG_).attr("transform",(function(){return o.psCustomSVG_?"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,") scale(").concat(n,")"):"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var u=s+o.classifierSize_(o.classifierSize_.domain()[0])+t.sizeLegend.labelOffsets.x,h=t.sizeLegend.shapeOffsets.y/2+1;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(r(e))}function ey(t,e,n,i,r){var a=t.map,o=t.boxPadding,s=t.boxPadding+(t.sizeLegend.title?t.titleFontSize+t.sizeLegend.titlePadding:0)+t.sizeLegend._totalBarsHeight+10;t.sizeLegend._totalBarsHeight+=n+10;var l=ny(t).size(n*n)(),c=t._sizeLegendContainer.append("g").attr("transform","translate(".concat(o,",").concat(s,")")).attr("class","em-size-legend-item");c.append("g").style("fill",(function(e){return a.classifierColor_?t.sizeLegend.shapeFill:a.psFill_})).style("fill-opacity",a.psFillOpacity()).style("stroke",t.sizeLegend.shapeStroke?t.sizeLegend.shapeStroke:a.psStroke()).style("stroke-width",a.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",l).attr("transform",(function(){return a.psCustomSVG_?"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,") scale(").concat(n,")"):"translate(".concat(t.sizeLegend.shapeOffsets.x,",").concat(t.sizeLegend.shapeOffsets.y,")")}));var u=o+a.psBarWidth_+t.sizeLegend.labelOffsets.x,h=n/2+t.sizeLegend.labelOffsets.y;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(r(e))}function ny(t){var e,n=t.map;if(n.psCustomSVG_)e=n.psCustomSVG_;else if(n.psCustomShape_)e=n.psCustomShape_;else if("bar"==n.psShape_){e=bv().type({draw:function(t,e){var i=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,i),t.lineTo(n.psBarWidth_,i),t.lineTo(n.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var i=Jv[n.psShape_]||Jv.circle;e=bv().type(i)}return e}function iy(t,e){var n=t.getCentroidsGroup(t).selectAll("[ecl]");n.each((function(t,e){Ot(this).style("opacity","0")})),n.filter("[ecl='"+e+"']").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}function ry(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}var ay=function(t,e){var n=cy(t);if(n.sizeLegend={title:null,titlePadding:15,values:void 0,cellNb:3,shapePadding:5,shapeOffsets:{x:0,y:0},shapeFill:"white",shapeStroke:null,labelOffsets:{x:10,y:0},decimals:0,labelFormatter:void 0,noData:!1,noDataText:"No data",_totalBarsHeight:0,_totalD3SymbolsHeight:0},n.colorLegend={title:null,titlePadding:10,marginTop:30,shapeWidth:25,shapeHeight:20,shapePadding:1,labelOffsets:{x:5,y:0},decimals:0,labelFormatter:void 0,labelType:"thresholds",labels:null,noData:!0,noDataText:"No data",sepLineLength:24,sepLineStroke:"black",sepLineStrokeWidth:1,tickLength:5,pointOfDivergenceLabel:void 0,pointOfDivergence:void 0,pointOfDivergencePadding:7,divergingLineLength:void 0,divergingArrowLength:void 0},e)for(var i in e)if("colorLegend"==i||"sizeLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),n.sizeLegend._totalBarsHeight=0,n.sizeLegend._totalD3SymbolsHeight=0;var e=n.getBaseY(),i=n.getBaseX();if(t.classifierSize_&&Zv(n,i,e),t.classifierColor_&&n.colorLegend){var r=i,a=e;n._sizeLegendContainer&&(a+=n._sizeLegendContainer.node().getBBox().height+n.colorLegend.marginTop),Bm(n,r,a)}if(n.map.patternFill_){var o=n.lgg.node().getBBox().height,s=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(i,", ").concat(o+n.boxPadding+5,")"));hm(n,s)}n.setBoxDimension()}},n};function oy(t){if("ranges"==t.colorLegend.labelType){var e=function(t){var e=t.map,n=e.psThresholds_.length>1?e.psThresholds_:Array.from({length:e.psClasses_}).map((function(n,i){return e.classifier().invertExtent(i)[t.ascending?0:1]})).slice(1);return n}(t);return t.colorLegend.labelFormatter||function(n,i){var r=En(".".concat(t.decimals,"f"));return 0===i?"> ".concat(r(e[e.length-1])):i===e.length?"< ".concat(r(e[0])):"".concat(r(e[e.length-i-1])," - < ").concat(r(e[e.length-i])," ")}}return t.colorLegend.labelType,t.colorLegend.labelFormatter||En(".".concat(t.decimals,"f"))}function sy(t,e){var n=t.getCentroidsGroup(t).selectAll("[ecl]");n.each((function(t,e){Ot(this).style("opacity","0")})),n.filter("[ecl='"+e+"']").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}function ly(t){t.getCentroidsGroup(t).selectAll("[ecl]").each((function(e,n){Ot(this).style("opacity",t.psFillOpacity_)}))}var cy=function(t){var e={};function n(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new WeakSet,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=r.maxDepth||100;if(a.has(t))return t;if(a.add(t),o>s)return console.warn("Max recursion depth (".concat(s,") reached.")),t;for(var l in e)if(e.hasOwnProperty(l)&&t.hasOwnProperty(l)){var c=e[l],u=t[l];"function"==typeof c?t[l]=c:i(c)&&i(u)?n(u,c,r,a,o+1):Array.isArray(c)&&Array.isArray(u)?t[l]=r.mergeArrays?x(new Set([].concat(x(u),x(c)))):x(c):c instanceof Date?t[l]=new Date(c.getTime()):c instanceof RegExp?t[l]=new RegExp(c):c instanceof Map?t[l]=new Map(c):c instanceof Set?t[l]=new Set(c):t[l]=c}return t}function i(t){return"[object Object]"===Object.prototype.toString.call(t)}return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxPadding=7,e.boxOpacity=.7,e.title="",e.titleFontSize=fa("em-legend-title"),e.width=150,e.titlePadding=5,e.shapeWidth=25,e.shapeHeight=20,e.shapePadding=5,e.labelFontSize=fa("em-legend-label"),e.labelOffsets={x:5,y:5},e.labelFormatter=null,Pn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]}),e.noData=!0,e.noDataText="No data",e.noDataPadding=5,e.noDataShapeWidth=25,e.noDataShapeHeight=20,e.ascending=!0,e.decimals=0,e.build=function(){e.svg=Ot("#"+e.svgId),e.svg.selectAll("#em-legend-"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","em-legend-"+e.svgId).attr("class","em-legend")},e.update=function(){return console.log("Legend update function not implemented"),e},e.updateContainer=function(){var t=e.map;e.lgg.selectAll("*").remove(),e.svg.attr("id")!==t.legend_.svgId&&e.build()},e.updateConfig=function(){var t=e.map;t.legend_&&n(e,t.legend_)},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("class","em-legend-background").style("opacity",e.boxOpacity)},e.addTitle=function(){if(e.title){var t=e.lgg.append("g").attr("id","em-legend-titles"),n=fa("em-legend-title");t.append("text").attr("class","em-legend-title").attr("x",e.boxPadding).attr("y",e.boxPadding+n).text(e.title)}},e.addSubtitle=function(){if(e.subtitle){var t=e.lgg.select("#em-legend-titles"),n=fa("em-legend-title"),i=fa("em-legend-subtitle");t.append("text").attr("class","em-legend-subtitle").attr("x",e.boxPadding).attr("y",e.boxPadding+n+i+3).text(e.subtitle)}},e.getBaseY=function(){return e.boxPadding+(e.title?fa("em-legend-title"):0)+(e.subtitle?fa("em-legend-subtitle"):0)+10},e.getBaseX=function(){return e.boxPadding},e.setBoxDimension=function(){if(e.lgg.node()){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)}},e.appendNoDataLegend=function(t,n,i,r){var a=e.map;t.append("rect").attr("class","em-legend-rect").style("fill",a.noDataFillStyle()).attr("y",e.noDataPadding).attr("width",e.noDataShapeWidth).attr("height",e.noDataShapeHeight).on("mouseover",(function(){i(a,"nd"),a.insetTemplates_&&va(a.insetTemplates_,a.svgId,i,"nd")})).on("mouseout",(function(){r(a),a.insetTemplates_&&va(a.insetTemplates_,a.svgId,r,"nd")})),t.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",e.noDataShapeWidth+5).attr("y",e.noDataShapeHeight/2+e.noDataPadding).text(n)},e.getNumberOfClasses=function(t){var e=t.map;return"ps"===e._mapType?e.psClasses_:e.numberOfClasses_},e.getLabelFormatter=function(t){return"ps"===t.map._mapType?oy(t):Ym(t)},e.getClassToFillStyle=function(t){var e=t.map;return"ps"===e._mapType?e.psClassToFillStyle_:e.classToFillStyle_},e.getColorClassifier=function(t){var e=t.map;return"ps"===e._mapType?e.classifierColor_:e.classifier_},e.getHighlightFunction=function(t){return"ps"==t._mapType?sy:Jm},e.getUnHighlightFunction=function(t){return"ps"==t._mapType?ly:Xm},e},uy=function(t){var e,n,i;function r(){i=Ot("#"+t.div),i.empty()&&(i=Ot("body").append("div").attr("id",t.id)),i.attr("class","em-tooltip")}return(t=t||{}).containerId=t.containerId||t.svgId||"map",t.customElement=t.customElement,t.id=t.id||"em-tooltip-".concat(t.containerId),t.offset={x:(null===(e=t.offset)||void 0===e?void 0:e.x)||t.xOffset||30,y:(null===(n=t.offset)||void 0===n?void 0:n.y)||t.yOffset||20},t.transitionDuration=0,r.mouseover=function(e){if(i.html(e),e){var n=event.pageX,a=event.pageY;r.ensureTooltipOnScreen(n,a),i.interrupt().transition().duration(t.transitionDuration).style("opacity",1)}},r.mousemove=function(t){var e=t.pageX,n=t.pageY;this.ensureTooltipOnScreen(e,n)},r.mouseout=function(){i.interrupt().transition().duration(t.transitionDuration).style("opacity",0)},r.style=function(t,e){return 1==arguments.length?i.style(t):(i.style(t,e),r)},r.attr=function(t,e){return 1==arguments.length?i.attr(t):(i.attr(t,e),r)},r.ensureTooltipOnScreen=function(e,n){var r=i.node();r.style.left=e+t.offset.x+"px",r.style.top=n-t.offset.y+"px";var a=document.getElementById(t.containerId).getBoundingClientRect(),o=a.width,s=a.height;if(r.offsetLeft>a.left+o-r.clientWidth){var l=e-r.clientWidth-t.offset.x;if(r.style.left=l+"px",r.offsetLeft+r.clientWidth>e){var c=e-r.clientWidth-t.offset.x;r.style.left=c+"px"}}r.offsetTop+r.clientHeight>a.top+s&&(r.style.top=r.offsetTop-r.clientHeight+"px")},r(),r},hy=function(t,e,n){var i=om(t,e,n);if(i.stat_={default:void 0},i.stat=function(t,e){return arguments.length?2==arguments.length?(i.stat_[t]=e,i):"string"==typeof t||t instanceof String?i.stat_[t]:(i.stat_=t.default?t:{default:t},i):i.stat_.default},i.statData_={default:um(),color:um(),size:um(),v1:um(),v2:um(),v3:um()},i.statData=function(t,e){return arguments.length?1===arguments.length?(i.statData_[t]||(i.statData_[t]=um()),i.statData_[t]):(i.statData_[t]=e,i):i.statData_.default},i.noDataText_="No data available",i.language_="en",i.transitionDuration_=500,i.tooltip_.textFunction=void 0,i.filtersDefinitionFunction_=void 0,i.callback_=void 0,i.legend_=void 0,i.legendObj_=void 0,["legend_","legendObj_","noDataText_","language_","transitionDuration_","tooltipText_","filtersDefinitionFunction_","callback_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}})),t)for(var r in t)i[r]&&null!=t[r]&&i[r](t[r]);i.legend=function(t){if(!arguments.length)return i.legend_;if(0==t){var e=i.legendObj();if(e){var n=Ot("#"+e.svgId);n.size()>0&&n.selectAll("*").remove()}return i.legend_=t,i}return i.legend_=t,i.legendObj_&&i.updateLegend(),i},i.updateLegend=function(t){return i.legendObj_&&i.legendObj().update(),i},i.build=function(){return i.projectionFunction_&&i.proj("4326"),i.buildMapTemplateBase(),i.filtersDefinitionFunction_&&i.filtersDefinitionFunction_(i.svg(),i.numberOfClasses_),i.legend()&&i.buildLegend(),i.tooltip_||i.tooltip_||(i.tooltip_={id:i.svgId()}),i._tooltip=uy(i.tooltip_),i.updateGeoData(),i.updateStatData(),i},i.buildLegend=function(){i.legendObj(i.getLegendConstructor()(i,i.legend()));var t=i.legendObj();if(0==Ot("#"+t.svgId).size()){var e=null==t.x?i.width()-100-t.boxPadding:t.x,n=null==t.y?t.boxPadding:t.y;i.svg().append("g").attr("id",t.svgId).attr("class","em-legend").attr("transform","translate("+e+","+n+")")}t.build()};var a=function(){for(var t in i.statData_){var e=!!i.stat_[t],n=!(!i.statData_[t]||!i.statData_[t].get());if((e||n)&&!i.statData_[t].isReady())return!1}return!0};return i.updateGeoData=function(){return i.updateGeoMapTemplate((function(){a()&&(i.updateStatValues(),i.callback()&&i.callback()(i))})),i},i.updateStatData=function(){for(var t in i.stat_){var e,n,r=i.stat(t),o=null===(e=(n=i.statData(t)).get)||void 0===e?void 0:e.call(n);if((r||o)&&r){var s=um(r);i.statData(t,s);var l=i.nutsLevel_;"mixed"===l&&(l=0),s.retrieveFromRemote(l,i.language(),(function(){i.Geometries.isGeoReady()&&a()&&(i.updateStatValues(),i.callback()&&i.callback()(i))}))}}return i},i.updateStatValues=function(){return e&&(i.insetTemplates_&&va(i.insetTemplates_,i.svgId_,i.refreshCentroids),i.refreshCentroids(i)),i.updateClassification(),i.updateStyle(),i.legend_&&i.legendObj()&&i.legendObj().update(),i},i.updateClassification=function(){return console.log("Map updateClassification function not implemented"),i},i.updateStyle=function(){return console.log("Map updateStyle function not implemented"),i},i.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),cy},i.getTime=function(){return i.statData("default").getTime()},i.setFromURL=function(){var t=fy();return t.w&&i.width(t.w),t.h&&i.height(t.h),t.x&&t.y&&i.geoCenter([t.x,t.y]),t.z&&i.pixelSize(t.z),t.s&&i.scale(t.s),t.lvl&&i.nutsLevel(t.lvl),t.time&&(i.filters_.time=t.time,delete i.filters_.lastTimePeriod),t.proj&&i.proj(t.proj),t.geo&&i.geo(t.geo),t.ny&&i.nutsYear(t.ny),t.language&&i.language(t.language),t.numberOfClasses&&i.numberOfClasses(+t.numberOfClasses),i},i.exportMapToSVG=function(){var t=i.svg_.node().cloneNode(!0);t.hasAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.hasAttribute("xmlns:xlink")||t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),document.body.appendChild(t),ga(t),document.body.removeChild(t);var e=function(t){var e='<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'+t.outerHTML,n=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(n)}(t),n=document.createElement("a");return n.href=e,n.download="eurostatmap.svg",document.body.appendChild(n),n.click(),document.body.removeChild(n),i},i.exportMapToPNG=function(t,e){var n=i.svg_.node().cloneNode(!0);ga(n);var r=(new XMLSerializer).serializeToString(n),a=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(a);if(t=t||n.getAttribute("width"),e=e||n.getAttribute("height"),!t||!e)throw new Error("SVG width or height attributes are missing or invalid.");var s=new Image;return s.onload=function(){var n=document.createElement("canvas");n.width=parseFloat(t),n.height=parseFloat(e),n.getContext("2d").drawImage(s,0,0,n.width,n.height),n.toBlob((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostat-map.png",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o),URL.revokeObjectURL(e)}),"image/png")},s.src=o,i},i},fy=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","language","sl","numberOfClasses"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t};function dy(t){return t.slice().sort((function(t,e){return t-e}))}function py(t,e){for(var n=[],i=0;i<t;i++){for(var r=[],a=0;a<e;a++)r.push(0);n.push(r)}return n}function gy(t,e,n,i){var r;if(t>0){var a=(n[e]-n[t-1])/(e-t+1);r=i[e]-i[t-1]-(e-t+1)*a*a}else r=i[e]-n[e]*n[e]/(e+1);return r<0?0:r}function _y(t,e,n,i,r,a,o){if(!(t>e)){var s=Math.floor((t+e)/2);i[n][s]=i[n-1][s-1],r[n][s]=s;var l=n;t>n&&(l=Math.max(l,r[n][t-1]||0)),l=Math.max(l,r[n-1][s]||0);var c,u,h,f=s-1;e<i[0].length-1&&(f=Math.min(f,r[n][e+1]||0));for(var d=f;d>=l&&!((c=gy(d,s,a,o))+i[n-1][l-1]>=i[n][s]);--d)(u=gy(l,s,a,o)+i[n-1][l-1])<i[n][s]&&(i[n][s]=u,r[n][s]=l),l++,(h=c+i[n-1][d-1])<i[n][s]&&(i[n][s]=h,r[n][s]=d);_y(t,s-1,n,i,r,a,o),_y(s+1,e,n,i,r,a,o)}}function my(t,e){if(e>t.length)throw new Error("cannot generate more classes than there are data values");var n=dy(t),i=function(t){for(var e,n=0,i=0;i<t.length;i++)0!==i&&t[i]===e||(e=t[i],n++);return n}(n);if(1===i)return[n];var r=py(e,n.length),a=py(e,n.length);!function(t,e,n){for(var i=e[0].length,r=t[Math.floor(i/2)],a=[],o=[],s=0,l=void 0;s<i;++s)l=t[s]-r,0===s?(a.push(l),o.push(l*l)):(a.push(a[s-1]+l),o.push(o[s-1]+l*l)),e[0][s]=gy(0,s,a,o),n[0][s]=0;for(var c=1;c<e.length;++c)_y(c<e.length-1?c:i-1,i-1,c,e,n,a,o)}(n,r,a);for(var o=[],s=a[0].length-1,l=a.length-1;l>=0;l--){var c=a[l][s];o[l]=n.slice(c,s+1),l>0&&(s=c-1)}return o}function vy(t,e){if(e>t.length)return null;t=t.slice().sort((function(t,e){return t-e}));var n=function(t,e){var n,i,r=[],a=[],o=0;for(n=0;n<t.length+1;n++){var s=[],l=[];for(i=0;i<e+1;i++)s.push(0),l.push(0);r.push(s),a.push(l)}for(n=1;n<e+1;n++)for(r[1][n]=1,a[1][n]=0,i=2;i<t.length+1;i++)a[i][n]=Number.POSITIVE_INFINITY;for(var c=2;c<t.length+1;c++){for(var u=0,h=0,f=0,d=0,p=1;p<c+1;p++){var g=c-p+1,_=t[g-1];if(o=(h+=_*_)-(u+=_)*u/++f,0!=(d=g-1))for(i=2;i<e+1;i++)a[c][i]>=o+a[d][i-1]&&(r[c][i]=g,a[c][i]=o+a[d][i-1])}r[c][1]=1,a[c][1]=o}return{lowerClassLimits:r,varianceCombinations:a}}(t,e);return function(t,e,n){var i=t.length,r=[],a=n;for(r[n]=t[t.length-1];a>0;)r[a-1]=t[e[i][a]-1],i=e[i][a]-1,a--;return r}(t,n.lowerClassLimits,e)}var yy=function(){this.totalCount=0,this.data={}};yy.prototype.train=function(t,e){for(var n in this.data[e]||(this.data[e]={}),t){var i=t[n];void 0===this.data[e][n]&&(this.data[e][n]={}),void 0===this.data[e][n][i]&&(this.data[e][n][i]=0),this.data[e][n][i]++}this.totalCount++},yy.prototype.score=function(t){var e,n={};for(var i in t){var r=t[i];for(e in this.data)n[e]={},this.data[e][i]?n[e][i+"_"+r]=(this.data[e][i][r]||0)/this.totalCount:n[e][i+"_"+r]=0}var a={};for(e in n)for(var o in a[e]=0,n[e])a[e]+=n[e][o];return a};var xy=function(){this.weights=[],this.bias=0};xy.prototype.predict=function(t){if(t.length!==this.weights.length)return null;for(var e=0,n=0;n<this.weights.length;n++)e+=this.weights[n]*t[n];return(e+=this.bias)>0?1:0},xy.prototype.train=function(t,e){if(0!==e&&1!==e)return null;t.length!==this.weights.length&&(this.weights=t,this.bias=1);var n=this.predict(t);if("number"==typeof n&&n!==e){for(var i=e-n,r=0;r<this.weights.length;r++)this.weights[r]+=i*t[r];this.bias+=i}return this};Math.log(Math.sqrt(2*Math.PI));Math.sqrt(2*Math.PI);var by=Math.sqrt(2*Math.PI);function wy(t){for(var e=t,n=t,i=1;i<15;i++)e+=n*=t*t/(2*i+1);return Math.round(1e4*(.5+e/by*Math.exp(-t*t/2)))/1e4}for(var Sy=[],My=0;My<=3.09;My+=.01)Sy.push(wy(My));var Ey=function(t){var e=hy(t,!1,"ch");e.numberOfClasses_=7,e.classificationMethod_="quantile",e.thresholds_=[0],e.colors_=null,e.makeClassifNice_=!0;var n=["#E9ECF6","#D4DAF0","#C1C9EB","#A8B4E6","#93A2DC","#7C90D6","#677CD2","#5169BE","#3C57B0","#2644A7","#15246B","#081132"];function i(t){var n=function(t){return x(Array(t).keys())},i=e.statData().getArray(),r=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var i=n.value;return":"===i||null===i?"nd":"continuous"===e.colorSchemeType_?i:null!=i?+e.classifier_(i):void 0}}))};if(function(){var t=n(e.numberOfClasses_);if("continuous"===e.colorSchemeType_){var r,a=e.valueTransform_||function(t){return t},o=i.map(a),s=Bt(o),l=Rt(o),c=function(t){return null!==t.pointOfDivergence_}(e);if(!("function"==typeof(null===(r=e.colorFunction_)||void 0===r?void 0:r.domain)))if(c){var u,h=a(null!==(u=e.pointOfDivergence_)&&void 0!==u?u:0);e.domain_=[s,h,l]}else e.domain_=[s,l];e.classifier((function(t){return t}))}switch(e.classificationMethod_){case"quantile":e.classifier(te().domain(i).range(t));break;case"equal-interval":case"equinter":e.classifier(On().domain([Bt(i),Rt(i)]).range(t)),e.makeClassifNice_&&e.classifier().nice();break;case"threshold":e.numberOfClasses(e.thresholds_.length+1),e.classifier(zn().domain(e.thresholds_).range(n(e.numberOfClasses_)));break;case"jenks":var f=vy(i,e.numberOfClasses_).slice(1,-1);e.classifier(zn().domain(f).range(t));break;case"ckmeans":var d=my(i,e.numberOfClasses_).map((function(t){return t.pop()})).slice(0,-1);e.classifier(zn().domain(d).range(t))}}(),t.svg_){var a=ba(t);if(r(t.svg().selectAll(a)),"mixed"===t.nutsLevel_)r(t.svg().selectAll("path.em-nutsrg0"))}}function r(t){if(e.filtersDefinitionFunction_?e.classToFillStyle(Cy()):e.classToFillStyle(ky(e.colorFunction_,e.colors_)),t.svg_){var n=ba(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",o).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),s(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",xa(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&a(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&wv(t,e.patternFill_)}}e.colorFunction_=function(t){return function(t,e){void 0===e&&(e=t,t=rn);for(var n=0,i=e.length-1,r=e[0],a=new Array(i<0?0:i);n<i;)a[n]=t(r,r=e[++n]);return function(t){var e=Math.max(0,Math.min(i-1,Math.floor(t*=i)));return a[e](t-e)}}(ii,n)(Math.min(Math.max(0,t),1))},e.classToFillStyle_=void 0,e.classifier_=void 0,e.tooltip_.textFunction=Ty,e.colorSchemeType_="discrete",e.valueTransform_=function(t){return t},e.valueUntransform_=function(t){return t},e.pointOfDivergence_=null,["numberOfClasses_","classificationMethod_","thresholds_","makeClassifNice_","colorFunction_","classToFillStyle_","noDataFillStyle_","classifier_","colors_","colorFunction_","colorSchemeType_","valueTransform_","valueUntransform_","pointOfDivergence_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFunction=function(t){if(!arguments.length)return e.colorFunction_;if(e.colorFunction_=t,e.filtersDefinitionFunction_)e.classToFillStyle(Cy());else{var n=ky(e.colorFunction_,e.colors_,e.colorSchemeType_);e.classToFillStyle(n)}return e},e.threshold=function(t){return arguments.length?(e.thresholds_=t,e.numberOfClasses(t.length+1),e):e.thresholds_},e.filtersDefinitionFunction=function(t){return arguments.length?(e.filtersDefinitionFunction_=t,e.svg()&&e.filtersDefinitionFunction_(e.svg(),e.numberOfClasses_),e):e.filtersDefinitionFunction_},t&&["numberOfClasses","classificationMethod","threshold","makeClassifNice","colorFunction","classToFillStyle","noDataFillStyle","colors"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){try{return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,i),i(e),e}catch(t){console.error("Error in updateClassification:",t.message),console.error(t)}},e.updateStyle=function(){try{return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,r),r(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}},e.getLegendConstructor=function(){return Vm};var a=function(t){t.svg().selectAll(ba(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ot(this),e=t.attr("ecl"),n=t.attr("lvl"),i=e||"0"===n;if(t.style("display",i?"block":"none"),e&&"0"!==n){var r=t.style("stroke")||"#777",a=t.style("stroke-width")||.2;t.style("stroke",r).style("stroke-width",a)}}}))};var o=function(t){var n,i=Ot(this).attr("ecl"),r=e.colorSchemeType_||"discrete";if(i||"0"===i)return"nd"===i?e.noDataFillStyle_||"gray":e.filtersDefinitionFunction_?e.classToFillStyle_(i):"continuous"===r?function(t,e){var n,i=e.colorFunction_,r=e.domain_||[0,1],a="function"==typeof(null==i?void 0:i.domain),o=e.valueTransform_||function(t){return t},s=o(t);if(isNaN(s))return e.noDataFillStyle_||"gray";if(a)return i(s);if(3===r.length){var l,c=y(r,3),u=c[0],h=c[2],f=o(null!==(l=e.pointOfDivergence_)&&void 0!==l?l:0);n=s<f?.5*(s-u)/(f-u):.5+.5*(s-f)/(h-f)}else{var d=y(r,2),p=d[0];n=(s-p)/(d[1]-p)}return i(Math.min(Math.max(n,0),1))}(+i,e):null!==(n=e.Geometries)&&void 0!==n&&n.userGeometries?e.classToFillStyle_(i,e.numberOfClasses_||1):"WORLD"===e.geo_?e.classToFillStyle_(i,e.numberOfClasses_||1)||e.cntrgFillStyle_:e.classToFillStyle_(i,e.numberOfClasses_||1)},s=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.highlightRegion=function(t){if(!e.svg_)return e;var n=ba(e),i=e.svg().selectAll(n).filter((function(e){return e.properties.id===t}));if(!i.empty()){var r=i.datum();if(i.style("fill",e.hoverColor_||"orange"),e._tooltip){var a=e.tooltip_.textFunction(r,e);e._tooltip.mouseover(a);var o=i.node().getBBox(),s=e.__lastTransform||{x:0,y:0,k:1},l=(o.x+o.width/2)*s.k+s.x,c=(o.y+o.height/2)*s.k+s.y,u=e.svg().node().getBoundingClientRect(),h=u.left+l,f=u.top+c;e._tooltip.ensureTooltipOnScreen(h,f)}e.onRegionMouseOver_&&e.onRegionMouseOver_(null,r,i.node(),e)}return e},e.clearHighlight=function(){if(!e.svg_)return e;var t=ba(e);return e.svg().selectAll(t).each((function(){var t=Ot(this),e=t.attr("fill___");e&&t.style("fill",e)})),e._tooltip&&e._tooltip.mouseout(),e},e},ky=function(t,e){return t=t||In,"continuous"===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"discrete")?function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],i=(e-n[0])/(n[1]-n[0]);return t(Math.min(Math.max(i,0),1))}:e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Cy=function(){return function(t){return"url(#pattern_"+t+")"}},Ty=function(t,e){if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var n=[],i=t.properties.na||t.properties.name,r=t.properties.id;n.push('\n <div class="em-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"","\n </div>\n "));var a=e.statData(),o=a.get(r),s=a.unitText()||"";if(!o||0!==o.value&&!o.value||":"===o.value)return n.push('\n <div class="em-tooltip-text no-data">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(e.noDataText_,"</td></tr>\n </tbody>\n </table>\n </div>\n ")),n.join("");n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(_a(o.value)," ").concat(s,"</td></tr>\n </tbody>\n </table>\n </div>\n "));var l=o.status;if(l&&e.tooltip_.showFlags){var c="short"===e.tooltip_.showFlags?l:flags[l]||l;n.push(' <span class="status-flag">'.concat(c,"</span>"))}return n.join("")};const Ay=Gn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var Py=function(t,e){var n=cy(t);if(n.order=void 0,e)for(var i in e)n[i]=e[i];function r(t,e){var n=wa(t),i=t.svg_.selectAll(n).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function a(t){var e=wa(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()&&n.map.classifier_){n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var t=n.getBaseY(),e=n.getBaseX();if(n._categoricalContainer=n.lgg.append("g").attr("class","em-legend-categorical").attr("transform","translate(".concat(e,", ").concat(t,")")),function(t){for(var e=t._categoricalContainer,n=t.map,i=n.classToFillStyle()?Object.keys(n.classToFillStyle()):n.classifier_.domain(),o=t.order?t.order:i,s=function(){var i=o[l],s=n.classifier_(i),c=n.classToFillStyle_[i],u=t.titlePadding+l*(t.shapeHeight+t.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",u).attr("width",t.shapeWidth).attr("height",t.shapeHeight).style("fill",c).on("mouseover",(function(){r(t.map,s),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.svgId_,r,s)})).on("mouseout",(function(){a(t.map),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.svgId_,a,s)})),e.append("text").attr("class","em-legend-label").attr("x",t.shapeWidth+t.labelOffsets.x).attr("y",u+.5*t.shapeHeight).attr("dy","0.35em").text(n.classToText()?n.classToText()[i]:i)},l=0;l<o.length;l++)s()}(n),n.map.patternFill_){var i=n.lgg.node().getBBox().height,o=n.lgg.append("g").attr("class","pattern-fill-legend").attr("transform","translate(".concat(e,", ").concat(i+15,")"));hm(n,o)}if(n.noData){var s=n.lgg.node().getBBox().height+10,l=e,c=n.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(l,",").concat(s+15,")"));n.appendNoDataLegend(c,n.noDataText,r,a)}n.setBoxDimension()}},n},Fy=function(t,e){var n=[];t.properties.id?n.push('<div class="em-tooltip-bar">'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="em-tooltip-bar">'+t.properties.na+"</div>");var i=e.statData().get(t.properties.id);if(!i||0!=i.value&&!i.value)return n.push(e.noDataText_),n.join("");var r=i.value;if(e.classToText_){var a=e.classToText_[r];return n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(a||r,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")}return n.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(r,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")},Ly=Array.prototype.slice;function Ny(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Oy(t){this._context=t}function zy(t){return new Oy(t)}function Gy(t){return t[0]}function Dy(t){return t[1]}function Iy(t,e){var n=vr(!0),i=null,r=zy,a=null,o=Dr(s);function s(s){var l,c,u,h=(s=Ny(s)).length,f=!1;for(null==i&&(a=r(u=o())),l=0;l<=h;++l)!(l<h&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(c,l,s),+e(c,l,s));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Gy:vr(t),e="function"==typeof e?e:void 0===e?Dy:vr(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:vr(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:vr(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:vr(!!t),s):n},s.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),s):r},s.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),s):i},s}Oy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,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:this._context.lineTo(t,e)}}};var Ry=function(t,e){var n=cy(t);if(n.squareSize=100,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.axisTitleFontSize=fa("em-bivariate-axis-title"),n.breaks1=void 0,n.breaks2=void 0,n.showBreaks=!1,n.tickLength=5,n.yAxisLabelsOffset={x:0,y:0},n.xAxisLabelsOffset={x:0,y:0},n.yAxisTitleOffset={x:0,y:0},n.xAxisTitleOffset={x:0,y:0},n.boxPadding=n.labelFontSize,n.noDataYOffset=30,n.axisArrows=!0,n.arrowHeight=15,n.arrowWidth=14,n.arrowPadding=10,e)for(var i in e)n[i]=e[i];function r(t,e,n){var i=wa(t),r=t.svg_.selectAll(i).selectAll("[ecl1],[ecl2]");r.style("fill","white"),r.filter("[ecl1='".concat(e,"']")).filter("[ecl2='".concat(n,"']")).filter(":not([nd])").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function a(t){var e=wa(t);t.svg_.selectAll(e).selectAll("[ecl1],[ecl2]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n._horizontalOffset=n.axisTitleFontSize+n.arrowPadding,n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),n._y=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),function(){for(var t=n.lgg,e=n.map.numberOfClasses(),i=n.squareSize/e,o=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,s=0,l=t.append("g").attr("class","bivariate-squares-chart").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(o+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)")),c=0;c<e;c++)for(var u=function(){var t=e-c-1,o=e-h-1,u=n.map.classToFillStyle()(t,o);l.append("rect").attr("class","em-bivariate-square").attr("x",s+(e-1-c)*i).attr("y",h*i).attr("width",i).attr("height",i).style("fill",u).on("mouseover",(function(){r(n.map,t,o),n.map.insetTemplates_&&va(n.map.insetTemplates_,n.map.svgId,r,t,o),Ot(this).raise()})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&va(n.map.insetTemplates_,n.map.svgId,a,t,o)}))},h=0;h<e;h++)u();l.append("rect").attr("class","em-bivariate-frame").attr("x",s).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("stroke-width",.7)}(),!n.breaks1&&!n.breaks2&&n.showBreaks){var e=t.classifier1_;"function"==typeof e.quantiles?n.breaks1=e.quantiles().map((function(t){return parseFloat(t.toFixed(0))})):e.domain&&(n.breaks1=e.domain().map((function(t){return parseFloat(t.toFixed(0))})));var i=t.classifier2_;"function"==typeof i.quantiles?n.breaks2=i.quantiles().map((function(t){return parseFloat(t.toFixed(0))})):i.domain&&(n.breaks2=i.domain().map((function(t){return parseFloat(t.toFixed(0))})))}var o,s;!function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.map.numberOfClasses(),r=n.squareSize/i,a=n.lgg.append("g").attr("class","bivariate-break-labels").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)"));if(n.breaks1)for(var o=0;o<n.breaks1.length;o++){var s=e+r*(o+1),l=n.squareSize+fa("em-bivariate-tick-label");a.append("text").attr("class","em-bivariate-tick-label").attr("x",s+n.xAxisLabelsOffset.x).attr("y",l+n.xAxisLabelsOffset.y).text(n.breaks1[o]),a.append("line").attr("class","em-bivariate-tick").attr("x1",s).attr("x2",s).attr("y1",n.squareSize).attr("y2",n.squareSize+n.tickLength)}if(n.breaks2)for(var c=0;c<n.breaks2.length;c++){var u=e,h=r*(c+2)-r;a.append("text").attr("class","em-bivariate-tick-label").attr("x",u+n.yAxisLabelsOffset.x).attr("y",h-n.yAxisLabelsOffset.y-(n.tickLength+2)).text(x(n.breaks2).reverse()[c]).attr("text-anchor","middle").attr("transform","rotate(-90, ".concat(u,", ").concat(h,")")),a.append("line").attr("class","em-bivariate-tick").attr("x1",u).attr("x2",u-n.tickLength).attr("y1",h).attr("y2",h)}}(),n._xAxisArrowY=0,n._yAxisArrowX=0,n.axisArrows&&function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.lgg.append("g").attr("class","bivariate-axis-arrows").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)"));n._xAxisArrowY=n.squareSize+n.tickLength+n.arrowPadding,(n.showBreaks||n.breaks1&&n.breaks2)&&(n._xAxisArrowY+=fa("em-bivariate-tick-label")/1.5);i.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Iy()([[e,n._xAxisArrowY],[e+n.squareSize,n._xAxisArrowY]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n._yAxisArrowX=-n.tickLength-n.arrowPadding,(n.showBreaks||n.breaks1&&n.breaks2)&&(n._yAxisArrowX-=n.labelFontSize/2);i.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Iy()([[n._yAxisArrowX,n.squareSize],[n._yAxisArrowX,0]])).attr("stroke","black").attr("marker-end","url(#arrowhead)")}(),function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,i=n.lgg.append("g").attr("class","bivariate-axis-titles").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(t+n._y,") rotate(").concat(n.rotation,") translate(").concat(n.boxPadding,",0)")),r=n.squareSize+n.xAxisLabelsOffset.y+(n.axisArrows?n.arrowPadding+n.arrowHeight:7),a=e;(n.showBreaks||n.breaks1&&n.breaks2)&&(r+=fa("em-bivariate-tick-label"));n.xAxisTitleOffset&&(r+=n.xAxisTitleOffset.y);n.xAxisTitleOffset&&(a+=n.xAxisTitleOffset.x);i.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-x").attr("x",a).attr("y",r).text(n.label1).attr("dominant-baseline","hanging").attr("alignment-baseline","hanging");var o=(n.axisArrows?n._yAxisArrowX-n.arrowPadding:7)+(-45==n.rotation?-4:-10);(n.showBreaks||n.breaks1&&n.breaks2)&&(r+=fa("em-bivariate-tick-label"));var s=-n.squareSize;n.yAxisTitleOffset&&(o+=n.yAxisTitleOffset.y);n.yAxisTitleOffset&&(s+=n.yAxisTitleOffset.x);i.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-y").attr("x",s).attr("y",o).text(n.label2).style("transform",n.rotation<0?"translate(".concat(n.axisArrows?-51:-15,"px, 95px) rotate(90deg)"):"rotate(-90deg)")}(),n.lgg.append("defs").append("marker").attr("viewBox","0 0 ".concat(n.arrowWidth," ").concat(n.arrowHeight)).attr("id","arrowhead").attr("refX",0).attr("refY",5).attr("markerWidth",n.arrowWidth).attr("markerHeight",n.arrowHeight).attr("orient","auto").append("path").attr("d","M 0 0 L 5 5 L 0 10").attr("marker-units","strokeWidth"),n.noData&&(o=0===n.rotation?n.noDataYOffset+n.squareSize/n.map.numberOfClasses_+n.arrowHeight/2:n.noDataYOffset,s=0===n.rotation?n._y+n.squareSize+o:n._y+1.4142*n.squareSize+2*n.boxPadding+o,n.lgg.append("rect").attr("class","em-bivariate-nodata").attr("x",n.boxPadding+n.noDataShapeWidth/2).attr("y",s+(0==n.rotation?0:-10)).attr("width",n.noDataShapeWidth).attr("height",n.noDataShapeHeight).style("fill",n.map.noDataFillStyle()).on("mouseover",(function(){("mixed"==n.map.nutsLevel_?Ca("#em-nutsrg"):Ot("#em-nutsrg")).selectAll("[nd='nd']").style("fill","red")})).on("mouseout",(function(){("mixed"==n.map.nutsLevel_?Ca("#em-nutsrg"):Ot("#em-nutsrg")).selectAll("[nd='nd']").style("fill",(function(){return Ot(this).attr("fill___")})),Ot(this).style("fill",n.map.noDataFillStyle())})),n.lgg.append("text").attr("class","em-bivariate-nodata-label").attr("x",n.boxPadding+n.noDataShapeWidth+(n.noDataShapeWidth/2+5)).attr("y",s+.5*n.noDataShapeHeight+1+(0==n.rotation?0:-10)).text(n.noDataText)),n.setBoxDimension()},n},jy=function(t,e,n,i,r){for(var a=[],o=Ve(e,n),s=Ve(i,r),l=0;l<t;l++){for(var c=l/(t-1),u=Ve(o(c),s(c)),h=[],f=0;f<t;f++)h.push(u(f/(t-1)));a.push(h)}return function(t,e){return a[t][e]}},By=function(t,e){var n=[],i=t.properties.na||t.properties.name;t.properties.id?n.push('<div class="em-tooltip-bar" >'+i+" ("+t.properties.id+") </div>"):n.push('<div class="em-tooltip-bar" >'+i+"</div>");var r=e.statData("v1").get(t.properties.id),a=e.statData("v1").unitText(),o=e.statData("v2").get(t.properties.id),s=e.statData("v2").unitText();return n.push('\n <div class="em-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>\n '.concat(r&&r.value?_a(r.value):""," ").concat(a&&r&&r.value?a:"","\n ").concat(!r||0!=r.value&&!r.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n ").concat(o&&o.value?_a(o.value):""," ").concat(s&&o&&o.value?s:"","\n ").concat(!o||0!=o.value&&!o.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")},qy=function(t,e){var n=cy(t);if(n.width=(null==e?void 0:e.width)||150,n.fontSize=(null==e?void 0:e.fontSize)||12,n.padding=(null==e?void 0:e.padding)||2,n.topText=(null==e?void 0:e.topText)||"Variable 1",n.leftText=(null==e?void 0:e.leftText)||"Variable 2",n.rightText=(null==e?void 0:e.rightText)||"Variable 3",e)for(var i in e)n[i]=e[i];return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){if(!n.map.colorClassifier_)return console.error("Trivariate legend: map.colorClassifier_ missing"),n;n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),function(){var t,e,i,r,a,o,s=n.lgg,l=n.map,c=l.colorClassifier_,u=.866025,h=n.width,f=h*u,d=n.fontSize,p=n.padding,g=n.selectionColor||"red",_=l._tooltip,m=s.attr("class","em-ternary-legend").attr("width",h).attr("height",f+4*p+2*d);m.append("text").attr("x",h/2).attr("y",p+d).text(n.topText).attr("font-size",d).attr("text-anchor","middle"),m.append("text").attr("x",0).attr("y",3*p+2*d+f).text(n.leftText).attr("font-size",d).attr("text-anchor","start"),m.append("text").attr("x",h).attr("y",3*p+2*d+f).text(n.rightText).attr("font-size",d).attr("text-anchor","end");var v=m.append("g").attr("transform","translate(0,".concat(2*p+d,")")),y=function(t,e,n){t.attr("fill",e).on("mouseover",(function(t){Ot(this).attr("fill",g),_&&n&&_.mouseover(n)})).on("mousemove",(function(t){_&&n&&_.mousemove(t)})).on("mouseout",(function(t){Ot(this).attr("fill",e),_&&_.mouseout(t)}))};null!=n&&n.texts&&(c.texts=n.texts);var x=v.append("polygon").attr("points","\n 0,".concat(f," ").concat(h/3,",").concat(f," ").concat(h/2,",").concat(2*f/3," ").concat(h/6,",").concat(2*f/3,"\n"));y(x,c.colors[0],null===(t=c.texts)||void 0===t?void 0:t[0]);var b=v.append("polygon").attr("points","\n ".concat(h/2,",0 ").concat(2*h/3,",").concat(f/3," ").concat(h/2,",").concat(2*f/3," ").concat(h/3,",").concat(f/3,"\n"));y(b,c.colors[1],null===(e=c.texts)||void 0===e?void 0:e[1]);var w=v.append("polygon").attr("points","\n ".concat(h,",").concat(f," ").concat(5*h/6,",").concat(2*f/3," ").concat(h/2,",").concat(2*f/3," ").concat(2*h/3,",").concat(f,"\n"));y(w,c.colors[2],null===(i=c.texts)||void 0===i?void 0:i[2]);var S=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(5*h/6,",").concat(2*f/3," ").concat(2*h/3,",").concat(f/3,"\n"));y(S,c.mixColors[0],null===(r=c.texts)||void 0===r?void 0:r.m12);var M=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(h/3,",").concat(f," ").concat(2*h/3,",").concat(f,"\n"));y(M,c.mixColors[1],null===(a=c.texts)||void 0===a?void 0:a.m02);var E=v.append("polygon").attr("points","\n ".concat(h/2,",").concat(2*f/3," ").concat(h/6,",").concat(2*f/3," ").concat(h/3,",").concat(f/3,"\n"));if(y(E,c.mixColors[2],null===(o=c.texts)||void 0===o?void 0:o.m01),c.centerCoefficient){var k;y(v.append("circle").attr("cx",h/2).attr("cy",2*f/3).attr("r",c.centerCoefficient*f/3),c.centerColor,null===(k=c.texts)||void 0===k?void 0:k.center)}}(),n.setBoxDimension()}},n},Wy=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=y(n||["red","green","blue"],3),a=r[0],o=r[1],s=r[2],l=i.colorInterpolation||ii,c=null==i.withMixedClasses||i.withMixedClasses,u=function(t,e){return l(t,e)(.5)},h=y(i.mixedColors||c?[u(o,s),u(a,s),u(a,o)]:[],3),f=h[0],d=h[1],p=h[2],g=i.centerColor||l(u(a,o),s)(.333),_=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t[0],r=t[1],a=t[2],o=y(n.center||[1/3,1/3,1/3],3),s=o[0],l=o[1],c=o[2],u=null==n.withMixedClasses||n.withMixedClasses,h=n.centerCoefficient?1-n.centerCoefficient:void 0,f=function(t){var n=e(t);if(n){var o=+t[i]/n,f=+t[r]/n,d=+t[a]/n;return o>=s&&f<=l&&d<=c?null!=h&&(d-c)*(l-h*l)>=(f-h*l)*(h*c-c)?"center":"0":o<=s&&f>=l&&d<=c?null!=h&&(d-c)*(s-h*s)>=(o-h*s)*(h*c-c)?"center":"1":o<=s&&f<=l&&d>=c?null!=h&&(f-l)*(s-h*s)>=(o-h*s)*(h*l-l)?"center":"2":o<=s&&f>=l&&d>=c?null!=h&&o>h*s?"center":u?"m12":f>d?"1":"2":o>=s&&f<=l&&d>=c?null!=h&&f>h*l?"center":u?"m02":o>d?"0":"2":o>=s&&f>=l&&d<=c?null!=h&&d>h*c?"center":u?"m01":f>o?"1":"0":"unknown"}};return f.center=[s,l,c],f.centerCoefficient=n.centerCoefficient,f}(t,e,i),m=function(t){var e=_(t);return"0"==e?a:"1"==e?o:"2"==e?s:"m12"==e?f:"m02"==e?d:"m01"==e?p:"center"==e?g:i.defaultColor||"black"};return m.center=_.center,m.centerCoefficient=i.centerCoefficient,m.colors=[a,o,s],m.mixColors=[f,d,p],m.centerColor=g,m.classifier=_,m},Uy=function(t,e){var n,i,r,a=[],o=t.properties.na||"",s=t.properties.id||"";a.push('<div class="em-tooltip-bar">'.concat(o).concat(s?" (".concat(s,")"):"","</div>"));var l=e.statData("v1").get(s),c=e.statData("v2").get(s),u=e.statData("v3").get(s);return a.push('<div class="em-tooltip-text" style="background:#fff;color:#171a22;padding:4px;font-size:15px;">\n <table class="em-tooltip-table"><tbody>\n <tr><td>'.concat(e.statData("v1").label_||"Variable 1",": ").concat(null!=l&&l.value?_a(l.value):""," ").concat((null==l||null===(n=l.unitText)||void 0===n?void 0:n.call(l))||"","</td></tr>\n <tr><td>").concat(e.statData("v2").label_||"Variable 2",": ").concat(null!=c&&c.value?_a(c.value):""," ").concat((null==c||null===(i=c.unitText)||void 0===i?void 0:i.call(c))||"","</td></tr>\n <tr><td>").concat(e.statData("v3").label_||"Variable 3",": ").concat(null!=u&&u.value?_a(u.value):""," ").concat((null==u||null===(r=u.unitText)||void 0===r?void 0:r.call(u))||"","</td></tr>\n </tbody></table></div>")),a.join("")};function Hy(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Vy(t){return t}function $y(){var t=Vy,e=Hy,n=null,i=vr(0),r=vr(Ar),a=vr(0);function o(o){var s,l,c,u,h,f=(o=Ny(o)).length,d=0,p=new Array(f),g=new Array(f),_=+i.apply(this,arguments),m=Math.min(Ar,Math.max(-Ar,r.apply(this,arguments)-_)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),y=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,c=d?(m-f*y)/d:0;s<f;++s,_=u)l=p[s],u=_+((h=g[l])>0?h*c:0)+y,g[l]={data:o[l],index:s,value:h,startAngle:_,endAngle:u,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:vr(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:vr(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:vr(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:vr(+t),o):a},o}const Yy=Gn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Jy=function(t,e){var n=cy(t);if(e)for(var i in e)n[i]=e[i];function r(t,e){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ot(this);t.attr("data-original-fill")||t.attr("data-original-fill",t.style("fill")),t.style("fill","white")})),t.svg_.selectAll("pattern").selectAll("rect[code='"+e+"']").each((function(){var t=Ot(this);t.style("fill",t.attr("data-original-fill"))}))}function a(t){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ot(this),e=t.attr("data-original-fill");e&&t.style("fill",e)}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=t.svg(),i=n.lgg;i.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var o=0,s=t.catColors(),l=function(l){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);t.catColors()[l];i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",s[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){Ot(this).raise(),r(n.map,l),n.map.insetTemplates_&&va(n.map.insetTemplates_,n.map.svgId,r,l)})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&va(n.map.insetTemplates_,n.map.svgId,a)})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffsets.x).attr("y",c+.5*n.shapeHeight).text(t.catLabels()[l]||l).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.hoverColor())})).on("mouseout",(function(){var n=t.catColors()[l]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",n)})),o++};for(var c in s)l(c);if(n.noData){var u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",t.noDataFillStyle()).on("mouseover",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",t.hoverColor()),Ot(this).style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));Ot(this).style("fill",t.noDataFillStyle())})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffsets.x).attr("y",u+.5*n.shapeHeight).text(n.noDataText).on("mouseover",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n};function Xy(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ky(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ky(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ky(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var Zy=function(t,e){var n=cy(t);if(n.sizeLegend={title:null,titlePadding:10,values:null,labelFormatter:void 0,noData:!1,noDataText:"No data"},n.colorLegend={title:null,titlePadding:10,marginTop:33,labelOffsets:{x:5,y:5},shapeWidth:25,shapeHeight:20,shapePadding:1,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var i in e)if("colorLegend"==i||"sizeLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];function a(t,e){var n=t.svg_.selectAll(".piechart").selectAll("path[code]");n.style("opacity",0),n.filter("path[code='"+e+"']").each((function(){Ot(this).style("opacity",1)}))}function o(t){t.svg_.selectAll(".piechart").selectAll("path[code]").each((function(){Ot(this).style("opacity",1)}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var i=n.getBaseY(),r=n.getBaseX();t.classifierSize_&&(n._sizeLegendContainer=e.append("g").attr("class","em-pie-size-legend").attr("transform","translate(".concat(r,", ").concat(i,")")),Kv(n,n._sizeLegendContainer,n.sizeLegend.values,t.classifierSize_,n.sizeLegend.title,n.sizeLegend.titlePadding)),function(t,e,n){var i=t.map,r=t.colorLegend;if(t._colorLegendContainer=t.lgg.append("g").attr("class","em-pie-color-legend"),t._sizeLegendContainer){var s=t._sizeLegendContainer.node().getBBox().height;t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(s+t.colorLegend.marginTop,")"))}else t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(n,")"));r.title&&t._colorLegendContainer.append("text").attr("id","em-color-legend-title").attr("class","em-color-legend-title").attr("x",0).attr("y",t.titleFontSize).text(r.title);var l=0,c=i.catColors(),u=function(e){var n=t.colorLegend.titlePadding+(r.title?t.titleFontSize:0)+l*(r.shapeHeight+r.shapePadding);i.catColors()[e];t._colorLegendContainer.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",n).attr("width",r.shapeWidth).attr("height",r.shapeHeight).style("fill",c[e]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){a(t.map,e),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,a,e)})).on("mouseout",(function(){o(t.map),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,o,e)})),t._colorLegendContainer.append("text").attr("class","em-legend-label").attr("x",r.shapeWidth+r.labelOffsets.x).attr("y",n+.5*r.shapeHeight).attr("dy","0.35em").text(i.catLabels()[e]||e),l++};for(var h in c)u(h);if(r.noData){var f=0;t._sizeLegendContainer&&(f=t._sizeLegendContainer.node().getBBox().height);var d=f+t.colorLegend.marginTop+t.boxPadding+(r.title?t.titleFontSize+t.boxPadding:0)+l*(r.shapeHeight+r.shapePadding),p=t.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(d,")"));t.appendNoDataLegend(p,t.noDataText,a,o)}}(n,r,i),n.setBoxDimension()},n};function Qy(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return tx(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tx(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function tx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var ex=function(t){var e=hy(t,!0,"pie");e.dorling_=(null==t?void 0:t.dorling)||!1,e.animateDorling_=!0,e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.classifierSize_=null,e.statPie_=null,e.pieTotalCode_=void 0,e.statCodes_=void 0,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_","dorling_","animateDorling_","pieTotalCode_","statCodes_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth","statCodes"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statPie=function(t,n,i,r,a,o){t.filters=t.filters||{};for(var s=0;s<i.length;s++){var l=i[s];t.filters[n]=l;var c={};for(var u in t)c[u]=t[u];for(var h in c.filters={},t.filters)c.filters[h]=t.filters[h];e.stat(l,c),a&&(e.catColors_=e.catColors_||{},e.catColors_[l]=a[s]),r&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=r[s])}if(e.statCodes_=i,o){e.pieTotalCode_=o,t.filters[n]=o;var f={};for(var d in t)f[d]=t[d];for(var p in f.filters={},t.filters)f.filters[p]=t.filters[p];e.stat(o,f)}else e.pieTotalCode_=void 0;return e},e.updateClassification=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){if(!e.statCodes_){e.statCodes_=Object.keys(e.statData_);var n=e.statCodes_.indexOf("default");n>-1&&e.statCodes_.splice(n,1)}var i,r=(i=[],e.getCentroidsGroup(e).selectAll("g.em-centroid").data().forEach((function(t){var e=t.properties.id,n=a(e);n&&i.push(n)})),Dt(i));return isNaN(r[0])||(e.classifierSize_=nv().domain(r).range([e.pieMinRadius_,e.pieMaxRadius_])),e};function i(t){var n=[];if(e.svg_){var i=t.getCentroidsGroup(t);if(i){i.selectAll("g.em-centroid").append("g").attr("class","em-pie").attr("id",(function(t){return n.push(t),"pie_"+t.properties.id}));var o=ba(e),s=e.svg().selectAll(o);"WORLD"!==t.geo_&&"mixed"==t.nutsLevel_&&function(t,e){e.each((function(e){var n=Ot(this);if(!this.parentNode.classList.contains("em-cntrg")){var i=n.attr("lvl"),a=r(e.properties.id),o=a?"WORLD"===t.geo_?"block":null:"none",s=null,l=null;a&&"0"!==i&&(s=n.style("stroke")||"#777","WORLD"===t.geo_&&(l=n.style("stroke-width")||"#777")),n.style("display",o).style("stroke",s).style("stroke-width",l)}}))}(t,s),function(t){t.forEach((function(t){var n=t.properties.id,i=[],o=r(n);for(var s in o)i.push({code:s,value:o[s]});if(i&&0!=i.length){var l=e.svg().selectAll("#pie_"+n),c=e.classifierSize_(a(n)),u=e.pieChartInnerRadius_,h=$y().sort(null).value((function(t){return t.value})),f=Ur().innerRadius(u).outerRadius(c),d=l.append("g").attr("class","piechart").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").style("pointer-events","none"),p=h(i);d.selectAll("path").data(p).join("path").attr("fill",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).each((function(t){this._current={startAngle:t.startAngle,endAngle:t.startAngle}})).transition().delay((function(t,e){return 150*e})).duration(e.transitionDuration_).attrTween("d",(function(t){var e=rn(this._current,t);return this._current=e(1),function(t){return f(e(t))}})).on("end",(function(){Ot(d.node()).style("pointer-events",null)}));d.on("mouseover",(function(t,n){Ot(this).style("stroke-width",e.pieStrokeWidth_+1).style("stroke","black"),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){Ot(this).style("stroke-width",e.pieStrokeWidth_).style("stroke",e.pieStrokeFill_),e._tooltip&&e._tooltip.mouseout()}))}}))}(n),function(t,n){n.on("mouseover",(function(t,n){var i=Ot(this);i.attr("fill___",i.style("fill")),i.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}(0,s)}}}e.updateStyle=function(){try{if(!e.classifierSize_)return;if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=Yy[t%10]}return e.pieTotalCode_&&(e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_),e.catLabels_=e.catLabels_||{},e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,i),i(e),e.dorling_?Uv(e,(function(t){var n=a(t.properties.id)||0;return e.classifierSize_(n)||0})):Vv(e),e}catch(t){console.error("Error in pie symbols styling: "+t.message),console.error(t)}};var r=function(t){for(var n={},i=0,r=e.statCodes_,a=0;a<r.length;a++){var o=r[a],s=e.statData(o).get(t),l=null==s?void 0:s.value;if(null==l||isNaN(l)){if(e.showOnlyWhenComplete())return}else n[o]=l,i+=l}if(e.pieTotalCode_){var c=e.statData(e.pieTotalCode_).get(t),u=null==c?void 0:c.value;i=null==u||isNaN(u)?0:u}if(i&&!isNaN(i)){var h,f=Qy(r);try{for(f.s();!(h=f.n()).done;){var d=h.value;void 0!==n[d]&&(n[d]/=i)}}catch(t){f.e(t)}finally{f.f()}if(e.pieTotalCode_){var p=Object.values(n).reduce((function(t,e){return t+e}),0);n.other=Math.max(0,1-p)}return n}};var a=function(t){var n,i=0;if(e.pieTotalCode_)!(n=e.statData(e.pieTotalCode_).get(t))||0!=n.value&&!n.value||isNaN(n.value)?e.showOnlyWhenComplete()&&(i=void 0):i=n.value;else for(var r=0;r<e.statCodes_.length;r++){var a=e.statCodes_[r];if(!(n=e.statData(a).get(t))||0!=n.value&&!n.value||isNaN(n.value)){if(e.showOnlyWhenComplete())return}else i+=n.value}if(0!=i)return i};e.getLegendConstructor=function(){return Zy};var o=150,s=120,l=Math.min(o,s)/2-10,c=$y().sort(null).value((function(t){return t.value})),u=Ur().innerRadius(0).outerRadius(.8*l),h=Ur().innerRadius(.9*l).outerRadius(.9*l);return e.tooltip_.textFunction=function(t,n){var i=t.properties.na||t.properties.name,f=t.properties.id,d=r(f),p=[];for(var g in d)p.push({code:g,value:d[g]});var _="";if(_+='<div class="em-tooltip-bar">'.concat(i).concat(f?" (".concat(f,")"):"","</div>"),!p||0===p.length)return _+="<div>".concat(e.noDataText(),"</div>");var m,v="",y="",x="",b=Qy(c(p));try{for(b.s();!(m=b.n()).done;){var w=m.value,S=e.catColors()[w.data.code]||"lightgray",M=u(w);if(v+='<path d="'.concat(M,'" fill="').concat(S,'" stroke="white" stroke-width="1" opacity="0.7"></path>'),w.data.value>.1){var E=u.centroid(w),k=h.centroid(w),C=h.centroid(w),T=w.startAngle+(w.endAngle-w.startAngle)/2;C[0]=.95*l*(T<Math.PI?1:-1),y+='<polyline points="'.concat(E.join(",")," ").concat(k.join(",")," ").concat(C.join(","),'"\n stroke="black" fill="none" stroke-width="1" />');var A=h.centroid(w);A[0]=.99*l*(T<Math.PI?1:-1);var P=T<Math.PI?"start":"end",F=(100*w.data.value).toFixed();isNaN(F)||(x+='<text x="'.concat(A[0],'" y="').concat(A[1],'" text-anchor="').concat(P,'" font-size="12px">\n ').concat(F,"%\n </text>"))}}}catch(t){b.e(t)}finally{b.f()}_+="\n <div class='em-tooltip-piechart-container'>\n <svg viewBox=\"".concat(-75," ").concat(-60," ").concat(o," ").concat(s,'" width="').concat(o,'" height="').concat(115,'">\n <g transform="translate(0,0)">\n ').concat(v,"\n ").concat(y,"\n ").concat(x,"\n </g>\n </svg>\n </div>\n "),_+='<div class="em-tooltip-breakdown">';var L,N=e.statCodes_.map((function(t){var n=e.statData(t).get(f);return n&&void 0!==n.value&&null!==n.value?{code:t,label:e.catLabels_[t],value:n.value,color:e.catColors()[t]||"#666"}:null})).filter(Boolean).sort((function(t,e){return e.value-t.value})),O=a(f)||N.reduce((function(t,e){return t+e.value}),0),z=Qy(N);try{for(z.s();!(L=z.n()).done;){var G,D=L.value,I=O?(D.value/O*100).toFixed(0):0;_+='\n <div class="em-breakdown-item">\n <span class="em-breakdown-color" style="background:'.concat(D.color,'"></span>\n <span class="em-breakdown-label">').concat(D.label,'</span>\n <span class="em-breakdown-value">').concat(null!==(G=D.value)&&void 0!==G&&G.toFixed?_a(D.value):0," (").concat(isNaN(I)?0:I,"%)</span>\n </div>\n ")}}catch(t){z.e(t)}finally{z.f()}if(null!=O){var R=e.statData(e.statCodes_[0]).unitText()||"";_+='\n <div class="em-breakdown-item em-total">\n <span class="em-breakdown-label">Total</span>\n <span class="em-breakdown-value">'.concat(_a(O)," ").concat(R,"</span>\n </div>\n ")}return _+="</div>"},e};function nx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ix(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nx(Object(n),!0).forEach((function(e){ka(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nx(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var rx=function(t){var e=hy(t,!0,"spark");e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.sparkLineChartFunction_=void 0,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_","sparkLineChartFunction_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_","sparkLineChartFunction_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.sparklineData_=void 0,e.sparklineData=function(t){var n=Object.keys(t[Object.keys(t)[0]]);return e._statDates=n,n.forEach((function(n){var i=um(),r={};for(var a in t){var o=t[a];r[a]=o[n]}i.setData(r),e.statData(n,i)})),e},e.statSpark=function(t,n,i){t.filters=t.filters||{};for(var r=0;r<n.length;r++){var a=n[r];t.filters.time=a;var o={};for(var s in t)o[s]=t[s];for(var l in o.filters={},t.filters)o.filters[l]=t.filters[l];e.stat(a,o),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[a]=i[r])}return e._statDates=n,e},e._statDates=void 0;var n=function(t){for(var n=[],i=0,r=0;r<e._statDates.length;r++){var a=e._statDates[r],o=e.statData(a).get(t);if(!o||0!=o.value&&!o.value||isNaN(o.value)){if(e.showOnlyWhenComplete())return}else n.push({date:a,value:o.value}),i+=o.value}if(0!=i){for(var s=1;s<n.length;s++){var l=n[s-1].value,c=n[s].value;n[s].percentageChange=0===l?.001:(c-l)/l*100}return n}};function i(t,n,r,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.sparkLineChartFunction_&&e.sparkLineChartFunction_!==i)return e.sparkLineChartFunction_(t,n,r,a,o);var s=Nn().domain([0,e._statDates.length-1]).range([.5,r-.5]),l=Bt(n.map((function(t){return t.value})))||0,c=Rt(n.map((function(t){return t.value})))||1,u=Nn().domain([l,c]).range([a,0]),h=n.map((function(t,e){return ix(ix({},t),{},{scaledXValue:s(e),scaledYValue:u(t.value)})})),f=u(0);o&&(t.append("g").attr("class","axis-x").attr("transform","translate(0, ".concat(a,")")).call(Pm(s).ticks(e._statDates.length).tickFormat((function(t,n){return e._statDates[n]}))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)"),t.append("g").attr("class","axis-y").call(Fm(u).ticks(5)),l<0&&c>0&&t.append("line").attr("x1",0).attr("x2",r).attr("y1",f).attr("y2",f).attr("stroke","gray").attr("stroke-dasharray","2,2").attr("stroke-width",1));var d=Iy().x((function(t){return t.scaledXValue})).y((function(t){return t.scaledYValue}));"area"===e.sparkType_&&t.append("path").datum(h).attr("fill","function"==typeof e.sparkAreaColor_?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke","none").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("d",function(t,e,n){var i=null,r=vr(!0),a=null,o=zy,s=null,l=Dr(c);function c(c){var u,h,f,d,p,g=(c=Ny(c)).length,_=!1,m=new Array(g),v=new Array(g);for(null==a&&(s=o(p=l())),u=0;u<=g;++u){if(!(u<g&&r(d=c[u],u,c))===_)if(_=!_)h=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=h;--f)s.point(m[f],v[f]);s.lineEnd(),s.areaEnd()}_&&(m[u]=+t(d,u,c),v[u]=+e(d,u,c),s.point(i?+i(d,u,c):m[u],n?+n(d,u,c):v[u]))}if(p)return s=null,p+""||null}function u(){return Iy().defined(r).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Gy:vr(+t),e="function"==typeof e?e:vr(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Dy:vr(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:vr(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:vr(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vr(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:vr(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:vr(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:vr(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:vr(!!t),c):r},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}().x((function(t){return t.scaledXValue})).y0(f).y1((function(t){return t.scaledYValue}))),t.append("path").datum(h).attr("fill","none").attr("opacity",e.sparkLineOpacity_).attr("stroke","function"==typeof e.sparkLineColor_?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width","function"==typeof e.sparkLineStrokeWidth_?function(t,n){return e.sparkLineStrokeWidth_(t,n)}:e.sparkLineStrokeWidth_+"px").attr("d",d),t.selectAll("circle").data(h).enter().append("circle").attr("cx",(function(t){return t.scaledXValue})).attr("cy",(function(t){return t.scaledYValue})).attr("r",e.sparkLineCircleRadius_).attr("fill","red").attr("stroke","none")}e.updateClassification=function(){if(!e._statDates){e._statDates=Object.keys(e.statData_);var t=e._statDates.indexOf("default");t>-1&&e._statDates.splice(t,1)}return e.domain=function(){var t=[];if(e.getCentroidsGroup(e).selectAll("g.em-centroid").data().forEach((function(e){var n=e.properties.id,i=r(n);void 0!==i&&t.push(i)})),0===t.length)return[0,1];return Dt(t)}(),e.widthClassifier_=nv().domain(e.domain).range([0,e.sparkLineWidth_]),e.heightClassifier_=nv().domain(e.domain).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],r=(e.getCentroidsGroup(e).selectAll("g.em-centroid").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),ba(e));return e.svg().selectAll(r).on("mouseover",(function(t,i){if(n(i.properties.id)){var r=Ot(this);r.attr("fill___",r.style("fill")),r.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(i,e))}})).on("mousemove",(function(t,i){n(i.properties.id)&&e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.style("fill");t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){var r=e.svg().select("#spark_"+t),a=n(t);a&&i(r,a,e.sparkLineWidth_,e.sparkLineHeight_)})),e},e.tooltip_.textFunction=function(t,r){var a=[],o=t.properties.na,s=t.properties.id;a.push('\n <div class="em-tooltip-bar">\n <b>'.concat(o,"</b>").concat(s?" (".concat(s,")"):"","\n </div>\n "));var l,c=e.sparkTooltipChart_.height,u=e.sparkTooltipChart_.width,h=e.sparkTooltipChart_.margin,f=n(t.properties.id);if(f){var d=u+h.left+h.right,p=c+h.top+h.bottom,g=(l="div",Ot(xt(l).call(document.documentElement))).attr("class","em-tooltip-chart-container");i(g.append("svg").attr("class","em-tooltip-chart-svg").attr("width",d).attr("height",p).append("g").attr("transform","translate(".concat(h.left,", ").concat(h.top,")")),f,u,c,!0),a.push(g.node().outerHTML)}return a.join("")};var r=function(t){for(var n=0,i=0;i<e._statDates.length;i++){var r=e._statDates[i],a=e.statData(r);if(a&&"function"==typeof a.get){var o=a.get(t);if(!o||0!==o.value&&!o.value||isNaN(o.value)){if(e.showOnlyWhenComplete())return}else o.value>n&&(n=o.value)}}if(0!==n)return n};return e.getLegendConstructor=function(){return Vm},e},ax=function(t,e){var n=cy(t);if(n.flowWidthLegend={title:null,titlePadding:17,values:null,marginTop:5},n.donutSizeLegend={title:null,titlePadding:25,values:null,marginTop:20},n.flowColorLegend={title:null,titlePadding:0,marginTop:33},n.regionColorLegend={title:null,titlePadding:15,marginTop:30},e)for(var i in e)if("colorLegend"==i||"flowWidthLegend"==i||"donutSizeLegend"==i||"flowColorLegend"==i||"regionColorLegend"==i){for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);0==e.colorLegend&&(n.colorLegend=!1)}else n[i]=e[i];return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;if(t.legend_)for(var i in t.legend_)if("colorLegend"==i||"flowWidthLegend"==i||"donutSizeLegend"==i||"flowColorLegend"==i||"regionColorLegend"==i)for(var r in n[i])void 0!==t.legend_[i][r]&&(n[i][r]=t.legend_[i][r]);else n[i]=t.legend_[i];e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle(),function(t){var e=t.map,n=t.getBaseX(),i=t.getBaseY();!function(t,e,n){var i=t.map;if(!i.strokeWidthScale)return;t._flowWidthContainer=t.lgg.append("g").attr("class","em-flow-width-legend").attr("transform","translate(".concat(e,", ").concat(n,")")),t.flowWidthLegend.title&&t._flowWidthContainer.append("text").attr("class","em-size-legend-title").text(t.flowWidthLegend.title||"Flow width");var r=i.strokeWidthScale,a=r.domain(),o=t.flowWidthLegend.values||[a[0],a[a.length-1]],s=t.flowWidthLegend.titlePadding||10,l=7,c=0;o.forEach((function(e,n){var i=r(e);if(n>0){var a=r(o[n-1]);s+=a/2+i/n+l}t._flowWidthContainer.append("line").attr("x1",c).attr("x2",c+40).attr("y1",s).attr("y2",s).attr("stroke","#6b6b6b").attr("stroke-width",i),t._flowWidthContainer.append("text").attr("x",c+50).attr("y",s).attr("dy","0.35em").attr("class","em-legend-label").text(_a(e))}))}(t,n,i+t.flowWidthLegend.marginTop);var r=t._flowWidthContainer.node().getBBox().height;if(e.flowDonuts_&&e.donutSizeScale){t._donutLegendContainer=t.lgg.append("g").attr("class","em-donut-legend").attr("transform","translate(".concat(n,", ").concat(i+r,")")),t._donutSizeContainer=t._donutLegendContainer.append("g").attr("class","em-donut-size-legend").attr("transform","translate(".concat(0,", ",t.donutSizeLegend.marginTop,")")),Kv(t,t._donutSizeContainer,t.donutSizeLegend.values,e.donutSizeScale,t.donutSizeLegend.title,t.donutSizeLegend.titlePadding);var a=t.donutSizeLegend.marginTop+t._donutSizeContainer.node().getBBox().height+t.flowColorLegend.marginTop;!function(t,e,n){var i,r=t.map,a=Array.from(r.topLocationKeys||[]),o=r.locationColorScale;null===(i=t._donutColorContainer)||void 0===i||i.remove(),t._donutColorContainer=t._donutLegendContainer.append("g").attr("class","em-donut-color-legend").attr("transform","translate(".concat(e,", ").concat(n,")"));var s=t._donutColorContainer.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("dy","0.35em").text(t.flowColorLegend.title||"Destination"),l=a.map((function(t){return{label:r.nodeNameMap.get(t)||t,color:o(t)}}));l.push({label:"Other",color:"#ccc"});var c=s.node().getBBox().height+t.flowColorLegend.titlePadding,u=function(t){r.svg_.selectAll("g.em-flow-container line").classed("highlighted",(function(){return this.getAttribute("stroke")===t})).classed("dimmed",(function(){return this.getAttribute("stroke")!==t}))},h=function(){r.svg_.selectAll("g.em-flow-container line").classed("highlighted",!1).classed("dimmed",!1)};l.forEach((function(e,n){var i=t._donutColorContainer.append("g").attr("class","em-donut-color-item").attr("transform","translate(0, ".concat(22*n+c,")")).style("cursor","pointer").on("mouseover",(function(){u(e.color),Ot(this).select("text").style("font-weight","bold"),Ot(this).select("rect").attr("stroke","black").attr("stroke-width",2)})).on("mouseout",(function(){h(),Ot(this).select("text").style("font-weight","normal"),Ot(this).select("rect").attr("stroke","none")}));i.append("rect").attr("width",18).attr("height",18).attr("fill",e.color),i.append("text").attr("x",25).attr("y",14).attr("class","em-legend-label").text(e.label)}))}(t,0,a)}if(e.importerRegionIds.length>0||e.exporterRegionIds.length>0){var o=i+t.flowWidthLegend.marginTop+r+t.regionColorLegend.marginTop;e.flowDonuts_&&e.donutSizeScale&&(o+=t.donutSizeLegend.marginTop,o+=t._donutLegendContainer.node().getBBox().height),function(t,e,n){t._colorLegendContainer||(t._colorLegendContainer=t.lgg.append("g").attr("class","em-color-legend").attr("transform","translate(".concat(e,", ").concat(n,")")));var i=t._colorLegendContainer.append("g").attr("class","em-flow-overlay-color-legend"),r=(i.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("dy","0.35em").text(t.regionColorLegend.title||"Region fill colors"),t.map),a={"Net Exporter":r.flowOverlayColors_[0],"Net Importer":r.flowOverlayColors_[1]},o=t.regionColorLegend.titlePadding;Object.entries(a).forEach((function(e,n){var r=y(e,2),a=r[0],s=r[1];i.append("rect").attr("x",0).attr("y",o+20*n).attr("width",t.shapeWidth).attr("height",t.shapeHeight).attr("fill",s),i.append("text").attr("x",t.shapeWidth+5).attr("y",o+20*n+15).attr("class","em-legend-label").text(a)}))}(t,n,o)}}(n),n.setBoxDimension()},n};class ox{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function sx(t){return new ox(t,!0)}function lx(t){return t.source}function cx(t){return t.target}function ux(t){let e=lx,n=cx,i=Gy,r=Dy,a=null,o=null,s=Dr(l);function l(){let l;const c=Ly.call(arguments),u=e.apply(this,c),h=n.apply(this,c);if(null==a&&(o=t(l=s())),o.lineStart(),c[0]=u,o.point(+i.apply(this,c),+r.apply(this,c)),c[0]=h,o.point(+i.apply(this,c),+r.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.x=function(t){return arguments.length?(i="function"==typeof t?t:vr(+t),l):i},l.y=function(t){return arguments.length?(r="function"==typeof t?t:vr(+t),l):r},l.context=function(e){return arguments.length?(null==e?a=o=null:o=t(a=e),l):a},l}function hx(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return fx(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fx(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function fx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function dx(t,e){var n=t.svg_,i=(t.flowGraph_,function(t){var e=t.flowGraph_;return function(t){var e,n=t.nodes,i=hx(n);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.value=Math.max(Wt(r.sourceLinks,(function(t){return t.value})),Wt(r.targetLinks,(function(t){return t.value})))}}catch(t){i.e(t)}finally{i.f()}}(e),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var o,s=hx(i);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.depth=a;var c,u=hx(l.sourceLinks);try{for(u.s();!(c=u.n()).done;){var h=c.value.target;r.add(h)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(e),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var o,s=hx(i);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.height=a;var c,u=hx(l.targetLinks);try{for(u.s();!(c=u.n()).done;){var h=c.value.source;r.add(h)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(e),function(t,e){var n,i=e.nodes,r=hx(i);try{for(r.s();!(n=r.n()).done;){var a=n.value;a.sourceLinks.forEach((function(e){return e.width=t.strokeWidthScale(e.value)})),a.targetLinks.forEach((function(e){return e.width=t.strokeWidthScale(e.value)}));var o=Math.max(Wt(a.sourceLinks,(function(t){return t.width})),Wt(a.targetLinks,(function(t){return t.width})));a.x0=a.x1=a.x,a.y0=a.y-o/2,a.y1=a.y+o/2}}catch(t){r.e(t)}finally{r.f()}!function(t){var e,n=hx(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.sourceLinks,a=i.targetLinks;r.sort(mx),a.sort(vx)}}catch(t){n.e(t)}finally{n.f()}}(i)}(t,e),function(t){var e,n=t.nodes,i=hx(n);try{for(i.s();!(e=i.n()).done;){var r,a=e.value,o=a.y0,s=hx(a.sourceLinks);try{for(s.s();!(r=s.n()).done;){var l=r.value;l.y0=o+l.width/2,o+=l.width}}catch(t){s.e(t)}finally{s.f()}var c,u=a.y0,h=hx(a.targetLinks);try{for(h.s();!(c=h.n()).done;){var f=c.value;f.y1=u+f.width/2,u+=f.width}}catch(t){h.e(t)}finally{h.f()}}}catch(t){i.e(t)}finally{i.f()}}(e),e}(t)),r=i.nodes,a=i.links;t.flowStack_||a.forEach((function(t){var e=(t.source.y0+t.source.y1)/2;t.y0=e}));var o=n.append("defs"),s=ma("arrow"),l=ma("arrow-outline"),c=a.map((function(){return ma("gradient")}));return t.flowArrows_&&(px(t,o,s,t.flowColor_),px(t,o,l,"#ffffff")),t.flowGradient_&&function(t,e,n,i){var r=i.filter((function(t){var e,n;return null!=(null===(e=t.source)||void 0===e?void 0:e.x1)&&null!=(null===(n=t.target)||void 0===n?void 0:n.x0)&&null!=t.y0&&null!=t.y1}));e.selectAll("linearGradient").data(r).join("linearGradient").attr("id",(function(t,e){return n[e]})).attr("gradientUnits","userSpaceOnUse").attr("x1",(function(t){return t.source.x1})).attr("x2",(function(t){return t.target.x0})).attr("y1",(function(t){return t.y0})).attr("y2",(function(t){return t.y1})).call((function(e){return e.append("stop").attr("offset","5%").attr("stop-color",t.flowOverlayColors_[0])})).call((function(e){return e.append("stop").attr("offset","50%").attr("stop-color",t.flowColor_)}))}(t,o,c,a),function(t,e,n,i,r,a){var o=e.append("g").attr("class","em-flow-lines").attr("id","em-flow-lines");n.forEach((function(e,n){t.flowOutlines_&&o.append("path").attr("d",yx()(e)).attr("fill","none").attr("stroke","#ffffff").attr("class","em-flow-link-outline").attr("stroke-width",e.width+1.5).attr("marker-end","url(#".concat(r,")")),o.append("path").attr("d",yx()(e)).attr("fill","none").attr("class","em-flow-link").attr("stroke",t.flowGradient_?"url(#".concat(a[n],")"):t.flowColor_).attr("stroke-width",e.width).attr("marker-end",t.flowArrows_?"url(#".concat(i,")"):"").on("mouseover",(function(n){var r=t.hoverColor_;Ot(this).attr("stroke",r),t.flowArrows_&&Ot(this).attr("marker-end","url(#".concat(i+"mouseover",")")),t._tooltip&&t._tooltip.mouseover(t.tooltip_.textFunction(e,t))})).on("mousemove",(function(e){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(){t.flowGradient_?Ot(this).attr("stroke","url(#".concat(a[n],")")):Ot(this).attr("stroke",t.flowColor_),t.flowArrows_&&Ot(this).attr("marker-end","url(#".concat(i,")")),t._tooltip&&t._tooltip.mouseout()}))}))}(t,e,a,s,l,c),function(t,e,n){e.append("g").attr("class","em-flow-fill-in-gaps").selectAll("rect").data(n).join("rect").filter((function(t){return t.depth&&t.height})).attr("x",(function(t){return t.x0-.5})).attr("y",(function(t){return t.y0})).attr("width",1).attr("height",(function(t){return t.y1-t.y0})).attr("fill",t.flowColor_)}(t,e,r),n.node()}function px(t,e,n,i){e.append("marker").attr("id",n).attr("markerHeight",7).attr("markerWidth",7).attr("refX",.5).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",i).attr("d","M0,0 q0,1,0.5,1.5 q-0.5,0.5,-0.5,1.5 q0.75,-0.75,2,-1.5 q-1.25,-0.75,-2,-1.5Z"),e.append("marker").attr("id",n+"mouseover").attr("markerHeight",7).attr("markerWidth",7).attr("refX",.5).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",t.hoverColor_).attr("d","M0,0 q0,1,0.5,1.5 q-0.5,0.5,-0.5,1.5 q0.75,-0.75,2,-1.5 q-1.25,-0.75,-2,-1.5Z")}function gx(t){return[t.source.x1,t.y0]}function _x(t){return[t.target.x0,t.y1]}var mx=function(t,e){return t.target.y-e.target.y},vx=function(t,e){return t.source.y-e.source.y},yx=function(){return ux(sx).source(gx).target(_x)};function xx(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return bx(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bx(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function bx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function wx(t,e){!function(t,e){var n=e.append("g").attr("class","em-flow-lines").attr("id","em-flow-lines"),i=t.flowGraph_,r=i.nodes,a=i.links,o=new Map(r.map((function(t){return[t.id,[t.x,t.y]]}))),s=new Map;a.forEach((function(t){var e="object"===Ma(t.source)?t.source.id:t.source,n="object"===Ma(t.target)?t.target.id:t.target,i=o.get(e),r=o.get(n);if(i&&r){var a=e<n?"".concat(e,"|").concat(n):"".concat(n,"|").concat(e);s.has(a)||s.set(a,{idA:e<n?e:n,idB:e<n?n:e,coordsA:e<n?i:r,coordsB:e<n?r:i,flowAB:0,flowBA:0});var l=s.get(a);e<n?l.flowAB+=t.value:l.flowBA+=t.value}}));var l,c=xx(s.values());try{var u=function(){var e=l.value,i=e.idA,r=e.idB,a=e.coordsA,o=e.coordsB,s=e.flowAB,c=e.flowBA,u=(a[0]+o[0])/2,g=(a[1]+o[1])/2,_=function(){return h(t,i,r)},m=function(){return h(t,r,i)};s>0&&c>0?(n.append("line").attr("data-nb",s).attr("x1",u).attr("y1",g).attr("x2",o[0]).attr("y2",o[1]).attr("data-origin",i).attr("data-dest",r).attr("stroke",_).attr("stroke-width",t.strokeWidthScale(s).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,i,r,s)).on("mousemove",d(t)).on("mouseout",p(t,_)),n.append("line").attr("data-nb",c).attr("x1",u).attr("y1",g).attr("x2",a[0]).attr("y2",a[1]).attr("data-origin",r).attr("data-dest",i).attr("stroke",m).attr("stroke-width",t.strokeWidthScale(c).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,r,i,c)).on("mousemove",d(t)).on("mouseout",p(t,m))):s>0&&0===c?n.append("line").attr("data-nb",s).attr("x1",a[0]).attr("y1",a[1]).attr("x2",o[0]).attr("y2",o[1]).attr("data-origin",i).attr("data-dest",r).attr("stroke",_).attr("stroke-width",t.strokeWidthScale(s).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,i,r,s)).on("mousemove",d(t)).on("mouseout",p(t,_)):c>0&&0===s&&n.append("line").attr("data-nb",c).attr("x1",o[0]).attr("y1",o[1]).attr("x2",a[0]).attr("y2",a[1]).attr("data-origin",r).attr("data-dest",i).attr("stroke",m).attr("stroke-width",t.strokeWidthScale(c).toFixed(1)).attr("stroke-opacity",t.flowOpacity_).style("cursor","pointer").on("mouseover",f(t,r,i,c)).on("mousemove",d(t)).on("mouseout",p(t,m))};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}function h(t,e,n,i){if(!t.topLocationKeys||!t.flowTopLocations_)return t.flowColor_;var r=t.flowTopLocationsType_||"sum";return"origin"===r?t.topLocationKeys.has(e)?t.locationColorScale(e):t.flowColor_:"destination"===r?t.topLocationKeys.has(n)?t.locationColorScale(n):t.flowColor_:t.topLocationKeys.has(n)?t.locationColorScale(n):t.topLocationKeys.has(e)?t.locationColorScale(e):t.flowColor_}function f(t,e,n,i){return function(r){var a=t.hoverColor_||"black";if(Ot(this).attr("stroke",a),t._tooltip){var o={source:t.flowGraph_.nodes.find((function(t){return t.id===e})),target:t.flowGraph_.nodes.find((function(t){return t.id===n})),value:i};t._tooltip.mouseover(t.tooltip_.textFunction(o,t))}}}function d(t){return function(e){t._tooltip&&t._tooltip.mousemove(e)}}function p(t,e){return function(){Ot(this).attr("stroke",e()),t._tooltip&&t._tooltip.mouseout()}}}(t,e)}function Sx(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Mx(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mx(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Mx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ex(t,e){var n=e.data.parent.id;Ca("g.em-flow-container line").classed("highlighted",(function(){return this.getAttribute("data-origin")===n||this.getAttribute("data-dest")===n})).classed("dimmed",(function(){return this.getAttribute("data-origin")!==n&&this.getAttribute("data-dest")!==n}))}function kx(t){Ca("g.em-flow-container line").classed("highlighted",!1).classed("dimmed",!1)}function Cx(t,e){var n,i,r=En(".0%"),a=t.data.parent,o=Wt(a.donutValues,(function(t){return t.value})),s=null===(n=e.statData)||void 0===n?void 0:n.call(e),l=(null==s||null===(i=s.unitText)||void 0===i?void 0:i.call(s))||"",c=[];c.push('\n <div class="em-tooltip-bar">\n <b>'.concat(a.name||a.id||"Unknown location","</b>\n </div>\n ")),c.push('<div class="em-tooltip-text"><table class="em-tooltip-table"><tbody>');var u=Px(a.id,e),h=Wt(u,(function(t){return t.value}));if(h>0){var f=r(h/o);c.push('\n <tr><td style="padding-top:3px;">Incoming:</td>\n <td>'.concat(_a(h)," (").concat(f,")</td>\n </tr>\n ")),u.forEach((function(t){var e=r(t.value/o);c.push('\n <tr>\n <td style="padding-left:1.5em;">\n <span style="\n display:inline-block;\n width:10px;\n height:10px;\n border-radius:50%;\n background:'.concat(t.color,';\n margin-right:6px;\n "></span> ').concat(t.name||t.key,'\n </td>\n <td style="text-align:right">\n ').concat(_a(t.value)," (").concat(e,")\n </td>\n </tr>\n "))}))}var d=Fx(a.id,e),p=Wt(d,(function(t){return t.value}));if(p>0){var g=r(p/o);c.push('\n <tr><td style="padding-top:3px;">Outgoing:</td>\n <td>'.concat(_a(p)," (").concat(g,")</td>\n </tr>\n ")),d.forEach((function(t){var e=r(t.value/o);c.push('\n <tr>\n <td style="padding-left:1.5em;">\n <span style="\n display:inline-block;\n width:10px;\n height:10px;\n border-radius:50%;\n background:'.concat(t.color,';\n margin-right:6px;\n "></span> ').concat(t.name||t.key,'\n </td>\n <td style="text-align:right">\n ').concat(_a(t.value)," (").concat(e,")\n </td>\n </tr>\n "))}))}return c.push('\n <tr class="em-tooltip-total">\n <td colspan="2" style="padding-top:4px; font-weight:bold;">\n Total: '.concat(_a(o)," ").concat(l,"\n </td>\n </tr>\n ")),c.push("</tbody></table></div>"),c.join("")}var Tx=function(t,e){var n=+e.attr("data-zoom")||1;Ot(t.target.parentNode).selectAll("path").each((function(){var t=Ot(this),e=+t.attr("stroke-width")||0;t.attr("data-stroke-width",e)})).attr("stroke","black").attr("stroke-width",2/n)},Ax=function(t,e){var n=+e.attr("data-zoom")||1;Ot(t.target.parentNode).selectAll("path").attr("stroke","white").attr("stroke-width",(function(){return(+Ot(this).attr("data-stroke-width")||0)/n}))};function Px(t,e){var n,i=e.topLocationKeys,r=e.flowTopLocationsType_,a=e.flowInternal_,o={},s=Sx(e.flowGraph_.links);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.source.id,u=l.target.id;if(u===t)if(c!==u){var h=void 0;o[h="destination"===r?t:"origin"===r?i.has(c)?c:"Other":i.has(c)||i.has(t)?i.has(c)?c:t:"Other"]=(o[h]||0)+l.value}else a&&(o.Internal=(o.Internal||0)+l.value)}}catch(t){s.e(t)}finally{s.f()}return Lx(Object.entries(o).map((function(n){var i,r=y(n,2),a=r[0],o=r[1];return{key:a,name:(null===(i=e.nodeNameMap)||void 0===i?void 0:i.get(a))||a,value:o,color:Nx(a,t,e)}})))}function Fx(t,e){var n,i=e.topLocationKeys,r=e.flowTopLocationsType_,a=e.flowInternal_,o={},s=Sx(e.flowGraph_.links);try{for(s.s();!(n=s.n()).done;){var l=n.value,c=l.source.id,u=l.target.id;if(c===t)if(c!==u){var h=void 0;o[h="origin"===r?t:"destination"===r?i.has(u)?u:"Other":i.has(u)||i.has(t)?i.has(u)?u:t:"Other"]=(o[h]||0)+l.value}else a&&(o.Internal=(o.Internal||0)+l.value)}}catch(t){s.e(t)}finally{s.f()}return Lx(Object.entries(o).map((function(n){var i,r=y(n,2),a=r[0],o=r[1];return{key:a,name:(null===(i=e.nodeNameMap)||void 0===i?void 0:i.get(a))||a,value:o,color:Nx(a,t,e)}})))}function Lx(t){return t.sort((function(t,e){return"Other"===t.key?1:"Other"===e.key?-1:e.value-t.value}))}function Nx(t,e,n){var i=n.topLocationKeys||new Set,r=n.locationColorScale;return"Other"===t?"#666":"Internal"===t?i.has(e)?r(e):"#999":i.has(t)?r(t):"#666"}function Ox(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return zx(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zx(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function zx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var Gx=function(t){var e=hy(t,!0,"flow");return e.strokeWidthScale=Nn(),e.labelFormatter=function(t){return En(".2s")(t)},e.tooltip_.textFunction=Ix,e.flowMapType_="sankey",e.flowDonuts_=!1,e.flowColor_="#848484ff",e.flowOverlayColors_=["#bbd7ee","#c7e3c6"],e.flowMaxWidth_=30,e.flowMinWidth_=1,e.flowArrows_=!0,e.flowOutlines_=!0,e.flowGradient_=!0,e.flowStack_=!1,e.flowLabelOffsets_={x:3,y:0},e.flowOpacity_=.5,e.flowInternal_=!0,e.flowTopLocations_=5,e.flowTopLocationsType_="destination",["flowGraph_","flowColor_","flowOverlayColors_","flowArrows_","flowMaxWidth_","flowMinWidth_","flowOutlines_","flowGradient_","flowStack_","flowDonuts_","flowLabelOffsets_","flowMapType_","flowDonutSizeScale_","flowOpacity_","flowInternal_","flowTopLocations_","flowTopLocationsType_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.updateStyle=function(){var t,n=e.flowGraph_.links;e.strokeWidthScale=Nn().domain([Bt(n,(function(t){return t.value})),Rt(n,(function(t){return t.value}))]).range([e.flowMinWidth_,e.flowMaxWidth_]),e.flowDonuts_&&0==e.flowTopLocations_&&(e.flowTopLocations_=4),function(t){(function(t){t.flowGraph_.nodes.forEach((function(e){if("number"!=typeof e.x||"number"!=typeof e.y)if(t.Geometries.centroidsFeatures){var n=t.Geometries.centroidsFeatures.find((function(t){return e.id==t.properties.id}));if(n){var i=y(n.geometry.coordinates,2),r=i[0],a=i[1];e.x=r,e.y=a}else console.error("could not find coordinates for",e.id)}else{var o,s,l,c=null===(o=(s=t.Geometries).getRegionFeatures)||void 0===o?void 0:o.call(s),u=null==c?void 0:c.find((function(t){return t.properties.id===e.id})),h=y((null==u||null===(l=u.properties)||void 0===l?void 0:l.centroid)||t._pathFunction.centroid(u),2),f=h[0],d=h[1];e.x=f,e.y=d}}))})(t),function(t){var e,n=t.flowGraph_.nodes,i=Ox(n);try{for(i.s();!(e=i.n()).done;){var r=e.value,a=t._projection([r.x,r.y]);r.x=a[0],r.y=a[1]}}catch(t){i.e(t)}finally{i.f()}}(t),function(t){var e=t.flowGraph_,n=e.nodes,i=e.links,r=new Map;i.forEach((function(t){r.set(t.source,(r.get(t.source)||0)+t.value),r.set(t.target,(r.get(t.target)||0)+t.value)})),n.forEach((function(t){t.value=r.get(t.id)||0}))}(t),function(t){var e,n=t.flowGraph_.nodes,i=t.flowGraph_.links,r=function(t){return t.id},a=Ox(n.entries());try{for(a.s();!(e=a.n()).done;){var o=y(e.value,2),s=o[0],l=o[1];l.index=s,l.sourceLinks=[],l.targetLinks=[]}}catch(t){a.e(t)}finally{a.f()}var c,u=new Map(n.map((function(t,e){return[r(t,e,n),t]}))),h=Ox(i.entries());try{for(h.s();!(c=h.n()).done;){var f=y(c.value,2),d=f[0],p=f[1];p.index=d;var g=p.source,_=p.target;"object"!==Ma(g)&&(g=p.source=Dx(u,g)),"object"!==Ma(_)&&(_=p.target=Dx(u,_)),g.sourceLinks.push(p),_.targetLinks.push(p)}}catch(t){h.e(t)}finally{h.f()}}(t),t.flowTopLocations_&&function(t){var e=t.flowGraph_.nodes,n=t.flowTopLocations_,i=t.flowTopLocationsType_||"sum";e.forEach((function(t){var e=t.sourceLinks.reduce((function(t,e){return t+e.value}),0),n=t.targetLinks.reduce((function(t,e){return t+e.value}),0);t.topScore="origin"===i?e:"destination"===i?n:e+n}));var r=x(e).sort((function(t,e){return e.topScore-t.topScore})).slice(0,n);t.topLocationKeys=new Set(r.map((function(t){return t.id}))),t.locationColorScale=xm().domain(r.map((function(t){return t.id}))).range(["#00B3E3","#FBBA00","#2BA966","#D23142","#005289","#93397F","#E73E11","#4E4084","#056731","#00667E","#B5B900"])}(t);t.nodeNameMap=new Map(t.flowGraph_.nodes.map((function(t){return[t.id,t.name||t.id]})))}(e);var i=Ot("#em-zoom-group-"+e.svgId_).append("g").attr("class","em-flow-container");!function(t){var e=t.flowGraph_,n=[],i=[],r=t.Geometries.getRegionFeatures();if(!r)return;if(e.nodes.forEach((function(t){var e=t.sourceLinks.reduce((function(t,e){return t+e.value}),0),a=t.targetLinks.reduce((function(t,e){return t+e.value}),0);r.find((function(e){return e.properties.id===t.id}))?a>e?n.push(t.id):e>a&&i.push(t.id):console.warn("could not find region geometry for",t.id)})),t.importerRegionIds=n,t.exporterRegionIds=i,0===n.length&&0===i.length)return void console.warn("No importer or exporter regions found in the flow graph.");var a=ba(t),o=t.svg_.selectAll(a);o.each((function(){var e=this.__data__.properties.id;Ot(this).style("fill",(function(){return n.includes(e)?t.flowOverlayColors_[1]:i.includes(e)?t.flowOverlayColors_[0]:null})).attr("class",(function(){return n.includes(e)?"em-flow-importer":i.includes(e)?"em-flow-exporter":null}))}))}(e),"sankey"===e.flowMapType_?dx(e,i):wx(e,i),e.flowDonuts_&&(function(t){var e,n=t.flowGraph_.nodes,i=t.topLocationKeys||new Set,r=(t.locationColorScale,t.flowTopLocationsType_),a=Sx(n);try{var o=function(){var n,a=e.value,o=new Map,s=0,l=Sx(a.targetLinks);try{for(l.s();!(n=l.n()).done;){var c=n.value,u=c.source.id;if(u!==a.id){var h=void 0;h="origin"===r?i.has(u)?u:"Other":"destination"===r?i.has(a.id)?a.id:"Other":i.has(u)||i.has(a.id)?i.has(a.id)?a.id:u:"Other",o.set(h,(o.get(h)||0)+c.value)}else t.flowInternal_&&(s+=c.value)}}catch(t){l.e(t)}finally{l.f()}var f,d=Sx(a.sourceLinks);try{for(d.s();!(f=d.n()).done;){var p=f.value,g=p.target.id;if(g!==a.id){var _=void 0;_="origin"===r?i.has(a.id)?a.id:"Other":"destination"===r?i.has(g)?g:"Other":i.has(g)||i.has(a.id)?i.has(g)?g:a.id:"Other",o.set(_,(o.get(_)||0)+p.value)}else t.flowInternal_&&(s+=p.value)}}catch(t){d.e(t)}finally{d.f()}a.donutValues=Array.from(o.entries()).map((function(e){var n=y(e,2),i=n[0];return{label:i,value:n[1],color:Nx(i,a.id,t)}})),t.flowInternal_&&s>0&&a.donutValues.push({label:"Internal",value:s,color:"#999"})};for(a.s();!(e=a.n()).done;)o()}catch(t){a.e(t)}finally{a.f()}}(e),function(t){var e,n={},i=Sx(t.flowGraph_.nodes);try{for(i.s();!(e=i.n()).done;){var r=e.value;n[r.id]={x:r.x,y:r.y,incoming:0,outgoing:0,internal:0}}}catch(t){i.e(t)}finally{i.f()}var a,o=Sx(t.flowGraph_.links);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=s.source.id,c=s.target.id;n[l]&&(n[l].outgoing+=s.value),n[c]&&(n[c].incoming+=s.value),l===c&&(n[l].internal+=s.value)}}catch(t){o.e(t)}finally{o.f()}t.locationStats=n}(e),function(t,e){var n=e.append("g").attr("class","donuts").attr("id","donuts"),i=Rt(t.flowGraph_.nodes,(function(t){return Wt(t.donutValues,(function(t){return t.value}))}));t.donutSizeScale=t.flowDonutSizeScale_||nv().domain([0,i]).range([3,10]);var r=Ur().innerRadius(5),a=$y().value((function(t){return t.value})).sort(null);Object.entries(t.locationStats).forEach((function(e){var i=y(e,2),o=i[0],s=i[1],l=s.x,c=s.y,u=s.incoming,h=s.outgoing,f=s.internal,d=t.flowInternal_?u+h+f:u+h;if(0!==d){var p=Px(o,t),g=Fx(o,t),_=[].concat(x(p),x(g)),m=new Map;_.forEach((function(t){var e=t.color;m.set(e,(m.get(e)||0)+t.value)}));var v=Array.from(m,(function(t){var e=y(t,2),n=e[0];return{label:n,value:e[1],color:n}})),b=a(v);b.forEach((function(e){e.data.parent={id:o,name:t.nodeNameMap.get(o)||o,donutValues:v}}));var w=n.append("g").attr("class","donut-group").attr("transform","translate(".concat(l,",").concat(c,")")).attr("data-total",d);w.selectAll("path").data(b).join("path").attr("d",r.innerRadius(.4*t.donutSizeScale(d)).outerRadius(t.donutSizeScale(d))).attr("fill",(function(t){return t.data.color})).attr("stroke","white").attr("stroke-width",.5).style("cursor","pointer").on("mouseover",(function(e,n){t._tooltip&&t._tooltip.mouseover(Cx(n,t)),Tx(e,t.svg_),Ex(0,n)})).on("mousemove",(function(e,n){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(e,n){t._tooltip&&t._tooltip.mouseout(),Ax(e,t.svg_),kx()})),w.append("circle").attr("r",.4*t.donutSizeScale(d)).attr("fill","white").style("cursor","pointer").on("mouseover",(function(e){var n=b[0];t._tooltip&&t._tooltip.mouseover(Cx(n,t)),Tx(e,t.svg_),Ex(0,n)})).on("mousemove",(function(e){t._tooltip&&t._tooltip.mousemove(e)})).on("mouseout",(function(e){t._tooltip&&t._tooltip.mouseout(),Ax(e,t.svg_),kx()}))}}))}(e,i)),null!==(t=e.labels_)&&void 0!==t&&t.values&&function(t,e){var n,i=t.flowGraph_.nodes,r=i.filter((function(t){return t.targetLinks&&0===t.sourceLinks.length})),a=e.append("g").attr("class","em-flow-labels");if(null!==(n=t.labels_)&&void 0!==n&&n.shadows){a.append("g").attr("class","em-flow-label-shadow").selectAll("text").data(r).join("text").attr("text-anchor",(function(t){return t.x>t.targetLinks[0].source.x?"start":"end"})).attr("x",(function(e){return e.x>e.targetLinks[0].source.x?e.x+t.flowLabelOffsets_.x:e.x-t.flowLabelOffsets_.x})).attr("y",(function(e){return e.y+t.flowLabelOffsets_.y})).text((function(e){return t.labelFormatter(e.value)}))}var o=a.append("g").attr("class","em-flow-label").selectAll("g").data(r).join("g").attr("transform",(function(t){return"translate(".concat(t.x,", ").concat(t.y,")")}));o.append("text").attr("class","em-label-text").attr("text-anchor",(function(t){return t.x>t.targetLinks[0].source.x?"start":"end"})).attr("x",(function(e){return e.x>e.targetLinks[0].source.x?t.flowLabelOffsets_.x:-t.flowLabelOffsets_.x})).attr("y",t.flowLabelOffsets_.y).text((function(e){return t.labelFormatter(e.value)})),t.labels_.backgrounds&&o.each((function(){var t=Ot(this).select("text").node().getBBox(),e=5,n=2;Ot(this).insert("rect","text").attr("class","em-label-background").attr("x",t.x-e).attr("y",t.y-n).attr("width",t.width+2*e).attr("height",t.height+2*n)}))}(e,i)},e.updateClassification=function(){},e.getLegendConstructor=function(){return ax},e};function Dx(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Ix=function(t,e){var n=[],i=e.statData().unitText()||"",r="".concat(t.source.name||t.source.id," to ").concat(t.target.name||t.target.id);return n.push('\n <div class="em-tooltip-bar">\n <b>'.concat(r,"</b>\n </div>\n ")),n.push("<div class='em-tooltip-text'>\n <table class=\"em-tooltip-table\">\n <tbody>\n <tr><td>".concat(_a(t.value)," ").concat(i,"</td></tr>\n </tbody>\n </table> \n </div>")),n.join("")};function Rx(t){return Math.sign(t)*t*t}function jx(){var t,e=pn(),n=[0,1],i=!1;function r(n){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(r)?t:i?Math.round(r):r}return r.invert=function(t){return e.invert(Rx(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain()},r.range=function(t){return arguments.length?(e.range((n=Array.from(t,on)).map(Rx)),r):n.slice()},r.rangeRound=function(t){return r.range(t).round(!0)},r.round=function(t){return arguments.length?(i=!!t,r):i},r.clamp=function(t){return arguments.length?(e.clamp(t),r):e.clamp()},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return jx(e.domain(),n).round(i).clamp(e.clamp()).unknown(t)},Qt.apply(r,arguments),Ln(r)}function Bx(t,e){if((r=t.length)>1)for(var n,i,r,a=1,o=t[e[0]],s=o.length;a<r;++a)for(i=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function qx(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Wx(t,e){return t[e]}function Ux(t){const e=[];return e.key=t,e}var Hx=function(t,e){var n=cy(t);if(n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,titlePadding:15,marginTop:23,labelOffsets:{x:5,y:5},shapeWidth:25,shapeHeight:20,shapePadding:1,noData:!0,noDataText:"No data"},n.monthLegend={title:null,marginTop:20},n._sizeLegendHeight=0,e)for(var i in e)if("colorLegend"===i||"sizeLegend"===i)for(var r in n[i])void 0!==e[i][r]&&(n[i][r]=e[i][r]);else n[i]=e[i];function a(t,e){var n=t.svg_.selectAll(".em-coxcomb-chart").selectAll("path[code]");n.style("fill","white"),n.filter("path[code='"+e+"']").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}function o(t){t.svg_.selectAll(".em-coxcomb-chart").selectAll("path[code]").each((function(){Ot(this).style("fill",Ot(this).attr("fill___"))}))}return n.update=function(){n.updateConfig(),n.updateContainer();var e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.addTitle(),n.subtitle&&n.addSubtitle();var i=n.getBaseY(),r=n.getBaseX();if(t.classifierSize_){var s=e.append("g").attr("class","em-coxcomb-size-legend").attr("transform","translate(".concat(r,", ").concat(i,")"));n._sizeLegendContainer=s,Kv(n,s,n.sizeLegend.values,n.map.classifierSize_,n.sizeLegend.title,n.sizeLegend.titlePadding)}!function(t,e,n){var i=t.map,r=t.colorLegend;t._colorLegendContainer=t.lgg.append("g").attr("class","em-coxcomb-color-legend");var s=0;t._sizeLegendContainer?(s=t._sizeLegendContainer.node().getBBox().height,t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(s+t.colorLegend.marginTop,")"))):t._colorLegendContainer.attr("transform","translate(".concat(e,",").concat(n,")"));r.title&&t._colorLegendContainer.append("text").attr("class","em-color-legend-title").attr("id","em-color-legend-title").attr("x",0).attr("y",t.titleFontSize).text(r.title);var l=0,c=i.catColors(),u=function(e){var n=t.colorLegend.titlePadding+(r.title?t.titleFontSize:0)+l*(r.shapeHeight+r.shapePadding),s=i.catColors()[e]||"lightgray";t._colorLegendContainer.append("rect").attr("class","em-legend-rect").attr("x",0).attr("y",n).attr("width",r.shapeWidth).attr("height",r.shapeHeight).style("fill",s).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){a(t.map,e),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,a,e)})).on("mouseout",(function(){o(t.map),t.map.insetTemplates_&&va(t.map.insetTemplates_,t.map.svgId,o,e)})),t._colorLegendContainer.append("text").attr("class","em-legend-label").attr("x",r.shapeWidth+r.labelOffsets.x).attr("y",n+.5*r.shapeHeight).attr("dy","0.35em").text(i.catLabels()[e]||e),l++};for(var h in c)u(h);if(r.noData){var f=s+t.colorLegend.marginTop+t.colorLegend.titlePadding+(r.title?t.titleFontSize+t.boxPadding:0)+l*r.shapeHeight+l*r.shapePadding,d=t.lgg.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(t.boxPadding,",").concat(f,")"));t.appendNoDataLegend(d,t.noDataText,a,o)}}(n,r,i),function(e,n,i){var r,a,o=e.map._coxTimes||[],s=40;if(!o.length)return;var l=i,c=n;e._sizeLegendContainer&&(l+=e._sizeLegendContainer.node().getBBox().height);e._colorLegendContainer&&(l+=e._colorLegendContainer.node().getBBox().height,l+=e.colorLegend.marginTop||0);l+=(null===(r=e.monthLegend)||void 0===r?void 0:r.marginTop)||0,l+=s;var u=18,h=2*Math.PI/o.length,f=(null===(a=e._colorLegendContainer)||void 0===a||null===(a=a.node())||void 0===a?void 0:a.getBBox().width)||0,d=c+f/2+u,p=e.lgg.append("g").attr("class","em-coxcomb-month-legend").attr("transform","translate(".concat(d,", ").concat(l+s,")")),g=Ur().innerRadius(0).outerRadius(s).startAngle((function(t,e){return e*h})).endAngle((function(t,e){return(e+1)*h}));p.selectAll("path").data(o).join("path").attr("d",(function(t,e){return g(t,e)})).attr("fill","#ccc").attr("class","em-legend-month-segment");var _=s+u,m=t._coxTimeLabels?t._coxTimeLabels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];p.selectAll("text.month-label").data(o).join("text").attr("class","em-legend-label em-month-label").attr("x",(function(t,e){return Math.sin(e*h+h/2)*_})).attr("y",(function(t,e){return-Math.cos(e*h+h/2)*_})).attr("text-anchor","middle").attr("alignment-baseline","middle").text((function(t,e){return m[e]||t})),p.selectAll("path").on("mouseover",(function(t,n){var i=n;(e.map.svg_||e.map.svg()).selectAll(".em-coxcomb-chart path").style("opacity",(function(t){return t.data.month===i?1:0})),Ot(this).style("stroke-width",1.5).style("opacity",.8)})).on("mouseout",(function(){(e.map.svg_||e.map.svg()).selectAll(".em-coxcomb-chart path").style("opacity",1),Ot(this).style("stroke-width",.3).style("opacity",.4)}))}(n,r,i),n.setBoxDimension()},n},Vx=function(t){var e=hy(t,!0,"coxcomb");function n(t){if(!e.statCodes_){e.statCodes_=Object.keys(e.statData_);var n=e.statCodes_.indexOf("default");n>-1&&e.statCodes_.splice(n,1)}var i,r,a,o,s,l;!function(){var t={},n={};e.totalCode_?e._coxTimes.forEach((function(i){var r=e.statData("".concat(i,":").concat(e.totalCode_));if(r&&r._data_)for(var a in r._data_){var o,s=(null===(o=r._data_[a])||void 0===o?void 0:o.value)||0;n[a]=n[a]||{},n[a][i]=s,t[a]=(t[a]||0)+s}})):e._coxTimes.forEach((function(i){var r={};for(var a in e._coxCategoryCodes.forEach((function(t){var n=e.statData("".concat(i,":").concat(t));if(n&&n._data_)for(var a in n._data_){var o,s=(null===(o=n._data_[a])||void 0===o?void 0:o.value)||0;r[a]=(r[a]||0)+s}})),r)n[a]=n[a]||{},n[a][i]=r[a],t[a]=(t[a]||0)+r[a]}));e.yearlyTotals=t,e.monthlyTotals=n}(),i=Object.values(e.yearlyTotals),r=e.coxcombMinRadius_||0,a=e.coxcombMaxRadius_||80,o=Bt(i)||0,s=Rt(i)||0,l=jx().domain([o,s]).range([r,a]),e.classifierChartSize_=function(t,n){var i=l(e.yearlyTotals[n]||0),r=t/Math.max.apply(Math,x(Object.values(e.monthlyTotals[n]||{0:1})));return Math.sqrt(r)*i},e.classifierSize_=l}function i(t){var n=e.yearlyTotals;return void 0!==n[t]?n[t]:void 0}function r(t){if(e.catLabels_=e.catLabels_||{},e.svg_){var n=t.getCentroidsGroup(t);if(n){var r=n.selectAll("g.em-centroid"),a=r.data().filter((function(t){return void 0!==i(t.properties.id)}));a.forEach((function(t){r.filter((function(e){return e.properties.id===t.properties.id})).append("g").attr("class","em-coxcomb").attr("id","cox_"+t.properties.id)})),function(t){var n=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)},r=ba(t),a=t.svg().selectAll(r),o=t.svg().selectAll("g.em-centroid");[a,o].forEach((function(t){t.on("mouseover",(function(t,r){if(!n(r.properties.id)&&i(r.properties.id)){var a=Ot(this);a.attr("fill___",a.style("fill")),a.style("fill",e.hoverColor_),a.select("circle.em-coxcomb-max-outline").attr("stroke-width",2),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))}})).on("mousemove",(function(t,r){n(r.properties.id)||i(r.properties.id)&&e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mouseout",(function(t,r){if(!n(r.properties.id)&&i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")||e.noDataFillStyle_),a.attr("fill___",null),a.select("circle.em-coxcomb-max-outline").attr("stroke-width",.3),e._tooltip&&e._tooltip.mouseout()}})).on("click",(function(t,r){n(r.properties.id)||i(r.properties.id)&&e._tooltip&&e._tooltip.click(r,e)}))}))}(t),function(t,n){var i=e._coxTimes,r=e._coxCategoryCodes,a=function(t){return bm().domain(t).range([0,2*Math.PI]).align(0)}(i);t.forEach((function(t){var o=t.properties.id,s=function(t,n,i){var r=n.map((function(n){var r={month:n},a=0;if(i.forEach((function(i){var o,s=null===(o=e.statData("".concat(n,":").concat(i)))||void 0===o?void 0:o.get(t),l=(null==s?void 0:s.value)||0;r[i]=l,a+=l})),e.totalCode_){var o,s=null===(o=e.statData("".concat(n,":").concat(e.totalCode_)))||void 0===o?void 0:o.get(t),l=(null==s?void 0:s.value)||0,c=l>a?l-a:0;c>0&&(r.other=c)}return Object.values(r).some((function(t){return t&&t>0}))?r:null})).filter(Boolean);if(!r.some((function(t){return(t.other||0)>0}))){var a,o;r.forEach((function(t){return delete t.other})),null===(a=e.catColors_)||void 0===a||delete a.other,null===(o=e.catLabels_)||void 0===o||delete o.other}return r}(o,i,r);if(s.length){var l=function(t,e){var n=x(e);t.some((function(t){return(t.other||0)>0}))&&n.push("other");return n}(s,r),c=function(){var t=vr([]),e=qx,n=Bx,i=Wx;function r(r){var a,o,s=Array.from(t.apply(this,arguments),Ux),l=s.length,c=-1;for(const t of r)for(a=0,++c;a<l;++a)(s[a][c]=[0,+i(t,s[a].key,c,r)]).data=t;for(a=0,o=Ny(e(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:vr(Array.from(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:vr(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?qx:"function"==typeof t?t:vr(Array.from(t)),r):e},r.offset=function(t){return arguments.length?(n=null==t?Bx:t,r):n},r}().keys(l);!function(t,n,i,r,a){var o=a.svg().selectAll("#cox_"+t);if(e.coxcombRings_){var s=e.yearlyTotals[t]||0,l=e.classifierSize_(s);o.append("circle").attr("class","em-coxcomb-max-outline").attr("r",0).attr("fill","none").attr("stroke","#000").attr("stroke-width",.3).attr("opacity",.5).attr("pointer-events","none").transition().duration(e.transitionDuration_/2).attr("r",l)}var c=Ur().startAngle((function(t){return r(t.data.month)})).endAngle((function(t){return r(t.data.month)+r.bandwidth()})).padAngle(.01).padRadius(0);i.forEach((function(r){o.append("g").attr("class","em-coxcomb-chart").attr("stroke","#ffffff").attr("stroke-width",.3).selectAll("path").data(n[i.indexOf(r)]).join("path").attr("fill",e.catColors_[r]||("other"===r?"#FFCC80":"lightgray")).attr("fill___",e.catColors_[r]||("other"===r?"#FFCC80":"lightgray")).attr("code",r).attr("month",(function(t){return t.data.month})).transition().delay((function(t,e){return 120*e})).duration(e.transitionDuration_).attrTween("d",(function(n){var i=rn(0,e.classifierChartSize_(n[0],t)),r=rn(0,e.classifierChartSize_(n[1],t));return function(t){return c.innerRadius(i(t)).outerRadius(r(t))(n)}}))}))}(o,c(s),l,a,n)}}))}(a,t),e.dorling_?Uv(e,(function(t){var n=i(t.properties.id)||0;return e.classifierSize_(n)||0})):stopDorlingSimulation(e)}}}return e.coxcombMinRadius_=10,e.coxcombMaxRadius_=80,e.coxcombStrokeFill_="white",e.coxcombStrokeWidth_=.3,e.coxcombRings_=!0,e.catColors_=void 0,e.catLabels_=void 0,e.classifierSize_=null,["catColors_","catLabels_","noDataFillStyle_","coxcombMaxRadius_","coxcombMinRadius_","coxcombRings_","coxcombStrokeFill_","coxcombStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","noDataFillStyle","coxcombMaxRadius","coxcombMinRadius","coxcombInnerRadius","coxcombStrokeFill","coxcombStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statCodes_=void 0,e.totalCode_=void 0,e.statCoxcomb=function(t){return e._coxTimes=t.times,e._coxCategoryCodes=x(t.categoryCodes),e._coxTimeLabels=t.timeLabels,t.filters=t.filters||{},t.times.forEach((function(n){if(t.categoryCodes.forEach((function(i){t.stat.filters[t.timeParameter]=n,t.stat.filters[t.categoryParameter]=i;var r={};for(var a in t.stat)r[a]=t.stat[a];for(var o in r.filters={},t.stat.filters)r.filters[o]=t.stat.filters[o];var s="".concat(n,":").concat(i);e.stat(s,r),t.categoryColors&&(e.catColors_=e.catColors_||{},e.catColors_[i]=t.categoryColors[t.categoryCodes.indexOf(i)]),t.categoryLabels&&(e.catLabels_=e.catLabels_||{},e.catLabels_[i]=t.categoryLabels[t.categoryCodes.indexOf(i)])})),t.totalCode){t.stat.filters[t.timeParameter]=n,t.stat.filters[t.categoryParameter]=t.totalCode;var i={};for(var r in t.stat)i[r]=t.stat[r];for(var a in i.filters={},t.stat.filters)i.filters[a]=t.stat.filters[a];var o="".concat(n,":").concat(t.totalCode);e.stat(o,i)}})),t.totalCode&&(e.totalCode_=t.totalCode,e.catColors_.other="#FFCC80",e.catLabels_.other="Other"),e},e.updateClassification=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(),e},e.updateStyle=function(){if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=Yy[t%10]}try{return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,r),r(e),e.dorling_?Uv(e,(function(t){var n=i(t.properties.id)||0;return e.classifierSize_(n)||0})):stopDorlingSimulation(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}return e},e.getLegendConstructor=function(){return Hx},e.tooltip_.textFunction=function(t,n){var i,r=t.properties.na||t.properties.name,a=t.properties.id,o=e._coxTimes||[],s=x(e._coxCategoryCodes),l=o.some((function(t){var n,i=(null===(n=e.statData("".concat(t,":").concat(e.totalCode_)))||void 0===n||null===(n=n.get(a))||void 0===n?void 0:n.value)||0,r=e._coxCategoryCodes.reduce((function(n,i){var r;return n+((null===(r=e.statData("".concat(t,":").concat(i)))||void 0===r||null===(r=r.get(a))||void 0===r?void 0:r.value)||0)}),0);return i>r}));l&&s.push("other");var c='<div class="em-tooltip-bar">'.concat(r).concat(a?" (".concat(a,")"):"","</div>"),u=['<th class="em-breakdown-label">Month</th>'];s.forEach((function(t){var n=e.catLabels_[t]||t,i=e.catColors_[t]||("other"===t?"#FFCC80":"#999");u.push('<th class="em-breakdown-label" style="color:'.concat(i,'">').concat(n,"</th>"))})),u.push('<th class="em-breakdown-label">Total</th>');var h="<tr>".concat(u.join(""),"</tr>"),f=e.yearlyTotals||{},d=e.monthlyTotals||{},p=f[a]||0,g=o.map((function(t,n){var i,r=['<td class="em-breakdown-label">'.concat(e._coxTimeLabels?e._coxTimeLabels[n]:t,"</td>")],o=(null===(i=d[a])||void 0===i?void 0:i[t])||0;return s.forEach((function(n){var i=0;if("other"===n){var o,l=(null===(o=e.statData("".concat(t,":").concat(e.totalCode_)))||void 0===o||null===(o=o.get(a))||void 0===o?void 0:o.value)||0,c=s.filter((function(t){return"other"!==t})).reduce((function(n,i){var r;return n+((null===(r=e.statData("".concat(t,":").concat(i)))||void 0===r||null===(r=r.get(a))||void 0===r?void 0:r.value)||0)}),0);i=Math.max(l-c,0)}else{var u;i=(null===(u=e.statData("".concat(t,":").concat(n)))||void 0===u||null===(u=u.get(a))||void 0===u?void 0:u.value)||0}r.push(i>0?'<td><span class="em-breakdown-value">'.concat(_a(i),"</span></td>"):"<td></td>")})),r.push(o>0?'<td><span class="em-breakdown-value">'.concat(_a(o),"</span></td>"):"<td></td>"),"<tr>".concat(r.join(""),"</tr>")})),_=(null===(i=e.statData(e.statCodes_[0]))||void 0===i?void 0:i.unitText())||"";return c+='<div class="em-tooltip-breakdown em-tooltip-cx"><table class="em-tooltip-cx-table">',c+=h+g.join(""),p>0&&(c+='\n <tr class="em-total">\n <td class="em-breakdown-label">Year total</td>\n <td colspan="'.concat(s.length,'"></td>\n <td>\n <span class="em-breakdown-value">').concat(_a(p)," ").concat(_,"</span>\n </td>\n </tr>")),c+="</table></div>"},e};var $x=function(t,e){try{return"choropleth"==t||"ch"==t?Ey(e):"categorical"==t||"ct"==t?function(t){var e=hy(t,!1,"ct");e.classToFillStyle_=void 0,e.classToText_=void 0,e.tooltip_.textFunction=Fy,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){var n=e.statData().getUniqueValues(),i=x(Array(n.length).keys()),r=e.classToFillStyle_?e.classToFillStyle():void 0;if(r){var a=Object.keys(r);e.classifier(xm().domain(a).range(a.map((function(t,e){return e}))))}else e.classifier(xm().domain(n).range(i));var o=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var i=n.value;if(":"===i)return"nd";var r=isNaN(i)?i:+i;if(e.classifier().domain().includes(r))return e.classifier()(r)}}))},s=ba(t);o(t.svg().selectAll(s)),"mixed"===t.nutsLevel_&&o(t.svg().selectAll("path.em-nutsrg0"))};function i(t){if(t.svg_){var n=ba(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",a).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),o(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",xa(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&r(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&wv(t,e.patternFill_)}}e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=Ay[r%12];e.classToFillStyle(t)}return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(ba(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=Ot(this),n=e.attr("ecl"),i=e.attr("lvl");return n||"0"===i?"block":"none"}})).style("stroke",(function(){var t=Ot(this),e=t.attr("lvl"),n=t.attr("ecl"),i=t.style("stroke");return n&&"0"!==e?i||"#777":null})).style("stroke-width",(function(){var t=Ot(this),e=t.attr("lvl"),n=t.attr("ecl"),i=t.style("stroke-width");return n&&"0"!==e?i||.2:null}))},a=function(t){var n=Ot(this).attr("ecl");return e.Geometries.userGeometries?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:da("em-nutsrg","fill"):"WORLD"===e.geo_?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]||e.cntrgFillStyle_:e.cntrgFillStyle_:(t.properties.id.slice(0,2),n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:da("em-nutsrg","fill"))},o=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return Py},e}(e):"proportionalSymbol"==t||"proportionalSymbols"==t||"ps"==t?$v(e):"bivariateChoropleth"==t||"chbi"==t?function(t){var e=hy(t,!1,"chbi");function n(t){var n=function(t){t.attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier1_(+i)}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier2_(+i)}})).attr("nd",(function(t){var n=e.statData("v1").get(t.properties.id),i=e.statData("v2").get(t.properties.id);if(n||i){var r=null==n?void 0:n.value;return 0!=r&&!r||":"==r||0!=(r=null==i?void 0:i.value)&&!r||":"==r?"nd":void 0}}))};if(function(){var t=e.statData("v1").getArray(),n=e.statData("v2").getArray(),i=x(Array(e.numberOfClasses()).keys());if(e.classifier1_||(e.breaks1_?e.classifier1(zn().domain(e.breaks1_).range(i)):e.classifier1(te().domain(t).range(i))),e.classifier2_||(e.breaks2_?e.classifier2(zn().domain(e.breaks2_).range(i)):e.classifier2(te().domain(n).range(i))),!e.classToFillStyle_){var r=jy(e.numberOfClasses(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(r)}}(),t.svg_){var i=ba(t);n(t.svg().selectAll(i)),"mixed"===t.nutsLevel_&&n(t.svg().selectAll("path.em-nutsrg0"))}}function i(t){if(t.svg()){var n=ba(t),i=t.svg().selectAll(n);i.style("pointer-events","none").transition().duration(e.transitionDuration()).style("fill",(function(t){if(Ot(this).attr("nd"))return e.noDataFillStyle()||"gray";var n=Ot(this).attr("ecl1"),i=Ot(this).attr("ecl2");return n||i?"nd"===i?e.noDataFillStyle()||"gray":e.classToFillStyle_(+n,+i):da("em-nutsrg","fill")})).end().then((function(){i.style("pointer-events",null),i.each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))})),a(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ot(this.parentNode).style("fill");Ot(this).attr("fill",xa(t))}))}),(function(t){})),"mixed"==e.nutsLevel_&&r(t)}}e.numberOfClasses_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.classifier1_=void 0,e.classifier2_=void 0,e.breaks1_=void 0,e.breaks2_=void 0,e.tooltip_.textFunction=By,["numberOfClasses_","breaks1_","breaks2_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["numberOfClasses","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(e),e},e.updateStyle=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(ba(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ot(this),e=t.attr("ecl1"),n=t.attr("ecl2"),i=t.attr("lvl"),r=e||n||"0"===i;if(t.style("display",r?"block":"none"),(e||n)&&"0"!==i){var a=t.style("stroke")||"#777",o=t.style("stroke-width")||.2;t.style("stroke",a).style("stroke-width",o)}}}))},a=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){var a;i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),null===(a=e._tooltip)||void 0===a||a.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){var a;i(r.properties.id)||(null===(a=e._tooltip)||void 0===a||a.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a,o=Ot(this),s=o.attr("fill___");s&&(o.style("fill",s),null===(a=e._tooltip)||void 0===a||a.mouseout()),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return Ry},e}(e):"trivariateChoropleth"==t||"chbi"==t?function(t){var e=hy(t,!1,"chtri");function n(t){if(t.svg_){var n=ba(t);t.svg().selectAll(n).each((function(n){var i,r,a,o=+(null===(i=t.statData("v1").get(n.properties.id))||void 0===i?void 0:i.value)||0,s=+(null===(r=t.statData("v2").get(n.properties.id))||void 0===r?void 0:r.value)||0,l=+(null===(a=t.statData("v3").get(n.properties.id))||void 0===a?void 0:a.value)||0,c={value1:o,value2:s,value3:l};if(o+s+l){var u=e.colorClassifier_(c);Ot(this).attr("regionClass","tri").style("fill",u)}else Ot(this).attr("regionClass","nd").style("fill",e.noDataFillStyle())}))}}function i(t){if(t.svg()){var n=ba(t);t.svg().selectAll(n).transition().duration(e.transitionDuration()).style("fill",(function(n){var i,r,a,o=+(null===(i=t.statData("v1").get(n.properties.id))||void 0===i?void 0:i.value)||0,s=+(null===(r=t.statData("v2").get(n.properties.id))||void 0===r?void 0:r.value)||0,l=+(null===(a=t.statData("v3").get(n.properties.id))||void 0===a?void 0:a.value)||0,c={value1:o,value2:s,value3:l};return o+s+l?e.colorClassifier_(c):e.noDataFillStyle()})).end().then((function(){t.svg().selectAll(n).each((function(){var t=Ot(this);t.attr("fill___",t.style("fill"))}))}))}}e.color1_=(null==t?void 0:t.color1)||"#e41a1c",e.color2_=(null==t?void 0:t.color2)||"#4daf4a",e.color3_=(null==t?void 0:t.color3)||"#377eb8",e.startColor_=(null==t?void 0:t.startColor)||"#e8e8e8",e.centerCoefficient_=(null==t?void 0:t.centerCoefficient)||.2,e.noDataFillStyle_=(null==t?void 0:t.noDataFillStyle)||"#ccc",e.colorClassifier_=null,e.tooltip_.textFunction=Uy,["color1_","color2_","color3_","centerCoefficient_","noDataFillStyle_","colorClassifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.updateClassification=function(){return e.statData("v1")&&e.statData("v2")&&e.statData("v3")?(e.colorClassifier_=Wy(["value1","value2","value3"],(function(t){return(+t.value1||0)+(+t.value2||0)+(+t.value3||0)}),[e.color1(),e.color2(),e.color3()],{centerCoefficient:e.centerCoefficient(),withMixedClasses:!0,defaultColor:e.noDataFillStyle()}),e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,n),n(e),e):e},e.updateStyle=function(){return e.insetTemplates_&&va(e.insetTemplates_,e.svgId_,i),i(e),r(e,e.svg().selectAll(ba(e))),e};var r=function(t,n){var i=function(e){var n;return null===(n=t.tooltip_.omitRegions)||void 0===n?void 0:n.includes(e)};n.on("mouseover",(function(n,r){i(r.properties.id)||(Ot(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)),e.onRegionMouseOver_&&e.onRegionMouseOver_(n,r,this,t))})).on("mousemove",(function(n,r){i(r.properties.id)||(e._tooltip&&e._tooltip.mousemove(n),e.onRegionMouseMove_&&e.onRegionMouseMove_(n,r,this,t))})).on("mouseout",(function(n,r){if(!i(r.properties.id)){var a=Ot(this);a.style("fill",a.attr("fill___")),e._tooltip&&e._tooltip.mouseout(),e.onRegionMouseOut_&&e.onRegionMouseOut_(n,r,this,t)}}))};return e.getLegendConstructor=function(){return qy},e}(e):"stripeComposition"==t||"scomp"==t?function(t){var e=hy(t,!1,"scomp");e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,i,r,a,o){t.filters=t.filters||{};for(var s=0;s<r.length;s++){var l=r[s];t.filters[i]=l;var c={};for(var u in t)c[u]=t[u];for(var h in c.filters={},t.filters)c.filters[h]=t.filters[h];e.stat(l,c),o&&(e.catColors_=e.catColors_||{},e.catColors_[l]=o[s]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=a[s])}return n=r,e};var n=void 0,i=function(t){for(var i={},r=0,a=0;a<n.length;a++){var o=n[a],s=e.statData(o).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[o]=s.value,r+=s.value}if(0!=r){for(var l=0;l<n.length;l++)i[n[l]]/=r;return i}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=Yy[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll(ba(e)).style("fill",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var n=t.properties.id,r=i(n);if(!r)return e.noDataFillStyle()||"gray";var a=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&a.attr("patternTransform","rotate("+e.stripeOrientation()+")"),a.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var o=0;for(var s in r){var l=r[s];if(l){l*=e.stripeWidth();var c=e.catColors()[s]||"lightgray";a.append("rect").attr("x",o).attr("y",0).attr("height",1).style("stroke","none").attr("code",s).style("fill",c).style("pointer-events","none").transition().duration(e.transitionDuration()).on("end",(function(){Ot(this).style("pointer-events",null)})).attr("width",l),o+=l}}return"url(#pattern_"+n+")"}})).attr("nd",(function(t){return i(t.properties.id)?"":"nd"}));var r=ba(e);return e.svg().selectAll(r).on("mouseover",(function(t,n){var i=Ot(this);i.attr("fill___",i.style("fill")),i.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ot(this);t.style("fill"),t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return Jy},e.tooltip_.textFunction=function(t,n){var r=t.properties.na||t.properties.name,a=t.properties.id,o=i(a),s=[];for(var l in o)s.push({code:l,value:o[l]});var c="";if(c+='<div class="em-tooltip-bar">\n <b>'.concat(r,"</b>").concat(a?" (".concat(a,")"):"","\n </div>"),!s||0===s.length)return c+"<div>".concat(e.noDataText(),"</div>");var u,h=e.pieChartRadius(),f=e.pieChartInnerRadius(),d=$y().sort(null).value((function(t){return t.value})),p=Ur().innerRadius(f).outerRadius(h),g="",_=Xy(d(s));try{for(_.s();!(u=_.n()).done;){var m=u.value,v=e.catColors()[m.data.code]||"lightgray",y=p(m);g+='<path d="'.concat(y,'" fill="').concat(v,'" stroke="darkgray"></path>')}}catch(t){_.e(t)}finally{_.f()}return c+'\n <div style="display: flex; justify-content: center;">\n <svg viewBox="'.concat(-h," ").concat(-h," ").concat(2*h," ").concat(2*h,'" width="').concat(2*h,'">\n <g>').concat(g,"</g>\n </svg>\n </div>\n ")},e}(e):"pieChart"==t||"pie"==t?ex(e):"sparkline"==t||"spark"==t||"sparklines"==t?rx(e):"flow"==t||"flowmap"==t?Gx(e):"coxcomb"==t||"polar"==t?Vx(e):"alpha"==t||"valueByAlpha"==t?function(t){var e=Ey(t);e.alphaData_=null,e.opacityScale_=null,e.opacityScale=function(t){return arguments.length?(e.opacityScale_=t,e):e.opacityScale_};var n=e.updateStatValues;e.updateStatValues=function(){var t=e.statData("alpha");if(!t||!t.isReady())return e.alphaData_=null,e;e.alphaData_=t;var i=t.getArray().filter((function(t){return null!=t&&":"!==t&&!isNaN(+t)}));if(!e.opacityScale_){var r=Bt(i),a=Rt(i);e.opacityScale_=i.length>0?Nn().domain([r,a]).range([.1,1]):null}return n.call(e),e.updateStyle()};var i=e.updateStyle;return e.updateStyle=function(){if(!e.svg_||!e.opacityScale_)return e;e.svg_.classed("em--alpha",!0);var t=e.statData();if(!t||!t.isReady())return e;var n=e.statData("alpha");if(!n||!n.isReady())return e;var r=ba(e);return e.svg().selectAll(r).each((function(i){var r,a,o=Ot(this),s=null===(r=t.get(i.properties.id))||void 0===r?void 0:r.value,l=null===(a=n.get(i.properties.id))||void 0===a?void 0:a.value;if(null!=s&&":"!==s)if("nd"!==l&&null!=l)o.style("opacity",e.opacityScale_(+l));else{var c=e.noDataFillStyle_||"gray";o.attr("ecl","nd").attr("force-grey","1").style("fill",c).attr("fill","grey").attr("fill___",c).style("opacity",1)}})),i.call(e),e},e.getLegendConstructor=function(){return Vm},e.tooltip_.textFunction=function(t,e){var n,i,r=[],a=t.properties.na||t.properties.name,o=t.properties.id;r.push('<div class="em-tooltip-bar"><b>'.concat(a,"</b>").concat(o?" (".concat(o,")"):"","</div>"));var s=e.statData(),l=e.alphaData_||e.statData("alpha"),c=s.get(o),u=null==l?void 0:l.get(o),h=(null===(n=s.unitText)||void 0===n?void 0:n.call(s))||"",f=(null==l||null===(i=l.unitText)||void 0===i?void 0:i.call(l))||"",d=s.label_?s.label_+": ":"",p=null!=l&&l.label_?(null==l?void 0:l.label_)+": ":"";return!c||0!==c.value&&!c.value||":"===c.value?(r.push('\n <div class="em-tooltip-text no-data">\n <table class="em-tooltip-table">\n <tbody>\n <tr><td>'.concat(e.noDataText_,"</td></tr>\n </tbody>\n </table>\n </div>\n ")),r.join("")):(r.push('\n <div class="em-tooltip-text">\n <table class="em-tooltip-table">\n <tbody>\n <tr>\n <td>'.concat(d).concat(_a(c.value)," ").concat(h,"</td>\n </tr>\n <tr>\n <td>").concat(u&&":"!==u.value&&null!=u.value?"".concat(p).concat(_a(u.value)," ").concat(f):"".concat(p).concat(e.noDataText_),"</td>\n </tr>\n </tbody>\n </table>\n </div>\n")),r.join(""))},e}(e):(console.log("Unexpected map type: "+t),hy(e,!0,t))}catch(t){console.error("Error in eurostat-map.map: "+t.message),console.error(t)}},Yx=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,i=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(r,a){r.selectAll(".em-fill-pattern").remove();for(var o=0;o<a;o++){var s=n+(i-n)*o/(a-1),l=r.append("pattern").attr("class","em-fill-pattern").attr("id","pattern_"+o).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");l.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?l.append("rect").attr("x",0).attr("y",0).attr("width",s).attr("height",s).style("stroke","none").style("fill",t.symbColor):l.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*s).style("stroke","none").style("fill",t.symbColor)}}},Jx=function(){return Uh},Xx="4.3.16"})(),i})()));
|