!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/windbarb
 * @requires highcharts
 *
 * Wind barb series module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(t._Highcharts,t._Highcharts.dataGrouping.approximations,t._Highcharts.Series.types.column,t._Highcharts.Series,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/windbarb",["highcharts/highcharts"],function(t){return o(t,t.dataGrouping,["approximations"],t.Series,["types"],["column"],t.Series,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/windbarb"]=o(t._Highcharts,t._Highcharts.dataGrouping.approximations,t._Highcharts.Series.types.column,t._Highcharts.Series,t._Highcharts.SeriesRegistry):t.Highcharts=o(t.Highcharts,t.Highcharts.dataGrouping.approximations,t.Highcharts.Series.types.column,t.Highcharts.Series,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,o,r,e,i){return function(){"use strict";var n,s,a,p={448:function(t){t.exports=r},512:function(t){t.exports=i},820:function(t){t.exports=e},944:function(o){o.exports=t},956:function(t){t.exports=o}},l={};function u(t){var o=l[t];if(void 0!==o)return o.exports;var r=l[t]={exports:{}};return p[t](r,r.exports,u),r.exports}u.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(o,{a:o}),o},u.d=function(t,o){for(var r in o)u.o(o,r)&&!u.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},u.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)};var c={};u.d(c,{default:function(){return W}});var h=u(944),f=u.n(h),d=u(956),y=u.n(d),g=u(448),b=u.n(g),v=u(820),x=u.n(v),m=f().composed,_=b().prototype,S=x().prototype,w=a||(a={});function O(t){return S.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,t)}function L(){_.translate.apply(this);var t,o,r,e,i,n,s,a,p,l=this,u=l.options,c=l.chart,f=l.points,d=u.onSeries,y=d&&c.get(d),g=y&&y.options.step,b=y&&y.points,v=c.inverted,x=l.xAxis,m=l.yAxis,S=f.length-1,w=u.onKey||"y",O=b&&b.length,L=0;if(y&&y.visible&&O)for(L=(y.pointXOffset||0)+(y.barW||0)/2,a=y.currentDataGrouping,n=b[O-1].x+(a?a.totalRange:0),(0,h.stableSort)(f,function(t,o){return t.x-o.x}),w="plot"+w[0].toUpperCase()+w.substr(1);O--&&f[S]&&"break"!==function(){if(i=b[O],(r=f[S]).y=i.y,i.x<=r.x&&void 0!==i[w]){if(r.x<=n&&(r.plotY=i[w],i.x<r.x&&!g&&(s=b[O+1]))&&void 0!==s[w])if((0,h.defined)(r.plotX)&&y.is("spline")){for(var e=[i.plotX||0,i.plotY||0],a=[s.plotX||0,s.plotY||0],l=(null==(t=i.controlPoints)?void 0:t.high)||e,u=(null==(o=s.controlPoints)?void 0:o.low)||a,c=function(t,o){return Math.pow(1-t,3)*e[o]+3*(1-t)*(1-t)*t*l[o]+3*(1-t)*t*t*u[o]+t*t*t*a[o]},d=0,v=1,x=void 0,_=0;_<100;_++){var L=(d+v)/2,k=c(L,0);if(null===k)break;if(.25>Math.abs(k-r.plotX)){x=L;break}k<r.plotX?d=L:v=L}(0,h.defined)(x)&&(r.plotY=c(x,1),r.y=m.toValue(r.plotY,!0))}else p=(r.x-i.x)/(s.x-i.x),r.plotY+=p*(s[w]-i[w]),r.y+=p*(s.y-i.y);if(S--,O++,S<0)return"break"}}(););f.forEach(function(t,o){var r;t.plotX+=L,(void 0===t.plotY||v)&&(t.plotX>=0&&t.plotX<=x.len?v?(t.plotY=x.translate(t.x,0,1,0,1),t.plotX=(0,h.defined)(t.y)?m.translate(t.y,0,0,0,1):0):t.plotY=(x.opposite?0:l.yAxis.len)+x.offset:t.shapeArgs={}),(e=f[o-1])&&e.plotX===t.plotX&&(void 0===e.stackIndex&&(e.stackIndex=0),r=e.stackIndex+1),t.stackIndex=r}),this.onSeries=y}w.compose=function(t){if((0,h.pushUnique)(m,"OnSeries")){var o=t.prototype;o.getPlotBox=O,o.translate=L}return t},w.getPlotBox=O,w.translate=L;var k=a,H=u(512),P=u.n(H),X=(n=function(t,o){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])})(t,o)},function(t,o){function r(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),A=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return X(o,t),o.prototype.isValid=function(){return(0,h.isNumber)(this.value)&&this.value>=0},o}(b().prototype.pointClass),G={dataGrouping:{enabled:!0,approximation:"windbarb",groupPixelWidth:30},lineWidth:2,onSeries:null,states:{hover:{lineWidthPlus:0}},tooltip:{pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.value}</b> ({point.beaufort})<br/>'},vectorLength:20,colorKey:"value",yOffset:-20,xOffset:0},M=(s=function(t,o){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(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}s(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),Y=f().animObject,j=P().seriesTypes.column,I=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return M(o,t),o.prototype.init=function(o,r){t.prototype.init.call(this,o,r)},o.prototype.pointAttribs=function(t,o){var r=this.options,e=(null==t?void 0:t.color)||this.color,i=this.options.lineWidth;return o&&(e=r.states[o].color||e,i=(r.states[o].lineWidth||i)+(r.states[o].lineWidthPlus||0)),{stroke:e,"stroke-width":i}},o.prototype.windArrow=function(t){var o,r=t.beaufortLevel,e=this.options.vectorLength/20,i=1.943844*t.value,n=-10;if(t.isNull)return[];if(0===r)return this.chart.renderer.symbols.circle(-10*e,-10*e,20*e,20*e);var s=[["M",0,7*e],["L",-1.5*e,7*e],["L",0,10*e],["L",1.5*e,7*e],["L",0,7*e],["L",0,-10*e]];if((o=(i-i%50)/50)>0)for(;o--;)s.push(-10===n?["L",0,n*e]:["M",0,n*e],["L",5*e,n*e+2],["L",0,n*e+4]),i-=50,n+=7;if((o=(i-i%10)/10)>0)for(;o--;)s.push(-10===n?["L",0,n*e]:["M",0,n*e],["L",7*e,n*e]),i-=10,n+=3;if((o=(i-i%5)/5)>0)for(;o--;)s.push(-10===n?["L",0,n*e]:["M",0,n*e],["L",4*e,n*e]),i-=5,n+=3;return s},o.prototype.drawPoints=function(){for(var t=this.chart,o=this.yAxis,r=t.inverted,e=this.options.vectorLength/2,i=0,n=this.points;i<n.length;i++){var s=n[i],a=s.plotX,p=s.plotY;!1===this.options.clip||t.isInsidePlot(a,0)?(s.graphic||(s.graphic=this.chart.renderer.path().add(this.markerGroup).addClass("highcharts-point highcharts-color-"+(0,h.pick)(s.colorIndex,s.series.colorIndex))),s.graphic.attr({d:this.windArrow(s),translateX:a+this.options.xOffset,translateY:p+this.options.yOffset,rotation:s.direction}),this.chart.styledMode||s.graphic.attr(this.pointAttribs(s))):s.graphic&&(s.graphic=s.graphic.destroy()),s.tooltipPos=[a+this.options.xOffset+(r&&!this.onSeries?e:0),p+this.options.yOffset-(r?0:e+o.pos-t.plotTop)]}},o.prototype.animate=function(t){t?this.markerGroup.attr({opacity:.01}):this.markerGroup.animate({opacity:1},Y(this.options.animation))},o.prototype.markerAttribs=function(){return{}},o.prototype.getExtremes=function(){return{}},o.prototype.shouldShowTooltip=function(o,r,e){return void 0===e&&(e={}),e.ignoreX=this.chart.inverted,e.ignoreY=!e.ignoreX,t.prototype.shouldShowTooltip.call(this,o,r,e)},o.defaultOptions=(0,h.merge)(j.defaultOptions,G),o}(j);k.compose(I),(0,h.extend)(I.prototype,{beaufortFloor:[0,.3,1.6,3.4,5.5,8,10.8,13.9,17.2,20.8,24.5,28.5,32.7],beaufortName:["Calm","Light air","Light breeze","Gentle breeze","Moderate breeze","Fresh breeze","Strong breeze","Near gale","Gale","Strong gale","Storm","Violent storm","Hurricane"],invertible:!1,parallelArrays:["x","value","direction"],pointArrayMap:["value","direction"],pointClass:A,trackerGroups:["markerGroup"],translate:function(){var t=this.beaufortFloor,o=this.beaufortName;k.translate.call(this);for(var r=0,e=this.points;r<e.length;r++){for(var i=e[r],n=0;n<t.length&&!(t[n]>i.value);n++);i.beaufortLevel=n-1,i.beaufort=o[n-1]}}}),P().registerSeriesType("windbarb",I),y().windbarb||(y().windbarb=function(t,o){for(var r=0,e=0,i=0,n=t.length;i<n;i++)r+=t[i]*Math.cos(o[i]*f().deg2rad),e+=t[i]*Math.sin(o[i]*f().deg2rad);return[t.reduce(function(t,o){return t+o},0)/t.length,Math.atan2(e,r)/f().deg2rad]});var W=f();return c.default}()});