/* Highmaps JS v10.2.1 (2022-08-29) (c) 2009-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/heatmap",["highcharts"],function(q){b(q);b.Highcharts=q;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function q(b,h,G,p){b.hasOwnProperty(h)||(b[h]=p.apply(null,G),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:h,module:b[h]}})))}b=b?b._modules:{};q(b, "Core/Axis/Color/ColorAxisComposition.js",[b["Core/Color/Color.js"],b["Core/Utilities.js"]],function(b,h){var u=b.parse,p=h.addEvent,z=h.extend,m=h.merge,w=h.pick,B=h.splat,n;(function(e){function b(){var a=this,c=this.options;this.colorAxis=[];c.colorAxis&&(c.colorAxis=B(c.colorAxis),c.colorAxis.forEach(function(c,d){c.index=d;new k(a,c)}))}function h(a){var c=this,d=function(d){d=a.allItems.indexOf(d);-1!==d&&(c.destroyItem(a.allItems[d]),a.allItems.splice(d,1))},f=[],C,k;(this.chart.colorAxis|| []).forEach(function(a){(C=a.options)&&C.showInLegend&&(C.dataClasses&&C.visible?f=f.concat(a.getDataClassLegendSymbols()):C.visible&&f.push(a),a.series.forEach(function(a){if(!a.options.showInLegend||C.dataClasses)"point"===a.options.legendType?a.points.forEach(function(a){d(a)}):d(a)}))});for(k=f.length;k--;)a.allItems.unshift(f[k])}function n(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})}function E(){var a=this.chart.colorAxis;a&&a.forEach(function(a,c,d){a.update({}, d)})}function v(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function t(){var a=this.axisTypes;a?-1===a.indexOf("colorAxis")&&a.push("colorAxis"):this.axisTypes=["colorAxis"]}function y(a){var c=this,d=a?"show":"hide";c.visible=c.options.visible=!!a;["graphic","dataLabel"].forEach(function(a){if(c[a])c[a][d]()});this.series.buildKDTree()}function g(){var a=this,c=this.options.nullColor,d=this.colorAxis,f=this.colorKey;(this.data.length?this.data: this.points).forEach(function(k){var l=k.getNestedProperty(f);(l=k.options.color||(k.isNull||null===k.value?c:d&&"undefined"!==typeof l?d.toColor(l,k):k.color||a.color))&&k.color!==l&&(k.color=l,"point"===a.options.legendType&&k.legendItem&&a.chart.legend.colorizeItem(k,k.visible))})}function f(a){var c=a.prototype.createAxis;a.prototype.createAxis=function(a,d){if("colorAxis"!==a)return c.apply(this,arguments);var f=new k(this,m(d.axis,{index:this[a].length,isX:!1}));this.isDirtyLegend=!0;this.axes.forEach(function(a){a.series= []});this.series.forEach(function(a){a.bindAxes();a.isDirtyData=!0});w(d.redraw,!0)&&this.redraw(d.animation);return f}}function d(){this.elem.attr("fill",u(this.start).tweenTo(u(this.end),this.pos),void 0,!0)}function a(){this.elem.attr("stroke",u(this.start).tweenTo(u(this.end),this.pos),void 0,!0)}var c=[],k;e.compose=function(e,l,x,A,r){k||(k=e);-1===c.indexOf(l)&&(c.push(l),e=l.prototype,e.collectionsWithUpdate.push("colorAxis"),e.collectionsWithInit.colorAxis=[e.addColorAxis],p(l,"afterGetAxes", b),f(l));-1===c.indexOf(x)&&(c.push(x),l=x.prototype,l.fillSetter=d,l.strokeSetter=a);-1===c.indexOf(A)&&(c.push(A),p(A,"afterGetAllItems",h),p(A,"afterColorizeItem",n),p(A,"afterUpdate",E));-1===c.indexOf(r)&&(c.push(r),z(r.prototype,{optionalAxis:"colorAxis",translateColors:g}),z(r.prototype.pointClass.prototype,{setVisible:y}),p(r,"afterTranslate",v),p(r,"bindAxes",t))};e.pointSetVisible=y})(n||(n={}));return n});q(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}});q(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,h,q,p,z,m,w,B){var n=this&&this.__extends||function(){var e=function(g,f){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,a){d.__proto__=a}||function(d,a){for(var c in a)a.hasOwnProperty(c)&&(d[c]=a[c])};return e(g,f)};return function(g,f){function d(){this.constructor=g}e(g,f);g.prototype=null===f?Object.create(f):(d.prototype=f.prototype,new d)}}(),e=h.parse,r=z.noop,u=w.series,D=B.extend,E=B.isNumber,v=B.merge,t=B.pick;h=function(b){function g(f, d){var a=b.call(this,f,d)||this;a.beforePadding=!1;a.chart=void 0;a.coll="colorAxis";a.dataClasses=void 0;a.legendItem=void 0;a.legendItems=void 0;a.name="";a.options=void 0;a.stops=void 0;a.visible=!0;a.init(f,d);return a}n(g,b);g.compose=function(f,d,a,c){q.compose(g,f,d,a,c)};g.prototype.init=function(f,d){var a=f.options.legend||{},c=d.layout?"vertical"!==d.layout:"vertical"!==a.layout,k=d.visible;a=v(g.defaultColorAxisOptions,d,{showEmpty:!1,title:null,visible:a.enabled&&!1!==k});this.coll="colorAxis"; this.side=d.side||c?2:1;this.reversed=d.reversed||!c;this.opposite=!c;b.prototype.init.call(this,f,a);this.userOptions.visible=k;d.dataClasses&&this.initDataClasses(d);this.initStops();this.horiz=c;this.zoomEnabled=!1};g.prototype.initDataClasses=function(f){var d=this.chart,a=this.options,c=f.dataClasses.length,k,b=0,l=d.options.chart.colorCount;this.dataClasses=k=[];this.legendItems=[];(f.dataClasses||[]).forEach(function(f,g){f=v(f);k.push(f);if(d.styledMode||!f.color)"category"===a.dataClassColor? (d.styledMode||(g=d.options.colors,l=g.length,f.color=g[b]),f.colorIndex=b,b++,b===l&&(b=0)):f.color=e(a.minColor).tweenTo(e(a.maxColor),2>c?.5:g/(c-1))})};g.prototype.hasData=function(){return!!(this.tickPositions||[]).length};g.prototype.setTickPositions=function(){if(!this.dataClasses)return b.prototype.setTickPositions.call(this)};g.prototype.initStops=function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];this.stops.forEach(function(f){f.color=e(f[1])})}; g.prototype.setOptions=function(f){b.prototype.setOptions.call(this,f);this.options.crosshair=this.options.marker};g.prototype.setAxisSize=function(){var f=this.legendSymbol,d=this.chart,a=d.options.legend||{},c,k;f?(this.left=a=f.attr("x"),this.top=c=f.attr("y"),this.width=k=f.attr("width"),this.height=f=f.attr("height"),this.right=d.chartWidth-a-k,this.bottom=d.chartHeight-c-f,this.len=this.horiz?k:f,this.pos=this.horiz?a:c):this.len=(this.horiz?a.symbolWidth:a.symbolHeight)||g.defaultLegendLength}; g.prototype.normalizedValue=function(f){this.logarithmic&&(f=this.logarithmic.log2lin(f));return 1-(this.max-f)/(this.max-this.min||1)};g.prototype.toColor=function(f,d){var a=this.dataClasses,c=this.stops,k;if(a)for(k=a.length;k--;){var b=a[k];var e=b.from;c=b.to;if(("undefined"===typeof e||f>=e)&&("undefined"===typeof c||f<=c)){var g=b.color;d&&(d.dataClass=k,d.colorIndex=b.colorIndex);break}}else{f=this.normalizedValue(f);for(k=c.length;k--&&!(f>c[k][0]););e=c[k]||c[k+1];c=c[k+1]||e;f=1-(c[0]- f)/(c[0]-e[0]||1);g=e.color.tweenTo(c.color,f)}return g};g.prototype.getOffset=function(){var f=this.legendGroup,d=this.chart.axisOffset[this.side];if(f){this.axisParent=f;b.prototype.getOffset.call(this);var a=this.chart.legend;a.allItems.forEach(function(c){c instanceof g&&c.drawLegendSymbol(a,c)});a.render();this.chart.getMargins(!0);this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width);this.chart.axisOffset[this.side]=d}};g.prototype.setLegendColor=function(){var f=this.reversed, d=f?1:0;f=f?0:1;d=this.horiz?[d,0,f,0]:[0,f,0,d];this.legendColor={linearGradient:{x1:d[0],y1:d[1],x2:d[2],y2:d[3]},stops:this.stops}};g.prototype.drawLegendSymbol=function(f,d){var a=f.padding,c=f.options,k=this.horiz,e=t(c.symbolWidth,k?g.defaultLegendLength:12),b=t(c.symbolHeight,k?12:g.defaultLegendLength),x=t(c.labelPadding,k?16:30);c=t(c.itemDistance,10);this.setLegendColor();d.legendSymbol||(d.legendSymbol=this.chart.renderer.rect(0,f.baseline-11,e,b).attr({zIndex:1}).add(d.legendGroup));this.legendItemWidth= e+a+(k?c:this.options.labels.x+this.maxLabelLength);this.legendItemHeight=b+a+(k?x:0)};g.prototype.setState=function(f){this.series.forEach(function(d){d.setState(f)})};g.prototype.setVisible=function(){};g.prototype.getSeriesExtremes=function(){var f=this.series,d=f.length,a;this.dataMin=Infinity;for(this.dataMax=-Infinity;d--;){var c=f[d];var k=c.colorKey=t(c.options.colorKey,c.colorKey,c.pointValKey,c.zoneAxis,"y");var e=c.pointArrayMap;var b=c[k+"Min"]&&c[k+"Max"];if(c[k+"Data"])var g=c[k+"Data"]; else if(e){g=[];e=e.indexOf(k);var r=c.yData;if(0<=e&&r)for(a=0;ae+g&&(l=e+g+2);d.plotX=l;d.plotY=this.len-l;b.prototype.drawCrosshair.call(this,f,d);d.plotX=a;d.plotY=c;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}))}};g.prototype.getPlotLinePath= function(f){var d=this.left,a=f.translatedValue,c=this.top;return E(a)?this.horiz?[["M",a-4,c-6],["L",a+4,c-6],["L",a,c],["Z"]]:[["M",d,a],["L",d-6,a+6],["L",d-6,a-6],["Z"]]:b.prototype.getPlotLinePath.call(this,f)};g.prototype.update=function(f,d){var a=this.chart.legend;this.series.forEach(function(a){a.isDirtyData=!0});(f.dataClasses&&a.allItems||this.dataClasses)&&this.destroyItems();b.prototype.update.call(this,f,d);this.legendItem&&(this.setLegendColor(),a.colorizeItem(this,!0))};g.prototype.destroyItems= function(){var f=this.chart;this.legendItem?f.legend.destroyItem(this):this.legendItems&&this.legendItems.forEach(function(d){f.legend.destroyItem(d)});f.isDirtyLegend=!0};g.prototype.destroy=function(){this.chart.isDirtyLegend=!0;this.destroyItems();b.prototype.destroy.apply(this,[].slice.call(arguments))};g.prototype.remove=function(f){this.destroyItems();b.prototype.remove.call(this,f)};g.prototype.getDataClassLegendSymbols=function(){var f=this,d=f.chart,a=f.legendItems,c=d.options.legend,e=c.valueDecimals, b=c.valueSuffix||"",g;a.length||f.dataClasses.forEach(function(c,k){var l=c.from,h=c.to,A=d.numberFormatter,x=!0;g="";"undefined"===typeof l?g="< ":"undefined"===typeof h&&(g="> ");"undefined"!==typeof l&&(g+=A(l,e)+b);"undefined"!==typeof l&&"undefined"!==typeof h&&(g+=" - ");"undefined"!==typeof h&&(g+=A(h,e)+b);a.push(D({chart:d,name:g,options:{},drawLegendSymbol:m.drawRectangle,visible:!0,setState:r,isDataClass:!0,setVisible:function(){this.visible=x=f.visible=!x;f.series.forEach(function(a){a.points.forEach(function(a){a.dataClass=== k&&a.setVisible(x)})});d.legend.colorizeItem(this,x)}},c))});return a};g.defaultColorAxisOptions=p;g.defaultLegendLength=200;g.keepProps=["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"];return g}(b);Array.prototype.push.apply(b.keepProps,h.keepProps);"";return h});q(b,"Series/ColorMapComposition.js",[b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,h){var u=b.seriesTypes.column.prototype,p=h.addEvent,q=h.defined,m;(function(b){function h(e){this.moveToTopOnHover&& this.graphic&&this.graphic.attr({zIndex:e&&"hover"===e.state?1:0})}var n=[];b.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value&&(void 0===this.value||!isNaN(this.value))}};b.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(e){var b={};!q(e.color)|| e.state&&"normal"!==e.state||(b[this.colorProp||"fill"]=e.color);return b},pointAttribs:u.pointAttribs};b.compose=function(e){var b=e.prototype.pointClass;-1===n.indexOf(b)&&(n.push(b),p(b,"afterSetState",h));return e}})(m||(m={}));return m});q(b,"Series/Heatmap/HeatmapPoint.js",[b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,h){var u=this&&this.__extends||function(){var b=function(h,e){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,e){b.__proto__=e}||function(b, e){for(var h in e)e.hasOwnProperty(h)&&(b[h]=e[h])};return b(h,e)};return function(h,e){function r(){this.constructor=h}b(h,e);h.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),p=h.clamp,q=h.defined,m=h.extend,w=h.pick;b=function(b){function h(){var e=null!==b&&b.apply(this,arguments)||this;e.options=void 0;e.series=void 0;e.value=void 0;e.x=void 0;e.y=void 0;return e}u(h,b);h.prototype.applyOptions=function(e,h){e=b.prototype.applyOptions.call(this,e,h);e.formatPrefix=e.isNull|| null===e.value?"null":"point";return e};h.prototype.getCellAttributes=function(){var b=this.series,h=b.options,u=(h.colsize||1)/2,n=(h.rowsize||1)/2,m=b.xAxis,v=b.yAxis,t=this.options.marker||b.options.marker;b=b.pointPlacementToXValue();var y=w(this.pointPadding,h.pointPadding,0),g={x1:p(Math.round(m.len-m.translate(this.x-u,!1,!0,!1,!0,-b)),-m.len,2*m.len),x2:p(Math.round(m.len-m.translate(this.x+u,!1,!0,!1,!0,-b)),-m.len,2*m.len),y1:p(Math.round(v.translate(this.y-n,!1,!0,!1,!0)),-v.len,2*v.len), y2:p(Math.round(v.translate(this.y+n,!1,!0,!1,!0)),-v.len,2*v.len)};[["width","x"],["height","y"]].forEach(function(b){var d=b[0];b=b[1];var a=b+"1",c=b+"2",f=Math.abs(g[a]-g[c]),e=t&&t.lineWidth||0,h=Math.abs(g[a]+g[c])/2;d=t&&t[d];q(d)&&d"}, states:{hover:{halo:!1,brightness:.2}}});return d}(F);E(m.prototype,{axisTypes:h.seriesMembers.axisTypes,colorKey:h.seriesMembers.colorKey,directTouch:!0,getExtremesFromAll:!0,parallelArrays:h.seriesMembers.parallelArrays,pointArrayMap:["y","value"],pointClass:q,trackerGroups:h.seriesMembers.trackerGroups,alignDataLabel:r.prototype.alignDataLabel,colorAttribs:h.seriesMembers.colorAttribs,drawLegendSymbol:p.drawRectangle,getSymbol:n.prototype.getSymbol});h.compose(m);z.registerSeriesType("heatmap", m);"";"";return m});q(b,"masters/modules/heatmap.src.js",[b["Core/Globals.js"],b["Core/Axis/Color/ColorAxis.js"]],function(b,h){b.ColorAxis=h;h.compose(b.Chart,b.Fx,b.Legend,b.Series)})}); //# sourceMappingURL=heatmap.js.map