/*
 Highmaps JS v7.0.1 (2018-12-19)
 Highmaps as a plugin for Highcharts or Highstock.

 (c) 2011-2018 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(z){"object"===typeof module&&module.exports?module.exports=z:"function"===typeof define&&define.amd?define(function(){return z}):z("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(z){(function(a){var p=a.addEvent,h=a.Axis,n=a.pick;p(h,"getSeriesExtremes",function(){var a=[];this.isXAxis&&(this.series.forEach(function(e,r){e.useMapGeometry&&(a[r]=e.xData,e.xData=[])}),this.seriesXData=a)});p(h,"afterGetSeriesExtremes",function(){var a=this.seriesXData,e,t,h;this.isXAxis&&(e=
n(this.dataMin,Number.MAX_VALUE),t=n(this.dataMax,-Number.MAX_VALUE),this.series.forEach(function(d,b){d.useMapGeometry&&(e=Math.min(e,n(d.minX,e)),t=Math.max(t,n(d.maxX,t)),d.xData=a[b],h=!0)}),h&&(this.dataMin=e,this.dataMax=t),delete this.seriesXData)});p(h,"afterSetAxisTranslation",function(){var a=this.chart,e;e=a.plotWidth/a.plotHeight;var a=a.xAxis[0],h;"yAxis"===this.coll&&void 0!==a.transA&&this.series.forEach(function(a){a.preserveAspectRatio&&(h=!0)});if(h&&(this.transA=a.transA=Math.min(this.transA,
a.transA),e/=(a.max-a.min)/(this.max-this.min),e=1>e?this:a,a=(e.max-e.min)*e.transA,e.pixelPadding=e.len-a,e.minPixelPadding=e.pixelPadding/2,a=e.fixTo)){a=a[1]-e.toValue(a[0],!0);a*=e.transA;if(Math.abs(a)>e.minPixelPadding||e.min===e.dataMin&&e.max===e.dataMax)a=0;e.minPixelPadding-=a}});p(h,"render",function(){this.fixTo=null})})(z);(function(a){var p=a.addEvent,h=a.Axis,n=a.Chart,r=a.color,e,t=a.extend,y=a.isNumber,d=a.Legend,b=a.LegendSymbolMixin,f=a.noop,u=a.merge,q=a.pick;a.ColorAxis||(e=
a.ColorAxis=function(){this.init.apply(this,arguments)},t(e.prototype,h.prototype),t(e.prototype,{defaultColorAxisOptions:{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},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(h.prototype.keepProps),
init:function(c,l){var g="vertical"!==c.options.legend.layout,a;this.coll="colorAxis";a=u(this.defaultColorAxisOptions,{side:g?2:1,reversed:!g},l,{opposite:!g,showEmpty:!1,title:null,visible:c.options.legend.enabled});h.prototype.init.call(this,c,a);l.dataClasses&&this.initDataClasses(l);this.initStops();this.horiz=g;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(c){var l=this.chart,g,a=0,k=l.options.chart.colorCount,m=this.options,b=c.dataClasses.length;this.dataClasses=
g=[];this.legendItems=[];c.dataClasses.forEach(function(c,x){c=u(c);g.push(c);if(l.styledMode||!c.color)"category"===m.dataClassColor?(l.styledMode||(x=l.options.colors,k=x.length,c.color=x[a]),c.colorIndex=a,a++,a===k&&(a=0)):c.color=r(m.minColor).tweenTo(r(m.maxColor),2>b?.5:x/(b-1))})},setTickPositions:function(){if(!this.dataClasses)return h.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(c){c.color=
r(c[1])})},setOptions:function(c){h.prototype.setOptions.call(this,c);this.options.crosshair=this.options.marker},setAxisSize:function(){var c=this.legendSymbol,l=this.chart,g=l.options.legend||{},a,k;c?(this.left=g=c.attr("x"),this.top=a=c.attr("y"),this.width=k=c.attr("width"),this.height=c=c.attr("height"),this.right=l.chartWidth-g-k,this.bottom=l.chartHeight-a-c,this.len=this.horiz?k:c,this.pos=this.horiz?g:a):this.len=(this.horiz?g.symbolWidth:g.symbolHeight)||this.defaultLegendLength},normalizedValue:function(c){this.isLog&&
(c=this.val2lin(c));return 1-(this.max-c)/(this.max-this.min||1)},toColor:function(c,l){var a=this.stops,b,k,m=this.dataClasses,x,v;if(m)for(v=m.length;v--;){if(x=m[v],b=x.from,a=x.to,(void 0===b||c>=b)&&(void 0===a||c<=a)){k=x.color;l&&(l.dataClass=v,l.colorIndex=x.colorIndex);break}}else{c=this.normalizedValue(c);for(v=a.length;v--&&!(c>a[v][0]););b=a[v]||a[v+1];a=a[v+1]||b;c=1-(a[0]-c)/(a[0]-b[0]||1);k=b.color.tweenTo(a.color,c)}return k},getOffset:function(){var c=this.legendGroup,a=this.chart.axisOffset[this.side];
c&&(this.axisParent=c,h.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=a)},setLegendColor:function(){var c,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}},drawLegendSymbol:function(c,a){var l=c.padding,b=c.options,k=this.horiz,m=q(b.symbolWidth,k?this.defaultLegendLength:12),x=q(b.symbolHeight,k?12:this.defaultLegendLength),
v=q(b.labelPadding,k?16:30),b=q(b.itemDistance,10);this.setLegendColor();a.legendSymbol=this.chart.renderer.rect(0,c.baseline-11,m,x).attr({zIndex:1}).add(a.legendGroup);this.legendItemWidth=m+l+(k?b:v);this.legendItemHeight=x+l+(k?v:0)},setState:function(c){this.series.forEach(function(a){a.setState(c)})},visible:!0,setVisible:f,getSeriesExtremes:function(){var c=this.series,a=c.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;a--;)c[a].getExtremes(),void 0!==c[a].valueMin&&(this.dataMin=
Math.min(this.dataMin,c[a].valueMin),this.dataMax=Math.max(this.dataMax,c[a].valueMax))},drawCrosshair:function(c,a){var b=a&&a.plotX,l=a&&a.plotY,k,m=this.pos,x=this.len;a&&(k=this.toPixels(a[a.series.colorKey]),k<m?k=m-2:k>m+x&&(k=m+x+2),a.plotX=k,a.plotY=this.len-k,h.prototype.drawCrosshair.call(this,c,a),a.plotX=b,a.plotY=l,this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0,this.chart.styledMode||
this.cross.attr({fill:this.crosshair.color})))},getPlotLinePath:function(c,a,b,f,k){return y(k)?this.horiz?["M",k-4,this.top-6,"L",k+4,this.top-6,k,this.top,"Z"]:["M",this.left,k,"L",this.left-6,k+6,this.left-6,k-6,"Z"]:h.prototype.getPlotLinePath.call(this,c,a,b,f)},update:function(c,a){var b=this.chart,l=b.legend;this.series.forEach(function(c){c.isDirtyData=!0});c.dataClasses&&l.allItems&&(l.allItems.forEach(function(c){c.isDataClass&&c.legendGroup&&c.legendGroup.destroy()}),b.isDirtyLegend=!0);
b.options[this.coll]=u(this.userOptions,c);h.prototype.update.call(this,c,a);this.legendItem&&(this.setLegendColor(),l.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);h.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var c=this,l=this.chart,g=this.legendItems,d=l.options.legend,k=d.valueDecimals,m=d.valueSuffix||"",x;g.length||this.dataClasses.forEach(function(v,d){var A=!0,e=v.from,u=v.to;x="";void 0===e?x="\x3c ":void 0===u&&(x="\x3e ");
void 0!==e&&(x+=a.numberFormat(e,k)+m);void 0!==e&&void 0!==u&&(x+=" - ");void 0!==u&&(x+=a.numberFormat(u,k)+m);g.push(t({chart:l,name:x,options:{},drawLegendSymbol:b.drawRectangle,visible:!0,setState:f,isDataClass:!0,setVisible:function(){A=this.visible=!A;c.series.forEach(function(c){c.points.forEach(function(c){c.dataClass===d&&c.setVisible(A)})});l.legend.colorizeItem(this,A)}},v))});return g},name:""}),["fill","stroke"].forEach(function(c){a.Fx.prototype[c+"Setter"]=function(){this.elem.attr(c,
r(this.start).tweenTo(r(this.end),this.pos),null,!0)}}),p(n,"afterGetAxes",function(){var c=this.options.colorAxis;this.colorAxis=[];c&&new e(this,c)}),p(d,"afterGetAllItems",function(c){var b=[],g=this.chart.colorAxis[0];g&&g.options&&g.options.showInLegend&&(g.options.dataClasses?b=g.getDataClassLegendSymbols():b.push(g),g.series.forEach(function(b){a.erase(c.allItems,b)}));for(g=b.length;g--;)c.allItems.unshift(b[g])}),p(d,"afterColorizeItem",function(c){c.visible&&c.item.legendColor&&c.item.legendSymbol.attr({fill:c.item.legendColor})}),
p(d,"afterUpdate",function(c,a,b){this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},b)}))})(z);(function(a){var p=a.defined,h=a.noop,n=a.seriesTypes;a.colorPointMixin={isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setVisible:function(a){var e=this,r=a?"show":"hide";e.visible=!!a;["graphic","dataLabel"].forEach(function(a){if(e[a])e[a][r]()})},setState:function(r){a.Point.prototype.setState.call(this,r);this.graphic&&this.graphic.attr({zIndex:"hover"===
r?1:0})}};a.colorSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:h,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:n.column.prototype.pointAttribs,translateColors:function(){var a=this,e=this.options.nullColor,h=this.colorAxis,n=this.colorKey;this.data.forEach(function(d){var b=d[n];if(b=d.options.color||(d.isNull?e:h&&void 0!==b?h.toColor(b,d):d.color||a.color))d.color=
b})},colorAttribs:function(a){var e={};p(a.color)&&(e[this.colorProp||"fill"]=a.color);return e}}})(z);(function(a){function p(a){a&&(a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)}function h(a){this.init(a)}var n=a.addEvent,r=a.Chart,e=a.doc,t=a.extend,y=a.merge,d=a.pick;h.prototype.init=function(a){this.chart=a;a.mapNavButtons=[]};h.prototype.update=function(b){var f=this.chart,e=f.options.mapNavigation,q,c,l,g,w,k=function(c){this.handler.call(f,
c);p(c)},m=f.mapNavButtons;b&&(e=f.options.mapNavigation=y(f.options.mapNavigation,b));for(;m.length;)m.pop().destroy();d(e.enableButtons,e.enabled)&&!f.renderer.forExport&&a.objectEach(e.buttons,function(a,b){q=y(e.buttonOptions,a);f.styledMode||(c=q.theme,c.style=y(q.theme.style,q.style),g=(l=c.states)&&l.hover,w=l&&l.select);a=f.renderer.button(q.text,0,0,k,c,g,w,0,"zoomIn"===b?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[b]).attr({width:q.width,
height:q.height,title:f.options.lang[b],padding:q.padding,zIndex:5}).add();a.handler=q.onclick;a.align(t(q,{width:a.width,height:2*a.height}),null,q.alignTo);n(a.element,"dblclick",p);m.push(a)});this.updateEvents(e)};h.prototype.updateEvents=function(a){var b=this.chart;d(a.enableDoubleClickZoom,a.enabled)||a.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||n(b.container,"dblclick",function(a){b.pointer.onContainerDblClick(a)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick());
d(a.enableMouseWheelZoom,a.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||n(b.container,void 0===e.onmousewheel?"DOMMouseScroll":"mousewheel",function(a){b.pointer.onContainerMouseWheel(a);p(a);return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())};t(r.prototype,{fitToBox:function(a,f){[["x","width"],["y","height"]].forEach(function(b){var e=b[0];b=b[1];a[e]+a[b]>f[e]+f[b]&&(a[b]>f[b]?(a[b]=f[b],a[e]=f[e]):a[e]=f[e]+f[b]-a[b]);a[b]>f[b]&&(a[b]=f[b]);a[e]<f[e]&&(a[e]=
f[e])});return a},mapZoom:function(a,f,e,r,c){var b=this.xAxis[0],g=b.max-b.min,w=d(f,b.min+g/2),k=g*a,g=this.yAxis[0],m=g.max-g.min,x=d(e,g.min+m/2),m=m*a,w=this.fitToBox({x:w-k*(r?(r-b.pos)/b.len:.5),y:x-m*(c?(c-g.pos)/g.len:.5),width:k,height:m},{x:b.dataMin,y:g.dataMin,width:b.dataMax-b.dataMin,height:g.dataMax-g.dataMin}),k=w.x<=b.dataMin&&w.width>=b.dataMax-b.dataMin&&w.y<=g.dataMin&&w.height>=g.dataMax-g.dataMin;r&&(b.fixTo=[r-b.pos,f]);c&&(g.fixTo=[c-g.pos,e]);void 0===a||k?(b.setExtremes(void 0,
void 0,!1),g.setExtremes(void 0,void 0,!1)):(b.setExtremes(w.x,w.x+w.width,!1),g.setExtremes(w.y,w.y+w.height,!1));this.redraw()}});n(r,"beforeRender",function(){this.mapNavigation=new h(this);this.mapNavigation.update()});a.MapNavigation=h})(z);(function(a){var p=a.extend,h=a.pick,n=a.Pointer;a=a.wrap;p(n.prototype,{onContainerDblClick:function(a){var e=this.chart;a=this.normalize(a);e.options.mapNavigation.enableDoubleClickZoomTo?e.pointer.inClass(a.target,"highcharts-tracker")&&e.hoverPoint&&e.hoverPoint.zoomTo():
e.isInsidePlot(a.chartX-e.plotLeft,a.chartY-e.plotTop)&&e.mapZoom(.5,e.xAxis[0].toValue(a.chartX),e.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)},onContainerMouseWheel:function(a){var e=this.chart,h;a=this.normalize(a);h=a.detail||-(a.wheelDelta/120);e.isInsidePlot(a.chartX-e.plotLeft,a.chartY-e.plotTop)&&e.mapZoom(Math.pow(e.options.mapNavigation.mouseWheelSensitivity,h),e.xAxis[0].toValue(a.chartX),e.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)}});a(n.prototype,"zoomOption",function(a){var e=
this.chart.options.mapNavigation;h(e.enableTouchZoom,e.enabled)&&(this.chart.options.chart.pinchType="xy");a.apply(this,[].slice.call(arguments,1))});a(n.prototype,"pinchTranslate",function(a,e,h,n,d,b,f){a.call(this,e,h,n,d,b,f);"map"===this.chart.options.chart.type&&this.hasZoom&&(a=n.scaleX>n.scaleY,this.pinchTranslateDirection(!a,e,h,n,d,b,f,a?n.scaleX:n.scaleY))})})(z);(function(a){var p=a.colorPointMixin,h=a.extend,n=a.isNumber,r=a.merge,e=a.noop,t=a.pick,y=a.isArray,d=a.Point,b=a.Series,f=
a.seriesType,u=a.seriesTypes,q=a.splat;f("map","scatter",{animation:!1,dataLabels:{crop:!1,formatter:function(){return this.point.value},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}\x3cbr/\x3e"},turboThreshold:0,allAreas:!0,borderColor:"#cccccc",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:null,brightness:.2},normal:{animation:!0},select:{color:"#cccccc"}}},r(a.colorSeriesMixin,
{type:"map",getExtremesFromAll:!0,useMapGeometry:!0,forceDL:!0,searchPoint:e,directTouch:!0,preserveAspectRatio:!0,pointArrayMap:["value"],getBox:function(c){var b=Number.MAX_VALUE,g=-b,e=b,k=-b,m=b,x=b,v=this.xAxis,f=this.yAxis,d;(c||[]).forEach(function(c){if(c.path){"string"===typeof c.path&&(c.path=a.splitPath(c.path));var l=c.path||[],f=l.length,v=!1,A=-b,w=b,u=-b,h=b,q=c.properties;if(!c._foundBox){for(;f--;)n(l[f])&&(v?(A=Math.max(A,l[f]),w=Math.min(w,l[f])):(u=Math.max(u,l[f]),h=Math.min(h,
l[f])),v=!v);c._midX=w+(A-w)*t(c.middleX,q&&q["hc-middle-x"],.5);c._midY=h+(u-h)*t(c.middleY,q&&q["hc-middle-y"],.5);c._maxX=A;c._minX=w;c._maxY=u;c._minY=h;c.labelrank=t(c.labelrank,(A-w)*(u-h));c._foundBox=!0}g=Math.max(g,c._maxX);e=Math.min(e,c._minX);k=Math.max(k,c._maxY);m=Math.min(m,c._minY);x=Math.min(c._maxX-c._minX,c._maxY-c._minY,x);d=!0}});d&&(this.minY=Math.min(m,t(this.minY,b)),this.maxY=Math.max(k,t(this.maxY,-b)),this.minX=Math.min(e,t(this.minX,b)),this.maxX=Math.max(g,t(this.maxX,
-b)),v&&void 0===v.options.minRange&&(v.minRange=Math.min(5*x,(this.maxX-this.minX)/5,v.minRange||b)),f&&void 0===f.options.minRange&&(f.minRange=Math.min(5*x,(this.maxY-this.minY)/5,f.minRange||b)))},getExtremes:function(){b.prototype.getExtremes.call(this,this.valueData);this.chart.hasRendered&&this.isDirtyData&&this.getBox(this.options.data);this.valueMin=this.dataMin;this.valueMax=this.dataMax;this.dataMin=this.minY;this.dataMax=this.maxY},translatePath:function(a){var c=!1,b=this.xAxis,f=this.yAxis,
k=b.min,m=b.transA,b=b.minPixelPadding,e=f.min,v=f.transA,f=f.minPixelPadding,d,h=[];if(a)for(d=a.length;d--;)n(a[d])?(h[d]=c?(a[d]-k)*m+b:(a[d]-e)*v+f,c=!c):h[d]=a[d];return h},setData:function(c,l,g,f){var k=this.options,m=this.chart.options.chart,e=m&&m.map,v=k.mapData,d=k.joinBy,w=null===d,h=k.keys||this.pointArrayMap,u=[],t={},p=this.chart.mapTransforms;!v&&e&&(v="string"===typeof e?a.maps[e]:e);w&&(d="_i");d=this.joinBy=q(d);d[1]||(d[1]=d[0]);c&&c.forEach(function(b,m){var g=0;if(n(b))c[m]=
{value:b};else if(y(b)){c[m]={};!k.keys&&b.length>h.length&&"string"===typeof b[0]&&(c[m]["hc-key"]=b[0],++g);for(var d=0;d<h.length;++d,++g)h[d]&&void 0!==b[g]&&(0<h[d].indexOf(".")?a.Point.prototype.setNestedProperty(c[m],b[g],h[d]):c[m][h[d]]=b[g])}w&&(c[m]._i=m)});this.getBox(c);(this.chart.mapTransforms=p=m&&m.mapTransforms||v&&v["hc-transform"]||p)&&a.objectEach(p,function(a){a.rotation&&(a.cosAngle=Math.cos(a.rotation),a.sinAngle=Math.sin(a.rotation))});if(v){"FeatureCollection"===v.type&&
(this.mapTitle=v.title,v=a.geojson(v,this.type,this));this.mapData=v;this.mapMap={};for(p=0;p<v.length;p++)m=v[p],e=m.properties,m._i=p,d[0]&&e&&e[d[0]]&&(m[d[0]]=e[d[0]]),t[m[d[0]]]=m;this.mapMap=t;c&&d[1]&&c.forEach(function(a){t[a[d[1]]]&&u.push(t[a[d[1]]])});k.allAreas?(this.getBox(v),c=c||[],d[1]&&c.forEach(function(a){u.push(a[d[1]])}),u="|"+u.map(function(a){return a&&a[d[0]]}).join("|")+"|",v.forEach(function(a){d[0]&&-1!==u.indexOf("|"+a[d[0]]+"|")||(c.push(r(a,{value:null})),f=!1)})):this.getBox(u)}b.prototype.setData.call(this,
c,l,g,f)},drawGraph:e,drawDataLabels:e,doFullTranslate:function(){return this.isDirtyData||this.chart.isResizing||this.chart.renderer.isVML||!this.baseTrans},translate:function(){var a=this,b=a.xAxis,g=a.yAxis,d=a.doFullTranslate();a.generatePoints();a.data.forEach(function(c){c.plotX=b.toPixels(c._midX,!0);c.plotY=g.toPixels(c._midY,!0);d&&(c.shapeType="path",c.shapeArgs={d:a.translatePath(c.path)})});a.translateColors()},pointAttribs:function(a,b){b=a.series.chart.styledMode?this.colorAttribs(a):
u.column.prototype.pointAttribs.call(this,a,b);b["stroke-width"]=t(a.options[this.pointAttrToOptions&&this.pointAttrToOptions["stroke-width"]||"borderWidth"],"inherit");return b},drawPoints:function(){var a=this,b=a.xAxis,g=a.yAxis,d=a.group,k=a.chart,m=k.renderer,f,e,h,q,n=this.baseTrans,p,r,t,y,G;a.transformGroup||(a.transformGroup=m.g().attr({scaleX:1,scaleY:1}).add(d),a.transformGroup.survive=!0);a.doFullTranslate()?(k.hasRendered&&!k.styledMode&&a.points.forEach(function(c){c.shapeArgs&&(c.shapeArgs.fill=
a.pointAttribs(c,c.state).fill)}),a.group=a.transformGroup,u.column.prototype.drawPoints.apply(a),a.group=d,a.points.forEach(function(c){c.graphic&&(c.name&&c.graphic.addClass("highcharts-name-"+c.name.replace(/ /g,"-").toLowerCase()),c.properties&&c.properties["hc-key"]&&c.graphic.addClass("highcharts-key-"+c.properties["hc-key"].toLowerCase()),k.styledMode&&c.graphic.css(a.pointAttribs(c,c.selected&&"select")))}),this.baseTrans={originX:b.min-b.minPixelPadding/b.transA,originY:g.min-g.minPixelPadding/
g.transA+(g.reversed?0:g.len/g.transA),transAX:b.transA,transAY:g.transA},this.transformGroup.animate({translateX:0,translateY:0,scaleX:1,scaleY:1})):(f=b.transA/n.transAX,e=g.transA/n.transAY,h=b.toPixels(n.originX,!0),q=g.toPixels(n.originY,!0),.99<f&&1.01>f&&.99<e&&1.01>e&&(e=f=1,h=Math.round(h),q=Math.round(q)),p=this.transformGroup,k.renderer.globalAnimation?(r=p.attr("translateX"),t=p.attr("translateY"),y=p.attr("scaleX"),G=p.attr("scaleY"),p.attr({animator:0}).animate({animator:1},{step:function(a,
c){p.attr({translateX:r+(h-r)*c.pos,translateY:t+(q-t)*c.pos,scaleX:y+(f-y)*c.pos,scaleY:G+(e-G)*c.pos})}})):p.attr({translateX:h,translateY:q,scaleX:f,scaleY:e}));k.styledMode||d.element.setAttribute("stroke-width",(a.options[a.pointAttrToOptions&&a.pointAttrToOptions["stroke-width"]||"borderWidth"]||1)/(f||1));this.drawMapDataLabels()},drawMapDataLabels:function(){b.prototype.drawDataLabels.call(this);this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)},render:function(){var a=
this,d=b.prototype.render;a.chart.renderer.isVML&&3E3<a.data.length?setTimeout(function(){d.call(a)}):d.call(a)},animate:function(a){var c=this.options.animation,b=this.group,d=this.xAxis,k=this.yAxis,m=d.pos,f=k.pos;this.chart.renderer.isSVG&&(!0===c&&(c={duration:1E3}),a?b.attr({translateX:m+d.len/2,translateY:f+k.len/2,scaleX:.001,scaleY:.001}):(b.animate({translateX:m,translateY:f,scaleX:1,scaleY:1},c),this.animate=null))},animateDrilldown:function(a){var c=this.chart.plotBox,b=this.chart.drilldownLevels[this.chart.drilldownLevels.length-
1],d=b.bBox,k=this.chart.options.drilldown.animation;a||(a=Math.min(d.width/c.width,d.height/c.height),b.shapeArgs={scaleX:a,scaleY:a,translateX:d.x,translateY:d.y},this.points.forEach(function(a){a.graphic&&a.graphic.attr(b.shapeArgs).animate({scaleX:1,scaleY:1,translateX:0,translateY:0},k)}),this.animate=null)},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,animateDrillupFrom:function(a){u.column.prototype.animateDrillupFrom.call(this,a)},animateDrillupTo:function(a){u.column.prototype.animateDrillupTo.call(this,
a)}}),h({applyOptions:function(a,b){a=d.prototype.applyOptions.call(this,a,b);b=this.series;var c=b.joinBy;b.mapData&&((c=void 0!==a[c[1]]&&b.mapMap[a[c[1]]])?(b.xyFromShape&&(a.x=c._midX,a.y=c._midY),h(a,c)):a.value=a.value||null);return a},onMouseOver:function(c){a.clearTimeout(this.colorInterval);if(null!==this.value||this.series.options.nullInteraction)d.prototype.onMouseOver.call(this,c);else this.series.onMouseOut(c)},zoomTo:function(){var a=this.series;a.xAxis.setExtremes(this._minX,this._maxX,
!1);a.yAxis.setExtremes(this._minY,this._maxY,!1);a.chart.redraw()}},p))})(z);(function(a){var p=a.seriesType,h=a.seriesTypes;p("mapline","map",{lineWidth:1,fillColor:"none"},{type:"mapline",colorProp:"stroke",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointAttribs:function(a,p){a=h.map.prototype.pointAttribs.call(this,a,p);a.fill=this.options.fillColor;return a},drawLegendSymbol:h.line.prototype.drawLegendSymbol})})(z);(function(a){var p=a.merge,h=a.Point;a=a.seriesType;a("mappoint",
"scatter",{dataLabels:{enabled:!0,formatter:function(){return this.point.name},crop:!1,defer:!1,overflow:!1,style:{color:"#000000"}}},{type:"mappoint",forceDL:!0},{applyOptions:function(a,r){a=void 0!==a.lat&&void 0!==a.lon?p(a,this.series.chart.fromLatLonToPoint(a)):a;return h.prototype.applyOptions.call(this,a,r)}})})(z);(function(a){var p=a.Series,h=a.Legend,n=a.Chart,r=a.addEvent,e=a.wrap,t=a.color,y=a.isNumber,d=a.numberFormat,b=a.objectEach,f=a.merge,u=a.noop,q=a.pick,c=a.stableSort,l=a.setOptions,
g=a.arrayMin,w=a.arrayMax;l({legend:{bubbleLegend:{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:10,color:void 0},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}});
a.BubbleLegend=function(a,c){this.init(a,c)};a.BubbleLegend.prototype={init:function(a,c){this.options=a;this.visible=!0;this.chart=c.chart;this.legend=c},setState:u,addToLegend:function(a){a.splice(this.options.legendIndex,0,this)},drawLegendSymbol:function(a){var b=this.chart,k=this.options,d=q(a.options.itemDistance,20),f,g=k.ranges;f=k.connectorDistance;this.fontMetrics=b.renderer.fontMetrics(k.labels.style.fontSize.toString()+"px");g&&g.length&&y(g[0].value)?(c(g,function(a,c){return c.value-
a.value}),this.ranges=g,this.setOptions(),this.render(),b=this.getMaxLabelSize(),g=this.ranges[0].radius,a=2*g,f=f-g+b.width,f=0<f?f:0,this.maxLabel=b,this.movementX="left"===k.labels.align?f:0,this.legendItemWidth=a+f+d,this.legendItemHeight=a+this.fontMetrics.h/2):a.options.bubbleLegend.autoRanges=!0},setOptions:function(){var a=this,c=a.ranges,b=a.options,d=a.chart.series[b.seriesIndex],g=a.legend.baseline,e={"z-index":b.zIndex,"stroke-width":b.borderWidth},l={"z-index":b.zIndex,"stroke-width":b.connectorWidth},
h=a.getLabelStyles(),u=d.options.marker.fillOpacity,w=a.chart.styledMode;c.forEach(function(k,m){w||(e.stroke=q(k.borderColor,b.borderColor,d.color),e.fill=q(k.color,b.color,1!==u?t(d.color).setOpacity(u).get("rgba"):d.color),l.stroke=q(k.connectorColor,b.connectorColor,d.color));c[m].radius=a.getRangeRadius(k.value);c[m]=f(c[m],{center:c[0].radius-c[m].radius+g});w||f(!0,c[m],{bubbleStyle:f(!1,e),connectorStyle:f(!1,l),labelStyle:h})})},getLabelStyles:function(){var a=this.options,c={},d="left"===
a.labels.align,g=this.legend.options.rtl;b(a.labels.style,function(a,b){"color"!==b&&"fontSize"!==b&&"z-index"!==b&&(c[b]=a)});return f(!1,c,{"font-size":a.labels.style.fontSize,fill:q(a.labels.style.color,"#000000"),"z-index":a.zIndex,align:g||d?"right":"left"})},getRangeRadius:function(a){var c=this.options;return this.chart.series[this.options.seriesIndex].getRadius.call(this,c.ranges[c.ranges.length-1].value,c.ranges[0].value,c.minSize,c.maxSize,a)},render:function(){var a=this,c=a.chart.renderer,
b=a.options.zThreshold;a.symbols||(a.symbols={connectors:[],bubbleItems:[],labels:[]});a.legendSymbol=c.g("bubble-legend");a.legendItem=c.g("bubble-legend-item");a.legendSymbol.translateX=0;a.legendSymbol.translateY=0;a.ranges.forEach(function(c){c.value>=b&&a.renderRange(c)});a.legendSymbol.add(a.legendItem);a.legendItem.add(a.legendGroup);a.hideOverlappingLabels()},renderRange:function(a){var c=this.options,b=c.labels,d=this.chart.renderer,k=this.symbols,g=k.labels,f=a.center,e=Math.abs(a.radius),
l=c.connectorDistance,h=b.align,u=b.style.fontSize,l=this.legend.options.rtl||"left"===h?-l:l,b=c.connectorWidth,w=this.ranges[0].radius,q=f-e-c.borderWidth/2+b/2,p,u=u/2-(this.fontMetrics.h-u)/2,n=d.styledMode;"center"===h&&(l=0,c.connectorDistance=0,a.labelStyle.align="center");h=q+c.labels.y;p=w+l+c.labels.x;k.bubbleItems.push(d.circle(w,f+((q%1?1:.5)-(b%2?0:.5)),e).attr(n?{}:a.bubbleStyle).addClass((n?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-symbol "+(c.className||
"")).add(this.legendSymbol));k.connectors.push(d.path(d.crispLine(["M",w,q,"L",w+l,q],c.connectorWidth)).attr(n?{}:a.connectorStyle).addClass((n?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(c.connectorClassName||"")).add(this.legendSymbol));a=d.text(this.formatLabel(a),p,h+u).attr(n?{}:a.labelStyle).addClass("highcharts-bubble-legend-labels "+(c.labels.className||"")).add(this.legendSymbol);g.push(a);a.placed=!0;a.alignAttr={x:p,y:h+u}},getMaxLabelSize:function(){var a,
c;this.symbols.labels.forEach(function(b){c=b.getBBox(!0);a=a?c.width>a.width?c:a:c});return a||{}},formatLabel:function(c){var b=this.options,g=b.labels.formatter;return(b=b.labels.format)?a.format(b,c):g?g.call(c):d(c.value,1)},hideOverlappingLabels:function(){var a=this.chart,c=this.symbols;!this.options.labels.allowOverlap&&c&&(a.hideOverlappingLabels(c.labels),c.labels.forEach(function(a,b){a.newOpacity?a.newOpacity!==a.oldOpacity&&c.connectors[b].show():c.connectors[b].hide()}))},getRanges:function(){var a=
this.legend.bubbleLegend,c,b=a.options.ranges,d,e=Number.MAX_VALUE,l=-Number.MAX_VALUE;a.chart.series.forEach(function(a){a.isBubble&&!a.ignoreSeries&&(d=a.zData.filter(y),d.length&&(e=q(a.options.zMin,Math.min(e,Math.max(g(d),!1===a.options.displayNegative?a.options.zThreshold:-Number.MAX_VALUE))),l=q(a.options.zMax,Math.max(l,w(d)))))});c=e===l?[{value:l}]:[{value:e},{value:(e+l)/2},{value:l,autoRanges:!0}];b.length&&b[0].radius&&c.reverse();c.forEach(function(a,d){b&&b[d]&&(c[d]=f(!1,b[d],a))});
return c},predictBubbleSizes:function(){var a=this.chart,c=this.fontMetrics,b=a.legend.options,d="horizontal"===b.layout,g=d?a.legend.lastLineHeight:0,f=a.plotSizeX,e=a.plotSizeY,l=a.series[this.options.seriesIndex],a=Math.ceil(l.minPxSize),h=Math.ceil(l.maxPxSize),l=l.options.maxSize,u=Math.min(e,f);if(b.floating||!/%$/.test(l))c=h;else if(l=parseFloat(l),c=(u+g-c.h/2)*l/100/(l/100+1),d&&e-c>=f||!d&&f-c>=e)c=h;return[a,Math.ceil(c)]},updateRanges:function(a,c){var b=this.legend.options.bubbleLegend;
b.minSize=a;b.maxSize=c;b.ranges=this.getRanges()},correctSizes:function(){var a=this.legend,c=this.chart.series[this.options.seriesIndex];1<Math.abs(Math.ceil(c.maxPxSize)-this.options.maxSize)&&(this.updateRanges(this.options.minSize,c.maxPxSize),a.render())}};r(a.Legend,"afterGetAllItems",function(c){var b=this.bubbleLegend,d=this.options,g=d.bubbleLegend,f=this.chart.getVisibleBubbleSeriesIndex();b&&b.ranges&&b.ranges.length&&(g.ranges.length&&(g.autoRanges=g.ranges[0].autoRanges?!0:!1),this.destroyItem(b));
0<=f&&d.enabled&&g.enabled&&(g.seriesIndex=f,this.bubbleLegend=new a.BubbleLegend(g,this),this.bubbleLegend.addToLegend(c.allItems))});n.prototype.getVisibleBubbleSeriesIndex=function(){for(var a=this.series,c=0;c<a.length;){if(a[c]&&a[c].isBubble&&a[c].visible&&a[c].zData.length)return c;c++}return-1};h.prototype.getLinesHeights=function(){var a=this.allItems,c=[],b,d=a.length,g,f=0;for(g=0;g<d;g++)if(a[g].legendItemHeight&&(a[g].itemHeight=a[g].legendItemHeight),a[g]===a[d-1]||a[g+1]&&a[g]._legendItemPos[1]!==
a[g+1]._legendItemPos[1]){c.push({height:0});b=c[c.length-1];for(f;f<=g;f++)a[f].itemHeight>b.height&&(b.height=a[f].itemHeight);b.step=g}return c};h.prototype.retranslateItems=function(a){var c,b,d,g=this.options.rtl,f=0;this.allItems.forEach(function(e,l){c=e.legendGroup.translateX;b=e._legendItemPos[1];if((d=e.movementX)||g&&e.ranges)d=g?c-e.options.maxSize/2:c+d,e.legendGroup.attr({translateX:d});l>a[f].step&&f++;e.legendGroup.attr({translateY:Math.round(b+a[f].height/2)});e._legendItemPos[1]=
b+a[f].height/2})};r(p,"legendItemClick",function(){var a=this.chart,c=this.visible,b=this.chart.legend;b&&b.bubbleLegend&&(this.visible=!c,this.ignoreSeries=c,a=0<=a.getVisibleBubbleSeriesIndex(),b.bubbleLegend.visible!==a&&(b.update({bubbleLegend:{enabled:a}}),b.bubbleLegend.visible=a),this.visible=c)});e(n.prototype,"drawChartBox",function(a,c,d){var g=this.legend,f=0<=this.getVisibleBubbleSeriesIndex(),e;g&&g.options.enabled&&g.bubbleLegend&&g.options.bubbleLegend.autoRanges&&f?(e=g.bubbleLegend.options,
f=g.bubbleLegend.predictBubbleSizes(),g.bubbleLegend.updateRanges(f[0],f[1]),e.placed||(g.group.placed=!1,g.allItems.forEach(function(a){a.legendGroup.translateY=null})),g.render(),this.getMargins(),this.axes.forEach(function(a){a.render();e.placed||(a.setScale(),a.updateNames(),b(a.ticks,function(a){a.isNew=!0;a.isNewLabel=!0}))}),e.placed=!0,this.getMargins(),a.call(this,c,d),g.bubbleLegend.correctSizes(),g.retranslateItems(g.getLinesHeights())):(a.call(this,c,d),g&&g.options.enabled&&g.bubbleLegend&&
(g.render(),g.retranslateItems(g.getLinesHeights())))})})(z);(function(a){var p=a.arrayMax,h=a.arrayMin,n=a.Axis,r=a.color,e=a.isNumber,t=a.noop,y=a.pick,d=a.pInt,b=a.Point,f=a.Series,u=a.seriesType,q=a.seriesTypes;u("bubble","scatter",{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},
tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"},{pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",bubblePadding:!0,zoneAxis:"z",directTouch:!0,isBubble:!0,pointAttribs:function(a,b){var c=this.options.marker.fillOpacity;a=f.prototype.pointAttribs.call(this,a,b);1!==c&&(a.fill=r(a.fill).setOpacity(c).get("rgba"));return a},getRadii:function(a,b,g){var c,d=this.zData,f=g.minPxSize,
e=g.maxPxSize,l=[],h;c=0;for(g=d.length;c<g;c++)h=d[c],l.push(this.getRadius(a,b,f,e,h));this.radii=l},getRadius:function(a,b,d,f,k){var c=this.options,g="width"!==c.sizeBy,l=c.zThreshold,h=b-a;c.sizeByAbsoluteValue&&null!==k&&(k=Math.abs(k-l),h=Math.max(b-l,Math.abs(a-l)),a=0);e(k)?k<a?d=d/2-1:(a=0<h?(k-a)/h:.5,g&&0<=a&&(a=Math.sqrt(a)),d=Math.ceil(d+a*(f-d))/2):d=null;return d},animate:function(a){!a&&this.points.length<this.options.animationLimit&&(this.points.forEach(function(a){var c=a.graphic,
b;c&&c.width&&(b={x:c.x,y:c.y,width:c.width,height:c.height},c.attr({x:a.plotX,y:a.plotY,width:1,height:1}),c.animate(b,this.options.animation))},this),this.animate=null)},translate:function(){var c,b=this.data,d,f,k=this.radii;q.scatter.prototype.translate.call(this);for(c=b.length;c--;)d=b[c],f=k?k[c]:0,e(f)&&f>=this.minPxSize/2?(d.marker=a.extend(d.marker,{radius:f,width:2*f,height:2*f}),d.dlBox={x:d.plotX-f,y:d.plotY-f,width:2*f,height:2*f}):d.shapeArgs=d.plotY=d.dlBox=void 0},alignDataLabel:q.column.prototype.alignDataLabel,
buildKDTree:t,applyZones:t},{haloPath:function(a){return b.prototype.haloPath.call(this,0===a?0:(this.marker?this.marker.radius||0:0)+a)},ttBelow:!1});n.prototype.beforePadding=function(){var c=this,b=this.len,f=this.chart,u=0,k=b,q=this.isXAxis,n=q?"xData":"yData",r=this.min,t={},z=Math.min(f.plotWidth,f.plotHeight),C=Number.MAX_VALUE,D=-Number.MAX_VALUE,E=this.max-r,B=b/E,F=[];this.series.forEach(function(b){var g=b.options;!b.bubblePadding||!b.visible&&f.options.chart.ignoreHiddenSeries||(c.allowZoomOutside=
!0,F.push(b),q&&(["minSize","maxSize"].forEach(function(a){var c=g[a],b=/%$/.test(c),c=d(c);t[a]=b?z*c/100:c}),b.minPxSize=t.minSize,b.maxPxSize=Math.max(t.maxSize,t.minSize),b=b.zData.filter(a.isNumber),b.length&&(C=y(g.zMin,Math.min(C,Math.max(h(b),!1===g.displayNegative?g.zThreshold:-Number.MAX_VALUE))),D=y(g.zMax,Math.max(D,p(b))))))});F.forEach(function(a){var b=a[n],d=b.length,f;q&&a.getRadii(C,D,a);if(0<E)for(;d--;)e(b[d])&&c.dataMin<=b[d]&&b[d]<=c.dataMax&&(f=a.radii[d],u=Math.min((b[d]-r)*
B-f,u),k=Math.max((b[d]-r)*B+f,k))});F.length&&0<E&&!this.isLog&&(k-=b,B*=(b+Math.max(0,u)-Math.min(k,b))/b,[["min","userMin",u],["max","userMax",k]].forEach(function(a){void 0===y(c.options[a[0]],c[a[1]])&&(c[a[0]]+=a[2]/B)}))}})(z);(function(a){var p=a.merge,h=a.Point,n=a.seriesType,r=a.seriesTypes;r.bubble&&n("mapbubble","bubble",{animationLimit:500,tooltip:{pointFormat:"{point.name}: {point.z}"}},{xyFromShape:!0,type:"mapbubble",pointArrayMap:["z"],getMapData:r.map.prototype.getMapData,getBox:r.map.prototype.getBox,
setData:r.map.prototype.setData},{applyOptions:function(a,n){return a&&void 0!==a.lat&&void 0!==a.lon?h.prototype.applyOptions.call(this,p(a,this.series.chart.fromLatLonToPoint(a)),n):r.map.prototype.pointClass.prototype.applyOptions.call(this,a,n)},isValid:function(){return"number"===typeof this.z},ttBelow:!1})})(z);(function(a){var p=a.colorPointMixin,h=a.merge,n=a.noop,r=a.pick,e=a.Series,t=a.seriesType,y=a.seriesTypes;t("heatmap","scatter",{animation:!1,borderWidth:0,nullColor:"#f7f7f7",dataLabels:{formatter:function(){return this.point.value},
inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}\x3cbr/\x3e"},states:{hover:{halo:!1,brightness:.2}}},h(a.colorSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var a;y.scatter.prototype.init.apply(this,arguments);a=this.options;a.pointRange=r(a.pointRange,a.colsize||1);this.yAxis.axisPointRange=a.rowsize||1},translate:function(){var a=
this.options,b=this.xAxis,f=this.yAxis,e=a.pointPadding||0,h=function(a,b,d){return Math.min(Math.max(b,a),d)};this.generatePoints();this.points.forEach(function(c){var d=(a.colsize||1)/2,g=(a.rowsize||1)/2,u=h(Math.round(b.len-b.translate(c.x-d,0,1,0,1)),-b.len,2*b.len),d=h(Math.round(b.len-b.translate(c.x+d,0,1,0,1)),-b.len,2*b.len),k=h(Math.round(f.translate(c.y-g,0,1,0,1)),-f.len,2*f.len),g=h(Math.round(f.translate(c.y+g,0,1,0,1)),-f.len,2*f.len),q=r(c.pointPadding,e);c.plotX=c.clientX=(u+d)/
2;c.plotY=(k+g)/2;c.shapeType="rect";c.shapeArgs={x:Math.min(u,d)+q,y:Math.min(k,g)+q,width:Math.abs(d-u)-2*q,height:Math.abs(g-k)-2*q}});this.translateColors()},drawPoints:function(){var a=this.chart.styledMode?"css":"attr";y.column.prototype.drawPoints.call(this);this.points.forEach(function(b){b.graphic[a](this.colorAttribs(b))},this)},animate:n,getBox:n,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,alignDataLabel:y.column.prototype.alignDataLabel,getExtremes:function(){e.prototype.getExtremes.call(this,
this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;e.prototype.getExtremes.call(this)}}),a.extend({haloPath:function(a){if(!a)return[];var b=this.shapeArgs;return["M",b.x-a,b.y-a,"L",b.x-a,b.y+b.height+a,b.x+b.width+a,b.y+b.height+a,b.x+b.width+a,b.y-a,"Z"]}},p))})(z);(function(a){function p(a,b){var d,e,h,c=!1,l=a.x,g=a.y;a=0;for(d=b.length-1;a<b.length;d=a++)e=b[a][1]>g,h=b[d][1]>g,e!==h&&l<(b[d][0]-b[a][0])*(g-b[a][1])/(b[d][1]-b[a][1])+b[a][0]&&(c=!c);return c}var h=a.Chart,
n=a.extend,r=a.format,e=a.merge,t=a.win,y=a.wrap;h.prototype.transformFromLatLon=function(d,b){if(void 0===t.proj4)return a.error(21,!1,this),{x:0,y:null};d=t.proj4(b.crs,[d.lon,d.lat]);var f=b.cosAngle||b.rotation&&Math.cos(b.rotation),e=b.sinAngle||b.rotation&&Math.sin(b.rotation);d=b.rotation?[d[0]*f+d[1]*e,-d[0]*e+d[1]*f]:d;return{x:((d[0]-(b.xoffset||0))*(b.scale||1)+(b.xpan||0))*(b.jsonres||1)+(b.jsonmarginX||0),y:(((b.yoffset||0)-d[1])*(b.scale||1)+(b.ypan||0))*(b.jsonres||1)-(b.jsonmarginY||
0)}};h.prototype.transformToLatLon=function(d,b){if(void 0===t.proj4)a.error(21,!1,this);else{d={x:((d.x-(b.jsonmarginX||0))/(b.jsonres||1)-(b.xpan||0))/(b.scale||1)+(b.xoffset||0),y:((-d.y-(b.jsonmarginY||0))/(b.jsonres||1)+(b.ypan||0))/(b.scale||1)+(b.yoffset||0)};var f=b.cosAngle||b.rotation&&Math.cos(b.rotation),e=b.sinAngle||b.rotation&&Math.sin(b.rotation);b=t.proj4(b.crs,"WGS84",b.rotation?{x:d.x*f+d.y*-e,y:d.x*e+d.y*f}:d);return{lat:b.y,lon:b.x}}};h.prototype.fromPointToLatLon=function(d){var b=
this.mapTransforms,f;if(b){for(f in b)if(b.hasOwnProperty(f)&&b[f].hitZone&&p({x:d.x,y:-d.y},b[f].hitZone.coordinates[0]))return this.transformToLatLon(d,b[f]);return this.transformToLatLon(d,b["default"])}a.error(22,!1,this)};h.prototype.fromLatLonToPoint=function(d){var b=this.mapTransforms,f,e;if(!b)return a.error(22,!1,this),{x:0,y:null};for(f in b)if(b.hasOwnProperty(f)&&b[f].hitZone&&(e=this.transformFromLatLon(d,b[f]),p({x:e.x,y:-e.y},b[f].hitZone.coordinates[0])))return e;return this.transformFromLatLon(d,
b["default"])};a.geojson=function(a,b,f){var d=[],e=[],c=function(a){var c,b=a.length;e.push("M");for(c=0;c<b;c++)1===c&&e.push("L"),e.push(a[c][0],-a[c][1])};b=b||"map";a.features.forEach(function(a){var f=a.geometry,h=f.type,f=f.coordinates;a=a.properties;var k;e=[];"map"===b||"mapbubble"===b?("Polygon"===h?(f.forEach(c),e.push("Z")):"MultiPolygon"===h&&(f.forEach(function(a){a.forEach(c)}),e.push("Z")),e.length&&(k={path:e})):"mapline"===b?("LineString"===h?c(f):"MultiLineString"===h&&f.forEach(c),
e.length&&(k={path:e})):"mappoint"===b&&"Point"===h&&(k={x:f[0],y:-f[1]});k&&d.push(n(k,{name:a.name||a.NAME,properties:a}))});f&&a.copyrightShort&&(f.chart.mapCredits=r(f.chart.options.credits.mapText,{geojson:a}),f.chart.mapCreditsFull=r(f.chart.options.credits.mapTextFull,{geojson:a}));return d};y(h.prototype,"addCredits",function(a,b){b=e(!0,this.options.credits,b);this.mapCredits&&(b.href=null);a.call(this,b);this.credits&&this.mapCreditsFull&&this.credits.attr({title:this.mapCreditsFull})})})(z);
(function(a){function p(a,b,d,c,e,g,h,k){return["M",a+e,b,"L",a+d-g,b,"C",a+d-g/2,b,a+d,b+g/2,a+d,b+g,"L",a+d,b+c-h,"C",a+d,b+c-h/2,a+d-h/2,b+c,a+d-h,b+c,"L",a+k,b+c,"C",a+k/2,b+c,a,b+c-k/2,a,b+c-k,"L",a,b+e,"C",a,b+e/2,a+e/2,b,a+e,b,"Z"]}var h=a.Chart,n=a.defaultOptions,r=a.extend,e=a.merge,t=a.pick,y=a.Renderer,d=a.SVGRenderer,b=a.VMLRenderer;r(n.lang,{zoomIn:"Zoom in",zoomOut:"Zoom out"});n.mapNavigation={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};a.splitPath=function(a){var b;a=a.replace(/([A-Za-z])/g," $1 ");a=a.replace(/^\s*/,"").replace(/\s*$/,"");a=a.split(/[ ,]+/);for(b=0;b<a.length;b++)/[a-zA-Z]/.test(a[b])||(a[b]=parseFloat(a[b]));return a};a.maps={};d.prototype.symbols.topbutton=
function(a,b,d,c,e){return p(a-1,b-1,d,c,e.r,e.r,0,0)};d.prototype.symbols.bottombutton=function(a,b,d,c,e){return p(a-1,b-1,d,c,0,0,e.r,e.r)};y===b&&["topbutton","bottombutton"].forEach(function(a){b.prototype.symbols[a]=d.prototype.symbols[a]});a.Map=a.mapChart=function(b,d,p){var c="string"===typeof b||b.nodeName,f=arguments[c?1:0],g=f,n={endOnTick:!1,visible:!1,minPadding:0,maxPadding:0,startOnTick:!1},k,m=a.getOptions().credits;k=f.series;f.series=null;f=e({chart:{panning:"xy",type:"map"},credits:{mapText:t(m.mapText,
' \u00a9 \x3ca href\x3d"{geojson.copyrightUrl}"\x3e{geojson.copyrightShort}\x3c/a\x3e'),mapTextFull:t(m.mapTextFull,"{geojson.copyright}")},tooltip:{followTouchMove:!1},xAxis:n,yAxis:e(n,{reversed:!0})},f,{chart:{inverted:!1,alignTicks:!1}});f.series=g.series=k;return c?new h(b,f,p):new h(f,d)}})(z)});
//# sourceMappingURL=map.js.map
