highcharts
Version:
JavaScript charting framework
107 lines (104 loc) • 86.9 kB
JavaScript
/*
Highmaps JS v10.2.0 (2022-07-05)
Highmaps as a plugin for Highcharts or Highcharts Stock.
(c) 2011-2021 Torstein Honsi
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/map",["highcharts"],function(v){b(v);b.Highcharts=v;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function v(b,l,q,k){b.hasOwnProperty(l)||(b[l]=k.apply(null,q),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:l,module:b[l]}})))}b=b?b._modules:{};v(b,"Core/Axis/Color/ColorAxisComposition.js",
[b["Core/Color/Color.js"],b["Core/Utilities.js"]],function(b,l){var q=b.parse,k=l.addEvent,p=l.extend,h=l.merge,e=l.pick,t=l.splat,n;(function(d){function n(){var f=this,m=this.options;this.colorAxis=[];m.colorAxis&&(m.colorAxis=t(m.colorAxis),m.colorAxis.forEach(function(m,a){m.index=a;new B(f,m)}))}function a(f){var m=this,a=function(a){a=f.allItems.indexOf(a);-1!==a&&(m.destroyItem(f.allItems[a]),f.allItems.splice(a,1))},c=[],w,x;(this.chart.colorAxis||[]).forEach(function(f){(w=f.options)&&w.showInLegend&&
(w.dataClasses&&w.visible?c=c.concat(f.getDataClassLegendSymbols()):w.visible&&c.push(f),f.series.forEach(function(f){if(!f.options.showInLegend||w.dataClasses)"point"===f.options.legendType?f.points.forEach(function(f){a(f)}):a(f)}))});for(x=c.length;x--;)f.allItems.unshift(c[x])}function c(f){f.visible&&f.item.legendColor&&f.item.legendSymbol.attr({fill:f.item.legendColor})}function g(){var f=this.chart.colorAxis;f&&f.forEach(function(f,m,a){f.update({},a)})}function u(){(this.chart.colorAxis&&
this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function D(){var f=this.axisTypes;f?-1===f.indexOf("colorAxis")&&f.push("colorAxis"):this.axisTypes=["colorAxis"]}function F(f){var m=this,a=f?"show":"hide";m.visible=m.options.visible=!!f;["graphic","dataLabel"].forEach(function(f){if(m[f])m[f][a]()});this.series.buildKDTree()}function r(){var f=this,m=this.options.nullColor,a=this.colorAxis,c=this.colorKey;(this.data.length?this.data:this.points).forEach(function(w){var x=w.getNestedProperty(c);
(x=w.options.color||(w.isNull||null===w.value?m:a&&"undefined"!==typeof x?a.toColor(x,w):w.color||f.color))&&w.color!==x&&(w.color=x,"point"===f.options.legendType&&w.legendItem&&f.chart.legend.colorizeItem(w,w.visible))})}function z(f){var m=f.prototype.createAxis;f.prototype.createAxis=function(f,a){if("colorAxis"!==f)return m.apply(this,arguments);var c=new B(this,h(a.axis,{index:this[f].length,isX:!1}));this.isDirtyLegend=!0;this.axes.forEach(function(f){f.series=[]});this.series.forEach(function(f){f.bindAxes();
f.isDirtyData=!0});e(a.redraw,!0)&&this.redraw(a.animation);return c}}function x(){this.elem.attr("fill",q(this.start).tweenTo(q(this.end),this.pos),void 0,!0)}function f(){this.elem.attr("stroke",q(this.start).tweenTo(q(this.end),this.pos),void 0,!0)}var m=[],B;d.compose=function(d,h,e,y,w){B||(B=d);-1===m.indexOf(h)&&(m.push(h),d=h.prototype,d.collectionsWithUpdate.push("colorAxis"),d.collectionsWithInit.colorAxis=[d.addColorAxis],k(h,"afterGetAxes",n),z(h));-1===m.indexOf(e)&&(m.push(e),h=e.prototype,
h.fillSetter=x,h.strokeSetter=f);-1===m.indexOf(y)&&(m.push(y),k(y,"afterGetAllItems",a),k(y,"afterColorizeItem",c),k(y,"afterUpdate",g));-1===m.indexOf(w)&&(m.push(w),p(w.prototype,{optionalAxis:"colorAxis",translateColors:r}),p(w.prototype.pointClass.prototype,{setVisible:F}),k(w,"afterTranslate",u),k(w,"bindAxes",D))};d.pointSetVisible=F})(n||(n={}));return n});v(b,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,
startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0}});v(b,"Core/Axis/Color/ColorAxis.js",[b["Core/Axis/Axis.js"],b["Core/Color/Color.js"],b["Core/Axis/Color/ColorAxisComposition.js"],b["Core/Axis/Color/ColorAxisDefaults.js"],b["Core/Globals.js"],b["Core/Legend/LegendSymbol.js"],b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,l,
q,k,p,h,e,t){var n=this&&this.__extends||function(){var a=function(c,g){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var m in f)f.hasOwnProperty(m)&&(a[m]=f[m])};return a(c,g)};return function(c,g){function x(){this.constructor=c}a(c,g);c.prototype=null===g?Object.create(g):(x.prototype=g.prototype,new x)}}(),d=l.parse,y=p.noop,a=e.series,c=t.extend,g=t.isNumber,u=t.merge,D=t.pick;l=function(e){function r(a,c){var f=e.call(this,a,c)||this;
f.beforePadding=!1;f.chart=void 0;f.coll="colorAxis";f.dataClasses=void 0;f.legendItem=void 0;f.legendItems=void 0;f.name="";f.options=void 0;f.stops=void 0;f.visible=!0;f.init(a,c);return f}n(r,e);r.compose=function(a,c,f,m){q.compose(r,a,c,f,m)};r.prototype.init=function(a,c){var f=a.options.legend||{},m=c.layout?"vertical"!==c.layout:"vertical"!==f.layout,g=c.visible;f=u(r.defaultColorAxisOptions,c,{showEmpty:!1,title:null,visible:f.enabled&&!1!==g});this.coll="colorAxis";this.side=c.side||m?2:
1;this.reversed=c.reversed||!m;this.opposite=!m;e.prototype.init.call(this,a,f);this.userOptions.visible=g;c.dataClasses&&this.initDataClasses(c);this.initStops();this.horiz=m;this.zoomEnabled=!1};r.prototype.initDataClasses=function(a){var c=this.chart,f=this.options,m=a.dataClasses.length,g,z=0,r=c.options.chart.colorCount;this.dataClasses=g=[];this.legendItems=[];(a.dataClasses||[]).forEach(function(a,x){a=u(a);g.push(a);if(c.styledMode||!a.color)"category"===f.dataClassColor?(c.styledMode||(x=
c.options.colors,r=x.length,a.color=x[z]),a.colorIndex=z,z++,z===r&&(z=0)):a.color=d(f.minColor).tweenTo(d(f.maxColor),2>m?.5:x/(m-1))})};r.prototype.hasData=function(){return!!(this.tickPositions||[]).length};r.prototype.setTickPositions=function(){if(!this.dataClasses)return e.prototype.setTickPositions.call(this)};r.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(a){a.color=d(a[1])})};r.prototype.setOptions=
function(a){e.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker};r.prototype.setAxisSize=function(){var a=this.legendSymbol,c=this.chart,f=c.options.legend||{},m,g;a?(this.left=f=a.attr("x"),this.top=m=a.attr("y"),this.width=g=a.attr("width"),this.height=a=a.attr("height"),this.right=c.chartWidth-f-g,this.bottom=c.chartHeight-m-a,this.len=this.horiz?g:a,this.pos=this.horiz?f:m):this.len=(this.horiz?f.symbolWidth:f.symbolHeight)||r.defaultLegendLength};r.prototype.normalizedValue=
function(a){this.logarithmic&&(a=this.logarithmic.log2lin(a));return 1-(this.max-a)/(this.max-this.min||1)};r.prototype.toColor=function(a,c){var f=this.dataClasses,m=this.stops,g;if(f)for(g=f.length;g--;){var x=f[g];var u=x.from;m=x.to;if(("undefined"===typeof u||a>=u)&&("undefined"===typeof m||a<=m)){var d=x.color;c&&(c.dataClass=g,c.colorIndex=x.colorIndex);break}}else{a=this.normalizedValue(a);for(g=m.length;g--&&!(a>m[g][0]););u=m[g]||m[g+1];m=m[g+1]||u;a=1-(m[0]-a)/(m[0]-u[0]||1);d=u.color.tweenTo(m.color,
a)}return d};r.prototype.getOffset=function(){var a=this.legendGroup,c=this.chart.axisOffset[this.side];if(a){this.axisParent=a;e.prototype.getOffset.call(this);var f=this.chart.legend;f.allItems.forEach(function(a){a instanceof r&&a.drawLegendSymbol(f,a)});f.render();this.chart.getMargins(!0);this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width);this.chart.axisOffset[this.side]=c}};r.prototype.setLegendColor=function(){var a=this.reversed,c=a?1:0;a=a?0:1;c=this.horiz?[c,0,a,0]:
[0,a,0,c];this.legendColor={linearGradient:{x1:c[0],y1:c[1],x2:c[2],y2:c[3]},stops:this.stops}};r.prototype.drawLegendSymbol=function(a,c){var f=a.padding,m=a.options,g=this.horiz,x=D(m.symbolWidth,g?r.defaultLegendLength:12),u=D(m.symbolHeight,g?12:r.defaultLegendLength),d=D(m.labelPadding,g?16:30);m=D(m.itemDistance,10);this.setLegendColor();c.legendSymbol||(c.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,x,u).attr({zIndex:1}).add(c.legendGroup));this.legendItemWidth=x+f+(g?m:this.options.labels.x+
this.maxLabelLength);this.legendItemHeight=u+f+(g?d:0)};r.prototype.setState=function(a){this.series.forEach(function(c){c.setState(a)})};r.prototype.setVisible=function(){};r.prototype.getSeriesExtremes=function(){var c=this.series,g=c.length,f;this.dataMin=Infinity;for(this.dataMax=-Infinity;g--;){var m=c[g];var u=m.colorKey=D(m.options.colorKey,m.colorKey,m.pointValKey,m.zoneAxis,"y");var d=m.pointArrayMap;var r=m[u+"Min"]&&m[u+"Max"];if(m[u+"Data"])var e=m[u+"Data"];else if(d){e=[];d=d.indexOf(u);
var n=m.yData;if(0<=d&&n)for(f=0;f<n.length;f++)e.push(D(n[f][d],n[f]))}else e=m.yData;r?(m.minColorValue=m[u+"Min"],m.maxColorValue=m[u+"Max"]):(e=a.prototype.getExtremes.call(m,e),m.minColorValue=e.dataMin,m.maxColorValue=e.dataMax);"undefined"!==typeof m.minColorValue&&(this.dataMin=Math.min(this.dataMin,m.minColorValue),this.dataMax=Math.max(this.dataMax,m.maxColorValue));r||a.prototype.applyExtremes.call(m)}};r.prototype.drawCrosshair=function(a,c){var f=c&&c.plotX,m=c&&c.plotY,g=this.pos,u=
this.len;if(c){var d=this.toPixels(c.getNestedProperty(c.series.colorKey));d<g?d=g-2:d>g+u&&(d=g+u+2);c.plotX=d;c.plotY=this.len-d;e.prototype.drawCrosshair.call(this,a,c);c.plotX=f;c.plotY=m;this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,this.chart.styledMode||"object"!==typeof this.crosshair||this.cross.attr({fill:this.crosshair.color}))}};r.prototype.getPlotLinePath=function(a){var c=
this.left,f=a.translatedValue,m=this.top;return g(f)?this.horiz?[["M",f-4,m-6],["L",f+4,m-6],["L",f,m],["Z"]]:[["M",c,f],["L",c-6,f+6],["L",c-6,f-6],["Z"]]:e.prototype.getPlotLinePath.call(this,a)};r.prototype.update=function(a,c){var f=this.chart.legend;this.series.forEach(function(a){a.isDirtyData=!0});(a.dataClasses&&f.allItems||this.dataClasses)&&this.destroyItems();e.prototype.update.call(this,a,c);this.legendItem&&(this.setLegendColor(),f.colorizeItem(this,!0))};r.prototype.destroyItems=function(){var a=
this.chart;this.legendItem?a.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(c){a.legend.destroyItem(c)});a.isDirtyLegend=!0};r.prototype.destroy=function(){this.chart.isDirtyLegend=!0;this.destroyItems();e.prototype.destroy.apply(this,[].slice.call(arguments))};r.prototype.remove=function(a){this.destroyItems();e.prototype.remove.call(this,a)};r.prototype.getDataClassLegendSymbols=function(){var a=this,g=a.chart,f=a.legendItems,m=g.options.legend,u=m.valueDecimals,d=
m.valueSuffix||"",r;f.length||a.dataClasses.forEach(function(m,x){var w=m.from,A=m.to,L=g.numberFormatter,J=!0;r="";"undefined"===typeof w?r="< ":"undefined"===typeof A&&(r="> ");"undefined"!==typeof w&&(r+=L(w,u)+d);"undefined"!==typeof w&&"undefined"!==typeof A&&(r+=" - ");"undefined"!==typeof A&&(r+=L(A,u)+d);f.push(c({chart:g,name:r,options:{},drawLegendSymbol:h.drawRectangle,visible:!0,setState:y,isDataClass:!0,setVisible:function(){this.visible=J=a.visible=!J;a.series.forEach(function(a){a.points.forEach(function(a){a.dataClass===
x&&a.setVisible(J)})});g.legend.colorizeItem(this,J)}},m))});return f};r.defaultColorAxisOptions=k;r.defaultLegendLength=200;r.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return r}(b);Array.prototype.push.apply(b.keepProps,l.keepProps);"";return l});v(b,"Maps/MapNavigationOptionsDefault.js",[b["Core/DefaultOptions.js"],b["Core/Utilities.js"]],function(b,l){l=l.extend;var q={buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,
height:18,padding:5,style:{fontSize:"15px",fontWeight:"bold"},theme:{"stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1};l(b.defaultOptions.lang,{zoomIn:"Zoom in",zoomOut:"Zoom out"});return b.defaultOptions.mapNavigation=q});v(b,"Maps/MapNavigation.js",[b["Core/Chart/Chart.js"],b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l,q){function k(a){a&&
(a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)}function p(a){this.navButtons=[];this.init(a)}var h=l.doc,e=q.addEvent,t=q.extend,n=q.isNumber,d=q.merge,y=q.objectEach,a=q.pick;p.prototype.init=function(a){this.chart=a};p.prototype.update=function(c){var g=this,u=this.chart,n=u.options.mapNavigation,h,r=function(a){this.handler.call(u,a);k(a)},p=g.navButtons;c&&(n=u.options.mapNavigation=d(u.options.mapNavigation,c));for(;p.length;)p.pop().destroy();
a(n.enableButtons,n.enabled)&&!u.renderer.forExport&&(g.navButtonsGroup||(g.navButtonsGroup=u.renderer.g().attr({zIndex:4}).add()),y(n.buttons,function(a,f){a=d(n.buttonOptions,a);!u.styledMode&&a.theme&&(h=a.theme,h.style=d(a.theme.style,a.style));var c=u.renderer.button(a.text||"",0,0,r,h,void 0,void 0,void 0,"zoomIn"===f?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[f]).attr({width:a.width,height:a.height,title:u.options.lang[f],
padding:a.padding,zIndex:5}).add(g.navButtonsGroup);c.handler=a.onclick;e(c.element,"dblclick",k);p.push(c);t(a,{width:c.width,height:2*c.height});if(u.hasLoaded)c.align(a,!1,a.alignTo);else var x=e(u,"load",function(){c.element&&c.align(a,!1,a.alignTo);x()})}),c=function(){var a=u.exportingGroup&&u.exportingGroup.getBBox();if(a){var f=g.navButtonsGroup.getBBox();if(!(f.x>=a.x+a.width||f.x+f.width<=a.x||f.y>=a.y+a.height||f.y+f.height<=a.y)){var c=-f.y-f.height+a.y-5;a=a.y+a.height-f.y+5;g.navButtonsGroup.attr({translateY:"bottom"===
(n.buttonOptions&&n.buttonOptions.verticalAlign)?c:a})}}},u.hasLoaded||e(u,"render",c));this.updateEvents(n)};p.prototype.updateEvents=function(c){var g=this.chart;a(c.enableDoubleClickZoom,c.enabled)||c.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||e(g.container,"dblclick",function(a){g.pointer.onContainerDblClick(a)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick());a(c.enableMouseWheelZoom,c.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||e(g.container,
void 0!==h.onwheel?"wheel":void 0!==h.onmousewheel?"mousewheel":"DOMMouseScroll",function(a){g.pointer.inClass(a.target,"highcharts-no-mousewheel")||(g.pointer.onContainerMouseWheel(a),k(a));return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())};t(b.prototype,{fitToBox:function(a,g){[["x","width"],["y","height"]].forEach(function(c){var d=c[0];c=c[1];a[d]+a[c]>g[d]+g[c]&&(a[c]>g[c]?(a[c]=g[c],a[d]=g[d]):a[d]=g[d]+g[c]-a[c]);a[c]>g[c]&&(a[c]=g[c]);a[d]<g[d]&&(a[d]=g[d])});
return a},mapZoom:function(a,g,d,e,h){this.mapView&&(n(a)&&(a=Math.log(a)/Math.log(.5)),this.mapView.zoomBy(a,n(g)&&n(d)?this.mapView.projection.inverse([g,d]):void 0,n(e)&&n(h)?[e,h]:void 0))}});e(b,"beforeRender",function(){this.mapNavigation=new p(this);this.mapNavigation.update()});l.MapNavigation=p});v(b,"Maps/MapPointer.js",[b["Core/Pointer.js"],b["Core/Utilities.js"]],function(b,l){var q=l.defined,k=l.extend,p=l.pick;l=l.wrap;var h=b.prototype.normalize,e=0,t;k(b.prototype,{normalize:function(n,
d){var e=this.chart;n=h.call(this,n,d);e&&e.mapView&&(d=e.mapView.pixelsToLonLat({x:n.chartX-e.plotLeft,y:n.chartY-e.plotTop}))&&k(n,d);return n},onContainerDblClick:function(e){var d=this.chart;e=this.normalize(e);d.options.mapNavigation.enableDoubleClickZoomTo?d.pointer.inClass(e.target,"highcharts-tracker")&&d.hoverPoint&&d.hoverPoint.zoomTo():d.isInsidePlot(e.chartX-d.plotLeft,e.chartY-d.plotTop)&&d.mapZoom(.5,void 0,void 0,e.chartX,e.chartY)},onContainerMouseWheel:function(n){var d=this.chart;
n=this.normalize(n);var h=q(n.wheelDelta)&&-n.wheelDelta/120||n.deltaY||n.detail;1<=Math.abs(h)&&(e+=Math.abs(h),t&&clearTimeout(t),t=setTimeout(function(){e=0},50));10>e&&d.isInsidePlot(n.chartX-d.plotLeft,n.chartY-d.plotTop)&&d.mapView&&d.mapView.zoomBy((d.options.mapNavigation.mouseWheelSensitivity-1)*-h,void 0,[n.chartX,n.chartY],1>Math.abs(h)?!1:void 0)}});l(b.prototype,"zoomOption",function(e){var d=this.chart.options.mapNavigation;p(d.enableTouchZoom,d.enabled)&&(this.chart.options.chart.pinchType=
"xy");e.apply(this,[].slice.call(arguments,1))});l(b.prototype,"pinchTranslate",function(e,d,h,a,c,g,u){e.call(this,d,h,a,c,g,u);"map"===this.chart.options.chart.type&&this.hasZoom&&(e=a.scaleX>a.scaleY,this.pinchTranslateDirection(!e,d,h,a,c,g,u,e?a.scaleX:a.scaleY))})});v(b,"Series/ColorMapComposition.js",[b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,l){var q=b.seriesTypes.column.prototype,k=l.addEvent,p=l.defined,h;(function(e){function h(d){this.moveToTopOnHover&&this.graphic&&
this.graphic.attr({zIndex:d&&"hover"===d.state?1:0})}var n=[];e.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value&&(void 0===this.value||!isNaN(this.value))}};e.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(d){var e={};!p(d.color)||d.state&&"normal"!==
d.state||(e[this.colorProp||"fill"]=d.color);return e},pointAttribs:q.pointAttribs};e.compose=function(d){var e=d.prototype.pointClass;-1===n.indexOf(e)&&(n.push(e),k(e,"afterSetState",h));return d}})(h||(h={}));return h});v(b,"Maps/MapSymbols.js",[b["Core/Renderer/SVG/SVGRenderer.js"]],function(b){function l(b,k,p,h,e,t,n,d){return[["M",b+e,k],["L",b+p-t,k],["C",b+p-t/2,k,b+p,k+t/2,b+p,k+t],["L",b+p,k+h-n],["C",b+p,k+h-n/2,b+p-n/2,k+h,b+p-n,k+h],["L",b+d,k+h],["C",b+d/2,k+h,b,k+h-d/2,b,k+h-d],["L",
b,k+e],["C",b,k+e/2,b+e/2,k,b+e,k],["Z"]]}b=b.prototype.symbols;b.bottombutton=function(b,k,p,h,e){e=e&&e.r||0;return l(b-1,k-1,p,h,0,0,e,e)};b.topbutton=function(b,k,p,h,e){e=e&&e.r||0;return l(b-1,k-1,p,h,e,e,0,0)};return b});v(b,"Core/Chart/MapChart.js",[b["Core/Chart/Chart.js"],b["Core/DefaultOptions.js"],b["Core/Renderer/SVG/SVGRenderer.js"],b["Core/Utilities.js"]],function(b,l,q,k){var p=this&&this.__extends||function(){var e=function(d,b){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&
function(a,c){a.__proto__=c}||function(a,c){for(var g in c)c.hasOwnProperty(g)&&(a[g]=c[g])};return e(d,b)};return function(d,b){function a(){this.constructor=d}e(d,b);d.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),h=l.getOptions,e=k.merge,t=k.pick;b=function(b){function d(){return null!==b&&b.apply(this,arguments)||this}p(d,b);d.prototype.init=function(d,a){var c=h().credits;d=e({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:t(c.mapText,' \u00a9 <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>'),
mapTextFull:t(c.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},d);b.prototype.init.call(this,d,a)};return d}(b);(function(e){e.maps={};e.mapChart=function(d,b,a){return new e(d,b,a)};e.splitPath=function(d){"string"===typeof d&&(d=d.replace(/([A-Za-z])/g," $1 ").replace(/^\s*/,"").replace(/\s*$/,""),d=d.split(/[ ,;]+/).map(function(d){return/[A-za-z]/.test(d)?d:parseFloat(d)}));return q.prototype.pathToSegments(d)}})(b||(b={}));return b});v(b,"Maps/MapUtilities.js",[],
function(){return{boundsFromPath:function(b){var l=-Number.MAX_VALUE,q=Number.MAX_VALUE,k=-Number.MAX_VALUE,p=Number.MAX_VALUE,h;b.forEach(function(e){var b=e[e.length-2];e=e[e.length-1];"number"===typeof b&&"number"===typeof e&&(q=Math.min(q,b),l=Math.max(l,b),p=Math.min(p,e),k=Math.max(k,e),h=!0)});if(h)return{x1:q,y1:p,x2:l,y2:k}},pointInPolygon:function(b,l){var q,k=!1,p=b.x,h=b.y;b=0;for(q=l.length-1;b<l.length;q=b++){var e=l[b][1]>h;var t=l[q][1]>h;e!==t&&p<(l[q][0]-l[b][0])*(h-l[b][1])/(l[q][1]-
l[b][1])+l[b][0]&&(k=!k)}return k}}});v(b,"Series/Map/MapPoint.js",[b["Series/ColorMapComposition.js"],b["Maps/MapUtilities.js"],b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,l,q,k){var p=this&&this.__extends||function(){var d=function(b,a){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,g){a.__proto__=g}||function(a,g){for(var c in g)g.hasOwnProperty(c)&&(a[c]=g[c])};return d(b,a)};return function(b,a){function c(){this.constructor=b}d(b,a);b.prototype=
null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),h=l.boundsFromPath,e=k.extend,t=k.isNumber,n=k.pick;l=function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.options=void 0;a.path=void 0;a.series=void 0;return a}p(d,b);d.getProjectedPath=function(a,c){a.projectedPath||(c&&a.geometry?(c.hasCoordinates=!0,a.projectedPath=c.path(a.geometry)):a.projectedPath=a.path);return a.projectedPath||[]};d.prototype.applyOptions=function(a,c){var g=this.series;a=b.prototype.applyOptions.call(this,
a,c);c=g.joinBy;g.mapData&&g.mapMap&&(c=b.prototype.getNestedProperty.call(a,c[1]),(g="undefined"!==typeof c&&g.mapMap[c])?e(a,g):a.value=a.value||null);return a};d.prototype.getProjectedBounds=function(a){a=d.getProjectedPath(this,a);a=h(a);var c=this.properties;if(a){var g=c&&c["hc-middle-x"];c=c&&c["hc-middle-y"];a.midX=a.x1+(a.x2-a.x1)*n(this.middleX,t(g)?g:.5);g=n(this.middleY,t(c)?c:.5);this.geometry||(g=1-g);a.midY=a.y2-(a.y2-a.y1)*g;return a}};d.prototype.onMouseOver=function(a){k.clearTimeout(this.colorInterval);
if(!this.isNull||this.series.options.nullInteraction)b.prototype.onMouseOver.call(this,a);else this.series.onMouseOut(a)};d.prototype.zoomTo=function(){var a=this.series.chart;a.mapView&&this.bounds&&(a.mapView.fitToBounds(this.bounds,void 0,!1),this.series.isDirty=!0,a.redraw())};return d}(q.seriesTypes.scatter.prototype.pointClass);e(l.prototype,{dataLabelOnNull:b.pointMembers.dataLabelOnNull,moveToTopOnHover:b.pointMembers.moveToTopOnHover,isValid:b.pointMembers.isValid});return l});v(b,"Maps/MapViewOptionsDefault.js",
[],function(){return{center:[0,0],maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0}});v(b,"Maps/MapViewInsetsOptionsDefault.js",[],function(){return{borderColor:"#cccccc",borderWidth:1,center:[0,0],padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}});v(b,"Extensions/GeoJSON.js",[b["Core/Chart/Chart.js"],b["Core/FormatUtilities.js"],b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l,q,k){function p(a,c){c||(c=Object.keys(a.objects)[0]);c=
a.objects[c];if(c["hc-decoded-geojson"])return c["hc-decoded-geojson"];var g=a.arcs;if(a.transform){var b=a.transform,d=b.scale,e=b.translate;g=a.arcs.map(function(a){var c=0,f=0;return a.map(function(a){a=a.slice();a[0]=(c+=a[0])*d[0]+e[0];a[1]=(f+=a[1])*d[1]+e[1];return a})})}var r=function(a){return"number"===typeof a[0]?a.reduce(function(a,f,c){var m=0>f?g[~f]:g[f];0>f?(m=m.slice(0,0===c?m.length:m.length-1),m.reverse()):c&&(m=m.slice(1));return a.concat(m)},[]):a.map(r)};b=c.geometries.map(function(a){return{type:"Feature",
properties:a.properties,geometry:{type:a.type,coordinates:a.coordinates||r(a.arcs)}}});a={type:"FeatureCollection",copyright:a.copyright,copyrightShort:a.copyrightShort,copyrightUrl:a.copyrightUrl,features:b,"hc-recommended-mapview":c["hc-recommended-mapview"],bbox:a.bbox,title:a.title};return c["hc-decoded-geojson"]=a}function h(a,c,g){void 0===c&&(c="map");var b=[];a="Topology"===a.type?p(a):a;a.features.forEach(function(a){var g=a.geometry||{},e=g.type;g=g.coordinates;a=a.properties;var u;"map"!==
c&&"mapbubble"!==c||"Polygon"!==e&&"MultiPolygon"!==e?"mapline"!==c||"LineString"!==e&&"MultiLineString"!==e?"mappoint"===c&&"Point"===e&&g.length&&(u={geometry:{coordinates:g,type:e}}):g.length&&(u={geometry:{coordinates:g,type:e}}):g.length&&(u={geometry:{coordinates:g,type:e}});u&&(e=a&&(a.name||a.NAME),b.push(d(u,{name:"string"===typeof e?e:void 0,properties:a})))});g&&a.copyrightShort&&(g.chart.mapCredits=e(g.chart.options.credits.mapText,{geojson:a}),g.chart.mapCreditsFull=e(g.chart.options.credits.mapTextFull,
{geojson:a}));return b}var e=l.format,t=q.win,n=k.error,d=k.extend,y=k.merge;l=k.wrap;"";b.prototype.transformFromLatLon=function(a,c){var g=this.options.chart.proj4||t.proj4;if(g){var b=c.jsonmarginX;b=void 0===b?0:b;var d=c.jsonmarginY;d=void 0===d?0:d;var e=c.jsonres;e=void 0===e?1:e;var r=c.scale;r=void 0===r?1:r;var h=c.xoffset;h=void 0===h?0:h;var p=c.xpan;p=void 0===p?0:p;var f=c.yoffset;f=void 0===f?0:f;var m=c.ypan;m=void 0===m?0:m;a=g(c.crs,[a.lon,a.lat]);g=c.cosAngle||c.rotation&&Math.cos(c.rotation);
var k=c.sinAngle||c.rotation&&Math.sin(c.rotation);c=c.rotation?[a[0]*g+a[1]*k,-a[0]*k+a[1]*g]:a;return{x:((c[0]-h)*r+p)*e+b,y:-(((f-c[1])*r+m)*e-d)}}n(21,!1,this)};b.prototype.transformToLatLon=function(a,c){var g=this.options.chart.proj4||t.proj4;if(!g)n(21,!1,this);else if(null!==a.y){var b=c.jsonmarginX,d=c.jsonmarginY,e=c.jsonres;e=void 0===e?1:e;var r=c.scale;r=void 0===r?1:r;var h=c.xoffset,p=c.xpan,f=c.yoffset,m=c.ypan;a={x:((a.x-(void 0===b?0:b))/e-(void 0===p?0:p))/r+(void 0===h?0:h),y:((a.y-
(void 0===d?0:d))/e+(void 0===m?0:m))/r+(void 0===f?0:f)};b=c.cosAngle||c.rotation&&Math.cos(c.rotation);d=c.sinAngle||c.rotation&&Math.sin(c.rotation);c=g(c.crs,"WGS84",c.rotation?{x:a.x*b+a.y*-d,y:a.x*d+a.y*b}:a);return{lat:c.y,lon:c.x}}};b.prototype.fromPointToLatLon=function(a){return this.mapView&&this.mapView.projectedUnitsToLonLat(a)};b.prototype.fromLatLonToPoint=function(a){return this.mapView&&this.mapView.lonLatToProjectedUnits(a)};l(b.prototype,"addCredits",function(a,c){c=y(!0,this.options.credits,
c);this.mapCredits&&(c.href=null);a.call(this,c);this.credits&&this.mapCreditsFull&&this.credits.attr({title:this.mapCreditsFull})});q.geojson=h;return{geojson:h,topo2geo:p}});v(b,"Core/Geometry/PolygonClip.js",[],function(){var b=function(b,p,h){return(p[0]-b[0])*(h[1]-b[1])>(p[1]-b[1])*(h[0]-b[0])},l=function(b,p,h,e){var k=[b[0]-p[0],b[1]-p[1]],n=[h[0]-e[0],h[1]-e[1]];b=b[0]*p[1]-b[1]*p[0];h=h[0]*e[1]-h[1]*e[0];e=1/(k[0]*n[1]-k[1]*n[0]);k=[(b*n[0]-h*k[0])*e,(b*n[1]-h*k[1])*e];k.isIntersection=
!0;return k},q;(function(k){k.clipLineString=function(b,h){var e=[];b=k.clipPolygon(b,h,!1);for(h=1;h<b.length;h++)b[h].isIntersection&&b[h-1].isIntersection&&(e.push(b.splice(0,h)),h=0),h===b.length-1&&e.push(b);return e};k.clipPolygon=function(p,h,e){void 0===e&&(e=!0);for(var k=h[h.length-1],n,d,q=p,a=0;a<h.length;a++){var c=q;p=h[a];q=[];n=e?c[c.length-1]:c[0];for(var g=0;g<c.length;g++)d=c[g],b(k,p,d)?(b(k,p,n)||q.push(l(k,p,n,d)),q.push(d)):b(k,p,n)&&q.push(l(k,p,n,d)),n=d;k=p}return q}})(q||
(q={}));return q});v(b,"Maps/Projections/LambertConformalConic.js",[],function(){var b=Math.sign||function(b){return 0===b?0:0<b?1:-1},l=Math.PI/180,q=Math.PI/2;return function(){function k(p){var h,e=(p.parallels||[]).map(function(b){return b*l}),k=e[0]||0;e=null!==(h=e[1])&&void 0!==h?h:k;h=Math.cos(k);"object"===typeof p.projectedBounds&&(this.projectedBounds=p.projectedBounds);p=k===e?Math.sin(k):Math.log(h/Math.cos(e))/Math.log(Math.tan((q+e)/2)/Math.tan((q+k)/2));1e-10>Math.abs(p)&&(p=1e-10*
(b(p)||1));this.n=p;this.c=h*Math.pow(Math.tan((q+k)/2),p)/p}k.prototype.forward=function(b){var h=b[0]*l,e=this.c,k=this.n,n=this.projectedBounds;b=b[1]*l;0<e?b<-q+.000001&&(b=-q+.000001):b>q-.000001&&(b=q-.000001);var d=e/Math.pow(Math.tan((q+b)/2),k);b=d*Math.sin(k*h)*63.78137;h=63.78137*(e-d*Math.cos(k*h));e=[b,h];n&&(b<n.x1||b>n.x2||h<n.y1||h>n.y2)&&(e.outside=!0);return e};k.prototype.inverse=function(k){var h=k[0]/63.78137,e=this.c,p=this.n;k=e-k[1]/63.78137;var n=b(p)*Math.sqrt(h*h+k*k),d=
Math.atan2(h,Math.abs(k))*b(k);0>k*p&&(d-=Math.PI*b(h)*b(k));return[d/p/l,(2*Math.atan(Math.pow(e/n,1/p))-q)/l]};return k}()});v(b,"Maps/Projections/EqualEarth.js",[],function(){var b=Math.sqrt(3)/2;return function(){function l(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}l.prototype.forward=function(l){var k=Math.PI/180,p=Math.asin(b*Math.sin(l[1]*k)),h=p*p,e=h*h*h;return[l[0]*k*Math.cos(p)*74.03120656864502/(b*(1.340264+3*-.081106*h+e*(7*
.000893+.034164*h))),74.03120656864502*p*(1.340264+-.081106*h+e*(.000893+.003796*h))]};l.prototype.inverse=function(l){var k=l[0]/74.03120656864502;l=l[1]/74.03120656864502;var p=180/Math.PI,h=l,e;for(e=0;12>e;++e){var q=h*h;var n=q*q*q;var d=h*(1.340264+-.081106*q+n*(.000893+.003796*q))-l;q=1.340264+3*-.081106*q+n*(7*.000893+.034164*q);h-=d/=q;if(1e-9>Math.abs(d))break}q=h*h;return[p*b*k*(1.340264+3*-.081106*q+q*q*q*(7*.000893+.034164*q))/Math.cos(h),p*Math.asin(Math.sin(h)/b)]};return l}()});v(b,
"Maps/Projections/Miller.js",[],function(){var b=Math.PI/4,l=Math.PI/180;return function(){function q(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}q.prototype.forward=function(k){return[k[0]*l*63.78137,79.7267125*Math.log(Math.tan(b+.4*k[1]*l))]};q.prototype.inverse=function(k){return[k[0]/63.78137/l,2.5*(Math.atan(Math.exp(k[1]/63.78137*.8))-b)/l]};return q}()});v(b,"Maps/Projections/Orthographic.js",[],function(){var b=Math.PI/180;return function(){function l(){this.antimeridianCutting=
!1;this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}l.prototype.forward=function(l){var k=l[0];l=l[1]*b;l=[Math.cos(l)*Math.sin(k*b)*63.78460826781007,63.78460826781007*Math.sin(l)];if(-90>k||90<k)l.outside=!0;return l};l.prototype.inverse=function(l){var k=l[0]/63.78460826781007;l=l[1]/63.78460826781007;var p=Math.sqrt(k*k+l*l),h=Math.asin(p),e=Math.sin(h);return[Math.atan2(k*e,p*Math.cos(h))/b,Math.asin(p&&l*e/p)/b]};return l}()});v(b,"Maps/Projections/WebMercator.js",
[],function(){var b=Math.PI/180;return function(){function l(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071};this.maxLatitude=85.0511287798}l.prototype.forward=function(l){var k=Math.sin(l[1]*b);k=[63.78137*l[0]*b,63.78137*Math.log((1+k)/(1-k))/2];85.0511287798<Math.abs(l[1])&&(k.outside=!0);return k};l.prototype.inverse=function(l){return[l[0]/(63.78137*b),(2*Math.atan(Math.exp(l[1]/63.78137))-Math.PI/2)/b]};return l}()});v(b,"Maps/Projections/ProjectionRegistry.js",
[b["Maps/Projections/LambertConformalConic.js"],b["Maps/Projections/EqualEarth.js"],b["Maps/Projections/Miller.js"],b["Maps/Projections/Orthographic.js"],b["Maps/Projections/WebMercator.js"]],function(b,l,q,k,p){return{EqualEarth:l,LambertConformalConic:b,Miller:q,Orthographic:k,WebMercator:p}});v(b,"Maps/Projection.js",[b["Core/Geometry/PolygonClip.js"],b["Maps/Projections/ProjectionRegistry.js"],b["Core/Utilities.js"]],function(b,l,q){var k=this&&this.__spreadArray||function(b,a,c){if(c||2===arguments.length)for(var g=
0,d=a.length,e;g<d;g++)!e&&g in a||(e||(e=Array.prototype.slice.call(a,0,g)),e[g]=a[g]);return b.concat(e||Array.prototype.slice.call(a))},p=b.clipLineString,h=b.clipPolygon,e=q.clamp,t=q.erase,n=2*Math.PI/360,d=function(b){-180>b&&(b+=360);180<b&&(b-=360);return b};return function(){function b(a){void 0===a&&(a={});this.hasGeoProjection=this.hasCoordinates=!1;this.maxLatitude=90;this.options=a;var c=a.name,g=a.projectedBounds,d=a.rotation;this.rotator=d?this.getRotator(d):void 0;if(c=c?b.registry[c]:
void 0)this.def=new c(a);var e=this.def,h=this.rotator;e&&(this.maxLatitude=e.maxLatitude||90,this.hasGeoProjection=!0);h&&e?(this.forward=function(a){return e.forward(h.forward(a))},this.inverse=function(a){return h.inverse(e.inverse(a))}):e?(this.forward=function(a){return e.forward(a)},this.inverse=function(a){return e.inverse(a)}):h&&(this.forward=h.forward,this.inverse=h.inverse);this.bounds="world"===g?e&&e.bounds:g}b.add=function(a,c){b.registry[a]=c};b.greatCircle=function(a,b,g){var c=Math.atan2,
e=Math.cos,d=Math.sin,h=Math.sqrt,k=a[1]*n,l=a[0]*n,f=b[1]*n,m=b[0]*n,p=f-k,q=m-l;p=d(p/2)*d(p/2)+e(k)*e(f)*d(q/2)*d(q/2);p=2*c(h(p),h(1-p));var t=Math.round(6371E3*p/5E5);q=[];g&&q.push(a);if(1<t)for(t=a=1/t;.999>t;t+=a){var C=d((1-t)*p)/d(p),G=d(t*p)/d(p),w=C*e(k)*e(l)+G*e(f)*e(m),A=C*e(k)*d(l)+G*e(f)*d(m);C=C*d(k)+G*d(f);C=c(C,h(w*w+A*A));w=c(A,w);q.push([w/n,C/n])}g&&q.push(b);return q};b.insertGreatCircles=function(a){for(var c=a.length-1;c--;)if(10<Math.max(Math.abs(a[c][0]-a[c+1][0]),Math.abs(a[c][1]-
a[c+1][1]))){var g=b.greatCircle(a[c],a[c+1]);g.length&&a.splice.apply(a,k([c+1,0],g,!1))}};b.toString=function(a){a=a||{};var b=a.rotation;return[a.name,b&&b.join(",")].join(";")};b.prototype.lineIntersectsBounds=function(a){var b=this.bounds||{},g=b.x2,e=b.y1,d=b.y2,h=function(a,b,f){var c=a[0];a=a[1];var g=b?0:1;if("number"===typeof f&&c[b]>=f!==a[b]>=f)return c=c[g]+(f-c[b])/(a[b]-c[b])*(a[g]-c[g]),b?[c,f]:[f,c]},k=a[0];if(b=h(a,0,b.x1))k=b,a[1]=b;else if(b=h(a,0,g))k=b,a[1]=b;if(b=h(a,1,e))k=
b;else if(b=h(a,1,d))k=b;return k};b.prototype.getRotator=function(a){var b=a[0]*n,g=(a[1]||0)*n;a=(a[2]||0)*n;var e=Math.cos(g),d=Math.sin(g),h=Math.cos(a),k=Math.sin(a);if(0!==b||0!==g||0!==a)return{forward:function(a){var c=a[0]*n+b,f=a[1]*n,g=Math.cos(f);a=Math.cos(c)*g;c=Math.sin(c)*g;f=Math.sin(f);g=f*e+a*d;return[Math.atan2(c*h-g*k,a*e-f*d)/n,Math.asin(g*h+c*k)/n]},inverse:function(a){var c=a[0]*n,f=a[1]*n,g=Math.cos(f);a=Math.cos(c)*g;c=Math.sin(c)*g;f=Math.sin(f);g=f*h-c*k;return[(Math.atan2(c*
h+f*k,a*e+g*d)-b)/n,Math.asin(g*e-a*d)/n]}}};b.prototype.forward=function(a){return a};b.prototype.inverse=function(a){return a};b.prototype.cutOnAntimeridian=function(a,c){var g=[],h=[a];a.forEach(function(b,f){var d=a[f-1];if(!f){if(!c)return;d=a[a.length-1]}var m=d[0],w=b[0];(-90>m||90<m)&&(-90>w||90<w)&&0<m!==0<w&&(w=e((180-(m+360)%360)/((w+360)%360-(m+360)%360),0,1),g.push({i:f,lat:d[1]+w*(b[1]-d[1]),direction:0>m?1:-1,previousLonLat:d,lonLat:b}))});if(g.length)if(c){if(1===g.length%2){var l=
g.slice().sort(function(a,b){return Math.abs(b.lat)-Math.abs(a.lat)})[0];t(g,l)}for(var n=g.length-2;0<=n;){var r=g[n].i,p=d(180+.000001*g[n].direction),x=d(180-.000001*g[n].direction);r=a.splice.apply(a,k([r,g[n+1].i-r],b.greatCircle([p,g[n].lat],[p,g[n+1].lat],!0),!1));r.push.apply(r,b.greatCircle([x,g[n+1].lat],[x,g[n].lat],!0));h.push(r);n-=2}if(l)for(p=0;p<h.length;p++){n=l.direction;var f=l.lat;x=h[p];r=x.indexOf(l.lonLat);if(-1<r){p=(0>f?-1:1)*this.maxLatitude;var m=d(180+.000001*n),q=d(180-
.000001*n);f=b.greatCircle([m,f],[m,p],!0);for(m+=120*n;-180<m&&180>m;m+=120*n)f.push([m,p]);f.push.apply(f,b.greatCircle([q,p],[q,l.lat],!0));x.splice.apply(x,k([r,0],f,!1));break}}}else for(n=g.length;n--;)r=g[n].i,r=a.splice(r,a.length,[d(180+.000001*g[n].direction),g[n].lat]),r.unshift([d(180-.000001*g[n].direction),g[n].lat]),h.push(r);return h};b.prototype.path=function(a){var c=this,g=this.bounds,d=this.def,e=this.rotator,k=[],n="Polygon"===a.type||"MultiPolygon"===a.type,l=this.hasGeoProjection,
x=!d||!1!==d.antimeridianCutting,f=x?e:void 0,m=x?d||this:this,q;g&&(q=[[g.x1,g.y1],[g.x2,g.y1],[g.x2,g.y2],[g.x1,g.y2]]);var t=function(a){a=a.map(function(a){if(x){f&&(a=f.forward(a));var b=a[0];.000001>Math.abs(b-180)&&(b=180>b?179.999999:180.000001);a=[b,a[1]]}return a});var d=[a];l&&(b.insertGreatCircles(a),x&&(d=c.cutOnAntimeridian(a,n)));d.forEach(function(a){if(!(2>a.length)){var f=!1,c=!1,d=function(a){f?k.push(["L",a[0],a[1]]):(k.push(["M",a[0],a[1]]),f=!0)},e=!1,r=!1,u=a.map(function(a){a=
m.forward(a);a.outside?e=!0:r=!0;Infinity===a[1]?a[1]=1E10:-Infinity===a[1]&&(a[1]=-1E10);return a});if(x){n&&u.push(u[0]);if(e){if(!r)return;if(q)if(n)u=h(u,q);else if(g){p(u,q).forEach(function(a){f=!1;a.forEach(d)});return}}u.forEach(d)}else for(var K=0;K<u.length;K++){var t=a[K],B=u[K];if(B.outside)c=!0;else{if(n&&!G){var G=t;a.push(t);u.push(B)}c&&z&&(n&&l?b.greatCircle(z,t).forEach(function(a){return d(m.forward(a))}):f=!1);d(B);var z=t;c=!1}}}})};"LineString"===a.type?t(a.coordinates):"MultiLineString"===
a.type?a.coordinates.forEach(function(a){return t(a)}):"Polygon"===a.type?(a.coordinates.forEach(function(a){return t(a)}),k.length&&k.push(["Z"])):"MultiPolygon"===a.type&&(a.coordinates.forEach(function(a){a.forEach(function(a){return t(a)})}),k.length&&k.push(["Z"]));return k};b.registry=l;return b}()});v(b,"Maps/MapView.js",[b["Maps/MapViewOptionsDefault.js"],b["Maps/MapViewInsetsOptionsDefault.js"],b["Extensions/GeoJSON.js"],b["Core/Chart/MapChart.js"],b["Maps/MapUtilities.js"],b["Maps/Projection.js"],
b["Core/Utilities.js"]],function(b,l,q,k,p,h,e){var t=this&&this.__extends||function(){var a=function(b,f){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f])};return a(b,f)};return function(b,f){function c(){this.constructor=b}a(b,f);b.prototype=null===f?Object.create(f):(c.prototype=f.prototype,new c)}}(),n=this&&this.__spreadArray||function(a,b,f){if(f||2===arguments.length)for(var c=0,g=b.length,d;c<
g;c++)!d&&c in b||(d||(d=Array.prototype.slice.call(b,0,c)),d[c]=b[c]);return a.concat(d||Array.prototype.slice.call(b))},d=q.topo2geo,y=k.maps,a=p.boundsFromPath,c=p.pointInPolygon,g=e.addEvent,u=e.clamp,D=e.fireEvent,F=e.isArray,r=e.isNumber,z=e.isObject,x=e.isString,f=e.merge,m=e.pick,B=e.relativeLength,H=function(a,b){return Math.log(400.979322/Math.max((a.x2-a.x1)/(b.width/256),(a.y2-a.y1)/(b.height/256)))/Math.log(2)},I=function(){function a(c,d){var e=this;this.insets=[];this.padding=[0,0,
0,0];this.eventsToUnbind=[];var m;if(!(this instanceof C)){var w=n([c.options.chart.map],(c.options.series||[]).map(function(a){return a.mapData}),!0).map(function(a){return e.getGeoMap(a)}),k=[];w.forEach(function(a){a&&(m||(m=a["hc-recommended-mapview"]),a.bbox&&(a=a.bbox,k.push({x1:a[0],y1:a[1],x2:a[2],y2:a[3]})))});var A=k.length&&a.compositeBounds(k);if(A){var l=A.x1;var p=A.y1,u=A.x2;A=A.y2;l=180<u-l&&90<A-p?{name:"EqualEarth"}:{name:"LambertConformalConic",parallels:[p,A],rotation:[-(l+u)/
2]}}this.geoMap=w[0]}this.userOptions=d||{};w=f(b,{projection:l},m,d);A=m&&m.insets;d=d&&d.insets;A&&d&&(w.insets=a.mergeInsets(A,d));this.chart=c;this.center=w.center;this.options=w;this.projection=new h(w.projection);this.playingField=c.plotBox;this.zoom=w.zoom||0;this.createInsets();this.eventsToUnbind.push(g(c,"afterSetChartSize",function(){e.playingField=e.getField();if(void 0===e.minZoom||e.minZoom===e.zoom)e.fitToBounds(void 0,void 0,!1),!e.chart.hasRendered&&r(e.userOptions.zoom)&&(e.zoom=
e.userOptions.zoom),e.userOptions.center&&f(!0,e.center,e.userOptions.center)}));this.setUpEvents()}a.mergeInsets=function(a,b){var c=function(a){var b={};a.forEach(function(a,f){b[a&&a.id||"i".concat(f)]=a});return b},d=f(c(a),c(b));return Object.keys(d).map(function(a){return d[a]})};a.prototype.createInsets=function(){var a=this,b=this.options,c=b.insets;c&&c.forEach(function(c){c=new C(a,f(b.insetOptions,c));a.insets.push(c)})};a.prototype.fitToBounds=function(a,b,c,f){void 0===c&&(c=!0);var d=
a||this.getProjectedBounds();if(d){var g=m(b,a?0:this.options.padding);b=this.getField(!1);g=F(g)?g:[g,g,g,g];this.padding=[B(g[0],b.height),B(g[1],b.width),B(g[2],b.height),B(g[3],b.width)];this.playingField=this.getField();b=H(d,this.playingField);a||(this.minZoom=b);a=this.projection.inverse([(d.x2+d.x1)/2,(d.y2+d.y1)/2]);this.setView(a,b,c,f)}};a.prototype.getField=function(a){void 0===a&&(a=!0);a=a?this.padding:[0,0,0,0];return{x:a[3],y:a[0],width:this.chart.plotWidth-a[1]-a[3],height:this.chart.plotHeight-
a[0]-a[2]}};a.prototype.getGeoMap=function(a){if(x(a))return y[a];if(z(a,!0)){if("FeatureCollection"===a.type)return a;if("Topology"===a.type)return d(a)}};a.prototype.getMapBBox=function(){var a=this.getProjectedBounds(),b=this.getScale();if(a){var c=this.padding,f=this.projectedUnitsToPixels({x:a.x1,y:a.y2});return{width:(a.x2-a.x1)*b+c[1]+c[3],height:(a.y2-a.y1)*b+c[0]+c[2],x:f.x-c[3],y:f.y-c[0]}}};a.prototype.getProjectedBounds=function(){var b=this.chart.series.reduce(function(a,b){var c=b.getProjectedBounds&&
b.getProjectedBounds();c&&!1!==b.options.affectsMapView&&a.push(c);return a},[]);return this.projection.bounds||a.compositeBounds(b)};a.prototype.getScale=function(){return 256/400.979322*Math.pow(2,this.zoom)};a.prototype.getSVGTransform=function(){var a=this.playingField,b=a.x,c=a.y,f=a.width;a=a.height;var d=this.projection.forward(this.center),g=this.projection.hasCoordinates?-1:1,e=this.getScale();g*=e;return{scaleX:e,scaleY:g,translateX:b+f/2-d[0]*e,translateY:c+a/2-d[1]*g}};a.prototype.lonLatToPixels=
function(a){if(a=this.lonLatToProjectedUnits(a))return this.projectedUnitsToPixels(a)};a.prototype.lonLatToProjectedUnits=function(a){var b=this.chart,f=b.mapTransforms;if(f){for(var d in f)if(Object.hasOwnProperty.call(f,d)&&f[d].hitZone){var g=b.transformFromLatLon(a,f[d]);if(g&&c(g,f[d].hitZone.coordinates[0]))return g}return b.transformFromLatLon(a,f["default"])}f=0;for(d=this.insets;f<d.length;f++)if(b=d[f],b.options.geoBounds&&c({x:a.lon,y:a.lat},b.options.geoBounds.coordinates[0]))return a=
b.projection.forward([a.lon,a.lat]),a=b.projectedUnitsToPixels({x:a[0],y:a[1]}),this.pixelsToProjectedUnits(a);a=this.projection.forward([a.lon,a.lat]);if(!a.outside)return{x:a[0],y:a[1]}};a.prototype.projectedUnitsToLonLat=function(a){var b=this.chart,f=b.mapTransforms;if(f){for(var d in f)if(Object.hasOwnProperty.call(f,d)&&f[d].hitZone&&c(a,f[d].hitZone.coordinates[0]))return b.transformToLatLon(a,f[d]);return b.transformToLatLon(a,f["default"])}f=this.projectedUnitsToPixels(a);d=0;for(var g=this.insets;d<
g.length;d++)if(b=g[d],b.hitZone&&c(f,b.hitZone.coordinates[0]))return a=b.pixelsToProjectedUnits(f),a=b.projection.inverse([a.x,a.y]),{lon:a[0],lat:a[1]};a=this.projection.inverse([a.x,a.y]);return{lon:a[0],lat:a[1]}};a.prototype.redraw=function(a){this.chart.series.forEach(function(a){a.useMapGeometry&&(a.isDirty=!0)});this.chart.redraw(a)};a.prototype.setView=function(a,b,f,c){void 0===f&&(f=!0);a&&(this.center=a);"number"===typeof b&&("number"===typeof this.minZoom&&(b=Math.max(b,this.minZoom)),
"number"===typeof this.options.maxZoom&&(b=Math.min(b,this.options.maxZoom)),r(b)&&(this.zoom=b));var d=this.getProjectedBounds();if(d){a=this.projection.forward(this.center);var g=this.playingField;b=g.x;var e=g.y,m=g.width;g=g.height;var h=this.getScale(),k=this.projectedUnitsToPixels({x:d.x1,y:d.y1}),n=this.projectedUnitsToPixels({x:d.x2,y:d.y2});d=[(d.x1+d.x2)/2,(d.y1+d.y2)/2];var l=k.x,p=n.y;n=n.x;k=k.y;n-l<m?a[0]=d[0]:l<b&&n<b+m?a[0]+=Math.max(l-b,n-m-b)/h:n>b+m&&l>b&&(a[0]+=Math.min(n-m-b,
l-b)/h);k-p<g?a[1]=d[1]:p<e&&k<e+g?a[1]-=Math.max(p-e,k-g-e)/h:k>e+g&&p>e&&(a[1]-=Math.min(k-g-e,p-e)/h);this.center=this.projection.inverse(a);this.insets.forEach(function(a){a.options.field&&(a.hitZone=a.getHitZone(),a.playingField=a.getField())});this.render()}D(this,"afterSetView");f&&this.redraw(c)};a.prototype.projectedUnitsToPixels=function(a){var b=this.getScale(),f=this.projection.forward(this.center),c=this.playingField;return{x:c.x+c.width/2-b*(f[0]-a.x),y:c.y+c.height/2+b*(f[1]-a.y)}};
a.prototype.pixelsToLonLat=function(a){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(a))};a.prototype.pixelsToProjectedUnits=function(a){var b=a.x;a=a.y;var f=this.getScale(),c=this.projection.forward(this.center),d=this.playingField;return{x:c[0]+(b-(d.x+d.width/2))/f,y:c[1]-(a-(d.y+d.height/2))/f}};a.prototype.setUpEvents=function(){var a=this,b=this.chart,f,c,d,e=function(g){var e=b.pointer.pinchDown,m=a.projection,h=b.mouseDownX,k=b.mouseDownY;1===e.length&&(h=e[0].chartX,k=e[0].chartY);
if("number"===typeof h&&"number"===typeof k){var n=""+h+",".concat(k),l=g.originalEvent;e=l.chartX;l=l.chartY;n!==c&&(c=n,f=a.projection.forward(a.center),d=(a.projection.options.rotation||[0,0]).slice());n=(n=m.def&&m.def.bounds)&&H(n,a.playingField)||-Infinity;"Orthographic"===m.options.name&&(a.minZoom||Infinity)<1.1*n?(m=440/(a.getScale()*Math.min(b.plotWidth,b.plotHeight)),d&&(h=(h-e)*m-d[0],k=u(-d[1]-(k-l)*m,-80,80),e=a.zoom,a.update({projection:{rotation:[-h,-k]}},!1),a.zoom=e,b.redraw(!1))):
(m=a.getScale(),k=a.projection.inverse([f[0]+(h-e)/m,f[1]-(k-l)/m]),a.setView(k,void 0,!0,!1));g.preventDefault()}};g(b,"pan",e);g(b,"touchpan",e);g(b,"selection",function(f){if(f.resetSelection)a.zoomBy();else{var c=f.x-b.plotLeft,d=f.y-b.plotTop,g=a.pixelsToProjectedUnits({x:c,y:d}),e=g.y;g=g.x;c=a.pixelsToProjectedUnits({x:c+f.width,y:d+f.height});a.fitToBounds({x1:g,y1:e,x2:c.x,y2:c.y},void 0,!0,f.originalEvent.touches?!1:void 0);/^touch/.test(f.originalEvent.type)||b.showResetZoom();f.preventDefault()}})};
a.prototype.render=function(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())};a.prototype.update=function(a,b,c){void 0===b&&(b=!0);var d=a.projection;d=d&&h.toString(d)!==h.toString(this.options.projection);var g=!1;f(!0,this.userOptions,a);f(!0,this.options,a);"insets"in a&&(this.insets.forEach(function(a){return a.destroy()}),this.insets.length=0,g=!0);if(d||g)this.chart.series.forEach(function(a){var b=a.transformGroups;a.clearBounds&&a.clearBounds();a.isDirty=
!0;a.isDirtyData=!0;if(g&&b)for(;1<b.length;)(a=b.pop())&&a.destroy()}),d&&(this.projection=new h(this.options.projection)),g&&this.createInsets(),a.center||r(a.zoom)||this.fitToBounds(void 0,void 0,!1);(a.center||r(a.zoom))&&this.setView(this.options.center,a.zoom,!1);b&&this.chart.redraw(c)};a.prototype.zoomBy=function(a,b,f,c){var d=this.chart,g=this.projection.forward(this.center);b=b?this.projection.forward(b):[];var e=b[0],m=b[1];"number"===typeof a?(a=this.zoom+a,b=void 0,f&&(e=f[0],m=f[1],
f=this.getScale(),e=e-d.plotLeft-d.plotWidth/2,d=m-d.plotTop-d.plotHeight/2,e=g[0]+e/f,m=g[1]+d/f),"number"===typeof e&&"number"===typeof m&&(f=1-Math.pow(2,this.zoom)/Math.pow(2,a),e=g[0]-e,d=g[1]-m,g[0]-=e*f,g[1]+=d*f,b=this.projection.inverse(g)),this.setView(b,a,void 0,c)):this.fitToBounds(void 0,void 0,void 0,c)};a.compositeBounds=function(a){if(a.length)return a.slice(1).reduce(function(a,b){a.x1=Math.min(a.x1,b.x1);a.y1=Math.min(a.y1,b.y1);a.x2=Math.max(a.x2,b.x2);a.y2=Math.max(a.y2,b.y2);
return a},f(a[0]))};return a}(),C=function(b){function d(c,d){var g=b.call(this,c.chart,d)||this;g.id=d.id;g.mapView=c;g.options=f(l,d);g.allBounds=[];g.options.geoBounds&&(c=c.projection.path(g.options.geoBounds),g.geoBoundsProjectedBox=a(c),g.geoBoundsProjectedPolygon=c.map(function(a){return[a[1]||0,a[2]||0]}));return g}t(d,b);d.prototype.getField=function(a){void 0===a&&(a=!0);var f=this.hitZone;if(f){var c=a?this.padding:[0,0,0,0];f=f.coordinates[0];var d=f.map(function(a){return a[0]}),g=f.map(function(a){return a[1]});
f=Math.min.apply(0,d)+c[3];d=Math.max.apply(0,d)-c[1];var e=Math.min.apply(0,g)+c[0];c=Math.max.apply(0,g)-c[2];if(r(f)&&r(e))return{x:f,y:e,width:d-f,height:c-e}}return b.prototype.getField.call(this,a)};d.prototype.getHitZone=function(){var a=this.chart,b=this.mapView,c=this.options,d=(c.field||{}).coordinates;if(d){d=d[0];if("percent"===c.units){var g="mapBoundingBox"===c.relativeTo&&b.getMapBBox()||f(a.plotBox,{x:0,y:0});d=d.map(function(a){return[B(""+a[0]+"%",g.width,g.x),B(""+a[1]+"%",g.height,
g.y)]})}return{type:"Polygon",coordinates:[d]}}};d.prototype.getProjectedBounds=function(){return I.compositeBounds(this.allBounds)};d.prototype.isInside=function(a){var b=this.geoBoundsProjectedBox,f=this.geoBoundsProjectedPolygon;return!!(b&&a.x>=b.x1&&a.x<=b.x2&&a.y>=b.y1&&a.y<=b.y2&&f&&c(a,f))};d.prototype.render=function(){var a=this.chart,b=this.mapView,f=this.options,c=f.borderPath||f.field;if(c&&b.group){var d=!0;this.border||(this.border=a.renderer.path().addClass("highcharts-mapview-inset-border").add(b.group),
d=!1);a.styledMode||this.border.attr({stroke:f.borderColor,"stroke-width":f.borderWidth});var g=Math.round(this.border.strokeWidth())%2/2,e="mapBoundingBox"===f.relativeTo&&b.getMapBBox()||b.playingField;b=(c.coordinates||[]).reduce(function(b,c){return c.reduce(function(b,c,d){var m=c[0];c=c[1];"percent"===f.units&&(m=a.plotLeft+B(""+m+"%",e.width,e.x),c=a.plotTop+B(""+c+"%",e.height,e.y));m=Math.floor(m)+g;c=Math.floor(c)+g;b.push(0===d?["M",m,c]:["L",m,c]);return b},b)},[]);this.border[d?"animate":
"attr"]({d:b})}};d.prototype.destroy=function(){this.border&&(this.border=this.border.destroy());this.eventsToUnbind.forEach(function(a){return a()})};d.prototype.setUpEvents=function(){};return d}(I);g(k,"afterInit",function(){this.mapView=new I(this,this.options.mapView)});return I});v(b,"Series/Map/MapSeries.js",[b["Core/Animation/AnimationUtilities.js"],b["Series/ColorMapComposition.js"],b["Series/CenteredUtilities.js"],b["Core/Globals.js"],b["Core/Legend/LegendSymbol.js"],b["Core/Chart/MapChart.js"],
b["Series/Map/MapPoint.js"],b["Maps/MapView.js"],b["Core/Series/Series.js"],b["Core/Series/SeriesRegistry.js"],b["Core/Renderer/SVG/SVGRenderer.js"],b["Core/Utilities.js"]],function(b,l,q,k,p,h,e,t,n,d,y,a){var c=this&&this.__extends||function(){var a=function(b,f){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f])};return a(b,f)};return function(b,f){function c(){this.constructor=b}a(b,f);b.prototype=
null===f?Object.create(f):(c.prototype=f.prototype,new c)}}(),g=b.animObject;b=k.noop;var u=h.splitPath;h=d.seriesTypes;var D=h.column,F=h.scatter;h=a.extend;var r=a.find,z=a.fireEvent,x=a.getNestedProperty,f=a.isArray,m=a.isNumber,B=a.isObject,H=a.merge,I=a.objectEach,C=a.pick,G=a.splat;a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.chart=void 0;b.data=void 0;b.group=void 0;b.joinBy=void 0;b.options=void 0;b.points=void 0;b.processedData=[];return b}c(b,a);b.prototype.animate=
function(a){var b=this.chart,f=this.group,c=g(this.options.animation);b.renderer.isSVG&&(a?f.attr({translateX:b.plotLeft+b.plotWidth/2,translateY:b.plotTop+b.plotHeight/2,scaleX:.0