eurostat-map 4.2.0 → 4.2.2

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.
@@ -1,2 +1,2 @@
1
- /*! /*! eurostat-map v4.2.0 | 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={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,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s],c=r.base?l[0]+r.base:l[0],u=o[c]||0,f="".concat(c," ").concat(u);o[c]=u+1;var h=n(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var d=i(p,r);r.byIndex=s,e.splice(s,0,{identifier:f,updater:d,references:1})}a.push(f)}return a}function i(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,i){var o=r(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=n(o[a]);e[s].references--}for(var l=r(t,i),c=0;c<o.length;c++){var u=n(o[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}o=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))}}},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);r&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},470:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.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}\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: black;\n font-weight: bold;\n}\n.em-flow-label-shadow {\n font-size: 13px;\n stroke-width: 4px;\n stroke: white;\n}\n",""]);const s=a},489:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.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: black;\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: 12px;\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 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: black;\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 pointer-events: all;\n cursor: default;\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: black;\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",""]);const s=a},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}},592:(t,e,n)=>{"use strict";n.d(e,{A:()=>g});var r=n(601),i=n.n(r),o=n(314),a=n.n(o),s=n(489),l=n(666),c=n(604),u=n(470),f=n(789),h=n(991),p=n(875),d=a()(i());d.i(s.A),d.i(l.A),d.i(c.A),d.i(u.A),d.i(f.A),d.i(h.A),d.i(p.A),d.push([t.id,"\n",""]);const g=d},601:t=>{"use strict";t.exports=function(t){return t[1]}},604:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.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: black;\n dominant-baseline: unset;\n}\n.em-legend-title {\n font-size: 16px;\n fill: black;\n}\n.em-legend-separator {\n stroke: white;\n stroke-width: 1;\n}\n.em-legend-tick {\n stroke: #d8d8d8;\n stroke-width: 1;\n}\n.em-bivariate-frame {\n fill: none;\n stroke: black;\n}\n.em-bivariate-nodata {\n stroke: black;\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: black;\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: black;\n}\n\n.em-legend-histogram-bar {\n cursor: pointer;\n}\n",""]);const s=a},633:(t,e,n)=>{var r=n(738).default;function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=i=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var i=e&&e.prototype instanceof x?e:x,o=Object.create(i.prototype),a=new O(r||[]);return s(o,"_invoke",{value:C(t,n,a)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var g="suspendedStart",v="suspendedYield",y="executing",_="completed",m={};function x(){}function b(){}function w(){}var S={};h(S,c,(function(){return this}));var k=Object.getPrototypeOf,T=k&&k(k(N([])));T&&T!==o&&a.call(T,c)&&(S=T);var F=w.prototype=x.prototype=Object.create(S);function E(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,o,s,l){var c=d(t[i],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,l)}))}l(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function C(t,n,r){var i=g;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===_){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===g)throw i=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?_:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=_,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(a.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(r(t)+" is not iterable")}return b.prototype=w,s(F,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:b,configurable:!0}),b.displayName=h(w,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,f,"GeneratorFunction")),t.prototype=Object.create(F),t},n.awrap=function(t){return{__await:t}},E(A.prototype),h(A.prototype,u,(function(){return this})),n.AsyncIterator=A,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new A(p(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(F),h(F,f,"Generator"),h(F,c,(function(){return this})),h(F,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=N,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(z),!t)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),z(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;z(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=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(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},666:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.push([t.id,".estat-vis-tooltip-text {\n background: #ffffff;\n color: #171a22;\n padding: 4px;\n font-size: 16px;\n}\n.estat-vis-tooltip-bar {\n background: #515560;\n color: #ffffff;\n padding: 6px;\n font-size: 16px;\n}\n.tooltip-eurostat {\n font-family: Arial;\n max-width: 250px;\n overflow: hidden;\n background: white;\n padding: 0px;\n border: 0px;\n border-radius: 0px;\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1), 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-piechart-breakdown {\n padding: 10px;\n font-size: 14px;\n}\n.em-tooltip-piechart-container {\n text-align: center;\n}\n",""]);const s=a},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 r=n(633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},789:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.push([t.id,".em-annotation-group {\n /* pointer-events: none; */\n}\n",""]);const s=a},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 r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},875:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.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=a},991:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(601),i=n.n(r),o=n(314),a=n.n(o)()(i());a.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.2;\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: #000;\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\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/* target non cc/eu/efta borders */\n/* .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0;\n} */\n",""]);const s=a}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},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.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{getDefaultLabels:()=>bv,getFillPatternDefinitionFunction:()=>xv,map:()=>mv,version:()=>wv});var t=n(72),e=n.n(t),i=n(825),o=n.n(i),a=n(659),s=n.n(a),l=n(56),c=n.n(l),u=n(540),f=n.n(u),h=n(113),p=n.n(h),d=n(592),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=o(),g.insertStyleElement=f();e()(d.A,g);d.A&&d.A.locals&&d.A.locals;function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function y(t,e){if(t){if("string"==typeof t)return v(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)?v(t,e):void 0}}function _(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(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 m(){}function x(t){return null==t?m:function(){return this.querySelector(t)}}function b(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function S(t){return null==t?w:function(){return this.querySelectorAll(t)}}function k(t){return function(){return this.matches(t)}}function T(t){return function(e){return e.matches(t)}}var F=Array.prototype.find;function E(){return this.firstElementChild}var A=Array.prototype.filter;function C(){return Array.from(this.children)}function M(t){return new Array(t.length)}function L(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function z(t,e,n,r,i,o){for(var a,s=0,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new L(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function O(t,e,n,r,i,o,a){var s,l,c,u=new Map,f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(l=e[s])&&(p[s]=c=a.call(l,l.__data__,s,e)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(t,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new L(t,o[s]);for(s=0;s<f;++s)(l=e[s])&&u.get(p[s])===l&&(i[s]=l)}function N(t){return t.__data__}function D(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function P(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}L.prototype={constructor:L,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 j="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:j,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function I(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function G(t){return function(){this.removeAttribute(t)}}function W(t){return function(){this.removeAttributeNS(t.space,t.local)}}function B(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function q(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 $(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function V(t){return function(){this.style.removeProperty(t)}}function Y(t,e,n){return function(){this.style.setProperty(t,e,n)}}function J(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function X(t,e){return t.style.getPropertyValue(e)||$(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function Z(t,e){return function(){this[t]=e}}function Q(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function rt(t,e){for(var n=et(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function it(t,e){for(var n=et(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ot(t){return function(){rt(this,t)}}function at(t){return function(){it(this,t)}}function st(t,e){return function(){(e.apply(this,arguments)?rt:it)(this,t)}}function lt(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function ut(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ft(){this.innerHTML=""}function ht(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function dt(){this.nextSibling&&this.parentNode.appendChild(this)}function gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===j&&e.documentElement.namespaceURI===j?e.createElement(t):e.createElementNS(n,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _t(t){var e=I(t);return(e.local?yt:vt)(e)}function mt(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function bt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function St(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function kt(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Tt(t,e,n){var r=$(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ft(t,e){return function(){return Tt(this,t,e)}}function Et(t,e){return function(){return Tt(this,t,e.apply(this,arguments))}}nt.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 At=[null];function Ct(t,e){this._groups=t,this._parents=e}function Mt(){return new Ct([[document.documentElement]],At)}Ct.prototype=Mt.prototype={constructor:Ct,select:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=t.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Ct(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return b(t.apply(this,arguments))}}(t):S(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new Ct(r,i)},selectChild:function(t){return this.select(null==t?E:function(t){return function(){return F.call(this.children,t)}}("function"==typeof t?t:T(t)))},selectChildren:function(t){return this.selectAll(null==t?C:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:T(t)))},filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new Ct(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,N);var n=e?O:z,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],f=i[c],h=f.length,p=D(t.call(u,u&&u.__data__,c,r)),d=p.length,g=s[c]=new Array(d),v=a[c]=new Array(d);n(u,f,g,v,l[c]=new Array(h),p,e);for(var y,_,m=0,x=0;m<d;++m)if(y=g[m]){for(m>=x&&(x=m+1);!(_=v[x])&&++x<d;);y._next=_||null}}return(a=new Ct(a,r))._enter=s,a._exit=l,a},enter:function(){return new Ct(this._enter||this._groups.map(M),this._parents)},exit:function(){return new Ct(this._exit||this._groups.map(M),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],f=r[l],h=u.length,p=s[l]=new Array(h),d=0;d<h;++d)(c=u[d]||f[d])&&(p[d]=c);for(;l<i;++l)s[l]=n[l];return new Ct(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=P);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(e)}return new Ct(i,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 r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}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,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=I(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?W:G:"function"==typeof e?n.local?q:U:n.local?H:B)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?V:"function"==typeof e?J:Y)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?Q:Z)(t,e)):this.node()[t]},classed:function(t,e){var n=tt(t+"");if(arguments.length<2){for(var r=et(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?st:e?ot:at)(n,e))},text:function(t){return arguments.length?this.each(null==t?lt:("function"==typeof t?ut:ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?pt:ht)(t)):this.node().innerHTML},raise:function(){return this.each(dt)},lower:function(){return this.each(gt)},append:function(t){var e="function"==typeof t?t:_t(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:_t(t),r=null==e?mt:"function"==typeof e?e:x(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?wt:bt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=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+""),a=o.length;if(!(arguments.length<2)){for(s=e?kt:St,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Et:Ft)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const Lt=Mt;function zt(t){return"string"==typeof t?new Ct([[document.querySelector(t)]],[document.documentElement]):new Ct([[t]],At)}function Ot(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 r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Nt(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 r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Dt(t){return null===t?NaN:+t}function Pt(t,e,n=Dt){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function jt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Rt(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function It(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=jt,n=(e,n)=>jt(t(e),n),r=(e,n)=>t(e)-n):(e=t===jt||t===Rt?t:Gt,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function Gt(){return 0}const Wt=It(jt),Bt=Wt.right,Ht=(Wt.left,It(Dt).center,Bt);function Ut(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function qt(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Pt(e,t/i);return o}function o(e){return null==e||isNaN(e=+e)?t:n[Ht(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.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(jt),i()},o.range=function(t){return arguments.length?(n=Array.from(t),i()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return qt().domain(e).range(n).unknown(t)},Ut.apply(o,arguments)}const $t=Math.sqrt(50),Vt=Math.sqrt(10),Yt=Math.sqrt(2);function Jt(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=$t?10:o>=Vt?5:o>=Yt?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=n&&n<2?Jt(t,e,2*n):[s,l,c]}function Xt(t,e,n){return Jt(t=+t,e=+e,n=+n)[2]}function Kt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Qt(){}var te=.7,ee=1/te,ne="\\s*([+-]?\\d+)\\s*",re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oe=/^#([0-9a-f]{3,8})$/,ae=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),se=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),le=new RegExp(`^rgba\\(${ne},${ne},${ne},${re}\\)$`),ce=new RegExp(`^rgba\\(${ie},${ie},${ie},${re}\\)$`),ue=new RegExp(`^hsl\\(${re},${ie},${ie}\\)$`),fe=new RegExp(`^hsla\\(${re},${ie},${ie},${re}\\)$`),he={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 pe(){return this.rgb().formatHex()}function de(){return this.rgb().formatRgb()}function ge(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ve(e):3===n?new xe(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=ae.exec(t))?new xe(e[1],e[2],e[3],1):(e=se.exec(t))?new xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=le.exec(t))?ye(e[1],e[2],e[3],e[4]):(e=ce.exec(t))?ye(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ue.exec(t))?Fe(e[1],e[2]/100,e[3]/100,1):(e=fe.exec(t))?Fe(e[1],e[2]/100,e[3]/100,e[4]):he.hasOwnProperty(t)?ve(he[t]):"transparent"===t?new xe(NaN,NaN,NaN,0):null}function ve(t){return new xe(t>>16&255,t>>8&255,255&t,1)}function ye(t,e,n,r){return r<=0&&(t=e=n=NaN),new xe(t,e,n,r)}function _e(t){return t instanceof Qt||(t=ge(t)),t?new xe((t=t.rgb()).r,t.g,t.b,t.opacity):new xe}function me(t,e,n,r){return 1===arguments.length?_e(t):new xe(t,e,n,null==r?1:r)}function xe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function be(){return`#${Te(this.r)}${Te(this.g)}${Te(this.b)}`}function we(){const t=Se(this.opacity);return`${1===t?"rgb(":"rgba("}${ke(this.r)}, ${ke(this.g)}, ${ke(this.b)}${1===t?")":`, ${t})`}`}function Se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Te(t){return((t=ke(t))<16?"0":"")+t.toString(16)}function Fe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function Ee(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof Qt||(t=ge(t)),!t)return new Ae;if(t instanceof Ae)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ae(a,s,l,t.opacity)}function Ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ce(t){return(t=(t||0)%360)<0?t+360:t}function Me(t){return Math.max(0,Math.min(1,t||0))}function Le(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 ze(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Kt(Qt,ge,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:pe,formatHex:pe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ee(this).formatHsl()},formatRgb:de,toString:de}),Kt(xe,me,Zt(Qt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xe(ke(this.r),ke(this.g),ke(this.b),Se(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:be,formatHex:be,formatHex8:function(){return`#${Te(this.r)}${Te(this.g)}${Te(this.b)}${Te(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:we,toString:we})),Kt(Ae,(function(t,e,n,r){return 1===arguments.length?Ee(t):new Ae(t,e,n,null==r?1:r)}),Zt(Qt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new Ae(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,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new xe(Le(t>=240?t-240:t+120,i,r),Le(t,i,r),Le(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(Ce(this.h),Me(this.s),Me(this.l),Se(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=Se(this.opacity);return`${1===t?"hsl(":"hsla("}${Ce(this.h)}, ${100*Me(this.s)}%, ${100*Me(this.l)}%${1===t?")":`, ${t})`}`}}));const Oe=t=>()=>t;function Ne(t,e){return function(n){return t+n*e}}function De(t){return 1==(t=+t)?Pe: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(r){return Math.pow(t+r*e,n)}}(e,n,t):Oe(isNaN(e)?n:e)}}function Pe(t,e){var n=e-t;return n?Ne(t,n):Oe(isNaN(t)?e:t)}const je=function t(e){var n=De(e);function r(t,e){var r=n((t=me(t)).r,(e=me(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Pe(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Re(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=me(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}var Ie=Re((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return ze((n-r/e)*e,a,i,o,s)}}));Re((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return ze((n-r/e)*e,i,o,a,s)}}));function Ge(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ye(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function We(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Be(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function He(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ye(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ue=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qe=new RegExp(Ue.source,"g");function $e(t,e){var n,r,i,o=Ue.lastIndex=qe.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=Ue.exec(t))&&(r=qe.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Be(n,r)})),o=qe.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),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,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Ve(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function Ye(t,e){var n,r=typeof e;return null==e||"boolean"===r?Oe(e):("number"===r?Be:"string"===r?(n=ge(e))?(e=n,je):$e:e instanceof ge?je:e instanceof Date?We:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Ve:Array.isArray(e)?Ge:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?He:Be)(t,e)}function Je(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Xe(t){return+t}var Ke=[0,1];function Ze(t){return t}function Qe(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function tn(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Qe(i,r),o=n(a,o)):(r=Qe(r,i),o=n(o,a)),function(t){return o(r(t))}}function en(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Qe(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Ht(t,e,1,r)-1;return o[n](i[n](e))}}function nn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rn(){var t,e,n,r,i,o,a=Ke,s=Ke,l=Ye,c=Ze;function u(){var t=Math.min(a.length,s.length);return c!==Ze&&(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))}}(a[0],a[t-1])),r=t>2?en:tn,i=o=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,l)))(t(c(e)))}return f.invert=function(n){return c(e((o||(o=r(s,a.map(t),Be)))(n)))},f.domain=function(t){return arguments.length?(a=Array.from(t,Xe),u()):a.slice()},f.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},f.rangeRound=function(t){return s=Array.from(t),l=Je,u()},f.clamp=function(t){return arguments.length?(c=!!t||Ze,u()):c!==Ze},f.interpolate=function(t){return arguments.length?(l=t,u()):l},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,u()}}var on,an=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sn(t){if(!(e=an.exec(t)))throw new Error("invalid format: "+t);var e;return new ln({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 ln(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 cn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function un(t){return(t=cn(Math.abs(t)))?t[1]:NaN}function fn(t,e){var n=cn(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}sn.prototype=ln.prototype,ln.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 hn={"%":(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)=>fn(100*t,e),r:fn,s:function(t,e){var n=cn(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(on=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+cn(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pn(t){return t}var dn,gn,vn,yn=Array.prototype.map,_n=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mn(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?pn:(e=yn.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?pn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yn.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 f(t){var e=(t=sn(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,v=t.precision,y=t.trim,_=t.type;"n"===_?(g=!0,_="g"):hn[_]||(void 0===v&&(v=12),y=!0,_="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",x="$"===h?o:/[%p]/.test(_)?l:"",b=hn[_],w=/[defgprs%]/.test(_);function S(t){var i,o,l,h=m,S=x;if("c"===_)S=b(t)+S,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:b(Math.abs(t),v),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==f&&(k=!1),h=(k?"("===f?f:c:"-"===f||"("===f?"":f)+h,S=("s"===_?_n[8+on/3]:"")+S+(k&&"("===f?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){S=(46===l?a+t.slice(i+1):t.slice(i))+S,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var T=h.length+t.length+S.length,F=T<d?new Array(d-T+1).join(e):"";switch(g&&p&&(t=r(F+t,F.length?d-S.length:1/0),F=""),n){case"<":t=h+t+S+F;break;case"=":t=h+F+t+S;break;case"^":t=F.slice(0,T=F.length>>1)+h+t+S+F.slice(T);break;default:t=F+h+t+S}return s(t)}return v=void 0===v?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),S.toString=function(){return t+""},S}return{format:f,formatPrefix:function(t,e){var n=f(((t=sn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(un(e)/3))),i=Math.pow(10,-r),o=_n[8+r/3];return function(t){return n(i*t)+o}}}}function xn(t){return dn=mn(t),gn=dn.format,vn=dn.formatPrefix,dn}function bn(t,e,n,r){var i,o=function(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?Xt(e,t,n):Xt(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}(t,e,n);switch((r=sn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(un(e)/3)))-un(Math.abs(t)))}(o,a))||(r.precision=i),vn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,un(e)-un(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-un(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return gn(r)}function wn(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 r=e<t,[i,o,a]=r?Jt(e,t,n):Jt(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let t=0;t<s;++t)l[t]=(o-t)/-a;else for(let t=0;t<s;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=(i+t)/-a;else for(let t=0;t<s;++t)l[t]=(i+t)*a;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return bn(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=Xt(l,c,n))===r)return o[a]=l,o[s]=c,e(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function Sn(){var t=rn()(Ze,Ze);return t.copy=function(){return nn(t,Sn())},Ut.apply(t,arguments),wn(t)}function kn(){var t,e=0,n=1,r=1,i=[.5],o=[0,1];function a(e){return null!=e&&e<=e?o[Ht(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return a}return a.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},a.range=function(t){return arguments.length?(r=(o=Array.from(t)).length-1,s()):o.slice()},a.invertExtent=function(t){var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return kn().domain([e,n]).range(o).unknown(t)},Ut.apply(wn(a),arguments)}function Tn(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[Ht(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Tn().domain(e).range(n).unknown(t)},Ut.apply(i,arguments)}function Fn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}xn({thousands:",",grouping:[3],currency:["$",""]});const En=t=>Ie(t[t.length-1]);const An=En(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Fn));const Cn=Math.PI/180,Mn=180/Math.PI,Ln=.96422,zn=.82521,On=4/29,Nn=6/29,Dn=3*Nn*Nn,Pn=Nn*Nn*Nn;function jn(t){if(t instanceof In)return new In(t.l,t.a,t.b,t.opacity);if(t instanceof qn)return $n(t);t instanceof xe||(t=_e(t));var e,n,r=Hn(t.r),i=Hn(t.g),o=Hn(t.b),a=Gn((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=Gn((.4360747*r+.3850649*i+.1430804*o)/Ln),n=Gn((.0139322*r+.0971045*i+.7141733*o)/zn)),new In(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Rn(t,e,n,r){return 1===arguments.length?jn(t):new In(t,e,n,null==r?1:r)}function In(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Gn(t){return t>Pn?Math.pow(t,1/3):t/Dn+On}function Wn(t){return t>Nn?t*t*t:Dn*(t-On)}function Bn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Hn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Un(t){if(t instanceof qn)return new qn(t.h,t.c,t.l,t.opacity);if(t instanceof In||(t=jn(t)),0===t.a&&0===t.b)return new qn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Mn;return new qn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function qn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function $n(t){if(isNaN(t.h))return new In(t.l,0,0,t.opacity);var e=t.h*Cn;return new In(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Vn(t,e){var n=Pe((t=Rn(t)).l,(e=Rn(e)).l),r=Pe(t.a,e.a),i=Pe(t.b,e.b),o=Pe(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function Yn(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 r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||y(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 Jn(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 Xn(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)?Xn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Kn(t,e,n){if(!t.startsWith(".")&&!t.startsWith("#"))throw new Error('Invalid selector: Must start with "." for classes or "#" for IDs.');for(var r=0,i=Array.from(document.styleSheets);r<i.length;r++){var o=i[r];try{var a,s=Jn(o.cssRules||o.rules);try{for(s.s();!(a=s.n()).done;){var l=a.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(r){console.error("Failed to insert rule: ".concat(t," { ").concat(e,": ").concat(n,"; }"),r)}}Kt(In,Rn,Zt(Qt,{brighter(t){return new In(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new In(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 xe(Bn(3.1338561*(e=Ln*Wn(e))-1.6168667*(t=1*Wn(t))-.4906146*(n=zn*Wn(n))),Bn(-.9787684*e+1.9161415*t+.033454*n),Bn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Kt(qn,(function(t,e,n,r){return 1===arguments.length?Un(t):new qn(t,e,n,null==r?1:r)}),Zt(Qt,{brighter(t){return new qn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new qn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return $n(this).rgb()}}));var Zn=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},Qn=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.width="auto",n.style.lineHeight="normal",document.body.appendChild(n);var r=window.getComputedStyle(n).getPropertyValue(e);return document.body.removeChild(n),r||null};function tr(t){var e=[],n=function(){var t,e=[],n=Jn(document.styleSheets);try{for(n.s();!(t=n.n()).done;){var r=t.value;try{var i,o=Jn(r.cssRules);try{for(o.s();!(i=o.n()).done;){var a=i.value;e.push(a)}}catch(t){o.e(t)}finally{o.f()}}catch(t){console.warn("Unable to access stylesheet:",r.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 r={};return e.forEach((function(t){for(var e=0;e<t.length;e++){var n=t[e];r[n]=t.getPropertyValue(n)}})),r}var er=function(t){t.querySelectorAll("*").forEach((function(t){var e=tr(t);Object.keys(e).forEach((function(n){var r=e[n];!t.style.getPropertyValue(n)&&r&&t.style.setProperty(n,r)}))}))},nr=function(t){return t.toLocaleString("en").replace(/,/gi," ")},rr=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;for(var o in t){var a=t[o];Array.isArray(a)?a.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.svgId_!==e&&n(t,r,i)})):t.svgId_!==e&&n(t,r,i)})):a.svgId_!==e&&n(a,r,i)}};function ir(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}var or=function(t){for(var e=t.map((function(t){3===(t=t.replace("#","")).length&&(t=t.split("").map((function(t){return t+t})).join(""));var e=parseInt(t,16);return[e>>16&255,e>>8&255,255&e]})),n=_(e[0]),r=function(t){n=n.map((function(n,r){return Math.round(n/255*(e[t][r]/255)*255)}))},i=1;i<e.length;i++)r(i);return function(t){var e=Yn(t,3),n=e[0],r=e[1],i=e[2];return"#".concat([n,r,i].map((function(t){return t.toString(16).padStart(2,"0")})).join(""))}(n)},ar=function(t){var e,n,r;if(!t.startsWith("rgb")&&!t.startsWith("#")){var i=document.createElement("div");i.style.color=t,document.body.appendChild(i);var o=window.getComputedStyle(i).color;document.body.removeChild(i),t=o}if(t.startsWith("#")){var a=t.replace("#","");3===a.length&&(a=a.split("").map((function(t){return t+t})).join("")),e=parseInt(a.substring(0,2),16),n=parseInt(a.substring(2,4),16),r=parseInt(a.substring(4,6),16)}else{var s=t.match(/\d+/g);e=parseInt(s[0]),n=parseInt(s[1]),r=parseInt(s[2])}return e/255*.2126+n/255*.7152+r/255*.0722>.5?"black":"white"},sr=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)"},lr=function(t){return t.Geometries.userGeometries?"#em-user-regions":t.gridCartogram_?"#em-grid-container":"WORLD"===t.geo_?"#em-worldrg":"#em-nutsrg, #em-cntrg"};function cr(t){return cr="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},cr(t)}function ur(t){var e=function(t,e){if("object"!=cr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=cr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==cr(e)?e:e+""}function fr(t,e,n){return(e=ur(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hr={value:()=>{}};function pr(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new dr(r)}function dr(t){this._=t}function gr(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function vr(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=hr,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}dr.prototype=pr.prototype={constructor:dr,on:function(t,e){var n,r,i=this._,o=(r=i,(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&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=vr(i[n],t.name,e);else if(null==e)for(n in i)i[n]=vr(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=gr(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new dr(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const yr=pr,_r={capture:!0,passive:!1};function mr(t){t.preventDefault(),t.stopImmediatePropagation()}function xr(t){return((t=Math.exp(t))+1/t)/2}const br=function t(e,n,r){function i(t,i){var o,a,s=t[0],l=t[1],c=t[2],u=i[0],f=i[1],h=i[2],p=u-s,d=f-l,g=p*p+d*d;if(g<1e-12)a=Math.log(h/c)/e,o=function(t){return[s+t*p,l+t*d,c*Math.exp(e*t*a)]};else{var v=Math.sqrt(g),y=(h*h-c*c+r*g)/(2*c*n*v),_=(h*h-c*c-r*g)/(2*h*n*v),m=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(_*_+1)-_);a=(x-m)/e,o=function(t){var r=t*a,i=xr(m),o=c/(n*v)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*r+m)-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[s+o*p,l+o*d,c*i/xr(e*r+m)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function wr(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 r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var Sr,kr,Tr=0,Fr=0,Er=0,Ar=0,Cr=0,Mr=0,Lr="object"==typeof performance&&performance.now?performance:Date,zr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Or(){return Cr||(zr(Nr),Cr=Lr.now()+Mr)}function Nr(){Cr=0}function Dr(){this._call=this._time=this._next=null}function Pr(t,e,n){var r=new Dr;return r.restart(t,e,n),r}function jr(){Cr=(Ar=Lr.now())+Mr,Tr=Fr=0;try{!function(){Or(),++Tr;for(var t,e=Sr;e;)(t=Cr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tr}()}finally{Tr=0,function(){var t,e,n=Sr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Sr=e);kr=t,Ir(r)}(),Cr=0}}function Rr(){var t=Lr.now(),e=t-Ar;e>1e3&&(Mr-=e,Ar=t)}function Ir(t){Tr||(Fr&&(Fr=clearTimeout(Fr)),t-Cr>24?(t<1/0&&(Fr=setTimeout(jr,t-Lr.now()-Mr)),Er&&(Er=clearInterval(Er))):(Er||(Ar=Lr.now(),Er=setInterval(Rr,1e3)),Tr=1,zr(jr)))}function Gr(t,e,n){var r=new Dr;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Dr.prototype=Pr.prototype={constructor:Dr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Or():+n)+(null==e?0:+e),this._next||kr===this||(kr?kr._next=this:Sr=this,kr=this),this._call=t,this._time=n,Ir()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ir())}};var Wr=yr("start","end","cancel","interrupt"),Br=[];function Hr(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var c,u,f,h;if(1!==n.state)return l();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return Gr(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Gr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(o))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),c=0,u=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Pr(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:Wr,tween:Br,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Ur(t,e){var n=$r(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function qr(t,e){var n=$r(t,e);if(n.state>3)throw new Error("too late; already running");return n}function $r(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Vr(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}var Yr,Jr=180/Math.PI,Xr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kr(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Jr,skewX:Math.atan(l)*Jr,scaleX:a,scaleY:s}}function Zr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Be(t,i)},{i:l-2,x:Be(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Be(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Be(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Be(t,n)},{i:s-2,x:Be(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Qr=Zr((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xr:Kr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ti=Zr((function(t){return null==t?Xr:(Yr||(Yr=document.createElementNS("http://www.w3.org/2000/svg","g")),Yr.setAttribute("transform",t),(t=Yr.transform.baseVal.consolidate())?Kr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Xr)}),", ",")",")");function ei(t,e){var n,r;return function(){var i=qr(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ni(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=qr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function ri(t,e,n){var r=t._id;return t.each((function(){var t=qr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return $r(t,r).value[e]}}function ii(t,e){var n;return("number"==typeof e?Be:e instanceof ge?je:(n=ge(e))?(e=n,je):$e)(t,e)}function oi(t){return function(){this.removeAttribute(t)}}function ai(t){return function(){this.removeAttributeNS(t.space,t.local)}}function si(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function li(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function ci(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttribute(t)}}function ui(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function fi(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function hi(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function pi(t,e){return function(){Ur(this,t).delay=+e.apply(this,arguments)}}function di(t,e){return e=+e,function(){Ur(this,t).delay=e}}function gi(t,e){return function(){qr(this,t).duration=+e.apply(this,arguments)}}function vi(t,e){return e=+e,function(){qr(this,t).duration=e}}var yi=Lt.prototype.constructor;function _i(t){return function(){this.style.removeProperty(t)}}var mi=0;function xi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function bi(){return++mi}var wi=Lt.prototype;xi.prototype=function(t){return Lt().transition(t)}.prototype={constructor:xi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=x(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,f=o[a]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=t.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),f[h]=l,Hr(f[h],e,n,h,f,$r(s,n)));return new xi(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=S(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,f=0;f<u;++f)if(l=c[f]){for(var h,p=t.call(l,l.__data__,f,c),d=$r(l,n),g=0,v=p.length;g<v;++g)(h=p[g])&&Hr(h,e,n,g,p,d);o.push(p),a.push(l)}return new xi(o,a,e,n)},selectChild:wi.selectChild,selectChildren:wi.selectChildren,filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new xi(r,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,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new xi(a,this._parents,this._name,this._id)},selection:function(){return new yi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=bi(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=$r(a,e);Hr(a,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new xi(r,this._parents,t,n)},call:wi.call,nodes:wi.nodes,node:wi.node,size:wi.size,empty:wi.empty,each:wi.each,on:function(t,e){var n=this._id;return arguments.length<2?$r(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=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)?Ur:qr;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=I(t),r="transform"===n?ti:ii;return this.attrTween(t,"function"==typeof e?(n.local?ui:ci)(n,r,ri(this,"attr."+t,e)):null==e?(n.local?ai:oi)(n):(n.local?li:si)(n,r,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 r=I(t);return this.tween(n,(r.local?fi:hi)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Qr:ii;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=X(this,t),a=(this.style.removeProperty(t),X(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,_i(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=X(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=X(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}(t,r,ri(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var l=qr(this,t),c=l.on,u=null==l.value[a]?o||(o=_i(e)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=X(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(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}}(ri(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 r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(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 r,i=$r(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?ei:ni)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?pi:di)(e,t)):$r(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?gi:vi)(e,t)):$r(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(){qr(this,t).ease=e}}(e,t)):$r(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;qr(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=qr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:wi[Symbol.iterator]};var Si={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function ki(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Lt.prototype.interrupt=function(t){return this.each((function(){Vr(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof xi?(e=t._id,t=t._name):(e=bi(),(n=Si).time=Or(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&Hr(a,t,e,c,s,n||ki(a,e));return new xi(r,this._parents,t,e)};const Ti=t=>()=>t;function Fi(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){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:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ei(t,e,n){this.k=t,this.x=e,this.y=n}Ei.prototype={constructor:Ei,scale:function(t){return 1===t?this:new Ei(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ei(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 Ai=new Ei(1,0,0);function Ci(t){t.stopImmediatePropagation()}function Mi(t){t.preventDefault(),t.stopImmediatePropagation()}function Li(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function zi(){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 Oi(){return this.__zoom||Ai}function Ni(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Di(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pi(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function ji(){var t,e,n,r=Li,i=zi,o=Pi,a=Ni,s=Di,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,f=br,h=yr("start","zoom","end"),p=0,d=10;function g(t){t.property("__zoom",Oi).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",T).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new Ei(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Ei(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=x(t,o).event(r),s=i.apply(t,o),l=null==n?_(s):"function"==typeof n?n.apply(t,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,o):e,p=f(u.invert(l).concat(c/u.k),h.invert(l).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=p(t),n=c/e[2];t=new Ei(n,l[0]-e[0]*n,l[1]-e[1]*n)}a.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=i.apply(t,e),this.taps=0}function w(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=wr(t);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[u,i.invert(u)],Vr(this),n.start()}Mi(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",o(y(v(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,a=x(this,e,!0).event(t),s=zt(t.view).on("mousemove.zoom",(function(t){if(Mi(t),!a.moved){var e=t.clientX-u,n=t.clientY-f;a.moved=e*e+n*n>p}a.event(t).zoom("mouse",o(y(a.that.__zoom,a.mouse[0]=wr(t,i),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=zt(t).on("dragstart.drag",null);e&&(r.on("click.drag",mr,_r),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,a.moved),Mi(t),a.event(t).end()}),!0),l=wr(t,i),u=t.clientX,f=t.clientY;!function(t){var e=t.document.documentElement,n=zt(t).on("dragstart.drag",mr,_r);"onselectstart"in e?n.on("selectstart.drag",mr,_r):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),Ci(t),a.mouse=[l,this.__zoom.invert(l)],Vr(this),a.start()}}function k(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=wr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(a),l=n.k*(t.shiftKey?.5:2),f=o(y(v(n,l),a,s),i.apply(this,e),c);Mi(t),u>0?zt(this).transition().duration(u).call(m,f,a,t):zt(this).call(g.transform,f,a,t)}}function T(n,...i){if(r.apply(this,arguments)){var o,a,s,l,c=n.touches,u=c.length,f=x(this,i,n.changedTouches.length===u).event(n);for(Ci(n),a=0;a<u;++a)l=[l=wr(s=c[a],this),this.__zoom.invert(l),s.identifier],f.touch0?f.touch1||f.touch0[2]===l[2]||(f.touch1=l,f.taps=0):(f.touch0=l,o=!0,f.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(f.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),500)),Vr(this),f.start())}}function F(t,...e){if(this.__zooming){var n,r,i,a,s=x(this,e).event(t),l=t.changedTouches,u=l.length;for(Mi(t),n=0;n<u;++n)i=wr(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var f=s.touch0[0],h=s.touch0[1],p=s.touch1[0],d=s.touch1[1],g=(g=p[0]-f[0])*g+(g=p[1]-f[1])*g,_=(_=d[0]-h[0])*_+(_=d[1]-h[1])*_;r=v(r,Math.sqrt(g/_)),i=[(f[0]+p[0])/2,(f[1]+p[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(y(r,i,a),s.extent,c))}}function E(t,...r){if(this.__zooming){var i,o,a=x(this,r).event(t),s=t.changedTouches,l=s.length;for(Ci(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),i=0;i<l;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=wr(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<d)){var c=zt(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",Oi),t!==i?m(t,e,n,r):i.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},g.scaleBy=function(t,e,n,r){g.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,r)},g.scaleTo=function(t,e,n,r){g.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==n?_(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return o(y(v(r,l),a,s),t,c)}),n,r)},g.translateBy=function(t,e,n,r){g.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)}),null,r)},g.translateTo=function(t,e,n,r,a){g.transform(t,(function(){var t=i.apply(this,arguments),a=this.__zoom,s=null==r?_(t):"function"==typeof r?r.apply(this,arguments):r;return o(Ai.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),r,a)},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=zt(this.that).datum();h.call(t,this.that,new Fi(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:h}),e)}},g.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Ti(+t),g):a},g.filter=function(t){return arguments.length?(r="function"==typeof t?t:Ti(!!t),g):r},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ti(!!t),g):s},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:Ti([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},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?(o=t,g):o},g.duration=function(t){return arguments.length?(u=+t,g):u},g.interpolate=function(t){return arguments.length?(f=t,g):f},g.on=function(){var t=h.on.apply(h,arguments);return t===h?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 Ri(t){return"string"==typeof t?new Ct([document.querySelectorAll(t)],[document.documentElement]):new Ct([b(t)],At)}Ei.prototype;var Ii=1e-6,Gi=1e-12,Wi=Math.PI,Bi=Wi/2,Hi=Wi/4,Ui=2*Wi,qi=180/Wi,$i=Wi/180,Vi=Math.abs,Yi=Math.atan,Ji=Math.atan2,Xi=Math.cos,Ki=Math.ceil,Zi=(Math.exp,Math.floor,Math.hypot),Qi=(Math.log,Math.pow,Math.sin),to=Math.sign||function(t){return t>0?1:t<0?-1:0},eo=Math.sqrt;Math.tan;function no(t){return t>1?Bi:t<-1?-Bi:Math.asin(t)}function ro(){}function io(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:ro,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function oo(t,e){return Vi(t[0]-e[0])<Ii&&Vi(t[1]-e[1])<Ii}function ao(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function so(t,e,n,r,i){var o,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(oo(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new ao(r,t,null,!0)),l.push(n.o=new ao(r,null,n,!1)),s.push(n=new ao(a,t,null,!1)),l.push(n.o=new ao(a,null,n,!0))}})),s.length){for(l.sort(e),lo(s),lo(l),o=0,a=l.length;o<a;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=c.length;o<a;++o)i.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function lo(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function co(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var uo=1e9,fo=-uo;function ho(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,c){var u=0,f=0;if(null==i||(u=a(i,s))!==(f=a(o,s))||l(i,o)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else c.point(o[0],o[1])}function a(r,i){return Vi(r[0]-t)<Ii?i>0?0:3:Vi(r[0]-n)<Ii?i>0?2:1:Vi(r[1]-e)<Ii?i>0?1:0:i>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var l,c,u,f,h,p,d,g,v,y,_,m=a,x=io(),b={point:w,lineStart:function(){b.point=S,c&&c.push(u=[]);y=!0,v=!1,d=g=NaN},lineEnd:function(){l&&(S(f,h),p&&v&&x.rejoin(),l.push(x.result()));b.point=w,v&&m.lineEnd()},polygonStart:function(){m=x,l=[],c=[],_=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],l=1,u=s.length,f=s[0],h=f[0],p=f[1];l<u;++l)o=h,a=p,h=(f=s[l])[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=_&&e,i=(l=co(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&so(l,s,e,o,a),a.polygonEnd());m=a,l=c=u=null}};function w(t,e){i(t,e)&&m.point(t,e)}function S(o,a){var s=i(o,a);if(c&&u.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(m.lineStart(),m.point(o,a));else if(s&&v)m.point(o,a);else{var l=[d=Math.max(fo,Math.min(uo,d)),g=Math.max(fo,Math.min(uo,g))],x=[o=Math.max(fo,Math.min(uo,o)),a=Math.max(fo,Math.min(uo,a))];!function(t,e,n,r,i,o){var a,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<c)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>c&&(c=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>c&&(c=a)}else if(f>0){if(a<c)return;a<u&&(u=a)}if(a=r-l,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>c&&(c=a)}if(a=o-l,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<u&&(u=a)}return c>0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,x,t,e,n,r)?s&&(m.lineStart(),m.point(o,a),_=!1):(v||(m.lineStart(),m.point(l[0],l[1])),m.point(x[0],x[1]),s||m.lineEnd(),_=!1)}d=o,g=a,v=s}return b}}const po=t=>t;function go(t){return function(e){var n=new vo;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vo(){}function yo(t,e){t&&mo.hasOwnProperty(t.type)&&mo[t.type](t,e)}vo.prototype={constructor:vo,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 _o={Feature:function(t,e){yo(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)yo(n[r].geometry,e)}},mo={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,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){xo(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xo(n[r],e,0)},Polygon:function(t,e){bo(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)bo(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)yo(n[r],e)}};function xo(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function bo(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)xo(t[n],e,1);e.polygonEnd()}function wo(t,e){t&&_o.hasOwnProperty(t.type)?_o[t.type](t,e):yo(t,e)}var So=1/0,ko=So,To=-So,Fo=To,Eo={point:function(t,e){t<So&&(So=t);t>To&&(To=t);e<ko&&(ko=e);e>Fo&&(Fo=e)},lineStart:ro,lineEnd:ro,polygonStart:ro,polygonEnd:ro,result:function(){var t=[[So,ko],[To,Fo]];return To=Fo=-(ko=So=1/0),t}};const Ao=Eo;function Co(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),wo(n,t.stream(Ao)),e(Ao.result()),null!=r&&t.clipExtent(r),t}function Mo(t,e,n){return Co(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function Lo(t,e,n){return Mo(t,[[0,0],e],n)}function zo(t,e,n){return Co(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function Oo(t,e,n){return Co(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}class No{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}var Do,Po,jo,Ro,Io=new No,Go=new No,Wo={point:ro,lineStart:ro,lineEnd:ro,polygonStart:function(){Wo.lineStart=Bo,Wo.lineEnd=qo},polygonEnd:function(){Wo.lineStart=Wo.lineEnd=Wo.point=ro,Io.add(Vi(Go)),Go=new No},result:function(){var t=Io/2;return Io=new No,t}};function Bo(){Wo.point=Ho}function Ho(t,e){Wo.point=Uo,Do=jo=t,Po=Ro=e}function Uo(t,e){Go.add(Ro*t-jo*e),jo=t,Ro=e}function qo(){Uo(Do,Po)}const $o=Wo;var Vo,Yo,Jo,Xo,Ko=0,Zo=0,Qo=0,ta=0,ea=0,na=0,ra=0,ia=0,oa=0,aa={point:sa,lineStart:la,lineEnd:fa,polygonStart:function(){aa.lineStart=ha,aa.lineEnd=pa},polygonEnd:function(){aa.point=sa,aa.lineStart=la,aa.lineEnd=fa},result:function(){var t=oa?[ra/oa,ia/oa]:na?[ta/na,ea/na]:Qo?[Ko/Qo,Zo/Qo]:[NaN,NaN];return Ko=Zo=Qo=ta=ea=na=ra=ia=oa=0,t}};function sa(t,e){Ko+=t,Zo+=e,++Qo}function la(){aa.point=ca}function ca(t,e){aa.point=ua,sa(Jo=t,Xo=e)}function ua(t,e){var n=t-Jo,r=e-Xo,i=eo(n*n+r*r);ta+=i*(Jo+t)/2,ea+=i*(Xo+e)/2,na+=i,sa(Jo=t,Xo=e)}function fa(){aa.point=sa}function ha(){aa.point=da}function pa(){ga(Vo,Yo)}function da(t,e){aa.point=ga,sa(Vo=Jo=t,Yo=Xo=e)}function ga(t,e){var n=t-Jo,r=e-Xo,i=eo(n*n+r*r);ta+=i*(Jo+t)/2,ea+=i*(Xo+e)/2,na+=i,ra+=(i=Xo*t-Jo*e)*(Jo+t),ia+=i*(Xo+e),oa+=3*i,sa(Jo=t,Xo=e)}const va=aa;function ya(t){this._context=t}ya.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,Ui)}},result:ro};var _a,ma,xa,ba,wa,Sa=new No,ka={point:ro,lineStart:function(){ka.point=Ta},lineEnd:function(){_a&&Fa(ma,xa),ka.point=ro},polygonStart:function(){_a=!0},polygonEnd:function(){_a=null},result:function(){var t=+Sa;return Sa=new No,t}};function Ta(t,e){ka.point=Fa,ma=ba=t,xa=wa=e}function Fa(t,e){ba-=t,wa-=e,Sa.add(eo(ba*ba+wa*wa)),ba=t,wa=e}const Ea=ka;let Aa,Ca,Ma,La;class za{constructor(t){this._append=null==t?Oa:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Oa;if(e!==Aa){const t=10**e;Aa=e,Ca=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return Ca}(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!==Ma||this._append!==Ca){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`,Ma=t,Ca=this._append,La=this._,this._=e}this._+=La}}result(){const t=this._;return this._="",t.length?t:null}}function Oa(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Na(t,e){let n,r,i=3,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),wo(t,n(r))),r.result()}return a.area=function(t){return wo(t,n($o)),$o.result()},a.measure=function(t){return wo(t,n(Ea)),Ea.result()},a.bounds=function(t){return wo(t,n(Ao)),Ao.result()},a.centroid=function(t){return wo(t,n(va)),va.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,po):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new za(i)):new ya(e=t),"function"!=typeof o&&r.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new za(i)),a},a.projection(t).digits(i).context(e)}var Da,Pa,ja,Ra,Ia,Ga,Wa,Ba,Ha,Ua,qa,$a,Va,Ya,Ja,Xa,Ka={sphere:ro,point:Za,lineStart:ts,lineEnd:rs,polygonStart:function(){Ka.lineStart=is,Ka.lineEnd=os},polygonEnd:function(){Ka.lineStart=ts,Ka.lineEnd=rs}};function Za(t,e){t*=$i;var n=Xi(e*=$i);Qa(n*Xi(t),n*Qi(t),Qi(e))}function Qa(t,e,n){++Da,ja+=(t-ja)/Da,Ra+=(e-Ra)/Da,Ia+=(n-Ia)/Da}function ts(){Ka.point=es}function es(t,e){t*=$i;var n=Xi(e*=$i);Ya=n*Xi(t),Ja=n*Qi(t),Xa=Qi(e),Ka.point=ns,Qa(Ya,Ja,Xa)}function ns(t,e){t*=$i;var n=Xi(e*=$i),r=n*Xi(t),i=n*Qi(t),o=Qi(e),a=Ji(eo((a=Ja*o-Xa*i)*a+(a=Xa*r-Ya*o)*a+(a=Ya*i-Ja*r)*a),Ya*r+Ja*i+Xa*o);Pa+=a,Ga+=a*(Ya+(Ya=r)),Wa+=a*(Ja+(Ja=i)),Ba+=a*(Xa+(Xa=o)),Qa(Ya,Ja,Xa)}function rs(){Ka.point=Za}function is(){Ka.point=as}function os(){ss($a,Va),Ka.point=Za}function as(t,e){$a=t,Va=e,t*=$i,e*=$i,Ka.point=ss;var n=Xi(e);Ya=n*Xi(t),Ja=n*Qi(t),Xa=Qi(e),Qa(Ya,Ja,Xa)}function ss(t,e){t*=$i;var n=Xi(e*=$i),r=n*Xi(t),i=n*Qi(t),o=Qi(e),a=Ja*o-Xa*i,s=Xa*r-Ya*o,l=Ya*i-Ja*r,c=Zi(a,s,l),u=no(c),f=c&&-u/c;Ha.add(f*a),Ua.add(f*s),qa.add(f*l),Pa+=u,Ga+=u*(Ya+(Ya=r)),Wa+=u*(Ja+(Ja=i)),Ba+=u*(Xa+(Xa=o)),Qa(Ya,Ja,Xa)}function ls(t){Da=Pa=ja=Ra=Ia=Ga=Wa=Ba=0,Ha=new No,Ua=new No,qa=new No,wo(t,Ka);var e=+Ha,n=+Ua,r=+qa,i=Zi(e,n,r);return i<Gi&&(e=Ga,n=Wa,r=Ba,Pa<Ii&&(e=ja,n=Ra,r=Ia),(i=Zi(e,n,r))<Gi)?[NaN,NaN]:[Ji(n,e)*qi,no(r/i)*qi]}function cs(){}function us(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:cs,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}var fs=1e-6,hs=Math.PI,ps=hs/2,ds=hs/4,gs=2*hs,vs=180/hs,ys=hs/180,_s=Math.abs,ms=Math.atan,xs=Math.atan2,bs=Math.cos,ws=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),Ss=Math.sign||function(t){return t>0?1:t<0?-1:0},ks=Math.sqrt;Math.tan;function Ts(t){return t>1?ps:t<-1?-ps:Math.asin(t)}function Fs(t,e){return _s(t[0]-e[0])<fs&&_s(t[1]-e[1])<fs}function Es(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function As(t,e,n,r,i){var o,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Fs(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new Es(r,t,null,!0)),l.push(n.o=new Es(r,null,n,!1)),s.push(n=new Es(a,t,null,!1)),l.push(n.o=new Es(a,null,n,!0))}})),s.length){for(l.sort(e),Cs(s),Cs(l),o=0,a=l.length;o<a;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=c.length;o<a;++o)i.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function Cs(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}class Ms{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}function Ls(t){return[xs(t[1],t[0]),Ts(t[2])]}function zs(t){var e=t[0],n=t[1],r=bs(n);return[r*bs(e),r*ws(e),ws(n)]}function Os(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ns(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 Ds(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ps(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function js(t){var e=ks(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Rs(t){return _s(t[0])<=hs?t[0]:Ss(t[0])*((_s(t[0])+hs)%gs-hs)}function Is(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Gs(t,e,n,r){return function(i){var o,a,s,l=e(i),c=us(),u=e(c),f=!1,h={point:p,lineStart:g,lineEnd:v,polygonStart:function(){h.point=y,h.lineStart=_,h.lineEnd=m,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=v,a=Is(a);var t=function(t,e){var n=Rs(e),r=e[1],i=ws(r),o=[ws(n),-bs(n),0],a=0,s=0,l=new Ms;1===i?r=ps+fs:-1===i&&(r=-ps-fs);for(var c=0,u=t.length;c<u;++c)if(h=(f=t[c]).length)for(var f,h,p=f[h-1],d=Rs(p),g=p[1]/2+ds,v=ws(g),y=bs(g),_=0;_<h;++_,d=x,v=w,y=S,p=m){var m=f[_],x=Rs(m),b=m[1]/2+ds,w=ws(b),S=bs(b),k=x-d,T=k>=0?1:-1,F=T*k,E=F>hs,A=v*w;if(l.add(xs(A*T*ws(F),y*S+A*bs(F))),a+=E?k+T*gs:k,E^d>=n^x>=n){var C=Ns(zs(p),zs(m));js(C);var M=Ns(o,C);js(M);var L=(E^k>=0?-1:1)*Ts(M[2]);(r>L||r===L&&(C[0]||C[1]))&&(s+=E^k>=0?1:-1)}}return(a<-1e-6||a<fs&&l<-1e-12)^1&s}(o,r);a.length?(f||(i.polygonStart(),f=!0),As(a,Bs,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){l.point(t,e)}function g(){h.point=d,l.lineStart()}function v(){h.point=p,l.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function _(){u.lineStart(),s=[]}function m(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,l=u.clean(),h=c.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&l){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&l&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Ws))}return h}}function Ws(t){return t.length>1}function Bs(t,e){return((t=t.x)[0]<0?t[1]-ps-fs:ps-t[1])-((e=e.x)[0]<0?e[1]-ps-fs:ps-e[1])}const Hs=Gs((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?hs:-hs,l=_s(o-n);_s(l-hs)<fs?(t.point(n,r=(r+a)/2>0?ps:-ps),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&l>=hs&&(_s(n-i)<fs&&(n-=i*fs),_s(o-s)<fs&&(o-=s*fs),r=function(t,e,n,r){var i,o,a=ws(t-n);return _s(a)>fs?ms((ws(e)*(o=bs(r))*ws(n)-ws(r)*(i=bs(e))*ws(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*ps,r.point(-hs,i),r.point(0,i),r.point(hs,i),r.point(hs,0),r.point(hs,-i),r.point(0,-i),r.point(-hs,-i),r.point(-hs,0),r.point(-hs,i);else if(_s(t[0]-e[0])>fs){var o=t[0]<e[0]?hs:-hs;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-hs,-ps]);function Us(t,e,n,r,i,o){if(n){var a=bs(e),s=ws(e),l=r*n;null==i?(i=e+r*gs,o=e-l/2):(i=qs(a,i),o=qs(a,o),(r>0?i<o:i>o)&&(i+=r*gs));for(var c,u=i;r>0?u>o:u<o;u-=l)c=Ls([a,-s*bs(u),-s*ws(u)]),t.point(c[0],c[1])}}function qs(t,e){(e=zs(e))[0]-=t,js(e);var n=function(t){return t>1?0:t<-1?hs:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+gs-fs)%gs}var $s=1e9,Vs=-1e9;function Ys(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,c){var u=0,f=0;if(null==i||(u=a(i,s))!==(f=a(o,s))||l(i,o)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else c.point(o[0],o[1])}function a(r,i){return _s(r[0]-t)<fs?i>0?0:3:_s(r[0]-n)<fs?i>0?2:1:_s(r[1]-e)<fs?i>0?1:0:i>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var l,c,u,f,h,p,d,g,v,y,_,m=a,x=us(),b={point:w,lineStart:function(){b.point=S,c&&c.push(u=[]);y=!0,v=!1,d=g=NaN},lineEnd:function(){l&&(S(f,h),p&&v&&x.rejoin(),l.push(x.result()));b.point=w,v&&m.lineEnd()},polygonStart:function(){m=x,l=[],c=[],_=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],l=1,u=s.length,f=s[0],h=f[0],p=f[1];l<u;++l)o=h,a=p,h=(f=s[l])[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=_&&e,i=(l=Is(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&As(l,s,e,o,a),a.polygonEnd());m=a,l=c=u=null}};function w(t,e){i(t,e)&&m.point(t,e)}function S(o,a){var s=i(o,a);if(c&&u.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(m.lineStart(),m.point(o,a));else if(s&&v)m.point(o,a);else{var l=[d=Math.max(Vs,Math.min($s,d)),g=Math.max(Vs,Math.min($s,g))],x=[o=Math.max(Vs,Math.min($s,o)),a=Math.max(Vs,Math.min($s,a))];!function(t,e,n,r,i,o){var a,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<c)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>c&&(c=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>c&&(c=a)}else if(f>0){if(a<c)return;a<u&&(u=a)}if(a=r-l,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>c&&(c=a)}if(a=o-l,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<u&&(u=a)}return c>0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,x,t,e,n,r)?s&&(m.lineStart(),m.point(o,a),_=!1):(v||(m.lineStart(),m.point(l[0],l[1])),m.point(x[0],x[1]),s||m.lineEnd(),_=!1)}d=o,g=a,v=s}return b}}function Js(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}const Xs=t=>t;function Ks(t,e){return[_s(t)>hs?t+Math.round(-t/gs)*gs:t,e]}function Zs(t,e,n){return(t%=gs)?e||n?Js(tl(t),el(e,n)):tl(t):e||n?el(e,n):Ks}function Qs(t){return function(e,n){return[(e+=t)>hs?e-gs:e<-hs?e+gs:e,n]}}function tl(t){var e=Qs(t);return e.invert=Qs(-t),e}function el(t,e){var n=bs(t),r=ws(t),i=bs(e),o=ws(e);function a(t,e){var a=bs(e),s=bs(t)*a,l=ws(t)*a,c=ws(e),u=c*n+s*r;return[xs(l*i-u*o,s*n-c*r),Ts(u*i+l*o)]}return a.invert=function(t,e){var a=bs(e),s=bs(t)*a,l=ws(t)*a,c=ws(e),u=c*i-l*o;return[xs(l*i+c*o,s*n+u*r),Ts(u*n-s*r)]},a}function nl(t){return function(e){var n=new rl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rl(){}function il(t,e){t&&al.hasOwnProperty(t.type)&&al[t.type](t,e)}Ks.invert=Ks,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 ol={Feature:function(t,e){il(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)il(n[r].geometry,e)}},al={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,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){sl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)sl(n[r],e,0)},Polygon:function(t,e){ll(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ll(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)il(n[r],e)}};function sl(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function ll(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)sl(t[n],e,1);e.polygonEnd()}var cl=1/0,ul=cl,fl=-cl,hl=fl,pl={point:function(t,e){t<cl&&(cl=t);t>fl&&(fl=t);e<ul&&(ul=e);e>hl&&(hl=e)},lineStart:cs,lineEnd:cs,polygonStart:cs,polygonEnd:cs,result:function(){var t=[[cl,ul],[fl,hl]];return fl=hl=-(ul=cl=1/0),t}};const dl=pl;function gl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),function(t,e){t&&ol.hasOwnProperty(t.type)?ol[t.type](t,e):il(t,e)}(n,t.stream(dl)),e(dl.result()),null!=r&&t.clipExtent(r),t}function vl(t,e,n){return gl(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}var yl=bs(30*ys);function _l(t,e){return+e?function(t,e){function n(r,i,o,a,s,l,c,u,f,h,p,d,g,v){var y=c-r,_=u-i,m=y*y+_*_;if(m>4*e&&g--){var x=a+h,b=s+p,w=l+d,S=ks(x*x+b*b+w*w),k=Ts(w/=S),T=_s(_s(w)-1)<fs||_s(o-f)<fs?(o+f)/2:xs(b,x),F=t(T,k),E=F[0],A=F[1],C=E-r,M=A-i,L=_*C-y*M;(L*L/m>e||_s((y*C+_*M)/m-.5)>.3||a*h+s*p+l*d<yl)&&(n(r,i,o,a,s,l,E,A,T,x/=S,b/=S,w,g,v),v.point(E,A),n(E,A,T,x,b,w,c,u,f,h,p,d,g,v))}}return function(e){var r,i,o,a,s,l,c,u,f,h,p,d,g={point:v,lineStart:y,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=_,e.lineStart()}function _(r,i){var o=zs([r,i]),a=t(r,i);n(u,f,c,h,p,d,u=a[0],f=a[1],c=r,h=o[0],p=o[1],d=o[2],16,e),e.point(u,f)}function m(){g.point=v,e.lineEnd()}function x(){y(),g.point=b,g.lineEnd=w}function b(t,e){_(r=t,e),i=u,o=f,a=h,s=p,l=d,g.point=_}function w(){n(u,f,c,h,p,d,i,o,r,a,s,l,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return nl({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var ml=nl({point:function(t,e){this.stream.point(t*ys,e*ys)}});function xl(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=bs(o),s=ws(o),l=a*t,c=s*t,u=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(t,o){return[l*(t*=r)-c*(o*=i)+e,n-c*t-l*o]}return d.invert=function(t,e){return[r*(u*t-f*e+h),i*(p-f*t-u*e)]},d}function bl(t){return function(t){var e,n,r,i,o,a,s,l,c,u,f=150,h=480,p=250,d=0,g=0,v=0,y=0,_=0,m=0,x=1,b=1,w=null,S=Hs,k=null,T=Xs,F=.5;function E(t){return l(t[0]*ys,t[1]*ys)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*vs,t[1]*vs]}function C(){var t=xl(f,0,0,x,b,m).apply(null,e(d,g)),r=xl(f,h-t[0],p-t[1],x,b,m);return n=Zs(v,y,_),s=Js(e,r),l=Js(n,s),a=_l(s,F),M()}function M(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=ml(function(t){return nl({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(S(a(T(u=t)))))},E.preclip=function(t){return arguments.length?(S=t,w=void 0,M()):S},E.postclip=function(t){return arguments.length?(T=t,k=r=i=o=null,M()):T},E.clipAngle=function(t){return arguments.length?(S=+t?function(t){var e=bs(t),n=6*ys,r=e>0,i=_s(e)>fs;function o(t,n){return bs(t)*bs(n)>e}function a(t,n,r){var i=[1,0,0],o=Ns(zs(t),zs(n)),a=Os(o,o),s=o[0],l=a-s*s;if(!l)return!r&&t;var c=e*a/l,u=-e*s/l,f=Ns(i,o),h=Ps(i,c);Ds(h,Ps(o,u));var p=f,d=Os(h,p),g=Os(p,p),v=d*d-g*(Os(h,h)-1);if(!(v<0)){var y=ks(v),_=Ps(p,(-d-y)/g);if(Ds(_,h),_=Ls(_),!r)return _;var m,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(m=x,x=b,b=m);var k=b-x,T=_s(k-hs)<fs;if(!T&&S<w&&(m=w,w=S,S=m),T||k<fs?T?w+S>0^_[1]<(_s(_[0]-x)<fs?w:S):w<=_[1]&&_[1]<=S:k>hs^(x<=_[0]&&_[0]<=b)){var F=Ps(p,(-d+y)/g);return Ds(F,h),[_,Ls(F)]}}}function s(e,n){var i=r?t:hs-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Gs(o,(function(t){var e,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=o(f,h),v=r?g?0:s(f,h):g?s(f+(f<0?hs:-hs),h):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=a(e,d))||Fs(e,p)||Fs(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var y;v&n||!(y=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&Fs(e,d)||t.point(d[0],d[1]),e=d,l=g,n=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),(function(e,r,i,o){Us(o,t,n,i,e,r)}),r?[0,-t]:[-hs,t-hs])}(w=t*ys):(w=null,Hs),M()):w*vs},E.clipExtent=function(t){return arguments.length?(T=null==t?(k=r=i=o=null,Xs):Ys(k=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),M()):null==k?null:[[k,r],[i,o]]},E.scale=function(t){return arguments.length?(f=+t,C()):f},E.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],C()):[h,p]},E.center=function(t){return arguments.length?(d=t[0]%360*ys,g=t[1]%360*ys,C()):[d*vs,g*vs]},E.rotate=function(t){return arguments.length?(v=t[0]%360*ys,y=t[1]%360*ys,_=t.length>2?t[2]%360*ys:0,C()):[v*vs,y*vs,_*vs]},E.angle=function(t){return arguments.length?(m=t%360*ys,C()):m*vs},E.reflectX=function(t){return arguments.length?(x=t?-1:1,C()):x<0},E.reflectY=function(t){return arguments.length?(b=t?-1:1,C()):b<0},E.precision=function(t){return arguments.length?(a=_l(s,F=t*t),M()):ks(F)},E.fitExtent=function(t,e){return vl(E,t,e)},E.fitSize=function(t,e){return function(t,e,n){return vl(t,[[0,0],e],n)}(E,t,e)},E.fitWidth=function(t,e){return function(t,e,n){return gl(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}(E,t,e)},E.fitHeight=function(t,e){return function(t,e,n){return gl(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,C()}}((function(){return t}))()}var wl=Math.abs,Sl=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),kl=(Math.log,Math.max),Tl=Math.min,Fl=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),El=Fl/2,Al=(Math.SQRT1_2,Ml(2),Ml(Fl),180/Fl),Cl=Fl/180;function Ml(t){return t>0?Math.sqrt(t):0}var Ll=[[.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 zl(t,e){var n,r=Tl(18,36*wl(e)/Fl),i=Sl(r),o=r-i,a=(n=Ll[i])[0],s=n[1],l=(n=Ll[++i])[0],c=n[1],u=(n=Ll[Tl(19,++i)])[0],f=n[1];return[t*(l+o*(u-a)/2+o*o*(u-2*l+a)/2),(e>0?El:-El)*(c+o*(f-s)/2+o*o*(f-2*c+s)/2)]}Ll.forEach((function(t){t[1]*=1.0144})),zl.invert=function(t,e){var n=e/El,r=90*n,i=Tl(18,wl(r/5)),o=kl(0,Sl(i));do{var a=Ll[o][1],s=Ll[o+1][1],l=Ll[Tl(19,o+2)][1],c=l-a,u=l-2*s+a,f=2*(wl(n)-s)/c,h=u/c,p=f*(1-h*f*(1-2*h*f));if(p>=0||1===o){r=(e>=0?5:-5)*(p+i);var d,g=50;do{p=(i=Tl(18,wl(r)/5))-(o=Sl(i)),a=Ll[o][1],s=Ll[o+1][1],l=Ll[Tl(19,o+2)][1],r-=(d=(e>=0?El:-El)*(s+p*(l-a)/2+p*p*(l-2*s+a)/2)-e)*Al}while(wl(d)>1e-12&&--g>0);break}}while(--o>=0);var v=Ll[o][0],y=Ll[o+1][0],_=Ll[Tl(19,o+2)][0];return[t/(y+p*(_-v)/2+p*p*(_-2*y+v)/2),r*Cl]};var Ol="http://www.w3.org/1999/xhtml";const Nl={svg:"http://www.w3.org/2000/svg",xhtml:Ol,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dl(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 Pl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ol&&e.documentElement.namespaceURI===Ol?e.createElement(t):e.createElementNS(n,t)}}function jl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rl(t){var e=Dl(t);return(e.local?jl:Pl)(e)}function Il(){}function Gl(t){return null==t?Il:function(){return this.querySelector(t)}}function Wl(){return[]}function Bl(t){return new Array(t.length)}function Hl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Hl.prototype={constructor:Hl,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 Ul(t,e,n,r,i,o){for(var a,s=0,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Hl(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function ql(t,e,n,r,i,o,a){var s,l,c,u={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(l=e[s])&&(p[s]=c="$"+a.call(l,l.__data__,s,e),c in u?i[s]=l:u[c]=l);for(s=0;s<h;++s)(l=u[c="$"+a.call(t,o[s],s,o)])?(r[s]=l,l.__data__=o[s],u[c]=null):n[s]=new Hl(t,o[s]);for(s=0;s<f;++s)(l=e[s])&&u[p[s]]===l&&(i[s]=l)}function $l(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Vl(t){return function(){this.removeAttribute(t)}}function Yl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jl(t,e){return function(){this.setAttribute(t,e)}}function Xl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Kl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zl(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 Ql(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function tc(t){return function(){this.style.removeProperty(t)}}function ec(t,e,n){return function(){this.style.setProperty(t,e,n)}}function nc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function rc(t){return function(){delete this[t]}}function ic(t,e){return function(){this[t]=e}}function oc(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 sc(t){return t.classList||new lc(t)}function lc(t){this._node=t,this._names=ac(t.getAttribute("class")||"")}function cc(t,e){for(var n=sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function uc(t,e){for(var n=sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function fc(t){return function(){cc(this,t)}}function hc(t){return function(){uc(this,t)}}function pc(t,e){return function(){(e.apply(this,arguments)?cc:uc)(this,t)}}function dc(){this.textContent=""}function gc(t){return function(){this.textContent=t}}function vc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function yc(){this.innerHTML=""}function _c(t){return function(){this.innerHTML=t}}function mc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function bc(){this.nextSibling&&this.parentNode.appendChild(this)}function wc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Sc(){return null}function kc(){var t=this.parentNode;t&&t.removeChild(this)}function Tc(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Fc(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}lc.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={},Ac=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ec={mouseenter:"mouseover",mouseleave:"mouseout"}));function Cc(t,e,n){return t=Mc(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Mc(t,e,n){return function(r){var i=Ac;Ac=r;try{t.call(this,this.__data__,e,n)}finally{Ac=i}}}function Lc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function zc(t,e,n){var r=Ec.hasOwnProperty(t.type)?Cc:Mc;return function(i,o,a){var s,l=this.__on,c=r(e,o,a);if(l)for(var u=0,f=l.length;u<f;++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 Oc(t,e,n,r){var i=Ac;t.sourceEvent=Ac,Ac=t;try{return e.apply(n,r)}finally{Ac=i}}function Nc(t,e,n){var r=Ql(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Dc(t,e){return function(){return Nc(this,t,e)}}function Pc(t,e){return function(){return Nc(this,t,e.apply(this,arguments))}}var jc=[null];function Rc(t,e){this._groups=t,this._parents=e}function Ic(){return new Rc([[document.documentElement]],jc)}Rc.prototype=Ic.prototype={constructor:Rc,select:function(t){"function"!=typeof t&&(t=Gl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=t.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Rc(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?Wl:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new Rc(r,i)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new Rc(r,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?ql:Ul,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],f=i[c],h=f.length,p=t.call(u,u&&u.__data__,c,r),d=p.length,g=s[c]=new Array(d),v=a[c]=new Array(d);n(u,f,g,v,l[c]=new Array(h),p,e);for(var y,_,m=0,x=0;m<d;++m)if(y=g[m]){for(m>=x&&(x=m+1);!(_=v[x])&&++x<d;);y._next=_||null}}return(a=new Rc(a,r))._enter=s,a._exit=l,a},enter:function(){return new Rc(this._enter||this._groups.map(Bl),this._parents)},exit:function(){return new Rc(this._exit||this._groups.map(Bl),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Rc(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=$l);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(e)}return new Rc(i,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 r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}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,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Dl(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Yl:Vl:"function"==typeof e?n.local?Zl:Kl:n.local?Xl:Jl)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?tc:"function"==typeof e?nc:ec)(t,e,null==n?"":n)):function(t,e){return t.style.getPropertyValue(e)||Ql(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?oc:ic)(t,e)):this.node()[t]},classed:function(t,e){var n=ac(t+"");if(arguments.length<2){for(var r=sc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?pc:e?fc:hc)(n,e))},text:function(t){return arguments.length?this.each(null==t?dc:("function"==typeof t?vc:gc)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?yc:("function"==typeof t?mc:_c)(t)):this.node().innerHTML},raise:function(){return this.each(bc)},lower:function(){return this.each(wc)},append:function(t){var e="function"==typeof t?t:Rl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Rl(t),r=null==e?Sc:"function"==typeof e?e:Gl(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(kc)},clone:function(t){return this.select(t?Fc:Tc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=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+""),a=o.length;if(!(arguments.length<2)){for(s=e?zc:Lc,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Pc:Dc)(t,e))}};function Gc(t){return"string"==typeof t?new Rc([[document.querySelector(t)]],[document.documentElement]):new Rc([[t]],jc)}var Wc=0;function Bc(){this._="@"+(++Wc).toString(36)}function Hc(){for(var t,e=Ac;t=e.sourceEvent;)e=t;return e}function Uc(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function qc(t){var e=Hc();return e.changedTouches&&(e=e.changedTouches[0]),Uc(t,e)}function $c(t,e,n){arguments.length<3&&(n=e,e=Hc().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return Uc(t,r);return null}Bc.prototype=function(){return new Bc}.prototype={constructor:Bc,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 Vc={value:function(){}};function Yc(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new Jc(r)}function Jc(t){this._=t}function Xc(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Kc(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Vc,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Jc.prototype=Yc.prototype={constructor:Jc,on:function(t,e){var n,r,i=this._,o=(r=i,(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&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=Kc(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Kc(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=Xc(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jc(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const Zc=Yc;function Qc(){Ac.stopImmediatePropagation()}function tu(){Ac.preventDefault(),Ac.stopImmediatePropagation()}function eu(t){return function(){return t}}function nu(t,e,n,r,i,o,a,s,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}function ru(){return!Ac.button}function iu(){return this.parentNode}function ou(t){return null==t?{x:Ac.x,y:Ac.y}:t}function au(){return"ontouchstart"in this}function su(){var t,e,n,r,i=ru,o=iu,a=ou,s=au,l={},c=Zc("start","drag","end"),u=0,f=0;function h(t){t.on("mousedown.drag",p).filter(s).on("touchstart.drag",v).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=m("mouse",o.apply(this,arguments),qc,this,arguments);a&&(Gc(Ac.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),function(t){var e=t.document.documentElement,n=Gc(t).on("dragstart.drag",tu,!0);"onselectstart"in e?n.on("selectstart.drag",tu,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(Ac.view),Qc(),n=!1,t=Ac.clientX,e=Ac.clientY,a("start"))}}function d(){if(tu(),!n){var r=Ac.clientX-t,i=Ac.clientY-e;n=r*r+i*i>f}l.mouse("drag")}function g(){Gc(Ac.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=Gc(t).on("dragstart.drag",null);e&&(r.on("click.drag",tu,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(Ac.view,n),tu(),l.mouse("end")}function v(){if(i.apply(this,arguments)){var t,e,n=Ac.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=m(n[t].identifier,r,$c,this,arguments))&&(Qc(),e("start"))}}function y(){var t,e,n=Ac.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(tu(),e("drag"))}function _(){var t,e,n=Ac.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=l[n[t].identifier])&&(Qc(),e("end"))}function m(t,e,n,r,i){var o,s,f,p=n(e,t),d=c.copy();if(Oc(new nu(h,"beforestart",o,t,u,p[0],p[1],0,0,d),(function(){return null!=(Ac.subject=o=a.apply(r,i))&&(s=o.x-p[0]||0,f=o.y-p[1]||0,!0)})))return function a(c){var g,v=p;switch(c){case"start":l[t]=a,g=u++;break;case"end":delete l[t],--u;case"drag":p=n(e,t),g=u}Oc(new nu(h,c,o,t,g,p[0]+s,p[1]+f,p[0]-v[0],p[1]-v[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:eu(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:eu(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:eu(t),h):a},h.touchable=function(t){return arguments.length?(s="function"==typeof t?t:eu(!!t),h):s},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h}nu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var lu=Math.PI,cu=2*lu,uu=1e-6,fu=cu-uu;function hu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pu(){return new hu}hu.prototype=pu.prototype={constructor:hu,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,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,c=o-t,u=a-e,f=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>uu)if(Math.abs(u*s-l*c)>uu&&i){var h=n-o,p=r-a,d=s*s+l*l,g=h*h+p*p,v=Math.sqrt(d),y=Math.sqrt(f),_=i*Math.tan((lu-Math.acos((d+f-g)/(2*v*y)))/2),m=_/y,x=_/v;Math.abs(m-1)>uu&&(this._+="L"+(t+m*c)+","+(e+m*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>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,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,c=e+s,u=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uu||Math.abs(this._y1-c)>uu)&&(this._+="L"+l+","+c),n&&(f<0&&(f=f%cu+cu),f>fu?this._+="A"+n+","+n+",0,1,"+u+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):f>uu&&(this._+="A"+n+","+n+",0,"+ +(f>=lu)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const du=pu;function gu(t){return function(){return t}}var vu=1e-12,yu=Math.PI,_u=yu/2,mu=2*yu;function xu(t){return t.innerRadius}function bu(t){return t.outerRadius}function wu(t){return t.startAngle}function Su(t){return t.endAngle}function ku(t){return t&&t.padAngle}function Tu(t){return t>=1?_u:t<=-1?-_u:Math.asin(t)}function Fu(t,e,n,r,i,o,a){var s=t-n,l=e-r,c=(a?o:-o)/Math.sqrt(s*s+l*l),u=c*l,f=-c*s,h=t+u,p=e+f,d=n+u,g=r+f,v=(h+d)/2,y=(p+g)/2,_=d-h,m=g-p,x=_*_+m*m,b=i-o,w=h*g-d*p,S=(m<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),k=(w*m-_*S)/x,T=(-w*_-m*S)/x,F=(w*m+_*S)/x,E=(-w*_+m*S)/x,A=k-v,C=T-y,M=F-v,L=E-y;return A*A+C*C>M*M+L*L&&(k=F,T=E),{cx:k,cy:T,x01:-u,y01:-f,x11:k*(i/b-1),y11:T*(i/b-1)}}function Eu(t){this._context=t}function Au(t){return new Eu(t)}function Cu(t){return t[0]}function Mu(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 Lu(t(e))}e._curve=t}(Au);function Lu(t){this._curve=t}Lu.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 zu=Math.sin(yu/10)/Math.sin(7*yu/10);Math.sin(mu/10),Math.cos(mu/10);Math.sqrt(3);Math.sqrt(3),Math.sqrt(12);function Ou(){}function Nu(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 Du(t){this._context=t}function Pu(t){this._context=t}function ju(t){this._context=t}function Ru(t,e){this._basis=new Du(t),this._beta=e}Du.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:Nu(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:Nu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Pu.prototype={areaStart:Ou,areaEnd:Ou,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:Nu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Nu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ru.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*a),this._beta*e[l]+(1-this._beta)*(o+r*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 Du(t):new Ru(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Iu(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 Gu(t,e){this._context=t,this._k=(1-e)/6}Gu.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:Iu(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:Iu(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 Gu(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Wu(t,e){this._context=t,this._k=(1-e)/6}Wu.prototype={areaStart:Ou,areaEnd:Ou,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:Iu(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 Wu(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Bu(t,e){this._context=t,this._k=(1-e)/6}Bu.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:Iu(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 Bu(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Hu(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>vu){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);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>vu){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);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Uu(t,e){this._context=t,this._alpha=e}Uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Hu(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 qu=function t(e){function n(t){return e?new Uu(t,e):new Gu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $u(t,e){this._context=t,this._alpha=e}$u.prototype={areaStart:Ou,areaEnd:Ou,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Hu(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 $u(t,e):new Wu(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Vu(t,e){this._context=t,this._alpha=e}Vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Hu(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 Vu(t,e):new Bu(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Yu(t){this._context=t}function Ju(t){return t<0?-1:1}function Xu(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Ju(o)+Ju(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ku(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Zu(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Qu(t){this._context=t}function tf(t){this._context=new ef(t)}function ef(t){this._context=t}function nf(t){this._context=t}function rf(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function of(t,e){this._context=t,this._t=e}Yu.prototype={areaStart:Ou,areaEnd:Ou,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))}},Qu.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:Zu(this,this._t0,Ku(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,Zu(this,Ku(this,n=Xu(this,t,e)),n);break;default:Zu(this,this._t0,n=Xu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tf.prototype=Object.create(Qu.prototype)).point=function(t,e){Qu.prototype.point.call(this,e,t)},ef.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,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},nf.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 r=rf(t),i=rf(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(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)}},of.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 af="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},sf=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},lf=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),cf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},uf=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},ff=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)},hf=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},pf=function(){function t(e){var n=e.x,r=void 0===n?0:n,i=e.y,o=void 0===i?0:i,a=e.nx,s=e.ny,l=e.dy,c=void 0===l?0:l,u=e.dx,f=void 0===u?0:u,h=e.color,p=void 0===h?"grey":h,d=e.data,g=e.type,v=e.subject,y=e.connector,_=e.note,m=e.disable,x=e.id,b=e.className;sf(this,t),this._dx=void 0!==a?a-r:f,this._dy=void 0!==s?s-o:c,this._x=r,this._y=o,this._color=p,this.id=x,this._className=b||"",this._type=g||"",this.data=d,this.note=_||{},this.connector=y||{},this.subject=v||{},this.disable=m||[]}return lf(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}(),df=function(){function t(e){var n=e.annotations,r=e.accessors,i=e.accessorsInverse;sf(this,t),this.accessors=r,this.accessorsInverse=i,this.annotations=n}return lf(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(r){n.data[r]=t.accessorsInverse[r]({x:e.x,y:e.y})}))),n}))}},{key:"noteNodes",get:function(){return this.annotations.map((function(t){return cf({},t.type.getNoteBBoxOffset(),{positionX:t.x,positionY:t.y})}))}}]),t}(),gf=function(t,e){return"dynamic"!==t&&"left"!==t&&"right"!==t||(t=e<0?"top":"bottom"),t},vf=function(t,e){return"dynamic"!==t&&"top"!==t&&"bottom"!==t||(t=e<0?"right":"left"),t},yf=["topBottom","top","bottom"],_f=["leftRight","left","right"],mf=function(t){var e=t.data,n=t.curve,r=void 0===n?Au:n,i=t.canvasContext,o=t.className,a=t.classID,s=function(){var t=Cu,e=Mu,n=gu(!0),r=null,i=Au,o=null;function a(a){var s,l,c,u=a.length,f=!1;for(null==r&&(o=i(c=du())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(l,s,a),+e(l,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:gu(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:gu(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:gu(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().curve(r),l={type:"path",className:o,classID:a,data:e};return i?(s.context(i),l.pathMethods=s):l.attrs={d:s(e)},l},xf=function(t){var e=t.data,n=t.canvasContext,r={type:"path",className:t.className,classID:t.classID,data:e},i=function(){var t=xu,e=bu,n=gu(0),r=null,i=wu,o=Su,a=ku,s=null;function l(){var l,c,u=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-_u,p=o.apply(this,arguments)-_u,d=Math.abs(p-h),g=p>h;if(s||(s=l=du()),f<u&&(c=f,f=u,u=c),f>vu)if(d>mu-vu)s.moveTo(f*Math.cos(h),f*Math.sin(h)),s.arc(0,0,f,h,p,!g),u>vu&&(s.moveTo(u*Math.cos(p),u*Math.sin(p)),s.arc(0,0,u,p,h,g));else{var v,y,_=h,m=p,x=h,b=p,w=d,S=d,k=a.apply(this,arguments)/2,T=k>vu&&(r?+r.apply(this,arguments):Math.sqrt(u*u+f*f)),F=Math.min(Math.abs(f-u)/2,+n.apply(this,arguments)),E=F,A=F;if(T>vu){var C=Tu(T/u*Math.sin(k)),M=Tu(T/f*Math.sin(k));(w-=2*C)>vu?(x+=C*=g?1:-1,b-=C):(w=0,x=b=(h+p)/2),(S-=2*M)>vu?(_+=M*=g?1:-1,m-=M):(S=0,_=m=(h+p)/2)}var L=f*Math.cos(_),z=f*Math.sin(_),O=u*Math.cos(b),N=u*Math.sin(b);if(F>vu){var D=f*Math.cos(m),P=f*Math.sin(m),j=u*Math.cos(x),R=u*Math.sin(x);if(d<yu){var I=w>vu?function(t,e,n,r,i,o,a,s){var l=n-t,c=r-e,u=a-i,f=s-o,h=(u*(e-o)-f*(t-i))/(f*l-u*c);return[t+h*l,e+h*c]}(L,z,j,R,D,P,O,N):[O,N],G=L-I[0],W=z-I[1],B=D-I[0],H=P-I[1],U=1/Math.sin(Math.acos((G*B+W*H)/(Math.sqrt(G*G+W*W)*Math.sqrt(B*B+H*H)))/2),q=Math.sqrt(I[0]*I[0]+I[1]*I[1]);E=Math.min(F,(u-q)/(U-1)),A=Math.min(F,(f-q)/(U+1))}}S>vu?A>vu?(v=Fu(j,R,L,z,f,A,g),y=Fu(D,P,O,N,f,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<F?s.arc(v.cx,v.cy,A,Math.atan2(v.y01,v.x01),Math.atan2(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,A,Math.atan2(v.y01,v.x01),Math.atan2(v.y11,v.x11),!g),s.arc(0,0,f,Math.atan2(v.cy+v.y11,v.cx+v.x11),Math.atan2(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,A,Math.atan2(y.y11,y.x11),Math.atan2(y.y01,y.x01),!g))):(s.moveTo(L,z),s.arc(0,0,f,_,m,!g)):s.moveTo(L,z),u>vu&&w>vu?E>vu?(v=Fu(O,N,D,P,u,-E,g),y=Fu(L,z,j,R,u,-E,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),E<F?s.arc(v.cx,v.cy,E,Math.atan2(v.y01,v.x01),Math.atan2(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,E,Math.atan2(v.y01,v.x01),Math.atan2(v.y11,v.x11),!g),s.arc(0,0,u,Math.atan2(v.cy+v.y11,v.cx+v.x11),Math.atan2(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,E,Math.atan2(y.y11,y.x11),Math.atan2(y.y01,y.x01),!g))):s.arc(0,0,u,b,x,g):s.lineTo(O,N)}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,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-yu/2;return[Math.cos(r)*n,Math.sin(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:gu(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:gu(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:gu(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:gu(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:gu(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:gu(+t),l):o},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:gu(+t),l):a},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?(i.context(n),r.pathMethods=lineGen):r.attrs={d:i()},r},bf=function(t){var e=t.type,n=t.subjectType,r=e.annotation,i=r.position,o=r.x-i.x,a=o+r.dx,s=r.y-i.y,l=s+r.dy,c=r.subject;if("circle"===n&&(c.outerRadius||c.radius)){var u=Math.sqrt((o-a)*(o-a)+(s-l)*(s-l)),f=Math.asin(-l/u),h=c.outerRadius||c.radius+(c.radiusPadding||0);o=Math.abs(Math.cos(f)*h)*(a<0?-1:1),s=Math.abs(Math.sin(f)*h)*(l<0?-1:1)}if("rect"===n){var p=c.width,d=c.height;(p>0&&r.dx>0||p<0&&r.dx<0)&&(o=Math.abs(p)>Math.abs(r.dx)?p/2:p),(d>0&&r.dy>0||d<0&&r.dy<0)&&(s=Math.abs(d)>Math.abs(r.dy)?d/2:d),o===p/2&&s===d/2&&(o=a,s=l)}return[[o,s],[a,l]]},wf=function(t){var e=t.type,n=t.connectorData,r=t.subjectType;n||(n={}),n.points&&"number"!=typeof n.points||(n.points=Sf(e.annotation.offset,n.points)),n.curve||(n.curve=qu);var i=[];if(e.editMode){var o=n.points.map((function(t,e){return cf({},function(t){var e=t.cx,n=void 0===e?0:e,r=t.cy;return{move:{x:n,y:void 0===r?0:r}}}({cx:t[0],cy:t[1]}),{index:e})})),a=function(t){n.points[t][0]+=Ac.dx,n.points[t][1]+=Ac.dy,e.redrawConnector()};i=e.mapHandles(o.map((function(t){return cf({},t.move,{drag:a.bind(e,t.index)})})))}var s=bf({type:e,subjectType:r});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:[mf({data:s,curve:n.curve,className:"connector"})],handles:i}},Sf=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=t.x/(e+1),r=t.y/(e+1),i=[],o=1;o<=e;o++)i.push([n*o+o%2*20,r*o-o%2*20]);return i},kf=function(t){var e=t.subjectData,n=t.type;e.radius||e.outerRadius||(e.radius=20);var r=[],i=xf({data:e,className:"subject"});if(n.editMode){var o=function(t){var e=t.cx,n=void 0===e?0:e,r=t.cy,i=void 0===r?0:r,o=t.r1,a=t.r2,s=t.padding,l={move:{x:n,y:i}};return void 0!==o&&(l.r1={x:n+o/Math.sqrt(2),y:i+o/Math.sqrt(2)}),void 0!==a&&(l.r2={x:n+a/Math.sqrt(2),y:i+a/Math.sqrt(2)}),void 0!==s&&(l.padding={x:n+o+s,y:i}),l}({r1:i.data.outerRadius||i.data.radius,r2:i.data.innerRadius,padding:e.radiusPadding}),a=function(t){var r=e[t]+Ac.dx*Math.sqrt(2);e[t]=r,n.redrawSubject(),n.redrawConnector()},s=[cf({},o.r1,{drag:a.bind(n,void 0!==e.outerRadius?"outerRadius":"radius")})];e.innerRadius&&s.push(cf({},o.r2,{drag:a.bind(n,"innerRadius")})),r=n.mapHandles(s)}return i.attrs["fill-opacity"]=0,{components:[i],handles:r}},Tf=function(){function t(e){var n=e.a,r=e.annotation,i=e.editMode,o=e.dispatcher,a=e.notePadding,s=e.accessors;if(sf(this,t),this.a=n,this.note=-1===r.disable.indexOf("note")&&n.select("g.annotation-note"),this.noteContent=this.note&&n.select("g.annotation-note-content"),this.connector=-1===r.disable.indexOf("connector")&&n.select("g.annotation-connector"),this.subject=-1===r.disable.indexOf("subject")&&n.select("g.annotation-subject"),this.dispatcher=o,o){var l=Df.bind(null,o,r);l({component:this.note,name:"note"}),l({component:this.connector,name:"connector"}),l({component:this.subject,name:"subject"})}this.annotation=r,this.editMode=r.editMode||i,this.notePadding=void 0!==a?a:3,this.offsetCornerX=0,this.offsetCornerY=0,s&&r.data&&this.init(s)}return lf(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 r=e.type,i=e.className,o=e.attrs,a=e.handles,s=e.classID;if("handle"===r)!function(t){var e=t.group,n=t.handles,r=t.r,i=void 0===r?10:r,o=e.selectAll("circle.handle").data(n);o.enter().append("circle").attr("class","handle").attr("fill","grey").attr("fill-opacity",.1).attr("cursor","move").attr("stroke-dasharray",5).attr("stroke","grey").call(su().container(Gc("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||i})).attr("class",(function(t){return"handle "+(t.className||"")})),o.exit().remove()}({group:t,r:o&&o.r,handles:a});else{Nf(t,[n.annotation],r,i,s);for(var l=t.select(r+"."+(s||i)),c=Object.keys(o),u=[],f=l.node().attributes,h=f.length-1;h>=0;h--){var p=f[h].name;-1===c.indexOf(p)&&"class"!==p&&u.push(p)}c.forEach((function(t){"text"===t?l.text(o[t]):l.attr(t,o[t])})),u.forEach((function(t){return l.attr(t,null)}))}}))}},{key:"getNoteBBox",value:function(){return jf(this.note,".annotation-note-content text")}},{key:"getNoteBBoxOffset",value:function(){var t=jf(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,r=e.type,i={type:this,subjectData:n},o={};"circle"===r?o=kf(i):"rect"===r?o=function(t){var e=t.subjectData,n=t.type;e.width||(e.width=100),e.height||(e.height=100);var r=[],i=e.width,o=e.height,a=mf({data:[[0,0],[i,0],[i,o],[0,o],[0,0]],className:"subject"});if(n.editMode){var s=[{x:i,y:o/2,drag:function(){e.width=Ac.x,n.redrawSubject(),n.redrawConnector()}.bind(n)},{x:i/2,y:o,drag:function(){e.height=Ac.y,n.redrawSubject(),n.redrawConnector()}.bind(n)}];r=n.mapHandles(s)}return a.attrs["fill-opacity"]=.1,{components:[a],handles:r}}(i):"threshold"===r?o=function(t){var e=t.subjectData,n=t.type.annotation.position,r=(void 0!==e.x1?e.x1:n.x)-n.x,i=(void 0!==e.x2?e.x2:n.x)-n.x,o=(void 0!==e.y1?e.y1:n.y)-n.y,a=(void 0!==e.y2?e.y2:n.y)-n.y;return{components:[mf({data:[[r,o],[i,a]],className:"subject"})]}}(i):"badge"===r&&(o=function(t){var e=t.subjectData,n=void 0===e?{}:e,r=t.type,i=void 0===r?{}:r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.typeSettings&&i.typeSettings.subject;n.radius||(a&&a.radius?n.radius=a.radius:n.radius=14),n.x||a&&a.x&&(n.x=a.x),n.y||a&&a.y&&(n.y=a.y);var s=[],l=[],c=n.radius,u=.7*c,f=0,h=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?f=d["x"+n.x]:n.y&&!n.x?h=d["y"+n.y]:n.x&&n.y&&(f=d["x"+n.x+"corner"],h=d["y"+n.y+"corner"]);var g="translate("+f+", "+h+")",v=xf({className:"subject",data:{radius:c}});v.attrs.transform=g,v.attrs.fill=o.color,v.attrs["stroke-linecap"]="round",v.attrs["stroke-width"]="3px";var y=xf({className:"subject-ring",data:{outerRadius:c,innerRadius:u}});y.attrs.transform=g,y.attrs["stroke-width"]="3px",y.attrs.fill="white";var _=void 0;if(f&&h||!f&&!h)_=mf({className:"subject-pointer",data:[[0,0],[f||0,0],[0,h||0],[0,0]]});else if(f||h){var m=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)};_=mf({className:"subject-pointer",data:[[0,0],[m(f),m(h)],[m(f,-1),m(h,-1)],[0,0]]})}if(_&&(_.attrs.fill=o.color,_.attrs["stroke-linecap"]="round",_.attrs["stroke-width"]="3px",l.push(_)),i.editMode){var x={x:2*f,y:2*h,drag:function(){n.x=Ac.x<2*-c?"left":Ac.x>2*c?"right":void 0,n.y=Ac.y<2*-c?"top":Ac.y>2*c?"bottom":void 0,i.redrawSubject()}.bind(i)};x.x||x.y||(x.y=-c),s=i.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:f,y:h}}),l.push(v),l.push(y),l.push(b),{components:l,handles:s}}(i,this.annotation));var a=o,s=a.components,l=void 0===s?[]:s,c=a.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,r=n.type||e.type,i={type:this,connectorData:n};i.subjectType=this.typeSettings&&this.typeSettings.subject&&this.typeSettings.subject.type;var o={};o="curve"===r?wf(i):"elbow"===r?function(t){var e=t.type,n=t.subjectType,r=e.annotation,i=r.position,o=r.x-i.x,a=o+r.dx,s=r.y-i.y,l=s+r.dy,c=r.subject;if("rect"===n){var u=c.width,f=c.height;(u>0&&r.dx>0||u<0&&r.dx<0)&&(o=Math.abs(u)>Math.abs(r.dx)?u/2:u),(f>0&&r.dy>0||f<0&&r.dy<0)&&(s=Math.abs(f)>Math.abs(r.dy)?f/2:f),o===u/2&&s===f/2&&(o=a,s=l)}var h=[[o,s],[a,l]],p=l-s,d=a-o,g=a,v=l,y=l<s&&a>o||a<o&&l>s?-1:1;if(Math.abs(d)<Math.abs(p)?(g=a,v=s+d*y):(v=l,g=o+p*y),"circle"===n&&(c.outerRadius||c.radius)){var _=(c.outerRadius||c.radius)+(c.radiusPadding||0),m=_/Math.sqrt(2);if(Math.abs(d)>m&&Math.abs(p)>m)h=[[o=m*(a<0?-1:1),s=m*(l<0?-1:1)],[g,v],[a,l]];else if(Math.abs(d)>Math.abs(p)){var x=Math.asin(-l/_);h=[[o=Math.abs(Math.cos(x)*_)*(a<0?-1:1),l],[a,l]]}else{var b=Math.acos(a/_);h=[[a,s=Math.abs(Math.sin(b)*_)*(l<0?-1:1)],[a,l]]}}else h=[[o,s],[g,v],[a,l]];return{components:[mf({data:h,className:"connector"})]}}(i):function(t){var e=bf(t);return{components:[mf({data:e,className:"connector"})]}}(i);var a=o,s=a.components,l=void 0===s?[]:s,c=a.handles,u=void 0===c?[]:c,f=l[0];f&&(f.attrs.stroke=this.annotation.color,f.attrs.fill="none");var h=n.end||e.end,p={};if("arrow"===h){var d=f.data[1],g=f.data[0];Math.sqrt(Math.pow(d[0]-g[0],2)+Math.pow(d[1]-g[1],2))<5&&f.data[2]&&(d=f.data[2]),p=function(t){var e=t.annotation,n=t.start,r=t.end,i=t.scale,o=void 0===i?1:i,a=e.position;n=n?[-r[0]+n[0],-r[1]+n[1]]:[e.dx,e.dy],r||(r=[e.x-a.x,e.y-a.y]);var s=r[0],l=r[1],c=n[0],u=n[1],f=10*o,h=16/180*Math.PI,p=Math.atan(u/c);c<0&&(p+=Math.PI);var d=[[s,l],[Math.cos(p+h)*f+s,Math.sin(p+h)*f+l],[Math.cos(p-h)*f+s,Math.sin(p-h)*f+l],[s,l]];return{components:[mf({data:d,className:"connector-end connector-arrow",classID:"connector-end"})]}}({annotation:this.annotation,start:d,end:g,scale:n.endScale})}else"dot"===h?p=function(t){var e=t.line,n=t.scale,r=void 0===n?1:n,i=xf({className:"connector-end connector-dot",classID:"connector-end",data:{radius:3*Math.sqrt(r)}});return i.attrs.transform="translate("+e.data[0][0]+", "+e.data[0][1]+")",{components:[i]}}({line:f,scale:n.endScale}):h&&"none"!==h||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,r=n.align||e.align||"dynamic",i={bbox:e.bbox,align:r,offset:this.annotation.offset},o=n.lineType||e.lineType,a={};"vertical"===o?a=function(t){var e=t.align,n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.bbox,s=t.offset;"top"===(e=gf(e,s.y))?o-=a.height:"middle"===e&&(o-=a.height/2);var l=[[r,o],[r,o+a.height]];return{components:[mf({data:l,className:"note-line"})]}}(i):"horizontal"===o&&(a=function(t){var e=t.align,n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.offset,s=t.bbox;"right"===(e=vf(e,a.x))?r-=s.width:"middle"===e&&(r-=s.width/2);var l=[[r,o],[r+s.width,o]];return{components:[mf({data:l,className:"note-line"})]}}(i));var s=a,l=s.components,c=void 0===l?[]:l,u=s.handles,f=void 0===u?[]:u;if(c.forEach((function(e){e.attrs.stroke=t.annotation.color})),this.editMode){f=this.mapHandles([{x:0,y:0,drag:this.dragNote.bind(this)}]),c.push({type:"handle",handles:f});var h=this.dragNote.bind(this),p=this.dragstarted.bind(this),d=this.dragended.bind(this);this.note.call(su().container(Gc("g.annotations").node()).on("start",(function(t){return p(t)})).on("drag",(function(t){return h(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,r=e.orientation||t.orientation||"topBottom",i=e.lineType||t.lineType,o=e.align||t.align||"dynamic";"vertical"===i?r="leftRight":"horizontal"===i&&(r="topBottom");var a=function(t){var e=t.padding,n=void 0===e?0:e,r=t.bbox,i=void 0===r?{x:0,y:0,width:0,height:0}:r,o=t.align,a=t.orientation,s=t.offset,l=void 0===s?{x:0,y:0}:s,c=-i.x,u=0;return-1!==yf.indexOf(a)?(o=vf(o,l.x),l.y<0&&"topBottom"===a||"top"===a?u-=i.height+n:u+=n,"middle"===o?c-=i.width/2:"right"===o&&(c-=i.width)):-1!==_f.indexOf(a)&&(o=gf(o,l.y),l.x<0&&"leftRight"===a||"left"===a?c-=i.width+n:c+=n,"middle"===o?u-=i.height/2:"top"===o&&(u-=i.height)),{x:c,y:u}}({padding:n,bbox:t.bbox,offset:this.annotation.offset,orientation:r,align:o}),s=a.x,l=a.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(){Ac.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+=Ac.dx,t.y+=Ac.dy,this.annotation.position=t}},{key:"dragNote",value:function(){var t=this.annotation.offset;t.x+=Ac.dx,t.y+=Ac.dy,this.annotation.offset=t}},{key:"mapHandles",value:function(t){var e=this;return t.map((function(t){return cf({},t,{start:e.dragstarted.bind(e),end:e.dragended.bind(e)})}))}}]),t}(),Ff=function(t,e,n){return function(t){function r(t){sf(this,r);var n=hf(this,(r.__proto__||Object.getPrototypeOf(r)).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 ff(r,t),lf(r,[{key:"className",value:function(){return""+(e.className||uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"className",this)&&uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"className",this).call(this)||"")}},{key:"drawSubject",value:function(t){return this.typeSettings.subject=cf({},e.subject,this.typeSettings.subject),uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"drawSubject",this).call(this,cf({},t,this.typeSettings.subject))}},{key:"drawConnector",value:function(t){return this.typeSettings.connector=cf({},e.connector,this.typeSettings.connector),uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"drawConnector",this).call(this,cf({},t,e.connector,this.typeSettings.connector))}},{key:"drawNote",value:function(t){return this.typeSettings.note=cf({},e.note,this.typeSettings.note),uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"drawNote",this).call(this,cf({},t,e.note,this.typeSettings.note))}},{key:"drawNoteContent",value:function(t){return uf(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"drawNoteContent",this).call(this,cf({},t,e.note,this.typeSettings.note))}}],[{key:"init",value:function(t,e){return uf(r.__proto__||Object.getPrototypeOf(r),"init",this).call(this,t,e),n&&(t=n(t,e)),t}}]),r}(t)},Ef=function(t){function e(t){sf(this,e);var n=hf(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.textWrap=t.textWrap||120,n.drawText(),n}return ff(e,t),lf(e,[{key:"updateTextWrap",value:function(t){this.textWrap=t,this.drawText()}},{key:"drawText",value:function(){if(this.note){Nf(this.note,[this.annotation],"g","annotation-note-content");var t=this.note.select("g.annotation-note-content");Nf(t,[this.annotation],"rect","annotation-note-bg"),Nf(t,[this.annotation],"text","annotation-note-label"),Nf(t,[this.annotation],"text","annotation-note-title");var e={height:0},n=this.a.select("text.annotation-note-label"),r=this.annotation.note&&this.annotation.note.wrap||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrap||this.textWrap,i=this.annotation.note&&this.annotation.note.wrapSplitter||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.wrapSplitter,o=this.annotation.note&&this.annotation.note.bgPadding||this.typeSettings&&this.typeSettings.note&&this.typeSettings.note.bgPadding,a={top:0,bottom:0,left:0,right:0};if("number"==typeof o?a={top:o,bottom:o,left:o,right:o}:o&&"object"===(void 0===o?"undefined":af(o))&&(a=cf(a,o)),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(Pf,r,i),e=s.node().getBBox()}n.text(this.annotation.note.label).attr("dx","0"),n.call(Pf,r,i),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+a.left+a.right).attr("height",l.height+a.top+a.bottom).attr("x",l.x-a.left).attr("y",-a.top).attr("fill","white").attr("fill-opacity",0)}}}]),e}(Tf),Af=Ff(Ef,{className:"label",note:{align:"middle"}}),Cf=Ff(Ef,{className:"callout",note:{lineType:"horizontal"}}),Mf=(Ff(Cf,{className:"callout elbow",connector:{type:"elbow"}}),Ff(Cf,{className:"callout curve",connector:{type:"curve"}}),Ff(Tf,{className:"badge",subject:{type:"badge"},disable:["connector","note"]}),Ff(Ef,{className:"callout circle",subject:{type:"circle"},note:{lineType:"horizontal"},connector:{type:"elbow"}})),Lf=Ff(Ef,{className:"callout rect",subject:{type:"rect"},note:{lineType:"horizontal"},connector:{type:"elbow"}}),zf=function(t){function e(){return sf(this,e),hf(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return ff(e,t),lf(e,[{key:"mapY",value:function(t){uf(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){uf(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}(Cf),Of=Ff(zf,{className:"callout xythreshold",subject:{type:"threshold"}}),Nf=function(t,e,n,r,i){var o=t.selectAll(n+"."+(i||r)).data(e);return o.enter().append(n).merge(o).attr("class",r),o.exit().remove(),t},Df=function(t,e,n){var r=n.component,i=n.name;r&&r.on("mouseover.annotations",(function(){t.call(i+"over",r,e)})).on("mouseout.annotations",(function(){return t.call(i+"out",r,e)})).on("click.annotations",(function(){return t.call(i+"click",r,e)}))},Pf=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.2;t.each((function(){for(var t=Gc(this),i=t.text().split(n||/[ \t\r\n]+/).reverse().filter((function(t){return""!==t})),o=void 0,a=[],s=t.text(null).append("tspan").attr("x",0).attr("dy","0.8em");o=i.pop();)a.push(o),s.text(a.join(" ")),s.node().getComputedTextLength()>e&&a.length>1&&(a.pop(),s.text(a.join(" ")),a=[o],s=t.append("tspan").attr("x",0).attr("dy",r+"em").text(o))}))},jf=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 r=e&&e.attributes&&e.attributes.y;return t.height=Math.max(t.height,(r&&parseFloat(r.value)||0)+n.height),t}),{x:0,y:0,width:0,height:0}):{x:0,y:0,width:0,height:0}};function Rf(){var t=[],e=void 0,n=void 0,r=[],i={},o={},a=!1,s=void 0,l=Cf,c=void 0,u=void 0,f=Zc("subjectover","subjectout","subjectclick","connectorover","connectorout","connectorclick","noteover","noteout","noteclick","dragend","dragstart"),h=void 0,p=function(n){h=n,a||n.selectAll("circle.handle").remove();var p=t.map((function(t){return t.type||(t.type=l),t.disable||(t.disable=r),new pf(t)}));e=e||new df({annotations:p,accessors:i,accessorsInverse:o,ids:s}),n.selectAll("g").data([e]).enter().append("g").attr("class","annotations");var d=n.select("g.annotations");Nf(d,e.annotations,"g","annotation");var g=d.selectAll("g.annotation");g.each((function(t){var e=Gc(this);e.attr("class","annotation"),Nf(e,[t],"g","annotation-connector"),Nf(e,[t],"g","annotation-subject"),Nf(e,[t],"g","annotation-note"),Nf(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:a,dispatcher:f,accessors:i}),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?(r=n,e&&(e.updateDisable(r),t=e.annotations),p):r},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,r){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=r&&r.subject||t.subject,t.connector=r&&r.connector||t.connector,t.note=r&&r.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(h)):e.annotations=t);return p},p.context=function(t){return arguments.length?(n=t,p):n},p.accessors=function(t){return arguments.length?(i=t,p):i},p.accessorsInverse=function(t){return arguments.length?(o=t,p):o},p.ids=function(t){return arguments.length?(s=t,p):s},p.editMode=function(n){return arguments.length?(a=n,h&&h.selectAll("g.annotation").classed("editable",a),e&&(e.editMode(a),t=e.annotations),p):a},p.collection=function(t){return arguments.length?(e=t,p):e},p.on=function(){var t=f.on.apply(f,arguments);return t===f?p:t},p}function If(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Gf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?If(Object(n),!0).forEach((function(e){fr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):If(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 r={annotationLabel:Af,annotationCallout:Cf,annotationCalloutRect:Lf,annotationCalloutCircle:Mf,annotationXYThreshold:Of},i=n.annotations.map((function(t){var e=r[t.type]||Af;return Gf(Gf({},t),{},{type:e})})),o=Rf().type(Af).annotations(i).editMode(n.editMode);e.append("g").attr("class","em-annotation-group").call(o)}}}var Bf=function(t,e){var n,r;t.labels_.config||(t.labels_.config=Vf),t.labels_.statLabelsPositions||(t.labels_.statLabelsPositions=Yf);var i=e.select("#em-labels"),o=i.empty()?e.append("g").attr("id","em-labels"):i;null!==(n=t.labels_)&&void 0!==n&&n.values&&"ps"!==t._mapType&&$f(t,o);var a=(null===(r=t.labels_)||void 0===r?void 0:r.labels)||Vf["".concat(t.geo,"_").concat(t.proj_,".cc")];if(a){var s,l=o.append("g").attr("class","em-label-shadows").attr("text-anchor","middle"),c=o.append("g").attr("class","em-labels").attr("text-anchor","middle");if(null!==(s=t.labels_)&&void 0!==s&&s.shadows)l.selectAll("text").data(a).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]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}));c.selectAll("text").data(a).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]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}},Hf=function(t){var e,n,r;if(t){t.svg_.selectAll("g.em-stat-label > *").remove(),t.svg_.selectAll("g.em-stat-label-shadow > *").remove();var i=t.svg_.selectAll("g.em-stat-label"),o=null!==(e=t.labels_)&&void 0!==e&&e.statLabelsFilterFunction?null===(n=t.labels_)||void 0===n?void 0:n.statLabelsFilterFunction:qf,a=t.statData();return i.filter((function(e){return o(e,t)})).each((function(e){var n=zt(this),r=Uf(e,a);t.labels_.backgrounds&&function(t,e){var n=5,r=2,i=e.append("text").attr("visibility","hidden").text(t).node().getBBox(),o=i.width,a=i.height;e.select('text[visibility="hidden"]').remove();var s=-o/2-n,l=-a/2-r;e.append("rect").attr("x",s).attr("y",l).attr("width",o+2*n).attr("height",a+2*r).attr("class","em-label-background")}(r,n),n.append("text").text(r).attr("class","em-stat-label-text")})),null!==(r=t.labels_)&&void 0!==r&&r.shadows&&t.svg_.selectAll("g.em-stat-label-shadow").filter((function(e){return o(e,t)})).append("text").text((function(t){return Uf(t,a)})),t}console.warn("No map specified")},Uf=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 nr(n.value)}},qf=function(t,e){var n=e.statData().get(t.properties.id);return!(!n||!n.value&&0!==n&&0!==n.value)},$f=function(t,e){var n,r=e.append("g").attr("class","em-stat-labels-shadows").attr("text-anchor","middle"),i=e.append("g").attr("class","em-stat-labels").attr("text-anchor","middle"),o=[];t.Geometries.geoJSONs.nutsrg?o="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&&(o=t.Geometries.statisticalRegions.features);var a=o.filter((function(t,e,n){return e===n.findIndex((function(e){return e.properties.id===t.properties.id}))}));i.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){if(t.labels_.statLabelsPositions[e.properties.id]){var n=t.labels_.statLabelsPositions[e.properties.id],r=t._projection([n.x,n.y]),i=r[0].toFixed(3),o=r[1].toFixed(3);return"translate(".concat(i,",").concat(o,")")}var a=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(a=t.labels_.processValueLabelCentroids(e,a)),"translate("+a+")"})).attr("class","em-stat-label"),null!==(n=t.labels_)&&void 0!==n&&n.shadows&&r.selectAll("g").data(o).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]),r=n[0].toFixed(3),i=n[1].toFixed(3);return"translate(".concat(r,",").concat(i,")")}var o=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(o=t.labels_.processValueLabelCentroids(e,o)),"translate("+o+")"})).attr("class","em-stat-label-shadow")},Vf={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}]}},Yf={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 Jf(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}var Xf=n(756),Kf=n.n(Xf);function Zf(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Qf(t,e){return fetch(t,e).then(Zf)}function th(t){return t}function eh(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return nh(t,e)}))}:nh(t,e)}function nh(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=function(t,e){var n=function(t){if(null==t)return th;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],a=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])*r+o,u[1]=(n+=t[1])*i+a;l<c;)u[l]=t[l],++l;return u}}(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],o=0,a=i.length;o<a;++o)e.push(n(i[o],o));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,a)}function o(t){return n(t)}function a(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(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=o(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(o);break;case"LineString":e=a(t.arcs);break;case"MultiLineString":e=t.arcs.map(a);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==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}var rh={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 ih(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function oh(t,e,n){var r=ih(t,e-Ii,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function ah(t,e,n){var r=ih(t,e-Ii,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function sh(){var t,e,n,r,i,o,a,s,l,c,u,f,h=10,p=h,d=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:_()}}function _(){return ih(Ki(r/d)*d,n,d).map(u).concat(ih(Ki(s/g)*g,a,g).map(f)).concat(ih(Ki(e/h)*h,t,h).filter((function(t){return Vi(t%d)>Ii})).map(l)).concat(ih(Ki(o/p)*p,i,p).filter((function(t){return Vi(t%g)>Ii})).map(c))}return y.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(v)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(v)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],y):[d,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(v=+h,l=oh(o,i,90),c=ah(e,t,v),u=oh(s,a,90),f=ah(r,n,v),y):v},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function lh(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function ch(t,e){let n;return(r,i)=>(()=>{if(n)return n;const r=indexedDB.open(t);return r.onupgradeneeded=()=>r.result.createObjectStore(e),n=lh(r),n.then((t=>{t.onclose=()=>n=void 0}),(()=>{})),n})().then((t=>i(t.transaction(e,r).objectStore(e))))}let uh;function fh(){return uh||(uh=ch("keyval-store","keyval")),uh}function hh(t,e=fh()){return e("readonly",(e=>lh(e.get(t))))}function ph(t,e,n=fh()){return n("readwrite",(n=>(n.put(e,t),lh(n.transaction))))}var dh=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.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,r,i){var o=n.getDefaultGeoDataPromise();return Promise.all(o).then((function(o){return r&&(o=r(o)),n.allNUTSGeoData=o,n.defaultGeoData=o[0],e&&(n.centroidsData="mixed"===i?[o[4],o[5],o[6],o[7]]:o[1]),"WORLD"===t?(n.geoJSONs.worldrg=eh(n.defaultGeoData,n.defaultGeoData.objects.CNTR_RG_20M_2020_4326).features,n.geoJSONs.worldbn=eh(n.defaultGeoData,n.defaultGeoData.objects.CNTR_BN_20M_2020_4326).features,n.geoJSONs.kosovo=eh(n.defaultGeoData,n.defaultGeoData.objects.NUTS_BN_20M_2021_RS_XK_border).features,n.geoJSONs.graticule=[sh().step([30,30])()]):(n.geoJSONs.graticule=eh(n.defaultGeoData,n.defaultGeoData.objects.gra).features,n.geoJSONs.nutsrg=eh(n.defaultGeoData,n.defaultGeoData.objects.nutsrg).features,n.geoJSONs.nutsbn=eh(n.defaultGeoData,n.defaultGeoData.objects.nutsbn).features,n.geoJSONs.cntrg=eh(n.defaultGeoData,n.defaultGeoData.objects.cntrg).features,n.geoJSONs.cntbn=eh(n.defaultGeoData,n.defaultGeoData.objects.cntbn).features),o})).catch((function(t){return Promise.reject(t)}))},n.getDefaultGeoDataPromise=function(){var n=[0,1,2,3],r=[],i=function(t,e,n,r,i,o){var a=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":r),!a&&i&&(s+="/".concat(i)),s+="/".concat(a?"nutspt_":"").concat(o,".json")},o=function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Jf(o,r,i,a,s,"next",t)}function s(t){Jf(o,r,i,a,s,"throw",t)}a(void 0)}))}}(Kf().mark((function t(e){var n,r,i,o,a;return Kf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="geojson-cache:".concat(e),t.prev=1,t.next=4,hh(n);case 4:if(!(r=t.sent)){t.next=10;break}if(i=r.timestamp,o=r.data,!(Date.now()-i<864e5)){t.next=10;break}return t.abrupt("return",o);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,Qf(e);case 18:return a=t.sent,t.prev=19,t.next=22,ph(n,{timestamp:Date.now(),data:a});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",a);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=i(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e);r.push(o(n))})),e&&n.forEach((function(e){var n=i(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,e,!0);r.push(o(n))}));else if("WORLD"===t.geo_){var a=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";r.push(o(a))}else{var s=i(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_);if(r.push(o(s)),e){var l=i(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_,!0);r.push(o(l))}}return r},n.isGeoReady=function(){if(!n.defaultGeoData&&!n.userGeometries)return!1;var e=!0;return rr(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,r,i,o,a,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",r),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",r).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",r),this.geoJSONs.nutsrg&&("mixed"==i?(this.geoJSONs.mixed.rg0=this.geoJSONs.nutsrg,this.geoJSONs.mixed.rg1=eh(n.allNUTSGeoData[1],n.allNUTSGeoData[1].objects.nutsrg).features,this.geoJSONs.mixed.rg2=eh(n.allNUTSGeoData[2],n.allNUTSGeoData[2].objects.nutsrg).features,this.geoJSONs.mixed.rg3=eh(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",r).attr("lvl",n)})),"EUR"!=a||"3035"!=s&&"4326"!=s||function(t,e,n,r,i){var o=rh[i]?rh[i][n][r]:rh[2024][n][r],a=eh(o,"nutsbn_1").features;t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn em-bn-cc").selectAll("path").data(a).enter().append("path").attr("d",e)}(t,r,s,l,o)):t.append("g").attr("id","em-nutsrg").attr("class","em-nutsrg").selectAll("path").data(this.geoJSONs.nutsrg).enter().append("path").attr("d",r)),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",r).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"!==i&&(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",r).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",r).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",r)},n.addUserGeometriesToMap=function(t,e,n){t.forEach((function(t){var r=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(r)}))},n},gh=function(t,e,n){var r=gp(t,n);for(var i in(t=t||{}).proj=t.proj||yh[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){r[t]=e[t]})),["stat","statData","legend","legendObj","noDataText","language","transitionDuration","tooltip_","classToText_"].forEach((function(t){r[t]=e[t]})),t)r[i+"_"]=t[i];return r.isInset=!0,r},vh=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}],r=0;r<n.length;r++)n[r].drawGraticule=!1;return n},yh={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"},_h=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 r=t.text,i=Math.sqrt(xh(r.trim())*t.lineHeight),o=wh(mh(r.trim()),i),a=bh(o,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/a,")")).selectAll("tspan").data(o).enter().append("tspan").attr("x",0).attr("y",(function(e,n){return(n-o.length/2+.8)*t.lineHeight})).text((function(t){return t.text.replaceAll("~"," ").replaceAll("¶","")}))}},mh=function(t){return t.split(/(?<=¶)|\s+/g).map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},xh=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 r=n.getComputedTextLength();return document.body.removeChild(e),r+10},bh=function(t,e){for(var n=0,r=0,i=t.length;r<i;++r){var o=(Math.abs(r-i/2+.5)+.5)*e,a=t[r].width/2;n=Math.max(n,Math.sqrt(Math.pow(a,2)+Math.pow(o,2)))}return n},wh=function(t,e){for(var n=[],r={width:0,text:""},i=0,o=t.length;i<o;++i)if("¶"!==t[i]){var a=(r.text?r.text+" ":"")+t[i],s=xh(a);(r.width+s)/2<e?(r.width=s,r.text=a):(n.push(r),r={width:xh(t[i]),text:t[i]})}else r.text&&n.push(r),r={width:0,text:""};return r.text&&n.push(r),n},Sh={},kh={};function Th(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Fh(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Eh(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Ah(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Eh(-e,6):e>9999?"+"+Eh(e,6):Eh(e,4))+"-"+Eh(t.getUTCMonth()+1,2)+"-"+Eh(t.getUTCDate(),2)+(o?"T"+Eh(n,2)+":"+Eh(r,2)+":"+Eh(i,2)+"."+Eh(o,3)+"Z":i?"T"+Eh(n,2)+":"+Eh(r,2)+":"+Eh(i,2)+"Z":r||n?"T"+Eh(n,2)+":"+Eh(r,2)+"Z":"")}function Ch(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,l=o<=0,c=!1;function u(){if(l)return kh;if(c)return c=!1,Sh;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?l=!0:10===(r=t.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))c=!0;else if(13===r)c=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return l=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=u())!==kh;){for(var f=[];r!==Sh&&r!==kh;)f.push(r),r=u();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?Ah(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Th(t);return function(r,i){return e(n(r),i,t)}}(t,e):Th(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=Fh(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Fh(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}var Mh=Ch(","),Lh=Mh.parse,zh=Mh.parseRows,Oh=(Mh.format,Mh.formatBody,Mh.formatRows,Mh.formatRow,Mh.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, , , ")}),Nh=function(t){var e=new Map;return zh(t.trim(),(function(t,n){t.forEach((function(t,r){(t=t.trim())&&e.set(t,[r,n])}))})),e},Dh=function(t,e){return Array.from(t,(function(t){var n=Yn(t,2),r=n[0],i=Yn(n[1],2),o=i[0],a=i[1],s=e.Geometries.geoJSONs.nutsrg.find((function(t){return t.properties.id==r}));return{id:r,col:o,row:a,properties:{id:r,name:s?s.properties.na:""}}}))},Ph=function(t,e,n){var r=Math.max.apply(Math,_(e.map((function(t){return t.col}))))+1,i=Math.max.apply(Math,_(e.map((function(t){return t.row}))))+1,o=n.gridCartogramMargins_,a=n.gridCartogramCellPadding_||0,s=(n.width_-o.left-o.right)/r-a,l=(n.height_-o.top-o.bottom)/i-a,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+a)+o.left,", ").concat(t.row*(c+a)+o.top,")")})).each((function(t){zt(this).append("rect").attr("width",c).attr("height",c).attr("class","em-grid-rect"),zt(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)}))},jh=function(t,e,n){var r=Math.max.apply(Math,_(e.map((function(t){return t.col}))))+1,i=Math.max.apply(Math,_(e.map((function(t){return t.row}))))+1,o=n.gridCartogramMargins_,a=n.gridCartogramCellPadding_||0,s=Math.min((n.width_-o.left-o.right)/(1.5*r),(n.height_-o.top-o.bottom)/(i*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+a)+o.left,n=t.row*(l+a)+(t.col%2==1?(l+a)/2:0)+o.top;return"translate(".concat(e,", ").concat(n,")")})).each((function(t){zt(this).append("path").attr("d",Rh(s)).attr("class","em-grid-hexagon"),zt(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)}))},Rh=function(t){var e=Math.PI/3;return Array.from({length:6},(function(n,r){var i=t*Math.cos(e*r),o=t*Math.sin(e*r);return"".concat(0===r?"M":"L").concat(i,",").concat(o)})).join(" ")+" Z"},Ih=function(t,e,n,r){t.each((function(){var i=this.getBBox(),o=(e-r.left-r.right-i.width)/2-i.x+r.left,a=(n-r.top-r.bottom-i.height)/2-i.y+r.top;t.attr("transform","translate(".concat(o,", ").concat(a,")"))}))};function Gh(t){return[Ji(t[1],t[0]),no(t[2])]}function Wh(t){var e=t[0],n=t[1],r=Xi(n);return[r*Xi(e),r*Qi(e),Qi(n)]}function Bh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hh(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 Uh(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function qh(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $h(t){var e=eo(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Vh(t){return Vi(t[0])<=Wi?t[0]:to(t[0])*((Vi(t[0])+Wi)%Ui-Wi)}function Yh(t,e,n,r){return function(i){var o,a,s,l=e(i),c=io(),u=e(c),f=!1,h={point:p,lineStart:g,lineEnd:v,polygonStart:function(){h.point=y,h.lineStart=_,h.lineEnd=m,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=v,a=co(a);var t=function(t,e){var n=Vh(e),r=e[1],i=Qi(r),o=[Qi(n),-Xi(n),0],a=0,s=0,l=new No;1===i?r=Bi+Ii:-1===i&&(r=-Bi-Ii);for(var c=0,u=t.length;c<u;++c)if(h=(f=t[c]).length)for(var f,h,p=f[h-1],d=Vh(p),g=p[1]/2+Hi,v=Qi(g),y=Xi(g),_=0;_<h;++_,d=x,v=w,y=S,p=m){var m=f[_],x=Vh(m),b=m[1]/2+Hi,w=Qi(b),S=Xi(b),k=x-d,T=k>=0?1:-1,F=T*k,E=F>Wi,A=v*w;if(l.add(Ji(A*T*Qi(F),y*S+A*Xi(F))),a+=E?k+T*Ui:k,E^d>=n^x>=n){var C=Hh(Wh(p),Wh(m));$h(C);var M=Hh(o,C);$h(M);var L=(E^k>=0?-1:1)*no(M[2]);(r>L||r===L&&(C[0]||C[1]))&&(s+=E^k>=0?1:-1)}}return(a<-Ii||a<Ii&&l<-1e-12)^1&s}(o,r);a.length?(f||(i.polygonStart(),f=!0),so(a,Xh,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){l.point(t,e)}function g(){h.point=d,l.lineStart()}function v(){h.point=p,l.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function _(){u.lineStart(),s=[]}function m(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,l=u.clean(),h=c.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&l){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&l&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Jh))}return h}}function Jh(t){return t.length>1}function Xh(t,e){return((t=t.x)[0]<0?t[1]-Bi-Ii:Bi-t[1])-((e=e.x)[0]<0?e[1]-Bi-Ii:Bi-e[1])}const Kh=Yh((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?Wi:-Wi,l=Vi(o-n);Vi(l-Wi)<Ii?(t.point(n,r=(r+a)/2>0?Bi:-Bi),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&l>=Wi&&(Vi(n-i)<Ii&&(n-=i*Ii),Vi(o-s)<Ii&&(o-=s*Ii),r=function(t,e,n,r){var i,o,a=Qi(t-n);return Vi(a)>Ii?Yi((Qi(e)*(o=Xi(r))*Qi(n)-Qi(r)*(i=Xi(e))*Qi(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Bi,r.point(-Wi,i),r.point(0,i),r.point(Wi,i),r.point(Wi,0),r.point(Wi,-i),r.point(0,-i),r.point(-Wi,-i),r.point(-Wi,0),r.point(-Wi,i);else if(Vi(t[0]-e[0])>Ii){var o=t[0]<e[0]?Wi:-Wi;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Wi,-Bi]);function Zh(t,e,n,r,i,o){if(n){var a=Xi(e),s=Qi(e),l=r*n;null==i?(i=e+r*Ui,o=e-l/2):(i=Qh(a,i),o=Qh(a,o),(r>0?i<o:i>o)&&(i+=r*Ui));for(var c,u=i;r>0?u>o:u<o;u-=l)c=Gh([a,-s*Xi(u),-s*Qi(u)]),t.point(c[0],c[1])}}function Qh(t,e){(e=Wh(e))[0]-=t,$h(e);var n=function(t){return t>1?0:t<-1?Wi:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+Ui-Ii)%Ui}function tp(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function ep(t,e){return Vi(t)>Wi&&(t-=Math.round(t/Ui)*Ui),[t,e]}function np(t,e,n){return(t%=Ui)?e||n?tp(ip(t),op(e,n)):ip(t):e||n?op(e,n):ep}function rp(t){return function(e,n){return Vi(e+=t)>Wi&&(e-=Math.round(e/Ui)*Ui),[e,n]}}function ip(t){var e=rp(t);return e.invert=rp(-t),e}function op(t,e){var n=Xi(t),r=Qi(t),i=Xi(e),o=Qi(e);function a(t,e){var a=Xi(e),s=Xi(t)*a,l=Qi(t)*a,c=Qi(e),u=c*n+s*r;return[Ji(l*i-u*o,s*n-c*r),no(u*i+l*o)]}return a.invert=function(t,e){var a=Xi(e),s=Xi(t)*a,l=Qi(t)*a,c=Qi(e),u=c*i-l*o;return[Ji(l*i+c*o,s*n+u*r),no(u*n-s*r)]},a}ep.invert=ep;var ap=Xi(30*$i);function sp(t,e){return+e?function(t,e){function n(r,i,o,a,s,l,c,u,f,h,p,d,g,v){var y=c-r,_=u-i,m=y*y+_*_;if(m>4*e&&g--){var x=a+h,b=s+p,w=l+d,S=eo(x*x+b*b+w*w),k=no(w/=S),T=Vi(Vi(w)-1)<Ii||Vi(o-f)<Ii?(o+f)/2:Ji(b,x),F=t(T,k),E=F[0],A=F[1],C=E-r,M=A-i,L=_*C-y*M;(L*L/m>e||Vi((y*C+_*M)/m-.5)>.3||a*h+s*p+l*d<ap)&&(n(r,i,o,a,s,l,E,A,T,x/=S,b/=S,w,g,v),v.point(E,A),n(E,A,T,x,b,w,c,u,f,h,p,d,g,v))}}return function(e){var r,i,o,a,s,l,c,u,f,h,p,d,g={point:v,lineStart:y,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=_,e.lineStart()}function _(r,i){var o=Wh([r,i]),a=t(r,i);n(u,f,c,h,p,d,u=a[0],f=a[1],c=r,h=o[0],p=o[1],d=o[2],16,e),e.point(u,f)}function m(){g.point=v,e.lineEnd()}function x(){y(),g.point=b,g.lineEnd=w}function b(t,e){_(r=t,e),i=u,o=f,a=h,s=p,l=d,g.point=_}function w(){n(u,f,c,h,p,d,i,o,r,a,s,l,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var lp,cp=go({point:function(t,e){this.stream.point(t*$i,e*$i)}});function up(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=Xi(o),s=Qi(o),l=a*t,c=s*t,u=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(t,o){return[l*(t*=r)-c*(o*=i)+e,n-c*t-l*o]}return d.invert=function(t,e){return[r*(u*t-f*e+h),i*(p-f*t-u*e)]},d}function fp(t){return function(t){var e,n,r,i,o,a,s,l,c,u,f=150,h=480,p=250,d=0,g=0,v=0,y=0,_=0,m=0,x=1,b=1,w=null,S=Kh,k=null,T=po,F=.5;function E(t){return l(t[0]*$i,t[1]*$i)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*qi,t[1]*qi]}function C(){var t=up(f,0,0,x,b,m).apply(null,e(d,g)),r=up(f,h-t[0],p-t[1],x,b,m);return n=np(v,y,_),s=tp(e,r),l=tp(n,s),a=sp(s,F),M()}function M(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=cp(function(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(S(a(T(u=t)))))},E.preclip=function(t){return arguments.length?(S=t,w=void 0,M()):S},E.postclip=function(t){return arguments.length?(T=t,k=r=i=o=null,M()):T},E.clipAngle=function(t){return arguments.length?(S=+t?function(t){var e=Xi(t),n=2*$i,r=e>0,i=Vi(e)>Ii;function o(t,n){return Xi(t)*Xi(n)>e}function a(t,n,r){var i=[1,0,0],o=Hh(Wh(t),Wh(n)),a=Bh(o,o),s=o[0],l=a-s*s;if(!l)return!r&&t;var c=e*a/l,u=-e*s/l,f=Hh(i,o),h=qh(i,c);Uh(h,qh(o,u));var p=f,d=Bh(h,p),g=Bh(p,p),v=d*d-g*(Bh(h,h)-1);if(!(v<0)){var y=eo(v),_=qh(p,(-d-y)/g);if(Uh(_,h),_=Gh(_),!r)return _;var m,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(m=x,x=b,b=m);var k=b-x,T=Vi(k-Wi)<Ii;if(!T&&S<w&&(m=w,w=S,S=m),T||k<Ii?T?w+S>0^_[1]<(Vi(_[0]-x)<Ii?w:S):w<=_[1]&&_[1]<=S:k>Wi^(x<=_[0]&&_[0]<=b)){var F=qh(p,(-d+y)/g);return Uh(F,h),[_,Gh(F)]}}}function s(e,n){var i=r?t:Wi-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Yh(o,(function(t){var e,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=o(f,h),v=r?g?0:s(f,h):g?s(f+(f<0?Wi:-Wi),h):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=a(e,d))||oo(e,p)||oo(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var y;v&n||!(y=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&oo(e,d)||t.point(d[0],d[1]),e=d,l=g,n=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),(function(e,r,i,o){Zh(o,t,n,i,e,r)}),r?[0,-t]:[-Wi,t-Wi])}(w=t*$i):(w=null,Kh),M()):w*qi},E.clipExtent=function(t){return arguments.length?(T=null==t?(k=r=i=o=null,po):ho(k=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),M()):null==k?null:[[k,r],[i,o]]},E.scale=function(t){return arguments.length?(f=+t,C()):f},E.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],C()):[h,p]},E.center=function(t){return arguments.length?(d=t[0]%360*$i,g=t[1]%360*$i,C()):[d*qi,g*qi]},E.rotate=function(t){return arguments.length?(v=t[0]%360*$i,y=t[1]%360*$i,_=t.length>2?t[2]%360*$i:0,C()):[v*qi,y*qi,_*qi]},E.angle=function(t){return arguments.length?(m=t%360*$i,C()):m*qi},E.reflectX=function(t){return arguments.length?(x=t?-1:1,C()):x<0},E.reflectY=function(t){return arguments.length?(b=t?-1:1,C()):b<0},E.precision=function(t){return arguments.length?(a=sp(s,F=t*t),M()):eo(F)},E.fitExtent=function(t,e){return Mo(E,t,e)},E.fitSize=function(t,e){return Lo(E,t,e)},E.fitWidth=function(t,e){return zo(E,t,e)},E.fitHeight=function(t,e){return Oo(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,C()}}((function(){return t}))()}function hp(t,e){return[Xi(e)*Qi(t),Qi(e)]}hp.invert=(lp=no,function(t,e){var n=eo(t*t+e*e),r=lp(n),i=Qi(r),o=Xi(r);return[Ji(t*i,n*o),no(n&&e*i/n)]});var pp=function(t){if(t.svg_){var e=t.minimap_||{},n=e.countryId||"DE",r=e.x||80,i=e.y||80,o=e.z||160,a=e.color||"#3792B6",s=function(e){var s=t.svg_.append("g").attr("id","em-minimap").attr("transform","translate(".concat(r,",").concat(i,")"));s.append("circle").attr("r",80).attr("cx",0).attr("cy",0).attr("fill","white").attr("stroke",a).attr("stroke-width",3);var l=fp(hp).scale(249.5).clipAngle(90.000001).scale(o).translate([0,0]),c=Na().projection(l),u=e.find((function(t){return t.properties.id===n}));if(!u)return console.warn("Country ID ".concat(n," not found in geometries"));var f=Yn(c.bounds(u),2),h=Yn(f[0],2),p=h[0],d=h[1],g=Yn(f[1],2),v=[(p+g[0])/2,(d+g[1])/2],y=Yn(l.invert(v),2),_=y[0],m=y[1];l.rotate([-_,-m]),s.append("defs").append("clipPath").attr("id","minimap-clip").append("circle").attr("r",80).attr("cx",0).attr("cy",0);var x=s.append("g").attr("clip-path","url(#minimap-clip)");x.selectAll("path.country").data(e).enter().append("path").attr("d",c).attr("fill","#e0e0e0"),x.append("path").datum(u).attr("d",c).attr("fill",a).attr("stroke",a).attr("stroke-width",.5),s.append("circle").attr("r",80).attr("cx",0).attr("cy",0).attr("fill","none").attr("stroke",a).attr("stroke-width",3)};t.Geometries.geoJSONs.worldrg?s(t.Geometries.geoJSONs.worldrg):Qf("https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json").then((function(t){var e=eh(t,t.objects.CNTR_RG_20M_2020_4326).features;s(e)})).catch((function(t){return console.error("Failed to load WORLD_4326.json",t)}))}};function dp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var gp=function(t,e,n){var r={};r._mapType=n,r.updateValuesLabels=Hf,r.svgId_="map",r.svg_=void 0,r.width_=Math.min(795,window.innerWidth),r.height_=0,r.containerId_=void 0,r.gridCartogram_=!1,r.gridCartogramShape_="square",r.gridCartogramMargins_={top:80,right:50,bottom:80,left:150},r.gridCartogramCellPadding_=4,r.gridCartogramPositions_=void 0,r.nutsLevel_=3,r.nutsYear_=2024,r.geo_="EUR",r.proj_="3035",r.projectionFunction_=void 0,r.filterGeometriesFunction_=void 0,r.scale_="20M",r.zoomExtent_=void 0,r.maxBounds_={xMin:-1/0,yMin:-1/0,xMax:1/0,yMax:1/0},r.geometries_=void 0,r.processCentroids_=void 0,r.position_={x:void 0,y:void 0,z:void 0},r.title_="",r.titlePosition_=void 0,r.subtitle_="",r.subtitlePosition_=void 0,r.showScalebar_=!1,r.scalebarPosition_=[],r.scalebarUnits_=" km",r.scalebarTextOffset_=[0,12],r.scalebarMaxWidth_=150,r.scalebarHeight_=90,r.scalebarStrokeWidth_=1,r.scalebarSegmentHeight_=6,r.scalebarTickHeight_=8,r.stamp_=void 0,r.minimap_=void 0,r.tooltip_={fontSize:"14px",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1,omitList:!1},r.hoverColor_="red",r.drawCoastalMargin_=!1,r.coastalMarginStdDev_=3,r.drawGraticule_=!1,r.backgroundMap_=!0,r.labels_=void 0,r.annotations_=void 0,r.annotationsAdded=!1,r.patternFill_=void 0,r.showSourceLink_=!0,r.footnote_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",r.footnoteTooltipText_="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.",r.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",r.noDataFillStyle_="#bcbcbc",r.insets_=[],r.insetTemplates_={},r.insetBoxPosition_=void 0,r.insetBoxPadding_=5,r.insetBoxWidth_=210,r.insetZoomExtent_=null,r.insetScale_="03M";var i=function(t){r[t.substring(0,t.length-1)]=function(e){return arguments.length?(r[t]=e,r):r[t]}};for(var o in r)i(o);!function(t){t.seaFillStyle=function(e){return console.warn("seaFillStyle() is now DEPRECATED, please use the .em-sea CSS class"),Kn(".em-sea","fill",e),t},t.cntrgFillStyle=function(e){return console.warn("cntrgFillStyle() is now DEPRECATED, please use the .em-cntrg CSS class"),Kn(".em-cntrg","fill",e),t},t.nutsrgFillStyle=function(e){return console.warn("nutsrgFillStyle() is now DEPRECATED, please use the .em-nutsrg CSS class"),Kn(".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]&&Kn(".bn_0","stroke",e[0]),e[1]&&Kn(".bn_1","stroke",e[1]),e[2]&&Kn(".bn_2","stroke",e[2]),e[3]&&Kn(".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]&&Kn(".bn_0","stroke-width",e[0]),e[1]&&Kn(".bn_1","stroke-width",e[1]),e[2]&&Kn(".bn_2","stroke-width",e[2]),e[3]&&Kn(".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"),Kn(".em-graticule","stroke",e),t},t.graticuleStrokeWidth=function(e){return console.warn("graticuleStrokeWidth() is now DEPRECATED, please use the .em-graticule CSS class"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".em-title","fill",e),t},t.subtitleFill=function(e){return console.warn("map.subtitleFill() is now DEPRECATED. please use the .em-subtitle CSS class"),Kn(".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&&Kn(".em-bn-eu","stroke",e.eu),e.efta&&Kn(".em-bn-efta","stroke",e.efta),e.cc&&Kn(".em-bn-cc","stroke",e.cc),e.oth&&Kn(".em-bn-oth","stroke",e.oth),e.co&&Kn(".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&&Kn(".em-bn-eu","stroke-width",e.eu),e.efta&&Kn(".em-bn-efta","stroke-width",e.efta),e.cc&&Kn(".em-bn-cc","stroke-width",e.cc),e.oth&&Kn(".em-bn-oth","stroke-width",e.oth),e.co&&Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn("#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"),Kn("#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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".em-frame","stroke",e),t},t.frameStrokeWidth=function(e){return console.warn("map.frameStrokeWidth() is now DEPRECATED. please use the .em-frame CSS class"),Kn(".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}}(r),r.geo=function(t){return arguments.length?(r.geo_=t.toUpperCase(),r):r.geo_},["tooltip_","nuts2jsonBaseURL_","processCentroids_"].forEach((function(t){r[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return r[t];if("object"!==cr(e)||null===e||Array.isArray(e))r[t]=e;else for(var n in e)r[t][n]=e[n];return r.insetTemplates_&&rr(r.insetTemplates_,r.svgId_,(function(e,n){e[t.substring(0,t.length-1)](n)}),e),r}})),r.title=function(t){return arguments.length?(r.title_=t,r.svg()&&r.svg().select("#title"+r.geo()).text(t),r):r.title_},r.subtitle=function(t){return arguments.length?(r.subtitle_=t,r.svg()&&r.svg().select("#subtitle"+r.geo()).text(t),r):r.subtitle_},r.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?r.insets_="default":1==arguments.length&&!1===arguments[0]?r.insets_=!1:1==arguments.length&&Array.isArray(arguments[0])?r.insets_=arguments[0]:r.insets_=arguments,r):r.insets_},r.drawGraticule=function(t){if(!arguments.length)return r.drawGraticule_;r.drawGraticule_=t;var e=r.svg_?r.svg().select("#em-graticule"):null,n=r.svg_?r.svg_.select("#em-zoom-group-"+r.svgId_):null;return e&&(e._groups[0][0]&&0==t?e.remove():r.Geometries.geoJSONs.graticule&&r._pathFunction&&n&&1==t&&(e.remove(),n.append("g").attr("id","em-graticule").selectAll("path").data(r.Geometries.geoJSONs.graticule).enter().append("path").attr("d",r._pathFunction).attr("class","em-graticule"),r.svg().select("#em-graticule").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])})))),r},r.drawCoastalMargin=function(t){if(!arguments.length)return r.drawCoastalMargin_;if(r.drawCoastalMargin_=t,r.svg_){var e=Ri("#em-coast-margin"),n=zt("#em-coastal-blur"),i=zt("#em-zoom-group-"+r.svgId_)||null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&r._pathFunction&&i){e.remove(),n.remove(),r.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",r.coastalMarginStdDev_);var o=function(t){var e=zt("#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)};r.insetTemplates_&&r.drawCoastalMargin_&&(rr(r.insetTemplates_,r.svgId_,o),o(r)),Ri("#em-coast-margin").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}}return r},r.annotations=function(t){return arguments.length?(r.annotations_=t,Wf(r),r):r.annotations_},r.stamp=function(t){return arguments.length?(r.stamp_=t,_h(r.stamp_,r),r):r.stamp_},r.minimap=function(t){return arguments.length?(r.minimap_=t,pp(r),r):r.minimap_},r.labels=function(t){return arguments.length?(r.labels_=t,function(t){if(t.svg_){var e=t.svg_.selectAll("#em-labels > *");if(e&&e.remove(),t.labels_){var n=t.labels_,r=t.svg_.select("#em-zoom-group-"+t.svgId_);Bf(t,r),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t),t.insetTemplates_&&rr(t.insetTemplates_,t.svgId_,(function(t){if(n){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);t.labels_&&Bf(t,e),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t)}}))}}}(r),r):r.labels_},r.Geometries=dh(r,e),r.updateGeoMapTemplate=function(t){return r.Geometries.defaultGeoData=null,r.Geometries.allNUTSGeoData=null,r.Geometries.centroidsData=null,r.geometries_?(r.Geometries.setUserGeometries(r.geometries_),r.buildMapTemplate(),t&&t()):r.Geometries.getDefaultGeoData(r.geo_,r.filterGeometriesFunction_,r.nutsLevel_).then((function(){r.buildMapTemplate(),t&&t()})),rr(r.insetTemplates_,r.svgId_,(function(e){e.updateGeoMapTemplate(t)})),r},r.buildMapTemplateBase=function(){var t=zt("#"+r.svgId());0==t.size()&&(t=zt("body").append("svg").attr("id",r.svgId())),t.attr("class","em-map"),r.svg_=t,r.containerId_||(r.containerId_=r.svgId_),r.tooltip_.containerId||(r.tooltip_.containerId=r.containerId_),Ri("#"+r.svgId()+" > *").remove(),"WORLD"==r.geo_.toUpperCase()&&(r.height()||r.height(.55*r.width()),t.attr("width",r.width()).attr("height",r.height()),r.proj_=54030),r.height()||r.height(.85*r.width()),t.attr("width",r.width()).attr("height",r.height()),t.append("defs").attr("class","em-defs").append("clipPath").attr("id",r.svgId_+"-clip-path").append("path").attr("d",function(t,e,n,r){return t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),r=parseFloat(r,10),t<0||e<0||n<0||r<0?"":"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+r)+" "+t+","+(e+r)+"z"}(0,0,r.width_,r.height_)),r.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",r.coastalMarginStdDev_);var n=t.insert("g",":first-child").attr("id","em-drawing-"+r.svgId_).attr("class","em-drawing-group").attr("clip-path","url(#"+r.svgId_+"-clip-path)");n.append("g").attr("id","em-zoom-group-"+r.svgId_).attr("class","em-zoom-group");return function(t){if(t.insetTemplates_){for(var e in t.insetTemplates_){var n=zt("#"+t.insetTemplates_[e].svgId_);n&&n.html("")}t.insetTemplates_={}}}(r),function(t,e){t.insetBoxPosition_||(t.insetBoxPosition_=[t.width_-t.insetBoxWidth_-2*t.insetBoxPadding_,2*t.insetBoxPadding_]);var n=zt("#"+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_=vh(t.insetBoxWidth_,t.insetBoxPadding_));for(var r=0;r<t.insets_.length;r++){var i=t.insets_[r];if(i.svgId=i.svgId||"inset"+i.geo+Math.random().toString(36).substring(7),0==zt("#"+i.svgId).size()){var o=null==i.x?t.insetBoxPadding_:i.x,a=null==i.y?t.insetBoxPadding_+r*(t.insetBoxPadding_+t.insetBoxWidth_):i.y;n.append("g").attr("id","em-inset-"+i.svgId).attr("class","em-inset").attr("transform","translate("+o+","+a+")").append("svg").attr("id",i.svgId)}if(t.insetTemplates_[i.geo]){var s=gh(i,t,e);s.buildMapTemplateBase(),t.insetTemplates_[i.geo]=[t.insetTemplates_[i.geo],s]}else{var l=gh(i,t,e).buildMapTemplateBase();t.insetTemplates_[i.geo]=l}}}(r,e),n.append("rect").attr("id","em-frame-"+r.geo_).attr("class","em-frame").attr("x",0).attr("y",0).attr("width",r.width_).attr("height",r.height_),r.stamp_&&_h(r.stamp_,r),r},r.buildMapTemplate=function(){var t,n=r.svg().select("#em-zoom-group-"+r.svgId_);if(n.selectAll("*").remove(),1==r.gridCartogram_?(!function(t){var e=zt("#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=Oh(t),r=Nh(n),i=Dh(r,t);"hexagon"===t.gridCartogramShape_?jh(e,i,t):Ph(e,i,t),Ih(e,t.width_,t.height_,t.gridCartogramMargins_)}(r),r.footnote_=!1):(r.position_.x&&r.position_.y||s(),r.position_.z=r.position_.z||l(),c(),f(),r.zoomExtent()&&h(),r.backgroundMap_&&a(r)),e&&S(r),r.labels_&&Bf(r,n),r.annotations_&&(Wf(r),r.annotationsAdded=!0),r.title()){var i=r.isInset?"em-inset-title":"em-title";r.titlePosition()||r.titlePosition([10,Zn(i)+(r.isInset?0:10)]),r.svg().append("text").attr("id","title"+r.geo_).attr("class",i).attr("x",r.titlePosition()[0]).attr("y",r.titlePosition()[1]).html(r.title())}if(r.subtitle()){var o=r.isInset?"em-inset-subtitle":"em-subtitle",u=r.isInset?"em-inset-title":"em-title";r.subtitlePosition()||r.subtitlePosition([10,Zn(u)+Zn(o)+15]),r.svg().append("text").attr("id","subtitle"+r.geo_).attr("class",o).attr("x",r.subtitlePosition()[0]).attr("y",r.subtitlePosition()[1]).html(r.subtitle())}if((r.footnote_&&b(),r.showSourceLink_)&&((t=e?r.stat("size"):r.stat())&&t.eurostatDatasetCode)){var p=t.eurostatDatasetCode,d="https://ec.europa.eu/eurostat/databrowser/view/".concat(p,"/default/table?lang=en"),g=r.svg().append("a").attr("class","em-source-dataset-link").attr("href",d).attr("target","_blank").append("text").attr("class","em-source-dataset-link-text").attr("x",r.width_).attr("y",r.height_).text("EUROSTAT").attr("text-anchor","end").node().getComputedTextLength();r.svg().append("text").attr("class","em-source-pretext").attr("x",r.width_-g-2).attr("y",r.height_).text("Source:").attr("text-anchor","end")}return r.showScalebar_&&(2!==r.scalebarPosition_.length&&(r.scalebarPosition_[0]=15,r.scalebarPosition_[1]=r.height_-50),k()),r.minimap_&&pp(r),r};var a=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_&&w(),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_)},s=function(){var t,e=vp[r.geo_+"_"+r.proj_];e?(r.position_.x=r.position_.x||e.geoCenter[0],r.position_.y=r.position_.y||e.geoCenter[1]):null!==(t=r.Geometries.defaultGeoData)&&void 0!==t&&t.bbox&&(r.position_.x=r.position_.x||.5*(r.Geometries.defaultGeoData.bbox[0]+r.Geometries.defaultGeoData.bbox[2]),r.position_.y=r.position_.y||.5*(r.Geometries.defaultGeoData.bbox[1]+r.Geometries.defaultGeoData.bbox[3])),x()},l=function(){var t,e=vp[r.geo_+"_"+r.proj_];return e?800*e.pixelSize/r.width_:null!==(t=r.Geometries.defaultGeoData)&&void 0!==t&&t.bbox?Math.min((r.Geometries.defaultGeoData.bbox[2]-r.Geometries.defaultGeoData.bbox[0])/r.width_,(r.Geometries.defaultGeoData.bbox[3]-r.Geometries.defaultGeoData.bbox[1])/r.height_):100},c=function(){var t;"WORLD"===r.geo_?r._projection=r.projectionFunction_||bl(zl).scale(152.63).translate([r.width_/2,r.height_/2]).scale((r.width_-20)/(2*Math.PI)):r._projection=r.projectionFunction_||function(){var t,e,n,r,i,o,a,s=1,l=0,c=0,u=1,f=1,h=0,p=null,d=1,g=1,v=go({point:function(t,e){var n=m([t,e]);this.stream.point(n[0],n[1])}}),y=po;function _(){return d=s*u,g=s*f,o=a=null,m}function m(n){var r=n[0]*d,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+l,i+c]}return m.invert=function(n){var r=n[0]-l,i=n[1]-c;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/g]},m.stream=function(t){return o&&a===t?o:o=v(y(a=t))},m.postclip=function(t){return arguments.length?(y=t,p=n=r=i=null,_()):y},m.clipExtent=function(t){return arguments.length?(y=null==t?(p=n=r=i=null,po):ho(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),_()):null==p?null:[[p,n],[r,i]]},m.scale=function(t){return arguments.length?(s=+t,_()):s},m.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],_()):[l,c]},m.angle=function(n){return arguments.length?(e=Qi(h=n%360*$i),t=Xi(h),_()):h*qi},m.reflectX=function(t){return arguments.length?(u=t?-1:1,_()):u<0},m.reflectY=function(t){return arguments.length?(f=t?-1:1,_()):f<0},m.fitExtent=function(t,e){return Mo(m,t,e)},m.fitSize=function(t,e){return Lo(m,t,e)},m.fitWidth=function(t,e){return zo(m,t,e)},m.fitHeight=function(t,e){return Oo(m,t,e)},m}().reflectY(!0).fitSize([r.width_,r.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(t=u())[0],t[1]],[t[2],t[3]]]}})},u=function(){var t=.5*r.position_.z*r.width_,e=.5*r.position_.z*r.height_;return[r.position_.x-t,r.position_.y-e,r.position_.x+t,r.position_.y+e]},f=function(){r._pathFunction=Na().projection(r._projection)},h=function(){var t=zt("#"+r.svgId()),e=Ai,n=ji().scaleExtent(r.zoomExtent()).on("zoom",(function(t){var n=t.transform;n.k!==e.k?p(t,e):m(t),r.svg_.select("#em-zoom-group-"+r.svgId_).attr("transform",n),e=n}));t.call(n)},p=function(t,e){var n,i,o=t.transform,a=(r.width_/2-o.x)/o.k,s=(r.height_/2-o.y)/o.k,l=Yn(r._projection.invert([a,s]),2),c=l[0],u=l[1];r.position_.x=c,r.position_.y=u,r.position_.z=y(o.k/e.k),v(o),null!==(n=r.labels_)&&void 0!==n&&n.values&&g(o),null!==(i=r.labels_)&&void 0!==i&&i.backgrounds&&d(o)},d=function(t){var e=r.svg_.select("#em-zoom-group-"+r.svgId_).selectAll(".em-label-background"),n=t.k,i=[];e.each((function(){var t=zt(this),e=parseFloat(t.attr("data-width"))||parseFloat(t.attr("width")),r=parseFloat(t.attr("data-height"))||parseFloat(t.attr("height")),o=parseFloat(t.attr("data-x"))||parseFloat(t.attr("x")),a=parseFloat(t.attr("data-y"))||parseFloat(t.attr("y"));if(e>0&&r>0&&!isNaN(o)&&!isNaN(a)){t.attr("data-width")||(t.attr("data-width",e),t.attr("data-height",r),t.attr("data-x",o),t.attr("data-y",a));var s=e*(1/n),l=r*(1/n),c=o*(1/n),u=a*(1/n);i.push({element:t,targetWidth:s,targetHeight:l,targetX:c,targetY:u})}})),i.forEach((function(t){var e=t.element,n=t.targetWidth,r=t.targetHeight,i=t.targetX,o=t.targetY;e.attr("width",n).attr("height",r).attr("x",i).attr("y",o)}))},g=function(t){var e=r.svg_.select("#em-zoom-group-"+r.svgId_).select("#em-labels").selectAll("*"),n=t.k,i=[];e.each((function(){var t=zt(this),e=window.getComputedStyle(this),r=t.attr("font-size"),o=e.fontSize,a=r||o;if(a&&parseFloat(a)>0){var s=parseFloat(t.attr("data-fs"))||parseFloat(r)||parseFloat(o);t.attr("data-fs")||t.attr("data-fs",s);var l=s/n;i.push({element:this,targetFontSize:l})}})),i.forEach((function(t){var e=t.element,n=t.targetFontSize;e.style.setProperty("font-size","".concat(n,"px"),"important")}))},v=function(t){var e=r.svg_.select("#em-zoom-group-"+r.svgId_).selectAll("*"),n=t.k,i=[];e.each((function(){var t=zt(this),e=window.getComputedStyle(this),r=t.attr("stroke-width"),o=e.strokeWidth,a=r||o;if(a&&parseFloat(a)>0){var s=parseFloat(t.attr("data-sw"))||parseFloat(r)||parseFloat(o);t.attr("data-sw")||t.attr("data-sw",s);var l=s/n;i.push({element:this,targetStrokeWidth:l})}})),i.forEach((function(t){var e=t.element,n=t.targetStrokeWidth;e.style.setProperty("stroke-width","".concat(n,"px"),"important")}))},y=function(t){var e=u();return(e[2]-e[0])/(r.width_*t)},m=function(t,e){var n=t.transform,i=(r.width_/2-n.x)/n.k,o=(r.height_/2-n.y)/n.k,a=Yn(r._projection.invert([i,o]),2),s=a[0],l=a[1];void 0!==r.maxBounds_.xMin&&s<r.maxBounds_.xMin&&(s=r.maxBounds_.xMin,n.x=r.width_/2-r._projection([s,l])[0]*n.k),void 0!==r.maxBounds_.yMin&&l<r.maxBounds_.yMin&&(l=r.maxBounds_.yMin,n.y=r.height_/2-r._projection([s,l])[1]*n.k),void 0!==r.maxBounds_.xMax&&s>r.maxBounds_.xMax&&(s=r.maxBounds_.xMax,n.x=r.width_/2-r._projection([s,l])[0]*n.k),void 0!==r.maxBounds_.yMax&&l>r.maxBounds_.yMax&&(l=r.maxBounds_.yMax,n.y=r.height_/2-r._projection([s,l])[1]*n.k),r.position_.x=s,r.position_.y=l},x=function(){var t=ir("x"),e=ir("y"),n=ir("z");null==t||null==t||isNaN(+t)||(r.position_.x=+t),null==e||null==e||isNaN(+e)||(r.position_.y=+e),null==n||null==n||isNaN(+n)||(r.position_.z=+n)},b=function(){r.svg().append("text").attr("id","em-footnote").attr("class","em-footnote").attr("x",0).attr("y",r.height_).html(r.footnote_).on("mouseover",(function(){r._tooltip.mw___=r._tooltip.style("max-width"),r._tooltip.style("max-width","400px"),r.footnoteTooltipText_&&r._tooltip.mouseover(r.footnoteTooltipText_)})).on("mousemove",(function(t){r.footnoteTooltipText_&&r._tooltip.mousemove(t)})).on("mouseout",(function(t){r.footnoteTooltipText_&&r._tooltip.mouseout(t),r._tooltip.style("max-width",r._tooltip.mw___)}))},w=function(){var t=r.svg().select("#em-zoom-group-"+r.svgId_).append("g").attr("id","em-coast-margin").attr("class","em-coast-margin");r.Geometries.geoJSONs.cntbn&&t.append("g").attr("id","em-coast-margin-cnt").attr("class","em-coast-margin-cnt").selectAll("path").data(r.Geometries.geoJSONs.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._pathFunction),r.Geometries.geoJSONs.nutsbn&&t.append("g").attr("id","em-coast-margin-nuts").attr("class","em-coast-margin-nuts").selectAll("path").data(r.Geometries.geoJSONs.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._pathFunction),r.Geometries.geoJSONs.worldbn&&t.append("g").attr("id","em-coast-margin-world").attr("class","em-coast-margin-world").selectAll("path").data(r.Geometries.geoJSONs.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",r._pathFunction)},S=function(t){var e;t.Geometries.centroidsData?e="mixed"==t.nutsLevel_?[].concat(_(t.Geometries.centroidsData[0].features),_(t.Geometries.centroidsData[1].features),_(t.Geometries.centroidsData[2].features),_(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?dp(Object(n),!0).forEach((function(e){fr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dp(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:ls(t),type:"Point"},e.push(n)}))),t.processCentroids_&&(e=t.processCentroids_(e)),t.Geometries.centroidFeatures=e.map((function(e){var n=t._projection(e.geometry.coordinates);return e.properties.centroid=n,e}));t.svg().select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-prop-symbols").selectAll("g").data(t.Geometries.centroidFeatures).enter().append("g").attr("transform",(function(t){return"translate("+t.properties.centroid[0].toFixed(3)+","+t.properties.centroid[1].toFixed(3)+")"})).attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id}))},k=function(){var t=r.scalebarMaxWidth_,e=r.scalebarTextOffset_[0],n=r.scalebarTextOffset_[1],i=r.position_.z,o=T(t*i),a=o[0]/i,s=o[1],l=r.svg().append("g").attr("class","em-scalebar").attr("transform","translate(".concat(r.scalebarPosition_[0],",").concat(r.scalebarPosition_[1],")")).attr("width",t+20).attr("height",r.scalebarHeight_);l.append("line").attr("class","em-scalebar-line").attr("x1",5).attr("y1",1).attr("x2",5).attr("y2",r.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e).attr("y",r.scalebarTickHeight_+n).text("0");var c={1:4,2:2,5:5}[s],u=a/c,f=r.scalebarSegmentHeight_/2+1;if(u>=15){for(var h=1;h<c;h++)if(l.append("line").attr("class","em-scalebar-line").attr("x1",5+r.scalebarStrokeWidth_/2+h*u).attr("y1",1).attr("x2",5+r.scalebarStrokeWidth_/2+h*u).attr("y2",r.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",5+e+h*u).attr("y",r.scalebarTickHeight_+n).text(F(o[0]/c*h)),1==h)l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",f).attr("x2",5+r.scalebarStrokeWidth_/2+h*u).attr("y2",f);else{var p=5+r.scalebarStrokeWidth_/2+(h-1)*u;p>0&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",p).attr("y1",f).attr("x2",5+r.scalebarStrokeWidth_/2+h*u).attr("y2",f)}u>=15&&l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+(c-1)*u).attr("y1",f).attr("x2",5+c*u).attr("y2",f)}else l.append("line").attr("class","em-scalebar-line em-scalebar-midline").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",f).attr("x2",5+r.scalebarStrokeWidth_/2+u*c).attr("y2",f);l.append("line").attr("class","em-scalebar-line").attr("x1",a+5).attr("y1",1).attr("x2",a+5).attr("y2",r.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",a+5+e).attr("y",r.scalebarTickHeight_+n).text(F(o[0])+r.scalebarUnits_)},T=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]},F=function(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3};return r},vp={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}},yp=Ch("\t"),_p=yp.parse;yp.parseRows,yp.format,yp.formatBody,yp.formatRows,yp.formatRow,yp.formatValue;function mp(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function xp(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),function(t,e){return fetch(t,e).then(mp)}(e,n).then((function(e){return t(e,r)}))}}var bp=xp(Lh);xp(_p);function wp(t,e){var n,r,i,o,a=function(t,e,n){if(0===Object.entries(t).length)return null;var r,i=[];if(n&&!kp(n.name)&&(n=null),"string"==typeof t&&(t=[t]),Array.isArray(t)||Sp(t)){if(t.length===e)return n&&-1===t.findIndex((function(t){return null==t}))?n.from(t):t;if(1===t.length){for(r=0;r<e;r++)i.push(t[0]);return i}}for(r=0;r<e;r++){var o=void 0===t[r]?null:t[r];i.push(o)}return i};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 wp(t);for(r in t)l++,s.push(r);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,f=n.size||n.dimension&&n.dimension.size;if(this.size=f,this.value=n.hasOwnProperty("value")&&null!==n.value&&0!==n.value.length?n.value:{},Array.isArray(this.value)||Sp(this.value))u=this.value.length;else{var h=1;for(c=f.length;c--;)h*=f[c];u=h}if(this.value=a(this.value,u,e),this.status=n.hasOwnProperty("status")&&null!==n.status?a(n.status,u):null,n.hasOwnProperty("dimension")){var p=n.dimension,d=n.role||!n.version&&p.role||null,g=n.id||p.id,v=f.length,y=function(t){d.hasOwnProperty(t)||(d[t]=null)};if(!Array.isArray(g)||!Array.isArray(f)||g.length!=v)return;if(this.length=v,this.id=g,d&&(y("time"),y("geo"),y("metric"),y("classification")),d&&null===d.classification){var _=[],m=["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[m[c]];null!==b&&(_=_.concat(b))}for(d.classification=[],c=0;c<v;c++)x(g[c],_)||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 k={},T=p[g[w]].category.index;for(i=T.length,o=0;o<i;o++)k[T[o]]=o;p[g[w]].category.index=k}}else{var F=0;for(r in p[g[w]].category.index={},p[g[w]].category.label)p[g[w]].category.index[r]=F++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new wp({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 E=[],A=(n=t.__tree__).category;if(!n.hasOwnProperty("category"))return;if(!A.hasOwnProperty("label"))for(r in A.label={},A.index)A.label[r]=r;for(r in A.index)E[A.index[r]]=r;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=E,this.length=E.length,this.role=t.role,this.hierarchy=A.hasOwnProperty("child"),this.extension=n.extension||null;break;case"category":var C=t.child;this.id=C,this.length=null===C?0:C.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 M=t.link.item;if(this.length=Array.isArray(M)?M.length:0,this.length)for(o=0;o<this.length;o++)this.id[o]=M[o].href}}}function Sp(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t.buffer)}function kp(t){return-1!==["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].indexOf(t)}function Tp(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}wp.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,r){var i=t.link.item[e];r.class===i.class&&i.id&&i.size&&i.dimension&&n.push(i)}:function(t,e,r){var i=t.link.item[e];r.class!==i.class||i.id&&i.size&&i.dimension||n.push(i)}:function(t,e,r){r.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 r=0;r<this.length;r++)e(this,r,t);return n},wp.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],r=0;if("collection"===this.class){var i=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=i.length;r<e;r++)n.push(new wp(i[r]));return n}if("number"==typeof t&&t>=0&&t<i.length)return new wp(i[t]);if("string"==typeof t)for(e=i.length;r<e;r++)if(i[r].href===t)return new wp(i[r]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;r<e;r++)n.push(this.Dataset(this.id[r]));return n}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dataset(o):null}var a=this.__tree__[t];return void 0===a?null:new wp({class:"dataset",__tree__:a})},wp.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,r=[],i=this.id.length,o=function(t,e){if(null!==t)for(var n in t)for(var r=null!==t[n]?t[n].length:0;r--;)if(t[n][r]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<i;n++)r.push(this.Dimension(this.id[n]));return r}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dimension(a,e):null}var s=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<i;n++){var l=this.id[n];o(s,l)===t.role&&r.push(this.Dimension(l,e))}return void 0===r[0]?null:r}return null}var c=this.__tree__.dimension;if(void 0===c)return null;var u=c[t];return void 0===u?null:e?new wp({class:"dimension",__tree__:u,role:o(s,t)}):function(t,e){var n=[];for(var r in t)n[t[r]]=e[r];return n}(u.category.index,u.category.label)},wp.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,r=this.id.length;n<r;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var i=this.id[t];return void 0!==i?this.Category(i):null}var o=this.__tree__.category;if(void 0===o)return null;var a=o.index[t];if(void 0===a)return null;var s=o.unit&&o.unit[t]||null,l=o.coordinates&&o.coordinates[t]||null,c=o.child&&o.child[t]||null,u=o.note&&o.note[t]||null;return new wp({class:"category",index:a,label:o.label[t],note:u,child:c,unit:s,coord:l})},wp.prototype.Dice=function(t,e,n){var r,i,o,a,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&&(r=!0),"boolean"==typeof n&&!0===n||(n=!1)):(r=s(e,"clone"),n=s(e,"drop"),i=s(e,"stringify"),o=s(e,"ovalue"),a=s(e,"ostatus"));var l,c=this.value,u=r?new wp(JSON.parse(JSON.stringify(this))):this,f=u.status,h=[],p=[],d=function(t,e){var n,r,i,o=(n=t,r=e,i={},Array.isArray(n[r])?(n[r].forEach((function(t,e){null!==t&&(i[String(e)]=t)})),i):n[r]);delete t[e],t[e]=o};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 r=[];g.forEach((function(n){var i=t[n],o=[];i.forEach((function(t){o.push(e[n]===t)})),r.push(-1!==o.indexOf(!0))})),-1===r.indexOf(!1)&&(h.push(e.value),p.push(e.status))})),g.forEach((function(e){var n=u.Dimension(e).id,r=0,i={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(i[n]=r,r++)})),u.__tree__.dimension[e].category.index=i})),u.n=h.length,u.value=u.__tree__.value=Sp(c)?function(t,e){return e.from(t)}(h,c.constructor):h,u.status=u.__tree__.status=null!==f?p:null),i?((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]}))),o&&d(l,"value"),a&&l.hasOwnProperty("status")&&d(l,"status"),JSON.stringify(l)):u},wp.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]]]})))},wp.prototype.Data=function(t,e){var n,r,i=[],o=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(r=this.value.length,n=0;n<r;n++)i.push(this.Data(n));return i}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var a=this.value[t];return void 0===a?null:e?{value:a,status:this.status?this.status[t]:null}:a}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 f=1,h=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;h+=(f*=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,v=d[0];g<v;g++){var y=[];for(n=0;n<u;n++)n!==p[0]?y.push(t[n]):y.push(g);i.push(this.Data(y,e))}return i}return e?{value:this.value[h],status:this.status?this.status[h]:null}:this.value[h]}s="array"}var _=function(t,e,n){var r,i=[],a={},s=t.dimension,l=t.id||s.id,c=t.size||s&&s.size;if("array"===n){for(r=e.length;r--;)a[e[r][0]]=e[r][1];e=a}for(var u=0,f=l.length;u<f;u++){var h=l[u],p=e[h];i.push("string"==typeof p?p:1===c[u]?o(s[h].category.index):null)}return i}(l,t,s),m=[],x=l.dimension,b=l.id||x.id;for(n=0,r=_.length;n<r;n++)m.push(x[b[n]].category.index[_[n]]);return this.Data(m,e)},wp.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,r,i,o,a,s,l,c,u,f="id"===t.field,h=function(t){return(f?"value":t)||"Value"},p=function(t){return(f?"status":t)||"Status"},d=this.__tree__,g=!0===t.status;if("function"==typeof e){n=this.toTable(t);var v=[],y="array"!==t.type?0:1;for(a=(I="object"!==t.type?n.slice(y):n.rows.slice(0)).length,r=0;r<a;r++){var _=e.call(this,I[r],r);void 0!==_&&v.push(_)}return"object"===t.type?{cols:n.cols,rows:v}:("array"===t.type&&v.unshift(n[0]),v)}if("arrobj"===t.type||"objarr"===t.type){var m=[],x=d.role&&d.role.metric,b=function(){},w={},S=this,k=S.id,T=t.by&&-1!==k.indexOf(t.by)?t.by:null,F=!0===t.meta,E=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],A=!0===t.comma,C=!0===t.bylabel,M=S.value.constructor,L=function(e){var n,r={},i=h(t.vlabel);return"objarr"===t.type&&(n=null===T&&kp(M.name)?function(t){r[t]=t===i?M.from(e,(function(e){return e[t]})):e.map((function(e){return e[t]}))}:function(t){r[t]=e.map((function(e){return e[t]}))},Object.keys(e[0]).forEach(n),e=r),F?(r={},k.forEach((function(t){var e=S.Dimension(t);r[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:k,status:g,unit:t.unit,by:T,bylabel:C,drop:null!==T&&E.length>0?E:null,prefix:null!==T?W||"":null,comma:A,dimensions:r},data:e}):e};T&&(t.field="id");var z=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:g})).shift();if(null===T&&t.unit&&x){if("id"!==t.content)for(var O=x.length;O--;){var N=this.Dimension(x[O]);w[x[O]]={};for(var D=N.length;D--;)w[x[O]][N.Category(D).label]=N.id[D]}b=function(e,n){if(-1!==x.indexOf(e)){var r=d.dimension[e].category;r.unit?P.unit=r.unit["id"!==t.content?w[e][n]:n]:P.unit=null}},t.unit=!0}else t.unit=!1;for(a=n.length,r=0;r<a;r++){var P={};for(i=n[r].length;i--;)P[z[i]]=n[r][i],b(z[i],n[r][i]);m.push(P)}if(A&&m.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==T){var j,R={},I=[],G={},W=void 0!==t.prefix?t.prefix:"";E.forEach((function(t,e){(!S.Dimension(t)||S.Dimension(t).length>1)&&(E[e]="")}));var B=k.filter((function(t){return t!==T&&-1===E.indexOf(t)})),H=S.Dimension(T);for(var U in"id"!==t.content?C?j=function(t,e,n){t[e][W+n[T]]=n.value}:(H.Category().forEach((function(t,e){G[t.label]=H.id[e]})),j=function(t,e,n){t[e][W+G[n[T]]]=n.value}):j=function(t,e,n){t[e][W+n[T]]=n.value},m.forEach((function(t){var e=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")}(t,B);void 0===R[e]&&(R[e]=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n}(t,B)),j(R,e,t,T)})),R)I.push(R[U]);return g=!1,L(I)}return L(m)}if("object"===t.type){var q="number"==typeof this.value[0]||null===this.value[0]?"number":"string";s=function(t,e){var n=f&&t||e||t;nt.push({id:t,label:n,type:"string"})},l=function(t,e,n){var r=h(t),i=p(e);n&&nt.push({id:"status",label:i,type:"string"}),nt.push({id:"value",label:r,type:q})},c=function(t){dt.push({v:t})},u=function(t){dt.push({v:t}),rt.push({c:dt})}}else s=function(t,e){var n=f&&t||e||t;nt.push(n)},l=function(t,e,n){var r=h(t),i=p(e);n&&nt.push(i),nt.push(r),et.push(nt)},c=function(t){dt.push(t)},u=function(t){dt.push(t),et.push(dt)};var $=d.dimension,V=d.id||$.id,Y=d.size||$.size,J=V.length;if(J!=Y.length)return!1;var X=[],K=1,Z=(O=1,[]),Q=[],tt=[],et=[],nt=[],rt=[];for(r=0;r<J;r++){var it=V[r];s(it,$[it].label),K*=Y[r],O*=Y[r];var ot=[];for(i=0;i<Y[r];i++)for(var at in $[V[r]].category.index)if($[V[r]].category.index[at]===i){var st="id"!==t.content&&$[V[r]].category.label?$[V[r]].category.label[at]:at;ot.push(st)}X.push(ot),Z.push(O)}for(l(t.vlabel,t.slabel,g),a=X.length,r=0;r<a;r++){for(var lt=[],ct=0,ut=X[r].length;ct<ut;ct++)for(var ft=0;ft<K/Z[r];ft++)lt.push(X[r][ct]);Q.push(lt)}for(a=Q.length,r=0;r<a;r++){var ht=[],pt=0;for(o=0;o<K;o++)ht.push(Q[r][pt]),++pt===Q[r].length&&(pt=0);tt.push(ht)}for(o=0;o<K;o++){var dt=[];a=Q.length;for(var gt=0;gt<a;gt++)c(tt[gt][o]);g&&c(this.status?this.status[o]:null),u(this.value[o])}return"object"===t.type?{cols:nt,rows:rt}:et},wp.prototype.node=function(){return this.__tree__},wp.prototype.toString=function(){return this.class};var Fp=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 r=e._data_[t];return r?n.value?(r.value=n.value,r.status=n.status):r.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 r=t[n];for(var i in e._data_[n]={},r){var o=r[i];e._data_[n][i]={value:o}}}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,o){return e.eurostatDatasetCode_?r(t,n,o):e.csvURL_&&i(o),e},eurostatDatasetCode_:void 0,filters_:{lastTimePeriod:1},precision_:2},n=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Qf(function(t,e,n,r){n=n||"en",r=r||"json";var i=[];if(i.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",r,"&lang=",n),e)for(var o in e){var a=e[o];if(Array.isArray(a))for(var s=0;s<a.length;s++)i.push("&",o,"=",a[s]);else i.push("&",o,"=",a)}return i.join("")}(e.eurostatDatasetCode_,e.filters_,n))},r=function(t,r,i){e._data_=null,n(t,r).then((function(t){var n=function(t,e,n){var r="object"==typeof e?e:null;return"function"!=typeof n&&(n=null),n||"function"!=typeof e||(n=e),"object"==typeof t?new wp(t,n):"version"===t?"1.5.3":fetch?fetch(t,r).then(Tp).then((function(t){return new wp(t,n)})):void 0}(t);e.metadata={label:n.label,href:n.href,source:n.source,updated:n.updated,extension:n.extension},e.metadata.time=n.Dimension("time").id[0],e._data_=function(t){for(var e={},n=t.Dimension("geo").id,r=0;r<n.length;r++)e[n[r]]=t.Data(r);return e}(n),i&&i()}))};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 i=function(t){e._data_=null,bp(e.csvURL_).then((function(n){e._data_=function(t,e,n){for(var r={},i=0;i<t.length;i++){var o=t[i],a=o[n];r[o[e]]=a?{value:isNaN(+a)?a:+a,status:""}:{value:":",status:""}}return r}(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 o in t)e[o+"_"]=t[o];return e},Ep=function(t){var e={};function n(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new WeakSet,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=i.maxDepth||100;if(o.has(t))return t;if(o.add(t),a>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:r(c)&&r(u)?n(u,c,i,o,a+1):Array.isArray(c)&&Array.isArray(u)?t[l]=i.mergeArrays?_(new Set([].concat(_(u),_(c)))):_(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 r(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=Zn("em-legend-title"),e.labelFontSize=Zn("em-legend-label"),e.build=function(){e.svg=zt("#"+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.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},Ap=function(t){var e;function n(){e=zt("#"+t.div),e.empty()&&(e=zt("body").append("div").attr("id",t.div)),e.attr("class","tooltip-eurostat")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"0px",t.border=t.border||"0px",t.borderRadius=t.borderRadius||"0px",t.boxShadow=t.boxShadow||"0px 0px 0px grey",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){if(e.html(t),t){var r=event.pageX,i=event.pageY;n.ensureTooltipOnScreen(r,i)}},n.mousemove=function(t){var e=t.pageX,n=t.pageY;this.ensureTooltipOnScreen(e,n)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,r){return 1==arguments.length?e.style(t):(e.style(t,r),n)},n.attr=function(t,r){return 1==arguments.length?e.attr(t):(e.attr(t,r),n)},n.ensureTooltipOnScreen=function(n,r){e.style("opacity",1);var i=e.node();i.style.left=n+t.xOffset+"px",i.style.top=r-t.yOffset+"px";var o=document.getElementById(t.containerId).getBoundingClientRect(),a=o.width,s=o.height;if(i.offsetLeft>o.left+a-i.clientWidth){var l=n-i.clientWidth-t.xOffset;if(i.style.left=l+"px",i.offsetLeft+i.clientWidth>n){var c=n-i.clientWidth-t.xOffset;i.style.left=c+"px"}}i.offsetTop+i.clientHeight>o.top+s&&(i.style.top=i.offsetTop-i.clientHeight+"px")},n(),n},Cp=function(t,e,n){var r=gp(t,e,n);if(r.stat_={default:void 0},r.stat=function(t,e){return arguments.length?2==arguments.length?(r.stat_[t]=e,r):"string"==typeof t||t instanceof String?r.stat_[t]:(r.stat_=t.default?t:{default:t},r):r.stat_.default},r.statData_={default:Fp(),color:Fp(),size:Fp(),v1:Fp(),v2:Fp(),v3:Fp()},r.statData=function(t,e){return arguments.length?1===arguments.length?(r.statData_[t]||(r.statData_[t]=Fp()),r.statData_[t]):(r.statData_[t]=e,r):r.statData_.default},r.noDataText_="No data available",r.language_="en",r.transitionDuration_=500,r.tooltip_.textFunction=void 0,r.filtersDefinitionFunction_=void 0,r.callback_=void 0,r.legend_=void 0,r.legendObj_=void 0,["legend_","legendObj_","noDataText_","language_","transitionDuration_","tooltipText_","filtersDefinitionFunction_","callback_"].forEach((function(t){r[t.substring(0,t.length-1)]=function(e){return arguments.length?(r[t]=e,r):r[t]}})),t)for(var i in t)r[i]&&null!=t[i]&&r[i](t[i]);r.legend=function(t){if(!arguments.length)return r.legend_;if(0==t){var e=r.legendObj();if(e){var n=zt("#"+e.svgId);n.size()>0&&n.selectAll("*").remove()}return r.legend_=t,r}return r.legend_=t,r.legendObj_&&r.updateLegend(),r},r.updateLegend=function(t){return r.legendObj_&&r.legendObj().update(),r},r.build=function(){return r.projectionFunction_&&r.proj("4326"),r.buildMapTemplateBase(),r.filtersDefinitionFunction_&&r.filtersDefinitionFunction_(r.svg(),r.numberOfClasses_),r.legend()&&r.buildLegend(),r.tooltip_?r._tooltip=Ap(r.tooltip_):r._tooltip=Ap(),r.updateGeoData(),r.updateStatData(),r},r.buildLegend=function(){r.legendObj(r.getLegendConstructor()(r,r.legend()));var t=r.legendObj();if(0==zt("#"+t.svgId).size()){var e=null==t.x?r.width()-100-t.boxPadding:t.x,n=null==t.y?t.boxPadding:t.y;r.svg().append("g").attr("id",t.svgId).attr("class","em-legend").attr("transform","translate("+e+","+n+")")}t.build()};var o=function(){for(var t in r.statData_){var e=!!r.stat_[t],n=!(!r.statData_[t]||!r.statData_[t].get());if((e||n)&&!r.statData_[t].isReady())return!1}return!0};return r.updateGeoData=function(){return r.updateGeoMapTemplate((function(){o()&&(r.updateStatValues(),r.callback()&&r.callback()(r))})),r},r.updateStatData=function(){for(var t in r.stat_){var e,n,i=r.stat(t),a=null===(e=(n=r.statData(t)).get)||void 0===e?void 0:e.call(n);if((i||a)&&i){var s=Fp(i);r.statData(t,s);var l=r.nutsLevel_;"mixed"===l&&(l=0),s.retrieveFromRemote(l,r.language(),(function(){r.Geometries.isGeoReady()&&o()&&(r.updateStatValues(),r.callback()&&r.callback()(r))}))}}return r},r.updateStatValues=function(){return r.updateClassification(),r.updateStyle(),r.legend_&&r.legendObj()&&r.legendObj().update(),r},r.updateClassification=function(){return console.log("Map updateClassification function not implemented"),r},r.updateStyle=function(){return console.log("Map updateStyle function not implemented"),r},r.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),Ep},r.getTime=function(){return r.statData("default").getTime()},r.setFromURL=function(){var t=Mp();return t.w&&r.width(t.w),t.h&&r.height(t.h),t.x&&t.y&&r.geoCenter([t.x,t.y]),t.z&&r.pixelSize(t.z),t.s&&r.scale(t.s),t.lvl&&r.nutsLevel(t.lvl),t.time&&(r.filters_.time=t.time,delete r.filters_.lastTimePeriod),t.proj&&r.proj(t.proj),t.geo&&r.geo(t.geo),t.ny&&r.nutsYear(t.ny),t.language&&r.language(t.language),t.numberOfClasses&&r.numberOfClasses(+t.numberOfClasses),r},r.exportMapToSVG=function(){var t=r.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),er(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),r},r.exportMapToPNG=function(t,e){var n=r.svg_.node().cloneNode(!0);er(n);var i=(new XMLSerializer).serializeToString(n),o=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(o);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(a),URL.revokeObjectURL(e)}),"image/png")},s.src=a,r},r},Mp=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 Lp(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.shapeWidth,i=void 0===r?25:r,o=n.shapeHeight,a=void 0===o?20:o,s=n.labelOffset,l=void 0===s?3:s,c=n.boxPadding,u=void 0===c?5:c,f=n.offsetY,h=void 0===f?0:f;t.patternFill_&&t.patternFill_.forEach((function(t,n){if(t.legendLabel){var r=h+n*(a+u),o=e.append("g").attr("class","em-legend-item pattern-fill-legend"),s=t.color||"#000";("#fff"===s.toLowerCase()||"white"===s.toLowerCase())&&o.append("rect").attr("x",u).attr("y",r).attr("width",i).attr("height",a).attr("fill","#ddd"),o.append("rect").attr("x",u).attr("y",r).attr("width",i).attr("height",a).attr("fill","url(#".concat(t.patternId||t.pattern,")")),o.append("text").attr("class","em-legend-label").attr("x",u+i+l).attr("y",r+a/2).attr("dominant-baseline","middle").attr("dy","0.35em").text(t.legendLabel)}}))}class zp extends Map{constructor(t,e=Pp){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(Op(this,t))}has(t){return super.has(Op(this,t))}set(t,e){return super.set(Np(this,t),e)}delete(t){return super.delete(Dp(this,t))}}Set;function Op({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Np({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Dp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Pp(t){return null!==t&&"object"==typeof t?t.valueOf():t}const jp=Symbol("implicit");function Rp(){var t=new zp,e=[],n=[],r=jp;function i(i){let o=t.get(i);if(void 0===o){if(r!==jp)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new zp;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Rp(e,n).unknown(r)},Ut.apply(i,arguments),i}function Ip(){var t,e,n=Rp().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function f(){var n=r().length,f=a<o,h=f?a:o,p=f?o:a;t=(p-h)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),h+=(p-h-t*(n-l))*u,e=t*(1-l),s&&(h=Math.round(h),e=Math.round(e));var d=ih(n).map((function(e){return h+t*e}));return i(f?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),f()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,f()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,f()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,f()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),f()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),f()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,f()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),f()):u},n.copy=function(){return Ip(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Ut.apply(f(),arguments)}function Gp(t){return t}var Wp=1e-6;function Bp(t){return"translate("+t+",0)"}function Hp(t){return"translate(0,"+t+")"}function Up(t){return e=>+t(e)}function qp(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function $p(){return!this.__axis}function Vp(t,e){var n=[],r=null,i=null,o=6,a=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",f=1===t||3===t?Bp:Hp;function h(h){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Gp:i,g=Math.max(o,0)+s,v=e.range(),y=+v[0]+l,_=+v[v.length-1]+l,m=(e.bandwidth?qp:Up)(e.copy(),l),x=h.selection?h.selection():h,b=x.selectAll(".domain").data([null]),w=x.selectAll(".tick").data(p,e).order(),S=w.exit(),k=w.enter().append("g").attr("class","tick"),T=w.select("line"),F=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),F=F.merge(k.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==x&&(b=b.transition(h),w=w.transition(h),T=T.transition(h),F=F.transition(h),S=S.transition(h).attr("opacity",Wp).attr("transform",(function(t){return isFinite(t=m(t))?f(t+l):this.getAttribute("transform")})),k.attr("opacity",Wp).attr("transform",(function(t){var e=this.parentNode.__axis;return f((e&&isFinite(e=e(t))?e:m(t))+l)}))),S.remove(),b.attr("d",4===t||2===t?a?"M"+c*a+","+y+"H"+l+"V"+_+"H"+c*a:"M"+l+","+y+"V"+_:a?"M"+y+","+c*a+"V"+l+"H"+_+"V"+c*a:"M"+y+","+l+"H"+_),w.attr("opacity",1).attr("transform",(function(t){return f(m(t)+l)})),T.attr(u+"2",c*o),F.attr(u,c*g).text(d),x.filter($p).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=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h.offset=function(t){return arguments.length?(l=+t,h):l},h}function Yp(t){return Vp(3,t)}function Jp(t){return Vp(4,t)}var Xp=function(t,e,n,r,i,o,a){var s=t.histogram.orientation||"horizontal",l=t.histogram.showCounts,c=t.histogram.showPercentages,u=t.histogram.labelRotation||0,f=t.histogram.margin||{top:0,right:0,bottom:0,left:0},h=t.histogram.height||200,p=t.histogram.width||270,d=new Array(map.numberOfClasses_).fill(0);r.forEach((function(t){var e=map.classifier()(t);"number"==typeof e&&e>=0&&e<d.length&&d[e]++}));var g=d.slice().reverse(),v=d.reduce((function(t,e){return t+e}),0),y=g.map((function(t){return v>0?t/v*100:0})),_=t.boxPadding+(t.title?Zn("em-legend-title")+10:30),m=t.lgg.append("g").attr("class","em-legend-histogram").attr("transform","translate(0, ".concat(_,")"));function x(t,e){var r=zt(this).style("stroke","black").attr("ecl"),i=n.length-1-parseInt(r,10);o(map,i),map.insetTemplates_&&rr(map.insetTemplates_,map.svgId,o,r)}function b(t,e){zt(this).style("stroke","none");a(map),map.insetTemplates_&&rr(map.insetTemplates_,map.svgId,a)}"vertical"===s?function(t){var r=Ip().domain(g.map((function(t,e){return e}))).range([f.top,h-f.bottom]).padding(.1),o=Sn().domain([0,Nt(g)]).nice().range([f.left,p-f.right]);t.selectAll("rect").data(g).join("rect").attr("class","em-legend-histogram-bar").attr("y",(function(t,e){return r(e)})).attr("x",f.left).attr("height",r.bandwidth()).attr("width",(function(t){return o(t)-f.left})).attr("fill",(function(t,e){return n[n.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",x).on("mouseout",b),(l||c)&&t.selectAll("text.em-histogram-label").data(g).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t){return o(t)+5})).attr("y",(function(t,e){return r(e)+r.bandwidth()/2})).attr("alignment-baseline","middle").text((function(t,e){return c?"".concat(y[e].toFixed(1),"%"):g[e]}));var a=t.append("g").attr("id","em-legend-histogram-y-axis").attr("transform","translate(".concat(f.left,", 0)"));a.call(Jp(r).tickSizeOuter(0).tickSize(0).tickFormat((function(t,n){return i?i(e[n],n):e[n]}))),a.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end")}(m):function(r){var o=Ip().domain(g.map((function(t,e){return e}))).range([f.left,p-f.right]).padding(.1),a=Sn().domain([0,Nt(g)]).nice().range([h-f.bottom,f.top]);r.selectAll("rect").data(g).join("rect").attr("class","em-legend-histogram-bar").attr("x",(function(t,e){return o(e)})).attr("y",(function(t){return a(t)})).attr("width",o.bandwidth()).attr("height",(function(t){return h-f.bottom-a(t)})).attr("fill",(function(t,e){return n[n.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",x).on("mouseout",b),(l||c)&&r.selectAll("text.em-histogram-label").data(g).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t,e){return o(e)+o.bandwidth()/2})).attr("y",(function(t){return a(t)-5})).attr("text-anchor","middle").text((function(t,e){return c?"".concat(y[e].toFixed(1),"%"):g[e]}));var s=r.append("g").attr("id","em-legend-histogram-x-axis").attr("transform","translate(0, ".concat(h-f.bottom,")"));if("thresholds"===t.labelType){for(var d=[],v=0;v<e.length;v++){var _=e.length-v-1,m=o(_);void 0!==m&&d.push(m+o.bandwidth())}var w=Sn().domain([0,p]).range([0,p]);s.call(Yp(w).tickValues(d).tickFormat((function(t,n){return i?i(e[n],n):e[n]})).tickSize(0).tickSizeOuter(0))}else"ranges"===t.labelType&&s.call(Yp(o).tickSizeOuter(0).tickSize(0).tickFormat((function(t,n){return i?i(e[n],n):e[n]})));s.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("transform","rotate(-".concat(u,")"))}(m)};function Kp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kp(Object(n),!0).forEach((function(e){fr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Qp=function(t,e){var n=Ep(t);if(n.labelType="thresholds",n.ascending=!0,n.shapeWidth=25,n.shapeHeight=20,n.sepLineLength=n.shapeWidth,n.tickLength=4,n.decimals=0,n.labelOffset=3,n.labelFormatter=null,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.noData=!0,n.noDataText="No data",e)for(var r in e)"histogram"===r&&"object"===cr(e[r])?n.histogram=Zp({orientation:"horizontal",showCounts:!1,showPercentages:!1,labelRotation:0},e.histogram):n[r]=e[r];function i(){var t=n.map,e=t.thresholds_.length>1?t.thresholds_:Array.from({length:t.numberOfClasses_}).map((function(e,r){return t.classifier().invertExtent(r)[n.ascending?0:1]})).slice(1);return e}function o(){if("ranges"==n.labelType){var t=i();return n.labelFormatter||function(e,r){var i=gn(".".concat(n.decimals,"f"));return 0===r?"> ".concat(i(t[t.length-1])):r===t.length?"< ".concat(i(t[0])):"".concat(i(t[t.length-r-1])," - < ").concat(i(t[t.length-r])," ")}}return n.labelType,n.labelFormatter||gn(".".concat(n.decimals,"f"))}function a(t){var e=n.lgg.append("g").attr("class","em-legend-divergence-container"),r=n.boxPadding;"ranges"==n.labelType&&(t+=n.pointOfDivergencePadding/2);var i=n.lgg.selectAll(".em-legend-label").nodes().reduce((function(t,e){return Math.max(t,e.getBBox().width)}),0),o=n.divergingLineLength||i+n.boxPadding+n.shapeWidth+10;e.append("line").attr("x1",r).attr("y1",t).attr("x2",r+o).attr("y2",t).attr("class","em-legend-diverging-line");var a=n.pointOfDivergenceLabel.split("|");if(a.length>1){var s=n.divergingArrowLength||30,l=r+o;e.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"),e.append("line").attr("class","em-legend-diverging-line").attr("x1",l).attr("y1",t).attr("x2",l).attr("y2",t-s).attr("marker-end","url(#arrowhead)"),e.append("line").attr("class","em-legend-diverging-line").attr("x1",l).attr("y1",t).attr("x2",l).attr("y2",t+s).attr("marker-end","url(#arrowhead)"),e.append("text").attr("class","em-legend-label").attr("x",l+10).attr("y",t-s+10).attr("dy","0.35em").text(a[0]),e.append("text").attr("class","em-legend-label").attr("x",l+10).attr("y",t+s-10).attr("dy","0.35em").text(a[1])}else e.append("text").attr("class","em-legend-diverging-label em-legend-label").attr("x",r+o+5).attr("y",t).attr("dy","0.35em").text(n.pointOfDivergenceLabel);"thresholds"==n.labelType&&(a.length>1?n.lgg.selectAll(".em-legend-label-divergence").attr("x",r+o+10):n.lgg.selectAll(".em-legend-label-divergence").remove())}function s(t,e){var n=lr(t),r=t.svg_.selectAll(n).selectAll("[ecl]");r.style("fill","white"),r.filter("[ecl='"+e+"']").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}function l(t){var e=lr(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var e=n.map,r=n.lgg;if(n.makeBackgroundBox(),n.title){var c=Zn("em-legend-title");r.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+c).text(n.title)}if(!e.classToFillStyle())return;n.pointOfDivergenceLabel&&!n.pointOfDivergence&&(n.pointOfDivergence=e.numberOfClasses_/2),n.histogram?Xp(n,i(),function(){var t=n.map;return t.colors_?t.colors_:Array.from({length:t.numberOfClasses_}).map((function(e,n){return t.classToFillStyle()(n,t.numberOfClasses_)}))}(),function(){var t=n.map;return Object.values(t.statData()._data_).map((function(t){return t.value}))}(),o(),s,l):"ranges"===n.labelType?function(){var t=n.map,e=n.lgg,r=o(),i=n.boxPadding;n.title&&(i=i+Zn("em-legend-title")+8);for(var c=function(){var o=i+u*n.shapeHeight,a=n.boxPadding,c=n.ascending?t.numberOfClasses()-u-1:u,f=t.classToFillStyle()(c,t.numberOfClasses_),h=e.append("g").attr("class","em-legend-item");n.pointOfDivergenceLabel&&u>=n.pointOfDivergence&&(o+=n.pointOfDivergencePadding),h.append("rect").attr("class","em-legend-rect").attr("x",a).attr("y",o).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",f).on("mouseover",(function(){zt(this).raise(),s(n.map,c),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s,c)})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,l,c)})),u>0&&h.append("line").attr("class","em-legend-separator").attr("x1",n.boxPadding).attr("y1",o).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",o),h.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength+n.tickLength)+n.labelOffset).attr("y",o+n.shapeHeight/2).attr("dy","0.35em").text(n.labels?n.labels[u]:r(t.classifier().invertExtent(c)[n.ascending?0:1],u))},u=0;u<t.numberOfClasses_;u++)c();if(n.pointOfDivergenceLabel)for(var f=0;f<t.numberOfClasses_;f++){var h=i+f*n.shapeHeight;f==n.pointOfDivergence&&a(h)}if(n.noData){var p=e.append("g").attr("class","em-legend-item"),d=i+t.numberOfClasses()*n.shapeHeight+n.boxPadding;p.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",d).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",n.map.noDataFillStyle_).on("mouseover",(function(){zt(this).raise(),s(t,"nd"),t.insetTemplates_&&rr(t.insetTemplates_,t.svgId,s,"nd")})).on("mouseout",(function(){l(t),t.insetTemplates_&&rr(t.insetTemplates_,t.svgId,l)})),p.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",d+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}}():function(){var e=n.map,r=n.lgg,i=n.boxPadding,c=o();n.title&&(i=i+Zn("em-legend-title")+8);for(var u=function(){var t=i+f*n.shapeHeight,o=n.boxPadding,a=n.ascending?e.numberOfClasses()-f-1:f,u=e.classToFillStyle()(a,e.numberOfClasses_);if(r.append("rect").attr("class","em-legend-rect").attr("x",o).attr("y",t).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",u).on("mouseover",(function(){s(n.map,a),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s,a)})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,l,a)})),f>0&&r.append("line").attr("class","em-legend-separator").attr("x1",n.boxPadding).attr("y1",t).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",t),f>0&&r.append("line").attr("class","em-legend-tick").attr("x1",n.boxPadding+n.sepLineLength).attr("y1",t).attr("x2",n.boxPadding+n.sepLineLength+n.tickLength).attr("y2",t),f<e.numberOfClasses()-1){var h=r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength+n.tickLength)+n.labelOffset).attr("y",t+n.shapeHeight).attr("dy","0.35em").text(n.labels?n.labels[f]:c(e.classifier().invertExtent(a)[n.ascending?0:1]));n.pointOfDivergenceLabel&&f==n.pointOfDivergence-1&&h.attr("class","em-legend-label em-legend-label-divergence")}},f=0;f<e.numberOfClasses_;f++)u();if(n.pointOfDivergenceLabel)for(var h=0;h<t.numberOfClasses_;h++){var p=i+h*n.shapeHeight;h==n.pointOfDivergence&&a(p)}if(n.noData){var d=i+e.numberOfClasses()*n.shapeHeight+n.boxPadding;r.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",d).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",n.map.noDataFillStyle_).on("mouseover",(function(){s(n.map,"nd"),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s,"nd")})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,l)})),r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",d+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}}();var u=n.lgg.node().getBBox().height;Lp(e,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:u+n.boxPadding+5}),n.setBoxDimension()}},n.labelDecNb=function(t){return console.warn("labelDecNb is now DEPRECATED. Please use decimals instead."),n},n};function td(t){return t.slice().sort((function(t,e){return t-e}))}function ed(t,e){for(var n=[],r=0;r<t;r++){for(var i=[],o=0;o<e;o++)i.push(0);n.push(i)}return n}function nd(t,e,n,r){var i;if(t>0){var o=(n[e]-n[t-1])/(e-t+1);i=r[e]-r[t-1]-(e-t+1)*o*o}else i=r[e]-n[e]*n[e]/(e+1);return i<0?0:i}function rd(t,e,n,r,i,o,a){if(!(t>e)){var s=Math.floor((t+e)/2);r[n][s]=r[n-1][s-1],i[n][s]=s;var l=n;t>n&&(l=Math.max(l,i[n][t-1]||0)),l=Math.max(l,i[n-1][s]||0);var c,u,f,h=s-1;e<r[0].length-1&&(h=Math.min(h,i[n][e+1]||0));for(var p=h;p>=l&&!((c=nd(p,s,o,a))+r[n-1][l-1]>=r[n][s]);--p)(u=nd(l,s,o,a)+r[n-1][l-1])<r[n][s]&&(r[n][s]=u,i[n][s]=l),l++,(f=c+r[n-1][p-1])<r[n][s]&&(r[n][s]=f,i[n][s]=p);rd(t,s-1,n,r,i,o,a),rd(s+1,e,n,r,i,o,a)}}function id(t,e){if(e>t.length)throw new Error("cannot generate more classes than there are data values");var n=td(t),r=function(t){for(var e,n=0,r=0;r<t.length;r++)0!==r&&t[r]===e||(e=t[r],n++);return n}(n);if(1===r)return[n];var i=ed(e,n.length),o=ed(e,n.length);!function(t,e,n){for(var r=e[0].length,i=t[Math.floor(r/2)],o=[],a=[],s=0,l=void 0;s<r;++s)l=t[s]-i,0===s?(o.push(l),a.push(l*l)):(o.push(o[s-1]+l),a.push(a[s-1]+l*l)),e[0][s]=nd(0,s,o,a),n[0][s]=0;for(var c=1;c<e.length;++c)rd(c<e.length-1?c:r-1,r-1,c,e,n,o,a)}(n,i,o);for(var a=[],s=o[0].length-1,l=o.length-1;l>=0;l--){var c=o[l][s];a[l]=n.slice(c,s+1),l>0&&(s=c-1)}return a}function od(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,r,i=[],o=[],a=0;for(n=0;n<t.length+1;n++){var s=[],l=[];for(r=0;r<e+1;r++)s.push(0),l.push(0);i.push(s),o.push(l)}for(n=1;n<e+1;n++)for(i[1][n]=1,o[1][n]=0,r=2;r<t.length+1;r++)o[r][n]=Number.POSITIVE_INFINITY;for(var c=2;c<t.length+1;c++){for(var u=0,f=0,h=0,p=0,d=1;d<c+1;d++){var g=c-d+1,v=t[g-1];if(a=(f+=v*v)-(u+=v)*u/++h,0!=(p=g-1))for(r=2;r<e+1;r++)o[c][r]>=a+o[p][r-1]&&(i[c][r]=g,o[c][r]=a+o[p][r-1])}i[c][1]=1,o[c][1]=a}return{lowerClassLimits:i,varianceCombinations:o}}(t,e);return function(t,e,n){var r=t.length,i=[],o=n;for(i[n]=t[t.length-1];o>0;)i[o-1]=t[e[r][o]-1],r=e[r][o]-1,o--;return i}(t,n.lowerClassLimits,e)}var ad=function(){this.totalCount=0,this.data={}};ad.prototype.train=function(t,e){for(var n in this.data[e]||(this.data[e]={}),t){var r=t[n];void 0===this.data[e][n]&&(this.data[e][n]={}),void 0===this.data[e][n][r]&&(this.data[e][n][r]=0),this.data[e][n][r]++}this.totalCount++},ad.prototype.score=function(t){var e,n={};for(var r in t){var i=t[r];for(e in this.data)n[e]={},this.data[e][r]?n[e][r+"_"+i]=(this.data[e][r][i]||0)/this.totalCount:n[e][r+"_"+i]=0}var o={};for(e in n)for(var a in o[e]=0,n[e])o[e]+=n[e][a];return o};var sd=function(){this.weights=[],this.bias=0};sd.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},sd.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 r=e-n,i=0;i<this.weights.length;i++)this.weights[i]+=r*t[i];this.bias+=r}return this};Math.log(Math.sqrt(2*Math.PI));Math.sqrt(2*Math.PI);var ld=Math.sqrt(2*Math.PI);function cd(t){for(var e=t,n=t,r=1;r<15;r++)e+=n*=t*t/(2*r+1);return Math.round(1e4*(.5+e/ld*Math.exp(-t*t/2)))/1e4}for(var ud=[],fd=0;fd<=3.09;fd+=.01)ud.push(cd(fd));function hd(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 r={};e.forEach((function(e){var i,o=e.pattern,a=void 0===o?"hatching":o,s=e.regionIds,l=void 0===s?[]:s,c=e.color,u=void 0===c?"#000":c,f=e.strokeWidth,h=void 0===f?1:f,p=e.customPattern;if(p){var d=p.match(/id=['"]([^'"]+)['"]/);if(!d)return void console.warn("customPattern must include an id attribute.");i=d[1],t.svg().select("#".concat(i)).empty()&&n.node().insertAdjacentHTML("beforeend",p)}else{var g=u.replace("#","").toLowerCase();i="".concat(a,"-").concat(g,"-sw").concat(h),function(t,e,n,r,i){var o=t.svg().select("defs");if(t.svg().select("#".concat(CSS.escape(e))).empty()){var a=o.append("pattern").attr("id",e).attr("patternUnits","userSpaceOnUse").attr("width",8).attr("height",8);"hatching"===n?a.append("path").attr("d","M-1,1 l2,-2 M0,8 l8,-8 M7,9 l2,-2").attr("stroke",r).attr("stroke-width",i):"crosshatch"===n?a.append("path").attr("d","M0,0 l8,8 M8,0 l-8,8").attr("stroke",r).attr("stroke-width",i):"dots"===n?a.append("circle").attr("cx",4).attr("cy",4).attr("r",i).attr("fill",r):(console.warn('Unknown pattern "'.concat(n,'", defaulting to hatching.')),a.append("path").attr("d","M-1,1 l2,-2 M0,8 l8,-8 M7,9 l2,-2").attr("stroke",r).attr("stroke-width",i))}}(t,i,a,u,h)}e.patternId=i,l.forEach((function(t){r[t]||(r[t]=[]),r[t].push(i)}))})),t.svg().selectAll(sr(t)).each((function(t){var e,n=this,i=null==t||null===(e=t.properties)||void 0===e?void 0:e.id,o=r[i];if(o&&o.length){var a=zt(this);o.forEach((function(t){var e=a.node().cloneNode(!0);zt(e).attr("fill","url(#".concat(t,")")).attr("pointer-events","none").attr("class",(a.attr("class")||"")+" pattern-fill-overlay"),zt(n.parentNode).append((function(){return e}))}))}}))}else console.warn("patternFill expects an array of configs")}var pd=function(t){var e=Cp(t,!1,"ch");e.numberOfClasses_=7,e.classificationMethod_="quantile",e.thresholds_=[0],e.colors_=null,e.makeClassifNice_=!0;var n=["#FFEB99","#D1E9B0","#8DD6B9","#58C1C0","#3792B6","#134891","#1d2b6f"];function r(t){var n=function(t){return _(Array(t).keys())},r=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;return":"===r||null===r?"nd":null!=r?+e.classifier_(r):void 0}}))};if(function(){var t=e.statData().getArray(),r=n(e.numberOfClasses_);switch(e.classificationMethod_){case"quantile":e.classifier(qt().domain(t).range(r));break;case"equal-interval":case"equinter":e.classifier(kn().domain([Ot(t),Nt(t)]).range(r)),e.makeClassifNice_&&e.classifier().nice();break;case"threshold":e.numberOfClasses(e.thresholds_.length+1),e.classifier(Tn().domain(e.thresholds_).range(n(e.numberOfClasses_)));break;case"jenks":var i=od(t,e.numberOfClasses_).slice(1,-1);e.classifier(Tn().domain(i).range(r));break;case"ckmeans":var o=id(t,e.numberOfClasses_).map((function(t){return t.pop()})).slice(0,-1);e.classifier(Tn().domain(o).range(r))}}(),t.svg_){var i=sr(t);if(r(t.svg().selectAll(i)),"mixed"===t.nutsLevel_)r(t.svg().selectAll("path.em-nutsrg0"))}}function i(t){if(e.filtersDefinitionFunction_?e.classToFillStyle(gd()):e.classToFillStyle(dd(e.colorFunction(),e.colors_)),t.svg_){var n=sr(t),r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).style("fill",a).end().then((function(){r.each((function(){var t=zt(this);t.attr("fill___",t.style("fill"))})),s(t,r),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=zt(this.parentNode).style("fill");zt(this).attr("fill",ar(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&o(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&hd(t,e.patternFill_)}}e.colorFunction_=function(t){return function(t,e){void 0===e&&(e=t,t=Ye);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}}(Vn,n)(Math.min(Math.max(0,t),1))},e.classToFillStyle_=void 0,e.classifier_=void 0,e.tooltip_.textFunction=vd,["numberOfClasses_","classificationMethod_","thresholds_","makeClassifNice_","colorFunction_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].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){return arguments.length?(e.colorFunction_=t,e.filtersDefinitionFunction_?e.classToFillStyle(gd()):e.classToFillStyle(dd(e.colorFunction(),e.colors_)),e):e.colorFunction_},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_&&rr(e.insetTemplates_,e.svgId_,r),r(e),e}catch(t){console.error("Error in updateClassification:",t.message),console.error(t)}},e.updateStyle=function(){try{return e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,i),i(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}},e.getLegendConstructor=function(){return Qp};var o=function(t){t.svg().selectAll(sr(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=zt(this),e=t.attr("ecl"),n=t.attr("lvl"),r=e||"0"===n;if(t.style("display",r?"block":"none"),e&&"0"!==n){var i=t.style("stroke")||"#777",o=t.style("stroke-width")||.2;t.style("stroke",i).style("stroke-width",o)}}}))},a=function(t){var n=zt(this).attr("ecl");if(e.Geometries.userGeometries)return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.numberOfClasses_):Qn("em-nutsrg","fill");if("WORLD"===e.geo_)return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_(n,e.numberOfClasses_)||e.cntrgFillStyle_:e.cntrgFillStyle_;t.properties.id.slice(0,2);return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.numberOfClasses_):Qn("em-nutsrg","fill")},s=function(t,n){n.on("mouseover",(function(n,r){zt(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout()}))};return e},dd=function(t,e){return t=t||An,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},gd=function(){return function(t){return"url(#pattern_"+t+")"}},vd=function(t,e){if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var n=[],r=t.properties.na||t.properties.name,i=t.properties.id;n.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(r,"</b>").concat(i?" (".concat(i,")"):"","\n </div>\n "));var o=e.statData(),a=o.get(i),s=o.unitText()||"";if(!a||0!==a.value&&!a.value||":"===a.value)return n.push('\n <div class="estat-vis-tooltip-text no-data">\n <table class="nuts-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="estat-vis-tooltip-text">\n <table class="nuts-table">\n <tbody>\n <tr><td>'.concat(nr(a.value)," ").concat(s,"</td></tr>\n </tbody>\n </table>\n </div>\n "));var l=a.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("")};function yd(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function _d(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function md(t){return t<0?-t*t:t*t}function xd(t){var e=t(Ze,Ze),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(Ze,Ze):.5===n?t(_d,md):t(yd(n),yd(1/n)):n},wn(e)}function bd(){var t=xd(rn());return t.copy=function(){return nn(t,bd()).exponent(t.exponent())},Ut.apply(t,arguments),t}function wd(){return bd.apply(null,arguments).exponent(.5)}function Sd(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}const kd=En(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Fn)),Td=4294967296;var Fd=Math.PI*(3-Math.sqrt(5));function Ed(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=Pr(f),c=yr("tick","end"),u=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Td)/Td}();function f(){h(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function h(r){var l,c,u=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(o-n)*i,s.forEach((function(t){t(n)})),l=0;l<u;++l)null==(c=t[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return e}function p(){for(var e,n=0,r=t.length;n<r;++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 i=10*Math.sqrt(.5+n),o=n*Fd;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(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:h,restart:function(){return l.restart(f),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?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},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,r){var i,o,a,s,l,c=0,u=t.length;for(null==r?r=1/0:r*=r,c=0;c<u;++c)(a=(i=e-(s=t[c]).x)*i+(o=n-s.y)*o)<r&&(l=s,r=a);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function Ad(t){return function(){return t}}function Cd(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,l,c,u,f,h,p=t._root,d={data:r},g=t._x0,v=t._y0,y=t._x1,_=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(g+y)/2))?g=o:y=o,(u=n>=(a=(v+_)/2))?v=a:_=a,i=p,!(p=p[f=u<<1|c]))return i[f]=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,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+y)/2))?g=o:y=o,(u=n>=(a=(v+_)/2))?v=a:_=a}while((f=u<<1|c)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[f]=d,t}function Md(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ld(t){return t[0]}function zd(t){return t[1]}function Od(t,e,n){var r=new Nd(null==e?Ld:e,null==n?zd:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Nd(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Dd(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Pd=Od.prototype=Nd.prototype;function jd(t){return 1e-6*(t()-.5)}function Rd(t){return t.x+t.vx}function Id(t){return t.y+t.vy}function Gd(t){return function(){return t}}Pd.copy=function(){var t,e,n=new Nd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Dd(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Dd(e));return n},Pd.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Cd(this.cover(e,n),e,n,t)},Pd.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),l=1/0,c=1/0,u=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<l&&(l=r),r>u&&(u=r),i<c&&(c=i),i>f&&(f=i));if(l>u||c>f)return this;for(this.cover(l,c).cover(u,f),n=0;n<o;++n)Cd(this,a[n],s[n],t[n]);return this},Pd.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,l=i-n||1,c=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},Pd.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Pd.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]]},Pd.find=function(t,e,n){var r,i,o,a,s,l,c,u=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new Md(g,u,f,h,p)),null==n?n=1/0:(u=t-n,f=e-n,h=t+n,p=e+n,n*=n);l=d.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<u||(s=l.y1)<f))if(g.length){var v=(i+a)/2,y=(o+s)/2;d.push(new Md(g[3],v,y,a,s),new Md(g[2],i,y,v,s),new Md(g[1],v,o,a,y),new Md(g[0],i,o,v,y)),(c=(e>=y)<<1|t>=v)&&(l=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=l)}else{var _=t-+this._x.call(null,g.data),m=e-+this._y.call(null,g.data),x=_*_+m*m;if(x<n){var b=Math.sqrt(n=x);u=t-b,f=e-b,h=t+b,p=e+b,r=g.data}}return r},Pd.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,l,c,u,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(s=(d+v)/2))?d=s:v=s,(u=a>=(l=(g+y)/2))?g=l:y=l,e=p,!(p=p[f=u<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},Pd.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Pd.root=function(){return this._root},Pd.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Pd.visit=function(t){var e,n,r,i,o,a,s=[],l=this._root;for(l&&s.push(new Md(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&l.length){var c=(r+o)/2,u=(i+a)/2;(n=l[3])&&s.push(new Md(n,c,u,o,a)),(n=l[2])&&s.push(new Md(n,r,u,c,a)),(n=l[1])&&s.push(new Md(n,c,i,o,u)),(n=l[0])&&s.push(new Md(n,r,i,c,u))}return this},Pd.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Md(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,l=e.x1,c=e.y1,u=(a+l)/2,f=(s+c)/2;(o=i[0])&&n.push(new Md(o,a,s,u,f)),(o=i[1])&&n.push(new Md(o,u,s,l,f)),(o=i[2])&&n.push(new Md(o,a,f,u,c)),(o=i[3])&&n.push(new Md(o,u,f,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Pd.x=function(t){return arguments.length?(this._x=t,this):this._x},Pd.y=function(t){return arguments.length?(this._y=t,this):this._y};const Wd=Math.PI,Bd=2*Wd,Hd=1e-6,Ud=Bd-Hd;function qd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class $d{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?qd:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return qd;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++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,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-t,l=r-e,c=o-t,u=a-e,f=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>Hd)if(Math.abs(u*s-l*c)>Hd&&i){let h=n-o,p=r-a,d=s*s+l*l,g=h*h+p*p,v=Math.sqrt(d),y=Math.sqrt(f),_=i*Math.tan((Wd-Math.acos((d+f-g)/(2*v*y)))/2),m=_/y,x=_/v;Math.abs(m-1)>Hd&&this._append`L${t+m*c},${e+m*u}`,this._append`A${i},${i},0,0,${+(u*h>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,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=t+a,c=e+s,u=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Hd||Math.abs(this._y1-c)>Hd)&&this._append`L${l},${c}`,n&&(f<0&&(f=f%Bd+Bd),f>Ud?this._append`A${n},${n},0,1,${u},${t-a},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>Hd&&this._append`A${n},${n},0,${+(f>=Wd)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Vd(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 $d(e)}const Yd=Math.abs,Jd=Math.atan2,Xd=Math.cos,Kd=Math.max,Zd=Math.min,Qd=Math.sin,tg=Math.sqrt,eg=1e-12,ng=Math.PI,rg=ng/2,ig=2*ng;function og(t){return t>=1?rg:t<=-1?-rg:Math.asin(t)}tg(3);const ag={draw(t,e){const n=tg(e/ng);t.moveTo(n,0),t.arc(0,0,n,0,ig)}},sg={draw(t,e){const n=tg(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()}},lg=tg(1/3),cg=2*lg,ug={draw(t,e){const n=tg(e/cg),r=n*lg;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},fg={draw(t,e){const n=tg(e),r=-n/2;t.rect(r,r,n,n)}},hg=Qd(ng/10)/Qd(7*ng/10),pg=Qd(ig/10)*hg,dg=-Xd(ig/10)*hg,gg={draw(t,e){const n=tg(.8908130915292852*e),r=pg*n,i=dg*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=ig*e/5,a=Xd(o),s=Qd(o);t.lineTo(s*n,-a*n),t.lineTo(a*r-s*i,s*r+a*i)}t.closePath()}},vg=tg(3),yg={draw(t,e){const n=-tg(e/(3*vg));t.moveTo(0,2*n),t.lineTo(-vg*n,-n),t.lineTo(vg*n,-n),t.closePath()}},_g=(tg(3),-.5),mg=tg(3)/2,xg=1/tg(12),bg=3*(xg/2+1),wg={draw(t,e){const n=tg(e/bg),r=n/2,i=n*xg,o=r,a=n*xg+n,s=-o,l=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,l),t.lineTo(_g*r-mg*i,mg*r+_g*i),t.lineTo(_g*o-mg*a,mg*o+_g*a),t.lineTo(_g*s-mg*l,mg*s+_g*l),t.lineTo(_g*r+mg*i,_g*i-mg*r),t.lineTo(_g*o+mg*a,_g*a-mg*o),t.lineTo(_g*s+mg*l,_g*l-mg*s),t.closePath()}};function Sg(t,e){let n=null,r=Vd(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:Gd(t||ag),e="function"==typeof e?e:Gd(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Gd(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Gd(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var kg=function(t,e){var n=Ep(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.noDataShapeWidth=25,n.noDataShapeHeight=20,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:3,shapePadding:5,shapeOffset:{x:0,y:0},shapeFill:"white",shapeStroke:null,labelOffset:{x:10,y:0},decimals:0,labelFormatter:void 0,_totalBarsHeight:0,_totalD3SymbolsHeight:0,noData:!1,noDataText:"No data"},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,marginTop:30,shapeWidth:25,shapeHeight:20,shapePadding:1,labelOffset:{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},e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r){for(var i in n[r])void 0!==e[r][i]&&(n[r][i]=e[r][i]);0==e.colorLegend&&(n.colorLegend=!1)}else n[r]=e[r];function o(t,e){var r=n.map;t.append("rect").attr("class","em-legend-rect").style("fill",r.noDataFillStyle()).attr("width",n.colorLegend?n.colorLegend.shapeWidth:n.noDataShapeWidth).attr("height",n.colorLegend?n.colorLegend.shapeHeight:n.noDataShapeHeight).on("mouseover",(function(){a(n.map,"nd"),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,a,"nd")})).on("mouseout",(function(){s(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s,"nd")})),t.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend?n.colorLegend.shapeWidth+n.colorLegend.labelOffset.x:n.noDataShapeWidth+5).attr("y",n.colorLegend?n.colorLegend.shapeHeight/2:n.noDataShapeHeight/2).text(e)}function a(t,e){var r="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(r="#em-user-regions");var i=t.selectAll(r).selectAll("[ecl='"+e+"']");i.style("fill",t.hoverColor()),i.attr("fill___",(function(){zt(this).style("fill")}))}function s(t,e){var r="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(r="#em-user-regions"),t.selectAll(r).selectAll("[ecl='"+e+"']").style("fill",(function(){zt(this).attr("fill___")}))}function l(t,e,r,i,o){var a="triangle"==n.map.psShape_||"diamond"==n.map.psShape_?r:r/2;0==n.sizeLegend._totalD3SymbolsHeight&&(n.sizeLegend._totalD3SymbolsHeight+=a+n.boxPadding);var s=t.classifierSize_(t.classifierSize_.domain()[1]),l=s,c=(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+n.sizeLegend._totalD3SymbolsHeight+(n.sizeLegend.shapePadding*i-1);n.sizeLegend._totalD3SymbolsHeight+=r;var u=n._sizeLegendNode.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-size-legend-item"),h=f().size(r*r)();u.append("g").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).append("path").attr("d",h).attr("transform",(function(){return"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var p=s/2+n.sizeLegend.labelOffset.x+n.boxPadding;u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",p).attr("y",0).text(o(e))}function c(t,e,r,i,o){var a,s=n.boxPadding;if(t.customSymbols.prevSymb||(a=n.boxPadding+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+20,t.customSymbols.initialTranslateY=a,t.customSymbols.prevScale=r),t.customSymbols.prevSymb){var l=t.customSymbols.prevSymb.node().getBBox();t.customSymbols.nodeHeights=t.customSymbols.nodeHeights+l.height*t.customSymbols.prevScale,a=t.customSymbols.initialTranslateY+t.customSymbols.nodeHeights+n.sizeLegend.shapePadding*(i-1),t.customSymbols.prevScale=r}var c=n._sizeLegendNode.append("g").attr("transform","translate(".concat(s,",").concat(a,")")).attr("class","em-size-legend-item");t.customSymbols.prevSymb=c.append("g").attr("class","em-size-legend-symbol").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(n.map.psCustomSVG_).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,") scale(").concat(r,")"):"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var u=s+t.classifierSize_(t.classifierSize_.domain()[0])+n.sizeLegend.labelOffset.x,f=n.sizeLegend.shapeOffset.y/2+1;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",f).text(o(e))}function u(t,e,r,i,o){var a=n.boxPadding,s=n.boxPadding+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+n.sizeLegend._totalBarsHeight+10;n.sizeLegend._totalBarsHeight+=r+10;var l=f().size(r*r)(),c=n._sizeLegendNode.append("g").attr("transform","translate(".concat(a,",").concat(s,")")).attr("class","em-size-legend-item");c.append("g").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",l).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,") scale(").concat(r,")"):"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var u=a+n.map.psBarWidth_+n.sizeLegend.labelOffset.x,h=r/2+n.sizeLegend.labelOffset.y;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(o(e))}function f(){var t;if(n.map.psCustomSVG_)t=n.map.psCustomSVG_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=Sg().type({draw:function(t,e){var r=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,r),t.lineTo(n.map.psBarWidth_,r),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=Eg[n.map.psShape_]||Eg.circle;t=Sg().type(e)}return t}function a(t,e){var n=t.svg_.selectAll("#em-prop-symbols").selectAll("[ecl]");n.each((function(t,e){zt(this.childNodes[0]).style("fill","white")})),n.filter("[ecl='"+e+"']").each((function(t,e){var n=zt(this.childNodes[0]);n.style("fill",n.attr("fill___"))}))}function s(t){t.svg_.selectAll("#em-prop-symbols").selectAll("[ecl]").each((function(t,e){var n=zt(this.childNodes[0]);n.style("fill",n.attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var e=n.map,r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.sizeLegend._totalBarsHeight=0,n.sizeLegend._totalD3SymbolsHeight=0,n._sizeLegendNode=r.append("g").attr("class","size-legend-container"),e.classifierSize_&&function(e){if(!e.psCustomSVG_&&"circle"==e.psShape_){if(function(t){var e=t.classifierSize_.domain();n.sizeLegend.values?n._sizeLegendValues=n.sizeLegend.values:n._sizeLegendValues=[Math.floor(e[1]),Math.floor(e[1]/2),Math.floor(e[0])];!n.sizeLegend.title&&n.title&&(n.sizeLegend.title=n.title);n.sizeLegend.title&&n._sizeLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.sizeLegend.title);var r=t.classifierSize_(Nt(n._sizeLegendValues)),i=n.boxPadding+r,o=n.boxPadding+2*r+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+20,a=n._sizeLegendNode.append("g").attr("transform","translate(".concat(i,",").concat(o,")")).attr("class","circle-legend").attr("text-anchor","right").style("fill","black").selectAll("g").data(n._sizeLegendValues.filter((function(e){return t.classifierSize_(e)}))).join("g").attr("class","em-legend-item");a.append("circle").attr("class","em-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.classifierSize_(e)})).attr("r",t.classifierSize_),a.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("y",(function(e,n){return-1-2*t.classifierSize_(e)})).attr("x",r+5).text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),a.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.classifierSize_(e)})).attr("x2",r+5).attr("y2",(function(e,n){return-1-2*t.classifierSize_(e)}))}(e,n.sizeLegend),n.sizeLegend.noData){var r=n._sizeLegendNode.node().getBBox().height+25,i=n.boxPadding;o(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(i,",").concat(r,")")),n.sizeLegend.noDataText)}return}if("spike"==e.psShape_)return void function(t){var e=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-e,"L").concat(n/2,",0")},r=t.classifierSize_(t.classifierSize_.domain()[1]),i=n.sizeLegend.values||t.classifierSize_.ticks(4).slice(1),a=Zn("em-legend-label"),s=a-2,l=n._sizeLegendNode.append("g").attr("id","em-spike-legend").attr("transform","translate(".concat(n.boxPadding+5,",0)")).attr("fill","black").attr("text-anchor","middle").style("font-size","".concat(a,"px")).selectAll().data(i).join("g").attr("transform",(function(t,e){return"translate(".concat(40*e+n.boxPadding,",").concat(r+5,")")}));if(l.append("path").attr("fill",t.psFill_).attr("fill-opacity",t.psFillOpacity_).attr("stroke",t.psStroke_).attr("stroke-width",t.psStrokeWidth_).attr("d",(function(n){return e(t.classifierSize_(n))})),l.append("text").attr("class","em-legend-label").attr("dy",s).text((function(e){return t.classifierSize_.tickFormat(4,"s")(e)})),n.sizeLegend.noData){var c=r+s+a+5,u=n.boxPadding;o(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(u,",").concat(c,")")),n.sizeLegend.noDataText)}}(e,n.sizeLegend);var a=n.sizeLegend.labelFormatter||nr;n.sizeLegend.title&&n._sizeLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.sizeLegend.title);var s=e.classifierSize_.domain(),f=s[1];n.sizeLegend.values&&(n.sizeLegend.cellNb=n.sizeLegend.values.length);e.customSymbols={nodeHeights:0};for(var h=1;h<n.sizeLegend.cellNb+1;h++){var p=n.ascending?n.sizeLegend.cellNb-h+1:h,d=n.sizeLegend.values?n.sizeLegend.values[p-1]:f/p,g=e.classifierSize_(d);"bar"==e.psShape_?u(t,d,g,h,a):"custom"==e.psShape_||e.psCustomSVG_?c(t,d,g,h,a):l(t,d,g,h,a)}if(n.sizeLegend.noData){var v=n._sizeLegendNode.node().getBBox().height;n.colorLegend&&(v+=n.colorLegend.shapeHeight+5);var y=n.boxPadding;o(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(y,",").concat(v,")")),n.sizeLegend.noDataText)}}(e,n.sizeLegend),n._colorLegendNode=r.append("g").attr("class","color-legend-container"),n._sizeLegendNode&&n._colorLegendNode.attr("transform","translate(0,".concat(n._sizeLegendNode.node().getBBox().height,")")),e.classifierColor_&&n.colorLegend&&function(t){"ranges"===n.colorLegend.labelType?function(t){var e=n.colorLegend.labelFormatter||nr,r=function(){var t=n.map,e=t.psThresholds_.length>1?t.psThresholds_:Array.from({length:t.psClasses_}).map((function(e,r){return t.classifierColor_.invertExtent(r)[n.ascending?0:1]})).slice(1);return e}(),i=t.psClasses_;n.colorLegend.title&&n._colorLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.titleFontSize+n.colorLegend.marginTop).text(n.colorLegend.title);for(var l=n.boxPadding,c=function(o){var c=n.titleFontSize+n.colorLegend.titlePadding+n.colorLegend.marginTop+o*(n.colorLegend.shapeHeight+n.colorLegend.shapePadding),u=n.ascending?o:i-o-1,f=n._colorLegendNode.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-legend-item");f.append("rect").attr("class","em-legend-rect").style("fill",t.psClassToFillStyle()(u,i)).attr("width",n.colorLegend.shapeWidth).attr("height",n.colorLegend.shapeHeight).on("mouseover",(function(){a(n.map,u),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,a,u)})).on("mouseout",(function(){s(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s)})),f.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend.shapeWidth+n.colorLegend.labelOffset.x).attr("y",n.colorLegend.shapeHeight/2).text((function(){return n.colorLegend.labels?n.colorLegend.labels[o]:0===o?"> ".concat(e(r[r.length-1])):o===r.length?"< ".concat(e(r[0])):"".concat(e(r[r.length-o-1])," - < ").concat(e(r[r.length-o]))}))},u=0;u<i;u++)c(u);if(n.colorLegend.noData){var f=n.titleFontSize+n.colorLegend.marginTop+i*n.colorLegend.shapeHeight+20;o(n._colorLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(l,",").concat(f,")")),n.colorLegend.noDataText)}}(t):function(t){var e=n.colorLegend.labelFormatter||nr;n.colorLegend.title&&n._colorLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.titleFontSize+n.colorLegend.marginTop).text(n.colorLegend.title);for(var r=n.boxPadding,i=t.psClasses_,l=function(){var o=n.titleFontSize+n.colorLegend.titlePadding+n.colorLegend.marginTop+c*n.colorLegend.shapeHeight,l=n.ascending?c:i-c-1,u=n._colorLegendNode.append("g").attr("transform","translate(".concat(r,",").concat(o,")")).attr("class","em-legend-item");u.append("rect").attr("class","em-legend-rect").style("fill",t.psClassToFillStyle()(l,i)).attr("width",n.colorLegend.shapeWidth).attr("height",n.colorLegend.shapeHeight).on("mouseover",(function(){a(n.map,l),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,a,l)})).on("mouseout",(function(){s(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,s,l)})),c>0&&u.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",0).attr("x2",0+n.colorLegend.sepLineLength).attr("y2",0),c>0&&u.append("line").attr("class","em-legend-tick").attr("x1",n.colorLegend.shapeWidth).attr("y1",0).attr("x2",n.colorLegend.sepLineLength+n.colorLegend.tickLength).attr("y2",0),c<i-1&&u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend.sepLineLength+n.colorLegend.tickLength+n.colorLegend.labelOffset.x).attr("y",n.colorLegend.shapeHeight).text(n.colorLegend.labels?n.colorLegend.labels[c]:e(t.classifierColor_.invertExtent(n.ascending?l+1:l-1)[n.ascending?0:1]))},c=0;c<i;c++)l();if(n.colorLegend.noData){var u=n.titleFontSize+n.colorLegend.marginTop+i*n.colorLegend.shapeHeight+20;o(n._colorLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(r,",").concat(u,")")),n.colorLegend.noDataText)}}(t)}(e,n.colorLegend);var i=n.lgg.node().getBBox().height;Lp(t,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:i+n.boxPadding+5}),n.setBoxDimension()}},n},Tg=function(t){var e=Cp(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 r=n.get(t.properties.id);if(!r)return"nd";var i=r.value;return 0!==i&&!i||":"==i?"nd":+e.classifierColor_(+i)}))}}function r(t){e.psClassToFillStyle()||e.psClassToFillStyle(Fg(e.psColorFun_,e.psColors_));var r=t.statData("size").getArray()?t.statData("size"):t.statData();if(t.svg_){var s,l;t.svg_.selectAll(":not(#em-insets-group) g.em-centroid > *").remove(),function(t){var e,r,i=t.svg_.select("#em-prop-symbols"),o=null!==(e=t.statData("size"))&&void 0!==e&&null!==(r=e.getArray)&&void 0!==r&&r.call(e)?t.statData("size"):t.statData();if(t.Geometries.centroidFeatures){var a=t.Geometries.centroidFeatures.filter((function(t){var e,n=null===(e=o.get)||void 0===e||null===(e=e.call(o,t.properties.id))||void 0===e?void 0:e.value;return null!=n&&":"!==n})).sort((function(t,e){return o.get(e.properties.id).value-o.get(t.properties.id).value}));i.selectAll("g.em-centroid").remove(),i.selectAll("g.em-centroid").data(a,(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)}}(t),l=e.psCustomSVG_?function(t,n){return t.svg().select("#em-prop-symbols").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 r=n.get(t.properties.id),i=e.classifierSize_(+r.value);if(i)return"translate(".concat(e.psOffset_.x*i,",").concat(e.psOffset_.y*i,") scale(").concat(i,")")}))}(t,r):"bar"==e.psShape_?function(t,n){return t.svg().select("#em-prop-symbols").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 r=n.get(t.properties.id);return r&&r.value?e.classifierSize_(+r.value):0})).attr("transform",(function(){this.getBoundingClientRect();return"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")}))}(t,r):"circle"==e.psShape_?function(t,n){var r=t.svg().selectAll("g.em-centroid").filter((function(t){var e=n.get(t.properties.id);return"DE"==t.properties.id&&console.log(e),e&&":"!==e.value&&e.value})).append("circle").attr("r",(function(t){var r=n.get(t.properties.id),i=e.classifierSize_(r.value);return i<0&&console.error("Negative radius for circle:",t.properties.id),isNaN(i)&&console.error("NaN radius for circle:",t.properties.id),i}));return r}(t,r):"spike"==e.psShape_?function(t,n){var r=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=t.svg().selectAll("g.em-centroid"),o=i.append("path").attr("d",(function(t){var i=n.get(t.properties.id),o=i?e.classifierSize_(i.value):0;return r(o)})).style("fill",(function(t){return t.color||"steelblue"})).attr("fill-opacity",t.psFillOpacity_).attr("stroke",t.psStroke_).attr("stroke-width",t.psStrokeWidth_);return o}(t,r):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 r=n.get(t.properties.id);if(0==r||r){var i=e.classifierSize_(+r.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(i*i)();var o=Eg[e.psShape_]||Eg.circle;return Sg().type(o).size(i*i)()}}}))}(t,r),e.dorling_?function(t,n){var r=t.svg().selectAll("g.em-centroid");e.simulation&&a();console.log("new dorling simulation"),e.simulation=Ed(t.Geometries.centroidFeatures).force("x",function(t){var e,n,r,i=Ad(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=Ad(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Ad(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:Ad(+e),a(),o):t},o}((function(t){return t.properties.centroid[0]})).strength(e.dorlingStrength_.x)).force("y",function(t){var e,n,r,i=Ad(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=Ad(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Ad(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:Ad(+e),a(),o):t},o}((function(t){return t.properties.centroid[1]})).strength(e.dorlingStrength_.y)).force("collide",function(t){var e,n,r,i=1,o=1;function a(){for(var t,a,l,c,u,f,h,p=e.length,d=0;d<o;++d)for(a=Od(e,Rd,Id).visitAfter(s),t=0;t<p;++t)l=e[t],f=n[l.index],h=f*f,c=l.x+l.vx,u=l.y+l.vy,a.visit(g);function g(t,e,n,o,a){var s=t.data,p=t.r,d=f+p;if(!s)return e>c+d||o<c-d||n>u+d||a<u-d;if(s.index>l.index){var g=c-s.x-s.vx,v=u-s.y-s.vy,y=g*g+v*v;y<d*d&&(0===g&&(y+=(g=jd(r))*g),0===v&&(y+=(v=jd(r))*v),y=(d-(y=Math.sqrt(y)))/y*i,l.vx+=(g*=y)*(d=(p*=p)/(h+p)),l.vy+=(v*=y)*d,s.vx-=g*(d=1-d),s.vy-=v*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 r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Ad(null==t?1:+t)),a.initialize=function(t,n){e=t,r=n,l()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:Ad(+e),l(),a):t},a}((function(t){var r=n.get(t.properties.id),i=r?e.classifierSize_(r.value):0;return"square"===e.psShape_?i/2*Math.SQRT2:i})).iterations(e.dorlingIterations_)).on("tick",(function(){r.attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}))}))}(t,r):e.simulation&&a(),i(t,r);var c=sr(t),u=t.svg().selectAll(c);"WORLD"!==t.geo_&&("mixed"==t.nutsLevel_&&function(t,n,r){r.style("display",(function(e){if(!this.parentNode.classList.contains("em-cntrg")){var r=n.get(e.properties.id);return!r||!r.value&&0!==r&&0!==r.value?"none":"WORLD"==t.geo_?"block":void 0}})),r.style("stroke",(function(t){var e=zt(this),r=e.attr("lvl"),i=e.style("stroke"),o=n.get(t.properties.id);if(o&&o.value)return"0"!==r?i||"#777":void 0})).style("stroke-width",(function(t){var r=zt(this),i=r.attr("lvl"),o=r.style("stroke-width"),a=n.get(t.properties.id);if(a&&a.value)return"WORLD"==e.geo_&&"0"!==i?o||"#777":void 0}))}(t,r,u),u.attr("ecl",(function(t){var e=r.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.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=zt(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle_||"gray"}return e.psFill_})).attr("fill___",(function(){return zt(this).style("fill")}))}(l),o(t),null!==(s=e.labels_)&&void 0!==s&&s.values&&e.updateValuesLabels(t),e.patternFill_&&hd(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.psClasses_=5,e.psColors_=null,e.psColorFun_=kd,e.psClassToFillStyle_=void 0,e.psThresholds_=[0],e.psClassificationMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=Ag,e.dorling_=!1,e.dorlingStrength_={x:1,y:1},e.dorlingIterations_=1,e.psCodeLabels_=!1,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","psSizeScale_","noDataFillStyle_","psThresholds_","psColors_","psCustomSVG_","psOffset_","psClassificationMethod_","psClasses_","dorling_","dorlingStrength_","psSpikeWidth_","psCodeLabels_","dorlingIterations_"].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_=Fg(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 r=function(t){return _(Array(t).keys())},i=(e.statData("size").getArray()||e.statData().getArray()).filter((function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)})),o=Sd(i),a=Yn(o,2),s=a[0],l=a[1],c=null!==(t=e.psMinValue_)&&void 0!==t?t:s,u=null!==(n=e.psMaxValue_)&&void 0!==n?n:l,f=i?[c,u]:[e.statData().getMin(),e.statData().getMax()],h="sqrt"==e.psSizeScale_?wd:Sn;if(e.classifierSize(h().domain(f).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassificationMethod_){var p=e.statData("color").getArray(),d=r(e.psClasses_);e.classifierColor(qt().domain(p).range(d))}else if("equinter"===e.psClassificationMethod_){var g=e.statData("color").getArray(),v=r(e.psClasses_);e.classifierColor(kn().domain([c(g),u(g)]).range(v)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassificationMethod_){e.psClasses(e.psThresholds().length+1);var y=r(e.psClasses_);e.classifierColor(Tn().domain(e.psThresholds()).range(y))}}(),e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,n),n(e),e}catch(t){console.error("Error in proportional symbols classification: "+t.message),console.error(t)}};var i=function(t,n){var r,i=t.svg().selectAll("g.em-centroid");if(e.psCodeLabels_)i.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 r,i,o=n.get(t.properties.id),a=o?e.classifierSize_(o.value):0,s=null!==(r=e.labels_)&&void 0!==r&&r.values&&null!==(i=n.get(t.properties.id))&&void 0!==i&&i.value?.8:.9;return"square"===e.psShape_&&(s-=.4),"".concat(a*s,"px")})).attr("fill",ar(e.psFill_)).attr("dy",(function(t){var r,i;return null!==(r=e.labels_)&&void 0!==r&&r.values&&null!==(i=n.get(t.properties.id))&&void 0!==i&&i.value?"-0.3em":"0"}));if(null!==(r=e.labels_)&&void 0!==r&&r.values)i.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 r=n.get(t.properties.id),i=r?e.classifierSize_(r.value):0;return"".concat(.4*i,"px")})).attr("fill",ar(e.psFill_)).attr("dy",(function(t){return e.psCodeLabels_?"0.6em":"0"}))},o=function(t){t.svg().selectAll("g.em-centroid").on("mouseover",(function(t,n){var r=zt(this.childNodes[0]);r.attr("fill___",r.style("fill")),r.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(t){var n=zt(this.childNodes[0]),r=n.attr("fill___");r&&(n.style("fill",r),e._tooltip&&e._tooltip.mouseout())}))};function a(){e.simulation.stop(),e.simulation.on("tick",null),e.simulation.on("end",null),e.simulation=null}return e.updateStyle=function(){try{if(r(e),e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var n=0;n<e.insetTemplates_[t].length;n++)if(Array.isArray(e.insetTemplates_[t][n]))for(var i=0;i<e.insetTemplates_[t][n].length;i++)e.insetTemplates_[t][n][i].svgId_!==e.svgId_&&r(e.insetTemplates_[t][n][i]);else e.insetTemplates_[t][n].svgId_!==e.svgId_&&r(e.insetTemplates_[t][n]);else e.insetTemplates_[t].svgId_!==e.svgId_&&r(e.insetTemplates_[t]);return e}catch(t){console.error("Error in proportional symbols styling: "+t.message),console.error(t)}},e.getLegendConstructor=function(){return kg},e},Fg=function(t,e){return t=t||kd,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Eg={cross:sg,square:fg,diamond:ug,triangle:yg,star:gg,wye:wg,circle:ag},Ag=function(t,e){if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var n=[],r=t.properties.na,i=t.properties.id;n.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(r,"</b>").concat(i?" (".concat(i,")"):"","\n </div>\n "));var o=e.statData("size").getArray()?e.statData("size"):e.statData(),a=o.get(t.properties.id);if(!a||0!=a.value&&!a.value)n.push(e.noDataText_);else{var s=o.unitText();n.push('<div class="estat-vis-tooltip-text">'.concat(nr(a.value)," ").concat(s||" ","</div>"))}if(e.statData("color").getArray()){var l=e.statData("color").get(t.properties.id);if(!l||0!=l.value&&!l.value)n.push(e.noDataText_);else{var c=e.statData("color").unitText();n.push('<div class="estat-vis-tooltip-text">'.concat(nr(l.value)," ").concat(c||" ","</div>"))}}return n.join("")};const Cg=Fn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var Mg=function(t,e){var n=Ep(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",n.order=void 0,e)for(var r in e)n[r]=e[r];function i(t,e){var r="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(r="#em-user-regions");var i=t.svg_.selectAll(r).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}function o(t){var e="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(e="#em-user-regions"),t.svg_.selectAll(e).selectAll("[ecl]").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()&&n.map.classifier_){var t=n.map,e=n.lgg;n.makeBackgroundBox(),n.title&&e.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title);for(var r=t.classToFillStyle()?Object.keys(t.classToFillStyle()):t.classifier_.domain(),a=n.order?n.order:r,s=function(){var r=a[l],s=t.classifier_(r),c=t.classToFillStyle_[r],u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+l*(n.shapeHeight+n.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",c).on("mouseover",(function(){i(n.map,s),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.svgId_,i,s)})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.svgId_,o,s)})),e.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",u+.5*n.shapeHeight).attr("dy","0.35em").text(t.classToText()?t.classToText()[r]:r)},l=0;l<a.length;l++)s();if(n.noData){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+a.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",t.noDataFillStyle_).on("mouseover",(function(){i(n.map,"nd"),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.svgId_,i,"nd")})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.svgId_,o,"nd")})),e.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",c+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}var u=n.lgg.node().getBBox().height;Lp(t,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:u+n.boxPadding+5}),n.setBoxDimension()}},n},Lg=function(t,e){var n=[];t.properties.id?n.push('<div class="estat-vis-tooltip-bar">'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-tooltip-bar">'+t.properties.na+"</div>");var r=e.statData().get(t.properties.id);if(!r||0!=r.value&&!r.value)return n.push(e.noDataText_),n.join("");var i=r.value;if(e.classToText_){var o=e.classToText_[i];return n.push('\n <div class="estat-vis-tooltip-text">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n '.concat(o||i,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")}return n.push('\n <div class="estat-vis-tooltip-text">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n '.concat(i,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")},zg=Array.prototype.slice;function Og(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ng(t){this._context=t}function Dg(t){return new Ng(t)}function Pg(t){return t[0]}function jg(t){return t[1]}function Rg(t,e){var n=Gd(!0),r=null,i=Dg,o=null,a=Vd(s);function s(s){var l,c,u,f=(s=Og(s)).length,h=!1;for(null==r&&(o=i(u=a())),l=0;l<=f;++l)!(l<f&&n(c=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(c,l,s),+e(c,l,s));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?Pg:Gd(t),e="function"==typeof e?e:void 0===e?jg:Gd(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Gd(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Gd(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:Gd(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),s):r},s}Ng.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 Ig=function(t,e){var n=Ep(t);if(n.squareSize=100,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.axisTitleFontSize=Zn("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.noData=!0,n.noDataShapeHeight=20,n.noDataShapeWidth=25,n.noDataText="No data",n.boxPadding=n.labelFontSize,n.noDataYOffset=30,n.axisArrows=!0,n.arrowHeight=15,n.arrowWidth=14,n.arrowPadding=10,e)for(var r in e)n[r]=e[r];function i(t,e,n){var r=lr(t),i=t.svg_.selectAll(r).selectAll("[ecl1]");i.style("fill","white"),i.filter("[ecl1='".concat(e,"']")).filter("[ecl2='".concat(n,"']")).each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}function o(t){var e=lr(t);t.svg_.selectAll(e).selectAll("[ecl1]").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}return n.update=function(){var e,r;n.updateConfig(),n.updateContainer(),n._horizontalOffset=n.axisTitleFontSize+n.arrowPadding,n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.lgg.append("text").attr("class","em-legend-title").attr("x",xc+n._horizontalOffset).attr("y",n.boxPadding+n.titleFontSize).text(n.title),n._y=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),function(){for(var t=n.lgg,e=n.map.numberOfClasses(),r=n.squareSize/e,a=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(a+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,a=e-f-1,u=n.map.classToFillStyle()(t,a);l.append("rect").attr("class","em-bivariate-square").attr("x",s+(e-1-c)*r).attr("y",f*r).attr("width",r).attr("height",r).style("fill",u).on("mouseover",(function(){i(n.map,t,a),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,i,t,a),zt(this).raise()})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,o,t,a)}))},f=0;f<e;f++)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||(n.breaks1=t.classifier1_.quantiles().map((function(t){return parseFloat(t.toFixed(0))})),n.breaks2=t.classifier2_.quantiles().map((function(t){return parseFloat(t.toFixed(0))}))),function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,r=n.map.numberOfClasses(),i=n.squareSize/r,o=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 a=0;a<n.breaks1.length;a++){var s=e+i*(a+1),l=n.squareSize+Zn("em-bivariate-tick-label");o.append("text").attr("class","em-bivariate-tick-label").attr("x",s+n.xAxisLabelsOffset.x).attr("y",l+n.xAxisLabelsOffset.y).text(n.breaks1[a]),o.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,f=i*(c+2)-i;o.append("text").attr("class","em-bivariate-tick-label").attr("x",u+n.yAxisLabelsOffset.x).attr("y",f-n.yAxisLabelsOffset.y-(n.tickLength+2)).text(_(n.breaks2).reverse()[c]).attr("text-anchor","middle").attr("transform","rotate(-90, ".concat(u,", ").concat(f,")")),o.append("line").attr("class","em-bivariate-tick").attr("x1",u).attr("x2",u-n.tickLength).attr("y1",f).attr("y2",f)}}(),n._xAxisArrowY=0,n._yAxisArrowX=0,n.axisArrows&&function(){var t=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,e=0,r=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+=Zn("em-bivariate-tick-label")/1.5);r.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Rg()([[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);r.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Rg()([[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,r=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)")),i=n.squareSize+n.xAxisLabelsOffset.y+(n.axisArrows?n.arrowPadding+n.arrowHeight:7),o=e;(n.showBreaks||n.breaks1&&n.breaks2)&&(i+=Zn("em-bivariate-tick-label"));n.xAxisTitleOffset&&(i+=n.xAxisTitleOffset.y);n.xAxisTitleOffset&&(o+=n.xAxisTitleOffset.x);r.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-x").attr("x",o).attr("y",i).text(n.label1).attr("dominant-baseline","hanging").attr("alignment-baseline","hanging");var a=(n.axisArrows?n._yAxisArrowX-n.arrowPadding:7)+(-45==n.rotation?-4:-10);(n.showBreaks||n.breaks1&&n.breaks2)&&(i+=Zn("em-bivariate-tick-label"));var s=-n.squareSize;n.yAxisTitleOffset&&(a+=n.yAxisTitleOffset.y);n.yAxisTitleOffset&&(s+=n.yAxisTitleOffset.x);r.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-y").attr("x",s).attr("y",a).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&&(e=0===n.rotation?n.noDataYOffset+n.squareSize/n.map.numberOfClasses_+n.arrowHeight/2:n.noDataYOffset,r=0===n.rotation?n._y+n.squareSize+e:n._y+1.4142*n.squareSize+2*n.boxPadding+e,n.lgg.append("rect").attr("class","em-bivariate-nodata").attr("x",n.boxPadding+n.noDataShapeWidth/2).attr("y",r+(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_?Ri("#em-nutsrg"):zt("#em-nutsrg")).selectAll("[nd='nd']").style("fill","red")})).on("mouseout",(function(){("mixed"==n.map.nutsLevel_?Ri("#em-nutsrg"):zt("#em-nutsrg")).selectAll("[nd='nd']").style("fill",(function(){return zt(this).attr("fill___")})),zt(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",r+.5*n.noDataShapeHeight+1+(0==n.rotation?0:-10)).text(n.noDataText)),n.setBoxDimension()},n},Gg=function(t,e,n,r,i){for(var o=[],a=je(e,n),s=je(r,i),l=0;l<t;l++){for(var c=l/(t-1),u=je(a(c),s(c)),f=[],h=0;h<t;h++)f.push(u(h/(t-1)));o.push(f)}return function(t,e){return o[t][e]}},Wg=function(t,e){var n=[],r=t.properties.na||t.properties.name;t.properties.id?n.push('<div class="estat-vis-tooltip-bar" >'+r+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-tooltip-bar" >'+r+"</div>");var i=e.statData("v1").get(t.properties.id),o=e.statData("v1").unitText(),a=e.statData("v2").get(t.properties.id),s=e.statData("v2").unitText();return n.push('\n <div class="estat-vis-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n '.concat(i&&i.value?nr(i.value):""," ").concat(o&&i&&i.value?o:"","\n ").concat(!i||0!=i.value&&!i.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n ").concat(a&&a.value?nr(a.value):""," ").concat(s&&a&&a.value?s:"","\n ").concat(!a||0!=a.value&&!a.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")},Bg=function(t,e){var n=Ep(t);if(n.width=230,n.height=230,n.label1="Variable 1",n.label2="Variable 2",n.label3="Variable 3",n.axisTitleFontSize=Zn("em-bivariate-axis-title"),n.showBreaks=!1,n.noData=!0,n.noDataShapeHeight=20,n.noDataShapeWidth=25,n.noDataText="No data",n.boxPadding=60,n.noDataYOffset=20,n.arrowHeight=15,n.arrowWidth=14,n.arrowPadding=10,e)for(var r in e)n[r]=e[r];return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.lgg;n.map.numberOfClasses();t.selectAll("*").remove(),n.makeBackgroundBox();var e=t.append("g").attr("transform","translate(".concat(n.boxPadding,", ").concat(n.boxPadding,")"));n.title&&e.append("text").attr("class","em-legend-title").attr("x",0).attr("y",n.titleFontSize).text(n.title);var r=[n.label1,n.label2,n.label3];!function(t,e,n){var r=50,i=50,o=30,a=1.2*o,s=r+a,l=i,c=r+a/2,u=i+Math.sqrt(3)*a/2,f=Math.sqrt(Math.pow(o,2)-Math.pow(a/2,2)),h=c,p=i-f,d=c,g=i+f,v=f*Math.sqrt(3)/2,y=f/2,_=(r+c)/2,m=(s+c)/2,x=(i+u)/2,b=[h,_-v,m+v,d,_+v,m-v],w=[p,x+y,x+y,g,x-y,x-y],S=function(t){var e=Yn(t,6),n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5];return"M ".concat(n," ").concat(a,"\n A ").concat(o," ").concat(o," 0 0 1 ").concat(r," ").concat(s,"\n A ").concat(o," ").concat(o," 0 0 0 ").concat(i," ").concat(l,"\n A ").concat(o," ").concat(o," 0 0 1 ").concat(n," ").concat(a)},k=function(t){var e=Yn(t,6),n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5];return"M ".concat(n," ").concat(a,"\n A ").concat(o," ").concat(o," 0 0 0 ").concat(r," ").concat(s,"\n A ").concat(o," ").concat(o," 0 0 0 ").concat(i," ").concat(l,"\n A ").concat(o," ").concat(o," 0 1 1 ").concat(n," ").concat(a)},T=function(t){var e=Yn(t,6),n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5];return"M ".concat(n," ").concat(a,"\n A ").concat(o," ").concat(o," 0 0 1 ").concat(r," ").concat(s,"\n A ").concat(o," ").concat(o," 0 0 1 ").concat(i," ").concat(l,"\n A ").concat(o," ").concat(o," 0 0 1 ").concat(n," ").concat(a)},F=[[1,5,6],[3,4,5],[2,6,4]],E=[[5,4,6]];[[3,5,1],[2,4,3],[1,6,2]].forEach((function(n,r){var i=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),o=k(i);t.append("path").attr("d",o).attr("class","segment").attr("fill",e[r]).attr("opacity",1)})),F.forEach((function(n,r){var i,o=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),a=S(o);0==r?i=or([e[2],e[0]]):1==r?i=or([e[1],e[0]]):2==r&&(i=or([e[1],e[2]])),t.append("path").attr("d",a).attr("class","segment").attr("fill",i).attr("opacity",1)})),E.forEach((function(n,r){var i=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),o=T(i),a=or(e);t.append("path").attr("d",o).attr("class","segment").attr("fill",a).attr("opacity",1)})),t.selectAll("path.segment").on("mouseover",(function(){zt(this).transition().attr("opacity",.8).duration(500)})).on("mouseout",(function(){zt(this).transition().attr("opacity",1).duration(500)}));t.append("text").text(n[0]).attr("x",r-o-3).attr("y",r).attr("class","venn-label").attr("text-anchor","end");t.append("text").text(n[1]).attr("x",s+o+3).attr("y",l).attr("class","venn-label"),t.append("text").text(n[2]).attr("x",c).attr("y",u+o+15).attr("class","venn-label").attr("text-anchor","middle")}(e,[n.map.color1_,n.map.color2_,n.map.color3_],r)},n};var Hg=function(t){t.svg().selectAll(sr(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=zt(this),n=e.attr("ecl"),r=e.attr("lvl");t.properties.id.slice(0,2);return n||"0"===r?"block":"none"}})).style("stroke",(function(){var t=zt(this),e=t.attr("lvl"),n=t.attr("ecl"),r=t.style("stroke");return n&&"0"!==e?r||"#777":null})).style("stroke-width",(function(){var t=zt(this),e=t.attr("lvl"),n=t.attr("ecl"),r=t.style("stroke-width");return n&&"0"!==e?r||.2:null}))},Ug=function(t,e){var n=[];t.properties.id?n.push('<div class="estat-vis-tooltip-bar" >'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-tooltip-bar" >'+t.properties.na+"</div>");var r=e.statData("v1").get(t.properties.id),i=e.statData("v1").unitText(),o=e.statData("v2").get(t.properties.id),a=e.statData("v2").unitText(),s=e.statData("v3").get(t.properties.id),l=e.statData("v2").unitText();return n.push('\n <div class="estat-vis-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n Variable 1: '.concat(r&&r.value?nr(r.value):""," ").concat(i&&r&&r.value?i:"","\n ").concat(!r||0!=r.value&&!r.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n Variable 2: ").concat(o&&o.value?nr(o.value):""," ").concat(a&&o&&o.value?a:"","\n ").concat(!o||0!=o.value&&!o.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n Variable 3: ").concat(s&&s.value?nr(s.value):""," ").concat(l&&s&&s.value?l:"","\n ").concat(!s||0!=s.value&&!s.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")};function qg(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $g(t){return t}function Vg(){var t=$g,e=qg,n=null,r=Gd(0),i=Gd(ig),o=Gd(0);function a(a){var s,l,c,u,f,h=(a=Og(a)).length,p=0,d=new Array(h),g=new Array(h),v=+r.apply(this,arguments),y=Math.min(ig,Math.max(-ig,i.apply(this,arguments)-v)),_=Math.min(Math.abs(y)/h,o.apply(this,arguments)),m=_*(y<0?-1:1);for(s=0;s<h;++s)(f=g[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),s=0,c=p?(y-h*m)/p:0;s<h;++s,v=u)l=d[s],u=v+((f=g[l])>0?f*c:0)+m,g[l]={data:a[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:_};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Gd(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Gd(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Gd(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Gd(+t),a):o},a}function Yg(t){return t.innerRadius}function Jg(t){return t.outerRadius}function Xg(t){return t.startAngle}function Kg(t){return t.endAngle}function Zg(t){return t&&t.padAngle}function Qg(t,e,n,r,i,o,a){var s=t-n,l=e-r,c=(a?o:-o)/tg(s*s+l*l),u=c*l,f=-c*s,h=t+u,p=e+f,d=n+u,g=r+f,v=(h+d)/2,y=(p+g)/2,_=d-h,m=g-p,x=_*_+m*m,b=i-o,w=h*g-d*p,S=(m<0?-1:1)*tg(Kd(0,b*b*x-w*w)),k=(w*m-_*S)/x,T=(-w*_-m*S)/x,F=(w*m+_*S)/x,E=(-w*_+m*S)/x,A=k-v,C=T-y,M=F-v,L=E-y;return A*A+C*C>M*M+L*L&&(k=F,T=E),{cx:k,cy:T,x01:-u,y01:-f,x11:k*(i/b-1),y11:T*(i/b-1)}}function tv(){var t=Yg,e=Jg,n=Gd(0),r=null,i=Xg,o=Kg,a=Zg,s=null,l=Vd(c);function c(){var c,u,f=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-rg,d=o.apply(this,arguments)-rg,g=Yd(d-p),v=d>p;if(s||(s=c=l()),h<f&&(u=h,h=f,f=u),h>eg)if(g>ig-eg)s.moveTo(h*Xd(p),h*Qd(p)),s.arc(0,0,h,p,d,!v),f>eg&&(s.moveTo(f*Xd(d),f*Qd(d)),s.arc(0,0,f,d,p,v));else{var y,_,m=p,x=d,b=p,w=d,S=g,k=g,T=a.apply(this,arguments)/2,F=T>eg&&(r?+r.apply(this,arguments):tg(f*f+h*h)),E=Zd(Yd(h-f)/2,+n.apply(this,arguments)),A=E,C=E;if(F>eg){var M=og(F/f*Qd(T)),L=og(F/h*Qd(T));(S-=2*M)>eg?(b+=M*=v?1:-1,w-=M):(S=0,b=w=(p+d)/2),(k-=2*L)>eg?(m+=L*=v?1:-1,x-=L):(k=0,m=x=(p+d)/2)}var z=h*Xd(m),O=h*Qd(m),N=f*Xd(w),D=f*Qd(w);if(E>eg){var P,j=h*Xd(x),R=h*Qd(x),I=f*Xd(b),G=f*Qd(b);if(g<ng)if(P=function(t,e,n,r,i,o,a,s){var l=n-t,c=r-e,u=a-i,f=s-o,h=f*l-u*c;if(!(h*h<eg))return[t+(h=(u*(e-o)-f*(t-i))/h)*l,e+h*c]}(z,O,I,G,j,R,N,D)){var W=z-P[0],B=O-P[1],H=j-P[0],U=R-P[1],q=1/Qd(function(t){return t>1?0:t<-1?ng:Math.acos(t)}((W*H+B*U)/(tg(W*W+B*B)*tg(H*H+U*U)))/2),$=tg(P[0]*P[0]+P[1]*P[1]);A=Zd(E,(f-$)/(q-1)),C=Zd(E,(h-$)/(q+1))}else A=C=0}k>eg?C>eg?(y=Qg(I,G,z,O,h,C,v),_=Qg(j,R,N,D,h,C,v),s.moveTo(y.cx+y.x01,y.cy+y.y01),C<E?s.arc(y.cx,y.cy,C,Jd(y.y01,y.x01),Jd(_.y01,_.x01),!v):(s.arc(y.cx,y.cy,C,Jd(y.y01,y.x01),Jd(y.y11,y.x11),!v),s.arc(0,0,h,Jd(y.cy+y.y11,y.cx+y.x11),Jd(_.cy+_.y11,_.cx+_.x11),!v),s.arc(_.cx,_.cy,C,Jd(_.y11,_.x11),Jd(_.y01,_.x01),!v))):(s.moveTo(z,O),s.arc(0,0,h,m,x,!v)):s.moveTo(z,O),f>eg&&S>eg?A>eg?(y=Qg(N,D,j,R,f,-A,v),_=Qg(z,O,I,G,f,-A,v),s.lineTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,Jd(y.y01,y.x01),Jd(_.y01,_.x01),!v):(s.arc(y.cx,y.cy,A,Jd(y.y01,y.x01),Jd(y.y11,y.x11),!v),s.arc(0,0,f,Jd(y.cy+y.y11,y.cx+y.x11),Jd(_.cy+_.y11,_.cx+_.x11),v),s.arc(_.cx,_.cy,A,Jd(_.y11,_.x11),Jd(_.y01,_.x01),!v))):s.arc(0,0,f,w,b,v):s.lineTo(N,D)}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,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ng/2;return[Xd(r)*n,Qd(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Gd(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Gd(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Gd(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Gd(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Gd(+t),c):i},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Gd(+t),c):o},c.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Gd(+t),c):a},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}const ev=Fn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var nv=function(t,e){var n=Ep(t);if(n.shapeWidth=25,n.shapeHeight=20,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];function i(t,e){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=zt(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=zt(this);t.style("fill",t.attr("data-original-fill"))}))}function o(t){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=zt(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(),r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("class","em-legnd-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title);var a=0,s=t.catColors(),l=function(l){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+a*(n.shapeHeight+n.shapePadding);t.catColors()[l];r.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(){zt(this).raise(),i(n.map,l),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,i,l)})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,o)})),r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).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)})),a++};for(var c in s)l(c);if(n.noData){var u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+a*(n.shapeHeight+n.shapePadding);r.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()),zt(this).style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));zt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).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},rv=function(t,e){var n=Ep(t);if(n.legendSpacing=15,n.sizeLegend={title:null,titlePadding:30,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:25,shapeHeight:20,shapePadding:5,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])void 0!==e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];function o(t,e){var n=t.svg_.selectAll(".piechart").selectAll("path[code]");n.style("fill","white"),n.filter("path[code='"+e+"']").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}function a(t){t.svg_.selectAll(".piechart").selectAll("path[code]").each((function(){zt(this).style("fill",zt(this).attr("fill___"))}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map;n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),t.sizeClassifier_&&function(){var t=n.map,e=n.sizeLegend,r=n.lgg.append("g").attr("class","em-pie-size-legend"),i=t.sizeClassifier_.domain();e.values||(e.values=[Math.floor(i[1]),Math.floor(i[0])]);var o=t.sizeClassifier_(Nt(e.values));!e.title&&n.title&&(e.title=n.title);var a=0;e.title&&(r.append("text").attr("class","em-legend-title").attr("x",0).attr("y",n.boxPadding+n.titleFontSize).text(e.title),a=n.titleFontSize+n.boxPadding+e.titlePadding);var s=a+n.boxPadding+2*o,l=r.selectAll("g").data(e.values).join("g").attr("class","em-pie-size-legend-item").attr("transform","translate(".concat(o+n.boxPadding,", ").concat(s,")"));l.append("circle").attr("class","em-pie-size-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").attr("class","em-legend-label").attr("y",(function(e){return-2*t.sizeClassifier_(e)-n.labelFontSize-2})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").attr("class","em-pie-size-legend-line").attr("x1",2).attr("x2",30).attr("y1",(function(e){return-2*t.sizeClassifier_(e)})).attr("y2",(function(e){return-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=s}(),function(){var t=n.map,e=n.colorLegend,r=n.lgg.append("g").attr("class","em-pie-color-legend");e.title&&r.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(e.title);var i=0,s=t.catColors(),l=function(l){var c=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(e.title?n.titleFontSize+n.boxPadding:0)+i*(e.shapeHeight+e.shapePadding);t.catColors()[l];r.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",s[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){o(n.map,l),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,o,l)})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,a,l)})),r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+e.shapeWidth+e.labelOffset).attr("y",c+.5*e.shapeHeight).attr("dominant-baseline","middle").text(t.catLabels()[l]||l),i++};for(var c in s)l(c);if(e.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(e.title?n.titleFontSize+n.boxPadding:0)+i*(e.shapeHeight+e.shapePadding);r.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",t.noDataFillStyle()).on("mouseover",(function(){o(n.map,"nd"),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,o,"nd")})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&rr(n.map.insetTemplates_,n.map.svgId,a,"nd")})),r.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+e.shapeWidth+e.labelOffset).attr("y",u+.5*e.shapeHeight).text(e.noDataText)}}(),n.setBoxDimension()},n},iv=function(t){var e=Cp(t,!0,"pie");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.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].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"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statCodes_=void 0,e.totalCode__=void 0,e.statPie=function(t,n,r,i,o,a){t.filters=t.filters||{};for(var s=0;s<r.length;s++){var l=r[s];t.filters[n]=l;var c={};for(var u in t)c[u]=t[u];for(var f in c.filters={},t.filters)c.filters[f]=t.filters[f];e.stat(l,c),o&&(e.catColors_=e.catColors_||{},e.catColors_[l]=o[s]),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=i[s])}if(e.statCodes_=r,a){e.totalCode_=a,t.filters[n]=a;var h={};for(var p in t)h[p]=t[p];for(var d in h.filters={},t.filters)h.filters[d]=t.filters[d];e.stat(a,h),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e},e.updateClassification=function(){return e.insetTemplates_&&rr(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 r,o=(r=[],e.svg().selectAll("#em-prop-symbols").selectAll("g.em-centroid").data().forEach((function(t){var e=t.properties.id,n=i(e);n&&r.push(n)})),Sd(r));return isNaN(o[0])||(e.sizeClassifier_=wd().domain(o).range([e.pieMinRadius_,e.pieMaxRadius_])),e};e.updateStyle=function(){if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=ev[t%10]}e.catLabels_=e.catLabels_||{};var n=[];if(e.svg_){var o=e.svg_.selectAll("#em-prop-symbols");if(o){o.selectAll("g.em-centroid").append("g").attr("class","em-pie").attr("id",(function(t){return n.push(t),"pie_"+t.properties.id}));var a=sr(e);e.svg().selectAll(a).on("mouseover",(function(t,n){var r=zt(this);r.attr("fill___",r.style("fill")),r.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=zt(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),function(t){t.forEach((function(t){var n=t.properties.id,o=[],a=r(n);for(var s in a)o.push({code:s,value:a[s]});if(o&&0!=o.length){var l=e.svg().selectAll("#pie_"+n),c=e.sizeClassifier_(i(n)),u=e.pieChartInnerRadius_,f=Vg().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(f(o)).join("path").style("fill",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("fill___",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",tv().innerRadius(u).outerRadius(c)).on("mouseover",(function(n,r){var i=zt(this);zt(i.node().parentNode).style("stroke-width","1px").style("stroke","black"),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);zt(t.node().parentNode).style("stroke-width",e.pieStrokeWidth_).style("stroke",e.pieStrokeFill_),e._tooltip&&e._tooltip.mouseout()}))}}))}(n)}}return e};var r=function(t){for(var n={},r=0,i=0;i<e.statCodes_.length;i++){var o=e.statCodes_[i],a=e.statData(o).get(t);if(!a||0!=a.value&&!a.value||isNaN(a.value)){if(e.showOnlyWhenComplete())return}else n[o]=a.value,r+=a.value}if(e.totalCode_){var s=e.statData(e.totalCode_).get(t);s&&(r=s.value)}if(0!=r){for(var l=0;l<e.statCodes_.length;l++)n[e.statCodes_[l]]/=r;if(e.totalCode_){var c=0;for(var u in n)c+=n[u];n.other=1-c}return n}};var i=function(t){var n,r=0;if(e.totalCode_)!(n=e.statData(e.totalCode_).get(t))||0!=n.value&&!n.value||isNaN(n.value)?e.showOnlyWhenComplete()&&(r=void 0):r=n.value;else for(var i=0;i<e.statCodes_.length;i++){var o=e.statCodes_[i];if(!(n=e.statData(o).get(t))||0!=n.value&&!n.value||isNaN(n.value)){if(e.showOnlyWhenComplete())return}else r+=n.value}if(0!=r)return r};return e.getLegendConstructor=function(){return rv},e.tooltip_.textFunction=function(t,n){var o=zt("#tooltip_eurostat");o.html(""),o.selectAll("*").remove(),t.properties.id?o.append("div").attr("class","estat-vis-tooltip-bar").html(t.properties.na+" ("+t.properties.id+")"):o.append("div").attr("class","estat-vis-tooltip-bar").html(t.properties.na);var a=[],s=r(t.properties.id);for(var l in s)a.push({code:l,value:s[l]});if(a&&0!=a.length){var c=150,u=150,f=Math.min(c,u)/2-25,h=o.append("div").attr("class","em-tooltip-piechart-container").append("svg").attr("class","em-tooltip-piechart-svg").attr("viewbox","0, 0, ".concat(c,", ").concat(u)).attr("width",c).attr("height",137.5).append("g").attr("transform","translate(75,75)"),p=Vg().sort(null).value((function(t){return t.value})),d=tv().innerRadius(0).outerRadius(.8*f),g=tv().innerRadius(.9*f).outerRadius(.9*f),v=p(a);h.selectAll("allSlices").data(v).enter().append("path").attr("d",d).style("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),h.selectAll("allPolylines").data(v).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=d.centroid(t),n=g.centroid(t),r=g.centroid(t),i=t.startAngle+(t.endAngle-t.startAngle)/2;return r[0]=.95*f*(i<Math.PI?1:-1),[e,n,r]}})),h.selectAll("allLabels").data(v).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=g.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*f*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");for(var y=o.append("div").attr("class","em-tooltip-piechart-breakdown"),_=0;_<e.statCodes_.length;_++){var m=e.statCodes_[_],x=e.statData(m).get(t.properties.id);if(x&&void 0!==x.value&&null!==x.value){var b="<strong>".concat(e.catLabels_[m],"</strong>: ").concat(x.value.toFixed(),"<br>");y.html(y.html()+b)}}var w=i(t.properties.id);null!=w&&y.html(y.html()+"<strong>Total</strong>: ".concat(w.toFixed(),"<br>"))}else o.append("div").html(e.noDataText())},e};function ov(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function av(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ov(Object(n),!0).forEach((function(e){fr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var sv=function(t){var e=Cp(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 r=Fp(),i={};for(var o in t){var a=t[o];i[o]=a[n]}r.setData(i),e.statData(n,r)})),e},e.statSpark=function(t,n,r){t.filters=t.filters||{};for(var i=0;i<n.length;i++){var o=n[i];t.filters.time=o;var a={};for(var s in t)a[s]=t[s];for(var l in a.filters={},t.filters)a.filters[l]=t.filters[l];e.stat(o,a),r&&(e.catLabels_=e.catLabels_||{},e.catLabels_[o]=r[i])}return e._statDates=n,e},e._statDates=void 0;var n=function(t){for(var n=[],r=0,i=0;i<e._statDates.length;i++){var o=e._statDates[i],a=e.statData(o).get(t);if(!a||0!=a.value&&!a.value||isNaN(a.value)){if(e.showOnlyWhenComplete())return}else n.push({date:o,value:a.value}),r+=a.value}if(0!=r){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 r(t,n,i,o){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.sparkLineChartFunction_&&e.sparkLineChartFunction_!==r)return e.sparkLineChartFunction_(t,n,i,o,a);var s=Sn().domain([0,e._statDates.length-1]).range([.5,i-.5]),l=Ot(n.map((function(t){return t.value})))||0,c=Nt(n.map((function(t){return t.value})))||1,u=Sn().domain([l,c]).range([o,0]),f=n.map((function(t,e){return av(av({},t),{},{scaledXValue:s(e),scaledYValue:u(t.value)})})),h=u(0);a&&(t.append("g").attr("class","axis-x").attr("transform","translate(0, ".concat(o,")")).call(Yp(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(Jp(u).ticks(5)),l<0&&c>0&&t.append("line").attr("x1",0).attr("x2",i).attr("y1",h).attr("y2",h).attr("stroke","gray").attr("stroke-dasharray","2,2").attr("stroke-width",1));var p=Rg().x((function(t){return t.scaledXValue})).y((function(t){return t.scaledYValue}));"area"===e.sparkType_&&t.append("path").datum(f).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 r=null,i=Gd(!0),o=null,a=Dg,s=null,l=Vd(c);function c(c){var u,f,h,p,d,g=(c=Og(c)).length,v=!1,y=new Array(g),_=new Array(g);for(null==o&&(s=a(d=l())),u=0;u<=g;++u){if(!(u<g&&i(p=c[u],u,c))===v)if(v=!v)f=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=f;--h)s.point(y[h],_[h]);s.lineEnd(),s.areaEnd()}v&&(y[u]=+t(p,u,c),_[u]=+e(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):_[u]))}if(d)return s=null,d+""||null}function u(){return Rg().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Pg:Gd(+t),e="function"==typeof e?e:Gd(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?jg:Gd(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Gd(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Gd(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Gd(+t),c):r},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Gd(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Gd(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Gd(+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(r).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Gd(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),c):o},c}().x((function(t){return t.scaledXValue})).y0(h).y1((function(t){return t.scaledYValue}))),t.append("path").datum(f).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(f).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.svg().selectAll("#em-prop-symbols").selectAll("g.em-centroid").data().forEach((function(e){var n=e.properties.id,r=i(n);void 0!==r&&t.push(r)})),0===t.length)return[0,1];return Sd(t)}(),e.widthClassifier_=wd().domain(e.domain).range([0,e.sparkLineWidth_]),e.heightClassifier_=wd().domain(e.domain).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],i=(e.svg().selectAll("#em-prop-symbols").selectAll("g.em-centroid").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),sr(e));return e.svg().selectAll(i).on("mouseover",(function(t,r){if(n(r.properties.id)){var i=zt(this);i.attr("fill___",i.style("fill")),i.style("fill",e.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))}})).on("mousemove",(function(t,r){n(r.properties.id)&&e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);t.style("fill");t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){var i=e.svg().select("#spark_"+t),o=n(t);o&&r(i,o,e.sparkLineWidth_,e.sparkLineHeight_)})),e},e.tooltip_.textFunction=function(t,i){var o=[],a=t.properties.na,s=t.properties.id;o.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(a,"</b>").concat(s?" (".concat(s,")"):"","\n </div>\n "));var l,c=e.sparkTooltipChart_.height,u=e.sparkTooltipChart_.width,f=e.sparkTooltipChart_.margin,h=n(t.properties.id);if(h){var p=u+f.left+f.right,d=c+f.top+f.bottom,g=(l="div",zt(_t(l).call(document.documentElement))).attr("class","em-tooltip-chart-container");r(g.append("svg").attr("class","em-tooltip-chart-svg").attr("width",p).attr("height",d).append("g").attr("transform","translate(".concat(f.left,", ").concat(f.top,")")),h,u,c,!0),o.push(g.node().outerHTML)}return o.join("")};var i=function(t){for(var n=0,r=0;r<e._statDates.length;r++){var i=e._statDates[r],o=e.statData(i);if(o&&"function"==typeof o.get){var a=o.get(t);if(!a||0!==a.value&&!a.value||isNaN(a.value)){if(e.showOnlyWhenComplete())return}else a.value>n&&(n=a.value)}}if(0!==n)return n};return e.getLegendConstructor=function(){return Qp},e};class lv{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 cv(t){return new lv(t,!0)}function uv(t){return t.source}function fv(t){return t.target}function hv(t){let e=uv,n=fv,r=Pg,i=jg,o=null,a=null,s=Vd(l);function l(){let l;const c=zg.call(arguments),u=e.apply(this,c),f=n.apply(this,c);if(null==o&&(a=t(l=s())),a.lineStart(),c[0]=u,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=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?(r="function"==typeof t?t:Gd(+t),l):r},l.y=function(t){return arguments.length?(i="function"==typeof t?t:Gd(+t),l):i},l.context=function(e){return arguments.length?(null==e?o=a=null:a=t(o=e),l):o},l}function pv(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var dv=function(t,e){var n=Ep(t);if(e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r){for(var i in n[r])void 0!==e[r][i]&&(n[r][i]=e[r][i]);0==e.colorLegend&&(n.colorLegend=!1)}else n[r]=e[r];return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;if(t.legend_)for(var r in t.legend_)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])void 0!==t.legend_[r][i]&&(n[r][i]=t.legend_[r][i]);else n[r]=t.legend_[r];e.selectAll("*").remove(),n.makeBackgroundBox(),n.setBoxDimension()},n};function gv(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 vv(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)?vv(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function vv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var yv=function(t){var e=Cp(t,!0,"flow");function n(t){return"".concat(t,"-").concat(Math.random().toString(36).substr(2,9))}function r(t,n,r){t.append("marker").attr("id",n).attr("markerHeight",7).attr("markerWidth",7).attr("refX",1).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",r).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"),t.append("marker").attr("id",n+"mouseover").attr("markerHeight",7).attr("markerWidth",7).attr("refX",1).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",e.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 i(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function o(t){return[t.source.x1,t.y0]}function a(t){return[t.target.x0,t.y1]}e.strokeWidthScale=Sn(),e.labelOffsetX=15,e.labelOffsetY=5,e.labelFormatter=function(t){return gn(".2s")(t)},e.tooltip_.textFunction=_v,e.flowColor_="#72bb6f",e.flowOverlayColors_=["#bbd7ee","#c7e3c6"],e.flowMaxWidth_=30,e.flowMinWidth_=1,e.flowArrows_=!0,e.flowOutlines_=!0,e.flowTargetOffset_=1,e.flowGradient_=!0,["flowGraph_","flowColor_","flowOverlayColors_","flowArrows_","flowTargetOffset_","flowMaxWidth_","flowMinWidth_","flowOutlines_","flowGradient_"].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=e.flowGraph_.links;e.strokeWidthScale=Sn().domain([0,Nt(t,(function(t){return t.value}))]).range([e.flowMinWidth_,e.flowMaxWidth_]),function(t){var o=e.svg_;!function(t){t.nodes.forEach((function(t){if(t.x||t.y||!e.Geometries.centroidFeatures){var n=e.Geometries.getRegionFeatures().find((function(e){if(t.id==e.properties.id)return e})),r=n.properties.centroid||e._pathFunction.centroid(n),i=e._projection([r[0],r[1]]);t.x=i[0],t.y=i[1]}else{var o=e.Geometries.centroidFeatures.find((function(e){if(t.id==e.properties.id)return e}));if(o){var a=e._projection([o.geometry.coordinates[0],o.geometry.coordinates[1]]);t.x=a[0],t.y=a[1]}else console.error("could not find coordinates for",t.id)}})),console.log(t)}(t);var a=function(t){var n=t.nodes,r=t.links,o=function(t){var e=t.nodes,n=t.links;return{nodes:e.map((function(t){return Object.assign({},t)})),links:n.map((function(t){return Object.assign({},t)}))}}({nodes:n,links:r});return function(t){var e,n=t.nodes,r=t.links,o=gv(n.entries());try{for(o.s();!(e=o.n()).done;){var a=Yn(e.value,2),s=a[0],l=a[1];l.index=s,l.sourceLinks=[],l.targetLinks=[]}}catch(t){o.e(t)}finally{o.f()}var u,f=new Map(n.map((function(t,e){return[c(t,e,n),t]}))),h=gv(r.entries());try{for(h.s();!(u=h.n()).done;){var p=Yn(u.value,2),d=p[0],g=p[1];g.index=d;var v=g.source,y=g.target;"object"!==cr(v)&&(v=g.source=i(f,v)),"object"!==cr(y)&&(y=g.target=i(f,y)),v.sourceLinks.push(g),y.targetLinks.push(g)}}catch(t){h.e(t)}finally{h.f()}}(o),function(t){var e,n=t.nodes,r=gv(n);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.value=Math.max(pv(i.sourceLinks,(function(t){return t.value})),pv(i.targetLinks,(function(t){return t.value})))}}catch(t){r.e(t)}finally{r.f()}}(o),function(t){var e=t.nodes,n=e.length,r=new Set(e),i=new Set,o=0;for(;r.size;){var a,s=gv(r);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.depth=o;var c,u=gv(l.sourceLinks);try{for(u.s();!(c=u.n()).done;){var f=c.value.target;i.add(f)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++o>n)throw new Error("circular link");r=i,i=new Set}}(o),function(t){var e=t.nodes,n=e.length,r=new Set(e),i=new Set,o=0;for(;r.size;){var a,s=gv(r);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.height=o;var c,u=gv(l.targetLinks);try{for(u.s();!(c=u.n()).done;){var f=c.value.source;i.add(f)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}if(++o>n)throw new Error("circular link");r=i,i=new Set}}(o),function(t){var n,r=t.nodes,i=gv(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.sourceLinks.forEach((function(t){return t.width=e.strokeWidthScale(t.value)})),o.targetLinks.forEach((function(t){return t.width=e.strokeWidthScale(t.value)}));var a=Math.max(pv(o.sourceLinks,(function(t){return t.width})),pv(o.targetLinks,(function(t){return t.width})));o.x0=o.x1=o.x,o.y0=o.y-a/2,o.y1=o.y+a/2}}catch(t){i.e(t)}finally{i.f()}!function(t){var e,n=gv(t);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=r.sourceLinks,o=r.targetLinks;i.sort(s),o.sort(l)}}catch(t){n.e(t)}finally{n.f()}}(r)}(o),function(t){var e,n=t.nodes,r=gv(n);try{for(r.s();!(e=r.n()).done;){var i,o=e.value,a=o.y0,s=gv(o.sourceLinks);try{for(s.s();!(i=s.n()).done;){var l=i.value;l.y0=a+l.width/2,a+=l.width}}catch(t){s.e(t)}finally{s.f()}var c,u=o.y0,f=gv(o.targetLinks);try{for(f.s();!(c=f.n()).done;){var h=c.value;h.y1=u+h.width/2,u+=h.width}}catch(t){f.e(t)}finally{f.f()}}}catch(t){r.e(t)}finally{r.f()}}(o),o}(t),f=a.nodes,h=a.links,p=o.append("defs"),d=n("arrow"),g=n("arrow-outline"),v=h.map((function(){return n("gradient")}));e.flowArrows_&&(r(p,d,e.flowColor_),r(p,g,"#ffffff"));e.flowGradient_&&function(t,n,r){t.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(t){return t.append("stop").attr("offset","5%").attr("stop-color",e.flowOverlayColors_[0])})).call((function(t){return t.append("stop").attr("offset","50%").attr("stop-color",e.flowColor_)}))}(p,v,h);var y=zt("#em-zoom-group-"+e.svgId_).append("g").attr("class","em-flow-container");(function(t,n){var r=[],i=[],o=e.Geometries.getRegionFeatures();if(o){n.nodes.forEach((function(t){var e=o.find((function(e){if(t.id==e.properties.id)return e}));e?n.links.some((function(e){return e.source==t.id}))?r.push(t.id):i.push(t.id):console.error("could not find geometry for",t.id)}));var a=sr(e);e.svg_.selectAll(a).each((function(){zt(this).style("fill",(function(t){return r.includes(t.properties.id)?e.flowOverlayColors_[0]:i.includes(t.properties.id)?e.flowOverlayColors_[1]:void 0}))}))}})(0,t),function(t,n,r,i,o){var a=t.append("g").attr("class","em-flows-group"),s=a.append("g").attr("class","em-flow-flows"),l=a.append("g").attr("class","em-flow-outlines");n.forEach((function(t,n){e.flowOutlines_&&l.append("path").attr("d",u()(t)).attr("fill","none").attr("stroke","#ffffff").attr("class","em-flow-link-outline").attr("marker-end","url(#".concat(i,")")),s.append("path").attr("d",u()(t)).attr("fill","none").attr("class","em-flow-link").attr("stroke",e.flowGradient_?"url(#".concat(o[n],")"):e.flowColor_).attr("stroke-width",t.width).attr("marker-end",e.flowArrows_?"url(#".concat(r,")"):"").on("mouseover",(function(n){var i=e.hoverColor_;zt(this).attr("stroke",i),e.flowArrows_&&zt(this).attr("marker-end","url(#".concat(r+"mouseover",")")),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){e.flowGradient_?zt(this).attr("stroke","url(#".concat(o[n],")")):zt(this).attr("stroke",e.flowColor_),e.flowArrows_&&zt(this).attr("marker-end","url(#".concat(r,")")),e._tooltip&&e._tooltip.mouseout()}))}))}(y,h,d,g,v),function(t,n){t.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",e.flowColor_)}(y,f),e.labels_&&function(t,n){var r,i=n.filter((function(t){return t.targetLinks&&0===t.sourceLinks.length})),o=t.append("g").attr("class","em-flow-labels");if(null!==(r=e.labels_)&&void 0!==r&&r.shadows){o.append("g").attr("class","em-flow-label-shadow").selectAll("text").data(i).join("text").attr("text-anchor",(function(t){return t.x>t.targetLinks[0].source.x?"start":"end"})).attr("x",(function(t){return t.x>t.targetLinks[0].source.x?t.x+e.labelOffsetX:t.x-e.labelOffsetX})).attr("y",(function(t){return t.y+e.labelOffsetY})).text((function(t){return e.labelFormatter(t.value)}))}var a=o.append("g").attr("class","em-flow-label").selectAll("g").data(i).join("g").attr("transform",(function(t){return"translate(".concat(t.x,", ").concat(t.y,")")}));a.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(t){return t.x>t.targetLinks[0].source.x?e.labelOffsetX:-e.labelOffsetX})).attr("y",e.labelOffsetY).text((function(t){return e.labelFormatter(t.value)})),e.labels_.backgrounds&&a.each((function(){var t=zt(this).select("text").node().getBBox(),e=5,n=2;zt(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)}))}(y,f);o.node()}(e.flowGraph_)},e.updateClassification=function(){},e.getLegendConstructor=function(){return dv};var s=function(t,e){return t.target.y-e.target.y},l=function(t,e){return t.source.y-e.source.y},c=function(t){return t.id},u=function(){return hv(cv).source(o).target(a)};return e},_v=function(t,e){var n=[],r="".concat(t.source.name||t.source.id," to ").concat(t.target.name||t.target.id);return n.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(r,"</b>\n </div>\n ")),n.push("<div class='estat-vis-tooltip-text'>\n ".concat(t.value,"\n </div>")),n.join("")};var mv=function(t,e){try{return"choropleth"==t||"ch"==t?pd(e):"categorical"==t||"ct"==t?function(t){var e=Cp(t,!1,"ct");e.classToFillStyle_=void 0,e.classToText_=void 0,e.tooltip_.textFunction=Lg,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_&&rr(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){var n=e.statData().getUniqueValues(),r=_(Array(n.length).keys()),i=e.classToFillStyle_?e.classToFillStyle():void 0;if(i){var o=Object.keys(i);e.classifier(Rp().domain(o).range(o.map((function(t,e){return e}))))}else e.classifier(Rp().domain(n).range(r));var a=function(t){t.attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;if(":"===r)return"nd";var i=isNaN(r)?r:+r;if(e.classifier().domain().includes(i))return e.classifier()(i)}}))},s=sr(t);a(t.svg().selectAll(s)),"mixed"===t.nutsLevel_&&a(t.svg().selectAll("path.em-nutsrg0"))};function r(t){if(t.svg_){var n=sr(t),r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).style("fill",o).end().then((function(){r.each((function(){var t=zt(this);t.attr("fill___",t.style("fill"))})),a(t,r),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=zt(this.parentNode).style("fill");zt(this).attr("fill",ar(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&i(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&hd(t,e.patternFill_)}}e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),i=0;i<n.length;i++)t[n[i]]=Cg[i%12];e.classToFillStyle(t)}return e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,r),r(e),e};var i=function(t){t.svg().selectAll(sr(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=zt(this),n=e.attr("ecl"),r=e.attr("lvl");return n||"0"===r?"block":"none"}})).style("stroke",(function(){var t=zt(this),e=t.attr("lvl"),n=t.attr("ecl"),r=t.style("stroke");return n&&"0"!==e?r||"#777":null})).style("stroke-width",(function(){var t=zt(this),e=t.attr("lvl"),n=t.attr("ecl"),r=t.style("stroke-width");return n&&"0"!==e?r||.2:null}))},o=function(t){var n=zt(this).attr("ecl");return e.Geometries.userGeometries?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:Qn("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]]:Qn("em-nutsrg","fill"))},a=function(t,n){n.on("mouseover",(function(n,r){zt(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout()}))};return e.getLegendConstructor=function(){return Mg},e}(e):"proportionalSymbol"==t||"ps"==t?Tg(e):"bivariateChoropleth"==t||"chbi"==t?function(t){var e=Cp(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 r=n.value;return 0!=r&&!r||":"==r?"nd":(4==t.properties.id.length&&console.log(t),+e.classifier1_(+r))}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("nd",(function(t){var n=e.statData("v1").get(t.properties.id),r=e.statData("v2").get(t.properties.id);if(n&&r){var i=n.value;return 0!=i&&!i||":"==i||0!=(i=r.value)&&!i||":"==i?"nd":""}}))};if(function(){var t=e.statData("v1").getArray(),n=e.statData("v2").getArray(),r=_(Array(e.numberOfClasses()).keys());if(e.classifier1_||e.classifier1(qt().domain(t).range(r)),e.classifier2_||e.classifier2(qt().domain(n).range(r)),!e.classToFillStyle()){var i=Gg(e.numberOfClasses(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(i)}}(),t.svg_){var r=sr(t);n(t.svg().selectAll(r)),"mixed"===t.nutsLevel_&&n(t.svg().selectAll("path.em-nutsrg0"))}}function r(t){if(t.svg()){var n=sr(t),r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).style("fill",(function(t){var n=zt(this).attr("ecl1");if("nd"===n)return e.noDataFillStyle()||"gray";var r=zt(this).attr("ecl2");return n||r?"nd"===r?e.noDataFillStyle()||"gray":e.classToFillStyle()(+n,+r):Qn("em-nutsrg","fill")})).end().then((function(){r.each((function(){var t=zt(this);t.attr("fill___",t.style("fill"))})),o(t,r),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=zt(this.parentNode).style("fill");zt(this).attr("fill",ar(t))}))}),(function(t){})),"mixed"==e.nutsLevel_&&i(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.tooltip_.textFunction=Wg,["numberOfClasses_","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_&&rr(e.insetTemplates_,e.svgId_,n),n(e),e},e.updateStyle=function(){return e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,r),r(e),e};var i=function(t){t.svg().selectAll(sr(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=zt(this),e=t.attr("ecl1"),n=t.attr("ecl2"),r=t.attr("lvl"),i=e||n||"0"===r;if(t.style("display",i?"block":"none"),(e||n)&&"0"!==r){var o=t.style("stroke")||"#777",a=t.style("stroke-width")||.2;t.style("stroke",o).style("stroke-width",a)}}}))},o=function(t,n){n.on("mouseover",(function(n,r){zt(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))};return e.getLegendConstructor=function(){return Ig},e}(e):"trivariateChoropleth"==t||"chbi"==t?function(t){var e=Cp(t,!1,"chtri");function n(t){var n=e.statData("v1").getArray(),i=e.statData("v2").getArray(),o=e.statData("v3").getArray(),a=_(Array(7).keys());e.classifier1_||e.classifier1(qt().domain(n).range(a)),e.classifier2_||e.classifier2(qt().domain(i).range(a)),e.classifier3_||e.classifier3(qt().domain(o).range(a));var s=sr(t);if(t.svg_){if(t.svg().selectAll(s).attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier3_(+r)}})).attr("regionClass",(function(t){var e=zt(this).attr("ecl1"),n=zt(this).attr("ecl2"),r=zt(this).attr("ecl3");return"nd"===e||"nd"===n||"nd"===r?"nd":!e||n||r?e||!n||r?e||n||!r?e&&n&&!r?4:e&&!n&&r?5:!e&&n&&r?6:e&&n&&r?7:void 0:3:2:1})),"mixed"==t.nutsLevel_&&t.svg().selectAll("path.em-nutsrg0").attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier3_(+r)}})),!e.classToFillStyle()){var l=r(e.color1(),e.color2(),e.color3());e.classToFillStyle(l)}"mixed"==e.nutsLevel_&&t.svg_.selectAll("path.em-nutsrg0").attr("ecl1",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)}})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier3_(+r)}}))}}e.numberOfClasses_=3,e.startColor_="#e8e8e8",e.color1_="#09F8FF",e.color2_="#F5D300",e.color3_="#FF1493",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.classifier1_=void 0,e.classifier2_=void 0,e.classifier3_=void 0,e.tooltip_.textFunction=Ug,["numberOfClasses_","startColor_","color1_","color2_","color3_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_","classifier3_"].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","color3","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,n),n(e),e};var r=function(t,e,n){var r=[or([t,e]),or([e,n]),or([t,n]),or([t,e,n])],i=[t,e,n,r[0],r[1],r[2],r[3]];return function(t){return t>=1&&t<=7?i[t-1]:null}};function i(t){if(t.svg()){var n=sr(t),r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).style("fill",(function(t){var n=zt(this).attr("ecl1"),r=zt(this).attr("ecl2"),i=zt(this).attr("ecl3");if("nd"===n)return e.noDataFillStyle()||"gray";if("nd"===r)return e.noDataFillStyle()||"gray";if("nd"===i)return e.noDataFillStyle()||"gray";if(!n&&!r&&!i)return Qn("em-nutsrg","fill");var o=zt(this).attr("regionClass");return e.classToFillStyle_(o)})).end().then((function(){r.each((function(){var t=zt(this);t.attr("fill___",t.style("fill"))})),r.on("mouseover",(function(n,r){zt(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=zt(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLevel_&&Hg(t)}}return e.updateStyle=function(){return e.insetTemplates_&&rr(e.insetTemplates_,e.svgId_,i),i(e),e},e.getLegendConstructor=function(){return Bg},e}(e):"stripeComposition"==t||"scomp"==t?function(t){var e=Cp(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,r,i,o,a){t.filters=t.filters||{};for(var s=0;s<i.length;s++){var l=i[s];t.filters[r]=l;var c={};for(var u in t)c[u]=t[u];for(var f in c.filters={},t.filters)c.filters[f]=t.filters[f];e.stat(l,c),a&&(e.catColors_=e.catColors_||{},e.catColors_[l]=a[s]),o&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=o[s])}return n=i,e};var n=void 0,r=function(t){for(var r={},i=0,o=0;o<n.length;o++){var a=n[o],s=e.statData(a).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else r[a]=s.value,i+=s.value}if(0!=i){for(var l=0;l<n.length;l++)r[n[l]]/=i;return r}};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]]=ev[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll(sr(e)).style("fill",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var n=t.properties.id,i=r(n);if(!i)return e.noDataFillStyle()||"gray";var o=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()&&o.attr("patternTransform","rotate("+e.stripeOrientation()+")"),o.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var a=0;for(var s in i){var l=i[s];if(l){l*=e.stripeWidth();var c=e.catColors()[s]||"lightgray";o.append("rect").attr("x",a).attr("y",0).attr("height",1).style("stroke","none").attr("code",s).style("fill",c).transition().duration(e.transitionDuration()).attr("width",l),a+=l}}return"url(#pattern_"+n+")"}})).attr("nd",(function(t){return r(t.properties.id)?"":"nd"}));var i=sr(e);return e.svg().selectAll(i).on("mouseover",(function(t,n){var r=zt(this);r.attr("fill___",r.style("fill")),r.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=zt(this);t.style("fill"),t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return nv},e.tooltip_.textFunction=function(t,n){var i=zt("#tooltip_eurostat");i.html(""),i.selectAll("*").remove();var o=t.properties.na||t.properties.name;t.properties.id?i.append("div").html("<b>"+o+"</b> ("+t.properties.id+") <br>"):i.append("div").html("<b>"+o+"</b><br>");var a=[],s=r(t.properties.id);for(var l in s)a.push({code:l,value:s[l]});if(a&&0!=a.length){var c=e.pieChartRadius(),u=e.pieChartInnerRadius(),f=i.append("svg").attr("viewBox",[-c,-c,2*c,2*c]).attr("width",2*c),h=Vg().sort(null).value((function(t){return t.value}));f.append("g").attr("stroke","darkgray").selectAll("path").data(h(a)).join("path").style("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",tv().innerRadius(u).outerRadius(c))}else i.append("div").html(e.noDataText())},e}(e):"pieChart"==t||"pie"==t?iv(e):"sparkline"==t||"spark"==t||"sparklines"==t?sv(e):"flow"==t||"flowmap"==t?yv(e):(console.log("Unexpected map type: "+t),Cp(e,!0,t))}catch(t){console.error("Error in eurostat-map.map: "+t.message),console.error(t)}},xv=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,r=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(i,o){i.selectAll(".em-fill-pattern").remove();for(var a=0;a<o;a++){var s=n+(r-n)*a/(o-1),l=i.append("pattern").attr("class","em-fill-pattern").attr("id","pattern_"+a).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)}}},bv=function(){return Vf},wv="4.2.0"})(),r})()));
1
+ /*! /*! eurostat-map v4.2.2 | 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={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={},s=[],o=0;o<t.length;o++){var l=t[o],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=o,e.splice(o,0,{identifier:h,updater:d,references:1})}s.push(h)}return s}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 s=0;s<a.length;s++){var o=n(a[s]);e[o].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))}}},211:(t,e,n)=>{"use strict";n.d(e,{A:()=>_});var i=n(601),r=n.n(i),a=n(314),s=n.n(a),o=n(489),l=n(666),c=n(604),u=n(470),h=n(789),f=n(991),p=n(875),d=n(765),g=s()(r());g.i(o.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},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 s={};if(i)for(var o=0;o<this.length;o++){var l=this[o][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[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}},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,s,o,l;switch(n=e%360,i=(n-=90*(r=Math.round(n/90)))*this.degree,a=Math.sin(i),s=Math.cos(i),45===Math.abs(n)?(s=Math.sqrt(.5),a=t.copysign(s,i)):30===Math.abs(n)&&(s=Math.sqrt(.75),a=t.copysign(.5,i)),3&r){case 0:o=a,l=s;break;case 1:o=s,l=-a;break;case 2:o=-a,l=-s;break;default:o=-s,l=a}return l+=0,0===o&&(o=t.copysign(o,e)),{s:o,c:l}},t.sincosde=function(e,n){var i,r,a,s,o,l,c;switch(i=e%360,a=Math.round(i/90),r=(i=t.AngRound(i-90*a+n))*this.degree,s=Math.sin(r),o=Math.cos(r),45===Math.abs(i)?(o=Math.sqrt(.5),s=t.copysign(o,r)):30===Math.abs(i)&&(o=Math.sqrt(.75),s=t.copysign(.5,r)),3&a){case 0:l=s,c=o;break;case 1:l=o,c=-s;break;case 2:l=-s,c=-o;break;default:l=-o,c=s}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,s,o,l,c,u,h,f,p,d,g,_=20+i.digits+10,m=i.epsilon,y=200*m,v=Math.sqrt(m),x=m,b=1e3*v;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,s=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),s=2*(n-e)*(n+e),o=1&a?i[--r]:0,l=0;for(a=Math.floor(a/2);a--;)o=s*(l=s*o-l+i[--r])-o+i[--r];return t?2*e*n*o:n*(o-l)},o=function(t,e){var n,r,a,s,o,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,(o=(r=g*_/4)*(r+2*(s=m*(a=i.sq(m)))))>=0?(c=r+s,c+=c<0?-Math.sqrt(o):Math.sqrt(o),l+=(u=i.cbrt(c))+(0!==u?a/u:0)):(h=Math.atan2(Math.sqrt(-o),-(r+s)),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,s=i.sq(e),o=e,l=0;for(r=1;r<=t.nC1_;++r)a=Math.floor((t.nC1_-r)/2),n[r]=o*i.polyval(a,c,l,s)/c[l+a+1],l+=a+2,o*=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,s=i.sq(e),o=e,l=0;for(r=1;r<=t.nC1p_;++r)a=Math.floor((t.nC1p_-r)/2),n[r]=o*i.polyval(a,u,l,s)/u[l+a+1],l+=a+2,o*=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,s=i.sq(e),o=e,l=0;for(r=1;r<=t.nC2_;++r)a=Math.floor((t.nC2_-r)/2),n[r]=o*i.polyval(a,f,l,s)/f[l+a+1],l+=a+2,o*=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*v/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(s),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,s=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[s++]=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,s=0;for(e=0;e<t.nC4_;++e)for(n=t.nC4_-1;n>=e;--n)r=t.nC4_-n-1,this._C4x[s++]=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,s=1,o=0;for(r=1;r<t.nC3_;++r)a=t.nC3_-r-1,s*=e,n[r]=s*i.polyval(a,this._C3x,o,e),o+=a+1},t.Geodesic.prototype.C4f=function(e,n){var r,a,s=1,o=0;for(r=0;r<t.nC4_;++r)a=t.nC4_-r-1,n[r]=s*i.polyval(a,this._C4x,o,e),o+=a+1,s*=e},t.Geodesic.prototype.Lengths=function(e,n,i,r,a,s,o,l,c,u,h,f,p){var d,g,_,m,y={},v=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),v=b-w,w=1+w),b=1+b),h&t.DISTANCE)d=t.SinCosSeries(!0,s,o,f)-t.SinCosSeries(!0,i,r,f),y.s12b=b*(n+d),h&(t.REDUCEDLENGTH|t.GEODESICSCALE)&&(x=v*n+(b*d-w*(t.SinCosSeries(!0,s,o,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=v*n+(t.SinCosSeries(!0,s,o,p)-t.SinCosSeries(!0,i,r,p))}return h&t.REDUCEDLENGTH&&(y.m0=v,y.m12b=l*(r*s)-a*(i*o)-r*o*x),h&t.GEODESICSCALE&&(_=r*o+i*s,m=this._ep2*(c-u)*(c+u)/(a+l),y.M12=_+(m*s-o*x)*i/a,y.M21=_-(m*i-r*x)*s/l),y},t.Geodesic.prototype.InverseStart=function(e,n,r,a,s,l,c,u,h,f,p){var d,g,_,m,v,x,w,S,M,E,A,C,k,T,P,N,F,L,G,O,D={},z=a*n-s*e,I=s*n+a*e;return D.sig12=-1,d=a*n,d+=s*e,(g=I>=0&&z<.5&&s*c<.5)?(m=i.sq(e+a),m/=m+i.sq(n+s),D.dnm=Math.sqrt(1+this._ep2*m),_=c/(this._f1*D.dnm),v=Math.sin(_),x=Math.cos(_)):(v=u,x=h),D.salp1=s*v,D.calp1=x>=0?z+s*e*i.sq(v)/(1+x):d-s*e*i.sq(v)/(1-x),S=i.hypot(D.salp1,D.calp1),M=e*a+n*s*x,g&&S<this._etol2?(D.salp2=n*v,D.calp2=z-n*a*(x>=0?i.sq(v)/(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)||(O=Math.atan2(-u,-h),this.f>=0?(T=(k=i.sq(e)*this._ep2)/(2*(1+Math.sqrt(1+k))+k),E=O/(C=this.f*n*this.A3f(T)*Math.PI),A=d/(C*n)):(P=s*n-a*e,N=Math.atan2(d,P),A=c/(C=((E=(F=this.Lengths(this._n,Math.PI+N,e,-n,r,a,s,l,n,s,t.REDUCEDLENGTH,f,p)).m12b/(n*s*F.m0*Math.PI)-1)<-.01?d/E:-this.f*i.sq(n)*Math.PI)/n)),A>-y&&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>-y?0:-1,E),D.salp1=Math.sqrt(1-i.sq(D.calp1))):(L=o(E,A),G=C*(this.f>=0?-E*L/(1+L):-A*(1+L)/L),v=Math.sin(G),x=-Math.cos(G),D.salp1=s*v,D.calp1=d-s*e*i.sq(v)/(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,s,o,l,c,u,h,f,p,d,g){var _,m,y,v,x,b,w,S,M,E,A,C,k,T={};return 0===e&&0===c&&(c=-t.tiny_),m=l*n,y=i.hypot(c,l*e),T.ssig1=e,v=m*e,T.csig1=x=c*n,_=i.hypot(T.ssig1,T.csig1),T.ssig1/=_,T.csig1/=_,T.salp2=s!==n?m/s:l,T.calp2=s!==n||Math.abs(a)!==-e?Math.sqrt(i.sq(c*n)+(n<-e?(s-n)*(n+s):(e-a)*(e+a)))/s:Math.abs(c),T.ssig2=a,b=m*a,T.csig2=w=T.calp2*s,_=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-v*w),M=x*w+v*b,A=Math.atan2(S*h-M*u,M*h+S*u),C=i.sq(y)*this._ep2,T.eps=C/(2*(1+Math.sqrt(1+C))+C),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=A+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,o,n,s,t.REDUCEDLENGTH,p,d),T.dlam12=k.m12b,T.dlam12*=this._f1/(T.calp2*s))),T},t.Geodesic.prototype.Inverse=function(e,n,r,a,s){var o,l;return s||(s=t.STANDARD),s===t.LONG_UNROLL&&(s|=t.STANDARD),s&=t.OUT_MASK,l=(o=this.InverseInt(e,n,r,a,s)).vals,s&t.AZIMUTH&&(l.azi1=i.atan2d(o.salp1,o.calp1),l.azi2=i.atan2d(o.salp2,o.calp2)),l},t.Geodesic.prototype.InverseInt=function(e,n,r,a,s){var o,l,c,u,h,f,p,d,g,y,v,b,w,S,M,E,A,C,k,T,P,N,F,L,G,O,D,z,I,R,j,q,B,U,W,H,V,$,Y,J,X,K,Q,Z,tt,et,nt,it,rt,at,st,ot,lt,ct,ut,ht,ft,pt,dt,gt,_t,mt,yt,vt,xt,bt={};if(bt.lat1=e=i.LatFix(e),bt.lat2=r=i.LatFix(r),e=i.AngRound(e),r=i.AngRound(r),l=(o=i.AngDiff(n,a)).e,o=o.d,s&t.LONG_UNROLL?(bt.lon1=n,bt.lon2=n+o+l):(bt.lon1=i.AngNormalize(n),bt.lon2=i.AngNormalize(a)),l*=c=i.copysign(1,o),M=(o*=c)*i.degree,E=(u=i.sincosde(o,l)).s,A=u.c,l=180-o-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,y=u.c,g/=u=i.hypot(g,y),y/=u,y=Math.max(t.tiny_,y),d<-p?y===d&&(g=i.copysign(p,g)):Math.abs(g)===-p&&(y=d),w=Math.sqrt(1+this._ep2*i.sq(p)),S=Math.sqrt(1+this._ep2*i.sq(g)),F=new Array(t.nC1_+1),L=new Array(t.nC2_+1),G=new Array(t.nC3_),(O=-90===e||0===E)&&(T=E,N=0,z=p,I=(k=A)*d,R=g,j=(P=1)*y,C=Math.atan2(Math.max(0,I*R-z*j),I*j+z*R),v=(D=this.Lengths(this._n,C,z,I,w,R,j,S,d,y,s|t.DISTANCE|t.REDUCEDLENGTH,F,L)).s12b,b=D.m12b,s&t.GEODESICSCALE&&(bt.M12=D.M12,bt.M21=D.M21),C<1||b>=0?((C<3*t.tiny_||C<m&&(v<0||b<0))&&(C=b=v=0),b*=this._b,v*=this._b,bt.a12=C/i.degree):O=!1),ft=2,!O&&0===p&&(this.f<=0||l>=180*this.f))k=P=0,T=N=1,v=this.a*M,C=B=M/this._f1,b=this._b*Math.sin(C),s&t.GEODESICSCALE&&(bt.M12=bt.M21=Math.cos(C)),bt.a12=o/this._f1;else if(!O)if(C=(D=this.InverseStart(p,d,w,g,y,S,M,E,A,F,L)).sig12,T=D.salp1,k=D.calp1,C>=0)N=D.salp2,P=D.calp2,U=D.dnm,v=C*this._b*U,b=i.sq(U)*this._b*Math.sin(C/U),s&t.GEODESICSCALE&&(bt.M12=bt.M21=Math.cos(C/U)),bt.a12=C/i.degree,B=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,y,S,T,k,E,A,W<20,F,L,G)).lam12,N=D.salp2,P=D.calp2,C=D.sig12,z=D.ssig1,I=D.csig1,R=D.ssig2,j=D.csig2,q=D.eps,dt=D.domg12,Q=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&&Q>0&&(Z=-K/Q,Math.abs(Z)<Math.PI&&(tt=Math.sin(Z),(nt=T*(et=Math.cos(Z))+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=s|(s&(t.REDUCEDLENGTH|t.GEODESICSCALE)?t.DISTANCE:t.NONE),v=(D=this.Lengths(q,C,z,I,w,R,j,S,d,y,it,F,L)).s12b,b=D.m12b,s&t.GEODESICSCALE&&(bt.M12=D.M12,bt.M21=D.M21),b*=this._b,v*=this._b,bt.a12=C/i.degree,s&t.AREA&&(vt=Math.sin(dt),ft=E*(xt=Math.cos(dt))-A*vt,pt=A*xt+E*vt)}return s&t.DISTANCE&&(bt.s12=0+v),s&t.REDUCEDLENGTH&&(bt.m12=0+b),s&t.AREA&&(rt=T*d,0!==(at=i.hypot(k,T*p))&&0!==rt?(z=p,I=k*d,R=g,j=P*y,q=(ot=i.sq(at)*this._ep2)/(2*(1+Math.sqrt(1+ot))+ot),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(q,ct),ut=t.SinCosSeries(!1,z,I,ct),ht=t.SinCosSeries(!1,R,j,ct),bt.S12=lt*(ht-ut)):bt.S12=0,O||2!=ft||(ft=Math.sin(B),pt=Math.cos(B)),!O&&pt>-.7071&&g-p<1.75?(dt=1+pt,gt=1+d,_t=1+y,st=2*Math.atan2(ft*(p*_t+g*gt),dt*(p*g+gt*_t))):(yt=P*k+N*T,0==(mt=N*k-P*T)&&yt<0&&(mt=t.tiny_*k,yt=-1),st=Math.atan2(mt,yt)),bt.S12+=this._c2*st,bt.S12*=h*c*f,bt.S12+=0),h<0&&([N,T]=[T,N],[P,k]=[k,P],s&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,s,o){return o?o===t.LONG_UNROLL&&(o|=t.STANDARD):o=t.STANDARD,a||(o|=t.DISTANCE_IN),new e.GeodesicLine(this,n,i,r,o).GenPosition(a,s,o)},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,s,o){var l;return o||(o=t.STANDARD|t.DISTANCE_IN),a||(o|=t.DISTANCE_IN),(l=new e.GeodesicLine(this,n,i,r,o)).GenSetDistance(a,s),l},t.Geodesic.prototype.InverseLine=function(n,r,a,s,o){var l,c,u;return o||(o=t.STANDARD|t.DISTANCE_IN),l=this.InverseInt(n,r,a,s,t.ARC),u=i.atan2d(l.salp1,l.calp1),o&t.OUT_MASK&t.DISTANCE_IN&&(o|=t.DISTANCE),(c=new e.GeodesicLine(this,n,r,u,o,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,s,o,l){var c,u,h,f,p,d;s||(s=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=s|t.LATITUDE|t.AZIMUTH|t.LONG_UNROLL,this.lat1=n.LatFix(i),this.lon1=r,void 0===o||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=o,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,s,o,l,c,u,h,f,p,d,g,_,m,y,v,x,b,w,S,M,E,A,C,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,s=(C=n.sincosd(i)).s,o=C.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),s=Math.sin(a),o=Math.cos(a),Math.abs(this.f)>.01&&(u=this._ssig1*o+this._csig1*s,h=this._csig1*o-this._ssig1*s,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)),s=Math.sin(a),o=Math.cos(a))),u=this._ssig1*o+this._csig1*s,h=this._csig1*o-this._ssig1*s,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===(y=n.hypot(this._salp0,this._calp0*h))&&(y=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&&(v=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(_*v,x)-Math.atan2(_*this._somg1,this._comg1))):Math.atan2(v*this._comg1-x*this._somg1,x*this._comg1+v*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*y)),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),A=(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*A)),r&t.GEODESICSCALE&&(C=this._k2*(u-this._ssig1)*(u+this._ssig1)/(this._dn1+S),N.M12=o+(C*u-h*A)*this._ssig1/this._dn1,N.M21=o-(C*this._ssig1-this._csig1*A)*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*(o<=0?this._csig1*(1-o)+s*this._ssig1:s*(this._csig1*s/(1+o)+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,s,o;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)},s=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()},o=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,o={number:this.num};return this.num<2?(o.perimeter=0,this.polyline||(o.area=0),o):this.polyline?(o.perimeter=this._perimetersum.Sum(),o):(n=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),o.perimeter=this._perimetersum.Sum(n.s12),(a=new i.Accumulator(this._areasum)).Add(n.S12),o.area=s(a,this._area0,this._crossings+r(this.lon,this._lon0),t,e),o)},t.PolygonArea.prototype.TestPoint=function(t,e,n,i){var a,s,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(),s=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||(s+=a.S12,l+=r(0===c?this.lon:e,0!==c?this._lon0:e));return this.polyline||(u.area=o(s,this._area0,l,n,i)),u},t.PolygonArea.prototype.TestEdge=function(t,e,n,i){var s,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+=(s=this._geod.Direct(this.lat,this.lon,t,e,this._mask)).S12,c+=a(this.lon,s.lon2),c+=r(s.lon2,this._lon0),s=this._geod.Inverse(s.lat2,s.lon2,this._lat0,this._lon0,this._mask),u.perimeter+=s.s12,l+=s.S12,u.area=o(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)},470:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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}\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: black;\n font-weight: bold;\n}\n.em-flow-label-shadow {\n font-size: 13px;\n stroke-width: 4px;\n stroke: white;\n}\n",""]);const o=s},489:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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: black;\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 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: black;\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 pointer-events: all;\n cursor: default;\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: black;\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",""]);const o=s},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}},601:t=>{"use strict";t.exports=function(t){return t[1]}},604:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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: black;\n dominant-baseline: unset;\n}\n.em-legend-title {\n font-size: 16px;\n fill: black;\n}\n.em-legend-separator {\n stroke: white;\n stroke-width: 1;\n}\n.em-legend-tick {\n stroke: #d8d8d8;\n stroke-width: 1;\n}\n.em-bivariate-frame {\n fill: none;\n stroke: black;\n}\n.em-bivariate-nodata {\n stroke: black;\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: black;\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: black;\n}\n\n.em-legend-histogram-bar {\n cursor: pointer;\n}\n",""]);const o=s},633:(t,e,n)=>{var i=n(738).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",h=l.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,n){return t[e]=n}}function p(t,e,n,i){var r=e&&e.prototype instanceof x?e:x,a=Object.create(r.prototype),s=new L(i||[]);return o(a,"_invoke",{value:T(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var g="suspendedStart",_="suspendedYield",m="executing",y="completed",v={};function x(){}function b(){}function w(){}var S={};f(S,c,(function(){return this}));var M=Object.getPrototypeOf,E=M&&M(M(G([])));E&&E!==a&&s.call(E,c)&&(S=E);var A=w.prototype=x.prototype=Object.create(S);function C(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(r,a,o,l){var c=d(t[r],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==i(h)&&s.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,o,l)}),(function(t){n("throw",t,o,l)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return n("throw",t,o,l)}))}l(c.arg)}var r;o(this,"_invoke",{value:function(t,i){function a(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(a,a):a()}})}function T(t,n,i){var r=g;return function(a,s){if(r===m)throw Error("Generator is already running");if(r===y){if("throw"===a)throw s;return{value:e,done:!0}}for(i.method=a,i.arg=s;;){var o=i.delegate;if(o){var l=P(o,i);if(l){if(l===v)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===g)throw r=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=d(t,n,i);if("normal"===c.type){if(r=i.done?y:_,c.arg===v)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=y,i.method="throw",i.arg=c.arg)}}}function P(t,n){var i=n.method,r=t.iterator[i];if(r===e)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v;var a=d(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(s.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(i(t)+" is not iterable")}return b.prototype=w,o(A,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,h,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,h,"GeneratorFunction")),t.prototype=Object.create(A),t},n.awrap=function(t){return{__await:t}},C(k.prototype),f(k.prototype,u,(function(){return this})),n.AsyncIterator=k,n.async=function(t,e,i,r,a){void 0===a&&(a=Promise);var s=new k(p(t,e,i,r),a);return n.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},C(A),f(A,h,"Generator"),f(A,c,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},n.values=G,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!t)for(var n in this)"t"===n.charAt(0)&&s.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(i,r){return o.type="throw",o.arg=t,n.next=i,r&&(n.method="next",n.arg=e),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=s.call(a,"catchLoc"),c=s.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),F(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;F(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:G(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),v}},n}t.exports=r,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:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.push([t.id,".estat-vis-tooltip-text {\n background: #ffffff;\n color: #171a22;\n padding: 4px;\n font-size: 16px;\n}\n.estat-vis-tooltip-bar {\n background: #515560;\n color: #ffffff;\n padding: 6px;\n font-size: 16px;\n}\n.tooltip-eurostat {\n font-family: Arial;\n max-width: 250px;\n overflow: hidden;\n background: white;\n padding: 0px;\n border: 0px;\n border-radius: 0px;\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1), 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-piechart-breakdown {\n padding: 10px;\n font-size: 14px;\n}\n.em-tooltip-piechart-container {\n text-align: center;\n}\n",""]);const o=s},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:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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: #000;\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 o=s},789:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.push([t.id,".em-annotation-group {\n /* pointer-events: none; */\n}\n",""]);const o=s},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)}}}},875:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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 o=s},991:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(601),r=n.n(i),a=n(314),s=n.n(a)()(r());s.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.2;\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: #000;\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\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/* target non cc/eu/efta borders */\n/* .em-bn-oth:not(.em-bn-co):not(.em-bn-cc):not(.em-bn-eu):not(.em-bn-efta) {\n stroke-width: 0;\n} */\n",""]);const o=s}},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.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.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.nc=void 0;var i={};return(()=>{"use strict";n.r(i),n.d(i,{getDefaultLabels:()=>Cx,getFillPatternDefinitionFunction:()=>Ax,map:()=>Ex,version:()=>kx});var t=n(72),e=n.n(t),r=n(825),a=n.n(r),s=n(659),o=n.n(s),l=n(56),c=n.n(l),u=n(540),h=n.n(u),f=n(113),p=n.n(f),d=n(211),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=o().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();e()(d.A,g);d.A&&d.A.locals&&d.A.locals;function _(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 m(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}function y(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(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 v(){}function x(t){return null==t?v:function(){return this.querySelector(t)}}function b(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function S(t){return null==t?w:function(){return this.querySelectorAll(t)}}function M(t){return function(){return this.matches(t)}}function E(t){return function(e){return e.matches(t)}}var A=Array.prototype.find;function C(){return this.firstElementChild}var k=Array.prototype.filter;function T(){return Array.from(this.children)}function P(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 F(t,e,n,i,r,a){for(var s,o=0,l=e.length,c=a.length;o<c;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):n[o]=new N(t,a[o]);for(;o<l;++o)(s=e[o])&&(r[o]=s)}function L(t,e,n,i,r,a,s){var o,l,c,u=new Map,h=e.length,f=a.length,p=new Array(h);for(o=0;o<h;++o)(l=e[o])&&(p[o]=c=s.call(l,l.__data__,o,e)+"",u.has(c)?r[o]=l:u.set(c,l));for(o=0;o<f;++o)c=s.call(t,a[o],o,a)+"",(l=u.get(c))?(i[o]=l,l.__data__=a[o],u.delete(c)):n[o]=new N(t,a[o]);for(o=0;o<h;++o)(l=e[o])&&u.get(p[o])===l&&(r[o]=l)}function G(t){return t.__data__}function O(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function D(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 z="http://www.w3.org/1999/xhtml";const I={svg:"http://www.w3.org/2000/svg",xhtml:z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function R(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),I.hasOwnProperty(e)?{space:I[e],local:t}:t}function j(t){return function(){this.removeAttribute(t)}}function q(t){return function(){this.removeAttributeNS(t.space,t.local)}}function B(t,e){return function(){this.setAttribute(t,e)}}function U(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function H(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 V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $(t){return function(){this.style.removeProperty(t)}}function Y(t,e,n){return function(){this.style.setProperty(t,e,n)}}function J(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function X(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function Q(t,e){return function(){this[t]=e}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function it(t,e){for(var n=et(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function rt(t,e){for(var n=et(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function at(t){return function(){it(this,t)}}function st(t){return function(){rt(this,t)}}function ot(t,e){return function(){(e.apply(this,arguments)?it:rt)(this,t)}}function lt(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function ut(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ht(){this.innerHTML=""}function ft(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function dt(){this.nextSibling&&this.parentNode.appendChild(this)}function gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _t(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===z&&e.documentElement.namespaceURI===z?e.createElement(t):e.createElementNS(n,t)}}function mt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yt(t){var e=R(t);return(e.local?mt:_t)(e)}function vt(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function bt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function St(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 Mt(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 s=0,o=r.length;s<o;++s)if((i=r[s]).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 Et(t,e,n){var i=V(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 At(t,e){return function(){return Et(this,t,e)}}function Ct(t,e){return function(){return Et(this,t,e.apply(this,arguments))}}nt.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 kt=[null];function Tt(t,e){this._groups=t,this._parents=e}function Pt(){return new Tt([[document.documentElement]],kt)}Tt.prototype=Pt.prototype={constructor:Tt,select:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s,o=e[r],l=o.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=o[u])&&(s=t.call(a,a.__data__,u,o))&&("__data__"in a&&(s.__data__=a.__data__),c[u]=s);return new Tt(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return b(t.apply(this,arguments))}}(t):S(t);for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var s,o=e[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(i.push(t.call(s,s.__data__,c,o)),r.push(s));return new Tt(i,r)},selectChild:function(t){return this.select(null==t?C:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:E(t)))},selectChildren:function(t){return this.selectAll(null==t?T:function(t){return function(){return k.call(this.children,t)}}("function"==typeof t?t:E(t)))},filter:function(t){"function"!=typeof t&&(t=M(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s=e[r],o=s.length,l=i[r]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new Tt(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,G);var n=e?L:F,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],f=h.length,p=O(t.call(u,u&&u.__data__,c,i)),d=p.length,g=o[c]=new Array(d),_=s[c]=new Array(d);n(u,h,g,_,l[c]=new Array(f),p,e);for(var m,y,v=0,x=0;v<d;++v)if(m=g[v]){for(v>=x&&(x=v+1);!(y=_[x])&&++x<d;);m._next=y||null}}return(s=new Tt(s,i))._enter=o,s._exit=l,s},enter:function(){return new Tt(this._enter||this._groups.map(P),this._parents)},exit:function(){return new Tt(this._exit||this._groups.map(P),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,s=Math.min(r,a),o=new Array(r),l=0;l<s;++l)for(var c,u=n[l],h=i[l],f=u.length,p=o[l]=new Array(f),d=0;d<f;++d)(c=u[d]||h[d])&&(p[d]=c);for(;l<r;++l)o[l]=n[l];return new Tt(o,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,s=r[a];--a>=0;)(i=r[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=D);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var s,o=n[a],l=o.length,c=r[a]=new Array(l),u=0;u<l;++u)(s=o[u])&&(c[u]=s);c.sort(e)}return new Tt(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 s=i[r];if(s)return s}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],s=0,o=a.length;s<o;++s)(r=a[s])&&t.call(r,r.__data__,s,a);return this},attr:function(t,e){var n=R(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?q:j:"function"==typeof e?n.local?H:W:n.local?U:B)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?$:"function"==typeof e?J:Y)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?Z:Q)(t,e)):this.node()[t]},classed:function(t,e){var n=tt(t+"");if(arguments.length<2){for(var i=et(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?ot:e?at:st)(n,e))},text:function(t){return arguments.length?this.each(null==t?lt:("function"==typeof t?ut:ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ht:("function"==typeof t?pt:ft)(t)):this.node().innerHTML},raise:function(){return this.each(dt)},lower:function(){return this.each(gt)},append:function(t){var e="function"==typeof t?t:yt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:yt(t),i=null==e?vt:"function"==typeof e?e:x(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?wt:bt)},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+""),s=a.length;if(!(arguments.length<2)){for(o=e?Mt:St,i=0;i<s;++i)this.each(o(a[i],e,n));return this}var o=this.node().__on;if(o)for(var l,c=0,u=o.length;c<u;++c)for(i=0,l=o[c];i<s;++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?Ct:At)(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,s=r.length;a<s;++a)(i=r[a])&&(yield i)}};const Nt=Pt;function Ft(t){return"string"==typeof t?new Tt([[document.querySelector(t)]],[document.documentElement]):new Tt([[t]],kt)}function Lt(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 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 Ot(t){return null===t?NaN:+t}function Dt(t,e,n=Ot){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),s=+n(t[a],a,t);return s+(+n(t[a+1],a+1,t)-s)*(r-a)}}function zt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function It(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Rt(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=zt,n=(e,n)=>zt(t(e),n),i=(e,n)=>t(e)-n):(e=t===zt||t===It?t:jt,n=t,i=t),{left:r,center:function(t,e,n=0,a=t.length){const s=r(t,e,n,a-1);return s>n&&i(t[s-1],e)>-i(t[s],e)?s-1:s},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 qt=Rt(zt),Bt=qt.right,Ut=(qt.left,Rt(Ot).center,Bt);function Wt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Ht(){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]=Dt(e,t/r);return a}function a(e){return null==e||isNaN(e=+e)?t:n[Ut(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(zt),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 Ht().domain(e).range(n).unknown(t)},Wt.apply(a,arguments)}const Vt=Math.sqrt(50),$t=Math.sqrt(10),Yt=Math.sqrt(2);function Jt(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),s=a>=Vt?10:a>=$t?5:a>=Yt?2:1;let o,l,c;return r<0?(c=Math.pow(10,-r)/s,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=n&&n<2?Jt(t,e,2*n):[o,l,c]}function Xt(t,e,n){return Jt(t=+t,e=+e,n=+n)[2]}function Kt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qt(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Zt(){}var te=.7,ee=1/te,ne="\\s*([+-]?\\d+)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,se=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),oe=new RegExp(`^rgb\\(${re},${re},${re}\\)$`),le=new RegExp(`^rgba\\(${ne},${ne},${ne},${ie}\\)$`),ce=new RegExp(`^rgba\\(${re},${re},${re},${ie}\\)$`),ue=new RegExp(`^hsl\\(${ie},${re},${re}\\)$`),he=new RegExp(`^hsla\\(${ie},${re},${re},${ie}\\)$`),fe={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 pe(){return this.rgb().formatHex()}function de(){return this.rgb().formatRgb()}function ge(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ae.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?_e(e):3===n?new xe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(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=se.exec(t))?new xe(e[1],e[2],e[3],1):(e=oe.exec(t))?new xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=le.exec(t))?me(e[1],e[2],e[3],e[4]):(e=ce.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ue.exec(t))?Ae(e[1],e[2]/100,e[3]/100,1):(e=he.exec(t))?Ae(e[1],e[2]/100,e[3]/100,e[4]):fe.hasOwnProperty(t)?_e(fe[t]):"transparent"===t?new xe(NaN,NaN,NaN,0):null}function _e(t){return new xe(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,i){return i<=0&&(t=e=n=NaN),new xe(t,e,n,i)}function ye(t){return t instanceof Zt||(t=ge(t)),t?new xe((t=t.rgb()).r,t.g,t.b,t.opacity):new xe}function ve(t,e,n,i){return 1===arguments.length?ye(t):new xe(t,e,n,null==i?1:i)}function xe(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function be(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}`}function we(){const t=Se(this.opacity);return`${1===t?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${1===t?")":`, ${t})`}`}function Se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Me(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ee(t){return((t=Me(t))<16?"0":"")+t.toString(16)}function Ae(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ke(t,e,n,i)}function Ce(t){if(t instanceof ke)return new ke(t.h,t.s,t.l,t.opacity);if(t instanceof Zt||(t=ge(t)),!t)return new ke;if(t instanceof ke)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),s=NaN,o=a-r,l=(a+r)/2;return o?(s=e===a?(n-i)/o+6*(n<i):n===a?(i-e)/o+2:(e-n)/o+4,o/=l<.5?a+r:2-a-r,s*=60):o=l>0&&l<1?0:s,new ke(s,o,l,t.opacity)}function ke(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Te(t){return(t=(t||0)%360)<0?t+360:t}function Pe(t){return Math.max(0,Math.min(1,t||0))}function Ne(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 Fe(t,e,n,i,r){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*i+s*r)/6}Kt(Zt,ge,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:pe,formatHex:pe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ce(this).formatHsl()},formatRgb:de,toString:de}),Kt(xe,ve,Qt(Zt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xe(Me(this.r),Me(this.g),Me(this.b),Se(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:be,formatHex:be,formatHex8:function(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}${Ee(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:we,toString:we})),Kt(ke,(function(t,e,n,i){return 1===arguments.length?Ce(t):new ke(t,e,n,null==i?1:i)}),Qt(Zt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new ke(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 xe(Ne(t>=240?t-240:t+120,r,i),Ne(t,r,i),Ne(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ke(Te(this.h),Pe(this.s),Pe(this.l),Se(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=Se(this.opacity);return`${1===t?"hsl(":"hsla("}${Te(this.h)}, ${100*Pe(this.s)}%, ${100*Pe(this.l)}%${1===t?")":`, ${t})`}`}}));const Le=t=>()=>t;function Ge(t,e){return function(n){return t+n*e}}function Oe(t){return 1==(t=+t)?De: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):Le(isNaN(e)?n:e)}}function De(t,e){var n=e-t;return n?Ge(t,n):Le(isNaN(t)?e:t)}const ze=function t(e){var n=Oe(e);function i(t,e){var i=n((t=ve(t)).r,(e=ve(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),s=De(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Ie(t){return function(e){var n,i,r=e.length,a=new Array(r),s=new Array(r),o=new Array(r);for(n=0;n<r;++n)i=ve(e[n]),a[n]=i.r||0,s[n]=i.g||0,o[n]=i.b||0;return a=t(a),s=t(s),o=t(o),i.opacity=1,function(t){return i.r=a(t),i.g=s(t),i.b=o(t),i+""}}}var Re=Ie((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],s=i>0?t[i-1]:2*r-a,o=i<e-1?t[i+2]:2*a-r;return Fe((n-i/e)*e,s,r,a,o)}}));Ie((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],s=t[(i+1)%e],o=t[(i+2)%e];return Fe((n-i/e)*e,r,a,s,o)}}));function je(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=new Array(r),s=new Array(i);for(n=0;n<r;++n)a[n]=Ye(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<r;++n)s[n]=a[n](t);return s}}function qe(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Be(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ue(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]=Ye(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var We=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,He=new RegExp(We.source,"g");function Ve(t,e){var n,i,r,a=We.lastIndex=He.lastIndex=0,s=-1,o=[],l=[];for(t+="",e+="";(n=We.exec(t))&&(i=He.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),o[s]?o[s]+=r:o[++s]=r),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Be(n,i)})),a=He.lastIndex;return a<e.length&&(r=e.slice(a),o[s]?o[s]+=r:o[++s]=r),o.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)o[(n=l[i]).i]=n.x(t);return o.join("")})}function $e(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 Ye(t,e){var n,i=typeof e;return null==e||"boolean"===i?Le(e):("number"===i?Be:"string"===i?(n=ge(e))?(e=n,ze):Ve:e instanceof ge?ze:e instanceof Date?qe:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?$e:Array.isArray(e)?je:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ue:Be)(t,e)}function Je(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Xe(t){return+t}var Ke=[0,1];function Qe(t){return t}function Ze(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function tn(t,e,n){var i=t[0],r=t[1],a=e[0],s=e[1];return r<i?(i=Ze(r,i),a=n(s,a)):(i=Ze(i,r),a=n(a,s)),function(t){return a(i(t))}}function en(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=Ze(t[s],t[s+1]),a[s]=n(e[s],e[s+1]);return function(e){var n=Ut(t,e,1,i)-1;return a[n](r[n](e))}}function nn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rn(){var t,e,n,i,r,a,s=Ke,o=Ke,l=Ye,c=Qe;function u(){var t=Math.min(s.length,o.length);return c!==Qe&&(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))}}(s[0],s[t-1])),i=t>2?en:tn,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(s.map(t),o,l)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=i(o,s.map(t),Be)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Xe),u()):s.slice()},h.range=function(t){return arguments.length?(o=Array.from(t),u()):o.slice()},h.rangeRound=function(t){return o=Array.from(t),l=Je,u()},h.clamp=function(t){return arguments.length?(c=!!t||Qe,u()):c!==Qe},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()}}var an,sn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function on(t){if(!(e=sn.exec(t)))throw new Error("invalid format: "+t);var e;return new ln({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 ln(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 cn(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 un(t){return(t=cn(Math.abs(t)))?t[1]:NaN}function hn(t,e){var n=cn(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")}on.prototype=ln.prototype,ln.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 fn={"%":(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)=>hn(100*t,e),r:hn,s:function(t,e){var n=cn(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(an=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+cn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pn(t){return t}var dn,gn,_n,mn=Array.prototype.map,yn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vn(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?pn:(e=mn.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],s=0,o=e[0],l=0;r>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(t.substring(r-=o,r+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?pn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(mn.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=on(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,y=t.type;"n"===y?(g=!0,y="g"):fn[y]||(void 0===_&&(_=12),m=!0,y="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var v="$"===f?r:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===f?a:/[%p]/.test(y)?l:"",b=fn[y],w=/[defgprs%]/.test(y);function S(t){var r,a,l,f=v,S=x;if("c"===y)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"===y?yn[8+an/3]:"")+S+(M&&"("===h?")":""),w)for(r=-1,a=t.length;++r<a;)if(48>(l=t.charCodeAt(r))||l>57){S=(46===l?s+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,A=E<d?new Array(d-E+1).join(e):"";switch(g&&p&&(t=i(A+t,A.length?d-S.length:1/0),A=""),n){case"<":t=f+t+S+A;break;case"=":t=f+A+t+S;break;case"^":t=A.slice(0,E=A.length>>1)+f+t+S+A.slice(E);break;default:t=A+f+t+S}return o(t)}return _=void 0===_?6:/[gprs]/.test(y)?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=on(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(un(e)/3))),r=Math.pow(10,-i),a=yn[8+i/3];return function(t){return n(r*t)+a}}}}function xn(t){return dn=vn(t),gn=dn.format,_n=dn.formatPrefix,dn}function bn(t,e,n,i){var r,a=function(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?Xt(e,t,n):Xt(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}(t,e,n);switch((i=on(null==i?",f":i)).type){case"s":var s=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(un(e)/3)))-un(Math.abs(t)))}(a,s))||(i.precision=r),_n(i,s);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,un(e)-un(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,-un(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return gn(i)}function wn(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,s]=i?Jt(e,t,n):Jt(t,e,n);if(!(a>=r))return[];const o=a-r+1,l=new Array(o);if(i)if(s<0)for(let t=0;t<o;++t)l[t]=(a-t)/-s;else for(let t=0;t<o;++t)l[t]=(a-t)*s;else if(s<0)for(let t=0;t<o;++t)l[t]=(r+t)/-s;else for(let t=0;t<o;++t)l[t]=(r+t)*s;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return bn(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),s=0,o=a.length-1,l=a[s],c=a[o],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=o,o=r);u-- >0;){if((r=Xt(l,c,n))===i)return a[s]=l,a[o]=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 Sn(){var t=rn()(Qe,Qe);return t.copy=function(){return nn(t,Sn())},Wt.apply(t,arguments),wn(t)}function Mn(){var t,e=0,n=1,i=1,r=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[Ut(r,e,0,i)]:t}function o(){var t=-1;for(r=new Array(i);++t<i;)r[t]=((t+1)*n-(t-i)*e)/(i+1);return s}return s.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,o()):[e,n]},s.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,o()):a.slice()},s.invertExtent=function(t){var s=a.indexOf(t);return s<0?[NaN,NaN]:s<1?[e,r[0]]:s>=i?[r[i-1],n]:[r[s-1],r[s]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return r.slice()},s.copy=function(){return Mn().domain([e,n]).range(a).unknown(t)},Wt.apply(wn(s),arguments)}function En(){var t,e=[.5],n=[0,1],i=1;function r(r){return null!=r&&r<=r?n[Ut(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 En().domain(e).range(n).unknown(t)},Wt.apply(r,arguments)}function An(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}xn({thousands:",",grouping:[3],currency:["$",""]});const Cn=t=>Re(t[t.length-1]);const kn=Cn(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(An));const Tn=Math.PI/180,Pn=180/Math.PI,Nn=.96422,Fn=.82521,Ln=4/29,Gn=6/29,On=3*Gn*Gn,Dn=Gn*Gn*Gn;function zn(t){if(t instanceof Rn)return new Rn(t.l,t.a,t.b,t.opacity);if(t instanceof Hn)return Vn(t);t instanceof xe||(t=ye(t));var e,n,i=Un(t.r),r=Un(t.g),a=Un(t.b),s=jn((.2225045*i+.7168786*r+.0606169*a)/1);return i===r&&r===a?e=n=s:(e=jn((.4360747*i+.3850649*r+.1430804*a)/Nn),n=jn((.0139322*i+.0971045*r+.7141733*a)/Fn)),new Rn(116*s-16,500*(e-s),200*(s-n),t.opacity)}function In(t,e,n,i){return 1===arguments.length?zn(t):new Rn(t,e,n,null==i?1:i)}function Rn(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function jn(t){return t>Dn?Math.pow(t,1/3):t/On+Ln}function qn(t){return t>Gn?t*t*t:On*(t-Ln)}function Bn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Un(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Wn(t){if(t instanceof Hn)return new Hn(t.h,t.c,t.l,t.opacity);if(t instanceof Rn||(t=zn(t)),0===t.a&&0===t.b)return new Hn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Pn;return new Hn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Hn(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Vn(t){if(isNaN(t.h))return new Rn(t.l,0,0,t.opacity);var e=t.h*Tn;return new Rn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function $n(t,e){var n=De((t=In(t)).l,(e=In(e)).l),i=De(t.a,e.a),r=De(t.b,e.b),a=De(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+""}}function Yn(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,s,o=[],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)&&(o.push(i.value),o.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return o}}(t,e)||m(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 Jn(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 Xn(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)?Xn(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,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function Xn(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 Kn(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 s,o=Jn(a.cssRules||a.rules);try{for(o.s();!(s=o.n()).done;){var l=s.value;if(l.selectorText===t)return void(l.style[e]=n)}}catch(t){o.e(t)}finally{o.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)}}Kt(Rn,In,Qt(Zt,{brighter(t){return new Rn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Rn(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 xe(Bn(3.1338561*(e=Nn*qn(e))-1.6168667*(t=1*qn(t))-.4906146*(n=Fn*qn(n))),Bn(-.9787684*e+1.9161415*t+.033454*n),Bn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Kt(Hn,(function(t,e,n,i){return 1===arguments.length?Wn(t):new Hn(t,e,n,null==i?1:i)}),Qt(Zt,{brighter(t){return new Hn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Hn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Vn(this).rgb()}}));var Qn=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},Zn=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 ti(t){var e=[],n=function(){var t,e=[],n=Jn(document.styleSheets);try{for(n.s();!(t=n.n()).done;){var i=t.value;try{var r,a=Jn(i.cssRules);try{for(a.s();!(r=a.n()).done;){var s=r.value;e.push(s)}}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 ei=function(t){t.querySelectorAll("*").forEach((function(t){var e=ti(t);Object.keys(e).forEach((function(n){var i=e[n];!t.style.getPropertyValue(n)&&i&&t.style.setProperty(n,i)}))}))},ni=function(t){return t.toLocaleString("en").replace(/,/gi," ")},ii=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 s=t[a];Array.isArray(s)?s.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.svgId_!==e&&n(t,i,r)})):t.svgId_!==e&&n(t,i,r)})):s.svgId_!==e&&n(s,i,r)}};function ri(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}var ai=function(t){for(var e=t.map((function(t){3===(t=t.replace("#","")).length&&(t=t.split("").map((function(t){return t+t})).join(""));var e=parseInt(t,16);return[e>>16&255,e>>8&255,255&e]})),n=y(e[0]),i=function(t){n=n.map((function(n,i){return Math.round(n/255*(e[t][i]/255)*255)}))},r=1;r<e.length;r++)i(r);return function(t){var e=Yn(t,3),n=e[0],i=e[1],r=e[2];return"#".concat([n,i,r].map((function(t){return t.toString(16).padStart(2,"0")})).join(""))}(n)},si=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 s=t.replace("#","");3===s.length&&(s=s.split("").map((function(t){return t+t})).join("")),e=parseInt(s.substring(0,2),16),n=parseInt(s.substring(2,4),16),i=parseInt(s.substring(4,6),16)}else{var o=t.match(/\d+/g);e=parseInt(o[0]),n=parseInt(o[1]),i=parseInt(o[2])}return e/255*.2126+n/255*.7152+i/255*.0722>.5?"black":"white"},oi=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)"},li=function(t){return t.Geometries.userGeometries?"#em-user-regions":t.gridCartogram_?"#em-grid-container":"WORLD"===t.geo_?"#em-worldrg":"#em-nutsrg, #em-cntrg"},ci=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 ui(t){return ui="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},ui(t)}function hi(t){var e=function(t,e){if("object"!=ui(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=ui(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ui(e)?e:e+""}function fi(t,e,n){return(e=hi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pi(t){return"string"==typeof t?new Tt([document.querySelectorAll(t)],[document.documentElement]):new Tt([b(t)],kt)}var di=1e-6,gi=1e-12,_i=Math.PI,mi=_i/2,yi=_i/4,vi=2*_i,xi=180/_i,bi=_i/180,wi=Math.abs,Si=Math.atan,Mi=Math.atan2,Ei=Math.cos,Ai=Math.ceil,Ci=(Math.exp,Math.floor,Math.hypot),ki=(Math.log,Math.pow,Math.sin),Ti=Math.sign||function(t){return t>0?1:t<0?-1:0},Pi=Math.sqrt;Math.tan;function Ni(t){return t>1?mi:t<-1?-mi:Math.asin(t)}function Fi(){}function Li(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:Fi,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Gi(t,e){return wi(t[0]-e[0])<di&&wi(t[1]-e[1])<di}function Oi(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 Di(t,e,n,i,r){var a,s,o=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],s=t[e];if(Gi(i,s)){if(!i[2]&&!s[2]){for(r.lineStart(),a=0;a<e;++a)r.point((i=t[a])[0],i[1]);return void r.lineEnd()}s[0]+=2e-6}o.push(n=new Oi(i,t,null,!0)),l.push(n.o=new Oi(i,null,n,!1)),o.push(n=new Oi(s,t,null,!1)),l.push(n.o=new Oi(s,null,n,!0))}})),o.length){for(l.sort(e),zi(o),zi(l),a=0,s=l.length;a<s;++a)l[a].e=n=!n;for(var c,u,h=o[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,s=c.length;a<s;++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 zi(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 Ii(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var Ri=1e9,ji=-Ri;function qi(t,e,n,i){function r(r,a){return t<=r&&r<=n&&e<=a&&a<=i}function a(r,a,o,c){var u=0,h=0;if(null==r||(u=s(r,o))!==(h=s(a,o))||l(r,a)<0^o>0)do{c.point(0===u||3===u?t:n,u>1?i:e)}while((u=(u+o+4)%4)!==h);else c.point(a[0],a[1])}function s(i,r){return wi(i[0]-t)<di?r>0?0:3:wi(i[0]-n)<di?r>0?2:1:wi(i[1]-e)<di?r>0?1:0:r>0?3:2}function o(t,e){return l(t.x,e.x)}function l(t,e){var n=s(t,1),i=s(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(s){var l,c,u,h,f,p,d,g,_,m,y,v=s,x=Li(),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,_&&v.lineEnd()},polygonStart:function(){v=x,l=[],c=[],y=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=c.length;n<r;++n)for(var a,s,o=c[n],l=1,u=o.length,h=o[0],f=h[0],p=h[1];l<u;++l)a=f,s=p,f=(h=o[l])[0],p=h[1],s<=i?p>i&&(f-a)*(i-s)>(p-s)*(t-a)&&++e:p<=i&&(f-a)*(i-s)<(p-s)*(t-a)&&--e;return e}(),n=y&&e,r=(l=Ii(l)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Di(l,o,e,a,s),s.polygonEnd());v=s,l=c=u=null}};function w(t,e){r(t,e)&&v.point(t,e)}function S(a,s){var o=r(a,s);if(c&&u.push([a,s]),m)h=a,f=s,p=o,m=!1,o&&(v.lineStart(),v.point(a,s));else if(o&&_)v.point(a,s);else{var l=[d=Math.max(ji,Math.min(Ri,d)),g=Math.max(ji,Math.min(Ri,g))],x=[a=Math.max(ji,Math.min(Ri,a)),s=Math.max(ji,Math.min(Ri,s))];!function(t,e,n,i,r,a){var s,o=t[0],l=t[1],c=0,u=1,h=e[0]-o,f=e[1]-l;if(s=n-o,h||!(s>0)){if(s/=h,h<0){if(s<c)return;s<u&&(u=s)}else if(h>0){if(s>u)return;s>c&&(c=s)}if(s=r-o,h||!(s<0)){if(s/=h,h<0){if(s>u)return;s>c&&(c=s)}else if(h>0){if(s<c)return;s<u&&(u=s)}if(s=i-l,f||!(s>0)){if(s/=f,f<0){if(s<c)return;s<u&&(u=s)}else if(f>0){if(s>u)return;s>c&&(c=s)}if(s=a-l,f||!(s<0)){if(s/=f,f<0){if(s>u)return;s>c&&(c=s)}else if(f>0){if(s<c)return;s<u&&(u=s)}return c>0&&(t[0]=o+c*h,t[1]=l+c*f),u<1&&(e[0]=o+u*h,e[1]=l+u*f),!0}}}}}(l,x,t,e,n,i)?o&&(v.lineStart(),v.point(a,s),y=!1):(_||(v.lineStart(),v.point(l[0],l[1])),v.point(x[0],x[1]),o||v.lineEnd(),y=!1)}d=a,g=s,_=o}return b}}const Bi=t=>t;function Ui(t){return function(e){var n=new Wi;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Wi(){}function Hi(t,e){t&&$i.hasOwnProperty(t.type)&&$i[t.type](t,e)}Wi.prototype={constructor:Wi,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 Vi={Feature:function(t,e){Hi(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)Hi(n[i].geometry,e)}},$i={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){Yi(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Yi(n[i],e,0)},Polygon:function(t,e){Ji(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Ji(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)Hi(n[i],e)}};function Yi(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 Ji(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)Yi(t[n],e,1);e.polygonEnd()}function Xi(t,e){t&&Vi.hasOwnProperty(t.type)?Vi[t.type](t,e):Hi(t,e)}var Ki=1/0,Qi=Ki,Zi=-Ki,tr=Zi,er={point:function(t,e){t<Ki&&(Ki=t);t>Zi&&(Zi=t);e<Qi&&(Qi=e);e>tr&&(tr=e)},lineStart:Fi,lineEnd:Fi,polygonStart:Fi,polygonEnd:Fi,result:function(){var t=[[Ki,Qi],[Zi,tr]];return Zi=tr=-(Qi=Ki=1/0),t}};const nr=er;function ir(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),Xi(n,t.stream(nr)),e(nr.result()),null!=i&&t.clipExtent(i),t}function rr(t,e,n){return ir(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])),s=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,o=+e[0][1]+(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([s,o])}),n)}function ar(t,e,n){return rr(t,[[0,0],e],n)}function sr(t,e,n){return ir(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),a=(i-r*(n[1][0]+n[0][0]))/2,s=-r*n[0][1];t.scale(150*r).translate([a,s])}),n)}function or(t,e,n){return ir(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),a=-r*n[0][0],s=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,s])}),n)}class lr{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,s=Math.abs(t)<Math.abs(r)?t-(a-r):r-(a-t);s&&(e[n++]=s),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 cr,ur,hr,fr,pr=new lr,dr=new lr,gr={point:Fi,lineStart:Fi,lineEnd:Fi,polygonStart:function(){gr.lineStart=_r,gr.lineEnd=vr},polygonEnd:function(){gr.lineStart=gr.lineEnd=gr.point=Fi,pr.add(wi(dr)),dr=new lr},result:function(){var t=pr/2;return pr=new lr,t}};function _r(){gr.point=mr}function mr(t,e){gr.point=yr,cr=hr=t,ur=fr=e}function yr(t,e){dr.add(fr*t-hr*e),hr=t,fr=e}function vr(){yr(cr,ur)}const xr=gr;var br,wr,Sr,Mr,Er=0,Ar=0,Cr=0,kr=0,Tr=0,Pr=0,Nr=0,Fr=0,Lr=0,Gr={point:Or,lineStart:Dr,lineEnd:Rr,polygonStart:function(){Gr.lineStart=jr,Gr.lineEnd=qr},polygonEnd:function(){Gr.point=Or,Gr.lineStart=Dr,Gr.lineEnd=Rr},result:function(){var t=Lr?[Nr/Lr,Fr/Lr]:Pr?[kr/Pr,Tr/Pr]:Cr?[Er/Cr,Ar/Cr]:[NaN,NaN];return Er=Ar=Cr=kr=Tr=Pr=Nr=Fr=Lr=0,t}};function Or(t,e){Er+=t,Ar+=e,++Cr}function Dr(){Gr.point=zr}function zr(t,e){Gr.point=Ir,Or(Sr=t,Mr=e)}function Ir(t,e){var n=t-Sr,i=e-Mr,r=Pi(n*n+i*i);kr+=r*(Sr+t)/2,Tr+=r*(Mr+e)/2,Pr+=r,Or(Sr=t,Mr=e)}function Rr(){Gr.point=Or}function jr(){Gr.point=Br}function qr(){Ur(br,wr)}function Br(t,e){Gr.point=Ur,Or(br=Sr=t,wr=Mr=e)}function Ur(t,e){var n=t-Sr,i=e-Mr,r=Pi(n*n+i*i);kr+=r*(Sr+t)/2,Tr+=r*(Mr+e)/2,Pr+=r,Nr+=(r=Mr*t-Sr*e)*(Sr+t),Fr+=r*(Mr+e),Lr+=3*r,Or(Sr=t,Mr=e)}const Wr=Gr;function Hr(t){this._context=t}Hr.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,vi)}},result:Fi};var Vr,$r,Yr,Jr,Xr,Kr=new lr,Qr={point:Fi,lineStart:function(){Qr.point=Zr},lineEnd:function(){Vr&&ta($r,Yr),Qr.point=Fi},polygonStart:function(){Vr=!0},polygonEnd:function(){Vr=null},result:function(){var t=+Kr;return Kr=new lr,t}};function Zr(t,e){Qr.point=ta,$r=Jr=t,Yr=Xr=e}function ta(t,e){Jr-=t,Xr-=e,Kr.add(Pi(Jr*Jr+Xr*Xr)),Jr=t,Xr=e}const ea=Qr;let na,ia,ra,aa;class sa{constructor(t){this._append=null==t?oa:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return oa;if(e!==na){const t=10**e;na=e,ia=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 ia}(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!==ra||this._append!==ia){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`,ra=t,ia=this._append,aa=this._,this._=e}this._+=aa}}result(){const t=this._;return this._="",t.length?t:null}}function oa(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function la(t,e){let n,i,r=3,a=4.5;function s(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),Xi(t,n(i))),i.result()}return s.area=function(t){return Xi(t,n(xr)),xr.result()},s.measure=function(t){return Xi(t,n(ea)),ea.result()},s.bounds=function(t){return Xi(t,n(nr)),nr.result()},s.centroid=function(t){return Xi(t,n(Wr)),Wr.result()},s.projection=function(e){return arguments.length?(n=null==e?(t=null,Bi):(t=e).stream,s):t},s.context=function(t){return arguments.length?(i=null==t?(e=null,new sa(r)):new Hr(e=t),"function"!=typeof a&&i.pointRadius(a),s):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),s):a},s.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 sa(r)),s},s.projection(t).digits(r).context(e)}var ca,ua,ha,fa,pa,da,ga,_a,ma,ya,va,xa,ba,wa,Sa,Ma,Ea={sphere:Fi,point:Aa,lineStart:ka,lineEnd:Na,polygonStart:function(){Ea.lineStart=Fa,Ea.lineEnd=La},polygonEnd:function(){Ea.lineStart=ka,Ea.lineEnd=Na}};function Aa(t,e){t*=bi;var n=Ei(e*=bi);Ca(n*Ei(t),n*ki(t),ki(e))}function Ca(t,e,n){++ca,ha+=(t-ha)/ca,fa+=(e-fa)/ca,pa+=(n-pa)/ca}function ka(){Ea.point=Ta}function Ta(t,e){t*=bi;var n=Ei(e*=bi);wa=n*Ei(t),Sa=n*ki(t),Ma=ki(e),Ea.point=Pa,Ca(wa,Sa,Ma)}function Pa(t,e){t*=bi;var n=Ei(e*=bi),i=n*Ei(t),r=n*ki(t),a=ki(e),s=Mi(Pi((s=Sa*a-Ma*r)*s+(s=Ma*i-wa*a)*s+(s=wa*r-Sa*i)*s),wa*i+Sa*r+Ma*a);ua+=s,da+=s*(wa+(wa=i)),ga+=s*(Sa+(Sa=r)),_a+=s*(Ma+(Ma=a)),Ca(wa,Sa,Ma)}function Na(){Ea.point=Aa}function Fa(){Ea.point=Ga}function La(){Oa(xa,ba),Ea.point=Aa}function Ga(t,e){xa=t,ba=e,t*=bi,e*=bi,Ea.point=Oa;var n=Ei(e);wa=n*Ei(t),Sa=n*ki(t),Ma=ki(e),Ca(wa,Sa,Ma)}function Oa(t,e){t*=bi;var n=Ei(e*=bi),i=n*Ei(t),r=n*ki(t),a=ki(e),s=Sa*a-Ma*r,o=Ma*i-wa*a,l=wa*r-Sa*i,c=Ci(s,o,l),u=Ni(c),h=c&&-u/c;ma.add(h*s),ya.add(h*o),va.add(h*l),ua+=u,da+=u*(wa+(wa=i)),ga+=u*(Sa+(Sa=r)),_a+=u*(Ma+(Ma=a)),Ca(wa,Sa,Ma)}function Da(t){ca=ua=ha=fa=pa=da=ga=_a=0,ma=new lr,ya=new lr,va=new lr,Xi(t,Ea);var e=+ma,n=+ya,i=+va,r=Ci(e,n,i);return r<gi&&(e=da,n=ga,i=_a,ua<di&&(e=ha,n=fa,i=pa),(r=Ci(e,n,i))<gi)?[NaN,NaN]:[Mi(n,e)*xi,Ni(i/r)*xi]}function za(){}function Ia(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:za,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}var Ra=1e-6,ja=Math.PI,qa=ja/2,Ba=ja/4,Ua=2*ja,Wa=180/ja,Ha=ja/180,Va=Math.abs,$a=Math.atan,Ya=Math.atan2,Ja=Math.cos,Xa=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),Ka=Math.sign||function(t){return t>0?1:t<0?-1:0},Qa=Math.sqrt;Math.tan;function Za(t){return t>1?qa:t<-1?-qa:Math.asin(t)}function ts(t,e){return Va(t[0]-e[0])<Ra&&Va(t[1]-e[1])<Ra}function es(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 ns(t,e,n,i,r){var a,s,o=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],s=t[e];if(ts(i,s)){if(!i[2]&&!s[2]){for(r.lineStart(),a=0;a<e;++a)r.point((i=t[a])[0],i[1]);return void r.lineEnd()}s[0]+=2e-6}o.push(n=new es(i,t,null,!0)),l.push(n.o=new es(i,null,n,!1)),o.push(n=new es(s,t,null,!1)),l.push(n.o=new es(s,null,n,!0))}})),o.length){for(l.sort(e),is(o),is(l),a=0,s=l.length;a<s;++a)l[a].e=n=!n;for(var c,u,h=o[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,s=c.length;a<s;++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 is(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 rs{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,s=Math.abs(t)<Math.abs(r)?t-(a-r):r-(a-t);s&&(e[n++]=s),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 as(t){return[Ya(t[1],t[0]),Za(t[2])]}function ss(t){var e=t[0],n=t[1],i=Ja(n);return[i*Ja(e),i*Xa(e),Xa(n)]}function os(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ls(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 cs(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function us(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function hs(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}function fs(t){return Va(t[0])<=ja?t[0]:Ka(t[0])*((Va(t[0])+ja)%Ua-ja)}function ps(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ds(t,e,n,i){return function(r){var a,s,o,l=e(r),c=Ia(),u=e(c),h=!1,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=m,f.lineStart=y,f.lineEnd=v,s=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,s=ps(s);var t=function(t,e){var n=fs(e),i=e[1],r=Xa(i),a=[Xa(n),-Ja(n),0],s=0,o=0,l=new rs;1===r?i=qa+Ra:-1===r&&(i=-qa-Ra);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=fs(p),g=p[1]/2+Ba,_=Xa(g),m=Ja(g),y=0;y<f;++y,d=x,_=w,m=S,p=v){var v=h[y],x=fs(v),b=v[1]/2+Ba,w=Xa(b),S=Ja(b),M=x-d,E=M>=0?1:-1,A=E*M,C=A>ja,k=_*w;if(l.add(Ya(k*E*Xa(A),m*S+k*Ja(A))),s+=C?M+E*Ua:M,C^d>=n^x>=n){var T=ls(ss(p),ss(v));hs(T);var P=ls(a,T);hs(P);var N=(C^M>=0?-1:1)*Za(P[2]);(i>N||i===N&&(T[0]||T[1]))&&(o+=C^M>=0?1:-1)}}return(s<-1e-6||s<Ra&&l<-1e-12)^1&o}(a,i);s.length?(h||(r.polygonStart(),h=!0),ns(s,_s,t,n,r)):t&&(h||(r.polygonStart(),h=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),h&&(r.polygonEnd(),h=!1),s=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){o.push([t,e]),u.point(t,e)}function y(){u.lineStart(),o=[]}function v(){m(o[0][0],o[0][1]),u.lineEnd();var t,e,n,i,l=u.clean(),f=c.result(),p=f.length;if(o.pop(),a.push(o),o=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())),s.push(f.filter(gs))}return f}}function gs(t){return t.length>1}function _s(t,e){return((t=t.x)[0]<0?t[1]-qa-Ra:qa-t[1])-((e=e.x)[0]<0?e[1]-qa-Ra:qa-e[1])}const ms=ds((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,s){var o=a>0?ja:-ja,l=Va(a-n);Va(l-ja)<Ra?(t.point(n,i=(i+s)/2>0?qa:-qa),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(o,i),t.point(a,i),e=0):r!==o&&l>=ja&&(Va(n-r)<Ra&&(n-=r*Ra),Va(a-o)<Ra&&(a-=o*Ra),i=function(t,e,n,i){var r,a,s=Xa(t-n);return Va(s)>Ra?$a((Xa(e)*(a=Ja(i))*Xa(n)-Xa(i)*(r=Ja(e))*Xa(t))/(r*a*s)):(e+i)/2}(n,i,a,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(o,i),e=0),t.point(n=a,i=s),r=o},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*qa,i.point(-ja,r),i.point(0,r),i.point(ja,r),i.point(ja,0),i.point(ja,-r),i.point(0,-r),i.point(-ja,-r),i.point(-ja,0),i.point(-ja,r);else if(Va(t[0]-e[0])>Ra){var a=t[0]<e[0]?ja:-ja;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}),[-ja,-qa]);function ys(t,e,n,i,r,a){if(n){var s=Ja(e),o=Xa(e),l=i*n;null==r?(r=e+i*Ua,a=e-l/2):(r=vs(s,r),a=vs(s,a),(i>0?r<a:r>a)&&(r+=i*Ua));for(var c,u=r;i>0?u>a:u<a;u-=l)c=as([s,-o*Ja(u),-o*Xa(u)]),t.point(c[0],c[1])}}function vs(t,e){(e=ss(e))[0]-=t,hs(e);var n=function(t){return t>1?0:t<-1?ja:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+Ua-Ra)%Ua}var xs=1e9,bs=-1e9;function ws(t,e,n,i){function r(r,a){return t<=r&&r<=n&&e<=a&&a<=i}function a(r,a,o,c){var u=0,h=0;if(null==r||(u=s(r,o))!==(h=s(a,o))||l(r,a)<0^o>0)do{c.point(0===u||3===u?t:n,u>1?i:e)}while((u=(u+o+4)%4)!==h);else c.point(a[0],a[1])}function s(i,r){return Va(i[0]-t)<Ra?r>0?0:3:Va(i[0]-n)<Ra?r>0?2:1:Va(i[1]-e)<Ra?r>0?1:0:r>0?3:2}function o(t,e){return l(t.x,e.x)}function l(t,e){var n=s(t,1),i=s(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(s){var l,c,u,h,f,p,d,g,_,m,y,v=s,x=Ia(),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,_&&v.lineEnd()},polygonStart:function(){v=x,l=[],c=[],y=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=c.length;n<r;++n)for(var a,s,o=c[n],l=1,u=o.length,h=o[0],f=h[0],p=h[1];l<u;++l)a=f,s=p,f=(h=o[l])[0],p=h[1],s<=i?p>i&&(f-a)*(i-s)>(p-s)*(t-a)&&++e:p<=i&&(f-a)*(i-s)<(p-s)*(t-a)&&--e;return e}(),n=y&&e,r=(l=ps(l)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&ns(l,o,e,a,s),s.polygonEnd());v=s,l=c=u=null}};function w(t,e){r(t,e)&&v.point(t,e)}function S(a,s){var o=r(a,s);if(c&&u.push([a,s]),m)h=a,f=s,p=o,m=!1,o&&(v.lineStart(),v.point(a,s));else if(o&&_)v.point(a,s);else{var l=[d=Math.max(bs,Math.min(xs,d)),g=Math.max(bs,Math.min(xs,g))],x=[a=Math.max(bs,Math.min(xs,a)),s=Math.max(bs,Math.min(xs,s))];!function(t,e,n,i,r,a){var s,o=t[0],l=t[1],c=0,u=1,h=e[0]-o,f=e[1]-l;if(s=n-o,h||!(s>0)){if(s/=h,h<0){if(s<c)return;s<u&&(u=s)}else if(h>0){if(s>u)return;s>c&&(c=s)}if(s=r-o,h||!(s<0)){if(s/=h,h<0){if(s>u)return;s>c&&(c=s)}else if(h>0){if(s<c)return;s<u&&(u=s)}if(s=i-l,f||!(s>0)){if(s/=f,f<0){if(s<c)return;s<u&&(u=s)}else if(f>0){if(s>u)return;s>c&&(c=s)}if(s=a-l,f||!(s<0)){if(s/=f,f<0){if(s>u)return;s>c&&(c=s)}else if(f>0){if(s<c)return;s<u&&(u=s)}return c>0&&(t[0]=o+c*h,t[1]=l+c*f),u<1&&(e[0]=o+u*h,e[1]=l+u*f),!0}}}}}(l,x,t,e,n,i)?o&&(v.lineStart(),v.point(a,s),y=!1):(_||(v.lineStart(),v.point(l[0],l[1])),v.point(x[0],x[1]),o||v.lineEnd(),y=!1)}d=a,g=s,_=o}return b}}function Ss(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 Ms=t=>t;function Es(t,e){return[Va(t)>ja?t+Math.round(-t/Ua)*Ua:t,e]}function As(t,e,n){return(t%=Ua)?e||n?Ss(ks(t),Ts(e,n)):ks(t):e||n?Ts(e,n):Es}function Cs(t){return function(e,n){return[(e+=t)>ja?e-Ua:e<-ja?e+Ua:e,n]}}function ks(t){var e=Cs(t);return e.invert=Cs(-t),e}function Ts(t,e){var n=Ja(t),i=Xa(t),r=Ja(e),a=Xa(e);function s(t,e){var s=Ja(e),o=Ja(t)*s,l=Xa(t)*s,c=Xa(e),u=c*n+o*i;return[Ya(l*r-u*a,o*n-c*i),Za(u*r+l*a)]}return s.invert=function(t,e){var s=Ja(e),o=Ja(t)*s,l=Xa(t)*s,c=Xa(e),u=c*r-l*a;return[Ya(l*r+c*a,o*n+u*i),Za(u*n-o*i)]},s}function Ps(t){return function(e){var n=new Ns;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Ns(){}function Fs(t,e){t&&Gs.hasOwnProperty(t.type)&&Gs[t.type](t,e)}Es.invert=Es,Ns.prototype={constructor:Ns,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 Ls={Feature:function(t,e){Fs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)Fs(n[i].geometry,e)}},Gs={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){Os(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Os(n[i],e,0)},Polygon:function(t,e){Ds(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Ds(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)Fs(n[i],e)}};function Os(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 Ds(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)Os(t[n],e,1);e.polygonEnd()}var zs=1/0,Is=zs,Rs=-zs,js=Rs,qs={point:function(t,e){t<zs&&(zs=t);t>Rs&&(Rs=t);e<Is&&(Is=e);e>js&&(js=e)},lineStart:za,lineEnd:za,polygonStart:za,polygonEnd:za,result:function(){var t=[[zs,Is],[Rs,js]];return Rs=js=-(Is=zs=1/0),t}};const Bs=qs;function Us(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&&Ls.hasOwnProperty(t.type)?Ls[t.type](t,e):Fs(t,e)}(n,t.stream(Bs)),e(Bs.result()),null!=i&&t.clipExtent(i),t}function Ws(t,e,n){return Us(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])),s=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,o=+e[0][1]+(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([s,o])}),n)}var Hs=Ja(30*Ha);function Vs(t,e){return+e?function(t,e){function n(i,r,a,s,o,l,c,u,h,f,p,d,g,_){var m=c-i,y=u-r,v=m*m+y*y;if(v>4*e&&g--){var x=s+f,b=o+p,w=l+d,S=Qa(x*x+b*b+w*w),M=Za(w/=S),E=Va(Va(w)-1)<Ra||Va(a-h)<Ra?(a+h)/2:Ya(b,x),A=t(E,M),C=A[0],k=A[1],T=C-i,P=k-r,N=y*T-m*P;(N*N/v>e||Va((m*T+y*P)/v-.5)>.3||s*f+o*p+l*d<Hs)&&(n(i,r,a,s,o,l,C,k,E,x/=S,b/=S,w,g,_),_.point(C,k),n(C,k,E,x,b,w,c,u,h,f,p,d,g,_))}}return function(e){var i,r,a,s,o,l,c,u,h,f,p,d,g={point:_,lineStart:m,lineEnd:v,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=y,e.lineStart()}function y(i,r){var a=ss([i,r]),s=t(i,r);n(u,h,c,f,p,d,u=s[0],h=s[1],c=i,f=a[0],p=a[1],d=a[2],16,e),e.point(u,h)}function v(){g.point=_,e.lineEnd()}function x(){m(),g.point=b,g.lineEnd=w}function b(t,e){y(i=t,e),r=u,a=h,s=f,o=p,l=d,g.point=y}function w(){n(u,h,c,f,p,d,r,a,i,s,o,l,16,e),g.lineEnd=v,v()}return g}}(t,e):function(t){return Ps({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var $s=Ps({point:function(t,e){this.stream.point(t*Ha,e*Ha)}});function Ys(t,e,n,i,r,a){if(!a)return function(t,e,n,i,r){function a(a,s){return[e+t*(a*=i),n-t*(s*=r)]}return a.invert=function(a,s){return[(a-e)/t*i,(n-s)/t*r]},a}(t,e,n,i,r);var s=Ja(a),o=Xa(a),l=s*t,c=o*t,u=s/t,h=o/t,f=(o*n-s*e)/t,p=(o*e+s*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 Js(t){return function(t){var e,n,i,r,a,s,o,l,c,u,h=150,f=480,p=250,d=0,g=0,_=0,m=0,y=0,v=0,x=1,b=1,w=null,S=ms,M=null,E=Ms,A=.5;function C(t){return l(t[0]*Ha,t[1]*Ha)}function k(t){return(t=l.invert(t[0],t[1]))&&[t[0]*Wa,t[1]*Wa]}function T(){var t=Ys(h,0,0,x,b,v).apply(null,e(d,g)),i=Ys(h,f-t[0],p-t[1],x,b,v);return n=As(_,m,y),o=Ss(e,i),l=Ss(n,o),s=Vs(o,A),P()}function P(){return c=u=null,C}return C.stream=function(t){return c&&u===t?c:c=$s(function(t){return Ps({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(S(s(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=Ja(t),n=6*Ha,i=e>0,r=Va(e)>Ra;function a(t,n){return Ja(t)*Ja(n)>e}function s(t,n,i){var r=[1,0,0],a=ls(ss(t),ss(n)),s=os(a,a),o=a[0],l=s-o*o;if(!l)return!i&&t;var c=e*s/l,u=-e*o/l,h=ls(r,a),f=us(r,c);cs(f,us(a,u));var p=h,d=os(f,p),g=os(p,p),_=d*d-g*(os(f,f)-1);if(!(_<0)){var m=Qa(_),y=us(p,(-d-m)/g);if(cs(y,f),y=as(y),!i)return y;var v,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(v=x,x=b,b=v);var M=b-x,E=Va(M-ja)<Ra;if(!E&&S<w&&(v=w,w=S,S=v),E||M<Ra?E?w+S>0^y[1]<(Va(y[0]-x)<Ra?w:S):w<=y[1]&&y[1]<=S:M>ja^(x<=y[0]&&y[0]<=b)){var A=us(p,(-d+m)/g);return cs(A,f),[y,as(A)]}}}function o(e,n){var r=i?t:ja-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return ds(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:o(h,f):g?o(h+(h<0?ja:-ja),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=s(e,d))||ts(e,p)||ts(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(r&&e&&i^g){var m;_&n||!(m=s(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&&ts(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){ys(a,t,n,r,e,i)}),i?[0,-t]:[-ja,t-ja])}(w=t*Ha):(w=null,ms),P()):w*Wa},C.clipExtent=function(t){return arguments.length?(E=null==t?(M=i=r=a=null,Ms):ws(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,T()):h},C.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],T()):[f,p]},C.center=function(t){return arguments.length?(d=t[0]%360*Ha,g=t[1]%360*Ha,T()):[d*Wa,g*Wa]},C.rotate=function(t){return arguments.length?(_=t[0]%360*Ha,m=t[1]%360*Ha,y=t.length>2?t[2]%360*Ha:0,T()):[_*Wa,m*Wa,y*Wa]},C.angle=function(t){return arguments.length?(v=t%360*Ha,T()):v*Wa},C.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},C.reflectY=function(t){return arguments.length?(b=t?-1:1,T()):b<0},C.precision=function(t){return arguments.length?(s=Vs(o,A=t*t),P()):Qa(A)},C.fitExtent=function(t,e){return Ws(C,t,e)},C.fitSize=function(t,e){return function(t,e,n){return Ws(t,[[0,0],e],n)}(C,t,e)},C.fitWidth=function(t,e){return function(t,e,n){return Us(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),a=(i-r*(n[1][0]+n[0][0]))/2,s=-r*n[0][1];t.scale(150*r).translate([a,s])}),n)}(C,t,e)},C.fitHeight=function(t,e){return function(t,e,n){return Us(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),a=-r*n[0][0],s=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,s])}),n)}(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&k,T()}}((function(){return t}))()}var Xs=Math.abs,Ks=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),Qs=(Math.log,Math.max),Zs=Math.min,to=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),eo=to/2,no=(Math.SQRT1_2,ro(2),ro(to),180/to),io=to/180;function ro(t){return t>0?Math.sqrt(t):0}var ao=[[.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 so(t,e){var n,i=Zs(18,36*Xs(e)/to),r=Ks(i),a=i-r,s=(n=ao[r])[0],o=n[1],l=(n=ao[++r])[0],c=n[1],u=(n=ao[Zs(19,++r)])[0],h=n[1];return[t*(l+a*(u-s)/2+a*a*(u-2*l+s)/2),(e>0?eo:-eo)*(c+a*(h-o)/2+a*a*(h-2*c+o)/2)]}ao.forEach((function(t){t[1]*=1.0144})),so.invert=function(t,e){var n=e/eo,i=90*n,r=Zs(18,Xs(i/5)),a=Qs(0,Ks(r));do{var s=ao[a][1],o=ao[a+1][1],l=ao[Zs(19,a+2)][1],c=l-s,u=l-2*o+s,h=2*(Xs(n)-o)/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=Zs(18,Xs(i)/5))-(a=Ks(r)),s=ao[a][1],o=ao[a+1][1],l=ao[Zs(19,a+2)][1],i-=(d=(e>=0?eo:-eo)*(o+p*(l-s)/2+p*p*(l-2*o+s)/2)-e)*no}while(Xs(d)>1e-12&&--g>0);break}}while(--a>=0);var _=ao[a][0],m=ao[a+1][0],y=ao[Zs(19,a+2)][0];return[t/(m+p*(y-_)/2+p*p*(y-2*m+_)/2),i*io]};var oo="http://www.w3.org/1999/xhtml";const lo={svg:"http://www.w3.org/2000/svg",xhtml:oo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function co(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lo.hasOwnProperty(e)?{space:lo[e],local:t}:t}function uo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===oo&&e.documentElement.namespaceURI===oo?e.createElement(t):e.createElementNS(n,t)}}function ho(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function fo(t){var e=co(t);return(e.local?ho:uo)(e)}function po(){}function go(t){return null==t?po:function(){return this.querySelector(t)}}function _o(){return[]}function mo(t){return new Array(t.length)}function yo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}yo.prototype={constructor:yo,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 vo(t,e,n,i,r,a){for(var s,o=0,l=e.length,c=a.length;o<c;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):n[o]=new yo(t,a[o]);for(;o<l;++o)(s=e[o])&&(r[o]=s)}function xo(t,e,n,i,r,a,s){var o,l,c,u={},h=e.length,f=a.length,p=new Array(h);for(o=0;o<h;++o)(l=e[o])&&(p[o]=c="$"+s.call(l,l.__data__,o,e),c in u?r[o]=l:u[c]=l);for(o=0;o<f;++o)(l=u[c="$"+s.call(t,a[o],o,a)])?(i[o]=l,l.__data__=a[o],u[c]=null):n[o]=new yo(t,a[o]);for(o=0;o<h;++o)(l=e[o])&&u[p[o]]===l&&(r[o]=l)}function bo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function wo(t){return function(){this.removeAttribute(t)}}function So(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mo(t,e){return function(){this.setAttribute(t,e)}}function Eo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ao(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Co(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 ko(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function To(t){return function(){this.style.removeProperty(t)}}function Po(t,e,n){return function(){this.style.setProperty(t,e,n)}}function No(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Fo(t){return function(){delete this[t]}}function Lo(t,e){return function(){this[t]=e}}function Go(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Oo(t){return t.trim().split(/^|\s+/)}function Do(t){return t.classList||new zo(t)}function zo(t){this._node=t,this._names=Oo(t.getAttribute("class")||"")}function Io(t,e){for(var n=Do(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Ro(t,e){for(var n=Do(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function jo(t){return function(){Io(this,t)}}function qo(t){return function(){Ro(this,t)}}function Bo(t,e){return function(){(e.apply(this,arguments)?Io:Ro)(this,t)}}function Uo(){this.textContent=""}function Wo(t){return function(){this.textContent=t}}function Ho(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Vo(){this.innerHTML=""}function $o(t){return function(){this.innerHTML=t}}function Yo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Jo(){this.nextSibling&&this.parentNode.appendChild(this)}function Xo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ko(){return null}function Qo(){var t=this.parentNode;t&&t.removeChild(this)}function Zo(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function tl(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}zo.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 el={},nl=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(el={mouseenter:"mouseover",mouseleave:"mouseout"}));function il(t,e,n){return t=rl(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function rl(t,e,n){return function(i){var r=nl;nl=i;try{t.call(this,this.__data__,e,n)}finally{nl=r}}}function al(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 sl(t,e,n){var i=el.hasOwnProperty(t.type)?il:rl;return function(r,a,s){var o,l=this.__on,c=i(e,a,s);if(l)for(var u=0,h=l.length;u<h;++u)if((o=l[u]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.capture),this.addEventListener(o.type,o.listener=c,o.capture=n),void(o.value=e);this.addEventListener(t.type,c,n),o={type:t.type,name:t.name,value:e,listener:c,capture:n},l?l.push(o):this.__on=[o]}}function ol(t,e,n,i){var r=nl;t.sourceEvent=nl,nl=t;try{return e.apply(n,i)}finally{nl=r}}function ll(t,e,n){var i=ko(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 cl(t,e){return function(){return ll(this,t,e)}}function ul(t,e){return function(){return ll(this,t,e.apply(this,arguments))}}var hl=[null];function fl(t,e){this._groups=t,this._parents=e}function pl(){return new fl([[document.documentElement]],hl)}fl.prototype=pl.prototype={constructor:fl,select:function(t){"function"!=typeof t&&(t=go(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s,o=e[r],l=o.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=o[u])&&(s=t.call(a,a.__data__,u,o))&&("__data__"in a&&(s.__data__=a.__data__),c[u]=s);return new fl(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?_o:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var s,o=e[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(i.push(t.call(s,s.__data__,c,o)),r.push(s));return new fl(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,s=e[r],o=s.length,l=i[r]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new fl(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?xo:vo,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,s=new Array(a),o=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=o[c]=new Array(d),_=s[c]=new Array(d);n(u,h,g,_,l[c]=new Array(f),p,e);for(var m,y,v=0,x=0;v<d;++v)if(m=g[v]){for(v>=x&&(x=v+1);!(y=_[x])&&++x<d;);m._next=y||null}}return(s=new fl(s,i))._enter=o,s._exit=l,s},enter:function(){return new fl(this._enter||this._groups.map(mo),this._parents)},exit:function(){return new fl(this._exit||this._groups.map(mo),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),s=new Array(i),o=0;o<a;++o)for(var l,c=e[o],u=n[o],h=c.length,f=s[o]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(f[p]=l);for(;o<i;++o)s[o]=e[o];return new fl(s,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,s=r[a];--a>=0;)(i=r[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=bo);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var s,o=n[a],l=o.length,c=r[a]=new Array(l),u=0;u<l;++u)(s=o[u])&&(c[u]=s);c.sort(e)}return new fl(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 s=i[r];if(s)return s}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],s=0,o=a.length;s<o;++s)(r=a[s])&&t.call(r,r.__data__,s,a);return this},attr:function(t,e){var n=co(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?So:wo:"function"==typeof e?n.local?Co:Ao:n.local?Eo:Mo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?To:"function"==typeof e?No:Po)(t,e,null==n?"":n)):function(t,e){return t.style.getPropertyValue(e)||ko(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Fo:"function"==typeof e?Go:Lo)(t,e)):this.node()[t]},classed:function(t,e){var n=Oo(t+"");if(arguments.length<2){for(var i=Do(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Bo:e?jo:qo)(n,e))},text:function(t){return arguments.length?this.each(null==t?Uo:("function"==typeof t?Ho:Wo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Vo:("function"==typeof t?Yo:$o)(t)):this.node().innerHTML},raise:function(){return this.each(Jo)},lower:function(){return this.each(Xo)},append:function(t){var e="function"==typeof t?t:fo(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:fo(t),i=null==e?Ko:"function"==typeof e?e:go(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Qo)},clone:function(t){return this.select(t?tl:Zo)},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+""),s=a.length;if(!(arguments.length<2)){for(o=e?sl:al,null==n&&(n=!1),i=0;i<s;++i)this.each(o(a[i],e,n));return this}var o=this.node().__on;if(o)for(var l,c=0,u=o.length;c<u;++c)for(i=0,l=o[c];i<s;++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?ul:cl)(t,e))}};function dl(t){return"string"==typeof t?new fl([[document.querySelector(t)]],[document.documentElement]):new fl([[t]],hl)}var gl=0;function _l(){this._="@"+(++gl).toString(36)}function ml(){for(var t,e=nl;t=e.sourceEvent;)e=t;return e}function yl(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 vl(t){var e=ml();return e.changedTouches&&(e=e.changedTouches[0]),yl(t,e)}function xl(t,e,n){arguments.length<3&&(n=e,e=ml().changedTouches);for(var i,r=0,a=e?e.length:0;r<a;++r)if((i=e[r]).identifier===n)return yl(t,i);return null}_l.prototype=function(){return new _l}.prototype={constructor:_l,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 bl={value:function(){}};function wl(){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 Sl(i)}function Sl(t){this._=t}function Ml(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function El(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=bl,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Sl.prototype=wl.prototype={constructor:Sl,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}}))),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=a[s]).type)r[n]=El(r[n],t.name,e);else if(null==e)for(n in r)r[n]=El(r[n],t.name,null);return this}for(;++s<o;)if((n=(t=a[s]).type)&&(n=Ml(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Sl(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 Al=wl;function Cl(){nl.stopImmediatePropagation()}function kl(){nl.preventDefault(),nl.stopImmediatePropagation()}function Tl(t){return function(){return t}}function Pl(t,e,n,i,r,a,s,o,l,c){this.target=t,this.type=e,this.subject=n,this.identifier=i,this.active=r,this.x=a,this.y=s,this.dx=o,this.dy=l,this._=c}function Nl(){return!nl.button}function Fl(){return this.parentNode}function Ll(t){return null==t?{x:nl.x,y:nl.y}:t}function Gl(){return"ontouchstart"in this}function Ol(){var t,e,n,i,r=Nl,a=Fl,s=Ll,o=Gl,l={},c=Al("start","drag","end"),u=0,h=0;function f(t){t.on("mousedown.drag",p).filter(o).on("touchstart.drag",_).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!i&&r.apply(this,arguments)){var s=v("mouse",a.apply(this,arguments),vl,this,arguments);s&&(dl(nl.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),function(t){var e=t.document.documentElement,n=dl(t).on("dragstart.drag",kl,!0);"onselectstart"in e?n.on("selectstart.drag",kl,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(nl.view),Cl(),n=!1,t=nl.clientX,e=nl.clientY,s("start"))}}function d(){if(kl(),!n){var i=nl.clientX-t,r=nl.clientY-e;n=i*i+r*r>h}l.mouse("drag")}function g(){dl(nl.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,i=dl(t).on("dragstart.drag",null);e&&(i.on("click.drag",kl,!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)}(nl.view,n),kl(),l.mouse("end")}function _(){if(r.apply(this,arguments)){var t,e,n=nl.changedTouches,i=a.apply(this,arguments),s=n.length;for(t=0;t<s;++t)(e=v(n[t].identifier,i,xl,this,arguments))&&(Cl(),e("start"))}}function m(){var t,e,n=nl.changedTouches,i=n.length;for(t=0;t<i;++t)(e=l[n[t].identifier])&&(kl(),e("drag"))}function y(){var t,e,n=nl.changedTouches,r=n.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<r;++t)(e=l[n[t].identifier])&&(Cl(),e("end"))}function v(t,e,n,i,r){var a,o,h,p=n(e,t),d=c.copy();if(ol(new Pl(f,"beforestart",a,t,u,p[0],p[1],0,0,d),(function(){return null!=(nl.subject=a=s.apply(i,r))&&(o=a.x-p[0]||0,h=a.y-p[1]||0,!0)})))return function s(c){var g,_=p;switch(c){case"start":l[t]=s,g=u++;break;case"end":delete l[t],--u;case"drag":p=n(e,t),g=u}ol(new Pl(f,c,a,t,g,p[0]+o,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:Tl(!!t),f):r},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Tl(t),f):a},f.subject=function(t){return arguments.length?(s="function"==typeof t?t:Tl(t),f):s},f.touchable=function(t){return arguments.length?(o="function"==typeof t?t:Tl(!!t),f):o},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}Pl.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Dl=Math.PI,zl=2*Dl,Il=1e-6,Rl=zl-Il;function jl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ql(){return new jl}jl.prototype=ql.prototype={constructor:jl,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,s=this._y1,o=n-t,l=i-e,c=a-t,u=s-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>Il)if(Math.abs(u*o-l*c)>Il&&r){var f=n-a,p=i-s,d=o*o+l*l,g=f*f+p*p,_=Math.sqrt(d),m=Math.sqrt(h),y=r*Math.tan((Dl-Math.acos((d+h-g)/(2*_*m)))/2),v=y/m,x=y/_;Math.abs(v-1)>Il&&(this._+="L"+(t+v*c)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*f>c*p)+","+(this._x1=t+x*o)+","+(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 s=(n=+n)*Math.cos(i),o=n*Math.sin(i),l=t+s,c=e+o,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)>Il||Math.abs(this._y1-c)>Il)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%zl+zl),h>Rl?this._+="A"+n+","+n+",0,1,"+u+","+(t-s)+","+(e-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Il&&(this._+="A"+n+","+n+",0,"+ +(h>=Dl)+","+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 Bl=ql;function Ul(t){return function(){return t}}var Wl=1e-12,Hl=Math.PI,Vl=Hl/2,$l=2*Hl;function Yl(t){return t.innerRadius}function Jl(t){return t.outerRadius}function Xl(t){return t.startAngle}function Kl(t){return t.endAngle}function Ql(t){return t&&t.padAngle}function Zl(t){return t>=1?Vl:t<=-1?-Vl:Math.asin(t)}function tc(t,e,n,i,r,a,s){var o=t-n,l=e-i,c=(s?a:-a)/Math.sqrt(o*o+l*l),u=c*l,h=-c*o,f=t+u,p=e+h,d=n+u,g=i+h,_=(f+d)/2,m=(p+g)/2,y=d-f,v=g-p,x=y*y+v*v,b=r-a,w=f*g-d*p,S=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),M=(w*v-y*S)/x,E=(-w*y-v*S)/x,A=(w*v+y*S)/x,C=(-w*y+v*S)/x,k=M-_,T=E-m,P=A-_,N=C-m;return k*k+T*T>P*P+N*N&&(M=A,E=C),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function ec(t){this._context=t}function nc(t){return new ec(t)}function ic(t){return t[0]}function rc(t){return t[1]}ec.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 ac(t(e))}e._curve=t}(nc);function ac(t){this._curve=t}ac.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 sc=Math.sin(Hl/10)/Math.sin(7*Hl/10);Math.sin($l/10),Math.cos($l/10);Math.sqrt(3);Math.sqrt(3),Math.sqrt(12);function oc(){}function lc(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 cc(t){this._context=t}function uc(t){this._context=t}function hc(t){this._context=t}function fc(t,e){this._basis=new cc(t),this._beta=e}cc.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:lc(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:lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},uc.prototype={areaStart:oc,areaEnd:oc,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:lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},hc.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:lc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fc.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],s=t[n]-r,o=e[n]-a,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*s),this._beta*e[l]+(1-this._beta)*(a+i*o));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 cc(t):new fc(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function pc(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 dc(t,e){this._context=t,this._k=(1-e)/6}dc.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:pc(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:pc(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 dc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function gc(t,e){this._context=t,this._k=(1-e)/6}gc.prototype={areaStart:oc,areaEnd:oc,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:pc(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 gc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function _c(t,e){this._context=t,this._k=(1-e)/6}_c.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:pc(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 _c(t,e)}return n.tension=function(e){return t(+e)},n})(0);function mc(t,e,n){var i=t._x1,r=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Wl){var o=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*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Wl){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,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,a,s,t._x2,t._y2)}function yc(t,e){this._context=t,this._alpha=e}yc.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:mc(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 vc=function t(e){function n(t){return e?new yc(t,e):new dc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function bc(t,e){this._context=t,this._alpha=e}bc.prototype={areaStart:oc,areaEnd:oc,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:mc(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 bc(t,e):new gc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function wc(t,e){this._context=t,this._alpha=e}wc.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:mc(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 wc(t,e):new _c(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Sc(t){this._context=t}function Mc(t){return t<0?-1:1}function Ec(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),o=(a*r+s*i)/(i+r);return(Mc(a)+Mc(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Ac(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Cc(t,e,n){var i=t._x0,r=t._y0,a=t._x1,s=t._y1,o=(a-i)/3;t._context.bezierCurveTo(i+o,r+o*e,a-o,s-o*n,a,s)}function kc(t){this._context=t}function Tc(t){this._context=new Pc(t)}function Pc(t){this._context=t}function Nc(t){this._context=t}function Fc(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),s=new Array(i);for(r[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(r[i-1]=s[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(s[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 Lc(t,e){this._context=t,this._t=e}Sc.prototype={areaStart:oc,areaEnd:oc,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))}},kc.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:Cc(this,this._t0,Ac(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,Cc(this,Ac(this,n=Ec(this,t,e)),n);break;default:Cc(this,this._t0,n=Ec(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Tc.prototype=Object.create(kc.prototype)).point=function(t,e){kc.prototype.point.call(this,e,t)},Pc.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)}},Nc.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=Fc(t),r=Fc(e),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[s],e[s]);(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)}},Lc.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 Gc="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},Oc=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Dc=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}}(),zc=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},Ic=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 s=r.get;return void 0!==s?s.call(i):void 0},Rc=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)},jc=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},qc=function(){function t(e){var n=e.x,i=void 0===n?0:n,r=e.y,a=void 0===r?0:r,s=e.nx,o=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,y=e.note,v=e.disable,x=e.id,b=e.className;Oc(this,t),this._dx=void 0!==s?s-i:h,this._dy=void 0!==o?o-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=y||{},this.connector=m||{},this.subject=_||{},this.disable=v||[]}return Dc(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}(),Bc=function(){function t(e){var n=e.annotations,i=e.accessors,r=e.accessorsInverse;Oc(this,t),this.accessors=i,this.accessorsInverse=r,this.annotations=n}return Dc(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 zc({},t.type.getNoteBBoxOffset(),{positionX:t.x,positionY:t.y})}))}}]),t}(),Uc=function(t,e){return"dynamic"!==t&&"left"!==t&&"right"!==t||(t=e<0?"top":"bottom"),t},Wc=function(t,e){return"dynamic"!==t&&"top"!==t&&"bottom"!==t||(t=e<0?"right":"left"),t},Hc=["topBottom","top","bottom"],Vc=["leftRight","left","right"],$c=function(t){var e=t.data,n=t.curve,i=void 0===n?nc:n,r=t.canvasContext,a=t.className,s=t.classID,o=function(){var t=ic,e=rc,n=Ul(!0),i=null,r=nc,a=null;function s(s){var o,l,c,u=s.length,h=!1;for(null==i&&(a=r(c=Bl())),o=0;o<=u;++o)!(o<u&&n(l=s[o],o,s))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(l,o,s),+e(l,o,s));if(c)return a=null,c+""||null}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:Ul(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Ul(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ul(!!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}().curve(i),l={type:"path",className:a,classID:s,data:e};return r?(o.context(r),l.pathMethods=o):l.attrs={d:o(e)},l},Yc=function(t){var e=t.data,n=t.canvasContext,i={type:"path",className:t.className,classID:t.classID,data:e},r=function(){var t=Yl,e=Jl,n=Ul(0),i=null,r=Xl,a=Kl,s=Ql,o=null;function l(){var l,c,u=+t.apply(this,arguments),h=+e.apply(this,arguments),f=r.apply(this,arguments)-Vl,p=a.apply(this,arguments)-Vl,d=Math.abs(p-f),g=p>f;if(o||(o=l=Bl()),h<u&&(c=h,h=u,u=c),h>Wl)if(d>$l-Wl)o.moveTo(h*Math.cos(f),h*Math.sin(f)),o.arc(0,0,h,f,p,!g),u>Wl&&(o.moveTo(u*Math.cos(p),u*Math.sin(p)),o.arc(0,0,u,p,f,g));else{var _,m,y=f,v=p,x=f,b=p,w=d,S=d,M=s.apply(this,arguments)/2,E=M>Wl&&(i?+i.apply(this,arguments):Math.sqrt(u*u+h*h)),A=Math.min(Math.abs(h-u)/2,+n.apply(this,arguments)),C=A,k=A;if(E>Wl){var T=Zl(E/u*Math.sin(M)),P=Zl(E/h*Math.sin(M));(w-=2*T)>Wl?(x+=T*=g?1:-1,b-=T):(w=0,x=b=(f+p)/2),(S-=2*P)>Wl?(y+=P*=g?1:-1,v-=P):(S=0,y=v=(f+p)/2)}var N=h*Math.cos(y),F=h*Math.sin(y),L=u*Math.cos(b),G=u*Math.sin(b);if(A>Wl){var O=h*Math.cos(v),D=h*Math.sin(v),z=u*Math.cos(x),I=u*Math.sin(x);if(d<Hl){var R=w>Wl?function(t,e,n,i,r,a,s,o){var l=n-t,c=i-e,u=s-r,h=o-a,f=(u*(e-a)-h*(t-r))/(h*l-u*c);return[t+f*l,e+f*c]}(N,F,z,I,O,D,L,G):[L,G],j=N-R[0],q=F-R[1],B=O-R[0],U=D-R[1],W=1/Math.sin(Math.acos((j*B+q*U)/(Math.sqrt(j*j+q*q)*Math.sqrt(B*B+U*U)))/2),H=Math.sqrt(R[0]*R[0]+R[1]*R[1]);C=Math.min(A,(u-H)/(W-1)),k=Math.min(A,(h-H)/(W+1))}}S>Wl?k>Wl?(_=tc(z,I,N,F,h,k,g),m=tc(O,D,L,G,h,k,g),o.moveTo(_.cx+_.x01,_.cy+_.y01),k<A?o.arc(_.cx,_.cy,k,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(o.arc(_.cx,_.cy,k,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),o.arc(0,0,h,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),!g),o.arc(m.cx,m.cy,k,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):(o.moveTo(N,F),o.arc(0,0,h,y,v,!g)):o.moveTo(N,F),u>Wl&&w>Wl?C>Wl?(_=tc(L,G,O,D,u,-C,g),m=tc(N,F,z,I,u,-C,g),o.lineTo(_.cx+_.x01,_.cy+_.y01),C<A?o.arc(_.cx,_.cy,C,Math.atan2(_.y01,_.x01),Math.atan2(m.y01,m.x01),!g):(o.arc(_.cx,_.cy,C,Math.atan2(_.y01,_.x01),Math.atan2(_.y11,_.x11),!g),o.arc(0,0,u,Math.atan2(_.cy+_.y11,_.cx+_.x11),Math.atan2(m.cy+m.y11,m.cx+m.x11),g),o.arc(m.cx,m.cy,C,Math.atan2(m.y11,m.x11),Math.atan2(m.y01,m.x01),!g))):o.arc(0,0,u,b,x,g):o.lineTo(L,G)}else o.moveTo(0,0);if(o.closePath(),l)return o=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-Hl/2;return[Math.cos(i)*n,Math.sin(i)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ul(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ul(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ul(+t),l):n},l.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Ul(+t),l):i},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ul(+t),l):r},l.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ul(+t),l):a},l.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Ul(+t),l):s},l.context=function(t){return arguments.length?(o=null==t?null:t,l):o},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},Jc=function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,s=a+i.dx,o=i.y-r.y,l=o+i.dy,c=i.subject;if("circle"===n&&(c.outerRadius||c.radius)){var u=Math.sqrt((a-s)*(a-s)+(o-l)*(o-l)),h=Math.asin(-l/u),f=c.outerRadius||c.radius+(c.radiusPadding||0);a=Math.abs(Math.cos(h)*f)*(s<0?-1:1),o=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)&&(o=Math.abs(d)>Math.abs(i.dy)?d/2:d),a===p/2&&o===d/2&&(a=s,o=l)}return[[a,o],[s,l]]},Xc=function(t){var e=t.type,n=t.connectorData,i=t.subjectType;n||(n={}),n.points&&"number"!=typeof n.points||(n.points=Kc(e.annotation.offset,n.points)),n.curve||(n.curve=vc);var r=[];if(e.editMode){var a=n.points.map((function(t,e){return zc({},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})})),s=function(t){n.points[t][0]+=nl.dx,n.points[t][1]+=nl.dy,e.redrawConnector()};r=e.mapHandles(a.map((function(t){return zc({},t.move,{drag:s.bind(e,t.index)})})))}var o=Jc({type:e,subjectType:i});return o=[o[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),[o[1]]),{components:[$c({data:o,curve:n.curve,className:"connector"})],handles:r}},Kc=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},Qc=function(t){var e=t.subjectData,n=t.type;e.radius||e.outerRadius||(e.radius=20);var i=[],r=Yc({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,s=t.r2,o=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!==s&&(l.r2={x:n+s/Math.sqrt(2),y:r+s/Math.sqrt(2)}),void 0!==o&&(l.padding={x:n+a+o,y:r}),l}({r1:r.data.outerRadius||r.data.radius,r2:r.data.innerRadius,padding:e.radiusPadding}),s=function(t){var i=e[t]+nl.dx*Math.sqrt(2);e[t]=i,n.redrawSubject(),n.redrawConnector()},o=[zc({},a.r1,{drag:s.bind(n,void 0!==e.outerRadius?"outerRadius":"radius")})];e.innerRadius&&o.push(zc({},a.r2,{drag:s.bind(n,"innerRadius")})),i=n.mapHandles(o)}return r.attrs["fill-opacity"]=0,{components:[r],handles:i}},Zc=function(){function t(e){var n=e.a,i=e.annotation,r=e.editMode,a=e.dispatcher,s=e.notePadding,o=e.accessors;if(Oc(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=cu.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!==s?s:3,this.offsetCornerX=0,this.offsetCornerY=0,o&&i.data&&this.init(o)}return Dc(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,s=e.handles,o=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(Ol().container(dl("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:s});else{lu(t,[n.annotation],i,r,o);for(var l=t.select(i+"."+(o||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 hu(this.note,".annotation-note-content text")}},{key:"getNoteBBoxOffset",value:function(){var t=hu(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=Qc(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,s=$c({data:[[0,0],[r,0],[r,a],[0,a],[0,0]],className:"subject"});if(n.editMode){var o=[{x:r,y:a/2,drag:function(){e.width=nl.x,n.redrawSubject(),n.redrawConnector()}.bind(n)},{x:r/2,y:a,drag:function(){e.height=nl.y,n.redrawSubject(),n.redrawConnector()}.bind(n)}];i=n.mapHandles(o)}return s.attrs["fill-opacity"]=.1,{components:[s],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,s=(void 0!==e.y2?e.y2:n.y)-n.y;return{components:[$c({data:[[i,a],[r,s]],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]:{},s=r.typeSettings&&r.typeSettings.subject;n.radius||(s&&s.radius?n.radius=s.radius:n.radius=14),n.x||s&&s.x&&(n.x=s.x),n.y||s&&s.y&&(n.y=s.y);var o=[],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+")",_=Yc({className:"subject",data:{radius:c}});_.attrs.transform=g,_.attrs.fill=a.color,_.attrs["stroke-linecap"]="round",_.attrs["stroke-width"]="3px";var m=Yc({className:"subject-ring",data:{outerRadius:c,innerRadius:u}});m.attrs.transform=g,m.attrs["stroke-width"]="3px",m.attrs.fill="white";var y=void 0;if(h&&f||!h&&!f)y=$c({className:"subject-pointer",data:[[0,0],[h||0,0],[0,f||0],[0,0]]});else if(h||f){var v=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)};y=$c({className:"subject-pointer",data:[[0,0],[v(h),v(f)],[v(h,-1),v(f,-1)],[0,0]]})}if(y&&(y.attrs.fill=a.color,y.attrs["stroke-linecap"]="round",y.attrs["stroke-width"]="3px",l.push(y)),r.editMode){var x={x:2*h,y:2*f,drag:function(){n.x=nl.x<2*-c?"left":nl.x>2*c?"right":void 0,n.y=nl.y<2*-c?"top":nl.y>2*c?"bottom":void 0,r.redrawSubject()}.bind(r)};x.x||x.y||(x.y=-c),o=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:o}}(r,this.annotation));var s=a,o=s.components,l=void 0===o?[]:o,c=s.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?Xc(r):"elbow"===i?function(t){var e=t.type,n=t.subjectType,i=e.annotation,r=i.position,a=i.x-r.x,s=a+i.dx,o=i.y-r.y,l=o+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)&&(o=Math.abs(h)>Math.abs(i.dy)?h/2:h),a===u/2&&o===h/2&&(a=s,o=l)}var f=[[a,o],[s,l]],p=l-o,d=s-a,g=s,_=l,m=l<o&&s>a||s<a&&l>o?-1:1;if(Math.abs(d)<Math.abs(p)?(g=s,_=o+d*m):(_=l,g=a+p*m),"circle"===n&&(c.outerRadius||c.radius)){var y=(c.outerRadius||c.radius)+(c.radiusPadding||0),v=y/Math.sqrt(2);if(Math.abs(d)>v&&Math.abs(p)>v)f=[[a=v*(s<0?-1:1),o=v*(l<0?-1:1)],[g,_],[s,l]];else if(Math.abs(d)>Math.abs(p)){var x=Math.asin(-l/y);f=[[a=Math.abs(Math.cos(x)*y)*(s<0?-1:1),l],[s,l]]}else{var b=Math.acos(s/y);f=[[s,o=Math.abs(Math.sin(b)*y)*(l<0?-1:1)],[s,l]]}}else f=[[a,o],[g,_],[s,l]];return{components:[$c({data:f,className:"connector"})]}}(r):function(t){var e=Jc(t);return{components:[$c({data:e,className:"connector"})]}}(r);var s=a,o=s.components,l=void 0===o?[]:o,c=s.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,s=e.position;n=n?[-i[0]+n[0],-i[1]+n[1]]:[e.dx,e.dy],i||(i=[e.x-s.x,e.y-s.y]);var o=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=[[o,l],[Math.cos(p+f)*h+o,Math.sin(p+f)*h+l],[Math.cos(p-f)*h+o,Math.sin(p-f)*h+l],[o,l]];return{components:[$c({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=Yc({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,s={};"vertical"===a?s=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,s=t.bbox,o=t.offset;"top"===(e=Uc(e,o.y))?a-=s.height:"middle"===e&&(a-=s.height/2);var l=[[i,a],[i,a+s.height]];return{components:[$c({data:l,className:"note-line"})]}}(r):"horizontal"===a&&(s=function(t){var e=t.align,n=t.x,i=void 0===n?0:n,r=t.y,a=void 0===r?0:r,s=t.offset,o=t.bbox;"right"===(e=Wc(e,s.x))?i-=o.width:"middle"===e&&(i-=o.width/2);var l=[[i,a],[i+o.width,a]];return{components:[$c({data:l,className:"note-line"})]}}(r));var o=s,l=o.components,c=void 0===l?[]:l,u=o.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(Ol().container(dl("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 s=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,s=t.orientation,o=t.offset,l=void 0===o?{x:0,y:0}:o,c=-r.x,u=0;return-1!==Hc.indexOf(s)?(a=Wc(a,l.x),l.y<0&&"topBottom"===s||"top"===s?u-=r.height+n:u+=n,"middle"===a?c-=r.width/2:"right"===a&&(c-=r.width)):-1!==Vc.indexOf(s)&&(a=Uc(a,l.y),l.x<0&&"leftRight"===s||"left"===s?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}),o=s.x,l=s.y;return this.offsetCornerX=o+this.annotation.dx,this.offsetCornerY=l+this.annotation.dy,this.note&&this.noteContent.attr("transform","translate("+o+", "+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(){nl.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+=nl.dx,t.y+=nl.dy,this.annotation.position=t}},{key:"dragNote",value:function(){var t=this.annotation.offset;t.x+=nl.dx,t.y+=nl.dy,this.annotation.offset=t}},{key:"mapHandles",value:function(t){var e=this;return t.map((function(t){return zc({},t,{start:e.dragstarted.bind(e),end:e.dragended.bind(e)})}))}}]),t}(),tu=function(t,e,n){return function(t){function i(t){Oc(this,i);var n=jc(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 Rc(i,t),Dc(i,[{key:"className",value:function(){return""+(e.className||Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this)&&Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"className",this).call(this)||"")}},{key:"drawSubject",value:function(t){return this.typeSettings.subject=zc({},e.subject,this.typeSettings.subject),Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawSubject",this).call(this,zc({},t,this.typeSettings.subject))}},{key:"drawConnector",value:function(t){return this.typeSettings.connector=zc({},e.connector,this.typeSettings.connector),Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawConnector",this).call(this,zc({},t,e.connector,this.typeSettings.connector))}},{key:"drawNote",value:function(t){return this.typeSettings.note=zc({},e.note,this.typeSettings.note),Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNote",this).call(this,zc({},t,e.note,this.typeSettings.note))}},{key:"drawNoteContent",value:function(t){return Ic(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"drawNoteContent",this).call(this,zc({},t,e.note,this.typeSettings.note))}}],[{key:"init",value:function(t,e){return Ic(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,t,e),n&&(t=n(t,e)),t}}]),i}(t)},eu=function(t){function e(t){Oc(this,e);var n=jc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.textWrap=t.textWrap||120,n.drawText(),n}return Rc(e,t),Dc(e,[{key:"updateTextWrap",value:function(t){this.textWrap=t,this.drawText()}},{key:"drawText",value:function(){if(this.note){lu(this.note,[this.annotation],"g","annotation-note-content");var t=this.note.select("g.annotation-note-content");lu(t,[this.annotation],"rect","annotation-note-bg"),lu(t,[this.annotation],"text","annotation-note-label"),lu(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,s={top:0,bottom:0,left:0,right:0};if("number"==typeof a?s={top:a,bottom:a,left:a,right:a}:a&&"object"===(void 0===a?"undefined":Gc(a))&&(s=zc(s,a)),this.annotation.note.title){var o=this.a.select("text.annotation-note-title");o.text(this.annotation.note.title),o.attr("fill",this.annotation.color),o.attr("font-weight","bold"),o.call(uu,i,r),e=o.node().getBBox()}n.text(this.annotation.note.label).attr("dx","0"),n.call(uu,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+s.left+s.right).attr("height",l.height+s.top+s.bottom).attr("x",l.x-s.left).attr("y",-s.top).attr("fill","white").attr("fill-opacity",0)}}}]),e}(Zc),nu=tu(eu,{className:"label",note:{align:"middle"}}),iu=tu(eu,{className:"callout",note:{lineType:"horizontal"}}),ru=(tu(iu,{className:"callout elbow",connector:{type:"elbow"}}),tu(iu,{className:"callout curve",connector:{type:"curve"}}),tu(Zc,{className:"badge",subject:{type:"badge"},disable:["connector","note"]}),tu(eu,{className:"callout circle",subject:{type:"circle"},note:{lineType:"horizontal"},connector:{type:"elbow"}})),au=tu(eu,{className:"callout rect",subject:{type:"rect"},note:{lineType:"horizontal"},connector:{type:"elbow"}}),su=function(t){function e(){return Oc(this,e),jc(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Rc(e,t),Dc(e,[{key:"mapY",value:function(t){Ic(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){Ic(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}(iu),ou=tu(su,{className:"callout xythreshold",subject:{type:"threshold"}}),lu=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},cu=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)}))},uu=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.2;t.each((function(){for(var t=dl(this),r=t.text().split(n||/[ \t\r\n]+/).reverse().filter((function(t){return""!==t})),a=void 0,s=[],o=t.text(null).append("tspan").attr("x",0).attr("dy","0.8em");a=r.pop();)s.push(a),o.text(s.join(" ")),o.node().getComputedTextLength()>e&&s.length>1&&(s.pop(),o.text(s.join(" ")),s=[a],o=t.append("tspan").attr("x",0).attr("dy",i+"em").text(a))}))},hu=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 fu(){var t=[],e=void 0,n=void 0,i=[],r={},a={},s=!1,o=void 0,l=iu,c=void 0,u=void 0,h=Al("subjectover","subjectout","subjectclick","connectorover","connectorout","connectorclick","noteover","noteout","noteclick","dragend","dragstart"),f=void 0,p=function(n){f=n,s||n.selectAll("circle.handle").remove();var p=t.map((function(t){return t.type||(t.type=l),t.disable||(t.disable=i),new qc(t)}));e=e||new Bc({annotations:p,accessors:r,accessorsInverse:a,ids:o}),n.selectAll("g").data([e]).enter().append("g").attr("class","annotations");var d=n.select("g.annotations");lu(d,e.annotations,"g","annotation");var g=d.selectAll("g.annotation");g.each((function(t){var e=dl(this);e.attr("class","annotation"),lu(e,[t],"g","annotation-connector"),lu(e,[t],"g","annotation-subject"),lu(e,[t],"g","annotation-note"),lu(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:s,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?(o=t,p):o},p.editMode=function(n){return arguments.length?(s=n,f&&f.selectAll("g.annotation").classed("editable",s),e&&(e.editMode(s),t=e.annotations),p):s},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 pu(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 du(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pu(Object(n),!0).forEach((function(e){fi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gu(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:nu,annotationCallout:iu,annotationCalloutRect:au,annotationCalloutCircle:ru,annotationXYThreshold:ou},r=n.annotations.map((function(t){var e=i[t.type]||nu;return du(du({},t),{},{type:e})})),a=fu().type(nu).annotations(r).editMode(n.editMode);e.append("g").attr("class","em-annotation-group").call(a)}}}var _u=function(t,e){var n,i;t.labels_.config||(t.labels_.config=bu),t.labels_.statLabelsPositions||(t.labels_.statLabelsPositions=wu);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&&xu(t,a);var s=(null===(i=t.labels_)||void 0===i?void 0:i.labels)||bu["".concat(t.geo,"_").concat(t.proj_,".cc")];if(s){var o,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!==(o=t.labels_)&&void 0!==o&&o.shadows)l.selectAll("text").data(s).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(s).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}))}},mu=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:vu,s=t.statData();return r.filter((function(e){return a(e,t)})).each((function(e){var n=Ft(this),i=yu(e,s);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,s=r.height;e.select('text[visibility="hidden"]').remove();var o=-a/2-n,l=-s/2-i;e.append("rect").attr("x",o).attr("y",l).attr("width",a+2*n).attr("height",s+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 yu(t,s)})),t}console.warn("No map specified")},yu=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 ni(n.value)}},vu=function(t,e){var n=e.statData().get(t.properties.id);return!(!n||!n.value&&0!==n&&0!==n.value)},xu=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 s=a.filter((function(t,e,n){return e===n.findIndex((function(e){return e.properties.id===t.properties.id}))}));r.selectAll("g").data(s).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 s=t._pathFunction.centroid(e);return t.labels_.processValueLabelCentroids&&(s=t.labels_.processValueLabelCentroids(e,s)),"translate("+s+")"})).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")},bu={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}]}},wu={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 Su(t,e,n,i,r,a,s){try{var o=t[a](s),l=o.value}catch(t){return void n(t)}o.done?e(l):Promise.resolve(l).then(i,r)}var Mu=n(756),Eu=n.n(Mu);function Au(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Cu(t,e){return fetch(t,e).then(Au)}function ku(t){return t}function Tu(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Pu(t,e)}))}:Pu(t,e)}function Pu(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 ku;var e,n,i=t.scale[0],r=t.scale[1],a=t.translate[0],s=t.translate[1];return function(t,o){o||(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+s;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,s=r.length;a<s;++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,s)}function a(t){return n(t)}function s(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 o(t){for(var e=s(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(o)}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=s(t.arcs);break;case"MultiLineString":e=t.arcs.map(s);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 Nu={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 Fu(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 Lu(t,e,n){var i=Fu(t,e-di,n).concat(e);return function(t){return i.map((function(e){return[t,e]}))}}function Gu(t,e,n){var i=Fu(t,e-di,n).concat(e);return function(t){return i.map((function(e){return[e,t]}))}}function Ou(){var t,e,n,i,r,a,s,o,l,c,u,h,f=10,p=f,d=90,g=360,_=2.5;function m(){return{type:"MultiLineString",coordinates:y()}}function y(){return Fu(Ai(i/d)*d,n,d).map(u).concat(Fu(Ai(o/g)*g,s,g).map(h)).concat(Fu(Ai(e/f)*f,t,f).filter((function(t){return wi(t%d)>di})).map(l)).concat(Fu(Ai(a/p)*p,r,p).filter((function(t){return wi(t%g)>di})).map(c))}return m.lines=function(){return y().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(i).concat(h(s).slice(1),u(n).reverse().slice(1),h(o).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],o=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),o>s&&(t=o,o=s,s=t),m.precision(_)):[[i,o],[n,s]]},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=Lu(a,r,90),c=Gu(e,t,_),u=Lu(o,s,90),h=Gu(i,n,_),m):_},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Du(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function zu(t,e){let n;return(i,r)=>(()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=Du(i),n.then((t=>{t.onclose=()=>n=void 0}),(()=>{})),n})().then((t=>r(t.transaction(e,i).objectStore(e))))}let Iu;function Ru(){return Iu||(Iu=zu("keyval-store","keyval")),Iu}function ju(t,e=Ru()){return e("readonly",(e=>Du(e.get(t))))}function qu(t,e,n=Ru()){return n("readwrite",(n=>(n.put(e,t),Du(n.transaction))))}var Bu=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.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=Tu(n.defaultGeoData,n.defaultGeoData.objects.CNTR_RG_20M_2020_4326).features,n.geoJSONs.worldbn=Tu(n.defaultGeoData,n.defaultGeoData.objects.CNTR_BN_20M_2020_4326).features,n.geoJSONs.kosovo=Tu(n.defaultGeoData,n.defaultGeoData.objects.NUTS_BN_20M_2021_RS_XK_border).features,n.geoJSONs.graticule=[Ou().step([30,30])()]):(n.geoJSONs.graticule=Tu(n.defaultGeoData,n.defaultGeoData.objects.gra).features,n.geoJSONs.nutsrg=Tu(n.defaultGeoData,n.defaultGeoData.objects.nutsrg).features,n.geoJSONs.nutsbn=Tu(n.defaultGeoData,n.defaultGeoData.objects.nutsbn).features,n.geoJSONs.cntrg=Tu(n.defaultGeoData,n.defaultGeoData.objects.cntrg).features,n.geoJSONs.cntbn=Tu(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 s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o="".concat(t,"/").concat(e);return n&&"EUR"!==n&&"WORLD"!==n&&(o+="/".concat(n)),o+="/".concat("WORLD"==n?"4326":i),!s&&r&&(o+="/".concat(r)),o+="/".concat(s?"nutspt_":"").concat(a,".json")},a=function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function s(t){Su(a,i,r,s,o,"next",t)}function o(t){Su(a,i,r,s,o,"throw",t)}s(void 0)}))}}(Eu().mark((function t(e){var n,i,r,a,s;return Eu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="geojson-cache:".concat(e),t.prev=1,t.next=4,ju(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,Cu(e);case 18:return s=t.sent,t.prev=19,t.next=22,qu(n,{timestamp:Date.now(),data:s});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",s);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 s=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(s))}else{var o=r(t.nuts2jsonBaseURL_,t.nutsYear_,t.geo_,t.proj_,t.scale_,t.nutsLevel_);if(i.push(a(o)),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 ii(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,s,o,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=Tu(n.allNUTSGeoData[1],n.allNUTSGeoData[1].objects.nutsrg).features,this.geoJSONs.mixed.rg2=Tu(n.allNUTSGeoData[2],n.allNUTSGeoData[2].objects.nutsrg).features,this.geoJSONs.mixed.rg3=Tu(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"!=s||"3035"!=o&&"4326"!=o||function(t,e,n,i,r){var a=Nu[r]?Nu[r][n][i]:Nu[2024][n][i],s=Tu(a,"nutsbn_1").features;t.append("g").attr("id","em-kosovo-bn").attr("class","em-kosovo-bn em-bn-cc").selectAll("path").data(s).enter().append("path").attr("d",e)}(t,i,o,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},Uu=function(t,e,n){var i=bm(t,n);for(var r in(t=t||{}).proj=t.proj||Hu[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},Wu=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},Hu={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"},Vu=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(Yu(i.trim())*t.lineHeight),a=Xu($u(i.trim()),r),s=Ju(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/s,")")).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("¶","")}))}},$u=function(t){return t.split(/(?<=¶)|\s+/g).map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},Yu=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},Ju=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,s=t[i].width/2;n=Math.max(n,Math.sqrt(Math.pow(s,2)+Math.pow(a,2)))}return n},Xu=function(t,e){for(var n=[],i={width:0,text:""},r=0,a=t.length;r<a;++r)if("¶"!==t[r]){var s=(i.text?i.text+" ":"")+t[r],o=Yu(s);(i.width+o)/2<e?(i.width=o,i.text=s):(n.push(i),i={width:Yu(t[r]),text:t[r]})}else i.text&&n.push(i),i={width:0,text:""};return i.text&&n.push(i),n},Ku={},Qu={};function Zu(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function th(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 eh(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function nh(t){var e,n=t.getUTCHours(),i=t.getUTCMinutes(),r=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+eh(-e,6):e>9999?"+"+eh(e,6):eh(e,4))+"-"+eh(t.getUTCMonth()+1,2)+"-"+eh(t.getUTCDate(),2)+(a?"T"+eh(n,2)+":"+eh(i,2)+":"+eh(r,2)+"."+eh(a,3)+"Z":r?"T"+eh(n,2)+":"+eh(i,2)+":"+eh(r,2)+"Z":i||n?"T"+eh(n,2)+":"+eh(i,2)+"Z":"")}function ih(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],a=t.length,s=0,o=0,l=a<=0,c=!1;function u(){if(l)return Qu;if(c)return c=!1,Ku;var e,i,r=s;if(34===t.charCodeAt(r)){for(;s++<a&&34!==t.charCodeAt(s)||34===t.charCodeAt(++s););return(e=s)>=a?l=!0:10===(i=t.charCodeAt(s++))?c=!0:13===i&&(c=!0,10===t.charCodeAt(s)&&++s),t.slice(r+1,e-1).replace(/""/g,'"')}for(;s<a;){if(10===(i=t.charCodeAt(e=s++)))c=!0;else if(13===i)c=!0,10===t.charCodeAt(s)&&++s;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())!==Qu;){for(var h=[];i!==Ku&&i!==Qu;)h.push(i),i=u();e&&null==(h=e(h,o++))||r.push(h)}return r}function r(e,n){return e.map((function(e){return n.map((function(t){return s(e[t])})).join(t)}))}function a(e){return e.map(s).join(t)}function s(t){return null==t?"":t instanceof Date?nh(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=Zu(t);return function(i,r){return e(n(i),r,t)}}(t,e):Zu(t)}));return a.columns=r||[],a},parseRows:i,format:function(e,n){return null==n&&(n=th(e)),[n.map(s).join(t)].concat(r(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=th(t)),r(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:s}}var rh=ih(","),ah=rh.parse,sh=rh.parseRows,oh=(rh.format,rh.formatBody,rh.formatRows,rh.formatRow,rh.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, , , ")}),lh=function(t){var e=new Map;return sh(t.trim(),(function(t,n){t.forEach((function(t,i){(t=t.trim())&&e.set(t,[i,n])}))})),e},ch=function(t,e){return Array.from(t,(function(t){var n=Yn(t,2),i=n[0],r=Yn(n[1],2),a=r[0],s=r[1],o=e.Geometries.geoJSONs.nutsrg.find((function(t){return t.properties.id==i}));return{id:i,col:a,row:s,properties:{id:i,name:o?o.properties.na:""}}}))},uh=function(t,e,n){var i=Math.max.apply(Math,y(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,y(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,s=n.gridCartogramCellPadding_||0,o=(n.width_-a.left-a.right)/i-s,l=(n.height_-a.top-a.bottom)/r-s,c=Math.min(o,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+s)+a.left,", ").concat(t.row*(c+s)+a.top,")")})).each((function(t){Ft(this).append("rect").attr("width",c).attr("height",c).attr("class","em-grid-rect"),Ft(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)}))},hh=function(t,e,n){var i=Math.max.apply(Math,y(e.map((function(t){return t.col}))))+1,r=Math.max.apply(Math,y(e.map((function(t){return t.row}))))+1,a=n.gridCartogramMargins_,s=n.gridCartogramCellPadding_||0,o=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)*o;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*o+s)+a.left,n=t.row*(l+s)+(t.col%2==1?(l+s)/2:0)+a.top;return"translate(".concat(e,", ").concat(n,")")})).each((function(t){Ft(this).append("path").attr("d",fh(o)).attr("class","em-grid-hexagon"),Ft(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)}))},fh=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"},ph=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,s=(n-i.top-i.bottom-r.height)/2-r.y+i.top;t.attr("transform","translate(".concat(a,", ").concat(s,")"))}))};function dh(t){return[Mi(t[1],t[0]),Ni(t[2])]}function gh(t){var e=t[0],n=t[1],i=Ei(n);return[i*Ei(e),i*ki(e),ki(n)]}function _h(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function mh(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 yh(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vh(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xh(t){var e=Pi(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function bh(t){return wi(t[0])<=_i?t[0]:Ti(t[0])*((wi(t[0])+_i)%vi-_i)}function wh(t,e,n,i){return function(r){var a,s,o,l=e(r),c=Li(),u=e(c),h=!1,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=m,f.lineStart=y,f.lineEnd=v,s=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,s=Ii(s);var t=function(t,e){var n=bh(e),i=e[1],r=ki(i),a=[ki(n),-Ei(n),0],s=0,o=0,l=new lr;1===r?i=mi+di:-1===r&&(i=-mi-di);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=bh(p),g=p[1]/2+yi,_=ki(g),m=Ei(g),y=0;y<f;++y,d=x,_=w,m=S,p=v){var v=h[y],x=bh(v),b=v[1]/2+yi,w=ki(b),S=Ei(b),M=x-d,E=M>=0?1:-1,A=E*M,C=A>_i,k=_*w;if(l.add(Mi(k*E*ki(A),m*S+k*Ei(A))),s+=C?M+E*vi:M,C^d>=n^x>=n){var T=mh(gh(p),gh(v));xh(T);var P=mh(a,T);xh(P);var N=(C^M>=0?-1:1)*Ni(P[2]);(i>N||i===N&&(T[0]||T[1]))&&(o+=C^M>=0?1:-1)}}return(s<-di||s<di&&l<-1e-12)^1&o}(a,i);s.length?(h||(r.polygonStart(),h=!0),Di(s,Mh,t,n,r)):t&&(h||(r.polygonStart(),h=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),h&&(r.polygonEnd(),h=!1),s=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){o.push([t,e]),u.point(t,e)}function y(){u.lineStart(),o=[]}function v(){m(o[0][0],o[0][1]),u.lineEnd();var t,e,n,i,l=u.clean(),f=c.result(),p=f.length;if(o.pop(),a.push(o),o=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())),s.push(f.filter(Sh))}return f}}function Sh(t){return t.length>1}function Mh(t,e){return((t=t.x)[0]<0?t[1]-mi-di:mi-t[1])-((e=e.x)[0]<0?e[1]-mi-di:mi-e[1])}const Eh=wh((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,s){var o=a>0?_i:-_i,l=wi(a-n);wi(l-_i)<di?(t.point(n,i=(i+s)/2>0?mi:-mi),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(o,i),t.point(a,i),e=0):r!==o&&l>=_i&&(wi(n-r)<di&&(n-=r*di),wi(a-o)<di&&(a-=o*di),i=function(t,e,n,i){var r,a,s=ki(t-n);return wi(s)>di?Si((ki(e)*(a=Ei(i))*ki(n)-ki(i)*(r=Ei(e))*ki(t))/(r*a*s)):(e+i)/2}(n,i,a,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(o,i),e=0),t.point(n=a,i=s),r=o},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*mi,i.point(-_i,r),i.point(0,r),i.point(_i,r),i.point(_i,0),i.point(_i,-r),i.point(0,-r),i.point(-_i,-r),i.point(-_i,0),i.point(-_i,r);else if(wi(t[0]-e[0])>di){var a=t[0]<e[0]?_i:-_i;r=n*a/2,i.point(-a,r),i.point(0,r),i.point(a,r)}else i.point(e[0],e[1])}),[-_i,-mi]);function Ah(t,e,n,i,r,a){if(n){var s=Ei(e),o=ki(e),l=i*n;null==r?(r=e+i*vi,a=e-l/2):(r=Ch(s,r),a=Ch(s,a),(i>0?r<a:r>a)&&(r+=i*vi));for(var c,u=r;i>0?u>a:u<a;u-=l)c=dh([s,-o*Ei(u),-o*ki(u)]),t.point(c[0],c[1])}}function Ch(t,e){(e=gh(e))[0]-=t,xh(e);var n=function(t){return t>1?0:t<-1?_i:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+vi-di)%vi}function kh(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 Th(t,e){return wi(t)>_i&&(t-=Math.round(t/vi)*vi),[t,e]}function Ph(t,e,n){return(t%=vi)?e||n?kh(Fh(t),Lh(e,n)):Fh(t):e||n?Lh(e,n):Th}function Nh(t){return function(e,n){return wi(e+=t)>_i&&(e-=Math.round(e/vi)*vi),[e,n]}}function Fh(t){var e=Nh(t);return e.invert=Nh(-t),e}function Lh(t,e){var n=Ei(t),i=ki(t),r=Ei(e),a=ki(e);function s(t,e){var s=Ei(e),o=Ei(t)*s,l=ki(t)*s,c=ki(e),u=c*n+o*i;return[Mi(l*r-u*a,o*n-c*i),Ni(u*r+l*a)]}return s.invert=function(t,e){var s=Ei(e),o=Ei(t)*s,l=ki(t)*s,c=ki(e),u=c*r-l*a;return[Mi(l*r+c*a,o*n+u*i),Ni(u*n-o*i)]},s}Th.invert=Th;var Gh=Ei(30*bi);function Oh(t,e){return+e?function(t,e){function n(i,r,a,s,o,l,c,u,h,f,p,d,g,_){var m=c-i,y=u-r,v=m*m+y*y;if(v>4*e&&g--){var x=s+f,b=o+p,w=l+d,S=Pi(x*x+b*b+w*w),M=Ni(w/=S),E=wi(wi(w)-1)<di||wi(a-h)<di?(a+h)/2:Mi(b,x),A=t(E,M),C=A[0],k=A[1],T=C-i,P=k-r,N=y*T-m*P;(N*N/v>e||wi((m*T+y*P)/v-.5)>.3||s*f+o*p+l*d<Gh)&&(n(i,r,a,s,o,l,C,k,E,x/=S,b/=S,w,g,_),_.point(C,k),n(C,k,E,x,b,w,c,u,h,f,p,d,g,_))}}return function(e){var i,r,a,s,o,l,c,u,h,f,p,d,g={point:_,lineStart:m,lineEnd:v,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=y,e.lineStart()}function y(i,r){var a=gh([i,r]),s=t(i,r);n(u,h,c,f,p,d,u=s[0],h=s[1],c=i,f=a[0],p=a[1],d=a[2],16,e),e.point(u,h)}function v(){g.point=_,e.lineEnd()}function x(){m(),g.point=b,g.lineEnd=w}function b(t,e){y(i=t,e),r=u,a=h,s=f,o=p,l=d,g.point=y}function w(){n(u,h,c,f,p,d,r,a,i,s,o,l,16,e),g.lineEnd=v,v()}return g}}(t,e):function(t){return Ui({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Dh,zh=Ui({point:function(t,e){this.stream.point(t*bi,e*bi)}});function Ih(t,e,n,i,r,a){if(!a)return function(t,e,n,i,r){function a(a,s){return[e+t*(a*=i),n-t*(s*=r)]}return a.invert=function(a,s){return[(a-e)/t*i,(n-s)/t*r]},a}(t,e,n,i,r);var s=Ei(a),o=ki(a),l=s*t,c=o*t,u=s/t,h=o/t,f=(o*n-s*e)/t,p=(o*e+s*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 Rh(t){return function(t){var e,n,i,r,a,s,o,l,c,u,h=150,f=480,p=250,d=0,g=0,_=0,m=0,y=0,v=0,x=1,b=1,w=null,S=Eh,M=null,E=Bi,A=.5;function C(t){return l(t[0]*bi,t[1]*bi)}function k(t){return(t=l.invert(t[0],t[1]))&&[t[0]*xi,t[1]*xi]}function T(){var t=Ih(h,0,0,x,b,v).apply(null,e(d,g)),i=Ih(h,f-t[0],p-t[1],x,b,v);return n=Ph(_,m,y),o=kh(e,i),l=kh(n,o),s=Oh(o,A),P()}function P(){return c=u=null,C}return C.stream=function(t){return c&&u===t?c:c=zh(function(t){return Ui({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(S(s(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=Ei(t),n=2*bi,i=e>0,r=wi(e)>di;function a(t,n){return Ei(t)*Ei(n)>e}function s(t,n,i){var r=[1,0,0],a=mh(gh(t),gh(n)),s=_h(a,a),o=a[0],l=s-o*o;if(!l)return!i&&t;var c=e*s/l,u=-e*o/l,h=mh(r,a),f=vh(r,c);yh(f,vh(a,u));var p=h,d=_h(f,p),g=_h(p,p),_=d*d-g*(_h(f,f)-1);if(!(_<0)){var m=Pi(_),y=vh(p,(-d-m)/g);if(yh(y,f),y=dh(y),!i)return y;var v,x=t[0],b=n[0],w=t[1],S=n[1];b<x&&(v=x,x=b,b=v);var M=b-x,E=wi(M-_i)<di;if(!E&&S<w&&(v=w,w=S,S=v),E||M<di?E?w+S>0^y[1]<(wi(y[0]-x)<di?w:S):w<=y[1]&&y[1]<=S:M>_i^(x<=y[0]&&y[0]<=b)){var A=vh(p,(-d+m)/g);return yh(A,f),[y,dh(A)]}}}function o(e,n){var r=i?t:_i-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return wh(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:o(h,f):g?o(h+(h<0?_i:-_i),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(p=s(e,d))||Gi(e,p)||Gi(d,p))&&(d[2]=1),g!==l)u=0,g?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(r&&e&&i^g){var m;_&n||!(m=s(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&&Gi(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){Ah(a,t,n,r,e,i)}),i?[0,-t]:[-_i,t-_i])}(w=t*bi):(w=null,Eh),P()):w*xi},C.clipExtent=function(t){return arguments.length?(E=null==t?(M=i=r=a=null,Bi):qi(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,T()):h},C.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],T()):[f,p]},C.center=function(t){return arguments.length?(d=t[0]%360*bi,g=t[1]%360*bi,T()):[d*xi,g*xi]},C.rotate=function(t){return arguments.length?(_=t[0]%360*bi,m=t[1]%360*bi,y=t.length>2?t[2]%360*bi:0,T()):[_*xi,m*xi,y*xi]},C.angle=function(t){return arguments.length?(v=t%360*bi,T()):v*xi},C.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},C.reflectY=function(t){return arguments.length?(b=t?-1:1,T()):b<0},C.precision=function(t){return arguments.length?(s=Oh(o,A=t*t),P()):Pi(A)},C.fitExtent=function(t,e){return rr(C,t,e)},C.fitSize=function(t,e){return ar(C,t,e)},C.fitWidth=function(t,e){return sr(C,t,e)},C.fitHeight=function(t,e){return or(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&k,T()}}((function(){return t}))()}function jh(t,e){return[Ei(e)*ki(t),ki(e)]}jh.invert=(Dh=Ni,function(t,e){var n=Pi(t*t+e*e),i=Dh(n),r=ki(i),a=Ei(i);return[Mi(t*r,n*a),Ni(n&&e*r/n)]});var qh=6378137,Bh=.0066943799901413165,Uh=484813681109536e-20,Wh=Math.PI/2,Hh=1e-10,Vh=.017453292519943295,$h=57.29577951308232,Yh=Math.PI/4,Jh=2*Math.PI,Xh=3.14159265359,Kh={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 Qh={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 Zh=/[\s_\-\/\(\)]/g;function tf(t,e){if(t[e])return t[e];for(var n,i=Object.keys(t),r=e.toLowerCase().replace(Zh,""),a=-1;++a<i.length;)if((n=i[a]).toLowerCase().replace(Zh,"")===r)return t[n]}function ef(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}),{}),s={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*Vh},lat_1:function(t){r.lat1=t*Vh},lat_2:function(t){r.lat2=t*Vh},lat_ts:function(t){r.lat_ts=t*Vh},lon_0:function(t){r.long0=t*Vh},lon_1:function(t){r.long1=t*Vh},lon_2:function(t){r.long2=t*Vh},alpha:function(t){r.alpha=parseFloat(t)*Vh},gamma:function(t){r.rectified_grid_angle=parseFloat(t)*Vh},lonc:function(t){r.longc=t*Vh},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=tf(Qh,t);e&&(r.to_meter=e.to_meter)},from_greenwich:function(t){r.from_greenwich=t*Vh},pm:function(t){var e=tf(Kh,t);r.from_greenwich=(e||parseFloat(t))*Vh},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 s?"function"==typeof(i=s[e])?i(n):r[i]=n:r[e]=n;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r}const nf=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,s=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:e,direction:n,unit:this.convertUnit(s),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 s=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));s&&(e.ellipsoid=this.convert(s)),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 o=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(o){const t=o.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 rf=class extends nf{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 af=class extends nf{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 sf(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?af:rf).convert(t)}const of=function(t){var e=new df(t);return e.output()};var lf=1,cf=/\s/,uf=/[A-Za-z]/,hf=/[A-Za-z84_]/,ff=/[,\]]/,pf=/[\d\.E\-\+]/;function df(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=lf}function gf(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var i=e?{}:t,r=n.reduce((function(t,e){return _f(e,t),t}),i);e&&(t[e]=r)}function _f(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 _f(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&&_f(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&_f(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 gf(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]],gf(e,n,t),void(e[n].type=n);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return _f(t,e[n]);return gf(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}df.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;cf.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case lf: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}},df.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(ff.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)},df.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lf)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lf,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},df.prototype.number=function(t){if(!pf.test(t)){if(ff.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},df.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},df.prototype.keyword=function(t){if(hf.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=lf)}if(!ff.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},df.prototype.neutral=function(t){if(uf.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(pf.test(t))return this.word=t,void(this.state=3);if(!ff.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},df.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 mf(t){return.017453292519943295*t}function yf(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=mf(t.lat0>0?90:-90),delete t.lat1):(t.lat0=mf(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function vf(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 xf(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function bf(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=xf(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-xf(t.ellipsoid.semi_minor_axis))))}function wf(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(wf(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,bf(i,e)),i.prime_meridian&&(e.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=i.name,bf(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}=vf(i.unit);e.units=t,e.to_meter=n}else if(i.axis[0]&&i.axis[0].unit){const{units:t,to_meter:n}=vf(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":wf(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),yf(e),e):t}var Sf=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Mf(t){for(var e=Object.keys(t),n=0,i=e.length;n<i;++n){var r=e[n];-1!==Sf.indexOf(r)&&Ef(t[r]),"object"==typeof t[r]&&Mf(t[r])}}function Ef(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 s=t.GEOGCS;function o(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(s=t),s&&(s.DATUM?t.datumCode=s.DATUM.name.toLowerCase():t.datumCode=s.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"),s.DATUM&&s.DATUM.SPHEROID&&(t.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=s.DATUM.SPHEROID.a,t.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(t.datum_params=s.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=mf(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",mf],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",mf],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",mf],["lat0","latitude_of_origin",mf],["lat0","standard_parallel_1",mf],["lat1","standard_parallel_1",mf],["lat2","standard_parallel_2",mf],["azimuth","Azimuth"],["alpha","azimuth",mf],["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)})),yf(t)}function Af(t){if("object"==typeof t)return wf(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=of(t);if("WKT2"===e){return wf(sf(n))}var i=n[0],r={};return _f(n,r),Mf(r),r[i]}function Cf(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?Cf[t]=ef(arguments[1]):Cf[t]=Af(arguments[1]):Cf[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?Cf.apply(e,t):Cf(t)}));if("string"==typeof t){if(t in Cf)return Cf[t]}else"EPSG"in t?Cf["EPSG:"+t.EPSG]=t:"ESRI"in t?Cf["ESRI:"+t.ESRI]=t:"IAU2000"in t?Cf["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"]}(Cf);const kf=Cf;var Tf=["3857","900913","3785","102113"];const Pf=function(t){if(!function(t){return"string"==typeof t}(t))return t.projName?t:Af(t);if(function(t){return t in kf}(t))return kf[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=Af(t);if(function(t){var e=tf(t,"authority");if(e){var n=tf(e,"epsg");return n&&Tf.indexOf(n)>-1}}(e))return kf["EPSG:3857"];var n=function(t){var e=tf(t,"extension");if(e)return tf(e,"proj4")}(e);return n?ef(n):e}return function(t){return"+"===t[0]}(t)?ef(t):void 0};function Nf(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 Ff(t,e,n){var i=t*e;return n/Math.sqrt(1-i*i)}function Lf(t){return t<0?-1:1}function Gf(t){return Math.abs(t)<=Xh?t:t-Lf(t)*Jh}function Of(t,e,n){var i=t*n,r=.5*t;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(Wh-e))/i}function Df(t,e){for(var n,i,r=.5*t,a=Wh-2*Math.atan(e),s=0;s<=15;s++)if(n=t*Math.sin(a),a+=i=Wh-2*Math.atan(e*Math.pow((1-n)/(1+n),r))-a,Math.abs(i)<=1e-10)return a;return-9999}const zf={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=Ff(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*$h>90&&r*$h<-90&&i*$h>180&&i*$h<-180)return null;if(Math.abs(Math.abs(r)-Wh)<=Hh)return null;if(this.sphere)e=this.x0+this.a*this.k0*Gf(i-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(Yh+.5*r));else{var a=Math.sin(r),s=Of(this.e,r,a);e=this.x0+this.a*this.k0*Gf(i-this.long0),n=this.y0-this.a*this.k0*Math.log(s)}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=Wh-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(-9999===(n=Df(this.e,a)))return null}return e=Gf(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 If(t){return t}var Rf=[zf,{init:function(){},forward:If,inverse:If,names:["longlat","identity"]}],jf={},qf=[];function Bf(t,e){var n=qf.length;return t.names?(qf[n]=t,t.names.forEach((function(t){jf[t.toLowerCase()]=n})),this):(console.log(e),!0)}function Uf(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const Wf={start:function(){Rf.forEach(Bf)},add:Bf,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==jf[e]&&qf[jf[e]]||(e=Uf(e))in jf&&qf[jf[e]]?qf[jf[e]]:void 0}};const Hf={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)"}},Vf=Hf.WGS84;var $f={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 Yf in $f){var Jf=$f[Yf];Jf.datumName&&($f[Jf.datumName]=Jf)}const Xf=$f;const Kf=function(t,e,n,i,r,a,s){var o={};return o.datum_type=void 0===t||"none"===t?5:4,e&&(o.datum_params=e.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=Uh,o.datum_params[4]*=Uh,o.datum_params[5]*=Uh,o.datum_params[6]=o.datum_params[6]/1e6+1))),s&&(o.datum_type=3,o.grids=s),o.a=n,o.b=i,o.es=r,o.ep2=a,o};var Qf={};async function Zf(t,e){for(var n=[],i=await e.getImageCount(),r=i-1;r>=0;r--){var a=await e.getImage(r),s=await a.readRasters(),o=[a.getWidth(),a.getHeight()],l=a.getBoundingBox().map(ep),c=[a.fileDirectory.ModelPixelScale[0],a.fileDirectory.ModelPixelScale[1]].map(ep),u=l[0]+(o[0]-1)*c[0],h=l[3]-(o[1]-1)*c[1],f=s[0],p=s[1],d=[];for(let t=o[1]-1;t>=0;t--)for(let e=o[0]-1;e>=0;e--){var g=t*o[0]+e;d.push([-np(p[g]),np(f[g])])}n.push({del:c,lim:o,ll:[-u,h],cvs:d})}var _={header:{nSubgrids:i},subgrids:n};return Qf[t]=_,_}function tp(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:Qf[t]||null,isNull:!1}}function ep(t){return t*Math.PI/180}function np(t){return t/3600*Math.PI/180}function ip(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function rp(t){return t.map((function(t){return[np(t.longitudeShift),np(t.latitudeShift)]}))}function ap(t,e,n){return{name:ip(t,e+8,e+16).trim(),parent:ip(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 sp(t,e,n,i,r){var a=e+176,s=16;!1===r&&(s=8);for(var o=[],l=0;l<n.gridNodeCount;l++){var c={latitudeShift:t.getFloat32(a+l*s,i),longitudeShift:t.getFloat32(a+l*s+4,i)};!1!==r&&(c.latitudeAccuracy=t.getFloat32(a+l*s+8,i),c.longitudeAccuracy=t.getFloat32(a+l*s+12,i)),o.push(c)}return o}function op(t,e){if(!(this instanceof op))return new op(t);e=e||function(t){if(t)throw t};var n=Pf(t);if("object"==typeof n){var i=op.projections.get(n.projName);if(i){if(n.datumCode&&"none"!==n.datumCode){var r=tf(Xf,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=tf(Hf,i);a||(a=Vf),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<Hh)&&(r=!0,e=t),{a:t,b:e,rf:n,sphere:r}}(n.a,n.b,n.rf,n.ellps,n.sphere),s=function(t,e,n,i){var r=t*t,a=e*e,s=(r-a)/r,o=0;return i?(r=(t*=1-s*(.16666666666666666+s*(.04722222222222222+.022156084656084655*s)))*t,s=0):o=Math.sqrt(s),{es:s,e:o,ep2:(r-a)/a}}(a.a,a.b,a.rf,n.R_A),o=function(t){return void 0===t?null:t.split(",").map(tp)}(n.nadgrids),l=n.datum||Kf(n.datumCode,n.datum_params,a.a,a.b,s.es,s.ep2,o);Nf(this,n),Nf(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=s.es,this.e=s.e,this.ep2=s.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)}op.projections=Wf,op.projections.start();const lp=op;function cp(t,e,n){var i,r,a,s,o=t.x,l=t.y,c=t.z?t.z:0;if(l<-Wh&&l>-1.001*Wh)l=-Wh;else if(l>Wh&&l<1.001*Wh)l=Wh;else{if(l<-Wh)return{x:-1/0,y:-1/0,z:t.z};if(l>Wh)return{x:1/0,y:1/0,z:t.z}}return o>Math.PI&&(o-=2*Math.PI),r=Math.sin(l),s=Math.cos(l),a=r*r,{x:((i=n/Math.sqrt(1-e*a))+c)*s*Math.cos(o),y:(i+c)*s*Math.sin(o),z:(i*(1-e)+c)*r}}function up(t,e,n,i){var r,a,s,o,l,c,u,h,f,p,d,g,_,m,y,v=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<v){if(m=0,a/n<v)return y=-i,{x:t.x,y:t.y,z:t.z}}else m=Math.atan2(b,x);s=w/a,h=(o=r/a)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*o*o)),f=s*l,_=0;do{_++,c=e*(u=n/Math.sqrt(1-e*f*f))/(u+(y=r*h+w*f-u*(1-e*f*f))),g=(d=s*(l=1/Math.sqrt(1-c*(2-c)*o*o)))*h-(p=o*(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:y}}function hp(t){return 1===t||2===t}function fp(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!==pp(t,!1,n))return;i=qh,r=Bh}var a=e.a,s=e.b,o=e.es;if(3===e.datum_type&&(a=qh,s=6356752.314,o=Bh),r===o&&i===a&&!hp(t.datum_type)&&!hp(e.datum_type))return n;if((n=cp(n,r,i),hp(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],s=n[3],o=n[4],l=n[5],c=n[6];return{x:c*(t.x-l*t.y+o*t.z)+i,y:c*(l*t.x+t.y-s*t.z)+r,z:c*(-o*t.x+s*t.y+t.z)+a}}}(n,t.datum_type,t.datum_params)),hp(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],s=n[3],o=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-o*f,y:-l*u+h+s*f,z:o*u-s*h+f}}}(n,e.datum_type,e.datum_params)),n=up(n,o,a,s),3===e.datum_type)&&0!==pp(e,!0,n))return;return n}function pp(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 s=0;s<t.grids.length;s++){var o=t.grids[s];if(a.push(o.name),o.isNull){r=i;break}if(null!==o.grid)for(var l=o.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=dp(i,e,h),!isNaN(r.x)))break t}else if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*$h+" "+i.y*$h+" 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=Gf(r.x-Math.PI)+Math.PI;var a=gp(r,n);if(e){if(isNaN(a.x))return i;a.x=r.x-a.x,a.y=r.y-a.y;var s,o,l=9;do{if(o=gp(a,n),isNaN(o.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}s={x:r.x-(o.x+a.x),y:r.y-(o.y+a.y)},a.x+=s.x,a.y+=s.y}while(l--&&Math.abs(s.x)>1e-12&&Math.abs(s.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=Gf(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 gp(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),s=i.x-1*r,o=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=s*o,y=s*(1-o),v=(1-s)*(1-o),x=(1-s)*o;return l.x=v*c+y*h+x*g+m*p,l.y=v*u+y*f+x*_+m*d,l}function _p(t,e,n){var i,r,a,s=n.x,o=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=s,r=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(i=o,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 mp(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 yp(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)?mp(n):{x:n.x,y:n.y,z:n.z,m:n.m}).z;if(function(t){yp(t.x),yp(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 lp("WGS84"),n,i),t=r),i&&"enu"!==t.axis&&(n=_p(t,!1,n)),"longlat"===t.projName)n={x:n.x*Vh,y:n.y*Vh,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=fp(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*$h,y:n.y*$h,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?_p(e,!0,n):(n&&!a&&delete n.z,n)}var xp=lp("WGS84");function bp(t,e,n,i){var r,a,s;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===(s=Object.keys(n)).length||s.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 wp(t){return t instanceof lp?t:t.oProj?t.oProj:lp(t)}const Sp=function(t,e,n){t=wp(t);var i,r=!1;return void 0===e?(e=t,t=xp,r=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=xp,r=!0),e=wp(e),n?bp(t,e,n):(i={forward:function(n,i){return bp(t,e,n,i)},inverse:function(n,i){return bp(e,t,n,i)}},r&&(i.oProj=e),i)};var Mp="AJSAJS",Ep="AFAFAF",Ap=65,Cp=73,kp=79,Tp=86,Pp=90;const Np={forward:Fp,inverse:function(t){var e=Dp(Rp(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,s=t.zoneNumber,o=Ip(s),l=Math.floor(r/1e5),c=Math.floor(a/1e5)%20,function(t,e,n){var i=n-1,r=Mp.charCodeAt(i),a=Ep.charCodeAt(i),s=r+t-1,o=a+e,l=!1;return s>Pp&&(s=s-Pp+Ap-1,l=!0),(s===Cp||r<Cp&&s>Cp||(s>Cp||r<Cp)&&l)&&s++,(s===kp||r<kp&&s>kp||(s>kp||r<kp)&&l)&&++s===Cp&&s++,s>Pp&&(s=s-Pp+Ap-1),o>Tp?(o=o-Tp+Ap-1,l=!0):l=!1,(o===Cp||a<Cp&&o>Cp||(o>Cp||a<Cp)&&l)&&o++,(o===kp||a<kp&&o>kp||(o>kp||a<kp)&&l)&&++o===Cp&&o++,o>Tp&&(o=o-Tp+Ap-1),String.fromCharCode(s)+String.fromCharCode(o)}(l,c,o))+n.substr(n.length-5,e)+i.substr(i.length-5,e);var r,a,s,o,l,c}(function(t){var e,n,i,r,a,s,o,l,c=t.lat,u=t.lon,h=6378137,f=.00669438,p=.9996,d=Gp(c),g=Gp(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));o=Gp(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-o),s=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*(s+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:zp(c)}}({lat:t[1],lon:t[0]}),e)}function Lp(t){var e=Dp(Rp(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Gp(t){return t*(Math.PI/180)}function Op(t){return t/Math.PI*180}function Dp(t){var e=t.northing,n=t.easting,i=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var a,s,o,l,c,u,h,f,p,d=.9996,g=6378137,_=.00669438,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=n-5e5,v=e;i<"N"&&(v-=1e7),h=6*(r-1)-180+3,a=.006739496752268451,p=(f=v/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),s=g/Math.sqrt(1-_*Math.sin(p)*Math.sin(p)),o=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=y/(s*d);var x=p-s*Math.tan(p)/c*(u*u/2-(5+3*o+10*l-4*l*l-9*a)*u*u*u*u/24+(61+90*o+298*l+45*o*o-1.6983531815716497-3*l*l)*u*u*u*u*u*u/720);x=Op(x);var b,w=(u-(1+2*o+l)*u*u*u/6+(5-2*l+28*o-3*l*l+8*a+24*o*o)*u*u*u*u*u/120)/Math.cos(p);if(w=h+Op(w),t.accuracy){var S=Dp({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 zp(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 Ip(t){var e=t%6;return 0===e&&(e=6),e}function Rp(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 s=parseInt(r,10);if(0===a||a+3>n)throw"MGRSPoint bad conversion from: "+t;var o=t.charAt(a++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+t;i=t.substring(a,a+=2);for(var l=Ip(s),c=function(t,e){var n=Mp.charCodeAt(e-1),i=1e5,r=!1;for(;n!==t.charCodeAt(0);){if(++n===Cp&&n++,n===kp&&n++,n>Pp){if(r)throw"Bad character: "+t;n=Ap,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=Ep.charCodeAt(e-1),i=0,r=!1;for(;n!==t.charCodeAt(0);){if(++n===Cp&&n++,n===kp&&n++,n>Tp){if(r)throw"Bad character: "+t;n=Ap,r=!0}i+=1e5}return i}(i.charAt(1),l);u<jp(o);)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:o,zoneNumber:s,accuracy:f}}function jp(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 qp(t,e,n){if(!(this instanceof qp))return new qp(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")}qp.fromMGRS=function(t){return new qp(Lp(t))},qp.prototype.toMGRS=function(t){return Fp([this.x,this.y],t)};const Bp=qp;var Up=.046875,Wp=.01953125,Hp=.01068115234375;function Vp(t){var e=[];e[0]=1-t*(.25+t*(Up+t*(Wp+t*Hp))),e[1]=t*(.75-t*(Up+t*(Wp+t*Hp)));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 $p(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 Yp(t,e,n){for(var i=1/(1-e),r=t,a=20;a;--a){var s=Math.sin(r),o=1-e*s*s;if(r-=o=($p(r,s,Math.cos(r),n)-t)*(o*Math.sqrt(o))*i,Math.abs(o)<Hh)return r}return r}const Jp={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=Vp(this.es),this.ml0=$p(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,s=Gf(r-this.long0),o=Math.sin(a),l=Math.cos(a);if(this.es){var c=l*s,u=Math.pow(c,2),h=this.ep2*Math.pow(l,2),f=Math.pow(h,2),p=Math.abs(l)>Hh?Math.tan(a):0,d=Math.pow(p,2),g=Math.pow(d,2);e=1-this.es*Math.pow(o,2),c/=Math.sqrt(e);var _=$p(a,o,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+o*s*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(s);if(Math.abs(Math.abs(m)-1)<Hh)return 93;if(n=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,i=l*Math.cos(s)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(i))>=1){if(m-1>Hh)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),s=(t.y-this.y0)*(1/this.a);if(this.es)if(n=Yp(e=this.ml0+s/this.k0,this.es,this.en),Math.abs(n)<Wh){var o=Math.sin(n),l=Math.cos(n),c=Math.abs(l)>Hh?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(o,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=Gf(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=Wh*Lf(s),r=0;else{var _=Math.exp(a/this.k0),m=.5*(_-1/_),y=this.lat0+s/this.k0,v=Math.cos(y);e=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(m,2))),i=Math.asin(e),s<0&&(i=-i),r=0===m&&0===v?0:Gf(Math.atan2(m,v)+this.long0)}return t.x=r,t.y=i,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Xp(t){var e=Math.exp(t);return e=(e-1/e)/2}function Kp(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 Qp(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/(Kp(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],s=0;--r>=0;)n=i*a-s+t[r],s=a,a=n;return e+n*Math.sin(2*e)}function td(t,e,n){for(var i,r,a=Math.sin(e),s=Math.cos(e),o=Xp(n),l=function(t){var e=Math.exp(t);return(e+1/e)/2}(n),c=2*s*l,u=-2*a*o,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=s*o)*g,c*g+u*f]}const ed={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&&(Jp.init.apply(this),this.forward=Jp.forward,this.inverse=Jp.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],s=0;--r>=0;)n=i*a-s+t[r],s=a,a=n;return Math.sin(e)*n}(this.gtu,2*i))},forward:function(t){var e=Gf(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),s=Math.cos(e);n=Math.atan2(i,s*r),e=Math.atan2(a*r,Kp(i,r*s)),e=Qp(Math.tan(e));var o,l,c=td(this.gtu,2*n,2*e);return n+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(o=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*n+this.Zb)+this.y0):(o=1/0,l=1/0),t.x=o,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=td(this.utg,2*r,2*i);r+=a[0],i+=a[1],i=Math.atan(Xp(i));var s=Math.sin(r),o=Math.cos(r),l=Math.sin(i),c=Math.cos(i);r=Math.atan2(s*c,Kp(l,c*o)),e=Gf((i=Math.atan2(l,c*o))+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 nd={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(Gf(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)*Vh,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ed.init.apply(this),this.forward=ed.forward,this.inverse=ed.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function id(t,e){return Math.pow((1-t)/(1+t),e)}const rd={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+Yh)/(Math.pow(Math.tan(.5*this.lat0+Yh),this.C)*id(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+Yh),this.C)*id(this.e*Math.sin(n),this.ratexp))-Wh,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+Yh)/this.K,1/this.C),r=20;r>0&&(n=2*Math.atan(i*id(this.e*Math.sin(t.y),-.5*this.e))-Wh,!(Math.abs(n-t.y)<1e-14));--r)t.y=n;return r?(t.x=e,t.y=n,t):null},names:["gauss"]};const ad={init:function(){rd.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=Gf(t.x-this.long0),rd.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=Kp(t.x,t.y)){var s=2*Math.atan2(a,this.R2);e=Math.sin(s),n=Math.cos(s),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,rd.inverse.apply(this,[t]),t.x=Gf(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};const sd={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)<=Hh&&(this.k0=.5*(1+Lf(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Hh&&(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)<=Hh&&Math.abs(Math.cos(this.lat_ts))>Hh&&(this.k0=.5*this.cons*Ff(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Of(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ff(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Wh,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,i,r,a,s,o=t.x,l=t.y,c=Math.sin(l),u=Math.cos(l),h=Gf(o-this.long0);return Math.abs(Math.abs(o-this.long0)-Math.PI)<=Hh&&Math.abs(l+this.lat0)<=Hh?(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))-Wh,r=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=Hh?(a=Of(this.e,l*this.con,this.con*c),s=2*this.a*this.k0*a/this.cons,t.x=this.x0+s*Math.sin(o-this.long0),t.y=this.y0-this.con*s*Math.cos(o-this.long0),t):(Math.abs(this.sinlat0)<Hh?(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 s=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var o=2*Math.atan(s/(2*this.a*this.k0));return e=this.long0,n=this.lat0,s<=Hh?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(o)*this.sinlat0+t.y*Math.sin(o)*this.coslat0/s),e=Math.abs(this.coslat0)<Hh?this.lat0>0?Gf(this.long0+Math.atan2(t.x,-1*t.y)):Gf(this.long0+Math.atan2(t.x,t.y)):Gf(this.long0+Math.atan2(t.x*Math.sin(o),s*this.coslat0*Math.cos(o)-t.y*this.sinlat0*Math.sin(o))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=Hh){if(s<=Hh)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,i=s*this.cons/(2*this.a*this.k0),n=this.con*Df(this.e,i),e=this.con*Gf(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,s<=Hh?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/s),e=Gf(this.long0+Math.atan2(t.x*Math.sin(r),s*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),n=-1*Df(this.e,Math.tan(.5*(Wh+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*(Wh+t))*Math.pow((1-e)/(1+e),.5*n)}};const od={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 s=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+a*e)/(1-a*e));this.K=s-this.alpha*o+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),s=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),o=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(o))/(1-Math.sin(o)))+this.y0,t.x=this.R*s+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)),s=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),o=this.lambda0+s/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=o,t.y=c,t},names:["somerc"]};var ld=1e-7;const cd={init:function(){var t,e,n,i,r,a,s,o,l,c,u,h,f,p,d=0,g=0,_=0,m=0,y=0,v=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(Uf(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,y=this.lat1,m=this.long2,v=this.lat2,Math.abs(y-v)<=ld||(t=Math.abs(y))<=ld||Math.abs(t-Wh)<=ld||Math.abs(Math.abs(this.lat0)-Wh)<=ld||Math.abs(Math.abs(v)-Wh)<=ld)throw new Error;var S=1-this.es;e=Math.sqrt(S),Math.abs(this.lat0)>Hh?(o=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*o*o,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(Of(this.e,this.lat0,o),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(Of(this.e,y,Math.sin(y)),this.B),s=Math.pow(Of(this.e,v,Math.sin(v)),this.B),r=this.E/a,l=(s-a)/(s+a),c=((c=this.E*this.E)-s*a)/(c+s*a),(t=_-m)<-Math.pi?m-=Jh:t>Math.pi&&(m+=Jh),this.lam0=Gf(.5*(_+m)-Math.atan(c*Math.tan(.5*this.B*(_-m))/l)/this.B),u=Math.atan(2*Math.sin(this.B*Gf(_-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(Yh-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(Yh+r))},forward:function(t){var e,n,i,r,a,s,o,l,c={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Wh)>Hh){if(e=.5*((a=this.E/Math.pow(Of(this.e,t.y,Math.sin(t.y)),this.B))-(s=1/a)),n=.5*(a+s),r=Math.sin(this.B*t.x),i=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(i)-1)<Hh)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*t.x),o=Math.abs(s)<ld?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+r*this.singam,s)}else l=t.y>0?this.v_pole_n:this.v_pole_s,o=this.ArB*t.y;return this.no_rot?(c.x=o,c.y=l):(o-=this.u_0,c.x=l*this.cosrot+o*this.sinrot,c.y=o*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,s,o,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),o=((s=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(o)-1)<Hh)l.x=0,l.y=o<0?-Wh:Wh;else{if(l.y=this.E/Math.sqrt((1+o)/(1-o)),l.y=Df(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-s*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 ud={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)<Hh)){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=Ff(this.e,e,n),r=Of(this.e,this.lat1,e),a=Math.sin(this.lat2),s=Math.cos(this.lat2),o=Ff(this.e,a,s),l=Of(this.e,this.lat2,a),c=Math.abs(Math.abs(this.lat0)-Wh)<Hh?0:Of(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Hh?this.ns=Math.log(i/o)/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)<=Hh&&(n=Lf(n)*(Wh-2e-10));var i,r,a=Math.abs(Math.abs(n)-Wh);if(a>Hh)i=Of(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 s=this.ns*Gf(e-this.long0);return t.x=this.k0*(r*Math.sin(s))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,t},inverse:function(t){var e,n,i,r,a,s=(t.x-this.x0)/this.k0,o=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(s*s+o*o),n=1):(e=-Math.sqrt(s*s+o*o),n=-1);var l=0;if(0!==e&&(l=Math.atan2(n*s,n*o)),0!==e||this.ns>0){if(n=1/this.ns,i=Math.pow(e/(this.a*this.f0),n),-9999===(r=Df(this.e,i)))return null}else r=-Wh;return a=Gf(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 hd={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,s,o,l=t.x,c=t.y,u=Gf(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)),s=this.n*a,o=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=o*Math.cos(s)/1,t.x=o*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,i,r,a,s,o,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,s=e,o=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(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-t.y)<1e-10&&(o=1),s=t.y,c+=1}while(0===o&&c<15);return c>=15?null:t},names:["Krovak","krovak"]};function fd(t,e,n,i,r){return t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}function pd(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function dd(t){return.375*t*(1+.25*t*(1+.46875*t))}function gd(t){return.05859375*t*t*(1+.75*t)}function _d(t){return t*t*t*(35/3072)}function md(t,e,n){var i=e*n;return t/Math.sqrt(1-i*i)}function yd(t){return Math.abs(t)<Wh?t:t-Lf(t)*Math.PI}function vd(t,e,n,i,r){var a,s;a=t/e;for(var o=0;o<15;o++)if(a+=s=(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(s)<=1e-10)return a;return NaN}const xd={init:function(){this.sphere||(this.e0=pd(this.es),this.e1=dd(this.es),this.e2=gd(this.es),this.e3=_d(this.es),this.ml0=this.a*fd(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Gf(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),s=Math.cos(r),o=md(this.a,this.e,a),l=Math.tan(r)*Math.tan(r),c=i*Math.cos(r),u=c*c,h=this.es*s*s/(1-this.es);e=o*c*(1-u*l*(1/6-(8-l+8*h)*u/120)),n=this.a*fd(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+o*a/s*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 s=vd(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-Wh)<=Hh)return t.x=this.long0,t.y=Wh,r<0&&(t.y*=-1),t;var o=md(this.a,this.e,Math.sin(s)),l=o*o*o/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),u=i*this.a/o,h=u*u;e=s-o*Math.tan(s)/l*u*u*(.5-(1+3*c)*u*u/24),n=u*(1-h*(c/3+(1+3*c)*c*h/15))/Math.cos(s)}return t.x=Gf(n+this.long0),t.y=yd(e),t},names:["Cassini","Cassini_Soldner","cass"]};function bd(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 wd=.3333333333333333,Sd=.17222222222222222,Md=.10257936507936508,Ed=.06388888888888888,Ad=.0664021164021164,Cd=.016415012942191543;const kd={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-Wh)<Hh?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<Hh?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=bd(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*wd,e=t*t,n[0]+=e*Sd,n[1]=e*Ed,e*=t,n[0]+=e*Md,n[1]+=e*Ad,n[2]=e*Cd,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=bd(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,s,o,l,c,u,h=t.x,f=t.y;if(h=Gf(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)<=Hh)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)<Hh)return null;n=Yh-.5*f,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(h),n*=i}}else{switch(o=0,l=0,c=0,i=Math.cos(h),r=Math.sin(h),a=Math.sin(f),s=bd(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(o=s/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:c=1+this.sinb1*o+this.cosb1*l*i;break;case this.EQUIT:c=1+l*i;break;case this.N_POLE:c=Wh+f,s=this.qp-s;break;case this.S_POLE:c=f-Wh,s=this.qp+s}if(Math.abs(c)<Hh)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*o-this.sinb1*l*i):(c=Math.sqrt(2/(1+l*i)))*o*this.ymf,e=this.xmf*c*l*r;break;case this.N_POLE:case this.S_POLE:s>=0?(e=(c=Math.sqrt(s))*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,s,o,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)<=Hh?0:Math.asin(c*f/u),l*=f,c=h*u;break;case this.OBLIQ:n=Math.abs(u)<=Hh?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=Wh-n;break;case this.S_POLE:n-=Wh}e=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,c):0}else{if(o=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,c*=this.dd,(s=Math.sqrt(l*l+c*c))<Hh)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*s/this.rq),i=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(o=i*this.sinb1+c*r*this.cosb1/s,a=this.qp*o,c=s*this.cosb1*i-c*this.sinb1*r):(o=c*r/s,a=this.qp*o,c=s*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;o=1-a/this.qp,this.mode===this.S_POLE&&(o=-o)}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(o),this.apa)}return t.x=Gf(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 Td(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const Pd={init:function(){Math.abs(this.lat1+this.lat2)<Hh||(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=Ff(this.e3,this.sin_po,this.cos_po),this.qs1=bd(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=Ff(this.e3,this.sin_po,this.cos_po),this.qs2=bd(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=bd(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Hh?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=bd(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,a=this.ns0*Gf(e-this.long0),s=r*Math.sin(a)+this.x0,o=this.rh-r*Math.cos(a)+this.y0;return t.x=s,t.y=o,t},inverse:function(t){var e,n,i,r,a,s;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?s=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,s=this.phi1z(this.e3,n)),a=Gf(r/this.ns0+this.long0),t.x=a,t.y=s,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,i,r,a,s=Td(.5*e);if(t<Hh)return s;for(var o=t*t,l=1;l<=25;l++)if(s+=a=.5*(r=1-(i=t*(n=Math.sin(s)))*i)*r/Math.cos(s)*(e/(1-o)-n/r+.5/t*Math.log((1-i)/(1+i))),Math.abs(a)<=1e-7)return s;return null}};const Nd={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,s,o,l=t.x,c=t.y;return i=Gf(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)<=Hh?(s=this.x0+1*this.a*n*Math.sin(i)/a,o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)/a):(s=this.x0+this.infinity_dist*n*Math.sin(i),o=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*r)),t.x=s,t.y=o,t},inverse:function(t){var e,n,i,r,a,s;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),s=Td((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=Gf(this.long0+a)):(s=this.phic0,a=0),t.x=a,t.y=s,t},names:["gnom"]};const Fd={init:function(){this.sphere||(this.k0=Ff(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=Gf(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 s=bd(this.e,Math.sin(r));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*s*.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=Gf(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*Wh:Wh;for(var i,r,a,s,o=Math.asin(.5*e),l=0;l<30;l++)if(r=Math.sin(o),a=Math.cos(o),s=t*r,o+=i=Math.pow(1-s*s,2)/(2*a)*(e/(1-t*t)-r/(1-s*s)+.5/t*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return o;return NaN}(this.e,2*t.y*this.k0/this.a),e=Gf(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};const Ld={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=Gf(e-this.long0),r=yd(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=Gf(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=yd(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const Gd={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pd(this.es),this.e1=dd(this.es),this.e2=gd(this.es),this.e3=_d(this.es),this.ml0=this.a*fd(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,i,r=t.x,a=t.y,s=Gf(r-this.long0);if(i=s*Math.sin(a),this.sphere)Math.abs(a)<=Hh?(e=this.a*s,n=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(a),n=this.a*(yd(a-this.lat0)+(1-Math.cos(i))/Math.tan(a)));else if(Math.abs(a)<=Hh)e=this.a*s,n=-1*this.ml0;else{var o=md(this.a,this.e,Math.sin(a))/Math.tan(a);e=o*Math.sin(i),n=this.a*fd(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+o*(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,s,o,l,c;if(i=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=Hh)e=Gf(i/this.a+this.long0),n=0;else{var u;for(s=this.lat0+r/this.a,o=i*i/this.a/this.a+s*s,l=s,a=20;a;--a)if(l+=c=-1*(s*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-s)/u-1),Math.abs(c)<=Hh){n=l;break}e=Gf(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=Hh)n=0,e=Gf(this.long0+i/this.a);else{var h,f,p,d,g;for(s=(this.ml0+r)/this.a,o=i*i/this.a/this.a+s*s,l=s,a=20;a;--a)if(g=this.e*Math.sin(l),h=Math.sqrt(1-g*g)*Math.tan(l),f=this.a*fd(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=(s*(h*(d=f/this.a)+1)-d-.5*h*(d*d+o))/(this.es*Math.sin(2*l)*(d*d+o-2*s*d)/(4*h)+(s-d)*(h*p-2/Math.sin(2*l))-p),Math.abs(c)<=Hh){n=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=Gf(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 Od={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/Uh*1e-5,s=r,o=1,l=0;for(e=1;e<=10;e++)o*=a,l+=this.A[e]*o;var c,u=l,h=s,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,s=(r-this.y0)/this.a,o=a/this.a,l=1,c=0,u=0,h=0;for(e=1;e<=6;e++)n=c*s+l*o,l=l*s-c*o,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,_=s,m=o;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 y=this.B_re[1],v=this.B_im[1];for(e=2;e<=6;e++)p=g*u+d*h,d=d*u-g*h,g=p,y+=e*(this.B_re[e]*d-this.B_im[e]*g),v+=e*(this.B_im[e]*d+this.B_re[e]*g);var x=y*y+v*v;u=(_*y+m*v)/x,h=(m*y-_*v)/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*Uh*1e5,A=this.long0+w;return t.x=A,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]};const Dd={init:function(){},forward:function(t){var e=t.x,n=t.y,i=Gf(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=Gf(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 zd={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=Vp(this.es)},forward:function(t){var e,n,i=t.x,r=t.y;if(i=Gf(i-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(r),s=20;s;--s){var o=(this.m*r+Math.sin(r)-a)/(this.m+Math.cos(r));if(r-=o,Math.abs(o)<Hh)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*$p(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=Td((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Td(Math.sin(e)/this.n)),n=Gf(n+this.long0),e=yd(e)):(e=Yp(t.y/this.a,this.es,this.en),(i=Math.abs(e))<Wh?(i=Math.sin(e),n=Gf(this.long0+t.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)))):i-Hh<Wh&&(n=this.long0)),t.x=n,t.y=e,t},names:["Sinusoidal","sinu"]};const Id={init:function(){},forward:function(t){for(var e=t.x,n=t.y,i=Gf(e-this.long0),r=n,a=Math.PI*Math.sin(n);;){var s=-(r+Math.sin(r)-a)/(1+Math.cos(r));if(r+=s,Math.abs(s)<Hh)break}r/=2,Math.PI/2-Math.abs(n)<Hh&&(i=0);var o=.900316316158*this.a*i*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return t.x=o,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=Gf(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 Rd={init:function(){Math.abs(this.lat1+this.lat2)<Hh||(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=pd(this.es),this.e1=dd(this.es),this.e2=gd(this.es),this.e3=_d(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ff(this.e,this.sinphi,this.cosphi),this.ml1=fd(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Hh?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ff(this.e,this.sinphi,this.cosphi),this.ml2=fd(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=fd(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=fd(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var a=this.ns*Gf(n-this.long0),s=this.x0+e*Math.sin(a),o=this.y0+this.rh-e*Math.cos(a);return t.x=s,t.y=o,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=Gf(this.long0+a/this.ns),i=yd(this.g-n/this.a),t.x=r,t.y=i,t):(i=vd(this.g-n/this.a,this.e0,this.e1,this.e2,this.e3),r=Gf(this.long0+a/this.ns),t.x=r,t.y=i,t)},names:["Equidistant_Conic","eqdc"]};const jd={init:function(){this.R=this.a},forward:function(t){var e,n,i=t.x,r=t.y,a=Gf(i-this.long0);Math.abs(r)<=Hh&&(e=this.x0+this.R*a,n=this.y0);var s=Td(2*Math.abs(r/Math.PI));(Math.abs(a)<=Hh||Math.abs(Math.abs(r)-Wh)<=Hh)&&(e=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*s):this.y0+Math.PI*this.R*-Math.tan(.5*s));var o=.5*Math.abs(Math.PI/a-a/Math.PI),l=o*o,c=Math.sin(s),u=Math.cos(s),h=u/(c+u-1),f=h*h,p=h*(2/c-1),d=p*p,g=Math.PI*this.R*(o*(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*_-o*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,s,o,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*(s=-Math.abs(r)*(1+a))+1+2*r*r+a*a)+(2*(o=s-2*r*r+i*i)*o*o/l/l/l-9*s*o/l/l)/27)/(c=(s-o*o/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)-o/3/l)*Math.PI:-(-u*Math.cos(f+Math.PI/3)-o/3/l)*Math.PI,e=Math.abs(i)<Hh?this.long0:Gf(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 qd=n(387);const Bd={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new qd.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))},forward:function(t){var e,n,i,r,a,s,o,l,c,u,h,f,p,d,g,_=t.x,m=t.y,y=Math.sin(t.y),v=Math.cos(t.y),x=Gf(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Hh?(t.x=this.x0+this.a*(Wh-m)*Math.sin(x),t.y=this.y0-this.a*(Wh-m)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=Hh?(t.x=this.x0+this.a*(Wh+m)*Math.sin(x),t.y=this.y0+this.a*(Wh+m)*Math.cos(x),t):(c=this.sin_p12*y+this.cos_p12*v*Math.cos(x),l=(o=Math.acos(c))?o/Math.sin(o):1,t.x=this.x0+this.a*l*v*Math.sin(x),t.y=this.y0+this.a*l*(this.cos_p12*y-this.sin_p12*v*Math.cos(x)),t):(e=pd(this.es),n=dd(this.es),i=gd(this.es),r=_d(this.es),Math.abs(this.sin_p12-1)<=Hh?(a=this.a*fd(e,n,i,r,Wh),s=this.a*fd(e,n,i,r,m),t.x=this.x0+(a-s)*Math.sin(x),t.y=this.y0-(a-s)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=Hh?(a=this.a*fd(e,n,i,r,Wh),s=this.a*fd(e,n,i,r,m),t.x=this.x0+(a+s)*Math.sin(x),t.y=this.y0+(a+s)*Math.cos(x),t):Math.abs(_)<Hh&&Math.abs(m-this.lat0)<Hh?(t.x=t.y=0,t):(u=this.lat0/Vh,h=this.long0/Vh,f=m/Vh,p=_/Vh,g=(d=this.g.Inverse(u,h,f,p,this.g.AZIMUTH)).azi1*Vh,t.x=d.s12*Math.sin(g),t.y=d.s12*Math.cos(g),t))},inverse:function(t){var e,n,i,r,a,s,o,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*Wh*this.a)return;return n=e/this.a,i=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(e)<=Hh?s=this.lat0:(s=Td(r*this.sin_p12+t.y*i*this.cos_p12/e),o=Math.abs(this.lat0)-Wh,a=Math.abs(o)<=Hh?this.lat0>=0?Gf(this.long0+Math.atan2(t.x,-t.y)):Gf(this.long0-Math.atan2(-t.x,t.y)):Gf(this.long0+Math.atan2(t.x*i,e*this.cos_p12*r-t.y*this.sin_p12*i))),t.x=a,t.y=s,t}return l=pd(this.es),c=dd(this.es),u=gd(this.es),h=_d(this.es),Math.abs(this.sin_p12-1)<=Hh?(s=vd(((f=this.a*fd(l,c,u,h,Wh))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,c,u,h),a=Gf(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=s,t):Math.abs(this.sin_p12+1)<=Hh?(f=this.a*fd(l,c,u,h,Wh),s=vd(((e=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,l,c,u,h),a=Gf(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=s,t):(p=this.lat0/Vh,d=this.long0/Vh,g=Math.atan2(t.x,t.y)/Vh,_=Math.sqrt(t.x*t.x+t.y*t.y),m=this.g.Direct(p,d,g,_,this.g.STANDARD),t.x=m.lon2*Vh,t.y=m.lat2*Vh,t)},names:["Azimuthal_Equidistant","aeqd"]};const Ud={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,s,o,l=t.x,c=t.y;return i=Gf(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)<=Hh)&&(s=1*this.a*n*Math.sin(i),o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*r)),t.x=s,t.y=o,t},inverse:function(t){var e,n,i,r,a,s,o;return t.x-=this.x0,t.y-=this.y0,n=Td((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),i=Math.sin(n),r=Math.cos(n),s=this.long0,Math.abs(e)<=Hh?(o=this.lat0,t.x=s,t.y=o,t):(o=Td(r*this.sin_p14+t.y*i*this.cos_p14/e),a=Math.abs(this.lat0)-Wh,Math.abs(a)<=Hh?(s=this.lat0>=0?Gf(this.long0+Math.atan2(t.x,-t.y)):Gf(this.long0-Math.atan2(-t.x,t.y)),t.x=s,t.y=o,t):(s=Gf(this.long0+Math.atan2(t.x*i,e*this.cos_p14*r-t.y*this.sin_p14*i)),t.x=s,t.y=o,t))},names:["ortho"]};var Wd=1,Hd=2,Vd=3,$d=4,Yd=5,Jd=6,Xd=1,Kd=2,Qd=3,Zd=4;function tg(t,e,n,i){var r;return t<Hh?(i.value=Xd,r=0):(r=Math.atan2(e,n),Math.abs(r)<=Yh?i.value=Xd:r>Yh&&r<=Wh+Yh?(i.value=Kd,r-=Wh):r>Wh+Yh||r<=-(Wh+Yh)?(i.value=Qd,r=r>=0?r-Xh:r+Xh):(i.value=Zd,r+=Wh)),r}function eg(t,e){var n=t+e;return n<-Xh?n+=Jh:n>+Xh&&(n-=Jh),n}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||"Quadrilateralized Spherical Cube",this.lat0>=Wh-Yh/2?this.face=Yd:this.lat0<=-(Wh-Yh/2)?this.face=Jd:Math.abs(this.long0)<=Yh?this.face=Wd:Math.abs(this.long0)<=Wh+Yh?this.face=this.long0>0?Hd:$d:this.face=Vd,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,s,o={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===Yd)r=Wh-e,n>=Yh&&n<=Wh+Yh?(l.value=Xd,i=n-Wh):n>Wh+Yh||n<=-(Wh+Yh)?(l.value=Kd,i=n>0?n-Xh:n+Xh):n>-(Wh+Yh)&&n<=-Yh?(l.value=Qd,i=n+Wh):(l.value=Zd,i=n);else if(this.face===Jd)r=Wh+e,n>=Yh&&n<=Wh+Yh?(l.value=Xd,i=-n+Wh):n<Yh&&n>=-Yh?(l.value=Kd,i=-n):n<-Yh&&n>=-(Wh+Yh)?(l.value=Qd,i=-n-Wh):(l.value=Zd,i=n>0?-n+Xh:-n-Xh);else{var c,u,h,f,p,d;this.face===Hd?n=eg(n,+Wh):this.face===Vd?n=eg(n,+Xh):this.face===$d&&(n=eg(n,-Wh)),f=Math.sin(e),p=Math.cos(e),d=Math.sin(n),c=p*Math.cos(n),u=p*d,h=f,this.face===Wd?i=tg(r=Math.acos(c),h,u,l):this.face===Hd?i=tg(r=Math.acos(u),h,-c,l):this.face===Vd?i=tg(r=Math.acos(-c),h,-u,l):this.face===$d?i=tg(r=Math.acos(-u),h,c,l):(r=i=0,l.value=Xd)}return s=Math.atan(12/Xh*(i+Math.acos(Math.sin(i)*Math.cos(Yh))-Wh)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===Kd?s+=Wh:l.value===Qd?s+=Xh:l.value===Zd&&(s+=1.5*Xh),o.x=a*Math.cos(s),o.y=a*Math.sin(s),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,t.x=o.x,t.y=o.y,t},inverse:function(t){var e,n,i,r,a,s,o,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=Xd:t.y>=0&&t.y>=Math.abs(t.x)?(d.value=Kd,e-=Wh):t.x<0&&-t.x>=Math.abs(t.y)?(d.value=Qd,e=e<0?e+Xh:e-Xh):(d.value=Zd,e+=Wh),c=Xh/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),s=Math.atan(a),(o=1-(i=Math.cos(e))*i*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(s)))))<-1?o=-1:o>1&&(o=1),this.face===Yd)l=Math.acos(o),p.phi=Wh-l,d.value===Xd?p.lam=s+Wh:d.value===Kd?p.lam=s<0?s+Xh:s-Xh:d.value===Qd?p.lam=s-Wh:p.lam=s;else if(this.face===Jd)l=Math.acos(o),p.phi=l-Wh,d.value===Xd?p.lam=-s+Wh:d.value===Kd?p.lam=-s:d.value===Qd?p.lam=-s-Wh:p.lam=s<0?-s-Xh:-s+Xh;else{var g,_,m;c=(g=o)*g,_=(c+=(m=c>=1?0:Math.sqrt(1-c)*Math.sin(s))*m)>=1?0:Math.sqrt(1-c),d.value===Kd?(c=_,_=-m,m=c):d.value===Qd?(_=-_,m=-m):d.value===Zd&&(c=_,_=m,m=-c),this.face===Hd?(c=g,g=-_,_=c):this.face===Vd?(g=-g,_=-_):this.face===$d&&(c=g,g=_,_=-c),p.phi=Math.acos(-m)-Wh,p.lam=Math.atan2(_,g),this.face===Hd?p.lam=eg(p.lam,-Wh):this.face===Vd?p.lam=eg(p.lam,-Xh):this.face===$d&&(p.lam=eg(p.lam,+Wh))}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 ig=[[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]],rg=[[-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]],ag=.8487,sg=1.3523,og=$h/5,lg=1/og,cg=18,ug=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const hg={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=Gf(t.x-this.long0),n=Math.abs(t.y),i=Math.floor(n*og);i<0?i=0:i>=cg&&(i=17);var r={x:ug(ig[i],n=$h*(n-lg*i))*e,y:ug(rg[i],n)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*ag+this.x0,r.y=r.y*this.a*sg+this.y0,r},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*ag),y:Math.abs(t.y-this.y0)/(this.a*sg)};if(e.y>=1)e.x/=ig[18][0],e.y=t.y<0?-Wh:Wh;else{var n=Math.floor(e.y*cg);for(n<0?n=0:n>=cg&&(n=17);;)if(rg[n][0]>e.y)--n;else{if(!(rg[n+1][0]<=e.y))break;++n}var i=rg[n],r=5*(e.y-i[0])/(rg[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(ug(i,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(i,t)}),r,Hh,100),e.x/=ug(ig[n],r),e.y=(5*n+r)*Vh,t.y<0&&(e.y=-e.y)}return e.x=Gf(e.x+this.long0),e},names:["Robinson","robin"]};const fg={init:function(){this.name="geocent"},forward:function(t){return cp(t,this.es,this.a)},inverse:function(t){return up(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var pg=0,dg=1,gg=2,_g=3,mg={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 yg={init:function(){if(Object.keys(mg).forEach(function(t){if(void 0===this[t])this[t]=mg[t].def;else{if(mg[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);mg[t].num&&(this[t]=parseFloat(this[t]))}mg[t].degrees&&(this[t]=this[t]*Vh)}.bind(this)),Math.abs(Math.abs(this.lat0)-Wh)<Hh?this.mode=this.lat0<0?dg:pg:Math.abs(this.lat0)<Hh?this.mode=gg:(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),s=Math.cos(t.y),o=Math.cos(t.x);switch(this.mode){case _g:n=this.sinph0*a+this.cosph0*s*o;break;case gg:n=s*o;break;case dg:n=-a;break;case pg:n=a}switch(e=(n=this.pn1/(this.p-n))*s*Math.sin(t.x),this.mode){case _g:n*=this.cosph0*a-this.sinph0*s*o;break;case gg:n*=a;break;case pg:n*=-s*o;break;case dg:n*=s*o}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=Kp(t.x,t.y);if(Math.abs(a)<Hh)r.x=0,r.y=t.y;else{var s,o;switch(o=1-a*a*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/a+a/this.pn1),s=Math.sqrt(1-o*o),this.mode){case _g:r.y=Math.asin(s*this.sinph0+t.y*o*this.cosph0/a),t.y=(s-this.sinph0*Math.sin(r.y))*a,t.x*=o*this.cosph0;break;case gg:r.y=Math.asin(t.y*o/a),t.y=s*a,t.x*=o;break;case pg:r.y=Math.asin(s),t.y=-t.y;break;case dg:r.y=-Math.asin(s)}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 vg={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,s=t.y;if(a-=this.long0,"ellipse"===this.shape){s=Math.atan(this.radius_p2*Math.tan(s));var o=this.radius_p/Kp(this.radius_p*Math.cos(s),Math.sin(s));if(n=o*Math.cos(a)*Math.cos(s),i=o*Math.sin(a)*Math.cos(s),r=o*Math.sin(s),(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/Kp(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/Kp(i,e)))}else"sphere"===this.shape&&(e=Math.cos(s),n=Math.cos(a)*e,i=Math.sin(a)*e,r=Math.sin(s),e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/Kp(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/Kp(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,s=0,o=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(o=Math.tan(t.y/this.radius_g_1),s=Math.tan(t.x/this.radius_g_1)*Kp(1,o)):(s=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*Kp(1,s));var l=o/this.radius_p;if(e=s*s+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,s*=r,o*=r,t.x=Math.atan2(s,a),t.y=Math.atan(o*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?(o=Math.tan(t.y/this.radius_g_1),s=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+o*o)):(s=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+s*s)),e=s*s+o*o+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,s*=r,o*=r,t.x=Math.atan2(s,a),t.y=Math.atan(o*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var xg=1.340264,bg=-.081106,wg=893e-6,Sg=.003796,Mg=Math.sqrt(3)/2;const Eg={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=Gf(t.x-this.long0),n=t.y,i=Math.asin(Mg*Math.sin(n)),r=i*i,a=r*r*r;return t.x=e*Math.cos(i)/(Mg*(xg+3*bg*r+a*(7*wg+9*Sg*r))),t.y=i*(xg+bg*r+a*(wg+Sg*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*(xg+bg*(e=a*a)+(n=e*e*e)*(wg+Sg*e))-t.y)/(xg+3*bg*e+n*(7*wg+9*Sg*e)),!(Math.abs(i)<1e-9));++r);return n=(e=a*a)*e*e,t.x=Mg*t.x*(xg+3*bg*e+n*(7*wg+9*Sg*e))/Math.cos(a),t.y=Math.asin(Math.sin(a)/Mg),t.x=Gf(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var Ag=1e-10;function Cg(t){var e,n,i,r=Gf(t.x-(this.long0||0)),a=t.y;return e=this.am1+this.m1-$p(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 kg(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=Kp(t.x,t.y=this.am1-t.y),r=Yp(this.am1+this.m1-n,this.es,this.en),(e=Math.abs(r))<Wh)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-Wh)<=Ag))throw new Error;i=0}return t.x=Gf(i+(this.long0||0)),t.y=yd(r),t}function Tg(t){var e,n,i=Gf(t.x-(this.long0||0)),r=t.y;return n=this.cphi1+this.phi1-r,Math.abs(n)>Ag?(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 Pg(t){var e,n;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i=Kp(t.x,t.y=this.cphi1-t.y);if(n=this.cphi1+this.phi1-i,Math.abs(n)>Wh)throw new Error;return e=Math.abs(Math.abs(n)-Wh)<=Ag?0:i*Math.atan2(t.x,t.y)/Math.cos(n),t.x=Gf(e+(this.long0||0)),t.y=yd(n),t}const Ng={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Ag)throw new Error;this.es?(this.en=Vp(this.es),this.m1=$p(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=kg,this.forward=Cg):(Math.abs(this.phi1)+Ag>=Wh?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Pg,this.forward=Tg)},names:["bonne","Bonne (Werner lat_1=90)"]};Sp.defaultDatum="WGS84",Sp.Proj=lp,Sp.WGS84=new Sp.Proj("WGS84"),Sp.Point=Bp,Sp.toPoint=mp,Sp.defs=kf,Sp.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),s=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:ip(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),o=function(t,e,n,i){for(var r=176,a=[],s=0;s<e.nSubgrids;s++){var o=ap(t,r,n),l=sp(t,r,o,n,i),c=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),u=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);a.push({ll:[np(o.lowerLongitude),np(o.lowerLatitude)],del:[np(o.longitudeInterval),np(o.latitudeInterval)],lim:[c,u],count:o.gridNodeCount,cvs:rp(l)});var h=16;!1===i&&(h=8),r+=176+o.gridNodeCount*h}return a}(r,s,a,i),l={header:s,subgrids:o};return Qf[t]=l,l}(t,e,n):{ready:Zf(t,e)}},Sp.transform=vp,Sp.mgrs=Np,Sp.version="__VERSION__",function(t){t.Proj.projections.add(Jp),t.Proj.projections.add(ed),t.Proj.projections.add(nd),t.Proj.projections.add(ad),t.Proj.projections.add(sd),t.Proj.projections.add(od),t.Proj.projections.add(cd),t.Proj.projections.add(ud),t.Proj.projections.add(hd),t.Proj.projections.add(xd),t.Proj.projections.add(kd),t.Proj.projections.add(Pd),t.Proj.projections.add(Nd),t.Proj.projections.add(Fd),t.Proj.projections.add(Ld),t.Proj.projections.add(Gd),t.Proj.projections.add(Od),t.Proj.projections.add(Dd),t.Proj.projections.add(zd),t.Proj.projections.add(Id),t.Proj.projections.add(Rd),t.Proj.projections.add(jd),t.Proj.projections.add(Bd),t.Proj.projections.add(Ud),t.Proj.projections.add(ng),t.Proj.projections.add(hg),t.Proj.projections.add(fg),t.Proj.projections.add(yg),t.Proj.projections.add(vg),t.Proj.projections.add(Eg),t.Proj.projections.add(Ng)}(Sp);const Fg=Sp;var Lg,Gg,Og,Dg,zg=function(t){var e;if(t.svg_){"3035"===t.proj_?Fg.defs("EPSG:3035","+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"):"54030"===t.proj_&&Fg.defs("EPSG:54030","+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"),t.Geometries.geoJSONs.worldrg?jg(t):Cu("https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json").then((function(e){var n=Tu(e,e.objects.CNTR_RG_20M_2020_4326).features;t.Geometries.geoJSONs.worldrg=n,jg(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",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=qg(e);if(n){var i=n.lat,r=n.lon,a=Ig(e);Lg.rotate([-r,-i]),Lg.scale(a),Og.selectAll("path").attr("d",Gg)}}),n))}},Ig=function(t){var e=t.position_.z;if(!e||e<=0)return 50;var n=Math.log2(156543/e);return Rg(n+-1)},Rg=function(t){return 5*Math.pow(2,t)},jg=function(t){try{var e=t.minimap_||{},n=e.countryId,i=e.x||80,r=e.y||80,a=e.z||160,s=e.color||"#3792B6";Dg=t.svg_.append("g").attr("id","em-minimap").attr("transform","translate(".concat(i,",").concat(r,")"));var o,l,c=e.size||160,u=t.Geometries.geoJSONs.worldrg;if(Dg.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","white").attr("stroke",s).attr("stroke-width",3),Lg=Rh(jh).scale(249.5).clipAngle(90.000001).scale(a).translate([0,0]),Gg=la().projection(Lg),n){var h=u.find((function(t){return t.properties.id===n}));if(!h)return void console.warn("Country ID ".concat(n," not found in geometries"));var f=Yn(Gg.bounds(h),2),p=Yn(f[0],2),d=p[0],g=p[1],_=Yn(f[1],2),m=[(d+_[0])/2,(g+_[1])/2],y=Lg.invert(m);l=y[0],o=y[1]}else{var v=qg(t);if(!v)return;o=v.lat,l=v.lon}if(Lg.rotate([-l,-o]),Dg.append("defs").append("clipPath").attr("id","minimap-clip").append("circle").attr("r",c/2).attr("cx",0).attr("cy",0),(Og=Dg.append("g").attr("class","em-minimap-globe").attr("clip-path","url(#minimap-clip)")).selectAll("path.country").data(u).enter().append("path").attr("d",Gg).attr("fill","#e0e0e0"),n){var x=u.find((function(t){return t.properties.id===n}));Og.append("path").datum(x).attr("d",Gg).attr("fill",s).attr("stroke",s).attr("stroke-width",.5)}Dg.append("circle").attr("r",c/2).attr("cx",0).attr("cy",0).attr("fill","none").attr("stroke",s).attr("stroke-width",3)}catch(t){console.error("Error drawing minimap:",t)}},qg=function(t){var e,n,i=[t.position_.x,t.position_.y];if("3035"===t.proj_){var r=Yn(Fg("EPSG:3035","EPSG:4326",i),2);n=r[0],e=r[1]}else if("54030"===t.proj_){var a=Yn(Fg("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 Bg={value:()=>{}};function Ug(){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 Wg(i)}function Wg(t){this._=t}function Hg(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function Vg(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Bg,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Wg.prototype=Ug.prototype={constructor:Wg,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}}))),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=a[s]).type)r[n]=Vg(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Vg(r[n],t.name,null);return this}for(;++s<o;)if((n=(t=a[s]).type)&&(n=Hg(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Wg(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 $g=Ug,Yg={capture:!0,passive:!1};function Jg(t){t.preventDefault(),t.stopImmediatePropagation()}function Xg(t){return((t=Math.exp(t))+1/t)/2}const Kg=function t(e,n,i){function r(t,r){var a,s,o=t[0],l=t[1],c=t[2],u=r[0],h=r[1],f=r[2],p=u-o,d=h-l,g=p*p+d*d;if(g<1e-12)s=Math.log(f/c)/e,a=function(t){return[o+t*p,l+t*d,c*Math.exp(e*t*s)]};else{var _=Math.sqrt(g),m=(f*f-c*c+i*g)/(2*c*n*_),y=(f*f-c*c-i*g)/(2*f*n*_),v=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(y*y+1)-y);s=(x-v)/e,a=function(t){var i=t*s,r=Xg(v),a=c/(n*_)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[o+a*p,l+a*d,c*r/Xg(e*i+v)]}}return a.duration=1e3*s*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 Qg(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]}var Zg,t_,e_=0,n_=0,i_=0,r_=0,a_=0,s_=0,o_="object"==typeof performance&&performance.now?performance:Date,l_="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function c_(){return a_||(l_(u_),a_=o_.now()+s_)}function u_(){a_=0}function h_(){this._call=this._time=this._next=null}function f_(t,e,n){var i=new h_;return i.restart(t,e,n),i}function p_(){a_=(r_=o_.now())+s_,e_=n_=0;try{!function(){c_(),++e_;for(var t,e=Zg;e;)(t=a_-e._time)>=0&&e._call.call(void 0,t),e=e._next;--e_}()}finally{e_=0,function(){var t,e,n=Zg,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:Zg=e);t_=t,g_(i)}(),a_=0}}function d_(){var t=o_.now(),e=t-r_;e>1e3&&(s_-=e,r_=t)}function g_(t){e_||(n_&&(n_=clearTimeout(n_)),t-a_>24?(t<1/0&&(n_=setTimeout(p_,t-o_.now()-s_)),i_&&(i_=clearInterval(i_))):(i_||(r_=o_.now(),i_=setInterval(d_,1e3)),e_=1,l_(p_)))}function __(t,e,n){var i=new h_;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}h_.prototype=f_.prototype={constructor:h_,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?c_():+n)+(null==e?0:+e),this._next||t_===this||(t_?t_._next=this:Zg=this,t_=this),this._call=t,this._time=n,g_()},stop:function(){this._call&&(this._call=null,this._time=1/0,g_())}};var m_=$g("start","end","cancel","interrupt"),y_=[];function v_(t,e,n,i,r,a){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(t){n.state=1,n.timer.restart(s,n.delay,n.time),n.delay<=t&&s(t-n.delay)}function s(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 __(s);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(__((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(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 o(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,s=i.length;++a<s;)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=f_(a,0,n.time)}(t,n,{name:e,index:i,group:r,on:m_,tween:y_,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function x_(t,e){var n=w_(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function b_(t,e){var n=w_(t,e);if(n.state>3)throw new Error("too late; already running");return n}function w_(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function S_(t,e){var n,i,r,a=t.__transition,s=!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]):s=!1;s&&delete t.__transition}}var M_,E_=180/Math.PI,A_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function C_(t,e,n,i,r,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,l/=o),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*E_,skewX:Math.atan(l)*E_,scaleX:s,scaleY:o}}function k_(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(a,s){var o=[],l=[];return a=t(a),s=t(s),function(t,i,r,a,s,o){if(t!==r||i!==a){var l=s.push("translate(",null,e,null,n);o.push({i:l-4,x:Be(t,r)},{i:l-2,x:Be(i,a)})}else(r||a)&&s.push("translate("+r+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,o,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:Be(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,s.rotate,o,l),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Be(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,s.skewX,o,l),function(t,e,n,i,a,s){if(t!==n||e!==i){var o=a.push(r(a)+"scale(",null,",",null,")");s.push({i:o-4,x:Be(t,n)},{i:o-2,x:Be(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,o,l),a=s=null,function(t){for(var e,n=-1,i=l.length;++n<i;)o[(e=l[n]).i]=e.x(t);return o.join("")}}}var T_=k_((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?A_:C_(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),P_=k_((function(t){return null==t?A_:(M_||(M_=document.createElementNS("http://www.w3.org/2000/svg","g")),M_.setAttribute("transform",t),(t=M_.transform.baseVal.consolidate())?C_((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):A_)}),", ",")",")");function N_(t,e){var n,i;return function(){var r=b_(this,t),a=r.tween;if(a!==n)for(var s=0,o=(i=n=a).length;s<o;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}r.tween=i}}function F_(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=b_(this,t),s=a.tween;if(s!==i){r=(i=s).slice();for(var o={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=o;break}l===c&&r.push(o)}a.tween=r}}function L_(t,e,n){var i=t._id;return t.each((function(){var t=b_(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return w_(t,i).value[e]}}function G_(t,e){var n;return("number"==typeof e?Be:e instanceof ge?ze:(n=ge(e))?(e=n,ze):Ve)(t,e)}function O_(t){return function(){this.removeAttribute(t)}}function D_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z_(t,e,n){var i,r,a=n+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?r:r=e(i=s,n)}}function I_(t,e,n){var i,r,a=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?r:r=e(i=s,n)}}function R_(t,e,n){var i,r,a;return function(){var s,o,l=n(this);if(null!=l)return(s=this.getAttribute(t))===(o=l+"")?null:s===i&&o===r?a:(r=o,a=e(i=s,l));this.removeAttribute(t)}}function j_(t,e,n){var i,r,a;return function(){var s,o,l=n(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:s===i&&o===r?a:(r=o,a=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function q_(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 B_(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 U_(t,e){return function(){x_(this,t).delay=+e.apply(this,arguments)}}function W_(t,e){return e=+e,function(){x_(this,t).delay=e}}function H_(t,e){return function(){b_(this,t).duration=+e.apply(this,arguments)}}function V_(t,e){return e=+e,function(){b_(this,t).duration=e}}var $_=Nt.prototype.constructor;function Y_(t){return function(){this.style.removeProperty(t)}}var J_=0;function X_(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function K_(){return++J_}var Q_=Nt.prototype;X_.prototype=function(t){return Nt().transition(t)}.prototype={constructor:X_,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=x(t));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var o,l,c=i[s],u=c.length,h=a[s]=new Array(u),f=0;f<u;++f)(o=c[f])&&(l=t.call(o,o.__data__,f,c))&&("__data__"in o&&(l.__data__=o.__data__),h[f]=l,v_(h[f],e,n,f,h,w_(o,n)));return new X_(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=S(t));for(var i=this._groups,r=i.length,a=[],s=[],o=0;o<r;++o)for(var l,c=i[o],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var f,p=t.call(l,l.__data__,h,c),d=w_(l,n),g=0,_=p.length;g<_;++g)(f=p[g])&&v_(f,e,n,g,p,d);a.push(p),s.push(l)}return new X_(a,s,e,n)},selectChild:Q_.selectChild,selectChildren:Q_.selectChildren,filter:function(t){"function"!=typeof t&&(t=M(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,s=e[r],o=s.length,l=i[r]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new X_(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),s=new Array(i),o=0;o<a;++o)for(var l,c=e[o],u=n[o],h=c.length,f=s[o]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(f[p]=l);for(;o<i;++o)s[o]=e[o];return new X_(s,this._parents,this._name,this._id)},selection:function(){return new $_(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=K_(),i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)if(s=o[c]){var u=w_(s,e);v_(s,t,n,c,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new X_(i,this._parents,t,n)},call:Q_.call,nodes:Q_.nodes,node:Q_.node,size:Q_.size,empty:Q_.empty,each:Q_.each,on:function(t,e){var n=this._id;return arguments.length<2?w_(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)?x_:b_;return function(){var s=a(this,t),o=s.on;o!==i&&(r=(i=o).copy()).on(e,n),s.on=r}}(n,t,e))},attr:function(t,e){var n=R(t),i="transform"===n?P_:G_;return this.attrTween(t,"function"==typeof e?(n.local?j_:R_)(n,i,L_(this,"attr."+t,e)):null==e?(n.local?D_:O_)(n):(n.local?I_:z_)(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=R(t);return this.tween(n,(i.local?q_:B_)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?T_:G_;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=X(this,t),s=(this.style.removeProperty(t),X(this,t));return a===s?null:a===n&&s===i?r:r=e(n=a,i=s)}}(t,i)).on("end.style."+t,Y_(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var s=X(this,t),o=n(this),l=o+"";return null==o&&(this.style.removeProperty(t),l=o=X(this,t)),s===l?null:s===i&&l===r?a:(r=l,a=e(i=s,o))}}(t,i,L_(this,"style."+t,e))).each(function(t,e){var n,i,r,a,s="style."+e,o="end."+s;return function(){var l=b_(this,t),c=l.on,u=null==l.value[s]?a||(a=Y_(e)):void 0;c===n&&r===u||(i=(n=c).copy()).on(o,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,a=n+"";return function(){var s=X(this,t);return s===a?null:s===i?r:r=e(i=s,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}}(L_(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=w_(this.node(),n).tween,a=0,s=r.length;a<s;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?N_:F_)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?U_:W_)(e,t)):w_(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?H_:V_)(e,t)):w_(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(){b_(this,t).ease=e}}(e,t)):w_(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;b_(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,s){var o={value:s},l={value:function(){0==--r&&a()}};n.each((function(){var n=b_(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),n.on=e})),0===r&&a()}))},[Symbol.iterator]:Q_[Symbol.iterator]};var Z_={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function tm(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(){S_(this,t)}))},Nt.prototype.transition=function(t){var e,n;t instanceof X_?(e=t._id,t=t._name):(e=K_(),(n=Z_).time=c_(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)(s=o[c])&&v_(s,t,e,c,o,n||tm(s,e));return new X_(i,this._parents,t,e)};const em=t=>()=>t;function nm(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 im(t,e,n){this.k=t,this.x=e,this.y=n}im.prototype={constructor:im,scale:function(t){return 1===t?this:new im(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new im(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 rm=new im(1,0,0);function am(t){t.stopImmediatePropagation()}function sm(t){t.preventDefault(),t.stopImmediatePropagation()}function om(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function lm(){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 cm(){return this.__zoom||rm}function um(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function hm(){return navigator.maxTouchPoints||"ontouchstart"in this}function fm(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],s=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function pm(){var t,e,n,i=om,r=lm,a=fm,s=um,o=hm,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=Kg,f=$g("start","zoom","end"),p=0,d=10;function g(t){t.property("__zoom",cm).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",M).filter(o).on("touchstart.zoom",E).on("touchmove.zoom",A).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 im(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 im(t.k,i,r)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(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,s=x(t,a).event(i),o=r.apply(t,a),l=null==n?y(o):"function"==typeof n?n.apply(t,a):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[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 im(n,l[0]-e[0]*n,l[1]-e[1]*n)}s.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,o=Math.max(l[0],Math.min(l[1],r.k*Math.pow(2,s.apply(this,arguments)))),u=Qg(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===o)return;n.mouse=[u,r.invert(u)],S_(this),n.start()}sm(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",a(m(_(r,o),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(t,...e){if(!n&&i.apply(this,arguments)){var r=t.currentTarget,s=x(this,e,!0).event(t),o=Ft(t.view).on("mousemove.zoom",(function(t){if(sm(t),!s.moved){var e=t.clientX-u,n=t.clientY-h;s.moved=e*e+n*n>p}s.event(t).zoom("mouse",a(m(s.that.__zoom,s.mouse[0]=Qg(t,r),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(t){o.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=Ft(t).on("dragstart.drag",null);e&&(i.on("click.drag",Jg,Yg),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,s.moved),sm(t),s.event(t).end()}),!0),l=Qg(t,r),u=t.clientX,h=t.clientY;!function(t){var e=t.document.documentElement,n=Ft(t).on("dragstart.drag",Jg,Yg);"onselectstart"in e?n.on("selectstart.drag",Jg,Yg):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),am(t),s.mouse=[l,this.__zoom.invert(l)],S_(this),s.start()}}function M(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,s=Qg(t.changedTouches?t.changedTouches[0]:t,this),o=n.invert(s),l=n.k*(t.shiftKey?.5:2),h=a(m(_(n,l),s,o),r.apply(this,e),c);sm(t),u>0?Ft(this).transition().duration(u).call(v,h,s,t):Ft(this).call(g.transform,h,s,t)}}function E(n,...r){if(i.apply(this,arguments)){var a,s,o,l,c=n.touches,u=c.length,h=x(this,r,n.changedTouches.length===u).event(n);for(am(n),s=0;s<u;++s)l=[l=Qg(o=c[s],this),this.__zoom.invert(l),o.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)),S_(this),h.start())}}function A(t,...e){if(this.__zooming){var n,i,r,s,o=x(this,e).event(t),l=t.changedTouches,u=l.length;for(sm(t),n=0;n<u;++n)r=Qg(i=l[n],this),o.touch0&&o.touch0[2]===i.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===i.identifier&&(o.touch1[0]=r);if(i=o.that.__zoom,o.touch1){var h=o.touch0[0],f=o.touch0[1],p=o.touch1[0],d=o.touch1[1],g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g,y=(y=d[0]-f[0])*y+(y=d[1]-f[1])*y;i=_(i,Math.sqrt(g/y)),r=[(h[0]+p[0])/2,(h[1]+p[1])/2],s=[(f[0]+d[0])/2,(f[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],s=o.touch0[1]}o.zoom("touch",a(m(i,r,s),o.extent,c))}}function C(t,...i){if(this.__zooming){var r,a,s=x(this,i).event(t),o=t.changedTouches,l=o.length;for(am(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),r=0;r<l;++r)a=o[r],s.touch0&&s.touch0[2]===a.identifier?delete s.touch0:s.touch1&&s.touch1[2]===a.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(a=Qg(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<d)){var c=Ft(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",cm),t!==r?v(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,s=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,o=i.invert(s),l="function"==typeof e?e.apply(this,arguments):e;return a(m(_(i,l),s,o),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,s){g.transform(t,(function(){var t=r.apply(this,arguments),s=this.__zoom,o=null==i?y(t):"function"==typeof i?i.apply(this,arguments):i;return a(rm.translate(o[0],o[1]).scale(s.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,s)},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=Ft(this.that).datum();f.call(t,this.that,new nm(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:f}),e)}},g.wheelDelta=function(t){return arguments.length?(s="function"==typeof t?t:em(+t),g):s},g.filter=function(t){return arguments.length?(i="function"==typeof t?t:em(!!t),g):i},g.touchable=function(t){return arguments.length?(o="function"==typeof t?t:em(!!t),g):o},g.extent=function(t){return arguments.length?(r="function"==typeof t?t:em([[+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}im.prototype;var dm=function(t,e){var n=t.transform,i=(map.width_/2-n.x)/n.k,r=(map.height_/2-n.y)/n.k,a=Yn(map._projection.invert([i,r]),2),s=a[0],o=a[1];void 0!==map.maxBounds_.xMin&&s<map.maxBounds_.xMin&&(s=map.maxBounds_.xMin,n.x=map.width_/2-map._projection([s,o])[0]*n.k),void 0!==map.maxBounds_.yMin&&o<map.maxBounds_.yMin&&(o=map.maxBounds_.yMin,n.y=map.height_/2-map._projection([s,o])[1]*n.k),void 0!==map.maxBounds_.xMax&&s>map.maxBounds_.xMax&&(s=map.maxBounds_.xMax,n.x=map.width_/2-map._projection([s,o])[0]*n.k),void 0!==map.maxBounds_.yMax&&o>map.maxBounds_.yMax&&(o=map.maxBounds_.yMax,n.y=map.height_/2-map._projection([s,o])[1]*n.k),map.position_.x=s,map.position_.y=o,window.dispatchEvent(new CustomEvent("estatmap:zoomed",{detail:map}))},gm=function(t){var e=ci(map);return(e[2]-e[0])/(map.width_*t)},_m=function(t,e,n){var i,r,a=t.transform,s=(n.width_/2-a.x)/a.k,o=(n.height_/2-a.y)/a.k,l=Yn(n._projection.invert([s,o]),2),c=l[0],u=l[1];n.position_.x=c,n.position_.y=u,n.position_.z=gm(a.k/e.k),vm(a,n),null!==(i=n.labels_)&&void 0!==i&&i.values&&ym(a,n),null!==(r=n.labels_)&&void 0!==r&&r.backgrounds&&mm(a,n),window.dispatchEvent(new CustomEvent("estatmap:zoomed",{detail:n}))},mm=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=Ft(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")),s=parseFloat(t.attr("data-y"))||parseFloat(t.attr("y"));if(e>0&&n>0&&!isNaN(a)&&!isNaN(s)){t.attr("data-width")||(t.attr("data-width",e),t.attr("data-height",n),t.attr("data-x",a),t.attr("data-y",s));var o=e*(1/i),l=n*(1/i),c=a*(1/i),u=s*(1/i);r.push({element:t,targetWidth:o,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=Ft(this),e=window.getComputedStyle(this),n=t.attr("font-size"),a=e.fontSize,s=n||a;if(s&&parseFloat(s)>0){var o=parseFloat(t.attr("data-fs"))||parseFloat(n)||parseFloat(a);t.attr("data-fs")||t.attr("data-fs",o);var l=o/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")}))},vm=function(t,e){var n=e.svg_.select("#em-zoom-group-"+e.svgId_).selectAll("*"),i=t.k,r=[];n.each((function(){var t=Ft(this),e=window.getComputedStyle(this),n=t.attr("stroke-width"),a=e.strokeWidth,s=n||a;if(s&&parseFloat(s)>0){var o=parseFloat(t.attr("data-sw"))||parseFloat(n)||parseFloat(a);t.attr("data-sw")||t.attr("data-sw",o);var l=o/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")}))};function xm(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}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var bm=function(t,e,n){var i={};i._mapType=n,i.updateValuesLabels=mu,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.zoomExtent_=void 0,i.maxBounds_={xMin:-1/0,yMin:-1/0,xMax:1/0,yMax:1/0},i.geometries_=void 0,i.processCentroids_=void 0,i.position_={x:void 0,y:void 0,z: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.showZoomButtons_=!1,i.showInsetsButton_=!1,i.tooltip_={fontSize:"14px",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1,omitList:!1},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_="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.",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.onZoomEnd_=void 0,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.seaFillStyle=function(e){return console.warn("seaFillStyle() is now DEPRECATED, please use the .em-sea CSS class"),Kn(".em-sea","fill",e),t},t.cntrgFillStyle=function(e){return console.warn("cntrgFillStyle() is now DEPRECATED, please use the .em-cntrg CSS class"),Kn(".em-cntrg","fill",e),t},t.nutsrgFillStyle=function(e){return console.warn("nutsrgFillStyle() is now DEPRECATED, please use the .em-nutsrg CSS class"),Kn(".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]&&Kn(".bn_0","stroke",e[0]),e[1]&&Kn(".bn_1","stroke",e[1]),e[2]&&Kn(".bn_2","stroke",e[2]),e[3]&&Kn(".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]&&Kn(".bn_0","stroke-width",e[0]),e[1]&&Kn(".bn_1","stroke-width",e[1]),e[2]&&Kn(".bn_2","stroke-width",e[2]),e[3]&&Kn(".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"),Kn(".em-graticule","stroke",e),t},t.graticuleStrokeWidth=function(e){return console.warn("graticuleStrokeWidth() is now DEPRECATED, please use the .em-graticule CSS class"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".em-title","fill",e),t},t.subtitleFill=function(e){return console.warn("map.subtitleFill() is now DEPRECATED. please use the .em-subtitle CSS class"),Kn(".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&&Kn(".em-bn-eu","stroke",e.eu),e.efta&&Kn(".em-bn-efta","stroke",e.efta),e.cc&&Kn(".em-bn-cc","stroke",e.cc),e.oth&&Kn(".em-bn-oth","stroke",e.oth),e.co&&Kn(".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&&Kn(".em-bn-eu","stroke-width",e.eu),e.efta&&Kn(".em-bn-efta","stroke-width",e.efta),e.cc&&Kn(".em-bn-cc","stroke-width",e.cc),e.oth&&Kn(".em-bn-oth","stroke-width",e.oth),e.co&&Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn("#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"),Kn("#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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".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"),Kn(".em-frame","stroke",e),t},t.frameStrokeWidth=function(e){return console.warn("map.frameStrokeWidth() is now DEPRECATED. please use the .em-frame CSS class"),Kn(".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"!==ui(e)||null===e||Array.isArray(e))i[t]=e;else for(var n in e)i[t][n]=e[n];return i.insetTemplates_&&ii(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=pi("#em-coast-margin"),n=Ft("#em-coastal-blur"),r=Ft("#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=Ft("#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_&&(ii(i.insetTemplates_,i.svgId_,a),a(i)),pi("#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,gu(i),i):i.annotations_},i.stamp=function(t){return arguments.length?(i.stamp_=t,Vu(i.stamp_,i),i):i.stamp_},i.minimap=function(t){return arguments.length?(i.minimap_=t,zg(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_);_u(t,i),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t),t.insetTemplates_&&ii(t.insetTemplates_,t.svgId_,(function(t){if(n){var e=t.svg_.select("#em-zoom-group-"+t.svgId_);t.labels_&&_u(t,e),n.values&&t.updateValuesLabels&&t.updateValuesLabels(t)}}))}}}(i),i):i.labels_},i.Geometries=Bu(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()})),ii(i.insetTemplates_,i.svgId_,(function(e){e.updateGeoMapTemplate(t)})),i},i.buildMapTemplateBase=function(){var t=Ft("#"+i.svgId());0==t.size()&&(t=Ft("body").append("svg").attr("id",i.svgId())),t.attr("class","em-map"),i.svg_=t,i.containerId_||(i.containerId_=i.svgId_),i.tooltip_.containerId||(i.tooltip_.containerId=i.containerId_),pi("#"+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=Ft("#"+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=Ft("#"+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_=Wu(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==Ft("#"+r.svgId).size()){var a=null==r.x?t.insetBoxPadding_:r.x,s=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+","+s+")").append("svg").attr("id",r.svgId)}if(t.insetTemplates_[r.geo]){var o=Uu(r,t,e);o.buildMapTemplateBase(),t.insetTemplates_[r.geo]=[t.insetTemplates_[r.geo],o]}else{var l=Uu(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_&&Vu(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=Ft("#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=oh(t),i=lh(n),r=ch(i,t);"hexagon"===t.gridCartogramShape_?hh(e,r,t):uh(e,r,t),ph(e,t.width_,t.height_,t.gridCartogramMargins_)}(i),i.footnote_=!1):(i.position_.x&&i.position_.y||o(),i.position_.z=i.position_.z||l(),c(),u(),i.zoomExtent()&&function(t){var e=Ft("#"+t.svgId()),n=rm;t.__zoomBehavior=pm().filter((function(t){var e=t.target;return!e.closest(".em-zoom-buttons")&&!e.closest(".em-button")})).scaleExtent(t.zoomExtent()).on("zoom",(function(e){var i=e.transform;i.k!==n.k?_m(e,n,t):dm(e,t),t.svg_.select("#em-zoom-group-"+t.svgId_).attr("transform",i),n=i})).on("end",(function(e){t.onZoomEnd_&&t.onZoomEnd_(e,t)})),e.call(t.__zoomBehavior)}(i),i.backgroundMap_&&s(i)),e&&d(i),i.labels_&&_u(i,n),i.annotations_&&(gu(i),i.annotationsAdded=!0),i.title()){var r=i.isInset?"em-inset-title":"em-title";i.titlePosition()||i.titlePosition([10,Qn(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",h=i.isInset?"em-inset-title":"em-title";i.subtitlePosition()||i.subtitlePosition([10,Qn(h)+Qn(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_&&f(),i.showSourceLink_)&&((t=e?i.stat("size"):i.stat())&&t.eurostatDatasetCode)){var p=t.eurostatDatasetCode,_="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",_).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),g()),i.minimap_&&zg(i),i.showZoomButtons_&&function(t){var e=Ft("#"+t.svgId()).append("g").attr("class","em-zoom-buttons").style("pointer-events","all"),n=parseInt(Zn("em-button","width"))||30,i=e.append("g").attr("class","em-zoom-in em-button");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").attr("transform","translate(0, ".concat(n,")")).style("cursor","pointer");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.showInsetsButton_&&function(t){var e=Ft("#"+t.svgId()),n=parseInt(Zn("em-button","width"))||30,i=e.append("g").attr("class","em-insets-button em-button");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 e=Ft("#em-insets-group");"none"===e.style("display")||""===e.style("display")?e.style("display","block"):e.style("display","none")}))}(i),i};var s=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_&&p(),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_)},o=function(){var t,e=wm[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])),h()},l=function(){var t,e=wm[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},c=function(){var t;"WORLD"===i.geo_?i._projection=i.projectionFunction_||Js(so).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,s,o=1,l=0,c=0,u=1,h=1,f=0,p=null,d=1,g=1,_=Ui({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),m=Bi;function y(){return d=o*u,g=o*h,a=s=null,v}function v(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 v.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]},v.stream=function(t){return a&&s===t?a:a=_(m(s=t))},v.postclip=function(t){return arguments.length?(m=t,p=n=i=r=null,y()):m},v.clipExtent=function(t){return arguments.length?(m=null==t?(p=n=i=r=null,Bi):qi(p=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),y()):null==p?null:[[p,n],[i,r]]},v.scale=function(t){return arguments.length?(o=+t,y()):o},v.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],y()):[l,c]},v.angle=function(n){return arguments.length?(e=ki(f=n%360*bi),t=Ei(f),y()):f*xi},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(h=t?-1:1,y()):h<0},v.fitExtent=function(t,e){return rr(v,t,e)},v.fitSize=function(t,e){return ar(v,t,e)},v.fitWidth=function(t,e){return sr(v,t,e)},v.fitHeight=function(t,e){return or(v,t,e)},v}().reflectY(!0).fitSize([i.width_,i.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(t=ci(i))[0],t[1]],[t[2],t[3]]]}})},u=function(){i._pathFunction=la().projection(i._projection)},h=function(){var t=ri("x"),e=ri("y"),n=ri("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)},f=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___)}))},p=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)},d=function(t){var e;t.Geometries.centroidsData?e="mixed"==t.nutsLevel_?[].concat(y(t.Geometries.centroidsData[0].features),y(t.Geometries.centroidsData[1].features),y(t.Geometries.centroidsData[2].features),y(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?xm(Object(n),!0).forEach((function(e){fi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xm(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:Da(t),type:"Point"},e.push(n)}))),t.processCentroids_&&(e=t.processCentroids_(e)),t.Geometries.centroidFeatures=e.map((function(e){var n=t._projection(e.geometry.coordinates);return e.properties.centroid=n,e}));t.svg().select("#em-zoom-group-"+t.svgId_).append("g").attr("id","em-prop-symbols").selectAll("g").data(t.Geometries.centroidFeatures).enter().append("g").attr("transform",(function(t){return"translate("+t.properties.centroid[0].toFixed(3)+","+t.properties.centroid[1].toFixed(3)+")"})).attr("class","em-centroid").attr("id",(function(t){return"ps"+t.properties.id}))},g=function(){var t=i.scalebarMaxWidth_,e=i.scalebarTextOffset_[0],n=i.scalebarTextOffset_[1],r=i.position_.z,a=_(t*r),s=a[0]/r,o=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}[o],u=s/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(m(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",s+5).attr("y1",1).attr("x2",s+5).attr("y2",i.scalebarTickHeight_),l.append("text").attr("class","em-scalebar-label").attr("x",s+5+e).attr("y",i.scalebarTickHeight_+n).text(m(a[0])+i.scalebarUnits_)},_=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]},m=function(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3};return i},wm={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}},Sm=ih("\t"),Mm=Sm.parse;Sm.parseRows,Sm.format,Sm.formatBody,Sm.formatRows,Sm.formatRow,Sm.formatValue;function Em(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Am(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(Em)}(e,n).then((function(e){return t(e,i)}))}}var Cm=Am(ah);Am(Mm);function km(t,e){var n,i,r,a,s=function(t,e,n){if(0===Object.entries(t).length)return null;var i,r=[];if(n&&!Pm(n.name)&&(n=null),"string"==typeof t&&(t=[t]),Array.isArray(t)||Tm(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 o=[],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 km(t);for(i in t)l++,o.push(i);this.__tree__=t,this.length=l,this.id=o;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)||Tm(this.value))u=this.value.length;else{var f=1;for(c=h.length;c--;)f*=h[c];u=f}if(this.value=s(this.value,u,e),this.status=n.hasOwnProperty("status")&&null!==n.status?s(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 y=[],v=["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[v[c]];null!==b&&(y=y.concat(b))}for(d.classification=[],c=0;c<_;c++)x(g[c],y)||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 A=0;for(i in p[g[w]].category.index={},p[g[w]].category.label)p[g[w]].category.index[i]=A++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new km({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 C=[],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)C[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=C,this.length=C.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 Tm(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t.buffer)}function Pm(t){return-1!==["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].indexOf(t)}function Nm(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}km.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},km.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 km(r[i]));return n}if("number"==typeof t&&t>=0&&t<r.length)return new km(r[t]);if("string"==typeof t)for(e=r.length;i<e;i++)if(r[i].href===t)return new km(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 s=this.__tree__[t];return void 0===s?null:new km({class:"dataset",__tree__:s})},km.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 s=this.id[t];return void 0!==s?this.Dimension(s,e):null}var o=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<r;n++){var l=this.id[n];a(o,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 km({class:"dimension",__tree__:u,role:a(o,t)}):function(t,e){var n=[];for(var i in t)n[t[i]]=e[i];return n}(u.category.index,u.category.label)},km.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 s=a.index[t];if(void 0===s)return null;var o=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 km({class:"category",index:s,label:a.label[t],note:u,child:c,unit:o,coord:l})},km.prototype.Dice=function(t,e,n){var i,r,a,s,o=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=o(e,"clone"),n=o(e,"drop"),r=o(e,"stringify"),a=o(e,"ovalue"),s=o(e,"ostatus"));var l,c=this.value,u=i?new km(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=Tm(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"),s&&l.hasOwnProperty("status")&&d(l,"status"),JSON.stringify(l)):u},km.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]]]})))},km.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 s=this.value[t];return void 0===s?null:e?{value:s,status:this.status?this.status[t]:null}:s}var o="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]}o="array"}var y=function(t,e,n){var i,r=[],s={},o=t.dimension,l=t.id||o.id,c=t.size||o&&o.size;if("array"===n){for(i=e.length;i--;)s[e[i][0]]=e[i][1];e=s}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(o[f].category.index):null)}return r}(l,t,o),v=[],x=l.dimension,b=l.id||x.id;for(n=0,i=y.length;n<i;n++)v.push(x[b[n]].category.index[y[n]]);return this.Data(v,e)},km.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,s,o,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(s=(R="object"!==t.type?n.slice(m):n.rows.slice(0)).length,i=0;i<s;i++){var y=e.call(this,R[i],i);void 0!==y&&_.push(y)}return"object"===t.type?{cols:n.cols,rows:_}:("array"===t.type&&_.unshift(n[0]),_)}if("arrobj"===t.type||"objarr"===t.type){var v=[],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,A=!0===t.meta,C=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&&Pm(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),A?(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&&C.length>0?C:null,prefix:null!==E?q||"":null,comma:k,dimensions:i},data:e}):e};E&&(t.field="id");var F=(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 L=x.length;L--;){var G=this.Dimension(x[L]);w[x[L]]={};for(var O=G.length;O--;)w[x[L]][G.Category(O).label]=G.id[O]}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(s=n.length,i=0;i<s;i++){var D={};for(r=n[i].length;r--;)D[F[r]]=n[i][r],b(F[r],n[i][r]);v.push(D)}if(k&&v.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==E){var z,I={},R=[],j={},q=void 0!==t.prefix?t.prefix:"";C.forEach((function(t,e){(!S.Dimension(t)||S.Dimension(t).length>1)&&(C[e]="")}));var B=M.filter((function(t){return t!==E&&-1===C.indexOf(t)})),U=S.Dimension(E);for(var W in"id"!==t.content?T?z=function(t,e,n){t[e][q+n[E]]=n.value}:(U.Category().forEach((function(t,e){j[t.label]=U.id[e]})),z=function(t,e,n){t[e][q+j[n[E]]]=n.value}):z=function(t,e,n){t[e][q+n[E]]=n.value},v.forEach((function(t){var e=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")}(t,B);void 0===I[e]&&(I[e]=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n}(t,B)),z(I,e,t,E)})),I)R.push(I[W]);return g=!1,N(R)}return N(v)}if("object"===t.type){var H="number"==typeof this.value[0]||null===this.value[0]?"number":"string";o=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 o=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,Q=(L=1,[]),Z=[],tt=[],et=[],nt=[],it=[];for(i=0;i<J;i++){var rt=$[i];o(rt,V[rt].label),K*=Y[i],L*=Y[i];var at=[];for(r=0;r<Y[i];r++)for(var st in V[$[i]].category.index)if(V[$[i]].category.index[st]===r){var ot="id"!==t.content&&V[$[i]].category.label?V[$[i]].category.label[st]:st;at.push(ot)}X.push(at),Q.push(L)}for(l(t.vlabel,t.slabel,g),s=X.length,i=0;i<s;i++){for(var lt=[],ct=0,ut=X[i].length;ct<ut;ct++)for(var ht=0;ht<K/Q[i];ht++)lt.push(X[i][ct]);Z.push(lt)}for(s=Z.length,i=0;i<s;i++){var ft=[],pt=0;for(a=0;a<K;a++)ft.push(Z[i][pt]),++pt===Z[i].length&&(pt=0);tt.push(ft)}for(a=0;a<K;a++){var dt=[];s=Z.length;for(var gt=0;gt<s;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},km.prototype.node=function(){return this.__tree__},km.prototype.toString=function(){return this.class};var Fm=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},n=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Cu(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 s=e[a];if(Array.isArray(s))for(var o=0;o<s.length;o++)r.push("&",a,"=",s[o]);else r.push("&",a,"=",s)}return r.join("")}(e.eurostatDatasetCode_,e.filters_,n))},i=function(t,i,r){e._data_=null,n(t,i).then((function(t){var n=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 km(t,n):"version"===t?"1.5.3":fetch?fetch(t,i).then(Nm).then((function(t){return new km(t,n)})):void 0}(t);e.metadata={label:n.label,href:n.href,source:n.source,updated:n.updated,extension:n.extension},e.metadata.time=n.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}(n),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,Cm(e.csvURL_).then((function(n){e._data_=function(t,e,n){for(var i={},r=0;r<t.length;r++){var a=t[r],s=a[n];i[a[e]]=s?{value:isNaN(+s)?s:+s,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},Lm=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,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=r.maxDepth||100;if(a.has(t))return t;if(a.add(t),s>o)return console.warn("Max recursion depth (".concat(o,") 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,s+1):Array.isArray(c)&&Array.isArray(u)?t[l]=r.mergeArrays?y(new Set([].concat(y(u),y(c)))):y(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=Qn("em-legend-title"),e.labelFontSize=Qn("em-legend-label"),e.build=function(){e.svg=Ft("#"+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.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},Gm=function(t){var e;function n(){e=Ft("#"+t.div),e.empty()&&(e=Ft("body").append("div").attr("id",t.div)),e.attr("class","tooltip-eurostat")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"0px",t.border=t.border||"0px",t.borderRadius=t.borderRadius||"0px",t.boxShadow=t.boxShadow||"0px 0px 0px grey",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){if(e.html(t),t){var i=event.pageX,r=event.pageY;n.ensureTooltipOnScreen(i,r)}},n.mousemove=function(t){var e=t.pageX,n=t.pageY;this.ensureTooltipOnScreen(e,n)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,i){return 1==arguments.length?e.style(t):(e.style(t,i),n)},n.attr=function(t,i){return 1==arguments.length?e.attr(t):(e.attr(t,i),n)},n.ensureTooltipOnScreen=function(n,i){e.style("opacity",1);var r=e.node();r.style.left=n+t.xOffset+"px",r.style.top=i-t.yOffset+"px";var a=document.getElementById(t.containerId).getBoundingClientRect(),s=a.width,o=a.height;if(r.offsetLeft>a.left+s-r.clientWidth){var l=n-r.clientWidth-t.xOffset;if(r.style.left=l+"px",r.offsetLeft+r.clientWidth>n){var c=n-r.clientWidth-t.xOffset;r.style.left=c+"px"}}r.offsetTop+r.clientHeight>a.top+o&&(r.style.top=r.offsetTop-r.clientHeight+"px")},n(),n},Om=function(t,e,n){var i=bm(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:Fm(),color:Fm(),size:Fm(),v1:Fm(),v2:Fm(),v3:Fm()},i.statData=function(t,e){return arguments.length?1===arguments.length?(i.statData_[t]||(i.statData_[t]=Fm()),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=Ft("#"+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=Gm(i.tooltip_):i._tooltip=Gm(),i.updateGeoData(),i.updateStatData(),i},i.buildLegend=function(){i.legendObj(i.getLegendConstructor()(i,i.legend()));var t=i.legendObj();if(0==Ft("#"+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),s=null===(e=(n=i.statData(t)).get)||void 0===e?void 0:e.call(n);if((r||s)&&r){var o=Fm(r);i.statData(t,o);var l=i.nutsLevel_;"mixed"===l&&(l=0),o.retrieveFromRemote(l,i.language(),(function(){i.Geometries.isGeoReady()&&a()&&(i.updateStatValues(),i.callback()&&i.callback()(i))}))}}return i},i.updateStatValues=function(){return 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"),Lm},i.getTime=function(){return i.statData("default").getTime()},i.setFromURL=function(){var t=Dm();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),ei(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);ei(n);var r=(new XMLSerializer).serializeToString(n),a=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),s=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 o=new Image;return o.onload=function(){var n=document.createElement("canvas");n.width=parseFloat(t),n.height=parseFloat(e),n.getContext("2d").drawImage(o,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(s),URL.revokeObjectURL(e)}),"image/png")},o.src=s,i},i},Dm=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 zm(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.shapeWidth,r=void 0===i?25:i,a=n.shapeHeight,s=void 0===a?20:a,o=n.labelOffset,l=void 0===o?3:o,c=n.boxPadding,u=void 0===c?5:c,h=n.offsetY,f=void 0===h?0:h;t.patternFill_&&t.patternFill_.forEach((function(t,n){if(t.legendLabel){var i=f+n*(s+u),a=e.append("g").attr("class","em-legend-item pattern-fill-legend"),o=t.color||"#000";("#fff"===o.toLowerCase()||"white"===o.toLowerCase())&&a.append("rect").attr("x",u).attr("y",i).attr("width",r).attr("height",s).attr("fill","#ddd"),a.append("rect").attr("x",u).attr("y",i).attr("width",r).attr("height",s).attr("fill","url(#".concat(t.patternId||t.pattern,")")),a.append("text").attr("class","em-legend-label").attr("x",u+r+l).attr("y",i+s/2).attr("dominant-baseline","middle").attr("dy","0.35em").text(t.legendLabel)}}))}class Im extends Map{constructor(t,e=Bm){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(Rm(this,t))}has(t){return super.has(Rm(this,t))}set(t,e){return super.set(jm(this,t),e)}delete(t){return super.delete(qm(this,t))}}Set;function Rm({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function jm({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function qm({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Bm(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Um=Symbol("implicit");function Wm(){var t=new Im,e=[],n=[],i=Um;function r(r){let a=t.get(r);if(void 0===a){if(i!==Um)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 Im;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 Wm(e,n).unknown(i)},Wt.apply(r,arguments),r}function Hm(){var t,e,n=Wm().unknown(void 0),i=n.domain,r=n.range,a=0,s=1,o=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<a,f=h?s:a,p=h?a:s;t=(p-f)/Math.max(1,n-l+2*c),o&&(t=Math.floor(t)),f+=(p-f-t*(n-l))*u,e=t*(1-l),o&&(f=Math.round(f),e=Math.round(e));var d=Fu(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,s]=t,a=+a,s=+s,h()):[a,s]},n.rangeRound=function(t){return[a,s]=t,a=+a,s=+s,o=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,h()):o},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 Hm(i(),[a,s]).round(o).paddingInner(l).paddingOuter(c).align(u)},Wt.apply(h(),arguments)}function Vm(t){return t}var $m=1e-6;function Ym(t){return"translate("+t+",0)"}function Jm(t){return"translate(0,"+t+")"}function Xm(t){return e=>+t(e)}function Km(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Qm(){return!this.__axis}function Zm(t,e){var n=[],i=null,r=null,a=6,s=6,o=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?Ym:Jm;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):Vm:r,g=Math.max(a,0)+o,_=e.range(),m=+_[0]+l,y=+_[_.length-1]+l,v=(e.bandwidth?Km:Xm)(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"),A=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)),A=A.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),A=A.transition(f),S=S.transition(f).attr("opacity",$m).attr("transform",(function(t){return isFinite(t=v(t))?h(t+l):this.getAttribute("transform")})),M.attr("opacity",$m).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:v(t))+l)}))),S.remove(),b.attr("d",4===t||2===t?s?"M"+c*s+","+m+"H"+l+"V"+y+"H"+c*s:"M"+l+","+m+"V"+y:s?"M"+m+","+c*s+"V"+l+"H"+y+"V"+c*s:"M"+m+","+l+"H"+y),w.attr("opacity",1).attr("transform",(function(t){return h(v(t)+l)})),E.attr(u+"2",c*a),A.attr(u,c*g).text(d),x.filter(Qm).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=v}))}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=s=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(o=+t,f):o},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function ty(t){return Zm(3,t)}function ey(t){return Zm(4,t)}var ny=function(t,e,n,i,r,a,s){var o=t.histogram.orientation||"horizontal",l=t.histogram.showCounts,c=t.histogram.showPercentages,u=t.histogram.labelRotation||0,h=t.histogram.margin||{top:0,right:0,bottom:0,left:0},f=t.histogram.height||200,p=t.histogram.width||270,d=new Array(t.map.numberOfClasses_).fill(0);i.forEach((function(e){var n=t.map.classifier()(e);"number"==typeof n&&n>=0&&n<d.length&&d[n]++}));var g=d.slice().reverse(),_=d.reduce((function(t,e){return t+e}),0),m=g.map((function(t){return _>0?t/_*100:0})),y=t.boxPadding+(t.title?Qn("em-legend-title")+10:30),v=t.lgg.append("g").attr("class","em-legend-histogram").attr("transform","translate(0, ".concat(y,")"));function x(e,i){var r=Ft(this).style("stroke","black").attr("ecl"),s=n.length-1-parseInt(r,10);a(map,s),t.map.insetTemplates_&&ii(t.map.insetTemplates_,t.map.svgId,a,r)}function b(e,n){Ft(this).style("stroke","none");s(map),t.map.insetTemplates_&&ii(t.map.insetTemplates_,t.map.svgId,s)}"vertical"===o?function(t){var i=Hm().domain(g.map((function(t,e){return e}))).range([h.top,f-h.bottom]).padding(.1),a=Sn().domain([0,Gt(g)]).nice().range([h.left,p-h.right]);t.selectAll("rect").data(g).join("rect").attr("class","em-legend-histogram-bar").attr("y",(function(t,e){return i(e)})).attr("x",h.left).attr("height",i.bandwidth()).attr("width",(function(t){return a(t)-h.left})).attr("fill",(function(t,e){return n[n.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",x).on("mouseout",b),(l||c)&&t.selectAll("text.em-histogram-label").data(g).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t){return a(t)+5})).attr("y",(function(t,e){return i(e)+i.bandwidth()/2})).attr("alignment-baseline","middle").text((function(t,e){return c?"".concat(m[e].toFixed(1),"%"):g[e]}));var s=t.append("g").attr("id","em-legend-histogram-y-axis").attr("transform","translate(".concat(h.left,", 0)"));s.call(ey(i).tickSizeOuter(0).tickSize(0).tickFormat((function(t,n){return r?r(e[n],n):e[n]}))),s.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end")}(v):function(i){var a=Hm().domain(g.map((function(t,e){return e}))).range([h.left,p-h.right]).padding(.1),s=Sn().domain([0,Gt(g)]).nice().range([f-h.bottom,h.top]);i.selectAll("rect").data(g).join("rect").attr("class","em-legend-histogram-bar").attr("x",(function(t,e){return a(e)})).attr("y",(function(t){return s(t)})).attr("width",a.bandwidth()).attr("height",(function(t){return f-h.bottom-s(t)})).attr("fill",(function(t,e){return n[n.length-e-1]})).attr("ecl",(function(t,e){return e})).on("mouseover",x).on("mouseout",b),(l||c)&&i.selectAll("text.em-histogram-label").data(g).join("text").attr("class","em-legend-label em-histogram-label").attr("x",(function(t,e){return a(e)+a.bandwidth()/2})).attr("y",(function(t){return s(t)-5})).attr("text-anchor","middle").text((function(t,e){return c?"".concat(m[e].toFixed(1),"%"):g[e]}));var o=i.append("g").attr("id","em-legend-histogram-x-axis").attr("transform","translate(0, ".concat(f-h.bottom,")"));if("thresholds"===t.labelType){for(var d=[],_=0;_<e.length;_++){var y=e.length-_-1,v=a(y);void 0!==v&&d.push(v+a.bandwidth())}var w=Sn().domain([0,p]).range([0,p]);o.call(ty(w).tickValues(d).tickFormat((function(t,n){return r?r(e[n],n):e[n]})).tickSize(0).tickSizeOuter(0))}else"ranges"===t.labelType&&o.call(ty(a).tickSizeOuter(0).tickSize(0).tickFormat((function(t,n){return r?r(e[n],n):e[n]})));o.selectAll("text").attr("class","em-legend-label em-tick-label").attr("text-anchor","end").attr("transform","rotate(-".concat(u,")"))}(v)};function iy(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 ry(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iy(Object(n),!0).forEach((function(e){fi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iy(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ay=function(t,e){var n=Lm(t);if(n.labelType="thresholds",n.ascending=!0,n.shapeWidth=25,n.shapeHeight=20,n.sepLineLength=n.shapeWidth,n.tickLength=4,n.decimals=0,n.labelOffset=3,n.labelFormatter=null,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.noData=!0,n.noDataText="No data",e)for(var i in e)"histogram"===i&&"object"===ui(e[i])?n.histogram=ry({orientation:"horizontal",showCounts:!1,showPercentages:!1,labelRotation:0},e.histogram):n[i]=e[i];function r(){var t=n.map,e=t.thresholds_.length>1?t.thresholds_:Array.from({length:t.numberOfClasses_}).map((function(e,i){return t.classifier().invertExtent(i)[n.ascending?0:1]})).slice(1);return e}function a(){if("ranges"==n.labelType){var t=r();return n.labelFormatter||function(e,i){var r=gn(".".concat(n.decimals,"f"));return 0===i?"> ".concat(r(t[t.length-1])):i===t.length?"< ".concat(r(t[0])):"".concat(r(t[t.length-i-1])," - < ").concat(r(t[t.length-i])," ")}}return n.labelType,n.labelFormatter||gn(".".concat(n.decimals,"f"))}function s(t){var e=n.lgg.append("g").attr("class","em-legend-divergence-container"),i=n.boxPadding;"ranges"==n.labelType&&(t+=n.pointOfDivergencePadding/2);var r=n.lgg.selectAll(".em-legend-label").nodes().reduce((function(t,e){return Math.max(t,e.getBBox().width)}),0),a=n.divergingLineLength||r+n.boxPadding+n.shapeWidth+10;e.append("line").attr("x1",i).attr("y1",t).attr("x2",i+a).attr("y2",t).attr("class","em-legend-diverging-line");var s=n.pointOfDivergenceLabel.split("|");if(s.length>1){var o=n.divergingArrowLength||30,l=i+a;e.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"),e.append("line").attr("class","em-legend-diverging-line").attr("x1",l).attr("y1",t).attr("x2",l).attr("y2",t-o).attr("marker-end","url(#arrowhead)"),e.append("line").attr("class","em-legend-diverging-line").attr("x1",l).attr("y1",t).attr("x2",l).attr("y2",t+o).attr("marker-end","url(#arrowhead)"),e.append("text").attr("class","em-legend-label").attr("x",l+10).attr("y",t-o+10).attr("dy","0.35em").text(s[0]),e.append("text").attr("class","em-legend-label").attr("x",l+10).attr("y",t+o-10).attr("dy","0.35em").text(s[1])}else e.append("text").attr("class","em-legend-diverging-label em-legend-label").attr("x",i+a+5).attr("y",t).attr("dy","0.35em").text(n.pointOfDivergenceLabel);"thresholds"==n.labelType&&(s.length>1?n.lgg.selectAll(".em-legend-label-divergence").attr("x",i+a+10):n.lgg.selectAll(".em-legend-label-divergence").remove())}function o(t,e){var n=li(t),i=t.svg_.selectAll(n).selectAll("[ecl]");i.style("fill","white"),i.filter("[ecl='"+e+"']").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}function l(t){var e=li(t);t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var e=n.map,i=n.lgg;if(n.makeBackgroundBox(),n.title){var c=Qn("em-legend-title");i.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+c).text(n.title)}if(!e.classToFillStyle())return;n.pointOfDivergenceLabel&&!n.pointOfDivergence&&(n.pointOfDivergence=e.numberOfClasses_/2),n.histogram?ny(n,r(),function(){var t=n.map;return t.colors_?t.colors_:Array.from({length:t.numberOfClasses_}).map((function(e,n){return t.classToFillStyle()(n,t.numberOfClasses_)}))}(),function(){var t=n.map;return Object.values(t.statData()._data_).map((function(t){return t.value}))}(),a(),o,l):"ranges"===n.labelType?function(){var t=n.map,e=n.lgg,i=a(),r=n.boxPadding;n.title&&(r=r+Qn("em-legend-title")+8);for(var c=function(){var a=r+u*n.shapeHeight,s=n.boxPadding,c=n.ascending?t.numberOfClasses()-u-1:u,h=t.classToFillStyle()(c,t.numberOfClasses_),f=e.append("g").attr("class","em-legend-item");n.pointOfDivergenceLabel&&u>=n.pointOfDivergence&&(a+=n.pointOfDivergencePadding),f.append("rect").attr("class","em-legend-rect").attr("x",s).attr("y",a).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",h).on("mouseover",(function(){Ft(this).raise(),o(n.map,c),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o,c)})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,l,c)})),u>0&&f.append("line").attr("class","em-legend-separator").attr("x1",n.boxPadding).attr("y1",a).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",a),f.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength+n.tickLength)+n.labelOffset).attr("y",a+n.shapeHeight/2).attr("dy","0.35em").text(n.labels?n.labels[u]:i(t.classifier().invertExtent(c)[n.ascending?0:1],u))},u=0;u<t.numberOfClasses_;u++)c();if(n.pointOfDivergenceLabel)for(var h=0;h<t.numberOfClasses_;h++){var f=r+h*n.shapeHeight;h==n.pointOfDivergence&&s(f)}if(n.noData){var p=e.append("g").attr("class","em-legend-item"),d=r+t.numberOfClasses()*n.shapeHeight+n.boxPadding;p.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",d).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",n.map.noDataFillStyle_).on("mouseover",(function(){Ft(this).raise(),o(t,"nd"),t.insetTemplates_&&ii(t.insetTemplates_,t.svgId,o,"nd")})).on("mouseout",(function(){l(t),t.insetTemplates_&&ii(t.insetTemplates_,t.svgId,l)})),p.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",d+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}}():function(){var e=n.map,i=n.lgg,r=n.boxPadding,c=a();n.title&&(r=r+Qn("em-legend-title")+8);for(var u=function(){var t=r+h*n.shapeHeight,a=n.boxPadding,s=n.ascending?e.numberOfClasses()-h-1:h,u=e.classToFillStyle()(s,e.numberOfClasses_);if(i.append("rect").attr("class","em-legend-rect").attr("x",a).attr("y",t).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",u).on("mouseover",(function(){o(n.map,s),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o,s)})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,l,s)})),h>0&&i.append("line").attr("class","em-legend-separator").attr("x1",n.boxPadding).attr("y1",t).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",t),h>0&&i.append("line").attr("class","em-legend-tick").attr("x1",n.boxPadding+n.sepLineLength).attr("y1",t).attr("x2",n.boxPadding+n.sepLineLength+n.tickLength).attr("y2",t),h<e.numberOfClasses()-1){var f=i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength+n.tickLength)+n.labelOffset).attr("y",t+n.shapeHeight).attr("dy","0.35em").text(n.labels?n.labels[h]:c(e.classifier().invertExtent(s)[n.ascending?0:1]));n.pointOfDivergenceLabel&&h==n.pointOfDivergence-1&&f.attr("class","em-legend-label em-legend-label-divergence")}},h=0;h<e.numberOfClasses_;h++)u();if(n.pointOfDivergenceLabel)for(var f=0;f<t.numberOfClasses_;f++){var p=r+f*n.shapeHeight;f==n.pointOfDivergence&&s(p)}if(n.noData){var d=r+e.numberOfClasses()*n.shapeHeight+n.boxPadding;i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",d).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",n.map.noDataFillStyle_).on("mouseover",(function(){o(n.map,"nd"),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o,"nd")})).on("mouseout",(function(){l(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,l)})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",d+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}}();var u=n.lgg.node().getBBox().height;zm(e,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:u+n.boxPadding+5}),n.setBoxDimension()}},n.labelDecNb=function(t){return console.warn("labelDecNb is now DEPRECATED. Please use decimals instead."),n},n};function sy(t){return t.slice().sort((function(t,e){return t-e}))}function oy(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 ly(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 cy(t,e,n,i,r,a,s){if(!(t>e)){var o=Math.floor((t+e)/2);i[n][o]=i[n-1][o-1],r[n][o]=o;var l=n;t>n&&(l=Math.max(l,r[n][t-1]||0)),l=Math.max(l,r[n-1][o]||0);var c,u,h,f=o-1;e<i[0].length-1&&(f=Math.min(f,r[n][e+1]||0));for(var p=f;p>=l&&!((c=ly(p,o,a,s))+i[n-1][l-1]>=i[n][o]);--p)(u=ly(l,o,a,s)+i[n-1][l-1])<i[n][o]&&(i[n][o]=u,r[n][o]=l),l++,(h=c+i[n-1][p-1])<i[n][o]&&(i[n][o]=h,r[n][o]=p);cy(t,o-1,n,i,r,a,s),cy(o+1,e,n,i,r,a,s)}}function uy(t,e){if(e>t.length)throw new Error("cannot generate more classes than there are data values");var n=sy(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=oy(e,n.length),a=oy(e,n.length);!function(t,e,n){for(var i=e[0].length,r=t[Math.floor(i/2)],a=[],s=[],o=0,l=void 0;o<i;++o)l=t[o]-r,0===o?(a.push(l),s.push(l*l)):(a.push(a[o-1]+l),s.push(s[o-1]+l*l)),e[0][o]=ly(0,o,a,s),n[0][o]=0;for(var c=1;c<e.length;++c)cy(c<e.length-1?c:i-1,i-1,c,e,n,a,s)}(n,r,a);for(var s=[],o=a[0].length-1,l=a.length-1;l>=0;l--){var c=a[l][o];s[l]=n.slice(c,o+1),l>0&&(o=c-1)}return s}function hy(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=[],s=0;for(n=0;n<t.length+1;n++){var o=[],l=[];for(i=0;i<e+1;i++)o.push(0),l.push(0);r.push(o),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(s=(h+=_*_)-(u+=_)*u/++f,0!=(p=g-1))for(i=2;i<e+1;i++)a[c][i]>=s+a[p][i-1]&&(r[c][i]=g,a[c][i]=s+a[p][i-1])}r[c][1]=1,a[c][1]=s}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 fy=function(){this.totalCount=0,this.data={}};fy.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++},fy.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 s in a[e]=0,n[e])a[e]+=n[e][s];return a};var py=function(){this.weights=[],this.bias=0};py.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},py.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 dy=Math.sqrt(2*Math.PI);function gy(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/dy*Math.exp(-t*t/2)))/1e4}for(var _y=[],my=0;my<=3.09;my+=.01)_y.push(gy(my));function yy(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,s=void 0===a?"hatching":a,o=e.regionIds,l=void 0===o?[]:o,c=e.color,u=void 0===c?"#000":c,h=e.strokeWidth,f=void 0===h?1:h,p=e.customPattern;if(p){var d=p.match(/id=['"]([^'"]+)['"]/);if(!d)return void console.warn("customPattern must include an id attribute.");r=d[1],t.svg().select("#".concat(r)).empty()&&n.node().insertAdjacentHTML("beforeend",p)}else{var g=u.replace("#","").toLowerCase();r="".concat(s,"-").concat(g,"-sw").concat(f),function(t,e,n,i,r){var a=t.svg().select("defs");if(t.svg().select("#".concat(CSS.escape(e))).empty()){var s=a.append("pattern").attr("id",e).attr("patternUnits","userSpaceOnUse").attr("width",8).attr("height",8);"hatching"===n?s.append("path").attr("d","M-1,1 l2,-2 M0,8 l8,-8 M7,9 l2,-2").attr("stroke",i).attr("stroke-width",r):"crosshatch"===n?s.append("path").attr("d","M0,0 l8,8 M8,0 l-8,8").attr("stroke",i).attr("stroke-width",r):"dots"===n?s.append("circle").attr("cx",4).attr("cy",4).attr("r",r).attr("fill",i):(console.warn('Unknown pattern "'.concat(n,'", defaulting to hatching.')),s.append("path").attr("d","M-1,1 l2,-2 M0,8 l8,-8 M7,9 l2,-2").attr("stroke",i).attr("stroke-width",r))}}(t,r,s,u,f)}e.patternId=r,l.forEach((function(t){i[t]||(i[t]=[]),i[t].push(r)}))})),t.svg().selectAll(oi(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 s=Ft(this);a.forEach((function(t){var e=s.node().cloneNode(!0);Ft(e).attr("fill","url(#".concat(t,")")).attr("pointer-events","none").attr("class",(s.attr("class")||"")+" pattern-fill-overlay"),Ft(n.parentNode).append((function(){return e}))}))}}))}else console.warn("patternFill expects an array of configs")}var vy=function(t){var e=Om(t,!1,"ch");e.numberOfClasses_=7,e.classificationMethod_="quantile",e.thresholds_=[0],e.colors_=null,e.makeClassifNice_=!0;var n=["#FFEB99","#D1E9B0","#8DD6B9","#58C1C0","#3792B6","#134891","#1d2b6f"];function i(t){var n=function(t){return y(Array(t).keys())},i=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":null!=i?+e.classifier_(i):void 0}}))};if(function(){var t=e.statData().getArray(),i=n(e.numberOfClasses_);switch(e.classificationMethod_){case"quantile":e.classifier(Ht().domain(t).range(i));break;case"equal-interval":case"equinter":e.classifier(Mn().domain([Lt(t),Gt(t)]).range(i)),e.makeClassifNice_&&e.classifier().nice();break;case"threshold":e.numberOfClasses(e.thresholds_.length+1),e.classifier(En().domain(e.thresholds_).range(n(e.numberOfClasses_)));break;case"jenks":var r=hy(t,e.numberOfClasses_).slice(1,-1);e.classifier(En().domain(r).range(i));break;case"ckmeans":var a=uy(t,e.numberOfClasses_).map((function(t){return t.pop()})).slice(0,-1);e.classifier(En().domain(a).range(i))}}(),t.svg_){var r=oi(t);if(i(t.svg().selectAll(r)),"mixed"===t.nutsLevel_)i(t.svg().selectAll("path.em-nutsrg0"))}}function r(t){if(e.filtersDefinitionFunction_?e.classToFillStyle(by()):e.classToFillStyle(xy(e.colorFunction(),e.colors_)),t.svg_){var n=oi(t),i=t.svg().selectAll(n);i.transition().duration(e.transitionDuration()).style("fill",s).end().then((function(){i.each((function(){var t=Ft(this);t.attr("fill___",t.style("fill"))})),o(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ft(this.parentNode).style("fill");Ft(this).attr("fill",si(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&a(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&yy(t,e.patternFill_)}}e.colorFunction_=function(t){return function(t,e){void 0===e&&(e=t,t=Ye);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)}}($n,n)(Math.min(Math.max(0,t),1))},e.classToFillStyle_=void 0,e.classifier_=void 0,e.tooltip_.textFunction=wy,["numberOfClasses_","classificationMethod_","thresholds_","makeClassifNice_","colorFunction_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].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){return arguments.length?(e.colorFunction_=t,e.filtersDefinitionFunction_?e.classToFillStyle(by()):e.classToFillStyle(xy(e.colorFunction(),e.colors_)),e):e.colorFunction_},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_&&ii(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_&&ii(e.insetTemplates_,e.svgId_,r),r(e),e}catch(t){console.error("Error in updateStyle:",t.message),console.error(t)}},e.getLegendConstructor=function(){return ay};var a=function(t){t.svg().selectAll(oi(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ft(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)}}}))},s=function(t){var n=Ft(this).attr("ecl");if(e.Geometries.userGeometries)return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.numberOfClasses_):Zn("em-nutsrg","fill");if("WORLD"===e.geo_)return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_(n,e.numberOfClasses_)||e.cntrgFillStyle_:e.cntrgFillStyle_;t.properties.id.slice(0,2);return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.numberOfClasses_):Zn("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)||(Ft(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)))})).on("mousemove",(function(t,n){i(n.properties.id)||e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(t,n){if(!i(n.properties.id)){var r=Ft(this);r.style("fill",r.attr("fill___")),e._tooltip&&e._tooltip.mouseout()}}))};return e},xy=function(t,e){return t=t||kn,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},by=function(){return function(t){return"url(#pattern_"+t+")"}},wy=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="estat-vis-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"","\n </div>\n "));var a=e.statData(),s=a.get(r),o=a.unitText()||"";if(!s||0!==s.value&&!s.value||":"===s.value)return n.push('\n <div class="estat-vis-tooltip-text no-data">\n <table class="nuts-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="estat-vis-tooltip-text">\n <table class="nuts-table">\n <tbody>\n <tr><td>'.concat(ni(s.value)," ").concat(o,"</td></tr>\n </tbody>\n </table>\n </div>\n "));var l=s.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("")};function Sy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function My(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ey(t){return t<0?-t*t:t*t}function Ay(t){var e=t(Qe,Qe),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(Qe,Qe):.5===n?t(My,Ey):t(Sy(n),Sy(1/n)):n},wn(e)}function Cy(){var t=Ay(rn());return t.copy=function(){return nn(t,Cy()).exponent(t.exponent())},Wt.apply(t,arguments),t}function ky(){return Cy.apply(null,arguments).exponent(.5)}function Ty(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=Cn(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(An)),Ny=4294967296;var Fy=Math.PI*(3-Math.sqrt(5));function Ly(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),a=0,s=.6,o=new Map,l=f_(h),c=$g("tick","end"),u=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Ny)/Ny}();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,o.forEach((function(t){t(n)})),l=0;l<u;++l)null==(c=t[l]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(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*Fy;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(),o.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?(s=1-t,e):1-s},randomSource:function(t){return arguments.length?(u=t,o.forEach(d),e):u},force:function(t,n){return arguments.length>1?(null==n?o.delete(t):o.set(t,d(n)),e):o.get(t)},find:function(e,n,i){var r,a,s,o,l,c=0,u=t.length;for(null==i?i=1/0:i*=i,c=0;c<u;++c)(s=(r=e-(o=t[c]).x)*r+(a=n-o.y)*a)<i&&(l=o,i=s);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function Gy(t){return function(){return t}}function Oy(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,a,s,o,l,c,u,h,f,p=t._root,d={data:i},g=t._x0,_=t._y0,m=t._x1,y=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>=(s=(_+y)/2))?_=s:y=s,r=p,!(p=p[h=u<<1|c]))return r[h]=d,t;if(o=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===o&&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>=(s=(_+y)/2))?_=s:y=s}while((h=u<<1|c)==(f=(l>=s)<<1|o>=a));return r[f]=p,r[h]=d,t}function Dy(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function zy(t){return t[0]}function Iy(t){return t[1]}function Ry(t,e,n){var i=new jy(null==e?zy:e,null==n?Iy:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function jy(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 qy(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var By=Ry.prototype=jy.prototype;function Uy(t){return 1e-6*(t()-.5)}function Wy(t){return t.x+t.vx}function Hy(t){return t.y+t.vy}function Vy(t){return function(){return t}}By.copy=function(){var t,e,n=new jy(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=qy(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]=qy(e));return n},By.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Oy(this.cover(e,n),e,n,t)},By.addAll=function(t){var e,n,i,r,a=t.length,s=new Array(a),o=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))||(s[n]=i,o[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)Oy(this,s[n],o[n],t[n]);return this},By.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 s,o,l=r-n||1,c=this._root;n>t||t>=r||i>e||e>=a;)switch(o=(e<i)<<1|t<n,(s=new Array(4))[o]=c,c=s,l*=2,o){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},By.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},By.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]]},By.find=function(t,e,n){var i,r,a,s,o,l,c,u=this._x0,h=this._y0,f=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new Dy(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||(s=l.x1)<u||(o=l.y1)<h))if(g.length){var _=(r+s)/2,m=(a+o)/2;d.push(new Dy(g[3],_,m,s,o),new Dy(g[2],r,m,_,o),new Dy(g[1],_,a,s,m),new Dy(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 y=t-+this._x.call(null,g.data),v=e-+this._y.call(null,g.data),x=y*y+v*v;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},By.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(s=+this._y.call(null,t)))return this;var e,n,i,r,a,s,o,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>=(o=(d+_)/2))?d=o:_=o,(u=s>=(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)},By.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},By.root=function(){return this._root},By.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},By.visit=function(t){var e,n,i,r,a,s,o=[],l=this._root;for(l&&o.push(new Dy(l,this._x0,this._y0,this._x1,this._y1));e=o.pop();)if(!t(l=e.node,i=e.x0,r=e.y0,a=e.x1,s=e.y1)&&l.length){var c=(i+a)/2,u=(r+s)/2;(n=l[3])&&o.push(new Dy(n,c,u,a,s)),(n=l[2])&&o.push(new Dy(n,i,u,c,s)),(n=l[1])&&o.push(new Dy(n,c,r,a,u)),(n=l[0])&&o.push(new Dy(n,i,r,c,u))}return this},By.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new Dy(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var r=e.node;if(r.length){var a,s=e.x0,o=e.y0,l=e.x1,c=e.y1,u=(s+l)/2,h=(o+c)/2;(a=r[0])&&n.push(new Dy(a,s,o,u,h)),(a=r[1])&&n.push(new Dy(a,u,o,l,h)),(a=r[2])&&n.push(new Dy(a,s,h,u,c)),(a=r[3])&&n.push(new Dy(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},By.x=function(t){return arguments.length?(this._x=t,this):this._x},By.y=function(t){return arguments.length?(this._y=t,this):this._y};const $y=Math.PI,Yy=2*$y,Jy=1e-6,Xy=Yy-Jy;function Ky(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Qy{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Ky:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ky;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,s=this._y1,o=n-t,l=i-e,c=a-t,u=s-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>Jy)if(Math.abs(u*o-l*c)>Jy&&r){let f=n-a,p=i-s,d=o*o+l*l,g=f*f+p*p,_=Math.sqrt(d),m=Math.sqrt(h),y=r*Math.tan(($y-Math.acos((d+h-g)/(2*_*m)))/2),v=y/m,x=y/_;Math.abs(v-1)>Jy&&this._append`L${t+v*c},${e+v*u}`,this._append`A${r},${r},0,0,${+(u*f>c*p)},${this._x1=t+x*o},${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 s=n*Math.cos(i),o=n*Math.sin(i),l=t+s,c=e+o,u=1^a,h=a?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Jy||Math.abs(this._y1-c)>Jy)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%Yy+Yy),h>Xy?this._append`A${n},${n},0,1,${u},${t-s},${e-o}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Jy&&this._append`A${n},${n},0,${+(h>=$y)},${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 Zy(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 Qy(e)}const tv=Math.abs,ev=Math.atan2,nv=Math.cos,iv=Math.max,rv=Math.min,av=Math.sin,sv=Math.sqrt,ov=1e-12,lv=Math.PI,cv=lv/2,uv=2*lv;function hv(t){return t>=1?cv:t<=-1?-cv:Math.asin(t)}sv(3);const fv={draw(t,e){const n=sv(e/lv);t.moveTo(n,0),t.arc(0,0,n,0,uv)}},pv={draw(t,e){const n=sv(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()}},dv=sv(1/3),gv=2*dv,_v={draw(t,e){const n=sv(e/gv),i=n*dv;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},mv={draw(t,e){const n=sv(e),i=-n/2;t.rect(i,i,n,n)}},yv=av(lv/10)/av(7*lv/10),vv=av(uv/10)*yv,xv=-nv(uv/10)*yv,bv={draw(t,e){const n=sv(.8908130915292852*e),i=vv*n,r=xv*n;t.moveTo(0,-n),t.lineTo(i,r);for(let e=1;e<5;++e){const a=uv*e/5,s=nv(a),o=av(a);t.lineTo(o*n,-s*n),t.lineTo(s*i-o*r,o*i+s*r)}t.closePath()}},wv=sv(3),Sv={draw(t,e){const n=-sv(e/(3*wv));t.moveTo(0,2*n),t.lineTo(-wv*n,-n),t.lineTo(wv*n,-n),t.closePath()}},Mv=(sv(3),-.5),Ev=sv(3)/2,Av=1/sv(12),Cv=3*(Av/2+1),kv={draw(t,e){const n=sv(e/Cv),i=n/2,r=n*Av,a=i,s=n*Av+n,o=-a,l=s;t.moveTo(i,r),t.lineTo(a,s),t.lineTo(o,l),t.lineTo(Mv*i-Ev*r,Ev*i+Mv*r),t.lineTo(Mv*a-Ev*s,Ev*a+Mv*s),t.lineTo(Mv*o-Ev*l,Ev*o+Mv*l),t.lineTo(Mv*i+Ev*r,Mv*r-Ev*i),t.lineTo(Mv*a+Ev*s,Mv*s-Ev*a),t.lineTo(Mv*o+Ev*l,Mv*l-Ev*o),t.closePath()}};function Tv(t,e){let n=null,i=Zy(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:Vy(t||fv),e="function"==typeof e?e:Vy(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"==typeof e?e:Vy(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Vy(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var Pv=function(t,e){var n=Lm(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.noDataShapeWidth=25,n.noDataShapeHeight=20,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:3,shapePadding:5,shapeOffset:{x:0,y:0},shapeFill:"white",shapeStroke:null,labelOffset:{x:10,y:0},decimals:0,labelFormatter:void 0,_totalBarsHeight:0,_totalD3SymbolsHeight:0,noData:!1,noDataText:"No data"},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,marginTop:30,shapeWidth:25,shapeHeight:20,shapePadding:1,labelOffset:{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},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 i=n.map;t.append("rect").attr("class","em-legend-rect").style("fill",i.noDataFillStyle()).attr("width",n.colorLegend?n.colorLegend.shapeWidth:n.noDataShapeWidth).attr("height",n.colorLegend?n.colorLegend.shapeHeight:n.noDataShapeHeight).on("mouseover",(function(){s(n.map,"nd"),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,s,"nd")})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o,"nd")})),t.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend?n.colorLegend.shapeWidth+n.colorLegend.labelOffset.x:n.noDataShapeWidth+5).attr("y",n.colorLegend?n.colorLegend.shapeHeight/2:n.noDataShapeHeight/2).text(e)}function s(t,e){var i="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(i="#em-user-regions");var r=t.selectAll(i).selectAll("[ecl='"+e+"']");r.style("fill",t.hoverColor()),r.attr("fill___",(function(){Ft(this).style("fill")}))}function o(t,e){var i="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(i="#em-user-regions"),t.selectAll(i).selectAll("[ecl='"+e+"']").style("fill",(function(){Ft(this).attr("fill___")}))}function l(t,e,i,r,a){var s="triangle"==n.map.psShape_||"diamond"==n.map.psShape_?i:i/2;0==n.sizeLegend._totalD3SymbolsHeight&&(n.sizeLegend._totalD3SymbolsHeight+=s+n.boxPadding);var o=t.classifierSize_(t.classifierSize_.domain()[1]),l=o,c=(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+n.sizeLegend._totalD3SymbolsHeight+(n.sizeLegend.shapePadding*r-1);n.sizeLegend._totalD3SymbolsHeight+=i;var u=n._sizeLegendNode.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-size-legend-item"),f=h().size(i*i)();u.append("g").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).append("path").attr("d",f).attr("transform",(function(){return"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var p=o/2+n.sizeLegend.labelOffset.x+n.boxPadding;u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",p).attr("y",0).text(a(e))}function c(t,e,i,r,a){var s,o=n.boxPadding;if(t.customSymbols.prevSymb||(s=n.boxPadding+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+20,t.customSymbols.initialTranslateY=s,t.customSymbols.prevScale=i),t.customSymbols.prevSymb){var l=t.customSymbols.prevSymb.node().getBBox();t.customSymbols.nodeHeights=t.customSymbols.nodeHeights+l.height*t.customSymbols.prevScale,s=t.customSymbols.initialTranslateY+t.customSymbols.nodeHeights+n.sizeLegend.shapePadding*(r-1),t.customSymbols.prevScale=i}var c=n._sizeLegendNode.append("g").attr("transform","translate(".concat(o,",").concat(s,")")).attr("class","em-size-legend-item");t.customSymbols.prevSymb=c.append("g").attr("class","em-size-legend-symbol").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(n.map.psCustomSVG_).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,") scale(").concat(i,")"):"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var u=o+t.classifierSize_(t.classifierSize_.domain()[0])+n.sizeLegend.labelOffset.x,h=n.sizeLegend.shapeOffset.y/2+1;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",h).text(a(e))}function u(t,e,i,r,a){var s=n.boxPadding,o=n.boxPadding+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+n.sizeLegend._totalBarsHeight+10;n.sizeLegend._totalBarsHeight+=i+10;var l=h().size(i*i)(),c=n._sizeLegendNode.append("g").attr("transform","translate(".concat(s,",").concat(o,")")).attr("class","em-size-legend-item");c.append("g").style("fill",(function(e){return t.classifierColor_?n.sizeLegend.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",n.sizeLegend.shapeStroke?n.sizeLegend.shapeStroke:t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",l).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,") scale(").concat(i,")"):"translate(".concat(n.sizeLegend.shapeOffset.x,",").concat(n.sizeLegend.shapeOffset.y,")")}));var u=s+n.map.psBarWidth_+n.sizeLegend.labelOffset.x,f=i/2+n.sizeLegend.labelOffset.y;c.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",u).attr("y",f).text(a(e))}function h(){var t;if(n.map.psCustomSVG_)t=n.map.psCustomSVG_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=Tv().type({draw:function(t,e){var i=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,i),t.lineTo(n.map.psBarWidth_,i),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=Lv[n.map.psShape_]||Lv.circle;t=Tv().type(e)}return t}function s(t,e){var n=t.svg_.selectAll("#em-prop-symbols").selectAll("[ecl]");n.each((function(t,e){Ft(this.childNodes[0]).style("fill","white")})),n.filter("[ecl='"+e+"']").each((function(t,e){var n=Ft(this.childNodes[0]);n.style("fill",n.attr("fill___"))}))}function o(t){t.svg_.selectAll("#em-prop-symbols").selectAll("[ecl]").each((function(t,e){var n=Ft(this.childNodes[0]);n.style("fill",n.attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()){var e=n.map,i=n.lgg;i.selectAll("*").remove(),n.makeBackgroundBox(),n.sizeLegend._totalBarsHeight=0,n.sizeLegend._totalD3SymbolsHeight=0,n._sizeLegendNode=i.append("g").attr("class","size-legend-container"),e.classifierSize_&&function(e){if(!e.psCustomSVG_&&"circle"==e.psShape_){if(function(t){var e=t.classifierSize_.domain();n.sizeLegend.values?n._sizeLegendValues=n.sizeLegend.values:n._sizeLegendValues=[Math.floor(e[1]),Math.floor(e[1]/2),Math.floor(e[0])];!n.sizeLegend.title&&n.title&&(n.sizeLegend.title=n.title);n.sizeLegend.title&&n._sizeLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.sizeLegend.title);var i=t.classifierSize_(Gt(n._sizeLegendValues)),r=n.boxPadding+i,a=n.boxPadding+2*i+(n.sizeLegend.title?n.titleFontSize+n.sizeLegend.titlePadding:0)+20,s=n._sizeLegendNode.append("g").attr("transform","translate(".concat(r,",").concat(a,")")).attr("class","circle-legend").attr("text-anchor","right").style("fill","black").selectAll("g").data(n._sizeLegendValues.filter((function(e){return t.classifierSize_(e)}))).join("g").attr("class","em-legend-item");s.append("circle").attr("class","em-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.classifierSize_(e)})).attr("r",t.classifierSize_),s.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("y",(function(e,n){return-1-2*t.classifierSize_(e)})).attr("x",i+5).text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),s.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.classifierSize_(e)})).attr("x2",i+5).attr("y2",(function(e,n){return-1-2*t.classifierSize_(e)}))}(e,n.sizeLegend),n.sizeLegend.noData){var i=n._sizeLegendNode.node().getBBox().height+25,r=n.boxPadding;a(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(r,",").concat(i,")")),n.sizeLegend.noDataText)}return}if("spike"==e.psShape_)return void function(t){var e=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.psSpikeWidth_;return"M".concat(-n/2,",0L0,").concat(-e,"L").concat(n/2,",0")},i=t.classifierSize_(t.classifierSize_.domain()[1]),r=n.sizeLegend.values||t.classifierSize_.ticks(4).slice(1),s=Qn("em-legend-label"),o=s-2,l=n._sizeLegendNode.append("g").attr("id","em-spike-legend").attr("transform","translate(".concat(n.boxPadding+5,",0)")).attr("fill","black").attr("text-anchor","middle").style("font-size","".concat(s,"px")).selectAll().data(r).join("g").attr("transform",(function(t,e){return"translate(".concat(40*e+n.boxPadding,",").concat(i+5,")")}));if(l.append("path").attr("fill",t.psFill_).attr("fill-opacity",t.psFillOpacity_).attr("stroke",t.psStroke_).attr("stroke-width",t.psStrokeWidth_).attr("d",(function(n){return e(t.classifierSize_(n))})),l.append("text").attr("class","em-legend-label").attr("dy",o).text((function(e){return t.classifierSize_.tickFormat(4,"s")(e)})),n.sizeLegend.noData){var c=i+o+s+5,u=n.boxPadding;a(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(u,",").concat(c,")")),n.sizeLegend.noDataText)}}(e,n.sizeLegend);var s=n.sizeLegend.labelFormatter||ni;n.sizeLegend.title&&n._sizeLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.sizeLegend.title);var o=e.classifierSize_.domain(),h=o[1];n.sizeLegend.values&&(n.sizeLegend.cellNb=n.sizeLegend.values.length);e.customSymbols={nodeHeights:0};for(var f=1;f<n.sizeLegend.cellNb+1;f++){var p=n.ascending?n.sizeLegend.cellNb-f+1:f,d=n.sizeLegend.values?n.sizeLegend.values[p-1]:h/p,g=e.classifierSize_(d);"bar"==e.psShape_?u(t,d,g,f,s):"custom"==e.psShape_||e.psCustomSVG_?c(t,d,g,f,s):l(t,d,g,f,s)}if(n.sizeLegend.noData){var _=n._sizeLegendNode.node().getBBox().height;n.colorLegend&&(_+=n.colorLegend.shapeHeight+5);var m=n.boxPadding;a(n._sizeLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(m,",").concat(_,")")),n.sizeLegend.noDataText)}}(e,n.sizeLegend),n._colorLegendNode=i.append("g").attr("class","color-legend-container"),n._sizeLegendNode&&n._colorLegendNode.attr("transform","translate(0,".concat(n._sizeLegendNode.node().getBBox().height,")")),e.classifierColor_&&n.colorLegend&&function(t){"ranges"===n.colorLegend.labelType?function(t){var e=n.colorLegend.labelFormatter||ni,i=function(){var t=n.map,e=t.psThresholds_.length>1?t.psThresholds_:Array.from({length:t.psClasses_}).map((function(e,i){return t.classifierColor_.invertExtent(i)[n.ascending?0:1]})).slice(1);return e}(),r=t.psClasses_;n.colorLegend.title&&n._colorLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.titleFontSize+n.colorLegend.marginTop).text(n.colorLegend.title);for(var l=n.boxPadding,c=function(a){var c=n.titleFontSize+n.colorLegend.titlePadding+n.colorLegend.marginTop+a*(n.colorLegend.shapeHeight+n.colorLegend.shapePadding),u=n.ascending?a:r-a-1,h=n._colorLegendNode.append("g").attr("transform","translate(".concat(l,",").concat(c,")")).attr("class","em-legend-item");h.append("rect").attr("class","em-legend-rect").style("fill",t.psClassToFillStyle()(u,r)).attr("width",n.colorLegend.shapeWidth).attr("height",n.colorLegend.shapeHeight).on("mouseover",(function(){s(n.map,u),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,s,u)})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o)})),h.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend.shapeWidth+n.colorLegend.labelOffset.x).attr("y",n.colorLegend.shapeHeight/2).text((function(){return n.colorLegend.labels?n.colorLegend.labels[a]:0===a?"> ".concat(e(i[i.length-1])):a===i.length?"< ".concat(e(i[0])):"".concat(e(i[i.length-a-1])," - < ").concat(e(i[i.length-a]))}))},u=0;u<r;u++)c(u);if(n.colorLegend.noData){var h=n.titleFontSize+n.colorLegend.marginTop+r*n.colorLegend.shapeHeight+20;a(n._colorLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(l,",").concat(h,")")),n.colorLegend.noDataText)}}(t):function(t){var e=n.colorLegend.labelFormatter||ni;n.colorLegend.title&&n._colorLegendNode.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.titleFontSize+n.colorLegend.marginTop).text(n.colorLegend.title);for(var i=n.boxPadding,r=t.psClasses_,l=function(){var a=n.titleFontSize+n.colorLegend.titlePadding+n.colorLegend.marginTop+c*n.colorLegend.shapeHeight,l=n.ascending?c:r-c-1,u=n._colorLegendNode.append("g").attr("transform","translate(".concat(i,",").concat(a,")")).attr("class","em-legend-item");u.append("rect").attr("class","em-legend-rect").style("fill",t.psClassToFillStyle()(l,r)).attr("width",n.colorLegend.shapeWidth).attr("height",n.colorLegend.shapeHeight).on("mouseover",(function(){s(n.map,l),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,s,l)})).on("mouseout",(function(){o(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,o,l)})),c>0&&u.append("line").attr("class","em-legend-separator").attr("x1",0).attr("y1",0).attr("x2",0+n.colorLegend.sepLineLength).attr("y2",0),c>0&&u.append("line").attr("class","em-legend-tick").attr("x1",n.colorLegend.shapeWidth).attr("y1",0).attr("x2",n.colorLegend.sepLineLength+n.colorLegend.tickLength).attr("y2",0),c<r-1&&u.append("text").attr("class","em-legend-label").attr("dy","0.35em").attr("x",n.colorLegend.sepLineLength+n.colorLegend.tickLength+n.colorLegend.labelOffset.x).attr("y",n.colorLegend.shapeHeight).text(n.colorLegend.labels?n.colorLegend.labels[c]:e(t.classifierColor_.invertExtent(n.ascending?l+1:l-1)[n.ascending?0:1]))},c=0;c<r;c++)l();if(n.colorLegend.noData){var u=n.titleFontSize+n.colorLegend.marginTop+r*n.colorLegend.shapeHeight+20;a(n._colorLegendNode.append("g").attr("class","em-no-data-legend").attr("transform","translate(".concat(i,",").concat(u,")")),n.colorLegend.noDataText)}}(t)}(e,n.colorLegend);var r=n.lgg.node().getBBox().height;zm(t,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:r+n.boxPadding+5}),n.setBoxDimension()}},n},Nv=function(t){var e=Om(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){e.psClassToFillStyle()||e.psClassToFillStyle(Fv(e.psColorFun_,e.psColors_));var i=t.statData("size").getArray()?t.statData("size"):t.statData();if(t.svg_){var o,l;t.svg_.selectAll(":not(#em-insets-group) g.em-centroid > *").remove(),function(t){var e,i,r=t.svg_.select("#em-prop-symbols"),a=null!==(e=t.statData("size"))&&void 0!==e&&null!==(i=e.getArray)&&void 0!==i&&i.call(e)?t.statData("size"):t.statData();if(t.Geometries.centroidFeatures){var s=t.Geometries.centroidFeatures.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(s,(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)}}(t),l=e.psCustomSVG_?function(t,n){return t.svg().select("#em-prop-symbols").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,i):"bar"==e.psShape_?function(t,n){return t.svg().select("#em-prop-symbols").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,i):"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"DE"==t.properties.id&&console.log(e),e&&":"!==e.value&&e.value})).append("circle").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}));return i}(t,i):"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,i):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=Lv[e.psShape_]||Lv.circle;return Tv().type(a).size(r*r)()}}}))}(t,i),e.dorling_?function(t,n){var i=t.svg().selectAll("g.em-centroid");e.simulation&&s();console.log("new dorling simulation"),e.simulation=Ly(t.Geometries.centroidFeatures).force("x",function(t){var e,n,i,r=Gy(.1);function a(t){for(var r,a=0,s=e.length;a<s;++a)(r=e[a]).vx+=(i[a]-r.x)*n[a]*t}function s(){if(e){var a,s=e.length;for(n=new Array(s),i=new Array(s),a=0;a<s;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=Gy(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:Gy(+t),s(),a):r},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Gy(+e),s(),a):t},a}((function(t){return t.properties.centroid[0]})).strength(e.dorlingStrength_.x)).force("y",function(t){var e,n,i,r=Gy(.1);function a(t){for(var r,a=0,s=e.length;a<s;++a)(r=e[a]).vy+=(i[a]-r.y)*n[a]*t}function s(){if(e){var a,s=e.length;for(n=new Array(s),i=new Array(s),a=0;a<s;++a)n[a]=isNaN(i[a]=+t(e[a],a,e))?0:+r(e[a],a,e)}}return"function"!=typeof t&&(t=Gy(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(r="function"==typeof t?t:Gy(+t),s(),a):r},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Gy(+e),s(),a):t},a}((function(t){return t.properties.centroid[1]})).strength(e.dorlingStrength_.y)).force("collide",function(t){var e,n,i,r=1,a=1;function s(){for(var t,s,l,c,u,h,f,p=e.length,d=0;d<a;++d)for(s=Ry(e,Wy,Hy).visitAfter(o),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,s.visit(g);function g(t,e,n,a,s){var o=t.data,p=t.r,d=h+p;if(!o)return e>c+d||a<c-d||n>u+d||s<u-d;if(o.index>l.index){var g=c-o.x-o.vx,_=u-o.y-o.vy,m=g*g+_*_;m<d*d&&(0===g&&(m+=(g=Uy(i))*g),0===_&&(m+=(_=Uy(i))*_),m=(d-(m=Math.sqrt(m)))/m*r,l.vx+=(g*=m)*(d=(p*=p)/(f+p)),l.vy+=(_*=m)*d,o.vx-=g*(d=1-d),o.vy-=_*d)}}}function o(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=Gy(null==t?1:+t)),s.initialize=function(t,n){e=t,i=n,l()},s.iterations=function(t){return arguments.length?(a=+t,s):a},s.strength=function(t){return arguments.length?(r=+t,s):r},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Gy(+e),l(),s):t},s}((function(t){var i=n.get(t.properties.id),r=i?e.classifierSize_(i.value):0;return"square"===e.psShape_?r/2*Math.SQRT2:r})).iterations(e.dorlingIterations_)).on("tick",(function(){i.attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}))}))}(t,i):e.simulation&&s(),r(t,i);var c=oi(t),u=t.svg().selectAll(c);"WORLD"!==t.geo_&&("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=Ft(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=Ft(this),r=i.attr("lvl"),a=i.style("stroke-width"),s=n.get(t.properties.id);if(s&&s.value)return"WORLD"==e.geo_&&"0"!==r?a||"#777":void 0}))}(t,i,u),u.attr("ecl",(function(t){var e=i.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.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=Ft(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle_||"gray"}return e.psFill_})).attr("fill___",(function(){return Ft(this).style("fill")}))}(l),a(t),null!==(o=e.labels_)&&void 0!==o&&o.values&&e.updateValuesLabels(t),e.patternFill_&&yy(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.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=Gv,e.dorling_=!1,e.dorlingStrength_={x:1,y:1},e.dorlingIterations_=1,e.psCodeLabels_=!1,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","psSizeScale_","noDataFillStyle_","psThresholds_","psColors_","psCustomSVG_","psOffset_","psClassificationMethod_","psClasses_","dorling_","dorlingStrength_","psSpikeWidth_","psCodeLabels_","dorlingIterations_"].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_=Fv(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=function(t){return y(Array(t).keys())},r=(e.statData("size").getArray()||e.statData().getArray()).filter((function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)})),a=Ty(r),s=Yn(a,2),o=s[0],l=s[1],c=null!==(t=e.psMinValue_)&&void 0!==t?t:o,u=null!==(n=e.psMaxValue_)&&void 0!==n?n:l,h=r?[c,u]:[e.statData().getMin(),e.statData().getMax()],f="sqrt"==e.psSizeScale_?ky:Sn;if(e.classifierSize(f().domain(h).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassificationMethod_){var p=e.statData("color").getArray(),d=i(e.psClasses_);e.classifierColor(Ht().domain(p).range(d))}else if("equinter"===e.psClassificationMethod_){var g=e.statData("color").getArray(),_=i(e.psClasses_);e.classifierColor(Mn().domain([c(g),u(g)]).range(_)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassificationMethod_){e.psClasses(e.psThresholds().length+1);var m=i(e.psClasses_);e.classifierColor(En().domain(e.psThresholds()).range(m))}}(),e.insetTemplates_&&ii(e.insetTemplates_,e.svgId_,n),n(e),e}catch(t){console.error("Error in proportional symbols classification: "+t.message),console.error(t)}};var r=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),s=a?e.classifierSize_(a.value):0,o=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_&&(o-=.4),"".concat(s*o,"px")})).attr("fill",si(e.psFill_)).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",si(e.psFill_)).attr("dy",(function(t){return e.psCodeLabels_?"0.6em":"0"}))},a=function(t){t.svg().selectAll("g.em-centroid").on("mouseover",(function(t,n){var i=Ft(this.childNodes[0]);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(t){var n=Ft(this.childNodes[0]),i=n.attr("fill___");i&&(n.style("fill",i),e._tooltip&&e._tooltip.mouseout())}))};function s(){e.simulation.stop(),e.simulation.on("tick",null),e.simulation.on("end",null),e.simulation=null}return e.updateStyle=function(){try{if(i(e),e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var n=0;n<e.insetTemplates_[t].length;n++)if(Array.isArray(e.insetTemplates_[t][n]))for(var r=0;r<e.insetTemplates_[t][n].length;r++)e.insetTemplates_[t][n][r].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n][r]);else e.insetTemplates_[t][n].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n]);else e.insetTemplates_[t].svgId_!==e.svgId_&&i(e.insetTemplates_[t]);return e}catch(t){console.error("Error in proportional symbols styling: "+t.message),console.error(t)}},e.getLegendConstructor=function(){return Pv},e},Fv=function(t,e){return t=t||Py,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Lv={cross:pv,square:mv,diamond:_v,triangle:Sv,star:bv,wye:kv,circle:fv},Gv=function(t,e){if(e.tooltip_.omitRegions&&e.tooltip_.omitRegions.includes(t.properties.id))return"";var n=[],i=t.properties.na,r=t.properties.id;n.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(i,"</b>").concat(r?" (".concat(r,")"):"","\n </div>\n "));var a=e.statData("size").getArray()?e.statData("size"):e.statData(),s=a.get(t.properties.id);if(!s||0!=s.value&&!s.value)n.push(e.noDataText_);else{var o=a.unitText();n.push('<div class="estat-vis-tooltip-text">'.concat(ni(s.value)," ").concat(o||" ","</div>"))}if(e.statData("color").getArray()){var l=e.statData("color").get(t.properties.id);if(!l||0!=l.value&&!l.value)n.push(e.noDataText_);else{var c=e.statData("color").unitText();n.push('<div class="estat-vis-tooltip-text">'.concat(ni(l.value)," ").concat(c||" ","</div>"))}}return n.join("")};const Ov=An("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var Dv=function(t,e){var n=Lm(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",n.order=void 0,e)for(var i in e)n[i]=e[i];function r(t,e){var i="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(i="#em-user-regions");var r=t.svg_.selectAll(i).selectAll("[ecl]");r.style("fill","white"),r.filter("[ecl='"+e+"']").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}function a(t){var e="WORLD"===n.geo_?"#em-worldrg":"#em-nutsrg";t.Geometries.userGeometries&&(e="#em-user-regions"),t.svg_.selectAll(e).selectAll("[ecl]").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}return n.update=function(){if(n.updateConfig(),n.updateContainer(),n.lgg.node()&&n.map.classifier_){var t=n.map,e=n.lgg;n.makeBackgroundBox(),n.title&&e.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title);for(var i=t.classToFillStyle()?Object.keys(t.classToFillStyle()):t.classifier_.domain(),s=n.order?n.order:i,o=function(){var i=s[l],o=t.classifier_(i),c=t.classToFillStyle_[i],u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+l*(n.shapeHeight+n.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",c).on("mouseover",(function(){r(n.map,o),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.svgId_,r,o)})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.svgId_,a,o)})),e.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",u+.5*n.shapeHeight).attr("dy","0.35em").text(t.classToText()?t.classToText()[i]:i)},l=0;l<s.length;l++)o();if(n.noData){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+s.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).style("fill",t.noDataFillStyle_).on("mouseover",(function(){r(n.map,"nd"),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.svgId_,r,"nd")})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.svgId_,a,"nd")})),e.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",c+.5*n.shapeHeight).attr("dy","0.35em").text(n.noDataText)}var u=n.lgg.node().getBBox().height;zm(t,n.lgg,{shapeWidth:n.shapeWidth,shapeHeight:n.shapeHeight,labelOffset:n.labelOffset,boxPadding:n.boxPadding,offsetY:u+n.boxPadding+5}),n.setBoxDimension()}},n},zv=function(t,e){var n=[];t.properties.id?n.push('<div class="estat-vis-tooltip-bar">'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-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="estat-vis-tooltip-text">\n <table class="nuts-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="estat-vis-tooltip-text">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n '.concat(r,"\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n")),n.join("")},Iv=Array.prototype.slice;function Rv(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function jv(t){this._context=t}function qv(t){return new jv(t)}function Bv(t){return t[0]}function Uv(t){return t[1]}function Wv(t,e){var n=Vy(!0),i=null,r=qv,a=null,s=Zy(o);function o(o){var l,c,u,h=(o=Rv(o)).length,f=!1;for(null==i&&(a=r(u=s())),l=0;l<=h;++l)!(l<h&&n(c=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(c,l,o),+e(c,l,o));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Bv:Vy(t),e="function"==typeof e?e:void 0===e?Uv:Vy(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Vy(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Vy(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Vy(!!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}jv.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 Hv=function(t,e){var n=Lm(t);if(n.squareSize=100,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.axisTitleFontSize=Qn("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.noData=!0,n.noDataShapeHeight=20,n.noDataShapeWidth=25,n.noDataText="No data",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=li(t),r=t.svg_.selectAll(i).selectAll("[ecl1]");r.style("fill","white"),r.filter("[ecl1='".concat(e,"']")).filter("[ecl2='".concat(n,"']")).each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}function a(t){var e=li(t);t.svg_.selectAll(e).selectAll("[ecl1]").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}return n.update=function(){var e,i;n.updateConfig(),n.updateContainer(),n._horizontalOffset=n.axisTitleFontSize+n.arrowPadding,n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&n.lgg.append("text").attr("class","em-legend-title").attr("x",xc+n._horizontalOffset).attr("y",n.boxPadding+n.titleFontSize).text(n.title),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,s=0===n.rotation?0:.7071*n.squareSize+n.boxPadding,o=0,l=t.append("g").attr("class","bivariate-squares-chart").attr("transform","translate(".concat(n.boxPadding+n._horizontalOffset,",").concat(s+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,s=e-h-1,u=n.map.classToFillStyle()(t,s);l.append("rect").attr("class","em-bivariate-square").attr("x",o+(e-1-c)*i).attr("y",h*i).attr("width",i).attr("height",i).style("fill",u).on("mouseover",(function(){r(n.map,t,s),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,r,t,s),Ft(this).raise()})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,a,t,s)}))},h=0;h<e;h++)u();l.append("rect").attr("class","em-bivariate-frame").attr("x",o).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("stroke-width",.7)}(),n.breaks1||n.breaks2||!n.showBreaks||(n.breaks1=t.classifier1_.quantiles().map((function(t){return parseFloat(t.toFixed(0))})),n.breaks2=t.classifier2_.quantiles().map((function(t){return parseFloat(t.toFixed(0))}))),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 s=0;s<n.breaks1.length;s++){var o=e+r*(s+1),l=n.squareSize+Qn("em-bivariate-tick-label");a.append("text").attr("class","em-bivariate-tick-label").attr("x",o+n.xAxisLabelsOffset.x).attr("y",l+n.xAxisLabelsOffset.y).text(n.breaks1[s]),a.append("line").attr("class","em-bivariate-tick").attr("x1",o).attr("x2",o).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(y(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+=Qn("em-bivariate-tick-label")/1.5);i.append("path").attr("class","em-bivariate-axis-arrow").attr("d",Wv()([[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",Wv()([[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+=Qn("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 s=(n.axisArrows?n._yAxisArrowX-n.arrowPadding:7)+(-45==n.rotation?-4:-10);(n.showBreaks||n.breaks1&&n.breaks2)&&(r+=Qn("em-bivariate-tick-label"));var o=-n.squareSize;n.yAxisTitleOffset&&(s+=n.yAxisTitleOffset.y);n.yAxisTitleOffset&&(o+=n.yAxisTitleOffset.x);i.append("text").attr("class","em-bivariate-axis-title em-bivariate-axis-title-y").attr("x",o).attr("y",s).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&&(e=0===n.rotation?n.noDataYOffset+n.squareSize/n.map.numberOfClasses_+n.arrowHeight/2:n.noDataYOffset,i=0===n.rotation?n._y+n.squareSize+e:n._y+1.4142*n.squareSize+2*n.boxPadding+e,n.lgg.append("rect").attr("class","em-bivariate-nodata").attr("x",n.boxPadding+n.noDataShapeWidth/2).attr("y",i+(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_?pi("#em-nutsrg"):Ft("#em-nutsrg")).selectAll("[nd='nd']").style("fill","red")})).on("mouseout",(function(){("mixed"==n.map.nutsLevel_?pi("#em-nutsrg"):Ft("#em-nutsrg")).selectAll("[nd='nd']").style("fill",(function(){return Ft(this).attr("fill___")})),Ft(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",i+.5*n.noDataShapeHeight+1+(0==n.rotation?0:-10)).text(n.noDataText)),n.setBoxDimension()},n},Vv=function(t,e,n,i,r){for(var a=[],s=ze(e,n),o=ze(i,r),l=0;l<t;l++){for(var c=l/(t-1),u=ze(s(c),o(c)),h=[],f=0;f<t;f++)h.push(u(f/(t-1)));a.push(h)}return function(t,e){return a[t][e]}},$v=function(t,e){var n=[],i=t.properties.na||t.properties.name;t.properties.id?n.push('<div class="estat-vis-tooltip-bar" >'+i+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-tooltip-bar" >'+i+"</div>");var r=e.statData("v1").get(t.properties.id),a=e.statData("v1").unitText(),s=e.statData("v2").get(t.properties.id),o=e.statData("v2").unitText();return n.push('\n <div class="estat-vis-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n '.concat(r&&r.value?ni(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(s&&s.value?ni(s.value):""," ").concat(o&&s&&s.value?o:"","\n ").concat(!s||0!=s.value&&!s.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")},Yv=function(t,e){var n=Lm(t);if(n.width=230,n.height=230,n.label1="Variable 1",n.label2="Variable 2",n.label3="Variable 3",n.axisTitleFontSize=Qn("em-bivariate-axis-title"),n.showBreaks=!1,n.noData=!0,n.noDataShapeHeight=20,n.noDataShapeWidth=25,n.noDataText="No data",n.boxPadding=60,n.noDataYOffset=20,n.arrowHeight=15,n.arrowWidth=14,n.arrowPadding=10,e)for(var i in e)n[i]=e[i];return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.lgg;n.map.numberOfClasses();t.selectAll("*").remove(),n.makeBackgroundBox();var e=t.append("g").attr("transform","translate(".concat(n.boxPadding,", ").concat(n.boxPadding,")"));n.title&&e.append("text").attr("class","em-legend-title").attr("x",0).attr("y",n.titleFontSize).text(n.title);var i=[n.label1,n.label2,n.label3];!function(t,e,n){var i=50,r=50,a=30,s=1.2*a,o=i+s,l=r,c=i+s/2,u=r+Math.sqrt(3)*s/2,h=Math.sqrt(Math.pow(a,2)-Math.pow(s/2,2)),f=c,p=r-h,d=c,g=r+h,_=h*Math.sqrt(3)/2,m=h/2,y=(i+c)/2,v=(o+c)/2,x=(r+u)/2,b=[f,y-_,v+_,d,y+_,v-_],w=[p,x+m,x+m,g,x-m,x-m],S=function(t){var e=Yn(t,6),n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],l=e[5];return"M ".concat(n," ").concat(s,"\n A ").concat(a," ").concat(a," 0 0 1 ").concat(i," ").concat(o,"\n A ").concat(a," ").concat(a," 0 0 0 ").concat(r," ").concat(l,"\n A ").concat(a," ").concat(a," 0 0 1 ").concat(n," ").concat(s)},M=function(t){var e=Yn(t,6),n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],l=e[5];return"M ".concat(n," ").concat(s,"\n A ").concat(a," ").concat(a," 0 0 0 ").concat(i," ").concat(o,"\n A ").concat(a," ").concat(a," 0 0 0 ").concat(r," ").concat(l,"\n A ").concat(a," ").concat(a," 0 1 1 ").concat(n," ").concat(s)},E=function(t){var e=Yn(t,6),n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],l=e[5];return"M ".concat(n," ").concat(s,"\n A ").concat(a," ").concat(a," 0 0 1 ").concat(i," ").concat(o,"\n A ").concat(a," ").concat(a," 0 0 1 ").concat(r," ").concat(l,"\n A ").concat(a," ").concat(a," 0 0 1 ").concat(n," ").concat(s)},A=[[1,5,6],[3,4,5],[2,6,4]],C=[[5,4,6]];[[3,5,1],[2,4,3],[1,6,2]].forEach((function(n,i){var r=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),a=M(r);t.append("path").attr("d",a).attr("class","segment").attr("fill",e[i]).attr("opacity",1)})),A.forEach((function(n,i){var r,a=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),s=S(a);0==i?r=ai([e[2],e[0]]):1==i?r=ai([e[1],e[0]]):2==i&&(r=ai([e[1],e[2]])),t.append("path").attr("d",s).attr("class","segment").attr("fill",r).attr("opacity",1)})),C.forEach((function(n,i){var r=n.map((function(t){return b[t-1]})).concat(n.map((function(t){return w[t-1]}))),a=E(r),s=ai(e);t.append("path").attr("d",a).attr("class","segment").attr("fill",s).attr("opacity",1)})),t.selectAll("path.segment").on("mouseover",(function(){Ft(this).transition().attr("opacity",.8).duration(500)})).on("mouseout",(function(){Ft(this).transition().attr("opacity",1).duration(500)}));t.append("text").text(n[0]).attr("x",i-a-3).attr("y",i).attr("class","venn-label").attr("text-anchor","end");t.append("text").text(n[1]).attr("x",o+a+3).attr("y",l).attr("class","venn-label"),t.append("text").text(n[2]).attr("x",c).attr("y",u+a+15).attr("class","venn-label").attr("text-anchor","middle")}(e,[n.map.color1_,n.map.color2_,n.map.color3_],i)},n};var Jv=function(t){t.svg().selectAll(oi(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=Ft(this),n=e.attr("ecl"),i=e.attr("lvl");t.properties.id.slice(0,2);return n||"0"===i?"block":"none"}})).style("stroke",(function(){var t=Ft(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=Ft(this),e=t.attr("lvl"),n=t.attr("ecl"),i=t.style("stroke-width");return n&&"0"!==e?i||.2:null}))},Xv=function(t,e){var n=[];t.properties.id?n.push('<div class="estat-vis-tooltip-bar" >'+t.properties.na+" ("+t.properties.id+") </div>"):n.push('<div class="estat-vis-tooltip-bar" >'+t.properties.na+"</div>");var i=e.statData("v1").get(t.properties.id),r=e.statData("v1").unitText(),a=e.statData("v2").get(t.properties.id),s=e.statData("v2").unitText(),o=e.statData("v3").get(t.properties.id),l=e.statData("v2").unitText();return n.push('\n <div class="estat-vis-tooltip-text" style="background: #ffffff;color: #171a22;padding: 4px;font-size:15px;">\n <table class="nuts-table">\n <tbody>\n <tr>\n <td>\n Variable 1: '.concat(i&&i.value?ni(i.value):""," ").concat(r&&i&&i.value?r:"","\n ").concat(!i||0!=i.value&&!i.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n Variable 2: ").concat(a&&a.value?ni(a.value):""," ").concat(s&&a&&a.value?s:"","\n ").concat(!a||0!=a.value&&!a.value?e.noDataText_:"","\n </td>\n </tr>\n <tr>\n <td>\n Variable 3: ").concat(o&&o.value?ni(o.value):""," ").concat(l&&o&&o.value?l:"","\n ").concat(!o||0!=o.value&&!o.value?e.noDataText_:"","\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n ")),n.join("")};function Kv(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Qv(t){return t}function Zv(){var t=Qv,e=Kv,n=null,i=Vy(0),r=Vy(uv),a=Vy(0);function s(s){var o,l,c,u,h,f=(s=Rv(s)).length,p=0,d=new Array(f),g=new Array(f),_=+i.apply(this,arguments),m=Math.min(uv,Math.max(-uv,r.apply(this,arguments)-_)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),v=y*(m<0?-1:1);for(o=0;o<f;++o)(h=g[d[o]=o]=+t(s[o],o,s))>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(s[t],s[e])})),o=0,c=p?(m-f*v)/p:0;o<f;++o,_=u)l=d[o],u=_+((h=g[l])>0?h*c:0)+v,g[l]={data:s[l],index:o,value:h,startAngle:_,endAngle:u,padAngle:y};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Vy(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Vy(+t),s):i},s.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Vy(+t),s):r},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Vy(+t),s):a},s}function tx(t){return t.innerRadius}function ex(t){return t.outerRadius}function nx(t){return t.startAngle}function ix(t){return t.endAngle}function rx(t){return t&&t.padAngle}function ax(t,e,n,i,r,a,s){var o=t-n,l=e-i,c=(s?a:-a)/sv(o*o+l*l),u=c*l,h=-c*o,f=t+u,p=e+h,d=n+u,g=i+h,_=(f+d)/2,m=(p+g)/2,y=d-f,v=g-p,x=y*y+v*v,b=r-a,w=f*g-d*p,S=(v<0?-1:1)*sv(iv(0,b*b*x-w*w)),M=(w*v-y*S)/x,E=(-w*y-v*S)/x,A=(w*v+y*S)/x,C=(-w*y+v*S)/x,k=M-_,T=E-m,P=A-_,N=C-m;return k*k+T*T>P*P+N*N&&(M=A,E=C),{cx:M,cy:E,x01:-u,y01:-h,x11:M*(r/b-1),y11:E*(r/b-1)}}function sx(){var t=tx,e=ex,n=Vy(0),i=null,r=nx,a=ix,s=rx,o=null,l=Zy(c);function c(){var c,u,h=+t.apply(this,arguments),f=+e.apply(this,arguments),p=r.apply(this,arguments)-cv,d=a.apply(this,arguments)-cv,g=tv(d-p),_=d>p;if(o||(o=c=l()),f<h&&(u=f,f=h,h=u),f>ov)if(g>uv-ov)o.moveTo(f*nv(p),f*av(p)),o.arc(0,0,f,p,d,!_),h>ov&&(o.moveTo(h*nv(d),h*av(d)),o.arc(0,0,h,d,p,_));else{var m,y,v=p,x=d,b=p,w=d,S=g,M=g,E=s.apply(this,arguments)/2,A=E>ov&&(i?+i.apply(this,arguments):sv(h*h+f*f)),C=rv(tv(f-h)/2,+n.apply(this,arguments)),k=C,T=C;if(A>ov){var P=hv(A/h*av(E)),N=hv(A/f*av(E));(S-=2*P)>ov?(b+=P*=_?1:-1,w-=P):(S=0,b=w=(p+d)/2),(M-=2*N)>ov?(v+=N*=_?1:-1,x-=N):(M=0,v=x=(p+d)/2)}var F=f*nv(v),L=f*av(v),G=h*nv(w),O=h*av(w);if(C>ov){var D,z=f*nv(x),I=f*av(x),R=h*nv(b),j=h*av(b);if(g<lv)if(D=function(t,e,n,i,r,a,s,o){var l=n-t,c=i-e,u=s-r,h=o-a,f=h*l-u*c;if(!(f*f<ov))return[t+(f=(u*(e-a)-h*(t-r))/f)*l,e+f*c]}(F,L,R,j,z,I,G,O)){var q=F-D[0],B=L-D[1],U=z-D[0],W=I-D[1],H=1/av(function(t){return t>1?0:t<-1?lv:Math.acos(t)}((q*U+B*W)/(sv(q*q+B*B)*sv(U*U+W*W)))/2),V=sv(D[0]*D[0]+D[1]*D[1]);k=rv(C,(h-V)/(H-1)),T=rv(C,(f-V)/(H+1))}else k=T=0}M>ov?T>ov?(m=ax(R,j,F,L,f,T,_),y=ax(z,I,G,O,f,T,_),o.moveTo(m.cx+m.x01,m.cy+m.y01),T<C?o.arc(m.cx,m.cy,T,ev(m.y01,m.x01),ev(y.y01,y.x01),!_):(o.arc(m.cx,m.cy,T,ev(m.y01,m.x01),ev(m.y11,m.x11),!_),o.arc(0,0,f,ev(m.cy+m.y11,m.cx+m.x11),ev(y.cy+y.y11,y.cx+y.x11),!_),o.arc(y.cx,y.cy,T,ev(y.y11,y.x11),ev(y.y01,y.x01),!_))):(o.moveTo(F,L),o.arc(0,0,f,v,x,!_)):o.moveTo(F,L),h>ov&&S>ov?k>ov?(m=ax(G,O,z,I,h,-k,_),y=ax(F,L,R,j,h,-k,_),o.lineTo(m.cx+m.x01,m.cy+m.y01),k<C?o.arc(m.cx,m.cy,k,ev(m.y01,m.x01),ev(y.y01,y.x01),!_):(o.arc(m.cx,m.cy,k,ev(m.y01,m.x01),ev(m.y11,m.x11),!_),o.arc(0,0,h,ev(m.cy+m.y11,m.cx+m.x11),ev(y.cy+y.y11,y.cx+y.x11),_),o.arc(y.cx,y.cy,k,ev(y.y11,y.x11),ev(y.y01,y.x01),!_))):o.arc(0,0,h,w,b,_):o.lineTo(G,O)}else o.moveTo(0,0);if(o.closePath(),c)return o=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-lv/2;return[nv(i)*n,av(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Vy(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Vy(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Vy(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Vy(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Vy(+t),c):r},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Vy(+t),c):a},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Vy(+t),c):s},c.context=function(t){return arguments.length?(o=null==t?null:t,c):o},c}const ox=An("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var lx=function(t,e){var n=Lm(t);if(n.shapeWidth=25,n.shapeHeight=20,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var i in e)n[i]=e[i];function r(t,e){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ft(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=Ft(this);t.style("fill",t.attr("data-original-fill"))}))}function a(t){t.svg_.selectAll("pattern").selectAll("rect").each((function(){var t=Ft(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&&i.append("text").attr("class","em-legnd-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title);var s=0,o=t.catColors(),l=function(l){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+s*(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",o[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){Ft(this).raise(),r(n.map,l),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,r,l)})).on("mouseout",(function(){a(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,a)})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).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)})),s++};for(var c in o)l(c);if(n.noData){var u=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+s*(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()),Ft(this).style("fill",t.hoverColor())})).on("mouseout",(function(){e.select("#em-nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));Ft(this).style("fill",t.noDataFillStyle())})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).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},cx=function(t,e){var n=Lm(t);if(n.legendSpacing=15,n.sizeLegend={title:null,titlePadding:30,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:25,shapeHeight:20,shapePadding:5,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]);else n[i]=e[i];function a(t,e){var n=t.svg_.selectAll(".piechart").selectAll("path[code]");n.style("fill","white"),n.filter("path[code='"+e+"']").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}function s(t){t.svg_.selectAll(".piechart").selectAll("path[code]").each((function(){Ft(this).style("fill",Ft(this).attr("fill___"))}))}return n.update=function(){n.updateConfig(),n.updateContainer();var t=n.map;n.lgg.selectAll("*").remove(),n.makeBackgroundBox(),t.sizeClassifier_&&function(){var t=n.map,e=n.sizeLegend,i=n.lgg.append("g").attr("class","em-pie-size-legend"),r=t.sizeClassifier_.domain();e.values||(e.values=[Math.floor(r[1]),Math.floor(r[0])]);var a=t.sizeClassifier_(Gt(e.values));!e.title&&n.title&&(e.title=n.title);var s=0;e.title&&(i.append("text").attr("class","em-legend-title").attr("x",0).attr("y",n.boxPadding+n.titleFontSize).text(e.title),s=n.titleFontSize+n.boxPadding+e.titlePadding);var o=s+n.boxPadding+2*a,l=i.selectAll("g").data(e.values).join("g").attr("class","em-pie-size-legend-item").attr("transform","translate(".concat(a+n.boxPadding,", ").concat(o,")"));l.append("circle").attr("class","em-pie-size-legend-circle").style("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").attr("class","em-legend-label").attr("y",(function(e){return-2*t.sizeClassifier_(e)-n.labelFontSize-2})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").attr("class","em-pie-size-legend-line").attr("x1",2).attr("x2",30).attr("y1",(function(e){return-2*t.sizeClassifier_(e)})).attr("y2",(function(e){return-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=o}(),function(){var t=n.map,e=n.colorLegend,i=n.lgg.append("g").attr("class","em-pie-color-legend");e.title&&i.append("text").attr("class","em-legend-title").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(e.title);var r=0,o=t.catColors(),l=function(l){var c=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(e.title?n.titleFontSize+n.boxPadding:0)+r*(e.shapeHeight+e.shapePadding);t.catColors()[l];i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",c).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",o[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){a(n.map,l),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,a,l)})).on("mouseout",(function(){s(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,s,l)})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+e.shapeWidth+e.labelOffset).attr("y",c+.5*e.shapeHeight).attr("dominant-baseline","middle").text(t.catLabels()[l]||l),r++};for(var c in o)l(c);if(e.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(e.title?n.titleFontSize+n.boxPadding:0)+r*(e.shapeHeight+e.shapePadding);i.append("rect").attr("class","em-legend-rect").attr("x",n.boxPadding).attr("y",u).attr("width",e.shapeWidth).attr("height",e.shapeHeight).style("fill",t.noDataFillStyle()).on("mouseover",(function(){a(n.map,"nd"),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,a,"nd")})).on("mouseout",(function(){s(n.map),n.map.insetTemplates_&&ii(n.map.insetTemplates_,n.map.svgId,s,"nd")})),i.append("text").attr("class","em-legend-label").attr("x",n.boxPadding+e.shapeWidth+e.labelOffset).attr("y",u+.5*e.shapeHeight).text(e.noDataText)}}(),n.setBoxDimension()},n},ux=function(t){var e=Om(t,!0,"pie");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.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].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"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statCodes_=void 0,e.totalCode__=void 0,e.statPie=function(t,n,i,r,a,s){t.filters=t.filters||{};for(var o=0;o<i.length;o++){var l=i[o];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[o]),r&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=r[o])}if(e.statCodes_=i,s){e.totalCode_=s,t.filters[n]=s;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(s,f),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e},e.updateClassification=function(){return e.insetTemplates_&&ii(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,a=(i=[],e.svg().selectAll("#em-prop-symbols").selectAll("g.em-centroid").data().forEach((function(t){var e=t.properties.id,n=r(e);n&&i.push(n)})),Ty(i));return isNaN(a[0])||(e.sizeClassifier_=ky().domain(a).range([e.pieMinRadius_,e.pieMaxRadius_])),e};e.updateStyle=function(){if(!e.catColors_){e.catColors({});for(var t=0;t<e.statCodes_.length;t++)e.catColors_[e.statCodes_[t]]=ox[t%10]}e.catLabels_=e.catLabels_||{};var n=[];if(e.svg_){var a=e.svg_.selectAll("#em-prop-symbols");if(a){a.selectAll("g.em-centroid").append("g").attr("class","em-pie").attr("id",(function(t){return n.push(t),"pie_"+t.properties.id}));var s=oi(e);e.svg().selectAll(s).on("mouseover",(function(t,n){var i=Ft(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=Ft(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),function(t){t.forEach((function(t){var n=t.properties.id,a=[],s=i(n);for(var o in s)a.push({code:o,value:s[o]});if(a&&0!=a.length){var l=e.svg().selectAll("#pie_"+n),c=e.sizeClassifier_(r(n)),u=e.pieChartInnerRadius_,h=Zv().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(h(a)).join("path").style("fill",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("fill___",(function(t){return e.catColors_[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",sx().innerRadius(u).outerRadius(c)).on("mouseover",(function(n,i){var r=Ft(this);Ft(r.node().parentNode).style("stroke-width","1px").style("stroke","black"),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ft(this);Ft(t.node().parentNode).style("stroke-width",e.pieStrokeWidth_).style("stroke",e.pieStrokeFill_),e._tooltip&&e._tooltip.mouseout()}))}}))}(n)}}return e};var i=function(t){for(var n={},i=0,r=0;r<e.statCodes_.length;r++){var a=e.statCodes_[r],s=e.statData(a).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else n[a]=s.value,i+=s.value}if(e.totalCode_){var o=e.statData(e.totalCode_).get(t);o&&(i=o.value)}if(0!=i){for(var l=0;l<e.statCodes_.length;l++)n[e.statCodes_[l]]/=i;if(e.totalCode_){var c=0;for(var u in n)c+=n[u];n.other=1-c}return n}};var r=function(t){var n,i=0;if(e.totalCode_)!(n=e.statData(e.totalCode_).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};return e.getLegendConstructor=function(){return cx},e.tooltip_.textFunction=function(t,n){var a=Ft("#tooltip_eurostat");a.html(""),a.selectAll("*").remove(),t.properties.id?a.append("div").attr("class","estat-vis-tooltip-bar").html(t.properties.na+" ("+t.properties.id+")"):a.append("div").attr("class","estat-vis-tooltip-bar").html(t.properties.na);var s=[],o=i(t.properties.id);for(var l in o)s.push({code:l,value:o[l]});if(s&&0!=s.length){var c=150,u=150,h=Math.min(c,u)/2-25,f=a.append("div").attr("class","em-tooltip-piechart-container").append("svg").attr("class","em-tooltip-piechart-svg").attr("viewbox","0, 0, ".concat(c,", ").concat(u)).attr("width",c).attr("height",137.5).append("g").attr("transform","translate(75,75)"),p=Zv().sort(null).value((function(t){return t.value})),d=sx().innerRadius(0).outerRadius(.8*h),g=sx().innerRadius(.9*h).outerRadius(.9*h),_=p(s);f.selectAll("allSlices").data(_).enter().append("path").attr("d",d).style("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),f.selectAll("allPolylines").data(_).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=d.centroid(t),n=g.centroid(t),i=g.centroid(t),r=t.startAngle+(t.endAngle-t.startAngle)/2;return i[0]=.95*h*(r<Math.PI?1:-1),[e,n,i]}})),f.selectAll("allLabels").data(_).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=g.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*h*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");for(var m=a.append("div").attr("class","em-tooltip-piechart-breakdown"),y=0;y<e.statCodes_.length;y++){var v=e.statCodes_[y],x=e.statData(v).get(t.properties.id);if(x&&void 0!==x.value&&null!==x.value){var b="<strong>".concat(e.catLabels_[v],"</strong>: ").concat(x.value.toFixed(),"<br>");m.html(m.html()+b)}}var w=r(t.properties.id);null!=w&&m.html(m.html()+"<strong>Total</strong>: ".concat(w.toFixed(),"<br>"))}else a.append("div").html(e.noDataText())},e};function hx(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 fx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hx(Object(n),!0).forEach((function(e){fi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hx(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var px=function(t){var e=Om(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=Fm(),r={};for(var a in t){var s=t[a];r[a]=s[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 s={};for(var o in t)s[o]=t[o];for(var l in s.filters={},t.filters)s.filters[l]=t.filters[l];e.stat(a,s),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],s=e.statData(a).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else n.push({date:a,value:s.value}),i+=s.value}if(0!=i){for(var o=1;o<n.length;o++){var l=n[o-1].value,c=n[o].value;n[o].percentageChange=0===l?.001:(c-l)/l*100}return n}};function i(t,n,r,a){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(e.sparkLineChartFunction_&&e.sparkLineChartFunction_!==i)return e.sparkLineChartFunction_(t,n,r,a,s);var o=Sn().domain([0,e._statDates.length-1]).range([.5,r-.5]),l=Lt(n.map((function(t){return t.value})))||0,c=Gt(n.map((function(t){return t.value})))||1,u=Sn().domain([l,c]).range([a,0]),h=n.map((function(t,e){return fx(fx({},t),{},{scaledXValue:o(e),scaledYValue:u(t.value)})})),f=u(0);s&&(t.append("g").attr("class","axis-x").attr("transform","translate(0, ".concat(a,")")).call(ty(o).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(ey(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=Wv().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=Vy(!0),a=null,s=qv,o=null,l=Zy(c);function c(c){var u,h,f,p,d,g=(c=Rv(c)).length,_=!1,m=new Array(g),y=new Array(g);for(null==a&&(o=s(d=l())),u=0;u<=g;++u){if(!(u<g&&r(p=c[u],u,c))===_)if(_=!_)h=u,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),f=u-1;f>=h;--f)o.point(m[f],y[f]);o.lineEnd(),o.areaEnd()}_&&(m[u]=+t(p,u,c),y[u]=+e(p,u,c),o.point(i?+i(p,u,c):m[u],n?+n(p,u,c):y[u]))}if(d)return o=null,d+""||null}function u(){return Wv().defined(r).curve(s).context(a)}return t="function"==typeof t?t:void 0===t?Bv:Vy(+t),e="function"==typeof e?e:Vy(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Uv:Vy(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Vy(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Vy(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Vy(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Vy(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Vy(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Vy(+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:Vy(!!t),c):r},c.curve=function(t){return arguments.length?(s=t,null!=a&&(o=s(a)),c):s},c.context=function(t){return arguments.length?(null==t?a=o=null:o=s(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.svg().selectAll("#em-prop-symbols").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 Ty(t)}(),e.widthClassifier_=ky().domain(e.domain).range([0,e.sparkLineWidth_]),e.heightClassifier_=ky().domain(e.domain).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],r=(e.svg().selectAll("#em-prop-symbols").selectAll("g.em-centroid").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),oi(e));return e.svg().selectAll(r).on("mouseover",(function(t,i){if(n(i.properties.id)){var r=Ft(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=Ft(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=[],s=t.properties.na,o=t.properties.id;a.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(s,"</b>").concat(o?" (".concat(o,")"):"","\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",Ft(yt(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 s=a.get(t);if(!s||0!==s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else s.value>n&&(n=s.value)}}if(0!==n)return n};return e.getLegendConstructor=function(){return ay},e};class dx{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 gx(t){return new dx(t,!0)}function _x(t){return t.source}function mx(t){return t.target}function yx(t){let e=_x,n=mx,i=Bv,r=Uv,a=null,s=null,o=Zy(l);function l(){let l;const c=Iv.call(arguments),u=e.apply(this,c),h=n.apply(this,c);if(null==a&&(s=t(l=o())),s.lineStart(),c[0]=u,s.point(+i.apply(this,c),+r.apply(this,c)),c[0]=h,s.point(+i.apply(this,c),+r.apply(this,c)),s.lineEnd(),l)return s=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:Vy(+t),l):i},l.y=function(t){return arguments.length?(r="function"==typeof t?t:Vy(+t),l):r},l.context=function(e){return arguments.length?(null==e?a=s=null:s=t(a=e),l):a},l}function vx(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}xn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var xx=function(t,e){var n=Lm(t);if(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(){n.updateConfig(),n.updateContainer();var t=n.map,e=n.lgg;if(t.legend_)for(var i in t.legend_)if("colorLegend"==i||"sizeLegend"==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.setBoxDimension()},n};function bx(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 wx(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)?wx(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,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function wx(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 Sx=function(t){var e=Om(t,!0,"flow");function n(t){return"".concat(t,"-").concat(Math.random().toString(36).substr(2,9))}function i(t,n,i){t.append("marker").attr("id",n).attr("markerHeight",7).attr("markerWidth",7).attr("refX",1).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"),t.append("marker").attr("id",n+"mouseover").attr("markerHeight",7).attr("markerWidth",7).attr("refX",1).attr("refY",1.5).attr("orient","auto").append("path").attr("fill",e.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 r(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function a(t){return[t.source.x1,t.y0]}function s(t){return[t.target.x0,t.y1]}e.strokeWidthScale=Sn(),e.labelOffsetX=15,e.labelOffsetY=5,e.labelFormatter=function(t){return gn(".2s")(t)},e.tooltip_.textFunction=Mx,e.flowColor_="#72bb6f",e.flowOverlayColors_=["#bbd7ee","#c7e3c6"],e.flowMaxWidth_=30,e.flowMinWidth_=1,e.flowArrows_=!0,e.flowOutlines_=!0,e.flowTargetOffset_=1,e.flowGradient_=!0,["flowGraph_","flowColor_","flowOverlayColors_","flowArrows_","flowTargetOffset_","flowMaxWidth_","flowMinWidth_","flowOutlines_","flowGradient_"].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=e.flowGraph_.links;e.strokeWidthScale=Sn().domain([0,Gt(t,(function(t){return t.value}))]).range([e.flowMinWidth_,e.flowMaxWidth_]),function(t){var a=e.svg_;!function(t){t.nodes.forEach((function(t){if(t.x||t.y||!e.Geometries.centroidFeatures){var n=e.Geometries.getRegionFeatures().find((function(e){if(t.id==e.properties.id)return e})),i=n.properties.centroid||e._pathFunction.centroid(n),r=e._projection([i[0],i[1]]);t.x=r[0],t.y=r[1]}else{var a=e.Geometries.centroidFeatures.find((function(e){if(t.id==e.properties.id)return e}));if(a){var s=e._projection([a.geometry.coordinates[0],a.geometry.coordinates[1]]);t.x=s[0],t.y=s[1]}else console.error("could not find coordinates for",t.id)}})),console.log(t)}(t);var s=function(t){var n=t.nodes,i=t.links,a=function(t){var e=t.nodes,n=t.links;return{nodes:e.map((function(t){return Object.assign({},t)})),links:n.map((function(t){return Object.assign({},t)}))}}({nodes:n,links:i});return function(t){var e,n=t.nodes,i=t.links,a=bx(n.entries());try{for(a.s();!(e=a.n()).done;){var s=Yn(e.value,2),o=s[0],l=s[1];l.index=o,l.sourceLinks=[],l.targetLinks=[]}}catch(t){a.e(t)}finally{a.f()}var u,h=new Map(n.map((function(t,e){return[c(t,e,n),t]}))),f=bx(i.entries());try{for(f.s();!(u=f.n()).done;){var p=Yn(u.value,2),d=p[0],g=p[1];g.index=d;var _=g.source,m=g.target;"object"!==ui(_)&&(_=g.source=r(h,_)),"object"!==ui(m)&&(m=g.target=r(h,m)),_.sourceLinks.push(g),m.targetLinks.push(g)}}catch(t){f.e(t)}finally{f.f()}}(a),function(t){var e,n=t.nodes,i=bx(n);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.value=Math.max(vx(r.sourceLinks,(function(t){return t.value})),vx(r.targetLinks,(function(t){return t.value})))}}catch(t){i.e(t)}finally{i.f()}}(a),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var s,o=bx(i);try{for(o.s();!(s=o.n()).done;){var l=s.value;l.depth=a;var c,u=bx(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){o.e(t)}finally{o.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(a),function(t){var e=t.nodes,n=e.length,i=new Set(e),r=new Set,a=0;for(;i.size;){var s,o=bx(i);try{for(o.s();!(s=o.n()).done;){var l=s.value;l.height=a;var c,u=bx(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){o.e(t)}finally{o.f()}if(++a>n)throw new Error("circular link");i=r,r=new Set}}(a),function(t){var n,i=t.nodes,r=bx(i);try{for(r.s();!(n=r.n()).done;){var a=n.value;a.sourceLinks.forEach((function(t){return t.width=e.strokeWidthScale(t.value)})),a.targetLinks.forEach((function(t){return t.width=e.strokeWidthScale(t.value)}));var s=Math.max(vx(a.sourceLinks,(function(t){return t.width})),vx(a.targetLinks,(function(t){return t.width})));a.x0=a.x1=a.x,a.y0=a.y-s/2,a.y1=a.y+s/2}}catch(t){r.e(t)}finally{r.f()}!function(t){var e,n=bx(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.sourceLinks,a=i.targetLinks;r.sort(o),a.sort(l)}}catch(t){n.e(t)}finally{n.f()}}(i)}(a),function(t){var e,n=t.nodes,i=bx(n);try{for(i.s();!(e=i.n()).done;){var r,a=e.value,s=a.y0,o=bx(a.sourceLinks);try{for(o.s();!(r=o.n()).done;){var l=r.value;l.y0=s+l.width/2,s+=l.width}}catch(t){o.e(t)}finally{o.f()}var c,u=a.y0,h=bx(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()}}(a),a}(t),h=s.nodes,f=s.links,p=a.append("defs"),d=n("arrow"),g=n("arrow-outline"),_=f.map((function(){return n("gradient")}));e.flowArrows_&&(i(p,d,e.flowColor_),i(p,g,"#ffffff"));e.flowGradient_&&function(t,n,i){t.selectAll("linearGradient").data(i).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(t){return t.append("stop").attr("offset","5%").attr("stop-color",e.flowOverlayColors_[0])})).call((function(t){return t.append("stop").attr("offset","50%").attr("stop-color",e.flowColor_)}))}(p,_,f);var m=Ft("#em-zoom-group-"+e.svgId_).append("g").attr("class","em-flow-container");(function(t,n){var i=[],r=[],a=e.Geometries.getRegionFeatures();if(a){n.nodes.forEach((function(t){var e=a.find((function(e){if(t.id==e.properties.id)return e}));e?n.links.some((function(e){return e.source==t.id}))?i.push(t.id):r.push(t.id):console.error("could not find geometry for",t.id)}));var s=oi(e);e.svg_.selectAll(s).each((function(){Ft(this).style("fill",(function(t){return i.includes(t.properties.id)?e.flowOverlayColors_[0]:r.includes(t.properties.id)?e.flowOverlayColors_[1]:void 0}))}))}})(0,t),function(t,n,i,r,a){var s=t.append("g").attr("class","em-flows-group"),o=s.append("g").attr("class","em-flow-flows"),l=s.append("g").attr("class","em-flow-outlines");n.forEach((function(t,n){e.flowOutlines_&&l.append("path").attr("d",u()(t)).attr("fill","none").attr("stroke","#ffffff").attr("class","em-flow-link-outline").attr("marker-end","url(#".concat(r,")")),o.append("path").attr("d",u()(t)).attr("fill","none").attr("class","em-flow-link").attr("stroke",e.flowGradient_?"url(#".concat(a[n],")"):e.flowColor_).attr("stroke-width",t.width).attr("marker-end",e.flowArrows_?"url(#".concat(i,")"):"").on("mouseover",(function(n){var r=e.hoverColor_;Ft(this).attr("stroke",r),e.flowArrows_&&Ft(this).attr("marker-end","url(#".concat(i+"mouseover",")")),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){e.flowGradient_?Ft(this).attr("stroke","url(#".concat(a[n],")")):Ft(this).attr("stroke",e.flowColor_),e.flowArrows_&&Ft(this).attr("marker-end","url(#".concat(i,")")),e._tooltip&&e._tooltip.mouseout()}))}))}(m,f,d,g,_),function(t,n){t.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",e.flowColor_)}(m,h),e.labels_&&function(t,n){var i,r=n.filter((function(t){return t.targetLinks&&0===t.sourceLinks.length})),a=t.append("g").attr("class","em-flow-labels");if(null!==(i=e.labels_)&&void 0!==i&&i.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(t){return t.x>t.targetLinks[0].source.x?t.x+e.labelOffsetX:t.x-e.labelOffsetX})).attr("y",(function(t){return t.y+e.labelOffsetY})).text((function(t){return e.labelFormatter(t.value)}))}var s=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,")")}));s.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(t){return t.x>t.targetLinks[0].source.x?e.labelOffsetX:-e.labelOffsetX})).attr("y",e.labelOffsetY).text((function(t){return e.labelFormatter(t.value)})),e.labels_.backgrounds&&s.each((function(){var t=Ft(this).select("text").node().getBBox(),e=5,n=2;Ft(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)}))}(m,h);a.node()}(e.flowGraph_)},e.updateClassification=function(){},e.getLegendConstructor=function(){return xx};var o=function(t,e){return t.target.y-e.target.y},l=function(t,e){return t.source.y-e.source.y},c=function(t){return t.id},u=function(){return yx(gx).source(a).target(s)};return e},Mx=function(t,e){var n=[],i="".concat(t.source.name||t.source.id," to ").concat(t.target.name||t.target.id);return n.push('\n <div class="estat-vis-tooltip-bar">\n <b>'.concat(i,"</b>\n </div>\n ")),n.push("<div class='estat-vis-tooltip-text'>\n ".concat(t.value,"\n </div>")),n.join("")};var Ex=function(t,e){try{return"choropleth"==t||"ch"==t?vy(e):"categorical"==t||"ct"==t?function(t){var e=Om(t,!1,"ct");e.classToFillStyle_=void 0,e.classToText_=void 0,e.tooltip_.textFunction=zv,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_&&ii(e.insetTemplates_,e.svgId_,n),n(e),e};var n=function(t){var n=e.statData().getUniqueValues(),i=y(Array(n.length).keys()),r=e.classToFillStyle_?e.classToFillStyle():void 0;if(r){var a=Object.keys(r);e.classifier(Wm().domain(a).range(a.map((function(t,e){return e}))))}else e.classifier(Wm().domain(n).range(i));var s=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)}}))},o=oi(t);s(t.svg().selectAll(o)),"mixed"===t.nutsLevel_&&s(t.svg().selectAll("path.em-nutsrg0"))};function i(t){if(t.svg_){var n=oi(t),i=t.svg().selectAll(n);i.transition().duration(e.transitionDuration()).style("fill",a).end().then((function(){i.each((function(){var t=Ft(this);t.attr("fill___",t.style("fill"))})),s(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ft(this.parentNode).style("fill");Ft(this).attr("fill",si(t))}))})).catch((function(t){})),"mixed"===e.nutsLevel_&&r(t),e.labels_&&e.labels_.values&&e.updateValuesLabels(t),e.patternFill_&&yy(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]]=Ov[r%12];e.classToFillStyle(t)}return e.insetTemplates_&&ii(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(oi(t)).style("display",(function(t){if(!this.parentNode.classList.contains("em-cntrg")){var e=Ft(this),n=e.attr("ecl"),i=e.attr("lvl");return n||"0"===i?"block":"none"}})).style("stroke",(function(){var t=Ft(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=Ft(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=Ft(this).attr("ecl");return e.Geometries.userGeometries?n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle_[e.classifier().domain()[n]]:Zn("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]]:Zn("em-nutsrg","fill"))},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)||(Ft(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(r,e)))})).on("mousemove",(function(t,n){i(n.properties.id)||e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(t,n){if(!i(n.properties.id)){var r=Ft(this);r.style("fill",r.attr("fill___")),e._tooltip&&e._tooltip.mouseout()}}))};return e.getLegendConstructor=function(){return Dv},e}(e):"proportionalSymbol"==t||"ps"==t?Nv(e):"bivariateChoropleth"==t||"chbi"==t?function(t){var e=Om(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":(4==t.properties.id.length&&console.log(t),+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=y(Array(e.numberOfClasses()).keys());if(e.classifier1_||e.classifier1(Ht().domain(t).range(i)),e.classifier2_||e.classifier2(Ht().domain(n).range(i)),!e.classToFillStyle()){var r=Vv(e.numberOfClasses(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(r)}}(),t.svg_){var i=oi(t);n(t.svg().selectAll(i)),"mixed"===t.nutsLevel_&&n(t.svg().selectAll("path.em-nutsrg0"))}}function i(t){if(t.svg()){var n=oi(t),i=t.svg().selectAll(n);i.transition().duration(e.transitionDuration()).style("fill",(function(t){var n=Ft(this).attr("ecl1");if("nd"===n)return e.noDataFillStyle()||"gray";var i=Ft(this).attr("ecl2");return n||i?"nd"===i?e.noDataFillStyle()||"gray":e.classToFillStyle()(+n,+i):Zn("em-nutsrg","fill")})).end().then((function(){i.each((function(){var t=Ft(this);t.attr("fill___",t.style("fill"))})),a(t,i),e.gridCartogram_&&t.svg().selectAll(".em-grid-text").each((function(){var t=Ft(this.parentNode).style("fill");Ft(this).attr("fill",si(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.tooltip_.textFunction=$v,["numberOfClasses_","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_&&ii(e.insetTemplates_,e.svgId_,n),n(e),e},e.updateStyle=function(){return e.insetTemplates_&&ii(e.insetTemplates_,e.svgId_,i),i(e),e};var r=function(t){t.svg().selectAll(oi(t)).each((function(){if(!this.parentNode.classList.contains("em-cntrg")){var t=Ft(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",s=t.style("stroke-width")||.2;t.style("stroke",a).style("stroke-width",s)}}}))},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)||(Ft(this).style("fill",t.hoverColor_),null===(a=e._tooltip)||void 0===a||a.mouseover(e.tooltip_.textFunction(r,e)))})).on("mousemove",(function(t,n){var r;i(n.properties.id)||null===(r=e._tooltip)||void 0===r||r.mousemove(t)})).on("mouseout",(function(t,n){if(!i(n.properties.id)){var r,a=Ft(this),s=a.attr("fill___");s&&(a.style("fill",s),null===(r=e._tooltip)||void 0===r||r.mouseout())}}))};return e.getLegendConstructor=function(){return Hv},e}(e):"trivariateChoropleth"==t||"chbi"==t?function(t){var e=Om(t,!1,"chtri");function n(t){var n=e.statData("v1").getArray(),r=e.statData("v2").getArray(),a=e.statData("v3").getArray(),s=y(Array(7).keys());e.classifier1_||e.classifier1(Ht().domain(n).range(s)),e.classifier2_||e.classifier2(Ht().domain(r).range(s)),e.classifier3_||e.classifier3(Ht().domain(a).range(s));var o=oi(t);if(t.svg_){if(t.svg().selectAll(o).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("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier3_(+i)}})).attr("regionClass",(function(t){var e=Ft(this).attr("ecl1"),n=Ft(this).attr("ecl2"),i=Ft(this).attr("ecl3");return"nd"===e||"nd"===n||"nd"===i?"nd":!e||n||i?e||!n||i?e||n||!i?e&&n&&!i?4:e&&!n&&i?5:!e&&n&&i?6:e&&n&&i?7:void 0:3:2:1})),"mixed"==t.nutsLevel_&&t.svg().selectAll("path.em-nutsrg0").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("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier3_(+i)}})),!e.classToFillStyle()){var l=i(e.color1(),e.color2(),e.color3());e.classToFillStyle(l)}"mixed"==e.nutsLevel_&&t.svg_.selectAll("path.em-nutsrg0").attr("ecl1",(function(t){var n=e.statData("v2").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("ecl3",(function(t){var n=e.statData("v3").get(t.properties.id);if(n){var i=n.value;return 0!=i&&!i||":"==i?"nd":+e.classifier3_(+i)}}))}}e.numberOfClasses_=3,e.startColor_="#e8e8e8",e.color1_="#09F8FF",e.color2_="#F5D300",e.color3_="#FF1493",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.classifier1_=void 0,e.classifier2_=void 0,e.classifier3_=void 0,e.tooltip_.textFunction=Xv,["numberOfClasses_","startColor_","color1_","color2_","color3_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_","classifier3_"].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","color3","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){return e.insetTemplates_&&ii(e.insetTemplates_,e.svgId_,n),n(e),e};var i=function(t,e,n){var i=[ai([t,e]),ai([e,n]),ai([t,n]),ai([t,e,n])],r=[t,e,n,i[0],i[1],i[2],i[3]];return function(t){return t>=1&&t<=7?r[t-1]:null}};function r(t){if(t.svg()){var n=oi(t),i=t.svg().selectAll(n);i.transition().duration(e.transitionDuration()).style("fill",(function(t){var n=Ft(this).attr("ecl1"),i=Ft(this).attr("ecl2"),r=Ft(this).attr("ecl3");if("nd"===n)return e.noDataFillStyle()||"gray";if("nd"===i)return e.noDataFillStyle()||"gray";if("nd"===r)return e.noDataFillStyle()||"gray";if(!n&&!i&&!r)return Zn("em-nutsrg","fill");var a=Ft(this).attr("regionClass");return e.classToFillStyle_(a)})).end().then((function(){i.each((function(){var t=Ft(this);t.attr("fill___",t.style("fill"))})),i.on("mouseover",(function(n,i){Ft(this).style("fill",t.hoverColor_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(i,e))})).on("mousemove",(function(t,n){e._tooltip&&e._tooltip.mousemove(t)})).on("mouseout",(function(){var t=Ft(this);t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLevel_&&Jv(t)}}return e.updateStyle=function(){return e.insetTemplates_&&ii(e.insetTemplates_,e.svgId_,r),r(e),e},e.getLegendConstructor=function(){return Yv},e}(e):"stripeComposition"==t||"scomp"==t?function(t){var e=Om(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,s){t.filters=t.filters||{};for(var o=0;o<r.length;o++){var l=r[o];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),s&&(e.catColors_=e.catColors_||{},e.catColors_[l]=s[o]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[l]=a[o])}return n=r,e};var n=void 0,i=function(t){for(var i={},r=0,a=0;a<n.length;a++){var s=n[a],o=e.statData(s).get(t);if(!o||0!=o.value&&!o.value||isNaN(o.value)){if(e.showOnlyWhenComplete())return}else i[s]=o.value,r+=o.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]]=ox[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll(oi(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 s=0;for(var o in r){var l=r[o];if(l){l*=e.stripeWidth();var c=e.catColors()[o]||"lightgray";a.append("rect").attr("x",s).attr("y",0).attr("height",1).style("stroke","none").attr("code",o).style("fill",c).transition().duration(e.transitionDuration()).attr("width",l),s+=l}}return"url(#pattern_"+n+")"}})).attr("nd",(function(t){return i(t.properties.id)?"":"nd"}));var r=oi(e);return e.svg().selectAll(r).on("mouseover",(function(t,n){var i=Ft(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=Ft(this);t.style("fill"),t.attr("fill___")&&(t.style("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return lx},e.tooltip_.textFunction=function(t,n){var r=Ft("#tooltip_eurostat");r.html(""),r.selectAll("*").remove();var a=t.properties.na||t.properties.name;t.properties.id?r.append("div").html("<b>"+a+"</b> ("+t.properties.id+") <br>"):r.append("div").html("<b>"+a+"</b><br>");var s=[],o=i(t.properties.id);for(var l in o)s.push({code:l,value:o[l]});if(s&&0!=s.length){var c=e.pieChartRadius(),u=e.pieChartInnerRadius(),h=r.append("svg").attr("viewBox",[-c,-c,2*c,2*c]).attr("width",2*c),f=Zv().sort(null).value((function(t){return t.value}));h.append("g").attr("stroke","darkgray").selectAll("path").data(f(s)).join("path").style("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",sx().innerRadius(u).outerRadius(c))}else r.append("div").html(e.noDataText())},e}(e):"pieChart"==t||"pie"==t?ux(e):"sparkline"==t||"spark"==t||"sparklines"==t?px(e):"flow"==t||"flowmap"==t?Sx(e):(console.log("Unexpected map type: "+t),Om(e,!0,t))}catch(t){console.error("Error in eurostat-map.map: "+t.message),console.error(t)}},Ax=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 s=0;s<a;s++){var o=n+(i-n)*s/(a-1),l=r.append("pattern").attr("class","em-fill-pattern").attr("id","pattern_"+s).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",o).attr("height",o).style("stroke","none").style("fill",t.symbColor):l.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*o).style("stroke","none").style("fill",t.symbColor)}}},Cx=function(){return bu},kx="4.2.2"})(),i})()));