/* Highcharts JS v9.2.2 (2021-08-24) Accessibility module (c) 2010-2021 Highsoft AS Author: Oystein Moseng License: www.highcharts.com/license */ 'use strict';(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/accessibility",["highcharts"],function(v){b(v);b.Highcharts=v;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function v(b,e,q,n){b.hasOwnProperty(e)||(b[e]=n.apply(null,q))}b=b?b._modules:{};v(b,"Accessibility/Utils/HTMLUtilities.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,e){var w=b.doc, n=b.win,r=e.merge;return{addClass:function(b,m){b.classList?b.classList.add(m):0>b.className.indexOf(m)&&(b.className+=m)},escapeStringForHTML:function(b){return b.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(b){return w.getElementById(b)},getFakeMouseEvent:function(b){if("function"===typeof n.MouseEvent)return new n.MouseEvent(b);if(w.createEvent){var m=w.createEvent("MouseEvent");if(m.initMouseEvent)return m.initMouseEvent(b, !0,!0,n,"click"===b?1:0,0,0,0,0,!1,!1,!1,!1,0,null),m}return{type:b}},getHeadingTagNameForElement:function(b){var m=function(b){b=parseInt(b.slice(1),10);return"h"+Math.min(6,b+1)},l=function(b){var p;a:{for(p=b;p=p.previousSibling;){var g=p.tagName||"";if(/H[1-6]/.test(g)){p=g;break a}}p=""}if(p)return m(p);b=b.parentElement;if(!b)return"p";p=b.tagName;return/H[1-6]/.test(p)?m(p):l(b)};return l(b)},removeElement:function(b){b&&b.parentNode&&b.parentNode.removeChild(b)},reverseChildNodes:function(b){for(var m= b.childNodes.length;m--;)b.appendChild(b.childNodes[m])},setElAttrs:function(b,m){Object.keys(m).forEach(function(l){var k=m[l];null===k?b.removeAttribute(l):b.setAttribute(l,k)})},stripHTMLTagsFromString:function(b){return"string"===typeof b?b.replace(/<\/?[^>]+(>|$)/g,""):b},visuallyHideElement:function(b){r(!0,b.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(1px, 1px, 1px, 1px)",marginTop:"-3px","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)", filter:"alpha(opacity=1)",opacity:"0.01"})}}});v(b,"Accessibility/Utils/ChartUtilities.js",[b["Accessibility/Utils/HTMLUtilities.js"],b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,e,q){function n(a){var c=a.chart,d={},b="Seconds";d.Seconds=((a.max||0)-(a.min||0))/1E3;d.Minutes=d.Seconds/60;d.Hours=d.Minutes/60;d.Days=d.Hours/24;["Minutes","Hours","Days"].forEach(function(a){2b||t!==c-1;d.a11yProxyElement&&(d.a11yProxyElement.style.visibility=t?"hidden":"visible")})},onChartRender:function(){p(this.chart)||this.removeProxies()},onChartUpdate:function(){this.updateLegendTitle()},updateProxiesPositions:function(){for(var a=0,c=this.proxyElementsList;a/g, " "));a=a.langFormat("accessibility.legend.legendLabel"+(c?"":"NoTitle"),{chart:a,legendTitle:c,chartTitle:v(a)});this.legendProxyGroup&&this.legendProxyGroup.setAttribute("aria-label",a)},addLegendProxyGroup:function(){this.legendProxyGroup=this.addProxyGroup({"aria-label":"_placeholder_",role:"all"===this.chart.options.accessibility.landmarkVerbosity?"region":null})},addLegendListContainer:function(){if(this.legendProxyGroup){var a=this.legendListContainer=this.createElement("ul");a.style.listStyle= "none";this.legendProxyGroup.appendChild(a)}},proxyLegendItems:function(){var a=this;(this.chart.legend&&this.chart.legend.allItems||[]).forEach(function(c){c.legendItem&&c.legendItem.element&&a.proxyLegendItem(c)})},proxyLegendItem:function(a){if(a.legendItem&&a.legendGroup&&this.legendListContainer){var c=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:L(a.name),item:a});c={tabindex:-1,"aria-pressed":a.visible,"aria-label":c};var b=a.legendGroup.div?a.legendItem: a.legendGroup,d=this.createElement("li");this.legendListContainer.appendChild(d);a.a11yProxyElement=this.createProxyButton(a.legendItem,d,c,b);this.proxyElementsList.push({item:a,element:a.a11yProxyElement,posElement:b})}},getKeyboardNavigation:function(){var a=this.keyCodes,c=this,b=this.chart;return new m(b,{keyCodeMap:[[[a.left,a.right,a.up,a.down],function(a){return c.onKbdArrowKey(this,a)}],[[a.enter,a.space],function(b){return q.isFirefox&&b===a.space?this.response.success:c.onKbdClick(this)}]], validate:function(){return c.shouldHaveLegendNavigation()},init:function(a){return c.onKbdNavigationInit(a)},terminate:function(){b.legend.allItems.forEach(function(a){return a.setState("",!0)})}})},onKbdArrowKey:function(a,c){var b=this.keyCodes,d=a.response,t=this.chart,f=t.options.accessibility,g=t.legend.allItems.length;c=c===b.left||c===b.up?-1:1;return t.highlightLegendItem(this.highlightedLegendItemIx+c)?(this.highlightedLegendItemIx+=c,d.success):1=k&&a||0<=k&&!a||5>h||c(g))&&h"+b+"":""})}var x=b.escapeStringForHTML,m=b.stripHTMLTagsFromString;return{getAnnotationsInfoHTML:function(b){var k=b.annotations;return k&&k.length?'
    '+r(b).join(" ")+"
":""},getAnnotationLabelDescription:n,getAnnotationListItems:r,getPointAnnotationTexts:function(b){var k=e(b.series.chart).filter(function(k){return-1c&&a.graphic&&a.graphic.element)})||null:null}function m(a){var c=a.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(!1!== c&&a.points&&a.points.length>=c)}function l(a){var c=a.options.accessibility||{};return!m(a)&&!c.exposeAsGroupOnly}function k(a){var c=a.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!(!a.points||!(a.points.length"," "),d=c.id&&0>c.id.indexOf("highcharts-"),f="x, "+c.x;return c.name||b||h||(d?c.id:f)}function f(a,c,b){var h=c||"",d=b||"";return a.series.pointArrayMap.reduce(function(c,b){c+=c.length?", ":"";var f=p(a,J(a[b],a.options[b]));return c+(b+": "+h+f+d)},"")}function y(a){var c=a.series,b=c.chart.options.accessibility.point|| {},h=c.tooltipOptions||{},d=b.valuePrefix||h.valuePrefix||"";b=b.valueSuffix||h.valueSuffix||"";h=p(a,a["undefined"!==typeof a.value?"value":"y"]);return a.isNull?c.chart.langFormat("accessibility.series.nullPointValue",{point:a}):c.pointArrayMap?f(a,d,b):d+h+b}function G(a){var c=a.series,b=c.chart,h=b.options.accessibility.point.valueDescriptionFormat,f=(c=J(c.xAxis&&c.xAxis.options.accessibility&&c.xAxis.options.accessibility.enabled,!b.angular))?d(a):"";a={point:a,index:H(a.index)?a.index+1:"", xDescription:f,value:y(a),separator:c?", ":""};return u(h,a,b)}function C(a){var c=a.series,b=c.chart,h=G(a),d=a.options&&a.options.accessibility&&a.options.accessibility.description;d=d?" "+d:"";c=1b&&dc.dataMax&&(a=c.dataMax,d=a-f);this.setExtremes(d,a)};e.prototype=new b; n(e.prototype,{init:function(){var b=this,c=this.chart;["afterShowResetZoom","afterDrilldown","drillupall"].forEach(function(a){b.addEvent(c,a,function(){b.updateProxyOverlays()})})},onChartUpdate:function(){var b=this.chart,c=this;b.mapNavButtons&&b.mapNavButtons.forEach(function(a,d){m(b,a.element);c.setMapNavButtonAttrs(a.element,"accessibility.zoom.mapZoom"+(d?"Out":"In"))})},setMapNavButtonAttrs:function(b,c){var a=this.chart;c=a.langFormat(c,{chart:a});k(b,{tabindex:-1,role:"button","aria-label":c})}, onChartRender:function(){this.updateProxyOverlays()},updateProxyOverlays:function(){var b=this.chart;l(this.drillUpProxyGroup);l(this.resetZoomProxyGroup);b.resetZoomButton&&this.recreateProxyButtonAndGroup(b.resetZoomButton,"resetZoomProxyButton","resetZoomProxyGroup",b.langFormat("accessibility.zoom.resetZoomButton",{chart:b}));b.drillUpButton&&this.recreateProxyButtonAndGroup(b.drillUpButton,"drillUpProxyButton","drillUpProxyGroup",b.langFormat("accessibility.drillUpButton",{chart:b,buttonText:b.getDrilldownBackText()}))}, recreateProxyButtonAndGroup:function(b,c,a,d){l(this[a]);this[a]=this.addProxyGroup();this[c]=this.createProxyButton(b,this[a],{"aria-label":d,tabindex:-1})},getMapZoomNavigation:function(){var b=this.keyCodes,c=this.chart,a=this;return new r(c,{keyCodeMap:[[[b.up,b.down,b.left,b.right],function(b){return a.onMapKbdArrow(this,b)}],[[b.tab],function(b,c){return a.onMapKbdTab(this,c)}],[[b.space,b.enter],function(){return a.onMapKbdClick(this)}]],validate:function(){return!!(c.mapZoom&&c.mapNavButtons&& c.mapNavButtons.length)},init:function(b){return a.onMapNavInit(b)}})},onMapKbdArrow:function(b,c){var a=this.keyCodes;this.chart[c===a.up||c===a.down?"yAxis":"xAxis"][0].panStep(c===a.left||c===a.up?-1:1);return b.response.success},onMapKbdTab:function(b,c){var a=this.chart;b=b.response;var d=(c=c.shiftKey)&&!this.focusedMapNavButtonIx||!c&&this.focusedMapNavButtonIx;a.mapNavButtons[this.focusedMapNavButtonIx].setState(0);if(d)return a.mapZoom(),b[c?"prev":"next"];this.focusedMapNavButtonIx+=c?-1: 1;c=a.mapNavButtons[this.focusedMapNavButtonIx];a.setFocusToElement(c.box,c.element);c.setState(2);return b.success},onMapKbdClick:function(b){this.fakeClickEvent(this.chart.mapNavButtons[this.focusedMapNavButtonIx].element);return b.response.success},onMapNavInit:function(b){var c=this.chart,a=c.mapNavButtons[0],d=c.mapNavButtons[1];a=0t-k,r=e=864E5*{month:28,year:365}[A]*H-u&&f-36E5<=864E5*{month:31,year:366}[A]*H+u?e=!0:"ytd"===A?(e=p-l+u===f,q=!b):"all"===A&&(e=d.max-d.min>=t-k,F=!b&&n&&e);A=!B&&(O||r||F||g);H=b&&e||e&&!n&&!q||b&&a.frozenStates;A?M=3:H&&(n=!0, M=2);J.state!==M&&(J.setState(M),c&&(c.options[h+1].disabled=A,2===M&&(c.selectedIndex=h+1)),0===M&&m===h&&a.setSelected())})};e.prototype.computeButtonRange=function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=z(a.offsetMin,0);a._offsetMax=z(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};e.prototype.getInputValue=function(a){a= "min"===a?this.minInput:this.maxInput;var b=this.chart.options.rangeSelector,c=this.chart.time;return a?("text"===a.type&&b.inputDateParser||this.defaultInputDateParser)(a.value,c.useUTC,c):0};e.prototype.setInputValue=function(b,c){var d=this.options,h=this.chart.time,f="min"===b?this.minInput:this.maxInput;b="min"===b?this.minDateBox:this.maxDateBox;if(f){var e=f.getAttribute("data-hc-time");e=a(e)?Number(e):void 0;a(c)&&(a(e)&&f.setAttribute("data-hc-time-previous",e),f.setAttribute("data-hc-time", c),e=c);f.value=h.dateFormat(this.inputTypeFormats[f.type]||d.inputEditDateFormat,e);b&&b.attr({text:h.dateFormat(d.inputDateFormat,e)})}};e.prototype.setInputExtremes=function(a,b,c){if(a="min"===a?this.minInput:this.maxInput){var d=this.inputTypeFormats[a.type],h=this.chart.time;d&&(b=h.dateFormat(d,b),a.min!==b&&(a.min=b),c=h.dateFormat(d,c),a.max!==c&&(a.max=c))}};e.prototype.showInput=function(a){var b="min"===a?this.minDateBox:this.maxDateBox;if((a="min"===a?this.minInput:this.maxInput)&&b&& this.inputGroup){var d="text"===a.type,h=this.inputGroup,f=h.translateX;h=h.translateY;var e=this.options.inputBoxWidth;c(a,{width:d?b.width+(e?-2:20)+"px":"auto",height:d?b.height-2+"px":"auto",border:"2px solid silver"});d&&e?c(a,{left:f+b.x+"px",top:h+"px"}):c(a,{left:Math.min(Math.round(b.x+f-(a.offsetWidth-b.width)/2),this.chart.chartWidth-a.offsetWidth)+"px",top:h-(a.offsetHeight-b.height)/2+"px"})}};e.prototype.hideInput=function(a){(a="min"===a?this.minInput:this.maxInput)&&c(a,{top:"-9999em", border:0,width:"1px",height:"1px"})};e.prototype.defaultInputDateParser=function(a,b,c){var d=a.split("/").join("-").split(" ").join("T");-1===d.indexOf("T")&&(d+="T00:00");if(b)d+="Z";else{var h;if(h=q.isSafari)h=d,h=!(6=h?"+"+D(-h)+":00":"-"+D(h)+":00")}d=Date.parse(d);w(d)||(a=a.split("-"),d=Date.UTC(E(a[0]),E(a[1])-1,E(a[2])));c&&b&&w(d)&&(d+=c.getTimezoneOffset(d));return d}; e.prototype.drawInput=function(a){function b(){var b=e.getInputValue(a),c=d.xAxis[0],h=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:c,f=h.dataMin;h=h.dataMax;var g=e.maxInput,k=e.minInput;b!==Number(u.getAttribute("data-hc-time-previous"))&&w(b)&&(u.setAttribute("data-hc-time-previous",b),n&&g&&w(f)?b>Number(g.getAttribute("data-hc-time"))?b=void 0:bh&&(b=h)),"undefined"!==typeof b&&c.setExtremes(n?b:c.min,n?c.max:b,void 0,void 0, {trigger:"rangeSelectorInput"}))}var d=this.chart,h=this.div,f=this.inputGroup,e=this,t=d.renderer.style||{},p=d.renderer,m=d.options.rangeSelector,n="min"===a,B=k.lang[n?"rangeSelectorFrom":"rangeSelectorTo"]||"";B=p.label(B,0).addClass("highcharts-range-label").attr({padding:B?2:0,height:B?m.inputBoxHeight:0}).add(f);p=p.label("",0).addClass("highcharts-range-input").attr({padding:2,width:m.inputBoxWidth,height:m.inputBoxHeight,"text-align":"center"}).on("click",function(){e.showInput(a);e[a+"Input"].focus()}); d.styledMode||p.attr({stroke:m.inputBoxBorderColor,"stroke-width":1});p.add(f);var u=g("input",{name:a,className:"highcharts-range-selector"},void 0,h);u.setAttribute("type",l(m.inputDateFormat||"%b %e, %Y"));d.styledMode||(B.css(v(t,m.labelStyle)),p.css(v({color:r.neutralColor80},t,m.inputStyle)),c(u,y({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:t.fontSize,fontFamily:t.fontFamily,top:"-9999em"},m.inputStyle))); u.onfocus=function(){e.showInput(a)};u.onblur=function(){u===q.doc.activeElement&&b();e.hideInput(a);e.setInputValue(a);u.blur()};var F=!1;u.onchange=function(){F||(b(),e.hideInput(a),u.blur())};u.onkeypress=function(a){13===a.keyCode&&b()};u.onkeydown=function(a){F=!0;38!==a.keyCode&&40!==a.keyCode||b()};u.onkeyup=function(){F=!1};return{dateBox:p,input:u,label:B}};e.prototype.getPosition=function(){var a=this.chart,b=a.options.rangeSelector;a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0; return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}};e.prototype.getYTDExtremes=function(a,b,c){var d=this.chart.time,h=new d.Date(a),f=d.get("FullYear",h);c=c?d.Date.UTC(f,0,1):+new d.Date(f,0,1);b=Math.max(b,c);h=h.getTime();return{max:Math.min(a||h,h),min:b}};e.prototype.render=function(b,c){var d=this.chart,h=d.renderer,f=d.container,e=d.options,k=e.rangeSelector,t=z(e.chart.style&&e.chart.style.zIndex,0)+1;e=k.inputEnabled;if(!1!==k.enabled){this.rendered||(this.group=h.g("range-selector-group").attr({zIndex:7}).add(), this.div=g("div",void 0,{position:"relative",height:0,zIndex:t}),this.buttonOptions.length&&this.renderButtons(),f.parentNode&&f.parentNode.insertBefore(this.div,f),e&&(this.inputGroup=h.g("input-group").add(this.group),h=this.drawInput("min"),this.minDateBox=h.dateBox,this.minLabel=h.label,this.minInput=h.input,h=this.drawInput("max"),this.maxDateBox=h.dateBox,this.maxLabel=h.label,this.maxInput=h.input));if(e&&(this.setInputValue("min",b),this.setInputValue("max",c),b=d.scroller&&d.scroller.getUnionExtremes()|| d.xAxis[0]||{},a(b.dataMin)&&a(b.dataMax)&&(d=d.xAxis[0].minRange||0,this.setInputExtremes("min",b.dataMin,Math.min(b.dataMax,this.getInputValue("max"))-d),this.setInputExtremes("max",Math.max(b.dataMin,this.getInputValue("min"))+d,b.dataMax)),this.inputGroup)){var p=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var b=a.getBBox().width;b&&(a.attr({x:p}),p+=b+k.inputSpacing)}})}this.alignElements();this.rendered=!0}};e.prototype.renderButtons=function(){var a= this,b=this.buttons,c=this.options,d=k.lang,f=this.chart.renderer,e=v(c.buttonTheme),t=e&&e.states,l=e.width||28;delete e.width;delete e.states;this.buttonGroup=f.g("range-selector-buttons").add(this.group);var m=this.dropdown=g("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div);p(m,"touchstart",function(){m.style.fontSize="16px"});[[q.isMS?"mouseover":"mouseenter"],[q.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(c){var d= c[0],h=c[1];p(m,d,function(){var c=b[a.currentButtonIndex()];c&&C(c.element,h||d)})});this.zoomText=f.label(d&&d.rangeSelectorZoom||"",0).attr({padding:c.buttonTheme.padding,height:c.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(c.labelStyle),e["stroke-width"]=z(e["stroke-width"],0));g("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,m);this.buttonOptions.forEach(function(c,d){g("option",{textContent:c.title||c.text}, void 0,m);b[d]=f.button(c.text,0,0,function(b){var h=c.events&&c.events.click,f;h&&(f=h.call(c,b));!1!==f&&a.clickButton(d);a.isActive=!0},e,t&&t.hover,t&&t.select,t&&t.disabled).attr({"text-align":"center",width:l}).add(a.buttonGroup);c.title&&b[d].attr("title",c.title)})};e.prototype.alignElements=function(){var a=this,b=this.buttonGroup,c=this.buttons,d=this.chart,f=this.group,e=this.inputGroup,g=this.options,k=this.zoomText,t=d.options,p=t.exporting&&!1!==t.exporting.enabled&&t.navigation&&t.navigation.buttonOptions; t=g.buttonPosition;var l=g.inputPosition,m=g.verticalAlign,u=function(b,c){return p&&a.titleCollision(d)&&"top"===m&&"right"===c.align&&c.y-b.getBBox().height-12<(p.y||0)+(p.height||0)+d.spacing[0]?-40:0},n=d.plotLeft;if(f&&t&&l){var B=t.x-d.spacing[3];if(b){this.positionButtons();if(!this.initialButtonGroupWidth){var y=0;k&&(y+=k.getBBox().width+5);c.forEach(function(a,b){y+=a.width;b!==c.length-1&&(y+=g.buttonSpacing)});this.initialButtonGroupWidth=y}n-=d.spacing[3];this.updateButtonStates();k= u(b,t);this.alignButtonGroup(k);f.placed=b.placed=d.hasLoaded}b=0;e&&(b=u(e,l),"left"===l.align?B=n:"right"===l.align&&(B=-Math.max(d.axisOffset[1],-b)),e.align({y:l.y,width:e.getBBox().width,align:l.align,x:l.x+B-2},!0,d.spacingBox),e.placed=d.hasLoaded);this.handleCollision(b);f.align({verticalAlign:m},!0,d.spacingBox);e=f.alignAttr.translateY;b=f.getBBox().height+20;u=0;"bottom"===m&&(u=(u=d.legend&&d.legend.options)&&"bottom"===u.verticalAlign&&u.enabled&&!u.floating?d.legend.legendHeight+z(u.margin, 10):0,b=b+u-20,u=e-b-(g.floating?0:g.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===m)g.floating&&(u=0),d.titleOffset&&d.titleOffset[0]&&(u=d.titleOffset[0]),u+=d.margin[0]-d.spacing[0]||0;else if("middle"===m)if(l.y===t.y)u=e;else if(l.y||t.y)u=0>l.y||0>t.y?u-Math.min(l.y,t.y):e-b;f.translate(g.x,g.y+Math.floor(u));t=this.minInput;l=this.maxInput;e=this.dropdown;g.inputEnabled&&t&&l&&(t.style.marginTop=f.translateY+"px",l.style.marginTop=f.translateY+"px");e&&(e.style.marginTop=f.translateY+ "px")}};e.prototype.alignButtonGroup=function(a,b){var c=this.chart,d=this.buttonGroup,h=this.options.buttonPosition,f=c.plotLeft-c.spacing[3],e=h.x-c.spacing[3];"right"===h.align?e+=a-f:"center"===h.align&&(e-=f/2);d&&d.align({y:h.y,width:z(b,this.initialButtonGroupWidth),align:h.align,x:e},!0,c.spacingBox)};e.prototype.positionButtons=function(){var a=this.buttons,b=this.chart,c=this.options,d=this.zoomText,f=b.hasLoaded?"animate":"attr",e=c.buttonPosition,g=b.plotLeft,k=g;d&&"hidden"!==d.visibility&& (d[f]({x:z(g+e.x,g)}),k+=e.x+d.getBBox().width+5);this.buttonOptions.forEach(function(b,d){if("hidden"!==a[d].visibility)a[d][f]({x:k}),k+=a[d].width+c.buttonSpacing;else a[d][f]({x:g})})};e.prototype.handleCollision=function(a){var b=this,c=this.chart,d=this.buttonGroup,h=this.inputGroup,f=this.options,e=f.buttonPosition,g=f.dropdown,k=f.inputPosition;f=function(){var a=0;b.buttons.forEach(function(b){b=b.getBBox();b.width>a&&(a=b.width)});return a};var t=function(b){if(h&&d){var c=h.alignAttr.translateX+ h.alignOptions.x-a+h.getBBox().x+2,f=h.alignOptions.width,g=d.alignAttr.translateX+d.getBBox().x;return g+b>c&&c+f>g&&e.y=-a?0:-a),translateY:h.alignAttr.translateY+d.getBBox().height+10})};if(d){if("always"===g){this.collapseButtons(a);t(f())&&l();return}"never"===g&&this.expandButtons()}h&&d?k.align===e.align||t(this.initialButtonGroupWidth+20)?"responsive"===g?(this.collapseButtons(a), t(f())&&l()):l():"responsive"===g&&this.expandButtons():d&&"responsive"===g&&(this.initialButtonGroupWidth>c.plotWidth?this.collapseButtons(a):this.expandButtons())};e.prototype.collapseButtons=function(a){var b=this.buttons,c=this.buttonOptions,d=this.chart,h=this.dropdown,f=this.options,e=this.zoomText,g=d.userOptions.rangeSelector&&d.userOptions.rangeSelector.buttonTheme||{},k=function(a){return{text:a?a+" \u25be":"\u25be",width:"auto",paddingLeft:z(f.buttonTheme.paddingLeft,g.padding,8),paddingRight:z(f.buttonTheme.paddingRight, g.padding,8)}};e&&e.hide();var t=!1;c.forEach(function(a,c){c=b[c];2!==c.state?c.hide():(c.show(),c.attr(k(a.text)),t=!0)});t||(h&&(h.selectedIndex=0),b[0].show(),b[0].attr(k(this.zoomText&&this.zoomText.textStr)));c=f.buttonPosition.align;this.positionButtons();"right"!==c&&"center"!==c||this.alignButtonGroup(a,b[this.currentButtonIndex()].getBBox().width);this.showDropdown()};e.prototype.expandButtons=function(){var a=this.buttons,b=this.buttonOptions,c=this.options,d=this.zoomText;this.hideDropdown(); d&&d.show();b.forEach(function(b,d){d=a[d];d.show();d.attr({text:b.text,width:c.buttonTheme.width||28,paddingLeft:z(c.buttonTheme.paddingLeft,"unset"),paddingRight:z(c.buttonTheme.paddingRight,"unset")});2>d.state&&d.setState(0)});this.positionButtons()};e.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0 f&&0>d||0e?b.accessibility&&(b.accessibility.keyboardNavigation.tabindexContainer.focus(),b.accessibility.keyboardNavigation[0>a?"prev":"next"]()):c&&(a=c[e?"maxDateBox":"minDateBox"],c=c[e?"maxInput":"minInput"],a&&c&&b.setFocusToElement(a, c))},onInputNavInit:function(a){var b=this,e=this,g=this.chart,k=0this.series.length?"Single":"Multiple";return(this.langFormat("accessibility.chartTypes."+a+d,c)||this.langFormat("accessibility.chartTypes.default"+d,c))+(b?" "+ b:"")};e=function(){};e.prototype=new x;q(e.prototype,{init:function(){var a=this.chart,b=this;this.initRegionsDefinitions();this.addEvent(a,"aftergetTableAST",function(a){b.onDataTableCreated(a)});this.addEvent(a,"afterViewData",function(a){b.dataTableDiv=a;setTimeout(function(){b.focusDataTable()},300)});this.announcer=new m(a,"assertive")},initRegionsDefinitions:function(){var a=this;this.screenReaderSections={before:{element:null,buildContent:function(b){var c=b.options.accessibility.screenReaderSection.beforeChartFormatter; return c?c(b):a.defaultBeforeChartFormatter(b)},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a,b.renderTo.firstChild)},afterInserted:function(){"undefined"!==typeof a.sonifyButtonId&&a.initSonifyButton(a.sonifyButtonId);"undefined"!==typeof a.dataTableButtonId&&a.initDataTableButton(a.dataTableButtonId)}},after:{element:null,buildContent:function(b){var c=b.options.accessibility.screenReaderSection.afterChartFormatter;return c?c(b):a.defaultAfterChartFormatter()},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a, b.container.nextSibling)},afterInserted:function(){a.chart.accessibility&&a.chart.accessibility.keyboardNavigation.updateExitAnchor()}}}},onChartRender:function(){var a=this;this.linkedDescriptionElement=this.getLinkedDescriptionElement();this.setLinkedDescriptionAttrs();Object.keys(this.screenReaderSections).forEach(function(b){a.updateScreenReaderSection(b)})},getLinkedDescriptionElement:function(){var a=this.chart.options.accessibility.linkedDescription;if(a){if("string"!==typeof a)return a;a= g(a,this.chart);a=c.querySelectorAll(a);if(1===a.length)return a[0]}},setLinkedDescriptionAttrs:function(){var a=this.linkedDescriptionElement;a&&(a.setAttribute("aria-hidden","true"),L(a,"highcharts-linked-description"))},updateScreenReaderSection:function(a){var c=this.chart,d=this.screenReaderSections[a],e=d.buildContent(c),f=d.element=d.element||this.createElement("div"),h=f.firstChild||this.createElement("div");this.setScreenReaderSectionAttribs(f,a);b.setElementHTML(h,e);f.appendChild(h);d.insertIntoDOM(f, c);E(h);v(c,h);d.afterInserted&&d.afterInserted()},setScreenReaderSectionAttribs:function(a,b){var c=this.chart,d=c.langFormat("accessibility.screenReaderSection."+b+"RegionLabel",{chart:c,chartTitle:w(c)});D(a,{id:"highcharts-screen-reader-region-"+b+"-"+c.index,"aria-label":d});a.style.position="relative";"all"===c.options.accessibility.landmarkVerbosity&&d&&a.setAttribute("role","region")},defaultBeforeChartFormatter:function(){var a=this.chart,b=a.options.accessibility.screenReaderSection.beforeChartFormat, c=this.getAxesDescription(),e=a.sonify&&a.options.sonification&&a.options.sonification.enabled,f="highcharts-a11y-sonify-data-btn-"+a.index,h="hc-linkto-highcharts-data-table-"+a.index,g=d(a),k=a.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:a});c={headingTagName:I(a.renderTo),chartTitle:w(a),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:c.xAxis,yAxisDescription:c.yAxis,playAsSoundButton:e? this.getSonifyButtonText(f):"",viewTableButton:a.getCSV?this.getDataTableButtonText(h):"",annotationsTitle:g?k:"",annotationsList:g};a=n.i18nFormat(b,c,a);this.dataTableButtonId=h;this.sonifyButtonId=f;return a.replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},defaultAfterChartFormatter:function(){var a=this.chart,b=a.options.accessibility.screenReaderSection.afterChartFormat,c={endOfChartMarker:this.getEndOfChartMarkerText()};return n.i18nFormat(b,c,a).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},getLinkedDescription:function(){var a= this.linkedDescriptionElement;return z(a&&a.innerHTML||"")},getLongdescText:function(){var a=this.chart.options,b=a.caption;b=b&&b.text;var c=this.getLinkedDescription();return a.accessibility.description||c||b||""},getTypeDescriptionText:function(){var a=this.chart;return a.types?a.options.accessibility.typeDescription||a.getTypeDescription(a.types):""},getDataTableButtonText:function(a){var b=this.chart;b=b.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:b,chartTitle:w(b)});return'"},getSonifyButtonText:function(a){var b=this.chart;if(b.options.sonification&&!1===b.options.sonification.enabled)return"";b=b.langFormat("accessibility.sonification.playAsSoundButtonText",{chart:b,chartTitle:w(b)});return'"},getSubtitleText:function(){var a=this.chart.options.subtitle;return z(a&&a.text||"")},getEndOfChartMarkerText:function(){var a=this.chart,b=a.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:a});return'
'+b+"
"},onDataTableCreated:function(a){var b=this.chart;if(b.options.accessibility.enabled){this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true");var c=a.tree.attributes||{};c.tabindex=-1;c.summary=b.langFormat("accessibility.table.tableSummary",{chart:b});a.tree.attributes=c}},focusDataTable:function(){var a=this.dataTableDiv;(a=a&&a.getElementsByTagName("table")[0])&&a.focus&&a.focus()},initSonifyButton:function(a){var b=this,c=this.sonifyButton= N(a),d=this.chart,e=function(a){c&&(c.setAttribute("aria-hidden","true"),c.setAttribute("aria-label",""));a.preventDefault();a.stopPropagation();a=d.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:d});b.announcer.announce(a);setTimeout(function(){c&&(c.removeAttribute("aria-hidden"),c.removeAttribute("aria-label"));d.sonify&&d.sonify()},1E3)};c&&d&&(D(c,{tabindex:-1}),c.onclick=function(a){(d.options.accessibility&&d.options.accessibility.screenReaderSection.onPlayAsSoundClick|| e).call(this,a,d)})},initDataTableButton:function(a){var b=this.viewDataTableButton=N(a),c=this.chart;a=a.replace("hc-linkto-","");b&&(D(b,{tabindex:-1,"aria-expanded":!!N(a)}),b.onclick=c.options.accessibility.screenReaderSection.onViewDataTableClick||function(){c.viewData()})},getAxesDescription:function(){var b=this.chart,c=function(c,d){c=b[c];return 1b.types.indexOf("map"),e=!!b.hasCartesianSeries, f=c("xAxis",!b.angular&&e&&d);c=c("yAxis",e&&d);d={};f&&(d.xAxis=this.getAxisDescriptionText("xAxis"));c&&(d.yAxis=this.getAxisDescriptionText("yAxis"));return d},getAxisDescriptionText:function(a){var b=this.chart,c=b[a];return b.langFormat("accessibility.axis."+a+"Description"+(1{chartTitle}
{typeDescription}
{chartSubtitle}
{chartLongdesc}
{playAsSoundButton}
{viewTableButton}
{xAxisDescription}
{yAxisDescription}
{annotationsTitle}{annotationsList}
", afterChartFormat:"{endOfChartMarker}",axisRangeDateFormat:"%Y-%m-%d %H:%M:%S"},series:{describeSingleSeries:!1,pointDescriptionEnabledThreshold:200},point:{valueDescriptionFormat:"{index}. {xDescription}{separator}{value}."},landmarkVerbosity:"all",linkedDescription:'*[data-highcharts-chart="{index}"] + .highcharts-description',keyboardNavigation:{enabled:!0,focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:b.highlightColor80,lineWidth:2,borderRadius:3},margin:2},order:["series","zoom", "rangeSelector","legend","chartMenu"],wrapAround:!0,seriesNavigation:{skipNullPoints:!0,pointNavigationEnabledThreshold:!1}},announceNewData:{enabled:!1,minAnnounceInterval:5E3,interruptUser:!1}},legend:{accessibility:{enabled:!0,keyboardNavigation:{enabled:!0}}},exporting:{accessibility:{enabled:!0}}}});v(b,"Accessibility/Options/LangOptions.js",[],function(){return{accessibility:{defaultChartTitle:"Chart",chartContainerLabel:". Highcharts interactive chart.",svgContainerLabel:"Interactive chart", drillUpButton:"{buttonText}",credits:"Chart credits: {creditsStr}",thousandsSep:",",svgContainerTitle:"",graphicContainerLabel:"",screenReaderSection:{beforeRegionLabel:"Chart screen reader information, {chartTitle}.",afterRegionLabel:"",annotations:{heading:"Chart annotations summary",descriptionSinglePoint:"{annotationText}. Related to {annotationPoint}",descriptionMultiplePoints:"{annotationText}. Related to {annotationPoint}{ Also related to, #each(additionalAnnotationPoints)}",descriptionNoPoints:"{annotationText}"}, endOfChartMarker:"End of interactive chart."},sonification:{playAsSoundButtonText:"Play as sound, {chartTitle}",playAsSoundClickAnnouncement:"Play"},legend:{legendLabelNoTitle:"Toggle series visibility, {chartTitle}",legendLabel:"Chart legend: {legendTitle}",legendItem:"Show {itemName}"},zoom:{mapZoomIn:"Zoom chart",mapZoomOut:"Zoom out chart",resetZoomButton:"Reset zoom"},rangeSelector:{dropdownLabel:"{rangeTitle}",minInputLabel:"Select start date.",maxInputLabel:"Select end date.",clickButtonAnnouncement:"Viewing {axisRangeDescription}"}, table:{viewAsDataTableButtonText:"View as data table, {chartTitle}",tableSummary:"Table representation of chart."},announceNewData:{newDataAnnounce:"Updated data for chart {chartTitle}",newSeriesAnnounceSingle:"New data series: {seriesDesc}",newPointAnnounceSingle:"New data point: {pointDesc}",newSeriesAnnounceMultiple:"New data series in chart {chartTitle}: {seriesDesc}",newPointAnnounceMultiple:"New data point in chart {chartTitle}: {pointDesc}"},seriesTypeDescriptions:{boxplot:"Box plot charts are typically used to display groups of statistical data. Each data point in the chart can have up to 5 values: minimum, lower quartile, median, upper quartile, and maximum.", arearange:"Arearange charts are line charts displaying a range between a lower and higher value for each point.",areasplinerange:"These charts are line charts displaying a range between a lower and higher value for each point.",bubble:"Bubble charts are scatter charts where each data point also has a size value.",columnrange:"Columnrange charts are column charts displaying a range between a lower and higher value for each point.",errorbar:"Errorbar series are used to display the variability of the data.", funnel:"Funnel charts are used to display reduction of data in stages.",pyramid:"Pyramid charts consist of a single pyramid with item heights corresponding to each point value.",waterfall:"A waterfall chart is a column chart where each column contributes towards a total end value."},chartTypes:{emptyChart:"Empty chart",mapTypeDescription:"Map of {mapTitle} with {numSeries} data series.",unknownMap:"Map of unspecified region with {numSeries} data series.",combinationChart:"Combination chart with {numSeries} data series.", defaultSingle:"Chart with {numPoints} data {#plural(numPoints, points, point)}.",defaultMultiple:"Chart with {numSeries} data series.",splineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",splineMultiple:"Line chart with {numSeries} lines.",lineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",lineMultiple:"Line chart with {numSeries} lines.",columnSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",columnMultiple:"Bar chart with {numSeries} data series.", barSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",barMultiple:"Bar chart with {numSeries} data series.",pieSingle:"Pie chart with {numPoints} {#plural(numPoints, slices, slice)}.",pieMultiple:"Pie chart with {numSeries} pies.",scatterSingle:"Scatter chart with {numPoints} {#plural(numPoints, points, point)}.",scatterMultiple:"Scatter chart with {numSeries} data series.",boxplotSingle:"Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotMultiple:"Boxplot with {numSeries} data series.", bubbleSingle:"Bubble chart with {numPoints} {#plural(numPoints, bubbles, bubble)}.",bubbleMultiple:"Bubble chart with {numSeries} data series."},axis:{xAxisDescriptionSingular:"The chart has 1 X axis displaying {names[0]}. {ranges[0]}",xAxisDescriptionPlural:"The chart has {numAxes} X axes displaying {#each(names, -1) }and {names[-1]}.",yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}. {ranges[0]}",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#each(names, -1) }and {names[-1]}.", timeRangeDays:"Range: {range} days.",timeRangeHours:"Range: {range} hours.",timeRangeMinutes:"Range: {range} minutes.",timeRangeSeconds:"Range: {range} seconds.",rangeFromTo:"Range: {rangeFrom} to {rangeTo}.",rangeCategories:"Range: {numCategories} categories."},exporting:{chartMenuLabel:"Chart menu",menuButtonLabel:"View chart menu",exportRegionLabel:"Chart menu, {chartTitle}"},series:{summary:{"default":"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.", defaultCombination:"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",line:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",lineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",spline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",splineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.", column:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.",columnCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",bar:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.",barCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",pie:"{name}, pie {ix} of {numSeries} with {numPoints} {#plural(numPoints, slices, slice)}.", pieCombination:"{name}, series {ix} of {numSeries}. Pie with {numPoints} {#plural(numPoints, slices, slice)}.",scatter:"{name}, scatter plot {ix} of {numSeries} with {numPoints} {#plural(numPoints, points, point)}.",scatterCombination:"{name}, series {ix} of {numSeries}, scatter plot with {numPoints} {#plural(numPoints, points, point)}.",boxplot:"{name}, boxplot {ix} of {numSeries} with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotCombination:"{name}, series {ix} of {numSeries}. Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.", bubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.",bubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}.",map:"{name}, map {ix} of {numSeries} with {numPoints} {#plural(numPoints, areas, area)}.",mapCombination:"{name}, series {ix} of {numSeries}. Map with {numPoints} {#plural(numPoints, areas, area)}.",mapline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.", maplineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",mapbubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.",mapbubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}."},description:"{description}",xAxisDescription:"X axis, {name}",yAxisDescription:"Y axis, {name}",nullPointValue:"No value",pointAnnotationsDescription:"{Annotation: #each(annotations). }"}}}}); v(b,"Accessibility/Options/DeprecatedOptions.js",[b["Core/Utilities.js"]],function(b){function e(b,e,g){for(var c,a=0;ak?e.length+k:Math.min(k,e.length),a=0;ac?(b=e[e.length+c],"undefined"===typeof b&&(b=e[0])):(b=e[c],"undefined"===typeof b&&(b=e[e.length-1]))),"undefined"!==typeof b?b:""):"{"+b+"}"}var w=q.format,m=n.pick;e.i18nFormat=function(b,e,m){var g=function(a,b){a= a.slice(b||0);var c=a.indexOf("{"),d=a.indexOf("}");if(-1c)return{statement:a.substring(c+1,d),begin:b+c+1,end:b+d}},c=[],a=0;do{var d=g(b,a);var f=b.substring(a,d&&d.begin-1);f.length&&c.push({value:f,type:"constant"});d&&c.push({value:d.statement,type:"statement"});a=d?d.end+1:a+1}while(d);c.forEach(function(a){"statement"===a.type&&(a.value=r(a.value,e))});return w(c.reduce(function(a,b){return a+b.value},""),e,m)};b.prototype.langFormat=function(b,k){b=b.split(".");for(var l=this.options.lang, g=0;g