/** * Highcharts JS v11.2.0 (2023-10-30) * * Wind barb series module * * (c) 2010-2021 Torstein Honsi * * License: www.highcharts.com/license */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/windbarb",["highcharts"],function(o){return t(o),t.Highcharts=o,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var o=t?t._modules:{};function e(t,o,e,r){t.hasOwnProperty(o)||(t[o]=r.apply(null,e),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:t[o]}})))}e(o,"Extensions/DataGrouping/ApproximationRegistry.js",[],function(){return{}}),e(o,"Series/OnSeriesComposition.js",[o["Series/Column/ColumnSeries.js"],o["Core/Series/Series.js"],o["Core/Utilities.js"]],function(t,o,e){var r,i=t.prototype,n=o.prototype,s=e.defined,a=e.stableSort;return function(t){var o=[];function r(t){return n.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,t)}function p(){i.translate.apply(this);var t,o,e,r,n,p,l,u,c,h=this,f=h.options,d=h.chart,b=h.points,y=f.onSeries,v=y&&d.get(y),g=v&&v.options.step,m=v&&v.points,x=d.inverted,S=h.xAxis,j=h.yAxis,w=b.length-1,O=f.onKey||"y",C=m&&m.length,L=0;if(v&&v.visible&&C)for(L=(v.pointXOffset||0)+(v.barW||0)/2,u=v.currentDataGrouping,p=m[C-1].x+(u?u.totalRange:0),a(b,function(t,o){return t.x-o.x}),O="plot"+O[0].toUpperCase()+O.substr(1);C--&&b[w]&&"break"!==function(){if(n=m[C],(e=b[w]).y=n.y,n.x<=e.x&&void 0!==n[O]){if(e.x<=p&&(e.plotY=n[O],n.xMath.abs(L-e.plotX)){y=S;break}L=0&&t.plotX<=S.len?x?(t.plotY=S.translate(t.x,0,1,0,1),t.plotX=s(t.y)?j.translate(t.y,0,0,0,1):0):t.plotY=(S.opposite?0:h.yAxis.len)+S.offset:t.shapeArgs={}),(r=b[o-1])&&r.plotX===t.plotX&&(void 0===r.stackIndex&&(r.stackIndex=0),e=r.stackIndex+1),t.stackIndex=e}),this.onSeries=v}t.compose=function(t){if(e.pushUnique(o,t)){var i=t.prototype;i.getPlotBox=r,i.translate=p}return t},t.getPlotBox=r,t.translate=p}(r||(r={})),r}),e(o,"Series/Windbarb/WindbarbPoint.js",[o["Series/Column/ColumnSeries.js"],o["Core/Utilities.js"]],function(t,o){var e,r=this&&this.__extends||(e=function(t,o){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),i=o.isNumber;return function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.beaufort=void 0,o.beaufortLevel=void 0,o.direction=void 0,o.options=void 0,o.series=void 0,o.value=void 0,o}return r(o,t),o.prototype.isValid=function(){return i(this.value)&&this.value>=0},o}(t.prototype.pointClass)}),e(o,"Series/Windbarb/WindbarbSeriesDefaults.js",[],function(){return{dataGrouping:{enabled:!0,approximation:"windbarb",groupPixelWidth:30},lineWidth:2,onSeries:null,states:{hover:{lineWidthPlus:0}},tooltip:{pointFormat:' {series.name}: {point.value} ({point.beaufort})
'},vectorLength:20,colorKey:"value",yOffset:-20,xOffset:0}}),e(o,"Series/Windbarb/WindbarbSeries.js",[o["Core/Animation/AnimationUtilities.js"],o["Extensions/DataGrouping/ApproximationRegistry.js"],o["Core/Globals.js"],o["Series/OnSeriesComposition.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"],o["Series/Windbarb/WindbarbPoint.js"],o["Series/Windbarb/WindbarbSeriesDefaults.js"]],function(t,o,e,r,i,n,s,a){var p,l=this&&this.__extends||(p=function(t,o){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}p(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),u=t.animObject,c=i.seriesTypes.column,h=n.extend,f=n.merge,d=n.pick,b=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.data=void 0,o.options=void 0,o.points=void 0,o}return l(o,t),o.prototype.init=function(o,e){t.prototype.init.call(this,o,e)},o.prototype.pointAttribs=function(t,o){var e=this.options,r=t.color||this.color,i=this.options.lineWidth;return o&&(r=e.states[o].color||r,i=(e.states[o].lineWidth||i)+(e.states[o].lineWidthPlus||0)),{stroke:r,"stroke-width":i}},o.prototype.windArrow=function(t){var o,e=t.beaufortLevel,r=this.options.vectorLength/20,i=1.943844*t.value,n=-10;if(t.isNull)return[];if(0===e)return this.chart.renderer.symbols.circle(-10*r,-10*r,20*r,20*r);var s=[["M",0,7*r],["L",-1.5*r,7*r],["L",0,10*r],["L",1.5*r,7*r],["L",0,7*r],["L",0,-10*r]];if((o=(i-i%50)/50)>0)for(;o--;)s.push(-10===n?["L",0,n*r]:["M",0,n*r],["L",5*r,n*r+2],["L",0,n*r+4]),i-=50,n+=7;if((o=(i-i%10)/10)>0)for(;o--;)s.push(-10===n?["L",0,n*r]:["M",0,n*r],["L",7*r,n*r]),i-=10,n+=3;if((o=(i-i%5)/5)>0)for(;o--;)s.push(-10===n?["L",0,n*r]:["M",0,n*r],["L",4*r,n*r]),i-=5,n+=3;return s},o.prototype.drawPoints=function(){for(var t=this.chart,o=this.yAxis,e=t.inverted,r=this.options.vectorLength/2,i=0,n=this.points;in.value);s++);n.beaufortLevel=s-1,n.beaufort=o[s-1]}}}),i.registerSeriesType("windbarb",b),o.windbarb||(o.windbarb=function(t,o){for(var r=0,i=0,n=0,s=t.length;n