/*
 Highmaps JS v7.2.1 (2019-10-31)

 (c) 2009-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/heatmap",["highcharts"],function(n){c(n);c.Highcharts=n;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function n(a,f,c,p){a.hasOwnProperty(f)||(a[f]=p.apply(null,c))}c=c?c._modules:{};n(c,"parts-map/ColorSeriesMixin.js",[c["parts/Globals.js"]],function(a){a.colorPointMixin={setVisible:function(a){var f=this,c=a?"show":
"hide";f.visible=!!a;["graphic","dataLabel"].forEach(function(a){if(f[a])f[a][c]()})}};a.colorSeriesMixin={optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var a=this,c=this.options.nullColor,p=this.colorAxis,t=this.colorKey;(this.data.length?this.data:this.points).forEach(function(f){var m=f[t];if(m=f.options.color||(f.isNull?c:p&&void 0!==m?p.toColor(m,f):f.color||a.color))f.color=m})}}});n(c,"parts-map/ColorAxis.js",[c["parts/Globals.js"],c["parts/Utilities.js"]],function(a,f){var c=
f.erase,p=f.extend,t=f.isNumber,m=f.pick,n=f.splat;f=a.addEvent;var k=a.Axis,u=a.Chart,r=a.Series,l=a.Point,g=a.color,v=a.Legend,A=a.LegendSymbolMixin,B=a.colorPointMixin,x=a.noop,q=a.merge;p(r.prototype,a.colorSeriesMixin);p(l.prototype,B);var w=a.ColorAxis=function(){this.init.apply(this,arguments)};p(w.prototype,k.prototype);p(w.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(k.prototype.keepProps),init:function(b,d){this.coll="colorAxis";var h=this.buildOptions.call(b,this.defaultColorAxisOptions,d);k.prototype.init.call(this,b,h);d.dataClasses&&this.initDataClasses(d);this.initStops();this.horiz=!h.opposite;this.zoomEnabled=!1;this.defaultLegendLength=
200},initDataClasses:function(b){var d=this.chart,h,e=0,y=d.options.chart.colorCount,a=this.options,f=b.dataClasses.length;this.dataClasses=h=[];this.legendItems=[];b.dataClasses.forEach(function(b,c){b=q(b);h.push(b);if(d.styledMode||!b.color)"category"===a.dataClassColor?(d.styledMode||(c=d.options.colors,y=c.length,b.color=c[e]),b.colorIndex=e,e++,e===y&&(e=0)):b.color=g(a.minColor).tweenTo(g(a.maxColor),2>f?.5:c/(f-1))})},hasData:function(){return!(!this.tickPositions||!this.tickPositions.length)},
setTickPositions:function(){if(!this.dataClasses)return k.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(b){b.color=g(b[1])})},buildOptions:function(b,d){var h=this.options.legend,e=d.layout?"vertical"!==d.layout:"vertical"!==h.layout;return q(b,{side:e?2:1,reversed:!e},d,{opposite:!e,showEmpty:!1,title:null,visible:h.enabled&&(d?!1!==d.visible:!0)})},setOptions:function(b){k.prototype.setOptions.call(this,
b);this.options.crosshair=this.options.marker},setAxisSize:function(){var b=this.legendSymbol,d=this.chart,h=d.options.legend||{},e,a;b?(this.left=h=b.attr("x"),this.top=e=b.attr("y"),this.width=a=b.attr("width"),this.height=b=b.attr("height"),this.right=d.chartWidth-h-a,this.bottom=d.chartHeight-e-b,this.len=this.horiz?a:b,this.pos=this.horiz?h:e):this.len=(this.horiz?h.symbolWidth:h.symbolHeight)||this.defaultLegendLength},normalizedValue:function(b){this.isLog&&(b=this.val2lin(b));return 1-(this.max-
b)/(this.max-this.min||1)},toColor:function(b,d){var h=this.stops,e=this.dataClasses,a;if(e)for(a=e.length;a--;){var f=e[a];var c=f.from;h=f.to;if((void 0===c||b>=c)&&(void 0===h||b<=h)){var g=f.color;d&&(d.dataClass=a,d.colorIndex=f.colorIndex);break}}else{b=this.normalizedValue(b);for(a=h.length;a--&&!(b>h[a][0]););c=h[a]||h[a+1];h=h[a+1]||c;b=1-(h[0]-b)/(h[0]-c[0]||1);g=c.color.tweenTo(h.color,b)}return g},getOffset:function(){var b=this.legendGroup,d=this.chart.axisOffset[this.side];b&&(this.axisParent=
b,k.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=d)},setLegendColor:function(){var b=this.reversed;var d=b?1:0;b=b?0:1;d=this.horiz?[d,0,b,0]:[0,b,0,d];this.legendColor={linearGradient:{x1:d[0],y1:d[1],x2:d[2],y2:d[3]},stops:this.stops}},drawLegendSymbol:function(b,d){var a=b.padding,e=b.options,c=this.horiz,f=m(e.symbolWidth,c?this.defaultLegendLength:12),g=m(e.symbolHeight,c?12:this.defaultLegendLength),l=
m(e.labelPadding,c?16:30);e=m(e.itemDistance,10);this.setLegendColor();d.legendSymbol=this.chart.renderer.rect(0,b.baseline-11,f,g).attr({zIndex:1}).add(d.legendGroup);this.legendItemWidth=f+a+(c?e:l);this.legendItemHeight=g+a+(c?l:0)},setState:function(b){this.series.forEach(function(d){d.setState(b)})},visible:!0,setVisible:x,getSeriesExtremes:function(){var b=this.series,d=b.length,a;this.dataMin=Infinity;for(this.dataMax=-Infinity;d--;){var e=b[d];var c=e.colorKey=m(e.options.colorKey,e.colorKey,
e.pointValKey,e.zoneAxis,"y");var f=e.pointArrayMap;var g=e[c+"Min"]&&e[c+"Max"];if(e[c+"Data"])var l=e[c+"Data"];else if(f){l=[];f=f.indexOf(c);var q=e.yData;if(0<=f&&q)for(a=0;a<q.length;a++)l.push(m(q[a][f],q[a]))}else l=e.yData;g?(e.minColorValue=e[c+"Min"],e.maxColorValue=e[c+"Max"]):(r.prototype.getExtremes.call(e,l),e.minColorValue=e.dataMin,e.maxColorValue=e.dataMax);void 0!==e.minColorValue&&(this.dataMin=Math.min(this.dataMin,e.minColorValue),this.dataMax=Math.max(this.dataMax,e.maxColorValue));
g||r.prototype.getExtremes.call(e)}},drawCrosshair:function(b,d){var a=d&&d.plotX,e=d&&d.plotY,c=this.pos,f=this.len;if(d){var g=this.toPixels(d[d.series.colorKey]);g<c?g=c-2:g>c+f&&(g=c+f+2);d.plotX=g;d.plotY=this.len-g;k.prototype.drawCrosshair.call(this,b,d);d.plotX=a;d.plotY=e;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(b){var d=b.translatedValue;return t(d)?this.horiz?["M",d-4,this.top-6,"L",d+4,this.top-6,d,this.top,"Z"]:["M",this.left,d,"L",this.left-6,d+6,this.left-6,d-6,"Z"]:k.prototype.getPlotLinePath.apply(this,arguments)},update:function(b,d){var a=this.chart,e=a.legend,c=this.buildOptions.call(a,{},b);this.series.forEach(function(b){b.isDirtyData=!0});(b.dataClasses&&e.allItems||this.dataClasses)&&this.destroyItems();a.options[this.coll]=q(this.userOptions,c);k.prototype.update.call(this,
c,d);this.legendItem&&(this.setLegendColor(),e.colorizeItem(this,!0))},destroyItems:function(){var b=this.chart;this.legendItem?b.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(d){b.legend.destroyItem(d)});b.isDirtyLegend=!0},remove:function(b){this.destroyItems();k.prototype.remove.call(this,b)},getDataClassLegendSymbols:function(){var b=this,d=this.chart,c=this.legendItems,e=d.options.legend,f=e.valueDecimals,g=e.valueSuffix||"",l;c.length||this.dataClasses.forEach(function(e,
h){var q=!0,m=e.from,k=e.to;l="";void 0===m?l="< ":void 0===k&&(l="> ");void 0!==m&&(l+=a.numberFormat(m,f)+g);void 0!==m&&void 0!==k&&(l+=" - ");void 0!==k&&(l+=a.numberFormat(k,f)+g);c.push(p({chart:d,name:l,options:{},drawLegendSymbol:A.drawRectangle,visible:!0,setState:x,isDataClass:!0,setVisible:function(){q=this.visible=!q;b.series.forEach(function(b){b.points.forEach(function(b){b.dataClass===h&&b.setVisible(q)})});d.legend.colorizeItem(this,q)}},e))});return c},beforePadding:!1,name:""});
["fill","stroke"].forEach(function(b){a.Fx.prototype[b+"Setter"]=function(){this.elem.attr(b,g(this.start).tweenTo(g(this.end),this.pos),null,!0)}});f(u,"afterGetAxes",function(){var b=this,d=b.options;this.colorAxis=[];d.colorAxis&&(d.colorAxis=n(d.colorAxis),d.colorAxis.forEach(function(d,a){d.index=a;new w(b,d)}))});f(r,"bindAxes",function(){var b=this.axisTypes;b?-1===b.indexOf("colorAxis")&&b.push("colorAxis"):this.axisTypes=["colorAxis"]});f(v,"afterGetAllItems",function(b){var d=[],a,e;(this.chart.colorAxis||
[]).forEach(function(e){(a=e.options)&&a.showInLegend&&(a.dataClasses&&a.visible?d=d.concat(e.getDataClassLegendSymbols()):a.visible&&d.push(e),e.series.forEach(function(d){if(!d.options.showInLegend||a.dataClasses)"point"===d.options.legendType?d.points.forEach(function(d){c(b.allItems,d)}):c(b.allItems,d)}))});for(e=d.length;e--;)b.allItems.unshift(d[e])});f(v,"afterColorizeItem",function(b){b.visible&&b.item.legendColor&&b.item.legendSymbol.attr({fill:b.item.legendColor})});f(v,"afterUpdate",function(){var b=
this.chart.colorAxis;b&&b.forEach(function(b,a,e){b.update({},e)})});f(r,"afterTranslate",function(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()})});n(c,"parts-map/ColorMapSeriesMixin.js",[c["parts/Globals.js"],c["parts/Utilities.js"]],function(a,c){var f=c.defined;c=a.noop;var p=a.seriesTypes;a.colorMapPointMixin={dataLabelOnNull:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setState:function(c){a.Point.prototype.setState.call(this,
c);this.graphic&&this.graphic.attr({zIndex:"hover"===c?1:0})}};a.colorMapSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:c,parallelArrays:["x","y","value"],colorKey:"value",pointAttribs:p.column.prototype.pointAttribs,colorAttribs:function(a){var c={};f(a.color)&&(c[this.colorProp||"fill"]=a.color);return c}}});n(c,"parts-map/HeatmapSeries.js",[c["parts/Globals.js"],c["parts/Utilities.js"]],function(a,c){var f=
c.extend,p=c.pick;c=a.colorMapPointMixin;var n=a.merge,m=a.noop,z=a.fireEvent,k=a.Series,u=a.seriesType,r=a.seriesTypes;u("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}<br/>"},states:{hover:{halo:!1,brightness:.2}}},n(a.colorMapSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,
getExtremesFromAll:!0,directTouch:!0,init:function(){r.scatter.prototype.init.apply(this,arguments);var a=this.options;a.pointRange=p(a.pointRange,a.colsize||1);this.yAxis.axisPointRange=a.rowsize||1},translate:function(){var a=this.options,c=this.xAxis,f=this.yAxis,m=a.pointPadding||0,k=function(a,c,b){return Math.min(Math.max(c,a),b)},n=this.pointPlacementToXValue();this.generatePoints();this.points.forEach(function(g){var l=(a.colsize||1)/2,b=(a.rowsize||1)/2,d=k(Math.round(c.len-c.translate(g.x-
l,0,1,0,1,-n)),-c.len,2*c.len);l=k(Math.round(c.len-c.translate(g.x+l,0,1,0,1,-n)),-c.len,2*c.len);var h=k(Math.round(f.translate(g.y-b,0,1,0,1)),-f.len,2*f.len);b=k(Math.round(f.translate(g.y+b,0,1,0,1)),-f.len,2*f.len);var e=p(g.pointPadding,m);g.plotX=g.clientX=(d+l)/2;g.plotY=(h+b)/2;g.shapeType="rect";g.shapeArgs={x:Math.min(d,l)+e,y:Math.min(h,b)+e,width:Math.max(Math.abs(l-d)-2*e,0),height:Math.max(Math.abs(b-h)-2*e,0)}});z(this,"afterTranslate")},drawPoints:function(){var a=this.chart.styledMode?
"css":"animate";r.column.prototype.drawPoints.call(this);this.points.forEach(function(c){c.graphic[a](this.colorAttribs(c))},this)},hasData:function(){return!!this.processedXData.length},getValidPoints:function(a,c){return k.prototype.getValidPoints.call(this,a,c,!0)},animate:m,getBox:m,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,alignDataLabel:r.column.prototype.alignDataLabel,getExtremes:function(){k.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=
this.dataMax;k.prototype.getExtremes.call(this)}}),f({haloPath:function(a){if(!a)return[];var c=this.shapeArgs;return["M",c.x-a,c.y-a,"L",c.x-a,c.y+c.height+a,c.x+c.width+a,c.y+c.height+a,c.x+c.width+a,c.y-a,"Z"]}},c));""});n(c,"masters/modules/heatmap.src.js",[],function(){})});
//# sourceMappingURL=heatmap.js.map