From e8a4b647f56fe96b176aabac65e692dc09162223 Mon Sep 17 00:00:00 2001 From: rrene Date: Sun, 6 Apr 2025 20:36:50 -0700 Subject: [PATCH] highcharts --- Scripts/highcharts/accessibility.js | 12 ++++++++++++ Scripts/highcharts/dashboards.js | 11 +++++++++++ Scripts/highcharts/data.js | 11 +++++++++++ Scripts/highcharts/datagrid.js | 14 ++++++++++++++ Scripts/highcharts/exporting.js | 11 +++++++++++ Scripts/highcharts/highcharts.js | 9 +++++++++ Scripts/highcharts/layout.js | 14 ++++++++++++++ 7 files changed, 82 insertions(+) create mode 100644 Scripts/highcharts/accessibility.js create mode 100644 Scripts/highcharts/dashboards.js create mode 100644 Scripts/highcharts/data.js create mode 100644 Scripts/highcharts/datagrid.js create mode 100644 Scripts/highcharts/exporting.js create mode 100644 Scripts/highcharts/highcharts.js create mode 100644 Scripts/highcharts/layout.js diff --git a/Scripts/highcharts/accessibility.js b/Scripts/highcharts/accessibility.js new file mode 100644 index 000000000..a84d2611e --- /dev/null +++ b/Scripts/highcharts/accessibility.js @@ -0,0 +1,12 @@ +!/** + * Highcharts JS v12.1.2 (2024-12-21) + * @module highcharts/modules/accessibility + * @requires highcharts + * + * Accessibility module + * + * (c) 2010-2024 Highsoft AS + * Author: Oystein Moseng + * + * License: www.highcharts.com/license + */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Templating,e._Highcharts.AST,e._Highcharts.Legend,e._Highcharts.Axis,e._Highcharts.Color,e._Highcharts.SeriesRegistry,e._Highcharts.RendererRegistry,e._Highcharts.SVGRenderer,e._Highcharts.Point,e._Highcharts.Series):"function"==typeof define&&define.amd?define("highcharts/modules/accessibility",["highcharts/highcharts"],function(e){return t(e,e.Templating,e.AST,e.Legend,e.Axis,e.Color,e.SeriesRegistry,e.RendererRegistry,e.SVGRenderer,e.Point,e.Series)}):"object"==typeof exports?exports["highcharts/modules/accessibility"]=t(e._Highcharts,e._Highcharts.Templating,e._Highcharts.AST,e._Highcharts.Legend,e._Highcharts.Axis,e._Highcharts.Color,e._Highcharts.SeriesRegistry,e._Highcharts.RendererRegistry,e._Highcharts.SVGRenderer,e._Highcharts.Point,e._Highcharts.Series):e.Highcharts=t(e.Highcharts,e.Highcharts.Templating,e.Highcharts.AST,e.Highcharts.Legend,e.Highcharts.Axis,e.Highcharts.Color,e.Highcharts.SeriesRegistry,e.Highcharts.RendererRegistry,e.Highcharts.SVGRenderer,e.Highcharts.Point,e.Highcharts.Series)}("undefined"==typeof window?this:window,(e,t,i,s,n,r,o,a,l,h,c)=>(()=>{"use strict";let d;var u,p,g,m,b={660:e=>{e.exports=i},532:e=>{e.exports=n},620:e=>{e.exports=r},632:e=>{e.exports=s},260:e=>{e.exports=h},608:e=>{e.exports=a},540:e=>{e.exports=l},820:e=>{e.exports=c},512:e=>{e.exports=o},984:e=>{e.exports=t},944:t=>{t.exports=e}},f={};function x(e){var t=f[e];if(void 0!==t)return t.exports;var i=f[e]={exports:{}};return b[e](i,i.exports,x),i.exports}x.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return x.d(t,{a:t}),t},x.d=(e,t)=>{for(var i in t)x.o(t,i)&&!x.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},x.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var y={};x.d(y,{default:()=>nx});var v=x(944),w=x.n(v);let{doc:E,win:A}=w(),{css:T}=w(),C=A.EventTarget&&new A.EventTarget||"none";function M(e){if("function"==typeof A.MouseEvent)return new A.MouseEvent(e.type,e);if(E.createEvent){let t=E.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e.type,e.bubbles,e.cancelable,e.view||A,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),t}return k(e.type)}function k(e,t,i){let s=t||{x:0,y:0};if("function"==typeof A.MouseEvent)return new A.MouseEvent(e,{bubbles:!0,cancelable:!0,composed:!0,button:0,buttons:1,relatedTarget:i||C,view:A,detail:"click"===e?1:0,screenX:s.x,screenY:s.y,clientX:s.x,clientY:s.y});if(E.createEvent){let t=E.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e,!0,!0,A,"click"===e?1:0,s.x,s.y,s.x,s.y,!1,!1,!1,!1,0,null),t}return{type:e}}let S={addClass:function(e,t){e.classList?e.classList.add(t):0>e.className.indexOf(t)&&(e.className+=" "+t)},cloneMouseEvent:M,cloneTouchEvent:function(e){let t=e=>{let t=[];for(let i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(e){return E.getElementById(e)},getFakeMouseEvent:k,getHeadingTagNameForElement:function(e){let t=e=>"h"+Math.min(6,parseInt(e.slice(1),10)+1),i=e=>/^H[1-6]$/i.test(e),s=e=>{let t=e;for(;t=t.previousSibling;){let e=t.tagName||"";if(i(e))return e}return""},n=e=>{let r=s(e);if(r)return t(r);let o=e.parentElement;if(!o)return"h6";let a=o.tagName;return i(a)?t(a):n(o)};return n(e)},removeChildNodes:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(t,"g"),"")},removeElement:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},reverseChildNodes:function(e){let t=e.childNodes.length;for(;t--;)e.appendChild(e.childNodes[t])},simulatedEventTarget:C,stripHTMLTagsFromString:function(e,t=!1){return"string"==typeof e?t?e.replace(/<\/?[^>]+(>|$)/g,""):e.replace(/<\/?(?!\s)[^>]+(>|$)/g,""):e},visuallyHideElement:function(e){T(e,{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:.01})}};var P=x(984),D=x.n(P);let{format:N}=D(),{getNestedProperty:B,pick:I}=w();!function(e){function t(e,t,i){let s=(e,t)=>{let i=e.slice(t||0),s=i.indexOf("{"),n=i.indexOf("}");if(s>-1&&n>s)return{statement:i.substring(s+1,n),begin:t+s+1,end:t+n}},n=[],r,o,a=0;do r=s(e,a),(o=e.substring(a,r&&r.begin-1)).length&&n.push({value:o,type:"constant"}),r&&n.push({value:r.statement,type:"statement"}),a=r?r.end+1:a+1;while(r);return n.forEach(e=>{"statement"===e.type&&(e.value=function(e,t){let i,s;let n=e.indexOf("#each("),r=e.indexOf("#plural("),o=e.indexOf("["),a=e.indexOf("]");if(n>-1){let r=e.slice(n).indexOf(")")+n,o=e.substring(0,n),a=e.substring(r+1),l=e.substring(n+6,r).split(","),h=Number(l[1]),c;if(s="",i=B(l[0],t)){c=(h=isNaN(h)?i.length:h)<0?i.length+h:Math.min(h,i.length);for(let e=0;e-1){var l;let i=e.slice(r).indexOf(")")+r,n=e.substring(r+8,i).split(",");switch(Number(B(n[0],t))){case 0:s=I(n[4],n[1]);break;case 1:s=I(n[2],n[1]);break;case 2:s=I(n[3],n[1]);break;default:s=n[1]}return s?(l=s).trim&&l.trim()||l.replace(/^\s+|\s+$/g,""):""}if(o>-1){let s;let n=e.substring(0,o),r=Number(e.substring(o+1,a));return i=B(n,t),!isNaN(r)&&i&&(r<0?void 0===(s=i[i.length+r])&&(s=i[0]):void 0===(s=i[r])&&(s=i[i.length-1])),void 0!==s?s:""}return"{"+e+"}"}(e.value,t))}),N(n.reduce((e,t)=>e+t.value,""),t,i)}function i(e,i){let s=e.split("."),n=this.options.lang,r=0;for(;r!!e.graphic);return t&&t.graphic&&t.graphic.element}}function G(e){let t=q(e);return t&&t.parentNode||e.graph&&e.graph.element||e.group&&e.group.element}let K={fireEventOnWrappedOrUnwrappedElement:function e(t,i){let s=i.type,n=t.hcEvents;O.createEvent&&(t.dispatchEvent||t.fireEvent)?t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(s,i):n&&n[s]?z(t,s,i):t.element&&e(t.element,i)},getChartTitle:function(e){return R(e.options.title.text||e.langFormat("accessibility.defaultChartTitle",{chart:e}),e.renderer.forExport)},getAxisDescription:function(e){return e&&(e.options.accessibility?.description||e.axisTitle?.textStr||e.options.id||e.categories&&"categories"||e.dateTime&&"Time"||"values")},getAxisRangeDescription:function(e){let t=e.options||{};return t.accessibility&&void 0!==t.accessibility.rangeDescription?t.accessibility.rangeDescription:e.categories?function(e){let t=e.chart;return e.dataMax&&e.dataMin?t.langFormat("accessibility.axis.rangeCategories",{chart:t,axis:e,numCategories:e.dataMax-e.dataMin+1}):""}(e):e.dateTime&&(0===e.min||0===e.dataMin)?function(e){let t=e.chart,i={},s=e.dataMin||e.min||0,n=e.dataMax||e.max||0,r="Seconds";i.Seconds=(n-s)/1e3,i.Minutes=i.Seconds/60,i.Hours=i.Minutes/60,i.Days=i.Hours/24,["Minutes","Hours","Days"].forEach(function(e){i[e]>2&&(r=e)});let o=i[r].toFixed("Seconds"!==r&&"Minutes"!==r?1:0);return t.langFormat("accessibility.axis.timeRange"+r,{chart:t,axis:e,range:o.replace(".0","")})}(e):function(e){let t=e.chart,i=t.options,s=i&&i.accessibility&&i.accessibility.screenReaderSection.axisRangeDateFormat||"",n={min:e.dataMin||e.min||0,max:e.dataMax||e.max||0},r=function(i){return e.dateTime?t.time.dateFormat(s,n[i]):n[i].toString()};return t.langFormat("accessibility.axis.rangeFromTo",{chart:t,axis:e,rangeFrom:r("min"),rangeTo:r("max")})}(e)},getPointFromXY:function(e,t,i){let s=e.length,n;for(;s--;)if(n=H(e[s].points||[],function(e){return e.x===t&&e.y===i}))return n},getSeriesFirstPointElement:q,getSeriesFromName:function(e,t){return t?(e.series||[]).filter(function(e){return e.name===t}):e.series},getSeriesA11yElement:G,unhideChartElementFromAT:function e(t,i){i.setAttribute("aria-hidden",!1),i!==t.renderTo&&i.parentNode&&i.parentNode!==O.body&&(Array.prototype.forEach.call(i.parentNode.childNodes,function(e){e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden",!0)}),e(t,i.parentNode))},hideSeriesFromAT:function(e){let t=G(e);t&&t.setAttribute("aria-hidden",!0)},scrollAxisToPoint:function(e){let t=e.series.xAxis,i=e.series.yAxis,s=t&&t.scrollbar?t:i,n=s&&s.scrollbar;if(n&&L(n.to)&&L(n.from)){let t=n.to-n.from,i=function(e,t){if(!L(e.dataMin)||!L(e.dataMax))return 0;let i=e.toPixels(e.dataMin),s=e.toPixels(e.dataMax),n="xAxis"===e.coll?"x":"y";return(e.toPixels(t[n]||0)-i)/(s-i)}(s,e);n.updatePosition(i-t/2,i+t/2),z(n,"changed",{from:n.from,to:n.to,trigger:"scrollbar",DOMEvent:null})}}},{doc:U}=w(),{removeElement:V}=S,W=class{constructor(){this.elements=[]}createElement(){let e=U.createElement.apply(U,arguments);return this.elements.push(e),e}removeElement(e){V(e),this.elements.splice(this.elements.indexOf(e),1)}destroyCreatedElements(){this.elements.forEach(function(e){V(e)}),this.elements=[]}},{addEvent:X}=w(),Y=class{constructor(){this.eventRemovers=[]}addEvent(){let e=X.apply(w(),arguments);return this.eventRemovers.push({element:arguments[0],remover:e}),e}removeEvent(e){let t=this.eventRemovers.map(e=>e.remover).indexOf(e);this.eventRemovers[t].remover(),this.eventRemovers.splice(t,1)}removeAddedEvents(){this.eventRemovers.map(e=>e.remover).forEach(e=>e()),this.eventRemovers=[]}},{fireEventOnWrappedOrUnwrappedElement:j}=K,{getFakeMouseEvent:_}=S,Z=class{destroy(){}getKeyboardNavigation(){return[]}init(){}onChartRender(){}onChartUpdate(){}initBase(e,t){this.chart=e,this.eventProvider=new Y,this.domElementProvider=new W,this.proxyProvider=t,this.keyCodes={left:37,right:39,up:38,down:40,enter:13,space:32,esc:27,tab:9,pageUp:33,pageDown:34,end:35,home:36}}addEvent(e,t,i,s){return this.eventProvider.addEvent(e,t,i,s)}createElement(e,t){return this.domElementProvider.createElement(e,t)}fakeClickEvent(e){j(e,_("click"))}destroyBase(){this.domElementProvider.destroyCreatedElements(),this.eventProvider.removeAddedEvents()}},{find:$}=w(),Q=class{constructor(e,t){this.chart=e,this.keyCodeMap=t.keyCodeMap||[],this.validate=t.validate,this.init=t.init,this.terminate=t.terminate,this.response={success:1,prev:2,next:3,noHandler:4,fail:5}}run(e){let t=e.which||e.keyCode,i=this.response.noHandler,s=$(this.keyCodeMap,function(e){return e[0].indexOf(t)>-1});return s?i=s[1].call(this,t,e):9===t&&(i=this.response[e.shiftKey?"prev":"next"]),i}},{unhideChartElementFromAT:J,getChartTitle:ee}=K,{doc:et}=w(),{stripHTMLTagsFromString:ei}=S,es=class extends Z{onChartUpdate(){this.handleSVGTitleElement(),this.setSVGContainerLabel(),this.setGraphicContainerAttrs(),this.setRenderToAttrs(),this.makeCreditsAccessible()}handleSVGTitleElement(){let e=this.chart,t="highcharts-title-"+e.index,i=ei(e.langFormat("accessibility.svgContainerTitle",{chartTitle:ee(e)}));if(i.length){let s=this.svgTitleElement=this.svgTitleElement||et.createElementNS("http://www.w3.org/2000/svg","title");s.textContent=i,s.id=t,e.renderTo.insertBefore(s,e.renderTo.firstChild)}}setSVGContainerLabel(){let e=this.chart,t=e.langFormat("accessibility.svgContainerLabel",{chartTitle:ee(e)});e.renderer.box&&t.length&&e.renderer.box.setAttribute("aria-label",t)}setGraphicContainerAttrs(){let e=this.chart,t=e.langFormat("accessibility.graphicContainerLabel",{chartTitle:ee(e)});t.length&&e.container.setAttribute("aria-label",t)}setRenderToAttrs(){let e=this.chart,t="disabled"!==e.options.accessibility.landmarkVerbosity,i=e.langFormat("accessibility.chartContainerLabel",{title:ee(e),chart:e});i&&(e.renderTo.setAttribute("role",t?"region":"group"),e.renderTo.setAttribute("aria-label",i))}makeCreditsAccessible(){let e=this.chart,t=e.credits;t&&(t.textStr&&t.element.setAttribute("aria-label",e.langFormat("accessibility.credits",{creditsStr:ei(t.textStr,e.renderer.forExport)})),J(e,t.element))}getKeyboardNavigation(){let e=this.chart;return new Q(e,{keyCodeMap:[],validate:function(){return!0},init:function(){let t=e.accessibility;t&&t.keyboardNavigation.tabindexContainer.focus()}})}destroy(){this.chart.renderTo.setAttribute("aria-hidden",!0)}},{addEvent:en,pick:er}=w();!function(e){let t=["x","y","transform","width","height","r","d","stroke-width"];function i(){let e=this.focusElement,t=this.options.accessibility.keyboardNavigation.focusBorder;e&&(e.removeFocusBorder(),t.enabled&&e.addFocusBorder(t.margin,{stroke:t.style.color,strokeWidth:t.style.lineWidth,r:t.style.borderRadius}))}function s(e,t){let i=this.options.accessibility.keyboardNavigation.focusBorder,s=t||e.element;s&&s.focus&&(s.hcEvents&&s.hcEvents.focusin||en(s,"focusin",function(){}),s.focus(),i.hideBrowserFocusOutline&&(s.style.outline="none")),this.focusElement&&this.focusElement.removeFocusBorder(),this.focusElement=e,this.renderFocusBorder()}function n(e,i){this.focusBorder&&this.removeFocusBorder();let s=this.getBBox(),n=er(e,3),r=this.parentGroup,o=this.scaleX||r&&r.scaleX,a=this.scaleY||r&&r.scaleY,l=(o?!a:a)?Math.abs(o||a||1):(Math.abs(o||1)+Math.abs(a||1))/2,h=this.renderer.fontMetrics(this).h;s.x+=this.translateX?this.translateX:0,s.y+=this.translateY?this.translateY:0;let c=s.x-n,d=s.y-n,u=s.width+2*n,p=s.height+2*n,g=!!this.text;if("text"===this.element.nodeName||g){let e,t;let i=!!this.rotation,r=g?{x:i?1:0,y:0}:(e=0,t=0,"middle"===this.attr("text-anchor")?e=t=.5:this.rotation?e=.25:t=.75,{x:e,y:t}),o=+this.attr("x"),a=+this.attr("y");if(isNaN(o)||(c=o-s.width*r.x-n),isNaN(a)||(d=a-("start"===this.attr("text-anchor")?h:s.height)*r.y-n),g&&i){let e=u;u=p,p=e,isNaN(o)||(c=o-s.height*r.x-n),isNaN(a)||(d=a-s.width*r.y-n)}}this.focusBorder=this.renderer.rect(c,d,u,p,parseInt((i&&i.r||0).toString(),10)/l).addClass("highcharts-focus-border").attr({zIndex:99}).add(r),this.renderer.styledMode||this.focusBorder.attr({stroke:i&&i.stroke,"stroke-width":(i&&i.strokeWidth||0)/l}),function(e,...i){e.focusBorderUpdateHooks||(e.focusBorderUpdateHooks={},t.forEach(t=>{let s=t+"Setter",n=e[s]||e._defaultSetter;e.focusBorderUpdateHooks[s]=n,e[s]=function(){let t=n.apply(e,arguments);return e.addFocusBorder.apply(e,i),t}}))}(this,e,i),function(e){if(e.focusBorderDestroyHook)return;let t=e.destroy;e.destroy=function(){return e.focusBorder&&e.focusBorder.destroy&&e.focusBorder.destroy(),t.apply(e,arguments)},e.focusBorderDestroyHook=t}(this)}function r(){var e;e=this,e.focusBorderUpdateHooks&&(Object.keys(e.focusBorderUpdateHooks).forEach(t=>{let i=e.focusBorderUpdateHooks[t];i===e._defaultSetter?delete e[t]:e[t]=i}),delete e.focusBorderUpdateHooks),this.focusBorderDestroyHook&&(this.destroy=this.focusBorderDestroyHook,delete this.focusBorderDestroyHook),this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}e.compose=function(e,t){let o=e.prototype,a=t.prototype;o.renderFocusBorder||(o.renderFocusBorder=i,o.setFocusToElement=s),a.addFocusBorder||(a.addFocusBorder=n,a.removeFocusBorder=r)}}(p||(p={}));let eo=p;var ea=x(660),el=x.n(ea);let{doc:eh}=w(),{addClass:ec,visuallyHideElement:ed}=S,{attr:eu}=w(),ep=class{constructor(e,t){this.chart=e,this.domElementProvider=new W,this.announceRegion=this.addAnnounceRegion(t)}destroy(){this.domElementProvider.destroyCreatedElements()}announce(e){el().setElementHTML(this.announceRegion,e),this.clearAnnouncementRegionTimer&&clearTimeout(this.clearAnnouncementRegionTimer),this.clearAnnouncementRegionTimer=setTimeout(()=>{this.announceRegion.innerHTML=el().emptyHTML,delete this.clearAnnouncementRegionTimer},3e3)}addAnnounceRegion(e){let t=this.chart.announcerContainer||this.createAnnouncerContainer(),i=this.domElementProvider.createElement("div");return eu(i,{"aria-hidden":!1,"aria-live":e,"aria-atomic":!0}),this.chart.styledMode?ec(i,"highcharts-visually-hidden"):ed(i),t.appendChild(i),i}createAnnouncerContainer(){let e=this.chart,t=eh.createElement("div");return eu(t,{"aria-hidden":!1,class:"highcharts-announcer-container"}),t.style.position="relative",e.renderTo.insertBefore(t,e.renderTo.firstChild),e.announcerContainer=t,t}},{escapeStringForHTML:eg,stripHTMLTagsFromString:em}=S;function eb(e){return(e.annotations||[]).reduce((e,t)=>(t.options&&!1!==t.options.visible&&(e=e.concat(t.labels)),e),[])}function ef(e){return e.options&&e.options.accessibility&&e.options.accessibility.description||e.graphic&&e.graphic.text&&e.graphic.text.textStr||""}function ex(e){let t=e.options&&e.options.accessibility&&e.options.accessibility.description;if(t)return t;let i=e.chart,s=ef(e),n=e.points,r=e=>e.graphic&&e.graphic.element&&e.graphic.element.getAttribute("aria-label")||"",o=n.filter(e=>!!e.graphic).map(e=>{let t=e.accessibility&&e.accessibility.valueDescription||r(e),i=e&&e.series.name||"";return(i?i+", ":"")+"data point "+t}).filter(e=>!!e),a=o.length,l=a>1?"MultiplePoints":a?"SinglePoint":"NoPoints",h={annotationText:s,annotation:e,numPoints:a,annotationPoint:o[0],additionalAnnotationPoints:o.slice(1)};return i.langFormat("accessibility.screenReaderSection.annotations.description"+l,h)}function ey(e){return eb(e).map(t=>{let i=eg(em(ex(t),e.renderer.forExport));return i?`
  • ${i}
  • `:""})}let ev={getAnnotationsInfoHTML:function(e){let t=e.annotations;if(!(t&&t.length))return"";let i=ey(e);return`
      ${i.join(" ")}
    `},getAnnotationLabelDescription:ex,getAnnotationListItems:ey,getPointAnnotationTexts:function(e){let t=eb(e.series.chart).filter(t=>t.points.indexOf(e)>-1);return t.length?t.map(e=>`${ef(e)}`):[]}},{getAnnotationsInfoHTML:ew}=ev,{getAxisDescription:eE,getAxisRangeDescription:eA,getChartTitle:eT,unhideChartElementFromAT:eC}=K,{format:eM}=D(),{doc:ek}=w(),{addClass:eS,getElement:eP,getHeadingTagNameForElement:eD,stripHTMLTagsFromString:eN,visuallyHideElement:eB}=S,{attr:eI,pick:eF,replaceNested:eO}=w();function eR(e){return eO(e,[/<([\w\-.:!]+)\b[^<>]*>\s*<\/\1>/g,""])}let eL=class extends Z{constructor(){super(...arguments),this.screenReaderSections={}}init(){let e=this.chart,t=this;this.initRegionsDefinitions(),this.addEvent(e,"aftergetTableAST",function(e){t.onDataTableCreated(e)}),this.addEvent(e,"afterViewData",function(e){e.wasHidden&&(t.dataTableDiv=e.element,setTimeout(function(){t.focusDataTable()},300))}),this.addEvent(e,"afterHideData",function(){t.viewDataTableButton&&t.viewDataTableButton.setAttribute("aria-expanded","false")}),e.exporting&&this.addEvent(e,"afterPrint",function(){t.updateAllScreenReaderSections()}),this.announcer=new ep(e,"assertive")}initRegionsDefinitions(){let e=this,t=this.chart.options.accessibility;this.screenReaderSections={before:{element:null,buildContent:function(i){let s=t.screenReaderSection.beforeChartFormatter;return s?s(i):e.defaultBeforeChartFormatter(i)},insertIntoDOM:function(e,t){t.renderTo.insertBefore(e,t.renderTo.firstChild)},afterInserted:function(){void 0!==e.sonifyButtonId&&e.initSonifyButton(e.sonifyButtonId),void 0!==e.dataTableButtonId&&e.initDataTableButton(e.dataTableButtonId)}},after:{element:null,buildContent:function(i){let s=t.screenReaderSection.afterChartFormatter;return s?s(i):e.defaultAfterChartFormatter()},insertIntoDOM:function(e,t){t.renderTo.insertBefore(e,t.container.nextSibling)},afterInserted:function(){e.chart.accessibility&&t.keyboardNavigation.enabled&&e.chart.accessibility.keyboardNavigation.updateExitAnchor()}}}}onChartRender(){this.linkedDescriptionElement=this.getLinkedDescriptionElement(),this.setLinkedDescriptionAttrs(),this.updateAllScreenReaderSections()}updateAllScreenReaderSections(){let e=this;Object.keys(this.screenReaderSections).forEach(function(t){e.updateScreenReaderSection(t)})}getLinkedDescriptionElement(){let e=this.chart.options.accessibility.linkedDescription;if(!e)return;if("string"!=typeof e)return e;let t=eM(e,this.chart),i=ek.querySelectorAll(t);if(1===i.length)return i[0]}setLinkedDescriptionAttrs(){let e=this.linkedDescriptionElement;e&&(e.setAttribute("aria-hidden","true"),eS(e,"highcharts-linked-description"))}updateScreenReaderSection(e){let t=this.chart,i=this.screenReaderSections[e],s=i.buildContent(t),n=i.element=i.element||this.createElement("div"),r=n.firstChild||this.createElement("div");s?(this.setScreenReaderSectionAttribs(n,e),el().setElementHTML(r,s),n.appendChild(r),i.insertIntoDOM(n,t),t.styledMode?eS(r,"highcharts-visually-hidden"):eB(r),eC(t,r),i.afterInserted&&i.afterInserted()):(n.parentNode&&n.parentNode.removeChild(n),i.element=null)}setScreenReaderSectionAttribs(e,t){let i=this.chart,s=i.langFormat("accessibility.screenReaderSection."+t+"RegionLabel",{chart:i,chartTitle:eT(i)});eI(e,{id:`highcharts-screen-reader-region-${t}-${i.index}`,"aria-label":s||void 0}),e.style.position="relative",s&&e.setAttribute("role","all"===i.options.accessibility.landmarkVerbosity?"region":"group")}defaultBeforeChartFormatter(){let e=this.chart,t=e.options.accessibility.screenReaderSection.beforeChartFormat;if(!t)return"";let i=this.getAxesDescription(),s=e.sonify&&e.options.sonification&&e.options.sonification.enabled,n="highcharts-a11y-sonify-data-btn-"+e.index,r="hc-linkto-highcharts-data-table-"+e.index,o=ew(e),a=e.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:e}),l={headingTagName:eD(e.renderTo),chartTitle:eT(e),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:i.xAxis,yAxisDescription:i.yAxis,playAsSoundButton:s?this.getSonifyButtonText(n):"",viewTableButton:e.getCSV?this.getDataTableButtonText(r):"",annotationsTitle:o?a:"",annotationsList:o},h=F.i18nFormat(t,l,e);return this.dataTableButtonId=r,this.sonifyButtonId=n,eR(h)}defaultAfterChartFormatter(){let e=this.chart,t=e.options.accessibility.screenReaderSection.afterChartFormat;if(!t)return"";let i={endOfChartMarker:this.getEndOfChartMarkerText()};return eR(F.i18nFormat(t,i,e))}getLinkedDescription(){let e=this.linkedDescriptionElement;return eN(e&&e.innerHTML||"",this.chart.renderer.forExport)}getLongdescText(){let e=this.chart.options,t=e.caption,i=t&&t.text,s=this.getLinkedDescription();return e.accessibility.description||s||i||""}getTypeDescriptionText(){let e=this.chart;return e.types?e.options.accessibility.typeDescription||function(e,t){let i=t[0],s=e.series&&e.series[0]||{},n=e.mapView&&e.mapView.geoMap&&e.mapView.geoMap.title,r={numSeries:e.series.length,numPoints:s.points&&s.points.length,chart:e,mapTitle:n};return i?"map"===i||"tiledwebmap"===i?r.mapTitle?e.langFormat("accessibility.chartTypes.mapTypeDescription",r):e.langFormat("accessibility.chartTypes.unknownMap",r):e.types.length>1?e.langFormat("accessibility.chartTypes.combinationChart",r):function(e,t,i){let s=t[0],n=e.langFormat("accessibility.seriesTypeDescriptions."+s,i),r=e.series&&e.series.length<2?"Single":"Multiple";return(e.langFormat("accessibility.chartTypes."+s+r,i)||e.langFormat("accessibility.chartTypes.default"+r,i))+(n?" "+n:"")}(e,t,r):e.langFormat("accessibility.chartTypes.emptyChart",r)}(e,e.types):""}getDataTableButtonText(e){let t=this.chart;return'"}getSonifyButtonText(e){let t=this.chart;return t.options.sonification&&!1===t.options.sonification.enabled?"":'"}getSubtitleText(){let e=this.chart.options.subtitle;return eN(e&&e.text||"",this.chart.renderer.forExport)}getEndOfChartMarkerText(){let e=eP(`highcharts-end-of-chart-marker-${this.chart.index}`);if(e)return e.outerHTML;let t=this.chart,i=t.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:t});return'
    '+i+"
    "}onDataTableCreated(e){let t=this.chart;if(t.options.accessibility.enabled){this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true");let i=e.tree.attributes||{};i.tabindex=-1,i.summary=t.langFormat("accessibility.table.tableSummary",{chart:t}),e.tree.attributes=i}}focusDataTable(){let e=this.dataTableDiv,t=e&&e.getElementsByTagName("table")[0];t&&t.focus&&t.focus()}initSonifyButton(e){let t=this.sonifyButton=eP(e),i=this.chart,s=e=>{t&&(t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label","")),e.preventDefault(),e.stopPropagation();let s=i.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:i});this.announcer.announce(s),setTimeout(()=>{t&&(t.removeAttribute("aria-hidden"),t.removeAttribute("aria-label")),i.sonify&&i.sonify()},1e3)};t&&i&&(t.setAttribute("tabindex",-1),t.onclick=function(e){(i.options.accessibility&&i.options.accessibility.screenReaderSection.onPlayAsSoundClick||s).call(this,e,i)})}initDataTableButton(e){let t=this.viewDataTableButton=eP(e),i=this.chart,s=e.replace("hc-linkto-","");t&&(eI(t,{tabindex:-1,"aria-expanded":!!eP(s)}),t.onclick=i.options.accessibility.screenReaderSection.onViewDataTableClick||function(){i.viewData()})}getAxesDescription(){let e=this.chart,t=function(t,i){let s=e[t];return s.length>1||s[0]&&eF(s[0].options.accessibility&&s[0].options.accessibility.enabled,i)},i=!!e.types&&0>e.types.indexOf("map")&&0>e.types.indexOf("treemap")&&0>e.types.indexOf("tilemap"),s=!!e.hasCartesianSeries,n=t("xAxis",!e.angular&&s&&i),r=t("yAxis",s&&i),o={};return n&&(o.xAxis=this.getAxisDescriptionText("xAxis")),r&&(o.yAxis=this.getAxisDescriptionText("yAxis")),o}getAxisDescriptionText(e){let t=this.chart,i=t[e];return t.langFormat("accessibility.axis."+e+"Description"+(i.length>1?"Plural":"Singular"),{chart:t,names:i.map(function(e){return eE(e)}),ranges:i.map(function(e){return eA(e)}),numAxes:i.length})}destroy(){this.announcer&&this.announcer.destroy()}},{attr:eH}=w(),{getChartTitle:ez,unhideChartElementFromAT:eq}=K,{getFakeMouseEvent:eG}=S;function eK(e){return e.exportSVGElements&&e.exportSVGElements[0]}class eU extends Z{init(){let e=this.chart,t=this;this.addEvent(e,"exportMenuShown",function(){t.onMenuShown()}),this.addEvent(e,"exportMenuHidden",function(){t.onMenuHidden()}),this.createProxyGroup()}onMenuHidden(){let e=this.chart.exportContextMenu;e&&e.setAttribute("aria-hidden","true"),this.setExportButtonExpandedState("false")}onMenuShown(){let e=this.chart,t=e.exportContextMenu;t&&(this.addAccessibleContextMenuAttribs(),eq(e,t)),this.setExportButtonExpandedState("true")}setExportButtonExpandedState(e){this.exportButtonProxy&&this.exportButtonProxy.innerElement.setAttribute("aria-expanded",e)}onChartRender(){let e=this.chart,t=e.focusElement,i=e.accessibility;this.proxyProvider.clearGroup("chartMenu"),this.proxyMenuButton(),this.exportButtonProxy&&t&&t===e.exportingGroup&&(t.focusBorder?e.setFocusToElement(t,this.exportButtonProxy.innerElement):i&&i.keyboardNavigation.tabindexContainer.focus())}proxyMenuButton(){let e=this.chart,t=this.proxyProvider,i=eK(e);(function(e){let t=e.options.exporting,i=eK(e);return!!(t&&!1!==t.enabled&&t.accessibility&&t.accessibility.enabled&&i&&i.element)})(e)&&i&&(this.exportButtonProxy=t.addProxyElement("chartMenu",{click:i},"button",{"aria-label":e.langFormat("accessibility.exporting.menuButtonLabel",{chart:e,chartTitle:ez(e)}),"aria-expanded":!1,title:e.options.lang.contextButtonTitle||null}))}createProxyGroup(){this.chart&&this.proxyProvider&&this.proxyProvider.addGroup("chartMenu")}addAccessibleContextMenuAttribs(){let e=this.chart,t=e.exportDivElements;if(t&&t.length){t.forEach(e=>{e&&("LI"!==e.tagName||e.children&&e.children.length?e.setAttribute("aria-hidden","true"):e.setAttribute("tabindex",-1))});let i=t[0]&&t[0].parentNode;i&&eH(i,{"aria-hidden":void 0,"aria-label":e.langFormat("accessibility.exporting.chartMenuLabel",{chart:e}),role:"list"})}}getKeyboardNavigation(){let e=this.keyCodes,t=this.chart,i=this;return new Q(t,{keyCodeMap:[[[e.left,e.up],function(){return i.onKbdPrevious(this)}],[[e.right,e.down],function(){return i.onKbdNext(this)}],[[e.enter,e.space],function(){return i.onKbdClick(this)}]],validate:function(){return!!t.exporting&&!1!==t.options.exporting.enabled&&!1!==t.options.exporting.accessibility.enabled},init:function(){let e=i.exportButtonProxy,s=i.chart.exportingGroup;e&&s&&t.setFocusToElement(s,e.innerElement)},terminate:function(){t.hideExportMenu()}})}onKbdPrevious(e){let t=this.chart,i=t.options.accessibility,s=e.response,n=t.highlightedExportItemIx||0;for(;n--;)if(t.highlightExportItem(n))return s.success;return i.keyboardNavigation.wrapAround?(t.highlightLastExportItem(),s.success):s.prev}onKbdNext(e){let t=this.chart,i=t.options.accessibility,s=e.response;for(let e=(t.highlightedExportItemIx||0)+1;e{e&&"highcharts-menu-item"===e.className&&e.onmouseout&&e.onmouseout(eG("mouseout"))}),this.highlightedExportItemIx=0,this.exportContextMenu.hideMenu(),this.container.focus())}function s(e){let t=this.exportDivElements&&this.exportDivElements[e],i=this.exportDivElements&&this.exportDivElements[this.highlightedExportItemIx];if(t&&"LI"===t.tagName&&!(t.children&&t.children.length)){let s=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;return t.focus&&s&&t.focus(),i&&i.onmouseout&&i.onmouseout(eG("mouseout")),t.onmouseover&&t.onmouseover(eG("mouseover")),this.highlightedExportItemIx=e,!0}return!1}function n(){if(this.exportDivElements){let e=this.exportDivElements.length;for(;e--;)if(this.highlightExportItem(e))return!0}return!1}e.compose=function(e){let r=e.prototype;r.hideExportMenu||(r.hideExportMenu=i,r.highlightExportItem=s,r.highlightLastExportItem=n,r.showExportMenu=t)}}(eU||(eU={}));let eV=eU,{doc:eW,win:eX}=w(),{addEvent:eY,defined:ej,fireEvent:e_}=w(),{getElement:eZ,simulatedEventTarget:e$}=S;class eQ{constructor(e,t){this.currentModuleIx=NaN,this.modules=[],this.init(e,t)}init(e,t){let i=this.eventProvider=new Y;this.chart=e,this.components=t,this.modules=[],this.currentModuleIx=0,this.update(),i.addEvent(this.tabindexContainer,"keydown",e=>this.onKeydown(e)),i.addEvent(this.tabindexContainer,"focus",e=>this.onFocus(e)),["mouseup","touchend"].forEach(e=>i.addEvent(eW,e,e=>this.onMouseUp(e))),["mousedown","touchstart"].forEach(t=>i.addEvent(e.renderTo,t,()=>{this.isClickingChart=!0}))}update(e){let t=this.chart.options.accessibility,i=t&&t.keyboardNavigation,s=this.components;this.updateContainerTabindex(),i&&i.enabled&&e&&e.length?(this.modules=e.reduce(function(e,t){let i=s[t].getKeyboardNavigation();return e.concat(i)},[]),this.updateExitAnchor()):(this.modules=[],this.currentModuleIx=0,this.removeExitAnchor())}updateExitAnchor(){let e=eZ(`highcharts-end-of-chart-marker-${this.chart.index}`);this.removeExitAnchor(),e?(this.makeElementAnExitAnchor(e),this.exitAnchor=e):this.createExitAnchor()}move(e){let t=this.modules&&this.modules[this.currentModuleIx];t&&t.terminate&&t.terminate(e),this.chart.focusElement&&this.chart.focusElement.removeFocusBorder(),this.currentModuleIx+=e;let i=this.modules&&this.modules[this.currentModuleIx];if(i){if(i.validate&&!i.validate())return this.move(e);if(i.init)return i.init(e),!0}return this.currentModuleIx=0,this.exiting=!0,e>0?this.exitAnchor&&this.exitAnchor.focus():this.tabindexContainer.focus(),!1}onFocus(e){let t=this.chart,i=e.relatedTarget&&t.container.contains(e.relatedTarget),s=t.options.accessibility,n=s&&s.keyboardNavigation;if(n&&n.enabled&&!this.exiting&&!this.tabbingInBackwards&&!this.isClickingChart&&!i){let e=this.getFirstValidModuleIx();null!==e&&(this.currentModuleIx=e,this.modules[e].init(1))}this.keyboardReset=!1,this.exiting=!1}onMouseUp(e){if(delete this.isClickingChart,!this.keyboardReset&&e.relatedTarget!==e$){let t=this.chart;if(!e.target||!t.container.contains(e.target)){let e=this.modules&&this.modules[this.currentModuleIx||0];e&&e.terminate&&e.terminate(),this.currentModuleIx=0}t.focusElement&&(t.focusElement.removeFocusBorder(),delete t.focusElement),this.keyboardReset=!0}}onKeydown(e){let t;let i=e||eX.event,s=this.modules&&this.modules.length&&this.modules[this.currentModuleIx],n=i.target;if((!n||"INPUT"!==n.nodeName||n.classList.contains("highcharts-a11y-proxy-element"))&&(this.keyboardReset=!1,this.exiting=!1,s)){let e=s.run(i);e===s.response.success?t=!0:e===s.response.prev?t=this.move(-1):e===s.response.next&&(t=this.move(1)),t&&(i.preventDefault(),i.stopPropagation())}}updateContainerTabindex(){let e;let t=this.chart.options.accessibility,i=t&&t.keyboardNavigation,s=!(i&&!1===i.enabled),n=this.chart,r=n.container;n.renderTo.hasAttribute("tabindex")?(r.removeAttribute("tabindex"),e=n.renderTo):e=r,this.tabindexContainer=e;let o=e.getAttribute("tabindex");s&&!o?e.setAttribute("tabindex","0"):s||n.container.removeAttribute("tabindex")}createExitAnchor(){let e=this.chart,t=this.exitAnchor=eW.createElement("div");e.renderTo.appendChild(t),this.makeElementAnExitAnchor(t)}makeElementAnExitAnchor(e){let t=this.tabindexContainer.getAttribute("tabindex")||0;e.setAttribute("class","highcharts-exit-anchor"),e.setAttribute("tabindex",t),e.setAttribute("aria-hidden",!1),this.addExitAnchorEventsToEl(e)}removeExitAnchor(){if(this.exitAnchor){let e=this.eventProvider.eventRemovers.find(e=>e.element===this.exitAnchor);e&&ej(e.remover)&&this.eventProvider.removeEvent(e.remover),this.exitAnchor.parentNode&&this.exitAnchor.parentNode.removeChild(this.exitAnchor),delete this.exitAnchor}}addExitAnchorEventsToEl(e){let t=this.chart,i=this;this.eventProvider.addEvent(e,"focus",function(e){let s=e||eX.event,n=!(s.relatedTarget&&t.container.contains(s.relatedTarget)||i.exiting);if(t.focusElement&&delete t.focusElement,n){if(i.tabbingInBackwards=!0,i.tabindexContainer.focus(),delete i.tabbingInBackwards,s.preventDefault(),i.modules&&i.modules.length){i.currentModuleIx=i.modules.length-1;let e=i.modules[i.currentModuleIx];e&&e.validate&&!e.validate()?i.move(-1):e&&e.init(-1)}}else i.exiting=!1})}getFirstValidModuleIx(){let e=this.modules.length;for(let t=0;t{e&&e.dismissPopupContent&&e.dismissPopupContent()})}e.compose=function(e){eV.compose(e);let s=e.prototype;return s.dismissPopupContent||(s.dismissPopupContent=t,eY(eW,"keydown",i)),e}}(eQ||(eQ={}));let eJ=eQ;var e0=x(632),e1=x.n(e0);let{animObject:e2}=w(),{doc:e3}=w(),{addEvent:e5,fireEvent:e4,isNumber:e6,pick:e9,syncTimeout:e8}=w(),{getChartTitle:e7}=K,{stripHTMLTagsFromString:te,addClass:tt,removeClass:ti}=S;function ts(e){let t=e.legend&&e.legend.allItems,i=e.options.legend.accessibility||{},s=e.colorAxis&&e.colorAxis.some(e=>!e.dataClasses||!e.dataClasses.length);return!!(t&&t.length&&!s&&!1!==i.enabled)}function tn(e,t){let i=t.legendItem||{};for(let s of(t.setState(e?"hover":"",!0),["group","label","symbol"])){let t=i[s],n=t&&t.element||t;n&&e4(n,e?"mouseover":"mouseout")}}class tr extends Z{constructor(){super(...arguments),this.highlightedLegendItemIx=NaN,this.proxyGroup=null}init(){let e=this;this.recreateProxies(),this.addEvent(e1(),"afterScroll",function(){this.chart===e.chart&&(e.proxyProvider.updateGroupProxyElementPositions("legend"),e.updateLegendItemProxyVisibility(),e.highlightedLegendItemIx>-1&&this.chart.highlightLegendItem(e.highlightedLegendItemIx))}),this.addEvent(e1(),"afterPositionItem",function(t){this.chart===e.chart&&this.chart.renderer&&e.updateProxyPositionForItem(t.item)}),this.addEvent(e1(),"afterRender",function(){this.chart===e.chart&&this.chart.renderer&&e.recreateProxies()&&e8(()=>e.proxyProvider.updateGroupProxyElementPositions("legend"),e2(e9(this.chart.renderer.globalAnimation,!0)).duration)})}updateLegendItemProxyVisibility(){let e;let t=this.chart,i=t.legend,s=i.allItems||[],n=i.currentPage||1,r=i.clipHeight||0;s.forEach(s=>{if(s.a11yProxyElement){let o=i.pages&&i.pages.length,a=s.a11yProxyElement.element,l=!1;if(e=s.legendItem||{},o){let t=e.pageIx||0;l=(e.y||0)+(e.label?Math.round(e.label.getBBox().height):0)-i.pages[t]>r||t!==n-1}l?t.styledMode?tt(a,"highcharts-a11y-invisible"):a.style.visibility="hidden":(ti(a,"highcharts-a11y-invisible"),a.style.visibility="")}})}onChartRender(){ts(this.chart)||this.removeProxies()}highlightAdjacentLegendPage(e){let t=this.chart,i=t.legend,s=(i.currentPage||1)+e,n=i.pages||[];if(s>0&&s<=n.length){let e=0;for(let n of i.allItems)((n.legendItem||{}).pageIx||0)+1===s&&t.highlightLegendItem(e)&&(this.highlightedLegendItemIx=e),++e}}updateProxyPositionForItem(e){e.a11yProxyElement&&e.a11yProxyElement.refreshPosition()}recreateProxies(){let e=e3.activeElement,t=this.proxyGroup,i=e&&t&&t.contains(e);return this.removeProxies(),!!ts(this.chart)&&(this.addLegendProxyGroup(),this.proxyLegendItems(),this.updateLegendItemProxyVisibility(),this.updateLegendTitle(),i&&this.chart.highlightLegendItem(this.highlightedLegendItemIx),!0)}removeProxies(){this.proxyProvider.removeGroup("legend")}updateLegendTitle(){let e=this.chart,t=te((e.legend&&e.legend.options.title&&e.legend.options.title.text||"").replace(/
    /g," "),e.renderer.forExport),i=e.langFormat("accessibility.legend.legendLabel"+(t?"":"NoTitle"),{chart:e,legendTitle:t,chartTitle:e7(e)});this.proxyProvider.updateGroupAttrs("legend",{"aria-label":i})}addLegendProxyGroup(){let e="all"===this.chart.options.accessibility.landmarkVerbosity?"region":null;this.proxyGroup=this.proxyProvider.addGroup("legend","ul",{"aria-label":"_placeholder_",role:e})}proxyLegendItems(){let e;let t=this;((this.chart.legend||{}).allItems||[]).forEach(i=>{(e=i.legendItem||{}).label&&e.label.element&&t.proxyLegendItem(i)})}proxyLegendItem(e){let t=e.legendItem||{};if(!t.label||!t.group)return;let i=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:te(e.name,this.chart.renderer.forExport),item:e}),s={tabindex:-1,"aria-pressed":e.visible,"aria-label":i},n=t.group.div?t.label:t.group;e.a11yProxyElement=this.proxyProvider.addProxyElement("legend",{click:t.label,visual:n.element},"button",s)}getKeyboardNavigation(){let e=this.keyCodes,t=this,i=this.chart;return new Q(i,{keyCodeMap:[[[e.left,e.right,e.up,e.down],function(e){return t.onKbdArrowKey(this,e)}],[[e.enter,e.space],function(){return t.onKbdClick(this)}],[[e.pageDown,e.pageUp],function(i){let s=i===e.pageDown?1:-1;return t.highlightAdjacentLegendPage(s),this.response.success}]],validate:function(){return t.shouldHaveLegendNavigation()},init:function(){i.highlightLegendItem(0),t.highlightedLegendItemIx=0},terminate:function(){t.highlightedLegendItemIx=-1,i.legend.allItems.forEach(e=>tn(!1,e))}})}onKbdArrowKey(e,t){let{keyCodes:{left:i,up:s},highlightedLegendItemIx:n,chart:r}=this,o=r.legend.allItems.length,a=r.options.accessibility.keyboardNavigation.wrapAround,l=t===i||t===s?-1:1;return r.highlightLegendItem(n+l)?this.highlightedLegendItemIx+=l:a&&o>1&&(this.highlightedLegendItemIx=l>0?0:o-1,r.highlightLegendItem(this.highlightedLegendItemIx)),e.response.success}onKbdClick(e){let t=this.chart.legend.allItems[this.highlightedLegendItemIx];return t&&t.a11yProxyElement&&t.a11yProxyElement.click(),e.response.success}shouldHaveLegendNavigation(){if(!ts(this.chart))return!1;let e=this.chart,t=(e.options.legend||{}).accessibility||{};return!!(e.legend.display&&t.keyboardNavigation&&t.keyboardNavigation.enabled)}destroy(){this.removeProxies()}}!function(e){function t(e){let t=this.legend.allItems,i=this.accessibility&&this.accessibility.components.legend.highlightedLegendItemIx,s=t[e],n=s?.legendItem||{};if(s){e6(i)&&t[i]&&tn(!1,t[i]),function(e,t){let i=(e.allItems[t].legendItem||{}).pageIx,s=e.currentPage;void 0!==i&&i+1!==s&&e.scroll(1+i-s)}(this.legend,e);let r=n.label,o=s.a11yProxyElement&&s.a11yProxyElement.innerElement;return r&&r.element&&o&&this.setFocusToElement(r,o),tn(!0,s),!0}return!1}function i(e){let t=this.chart.options.accessibility,i=e.item;t.enabled&&i&&i.a11yProxyElement&&i.a11yProxyElement.innerElement.setAttribute("aria-pressed",e.visible?"true":"false")}e.compose=function(e,s){let n=e.prototype;n.highlightLegendItem||(n.highlightLegendItem=t,e5(s,"afterColorizeItem",i))}}(tr||(tr={}));let to=tr;var ta=x(532),tl=x.n(ta);let{isTouchDevice:th}=w(),{addEvent:tc,merge:td,pick:tu}=w(),tp=[];function tg(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function tm(){let e,t,i;let s=this.legend,n=this.navigator;if(n){e=s&&s.options,t=n.xAxis,i=n.yAxis;let{scrollbarHeight:r,scrollButtonSize:o}=n;this.inverted?(n.left=n.opposite?this.chartWidth-r-n.height:this.spacing[3]+r,n.top=this.plotTop+o):(n.left=tu(t.left,this.plotLeft+o),n.top=n.navigatorOptions.top||this.chartHeight-n.height-r-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&"proximate"!==e.layout&&e.enabled&&!e.floating?s.legendHeight+tu(e.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),t&&i&&(this.inverted?t.options.left=i.options.left=n.left:t.options.top=i.options.top=n.top,t.setAxisSize(),i.setAxisSize())}}function tb(e){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this),tu(e.redraw,!0)&&this.redraw(e.animation))}function tf(){let e=this.options;(e.navigator.enabled||e.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this))}function tx(){let e=this.options,t=e.navigator,i=e.rangeSelector;if((t&&t.enabled||i&&i.enabled)&&(!th&&"x"===this.zooming.type||th&&"x"===this.zooming.pinchType))return!1}function ty(e){let t=e.navigator;if(t&&e.xAxis[0]){let i=e.xAxis[0].getExtremes();t.render(i.min,i.max)}}function tv(e){let t=e.options.navigator||{},i=e.options.scrollbar||{};!this.navigator&&!this.scroller&&(t.enabled||i.enabled)&&(td(!0,this.options.navigator,t),td(!0,this.options.scrollbar,i),delete e.options.navigator,delete e.options.scrollbar)}let tw={compose:function(e,t){if(w().pushUnique(tp,e)){let i=e.prototype;d=t,i.callbacks.push(ty),tc(e,"afterAddSeries",tg),tc(e,"afterSetChartSize",tm),tc(e,"afterUpdate",tb),tc(e,"beforeRender",tf),tc(e,"beforeShowResetZoom",tx),tc(e,"update",tv)}}},{isTouchDevice:tE}=w(),{addEvent:tA,correctFloat:tT,defined:tC,isNumber:tM,pick:tk}=w();function tS(){this.navigatorAxis||(this.navigatorAxis=new tD(this))}function tP(e){let t;let i=this.chart,s=i.options,n=s.navigator,r=this.navigatorAxis,o=i.zooming.pinchType,a=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(n?.enabled||a?.enabled)){if("y"===l&&"zoom"===e.trigger)t=!1;else if(("zoom"===e.trigger&&"xy"===l||tE&&"xy"===o)&&this.options.range){let t=r.previousZoom;tC(e.min)?r.previousZoom=[this.min,this.max]:t&&(e.min=t[0],e.max=t[1],r.previousZoom=void 0)}}void 0!==t&&e.preventDefault()}class tD{static compose(e){e.keepProps.includes("navigatorAxis")||(e.keepProps.push("navigatorAxis"),tA(e,"init",tS),tA(e,"setExtremes",tP))}constructor(e){this.axis=e}destroy(){this.axis=void 0}toFixedRange(e,t,i,s){let n=this.axis,r=(n.pointRange||0)/2,o=tk(i,n.translate(e,!0,!n.horiz)),a=tk(s,n.translate(t,!0,!n.horiz));return tC(i)||(o=tT(o+r)),tC(s)||(a=tT(a-r)),tM(o)&&tM(a)||(o=a=void 0),{min:o,max:a}}}var tN=x(620),tB=x.n(tN),tI=x(512),tF=x.n(tI);let{parse:tO}=tB(),{seriesTypes:tR}=tF(),tL={height:40,margin:25,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:tO("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===tR.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}},{defined:tH,isNumber:tz,pick:tq}=w(),tG={rect:function(e,t,i,s,n){return n&&n.r?function(e,t,i,s,n){let r=n?.r||0;return[["M",e+r,t],["L",e+i-r,t],["A",r,r,0,0,1,e+i,t+r],["L",e+i,t+s-r],["A",r,r,0,0,1,e+i-r,t+s],["L",e+r,t+s],["A",r,r,0,0,1,e,t+s-r],["L",e,t+r],["A",r,r,0,0,1,e+r,t],["Z"]]}(e,t,i,s,n):[["M",e,t],["L",e+i,t],["L",e+i,t+s],["L",e,t+s],["Z"]]}},{relativeLength:tK}=w(),tU={"navigator-handle":function(e,t,i,s,n={}){let r=n.width?n.width/2:i,o=tK(n.borderRadius||0,Math.min(2*r,s));return[["M",-1.5,(s=n.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...tG.rect(-r-1,.5,2*r+1,s,{r:o})]}};var tV=x(608),tW=x.n(tV);let{defined:tX}=w(),{setOptions:tY}=w(),{composed:tj}=w(),{getRendererType:t_}=tW(),{setFixedRange:tZ}={setFixedRange:function(e){let t=this.xAxis[0];tX(t.dataMax)&&tX(t.dataMin)&&e?this.fixedRange=Math.min(e,t.dataMax-t.dataMin):this.fixedRange=e}},{addEvent:t$,extend:tQ,pushUnique:tJ}=w();function t0(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let t1={compose:function(e,t,i){tD.compose(t),tJ(tj,"Navigator")&&(e.prototype.setFixedRange=tZ,tQ(t_().prototype.symbols,tU),t$(i,"afterUpdate",t0),tY({navigator:tL}))}},{composed:t2}=w(),{addEvent:t3,defined:t5,pick:t4,pushUnique:t6}=w();!function(e){let t;function i(e){let t=t4(e.options&&e.options.min,e.min),i=t4(e.options&&e.options.max,e.max);return{axisMin:t,axisMax:i,scrollMin:t5(e.dataMin)?Math.min(t,e.min,e.dataMin,t4(e.threshold,1/0)):t,scrollMax:t5(e.dataMax)?Math.max(i,e.max,e.dataMax,t4(e.threshold,-1/0)):i}}function s(){let e=this.scrollbar,t=e&&!e.options.opposite,i=this.horiz?2:t?3:1;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=e.size+(e.options.margin||0))}function n(){let e=this;e.options&&e.options.scrollbar&&e.options.scrollbar.enabled&&(e.options.scrollbar.vertical=!e.horiz,e.options.startOnTick=e.options.endOnTick=!1,e.scrollbar=new t(e.chart.renderer,e.options.scrollbar,e.chart),t3(e.scrollbar,"changed",function(t){let s,n;let{axisMin:r,axisMax:o,scrollMin:a,scrollMax:l}=i(e),h=l-a;if(t5(r)&&t5(o)){if(e.horiz&&!e.reversed||!e.horiz&&e.reversed?(s=a+h*this.to,n=a+h*this.from):(s=a+h*(1-this.from),n=a+h*(1-this.to)),this.shouldUpdateExtremes(t.DOMType)){let i="mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&void 0;e.setExtremes(n,s,!0,i,t)}else this.setRange(this.from,this.to)}}))}function r(){let e,t,s;let{scrollMin:n,scrollMax:r}=i(this),o=this.scrollbar,a=this.axisTitleMargin+(this.titleOffset||0),l=this.chart.scrollbarsOffsets,h=this.options.margin||0;if(o&&l){if(this.horiz)this.opposite||(l[1]+=a),o.position(this.left,this.top+this.height+2+l[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(l[1]+=h),e=1;else{let t;this.opposite&&(l[0]+=a),t=o.options.opposite?this.left+this.width+2+l[0]-(this.opposite?0:h):this.opposite?0:h,o.position(t,this.top,this.width,this.height),this.opposite&&(l[0]+=h),e=0}if(l[e]+=o.size+(o.options.margin||0),isNaN(n)||isNaN(r)||!t5(this.min)||!t5(this.max)||this.dataMin===this.dataMax)o.setRange(0,1);else if(this.min===this.max){let e=this.pointRange/(this.dataMax+1);t=e*this.min,s=e*(this.max+1),o.setRange(t,s)}else t=(this.min-n)/(r-n),s=(this.max-n)/(r-n),this.horiz&&!this.reversed||!this.horiz&&this.reversed?o.setRange(t,s):o.setRange(1-s,1-t)}}e.compose=function(e,i){t6(t2,"Axis.Scrollbar")&&(t=i,t3(e,"afterGetOffset",s),t3(e,"afterInit",n),t3(e,"afterRender",r))}}(g||(g={}));let t9=g,t8={height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1},{defaultOptions:t7}=w(),{addEvent:ie,correctFloat:it,crisp:ii,defined:is,destroyObjectProperties:ir,fireEvent:io,merge:ia,pick:il,removeEvent:ih}=w();class ic{static compose(e){t9.compose(e,ic)}static swapXY(e,t){return t&&e.forEach(e=>{let t;let i=e.length;for(let s=0;sthis.calculatedWidth?t.minWidth:0;return{chartX:(e.chartX-this.x-this.xOffset)/(this.barWidth-i),chartY:(e.chartY-this.y-this.yOffset)/(this.barWidth-i)}}destroy(){let e=this,t=e.chart.scroller;e.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(t){e[t]&&e[t].destroy&&(e[t]=e[t].destroy())}),t&&e===t.scrollbar&&(t.scrollbar=null,ir(t.scrollbarButtons))}drawScrollbarButton(e){let t=this.renderer,i=this.scrollbarButtons,s=this.options,n=this.size,r=t.g().add(this.group);if(i.push(r),s.buttonsEnabled){let o=t.rect().addClass("highcharts-scrollbar-button").add(r);this.chart.styledMode||o.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),o.attr(o.crisp({x:-.5,y:-.5,width:n,height:n,r:s.buttonBorderRadius},o.strokeWidth()));let a=t.path(ic.swapXY([["M",n/2+(e?-1:1),n/2-3],["L",n/2+(e?-1:1),n/2+3],["L",n/2+(e?2:-2),n/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[e]);this.chart.styledMode||a.attr({fill:s.buttonArrowColor})}}init(e,t,i){this.scrollbarButtons=[],this.renderer=e,this.userOptions=t,this.options=ia(t8,t7.scrollbar,t),this.options.margin=il(this.options.margin,10),this.chart=i,this.size=il(this.options.size,this.options.height),t.enabled&&(this.render(),this.addEvents())}mouseDownHandler(e){let t=this.chart.pointer?.normalize(e)||e,i=this.cursorToScrollbarPosition(t);this.chartX=i.chartX,this.chartY=i.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(e){let t;let i=this.chart.pointer?.normalize(e)||e,s=this.options.vertical?"chartY":"chartX",n=this.initPositions||[];this.grabbedCenter&&(!e.touches||0!==e.touches[0][s])&&(t=this.cursorToScrollbarPosition(i)[s]-this[s],this.hasDragged=!0,this.updatePosition(n[0]+t,n[1]+t),this.hasDragged&&io(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}))}mouseUpHandler(e){this.hasDragged&&io(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(e,t,i,s){let{buttonsEnabled:n,margin:r=0,vertical:o}=this.options,a=this.rendered?"animate":"attr",l=s,h=0;this.group.show(),this.x=e,this.y=t+this.trackBorderWidth,this.width=i,this.height=s,this.xOffset=l,this.yOffset=h,o?(this.width=this.yOffset=i=h=this.size,this.xOffset=l=0,this.yOffset=h=n?this.size:0,this.barWidth=s-(n?2*i:0),this.x=e+=r):(this.height=s=this.size,this.xOffset=l=n?this.size:0,this.barWidth=i-(n?2*s:0),this.y=this.y+r),this.group[a]({translateX:e,translateY:this.y}),this.track[a]({width:i,height:s}),this.scrollbarButtons[1][a]({translateX:o?0:i-l,translateY:o?s-h:0})}removeEvents(){this._events.forEach(function(e){ih.apply(null,e)}),this._events.length=0}render(){let e=this.renderer,t=this.options,i=this.size,s=this.chart.styledMode,n=e.g("scrollbar").attr({zIndex:t.zIndex}).hide().add();this.group=n,this.track=e.rect().addClass("highcharts-scrollbar-track").attr({r:t.trackBorderRadius||0,height:i,width:i}).add(n),s||this.track.attr({fill:t.trackBackgroundColor,stroke:t.trackBorderColor,"stroke-width":t.trackBorderWidth});let r=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-ii(0,r),y:-ii(0,r)}),this.scrollbarGroup=e.g().add(n),this.scrollbar=e.rect().addClass("highcharts-scrollbar-thumb").attr({height:i-r,width:i-r,r:t.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=e.path(ic.swapXY([["M",-3,i/4],["L",-3,2*i/3],["M",0,i/4],["L",0,2*i/3],["M",3,i/4],["L",3,2*i/3]],t.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:t.barBackgroundColor,stroke:t.barBorderColor,"stroke-width":t.barBorderWidth}),this.scrollbarRifles.attr({stroke:t.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-ii(0,this.scrollbarStrokeWidth),-ii(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(e,t){let i,s;let n=this.options,r=n.vertical,o=n.minWidth,a=this.barWidth,l=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!is(a))return;let h=a*Math.min(t,1);i=Math.ceil(a*(e=Math.max(e,0))),this.calculatedWidth=s=it(h-i),s=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(e){return il(this.options.liveRedraw,w().svg&&!w().isTouchDevice&&!this.chart.boosted)||"mouseup"===e||"touchend"===e||!is(e)}trackClick(e){let t=this.chart.pointer?.normalize(e)||e,i=this.to-this.from,s=this.y+this.scrollbarTop,n=this.x+this.scrollbarLeft;this.options.vertical&&t.chartY>s||!this.options.vertical&&t.chartX>n?this.updatePosition(this.from+i,this.to+i):this.updatePosition(this.from-i,this.to-i),io(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:e})}update(e){this.destroy(),this.init(this.chart.renderer,ia(!0,this.options,e),this.chart)}updatePosition(e,t){t>1&&(e=it(1-it(t-e)),t=1),e<0&&(t=it(t-e),e=0),this.from=e,this.to=t}}ic.defaultOptions=t8,t7.scrollbar=ia(!0,ic.defaultOptions,t7.scrollbar);var id=x(540),iu=x.n(id);let{defaultOptions:ip}=w(),{isTouchDevice:ig}=w(),{prototype:{symbols:im}}=iu(),{addEvent:ib,clamp:ix,correctFloat:iy,defined:iv,destroyObjectProperties:iw,erase:iE,extend:iA,find:iT,fireEvent:iC,isArray:iM,isNumber:ik,merge:iS,pick:iP,removeEvent:iD,splat:iN}=w();function iB(e,...t){let i=[].filter.call(t,ik);if(i.length)return Math[e].apply(0,i)}class iI{static compose(e,t,i){tw.compose(e,iI),t1.compose(e,t,i)}constructor(e){this.isDirty=!1,this.scrollbarHeight=0,this.init(e)}drawHandle(e,t,i,s){let n=this.navigatorOptions.handles.height;this.handles[t][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(e,10)+.5-n)}:{translateX:Math.round(this.left+parseInt(e,10)),translateY:Math.round(this.top+this.height/2-n/2-1)})}drawOutline(e,t,i,s){let n=this.navigatorOptions.maskInside,r=this.outline.strokeWidth(),o=r/2,a=r%2/2,l=this.scrollButtonSize,h=this.size,c=this.top,d=this.height,u=c-o,p=c+d,g=this.left,m,b;i?(m=c+t+a,t=c+e+a,b=[["M",g+d,c-l-a],["L",g+d,m],["L",g,m],["M",g,t],["L",g+d,t],["L",g+d,c+h+l]],n&&b.push(["M",g+d,m-o],["L",g+d,t+o])):(g-=l,e+=g+l-a,t+=g+l-a,b=[["M",g,u],["L",e,u],["L",e,p],["M",t,p],["L",t,u],["L",g+h+2*l,u]],n&&b.push(["M",e-o,u],["L",t+o,u])),this.outline[s]({d:b})}drawMasks(e,t,i,s){let n,r,o,a;let l=this.left,h=this.top,c=this.height;i?(o=[l,l,l],a=[h,h+e,h+t],r=[c,c,c],n=[e,t-e,this.size-t]):(o=[l,l+e,l+t],a=[h,h,h],r=[e,t-e,this.size-t],n=[c,c,c]),this.shades.forEach((e,t)=>{e[s]({x:o[t],y:a[t],width:r[t],height:n[t]})})}renderElements(){let e=this,t=e.navigatorOptions,i=t.maskInside,s=e.chart,n=s.inverted,r=s.renderer,o={cursor:n?"ns-resize":"ew-resize"},a=e.navigatorGroup??(e.navigatorGroup=r.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!i,i,!i].forEach((i,n)=>{let l=e.shades[n]??(e.shades[n]=r.rect().addClass("highcharts-navigator-mask"+(1===n?"-inside":"-outside")).add(a));s.styledMode||(l.attr({fill:i?t.maskFill:"rgba(0,0,0,0)"}),1===n&&l.css(o))}),e.outline||(e.outline=r.path().addClass("highcharts-navigator-outline").add(a)),s.styledMode||e.outline.attr({"stroke-width":t.outlineWidth,stroke:t.outlineColor}),t.handles?.enabled){let i=t.handles,{height:n,width:l}=i;[0,1].forEach(t=>{let h=i.symbols[t];if(e.handles[t]&&e.handles[t].symbolUrl===h){if(!e.handles[t].isImg&&e.handles[t].symbolName!==h){let i=im[h].call(im,-l/2-1,0,l,n);e.handles[t].attr({d:i}),e.handles[t].symbolName=h}}else e.handles[t]?.destroy(),e.handles[t]=r.symbol(h,-l/2-1,0,l,n,i),e.handles[t].attr({zIndex:7-t}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][t]).add(a),e.addMouseEvents();s.inverted&&e.handles[t].attr({rotation:90,rotationOriginX:Math.floor(-l/2),rotationOriginY:(n+l)/2}),s.styledMode||e.handles[t].attr({fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.lineWidth,width:i.width,height:i.height,x:-l/2-1,y:0}).css(o)})}}update(e,t=!1){let i=this.chart,s=i.options.chart.inverted!==i.scrollbar?.options.vertical;if(iS(!0,i.options.navigator,e),this.navigatorOptions=i.options.navigator||{},this.setOpposite(),iv(e.enabled)||s)return this.destroy(),this.navigatorEnabled=e.enabled||this.navigatorEnabled,this.init(i);if(this.navigatorEnabled&&(this.isDirty=!0,!1===e.adaptToUpdatedData&&this.baseSeries.forEach(e=>{iD(e,"updatedData",this.updatedDataHandler)},this),e.adaptToUpdatedData&&this.baseSeries.forEach(e=>{e.eventsToUnbind.push(ib(e,"updatedData",this.updatedDataHandler))},this),(e.series||e.baseSeries)&&this.setBaseSeries(void 0,!1),e.height||e.xAxis||e.yAxis)){this.height=e.height??this.height;let t=this.getXAxisOffsets();this.xAxis.update({...e.xAxis,offsets:t,[i.inverted?"width":"height"]:this.height,[i.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...e.yAxis,[i.inverted?"width":"height"]:this.height},!1)}t&&i.redraw()}render(e,t,i,s){let n=this.chart,r=this.xAxis,o=r.pointRange||0,a=r.navigatorAxis.fake?n.xAxis[0]:r,l=this.navigatorEnabled,h=this.rendered,c=n.inverted,d=n.xAxis[0].minRange,u=n.xAxis[0].options.maxRange,p=this.scrollButtonSize,g,m,b,f=this.scrollbarHeight,x,y;if(this.hasDragged&&!iv(i))return;if(this.isDirty&&this.renderElements(),e=iy(e-o/2),t=iy(t+o/2),!ik(e)||!ik(t)){if(!h)return;i=0,s=iP(r.width,a.width)}this.left=iP(r.left,n.plotLeft+p+(c?n.plotWidth:0));let v=this.size=x=iP(r.len,(c?n.plotHeight:n.plotWidth)-2*p);g=c?f:x+2*p,i=iP(i,r.toPixels(e,!0)),s=iP(s,r.toPixels(t,!0)),ik(i)&&Math.abs(i)!==1/0||(i=0,s=g);let w=r.toValue(i,!0),E=r.toValue(s,!0),A=Math.abs(iy(E-w));Au&&(this.grabbedLeft?i=r.toPixels(E-u-o,!0):this.grabbedRight&&(s=r.toPixels(w+u+o,!0))),this.zoomedMax=ix(Math.max(i,s),0,v),this.zoomedMin=ix(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(i,s),0,v),this.range=this.zoomedMax-this.zoomedMin,v=Math.round(this.zoomedMax);let T=Math.round(this.zoomedMin);l&&(this.navigatorGroup.attr({visibility:"inherit"}),y=h&&!this.hasDragged?"animate":"attr",this.drawMasks(T,v,c,y),this.drawOutline(T,v,c,y),this.navigatorOptions.handles.enabled&&(this.drawHandle(T,0,c,y),this.drawHandle(v,1,c,y))),this.scrollbar&&(c?(b=this.top-p,m=this.left-f+(l||!a.opposite?0:(a.titleOffset||0)+a.axisTitleMargin),f=x+2*p):(b=this.top+(l?this.height:-f),m=this.left-p),this.scrollbar.position(m,b,g,f),this.scrollbar.setRange(this.zoomedMin/(x||1),this.zoomedMax/(x||1))),this.rendered=!0,this.isDirty=!1,iC(this,"afterRender")}addMouseEvents(){let e=this,t=e.chart,i=t.container,s=[],n,r;e.mouseMoveHandler=n=function(t){e.onMouseMove(t)},e.mouseUpHandler=r=function(t){e.onMouseUp(t)},(s=e.getPartsEvents("mousedown")).push(ib(t.renderTo,"mousemove",n),ib(i.ownerDocument,"mouseup",r),ib(t.renderTo,"touchmove",n),ib(i.ownerDocument,"touchend",r)),s.concat(e.getPartsEvents("touchstart")),e.eventsToUnbind=s,e.series&&e.series[0]&&s.push(ib(e.series[0].xAxis,"foundExtremes",function(){t.navigator.modifyNavigatorAxisExtremes()}))}getPartsEvents(e){let t=this,i=[];return["shades","handles"].forEach(function(s){t[s].forEach(function(n,r){i.push(ib(n.element,e,function(e){t[s+"Mousedown"](e,r)}))})}),i}shadesMousedown(e,t){e=this.chart.pointer?.normalize(e)||e;let i=this.chart,s=this.xAxis,n=this.zoomedMin,r=this.size,o=this.range,a=this.left,l=e.chartX,h,c,d,u;i.inverted&&(l=e.chartY,a=this.top),1===t?(this.grabbedCenter=l,this.fixedWidth=o,this.dragOffset=l-n):(u=l-a-o/2,0===t?u=Math.max(0,u):2===t&&u+o>=r&&(u=r-o,this.reversedExtremes?(u-=o,c=this.getUnionExtremes().dataMin):h=this.getUnionExtremes().dataMax),u!==n&&(this.fixedWidth=o,iv((d=s.navigatorAxis.toFixedRange(u,u+o,c,h)).min)&&iC(this,"setRange",{min:Math.min(d.min,d.max),max:Math.max(d.min,d.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(e,t){e=this.chart.pointer?.normalize(e)||e;let i=this.chart,s=i.xAxis[0],n=this.reversedExtremes;0===t?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=n?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=n?s.max:s.min),i.setFixedRange(void 0)}onMouseMove(e){let t=this,i=t.chart,s=t.navigatorSize,n=t.range,r=t.dragOffset,o=i.inverted,a=t.left,l;(!e.touches||0!==e.touches[0].pageX)&&(l=(e=i.pointer?.normalize(e)||e).chartX,o&&(a=t.top,l=e.chartY),t.grabbedLeft?(t.hasDragged=!0,t.render(0,0,l-a,t.otherHandlePos)):t.grabbedRight?(t.hasDragged=!0,t.render(0,0,t.otherHandlePos,l-a)):t.grabbedCenter&&(t.hasDragged=!0,ls+r-n&&(l=s+r-n),t.render(0,0,l-r,l-r+n)),t.hasDragged&&t.scrollbar&&iP(t.scrollbar.options.liveRedraw,!ig&&!this.chart.boosted)&&(e.DOMType=e.type,setTimeout(function(){t.onMouseUp(e)},0)))}onMouseUp(e){let t,i,s,n,r,o;let a=this.chart,l=this.xAxis,h=this.scrollbar,c=e.DOMEvent||e,d=a.inverted,u=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!h||!h.hasDragged)||"scrollbar"===e.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?n=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(r=this.fixedExtreme),this.zoomedMax===this.size&&(r=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(n=this.reversedExtremes?s.dataMax:s.dataMin),iv((o=l.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,n,r)).min)&&iC(this,"setRange",{min:Math.min(o.min,o.max),max:Math.max(o.min,o.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:c}})),"mousemove"!==e.DOMType&&"touchmove"!==e.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&ik(this.zoomedMin)&&ik(this.zoomedMax)&&(i=Math.round(this.zoomedMin),t=Math.round(this.zoomedMax),this.shades&&this.drawMasks(i,t,d,u),this.outline&&this.drawOutline(i,t,d,u),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(i,0,d,u),this.drawHandle(t,1,d,u)))}removeEvents(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(e){e()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let e=this.baseSeries||[];this.navigatorEnabled&&e[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&e.forEach(function(e){iD(e,"updatedData",this.updatedDataHandler)},this),e[0].xAxis&&iD(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}getXAxisOffsets(){return this.chart.inverted?[this.scrollButtonSize,0,-this.scrollButtonSize,0]:[0,-this.scrollButtonSize,0,this.scrollButtonSize]}init(e){let t=e.options,i=t.navigator||{},s=i.enabled,n=t.scrollbar||{},r=n.enabled,o=s&&i.height||0,a=r&&n.height||0,l=n.buttonsEnabled&&a||0;this.handles=[],this.shades=[],this.chart=e,this.setBaseSeries(),this.height=o,this.scrollbarHeight=a,this.scrollButtonSize=l,this.scrollbarEnabled=r,this.navigatorEnabled=s,this.navigatorOptions=i,this.scrollbarOptions=n,this.setOpposite();let h=this,c=h.baseSeries,d=e.xAxis.length,u=e.yAxis.length,p=c&&c[0]&&c[0].xAxis||e.xAxis[0]||{options:{}};if(e.isDirtyBox=!0,h.navigatorEnabled){let t=this.getXAxisOffsets();h.xAxis=new(tl())(e,iS({breaks:p.options.breaks,ordinal:p.options.ordinal,overscroll:p.options.overscroll},i.xAxis,{type:"datetime",yAxis:i.yAxis?.id,index:d,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:p.options.ordinal?0:p.options.minPadding,maxPadding:p.options.ordinal?0:p.options.maxPadding,zoomEnabled:!1},e.inverted?{offsets:t,width:o}:{offsets:t,height:o}),"xAxis"),h.yAxis=new(tl())(e,iS(i.yAxis,{alignTicks:!1,offset:0,index:u,isInternal:!0,reversed:iP(i.yAxis&&i.yAxis.reversed,e.yAxis[0]&&e.yAxis[0].reversed,!1),zoomEnabled:!1},e.inverted?{width:o}:{height:o}),"yAxis"),c||i.series.data?h.updateNavigatorSeries(!1):0===e.series.length&&(h.unbindRedraw=ib(e,"beforeRedraw",function(){e.series.length>0&&!h.series&&(h.setBaseSeries(),h.unbindRedraw())})),h.reversedExtremes=e.inverted&&!h.xAxis.reversed||!e.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()}else h.xAxis={chart:e,navigatorAxis:{fake:!0},translate:function(t,i){let s=e.xAxis[0],n=s.getExtremes(),r=s.len-2*l,o=iB("min",s.options.min,n.dataMin),a=iB("max",s.options.max,n.dataMax)-o;return i?t*a/r+o:r*(t-o)/a},toPixels:function(e){return this.translate(e)},toValue:function(e){return this.translate(e,!0)}},h.xAxis.navigatorAxis.axis=h.xAxis,h.xAxis.navigatorAxis.toFixedRange=tD.prototype.toFixedRange.bind(h.xAxis.navigatorAxis);if(e.options.scrollbar.enabled){let t=iS(e.options.scrollbar,{vertical:e.inverted});!ik(t.margin)&&h.navigatorEnabled&&(t.margin=e.inverted?-3:3),e.scrollbar=h.scrollbar=new ic(e.renderer,t,e),ib(h.scrollbar,"changed",function(e){let t=h.size,i=t*this.to,s=t*this.from;h.hasDragged=h.scrollbar.hasDragged,h.render(0,0,s,i),this.shouldUpdateExtremes(e.DOMType)&&setTimeout(function(){h.onMouseUp(e)})})}h.addBaseSeriesEvents(),h.addChartEvents()}setOpposite(){let e=this.navigatorOptions,t=this.navigatorEnabled,i=this.chart;this.opposite=iP(e.opposite,!!(!t&&i.inverted))}getUnionExtremes(e){let t;let i=this.chart.xAxis[0],s=this.chart.time,n=this.xAxis,r=n.options,o=i.options;return e&&null===i.dataMin||(t={dataMin:iP(s.parse(r?.min),iB("min",s.parse(o.min),i.dataMin,n.dataMin,n.min)),dataMax:iP(s.parse(r?.max),iB("max",s.parse(o.max),i.dataMax,n.dataMax,n.max))}),t}setBaseSeries(e,t){let i=this.chart,s=this.baseSeries=[];e=e||i.options&&i.options.navigator.baseSeries||(i.series.length?iT(i.series,e=>!e.options.isInternal).index:0),(i.series||[]).forEach((t,i)=>{!t.options.isInternal&&(t.options.showInNavigator||(i===e||t.options.id===e)&&!1!==t.options.showInNavigator)&&s.push(t)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,t)}updateNavigatorSeries(e,t){let i=this,s=i.chart,n=i.baseSeries,r={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},o=i.series=(i.series||[]).filter(e=>{let t=e.baseSeries;return!(0>n.indexOf(t))||(t&&(iD(t,"updatedData",i.updatedDataHandler),delete t.navigatorSeries),e.chart&&e.destroy(),!1)}),a,l,h=i.navigatorOptions.series,c;n&&n.length&&n.forEach(e=>{let d=e.navigatorSeries,u=iA({color:e.color,visible:e.visible},iM(h)?ip.navigator.series:h);if(d&&!1===i.navigatorOptions.adaptToUpdatedData)return;r.name="Navigator "+n.length,c=(a=e.options||{}).navigatorOptions||{},u.dataLabels=iN(u.dataLabels),(l=iS(a,r,u,c)).pointRange=iP(u.pointRange,c.pointRange,ip.plotOptions[l.type||"line"].pointRange);let p=c.data||u.data;i.hasNavigatorData=i.hasNavigatorData||!!p,l.data=p||a.data?.slice(0),d&&d.options?d.update(l,t):(e.navigatorSeries=s.initSeries(l),s.setSortedData(),e.navigatorSeries.baseSeries=e,o.push(e.navigatorSeries))}),(h.data&&!(n&&n.length)||iM(h))&&(i.hasNavigatorData=!1,(h=iN(h)).forEach((e,t)=>{r.name="Navigator "+(o.length+1),(l=iS(ip.navigator.series,{color:s.series[t]&&!s.series[t].options.isInternal&&s.series[t].color||s.options.colors[t]||s.options.colors[0]},r,e)).data=e.data,l.data&&(i.hasNavigatorData=!0,o.push(s.initSeries(l)))})),e&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let e=this,t=e.baseSeries||[];t[0]&&t[0].xAxis&&t[0].eventsToUnbind.push(ib(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),t.forEach(i=>{i.eventsToUnbind.push(ib(i,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),i.eventsToUnbind.push(ib(i,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&i.xAxis&&i.eventsToUnbind.push(ib(i,"updatedData",this.updatedDataHandler)),i.eventsToUnbind.push(ib(i,"remove",function(){t&&iE(t,i),this.navigatorSeries&&e.series&&(iE(e.series,this.navigatorSeries),iv(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(e){return this.baseSeries.reduce(function(e,t){return Math.min(e,t.getColumn("x")[0]??e)},e)}modifyNavigatorAxisExtremes(){let e=this.xAxis;if(void 0!==e.getExtremes){let t=this.getUnionExtremes(!0);t&&(t.dataMin!==e.min||t.dataMax!==e.max)&&(e.min=t.dataMin,e.max=t.dataMax)}}modifyBaseAxisExtremes(){let e,t;let i=this.chart.navigator,s=this.getExtremes(),n=s.min,r=s.max,o=s.dataMin,a=s.dataMax,l=r-n,h=i.stickToMin,c=i.stickToMax,d=iP(this.ordinal?.convertOverscroll(this.options.overscroll),0),u=i.series&&i.series[0],p=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(h&&(e=(t=o)+l),c&&(e=a+d,h||(t=Math.max(o,e-l,i.getBaseSeriesMin(u&&u.xData?u.xData[0]:-Number.MAX_VALUE)))),p&&(h||c)&&ik(t)&&(this.min=this.userMin=t,this.max=this.userMax=e)),i.stickToMin=i.stickToMax=null}updatedDataHandler(){let e=this.chart.navigator,t=this.navigatorSeries,i=e.reversedExtremes?0===Math.round(e.zoomedMin):Math.round(e.zoomedMax)>=Math.round(e.size);e.stickToMax=iP(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,i),e.stickToMin=e.shouldStickToMin(this,e),t&&!e.hasNavigatorData&&(t.options.pointStart=this.getColumn("x")[0],t.setData(this.options.data,!1,null,!1))}shouldStickToMin(e,t){let i=t.getBaseSeriesMin(e.getColumn("x")[0]),s=e.xAxis,n=s.max,r=s.min,o=s.options.range;return!!(ik(n)&&ik(r))&&(o&&n-i>0?n-i{e.destroy&&e.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(e=>{this[e]&&this[e].destroy&&this[e].destroy(),this[e]=null}),[this.handles].forEach(e=>{iw(e)}),this.navigatorEnabled=!1}}let{animObject:iF}=w(),{format:iO}=D(),{clamp:iR,pick:iL,syncTimeout:iH}=w(),{getFakeMouseEvent:iz}=S,{getAxisRangeDescription:iq,fireEventOnWrappedOrUnwrappedElement:iG}=K,iK=class extends Z{init(){let e=this.chart,t=this;this.announcer=new ep(e,"polite"),this.addEvent(iI,"afterRender",function(){this.chart===t.chart&&this.chart.renderer&&iH(()=>{t.proxyProvider.updateGroupProxyElementPositions("navigator"),t.updateHandleValues()},iF(iL(this.chart.renderer.globalAnimation,!0)).duration)})}onChartUpdate(){let e=this.chart,t=e.options,i=t.navigator;if(i.enabled&&i.accessibility?.enabled){let i=t.accessibility.landmarkVerbosity,s=t.lang.accessibility?.navigator.groupLabel;this.proxyProvider.removeGroup("navigator"),this.proxyProvider.addGroup("navigator","div",{role:"all"===i?"region":"group","aria-label":iO(s,{chart:e},e)});let n=t.lang.accessibility?.navigator.handleLabel;[0,1].forEach(t=>{let i=this.getHandleByIx(t);if(i){let s=this.proxyProvider.addProxyElement("navigator",{click:i},"input",{type:"range","aria-label":iO(n,{handleIx:t,chart:e},e)});this[t?"maxHandleProxy":"minHandleProxy"]=s.innerElement,s.innerElement.style.pointerEvents="none",s.innerElement.oninput=()=>this.updateNavigator()}}),this.updateHandleValues()}else this.proxyProvider.removeGroup("navigator")}getNavigatorHandleNavigation(e){let t=this,i=this.chart,s=e?this.maxHandleProxy:this.minHandleProxy,n=this.keyCodes;return new Q(i,{keyCodeMap:[[[n.left,n.right,n.up,n.down],function(r){if(s){let o=r===n.left||r===n.up?-1:1;s.value=""+iR(parseFloat(s.value)+o,0,100),t.updateNavigator(()=>{let n=t.getHandleByIx(e);n&&i.setFocusToElement(n,s)})}return this.response.success}]],init:()=>{i.setFocusToElement(this.getHandleByIx(e),s)},validate:()=>!!(this.getHandleByIx(e)&&s&&i.options.navigator.accessibility?.enabled)})}getKeyboardNavigation(){return[this.getNavigatorHandleNavigation(0),this.getNavigatorHandleNavigation(1)]}destroy(){this.updateNavigatorThrottleTimer&&clearTimeout(this.updateNavigatorThrottleTimer),this.proxyProvider.removeGroup("navigator"),this.announcer&&this.announcer.destroy()}updateHandleValues(){let e=this.chart.navigator;if(e&&this.minHandleProxy&&this.maxHandleProxy){let t=e.size;this.minHandleProxy.value=""+Math.round(e.zoomedMin/t*100),this.maxHandleProxy.value=""+Math.round(e.zoomedMax/t*100)}}getHandleByIx(e){let t=this.chart.navigator;return t&&t.handles&&t.handles[e]}updateNavigator(e){this.updateNavigatorThrottleTimer&&clearTimeout(this.updateNavigatorThrottleTimer),this.updateNavigatorThrottleTimer=setTimeout((e=>{let t=this.chart,{navigator:i,pointer:s}=t;if(i&&s&&this.minHandleProxy&&this.maxHandleProxy){let n=s.getChartPosition(),r=parseFloat(this.minHandleProxy.value)/100*i.size,o=parseFloat(this.maxHandleProxy.value)/100*i.size;[[0,"mousedown",i.zoomedMin],[0,"mousemove",r],[0,"mouseup",r],[1,"mousedown",i.zoomedMax],[1,"mousemove",o],[1,"mouseup",o]].forEach(([e,t,s])=>{let r=this.getHandleByIx(e)?.element;r&&iG(r,iz(t,{x:n.left+i.left+s,y:n.top+i.top},r))}),e&&e();let a=t.options.lang.accessibility?.navigator.changeAnnouncement,l=iq(t.xAxis[0]);this.announcer.announce(iO(a,{axisRangeDescription:l,chart:t},t))}}).bind(this,e),20)}},{getPointAnnotationTexts:iU}=ev,{getAxisDescription:iV,getSeriesFirstPointElement:iW,getSeriesA11yElement:iX,unhideChartElementFromAT:iY}=K,{format:ij,numberFormat:i_}=D(),{reverseChildNodes:iZ,stripHTMLTagsFromString:i$}=S,{find:iQ,isNumber:iJ,isString:i0,pick:i1,defined:i2}=w();function i3(e){let t=e.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(!1!==t&&e.points&&e.points.length>=+t)}function i5(e,t){let i=e.series,s=i.chart,n=s.options.accessibility.point||{},r=i.options.accessibility&&i.options.accessibility.point||{},o=i.tooltipOptions||{},a=s.options.lang;return iJ(t)?i_(t,r.valueDecimals||n.valueDecimals||o.valueDecimals||-1,a.decimalPoint,a.accessibility.thousandsSep||a.thousandsSep):t}function i4(e,t){let i=e[t];return e.chart.langFormat("accessibility.series."+t+"Description",{name:iV(i),series:e})}function i6(e){let t=e.series,i=t.chart.series.length>1||t.options.name,s=function(e){let t=e.series,i=t.chart,s=t.options.accessibility,n=s&&s.point&&s.point.valueDescriptionFormat||i.options.accessibility.point.valueDescriptionFormat,r=i1(t.xAxis&&t.xAxis.options.accessibility&&t.xAxis.options.accessibility.enabled,!i.angular&&"flowmap"!==t.type),o=r?function(e){let t=function(e){let t=e.series,i=t.chart,s=t.options.accessibility&&t.options.accessibility.point||{},n=i.options.accessibility.point||{},r=t.xAxis&&t.xAxis.dateTime;if(r){let t=r.getXDateFormat(e.x||0,i.options.tooltip.dateTimeLabelFormats),o=s.dateFormatter&&s.dateFormatter(e)||n.dateFormatter&&n.dateFormatter(e)||s.dateFormat||n.dateFormat||t;return i.time.dateFormat(o,e.x||0,void 0)}}(e),i=(e.series.xAxis||{}).categories&&i2(e.category)&&(""+e.category).replace("
    "," "),s=i2(e.id)&&0>(""+e.id).indexOf("highcharts-"),n="x, "+e.x;return e.name||t||i||(s?e.id:n)}(e):"";return ij(n,{point:e,index:i2(e.index)?e.index+1:"",xDescription:o,value:function(e){let t=e.series,i=t.chart.options.accessibility.point||{},s=t.chart.options.accessibility&&t.chart.options.accessibility.point||{},n=t.tooltipOptions||{},r=s.valuePrefix||i.valuePrefix||n.valuePrefix||"",o=s.valueSuffix||i.valueSuffix||n.valueSuffix||"",a=void 0!==e.value?"value":"y",l=i5(e,e[a]);return e.isNull?t.chart.langFormat("accessibility.series.nullPointValue",{point:e}):t.pointArrayMap?function(e,t,i){let s=t||"",n=i||"",r=function(t){let i=i5(e,i1(e[t],e.options[t]));return void 0!==i?t+": "+s+i+n:i};return e.series.pointArrayMap.reduce(function(e,t){let i=r(t);return i?e+(e.length?", ":"")+i:e},"")}(e,r,o):r+l+o}(e),separator:r?", ":""},i)}(e),n=e.options&&e.options.accessibility&&e.options.accessibility.description,r=i?" "+t.name+".":"",o=function(e){let t=e.series.chart,i=iU(e);return i.length?t.langFormat("accessibility.series.pointAnnotationsDescription",{point:e,annotations:i}):""}(e);return e.accessibility=e.accessibility||{},e.accessibility.valueDescription=s,s+(n?" "+n:"")+r+(o?" "+o:"")}function i9(e){let t=e.chart,i=t.types||[],s=function(e){let t=(e.options.accessibility||{}).description;return t&&e.chart.langFormat("accessibility.series.description",{description:t,series:e})||""}(e),n=function(i){return t[i]&&t[i].length>1&&e[i]},r=e.index+1,o=i4(e,"xAxis"),a=i4(e,"yAxis"),l={seriesNumber:r,series:e,chart:t},h=i.length>1?"Combination":"",c=t.langFormat("accessibility.series.summary."+e.type+h,l)||t.langFormat("accessibility.series.summary.default"+h,l),d=(n("yAxis")?" "+a+".":"")+(n("xAxis")?" "+o+".":"");return ij(i1(e.options.accessibility&&e.options.accessibility.descriptionFormat,t.options.accessibility.series.descriptionFormat,""),{seriesDescription:c,authorDescription:s?" "+s:"",axisDescription:d,series:e,chart:t,seriesNumber:r},void 0)}let i8={defaultPointDescriptionFormatter:i6,defaultSeriesDescriptionFormatter:i9,describeSeries:function(e){let t=e.chart,i=iW(e),s=iX(e),n=t.is3d&&t.is3d();s&&(s.lastChild!==i||n||iZ(s),function(e){let t=function(e){let t=e.options.accessibility||{};return!i3(e)&&!t.exposeAsGroupOnly}(e),i=function(e){let t=e.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!!(e.points&&(e.points.length<+t.pointNavigationEnabledThreshold||!1===t.pointNavigationEnabledThreshold))}(e),s=e.chart.options.accessibility.point.describeNull;(t||i)&&e.points.forEach(i=>{let n=i.graphic&&i.graphic.element||function(e){let t=e.series,i=t&&t.chart,s=t&&t.is("sunburst"),n=e.isNull,r=i&&i.options.accessibility.point.describeNull;return n&&!s&&r}(i)&&function(e){let t=e.series,i=function(e){let t=e.index;return e.series&&e.series.data&&i2(t)&&iQ(e.series.data,function(e){return!!(e&&void 0!==e.index&&e.index>t&&e.graphic&&e.graphic.element)})||null}(e),s=i&&i.graphic,n=s?s.parentGroup:t.graph||t.group,r=i?{x:i1(e.plotX,i.plotX,0),y:i1(e.plotY,i.plotY,0)}:{x:i1(e.plotX,0),y:i1(e.plotY,0)},o=function(e,t){let i=e.series.chart.renderer.rect(t.x,t.y,1,1);return i.attr({class:"highcharts-a11y-mock-point",fill:"none",opacity:0,"fill-opacity":0,"stroke-opacity":0}),i}(e,r);if(n&&n.element)return e.graphic=o,e.hasMockGraphic=!0,o.add(n),n.element.insertBefore(o.element,s?s.element:null),o.element}(i),r=i.options&&i.options.accessibility&&!1===i.options.accessibility.enabled;if(n){if(i.isNull&&!s){n.setAttribute("aria-hidden",!0);return}n.setAttribute("tabindex","-1"),e.chart.styledMode||(n.style.outline="none"),t&&!r?function(e,t){let i=e.series,s=i.options.accessibility?.point||{},n=i.chart.options.accessibility.point||{},r=i$(i0(s.descriptionFormat)&&ij(s.descriptionFormat,e,i.chart)||s.descriptionFormatter?.(e)||i0(n.descriptionFormat)&&ij(n.descriptionFormat,e,i.chart)||n.descriptionFormatter?.(e)||i6(e),i.chart.renderer.forExport);t.setAttribute("role","img"),t.setAttribute("aria-label",r)}(i,n):n.setAttribute("aria-hidden",!0)}})}(e),iY(t,s),function(e){let t=e.chart,i=t.options.chart,s=i.options3d&&i.options3d.enabled,n=t.series.length>1,r=t.options.accessibility.series.describeSingleSeries,o=(e.options.accessibility||{}).exposeAsGroupOnly;return!(s&&n)&&(n||r||o||i3(e))}(e)?function(e,t){let i=e.options.accessibility||{},s=e.chart.options.accessibility,n=s.landmarkVerbosity;i.exposeAsGroupOnly?t.setAttribute("role","img"):"all"===n?t.setAttribute("role","region"):t.setAttribute("role","group"),t.setAttribute("tabindex","-1"),e.chart.styledMode||(t.style.outline="none"),t.setAttribute("aria-label",i$(s.series.descriptionFormatter&&s.series.descriptionFormatter(e)||i9(e),e.chart.renderer.forExport))}(e,s):s.removeAttribute("aria-label"))}},{composed:i7}=w(),{addEvent:se,defined:st,pushUnique:si}=w(),{getChartTitle:ss}=K,{defaultPointDescriptionFormatter:sn,defaultSeriesDescriptionFormatter:sr}=i8;function so(e){return!!e.options.accessibility.announceNewData.enabled}class sa{constructor(e){this.dirty={allSeries:{}},this.lastAnnouncementTime=0,this.chart=e}init(){let e=this.chart,t=e.options.accessibility.announceNewData.interruptUser?"assertive":"polite";this.lastAnnouncementTime=0,this.dirty={allSeries:{}},this.eventProvider=new Y,this.announcer=new ep(e,t),this.addEventListeners()}destroy(){this.eventProvider.removeAddedEvents(),this.announcer.destroy()}addEventListeners(){let e=this,t=this.chart,i=this.eventProvider;i.addEvent(t,"afterApplyDrilldown",function(){e.lastAnnouncementTime=0}),i.addEvent(t,"afterAddSeries",function(t){e.onSeriesAdded(t.series)}),i.addEvent(t,"redraw",function(){e.announceDirtyData()})}onSeriesAdded(e){so(this.chart)&&(this.dirty.hasDirty=!0,this.dirty.allSeries[e.name+e.index]=e,this.dirty.newSeries=st(this.dirty.newSeries)?void 0:e)}announceDirtyData(){let e=this.chart,t=this;if(e.options.accessibility.announceNewData&&this.dirty.hasDirty){let e=this.dirty.newPoint;e&&(e=function(e){let t=e.series.data.filter(t=>e.x===t.x&&e.y===t.y);return 1===t.length?t[0]:e}(e)),this.queueAnnouncement(Object.keys(this.dirty.allSeries).map(e=>t.dirty.allSeries[e]),this.dirty.newSeries,e),this.dirty={allSeries:{}}}}queueAnnouncement(e,t,i){let s=this.chart.options.accessibility.announceNewData;if(s.enabled){let n=+new Date,r=n-this.lastAnnouncementTime,o=Math.max(0,s.minAnnounceInterval-r),a=function(e,t){let i=(e||[]).concat(t||[]).reduce((e,t)=>(e[t.name+t.index]=t,e),{});return Object.keys(i).map(e=>i[e])}(this.queuedAnnouncement&&this.queuedAnnouncement.series,e),l=this.buildAnnouncementMessage(a,t,i);l&&(this.queuedAnnouncement&&clearTimeout(this.queuedAnnouncementTimer),this.queuedAnnouncement={time:n,message:l,series:a},this.queuedAnnouncementTimer=setTimeout(()=>{this&&this.announcer&&(this.lastAnnouncementTime=+new Date,this.announcer.announce(this.queuedAnnouncement.message),delete this.queuedAnnouncement,delete this.queuedAnnouncementTimer)},o))}}buildAnnouncementMessage(e,t,i){let s=this.chart,n=s.options.accessibility.announceNewData;if(n.announcementFormatter){let s=n.announcementFormatter(e,t,i);if(!1!==s)return s.length?s:null}let r=w().charts&&w().charts.length>1?"Multiple":"Single",o=t?"newSeriesAnnounce"+r:i?"newPointAnnounce"+r:"newDataAnnounce",a=ss(s);return s.langFormat("accessibility.announceNewData."+o,{chartTitle:a,seriesDesc:t?sr(t):null,pointDesc:i?sn(i):null,point:i,series:t})}}!function(e){function t(e){let t=this.chart,i=t.accessibility?.components.series.newDataAnnouncer;i&&i.chart===t&&so(t)&&(i.dirty.newPoint=st(i.dirty.newPoint)?void 0:e.point)}function i(){let e=this.chart,t=e.accessibility?.components.series.newDataAnnouncer;t&&t.chart===e&&so(e)&&(t.dirty.hasDirty=!0,t.dirty.allSeries[this.name+this.index]=this)}e.compose=function(e){si(i7,"A11y.NDA")&&(se(e,"addPoint",t),se(e,"updatedData",i))}}(sa||(sa={}));let sl=sa,{doc:sh}=w(),{attr:sc,css:sd,merge:su}=w(),{fireEventOnWrappedOrUnwrappedElement:sp}=K,{cloneMouseEvent:sg,cloneTouchEvent:sm,getFakeMouseEvent:sb,removeElement:sf}=S,sx=class{constructor(e,t,i="button",s,n){this.chart=e,this.target=t,this.eventProvider=new Y;let r=this.innerElement=sh.createElement(i),o=this.element=s?sh.createElement(s):r;e.styledMode||this.hideElementVisually(r),s&&("li"!==s||e.styledMode||(o.style.listStyle="none"),o.appendChild(r),this.element=o),this.updateTarget(t,n)}click(){let e=this.getTargetPosition();e.x+=e.width/2,e.y+=e.height/2;let t=sb("click",e);sp(this.target.click,t)}updateTarget(e,t){this.target=e,this.updateCSSClassName();let i=t||{};Object.keys(i).forEach(e=>{null===i[e]&&delete i[e]});let s=this.getTargetAttr(e.click,"aria-label");sc(this.innerElement,su(s?{"aria-label":s}:{},i)),this.eventProvider.removeAddedEvents(),this.addProxyEventsToElement(this.innerElement,e.click),this.refreshPosition()}refreshPosition(){let e=this.getTargetPosition();sd(this.innerElement,{width:(e.width||1)+"px",height:(e.height||1)+"px",left:(Math.round(e.x)||0)+"px",top:(Math.round(e.y)||0)+"px"})}remove(){this.eventProvider.removeAddedEvents(),sf(this.element)}updateCSSClassName(){let e=e=>e.indexOf("highcharts-no-tooltip")>-1,t=this.chart.legend,i=t.group&&t.group.div,s=e(i&&i.className||""),n=e(this.getTargetAttr(this.target.click,"class")||"");this.innerElement.className=s||n?"highcharts-a11y-proxy-element highcharts-no-tooltip":"highcharts-a11y-proxy-element"}addProxyEventsToElement(e,t){["click","touchstart","touchend","touchcancel","touchmove","mouseover","mouseenter","mouseleave","mouseout"].forEach(i=>{let s=0===i.indexOf("touch");this.eventProvider.addEvent(e,i,e=>{let i=s?sm(e):sg(e);t&&sp(t,i),e.stopPropagation(),s||e.preventDefault()},{passive:!1})})}hideElementVisually(e){sd(e,{borderWidth:0,backgroundColor:"transparent",cursor:"pointer",outline:"none",opacity:.001,filter:"alpha(opacity=1)",zIndex:999,overflow:"hidden",padding:0,margin:0,display:"block",position:"absolute","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"})}getTargetPosition(){let e=this.target.click,t=e.element?e.element:e,i=this.target.visual||t,s=this.chart.renderTo,n=this.chart.pointer;if(s&&i?.getBoundingClientRect&&n){let e=i.getBoundingClientRect(),t=n.getChartPosition();return{x:(e.left-t.left)/t.scaleX,y:(e.top-t.top)/t.scaleY,width:e.right/t.scaleX-e.left/t.scaleX,height:e.bottom/t.scaleY-e.top/t.scaleY}}return{x:0,y:0,width:1,height:1}}getTargetAttr(e,t){return e.element?e.element.getAttribute(t):e.getAttribute(t)}},{doc:sy}=w(),{attr:sv,css:sw}=w(),{unhideChartElementFromAT:sE}=K,{removeChildNodes:sA}=S,sT=class{constructor(e){this.chart=e,this.domElementProvider=new W,this.groups={},this.groupOrder=[],this.beforeChartProxyPosContainer=this.createProxyPosContainer("before"),this.afterChartProxyPosContainer=this.createProxyPosContainer("after"),this.update()}addProxyElement(e,t,i="button",s){let n=this.groups[e];if(!n)throw Error("ProxyProvider.addProxyElement: Invalid group key "+e);let r="ul"===n.type||"ol"===n.type?"li":void 0,o=new sx(this.chart,t,i,r,s);return n.proxyContainerElement.appendChild(o.element),n.proxyElements.push(o),o}addGroup(e,t="div",i){let s;let n=this.groups[e];if(n)return n.groupElement;let r=this.domElementProvider.createElement(t);return i&&i.role&&"div"!==t?(s=this.domElementProvider.createElement("div")).appendChild(r):s=r,s.className="highcharts-a11y-proxy-group highcharts-a11y-proxy-group-"+e.replace(/\W/g,"-"),this.groups[e]={proxyContainerElement:r,groupElement:s,type:t,proxyElements:[]},sv(s,i||{}),"ul"===t&&r.setAttribute("role","list"),this.afterChartProxyPosContainer.appendChild(s),this.updateGroupOrder(this.groupOrder),s}updateGroupAttrs(e,t){let i=this.groups[e];if(!i)throw Error("ProxyProvider.updateGroupAttrs: Invalid group key "+e);sv(i.groupElement,t)}updateGroupOrder(e){if(this.groupOrder=e.slice(),this.isDOMOrderGroupOrder())return;let t=e.indexOf("series"),i=t>-1?e.slice(0,t):e,s=t>-1?e.slice(t+1):[],n=sy.activeElement;["before","after"].forEach(e=>{let t=this["before"===e?"beforeChartProxyPosContainer":"afterChartProxyPosContainer"];sA(t),("before"===e?i:s).forEach(e=>{let i=this.groups[e];i&&t.appendChild(i.groupElement)})}),(this.beforeChartProxyPosContainer.contains(n)||this.afterChartProxyPosContainer.contains(n))&&n&&n.focus&&n.focus()}clearGroup(e){let t=this.groups[e];if(!t)throw Error("ProxyProvider.clearGroup: Invalid group key "+e);sA(t.proxyContainerElement)}removeGroup(e){let t=this.groups[e];t&&(this.domElementProvider.removeElement(t.groupElement),t.groupElement!==t.proxyContainerElement&&this.domElementProvider.removeElement(t.proxyContainerElement),delete this.groups[e])}update(){this.updatePosContainerPositions(),this.updateGroupOrder(this.groupOrder),this.updateProxyElementPositions()}updateProxyElementPositions(){Object.keys(this.groups).forEach(this.updateGroupProxyElementPositions.bind(this))}updateGroupProxyElementPositions(e){let t=this.groups[e];t&&t.proxyElements.forEach(e=>e.refreshPosition())}destroy(){this.domElementProvider.destroyCreatedElements()}createProxyPosContainer(e){let t=this.domElementProvider.createElement("div");return t.setAttribute("aria-hidden","false"),t.className="highcharts-a11y-proxy-container"+(e?"-"+e:""),sw(t,{top:"0",left:"0"}),this.chart.styledMode||(t.style.whiteSpace="nowrap",t.style.position="absolute"),t}getCurrentGroupOrderInDOM(){let e=e=>{let t=Object.keys(this.groups),i=t.length;for(;i--;){let s=t[i],n=this.groups[s];if(n&&e===n.groupElement)return s}},t=t=>{let i=[],s=t.children;for(let t=0;t"series"===e||!!this.groups[e]),i=e.length;if(i!==t.length)return!1;for(;i--;)if(e[i]!==t[i])return!1;return!0}updatePosContainerPositions(){let e=this.chart;if(e.renderer.forExport)return;let t=e.renderer.box;e.container.insertBefore(this.afterChartProxyPosContainer,t.nextSibling),e.container.insertBefore(this.beforeChartProxyPosContainer,t),sE(this.chart,this.afterChartProxyPosContainer),sE(this.chart,this.beforeChartProxyPosContainer)}},{unhideChartElementFromAT:sC,getAxisRangeDescription:sM}=K,{addEvent:sk,attr:sS}=w();class sP extends Z{init(){let e=this.chart;this.announcer=new ep(e,"polite")}onChartUpdate(){let e=this.chart,t=this,i=e.rangeSelector;i&&(this.updateSelectorVisibility(),this.setDropdownAttrs(),i.buttons&&i.buttons.length&&i.buttons.forEach(e=>{t.setRangeButtonAttrs(e)}),i.maxInput&&i.minInput&&["minInput","maxInput"].forEach(function(s,n){let r=i[s];r&&(sC(e,r),t.setRangeInputAttrs(r,"accessibility.rangeSelector."+(n?"max":"min")+"InputLabel"))}))}updateSelectorVisibility(){let e=this.chart,t=e.rangeSelector,i=t&&t.dropdown,s=t&&t.buttons||[],n=e=>e.setAttribute("aria-hidden",!0);t&&t.hasVisibleDropdown&&i?(sC(e,i),s.forEach(e=>n(e.element))):(i&&n(i),s.forEach(t=>sC(e,t.element)))}setDropdownAttrs(){let e=this.chart,t=e.rangeSelector&&e.rangeSelector.dropdown;if(t){let i=e.langFormat("accessibility.rangeSelector.dropdownLabel",{rangeTitle:e.options.lang.rangeSelectorZoom});t.setAttribute("aria-label",i),t.setAttribute("tabindex",-1)}}setRangeButtonAttrs(e){sS(e.element,{tabindex:-1,role:"button"})}setRangeInputAttrs(e,t){let i=this.chart;sS(e,{tabindex:-1,"aria-label":i.langFormat(t,{chart:i})})}onButtonNavKbdArrowKey(e,t){let i=e.response,s=this.keyCodes,n=this.chart,r=n.options.accessibility.keyboardNavigation.wrapAround,o=t===s.left||t===s.up?-1:1;return n.highlightRangeSelectorButton(n.highlightedRangeSelectorItemIx+o)?i.success:r?(e.init(o),i.success):i[o>0?"next":"prev"]}onButtonNavKbdClick(e){let t=e.response,i=this.chart;return 3!==i.oldRangeSelectorItemState&&this.fakeClickEvent(i.rangeSelector.buttons[i.highlightedRangeSelectorItemIx].element),t.success}onAfterBtnClick(){let e=this.chart,t=sM(e.xAxis[0]),i=e.langFormat("accessibility.rangeSelector.clickButtonAnnouncement",{chart:e,axisRangeDescription:t});i&&this.announcer.announce(i)}onInputKbdMove(e){let t=this.chart,i=t.rangeSelector,s=t.highlightedInputRangeIx=(t.highlightedInputRangeIx||0)+e;if(s>1||s<0){if(t.accessibility)return t.accessibility.keyboardNavigation.exiting=!0,t.accessibility.keyboardNavigation.tabindexContainer.focus(),t.accessibility.keyboardNavigation.move(e)}else if(i){let e=i[s?"maxDateBox":"minDateBox"],n=i[s?"maxInput":"minInput"];e&&n&&t.setFocusToElement(e,n)}return!0}onInputNavInit(e){let t=this,i=this.chart,s=e>0?0:1,n=i.rangeSelector,r=n&&n[s?"maxDateBox":"minDateBox"],o=n&&n.minInput,a=n&&n.maxInput;if(i.highlightedInputRangeIx=s,r&&o&&a){i.setFocusToElement(r,s?a:o),this.removeInputKeydownHandler&&this.removeInputKeydownHandler();let e=e=>{(e.which||e.keyCode)===this.keyCodes.tab&&t.onInputKbdMove(e.shiftKey?-1:1)&&(e.preventDefault(),e.stopPropagation())},n=sk(o,"keydown",e),l=sk(a,"keydown",e);this.removeInputKeydownHandler=()=>{n(),l()}}}onInputNavTerminate(){let e=this.chart.rangeSelector||{};e.maxInput&&e.hideInput("max"),e.minInput&&e.hideInput("min"),this.removeInputKeydownHandler&&(this.removeInputKeydownHandler(),delete this.removeInputKeydownHandler)}initDropdownNav(){let e=this.chart,t=e.rangeSelector,i=t&&t.dropdown;t&&i&&(e.setFocusToElement(t.buttonGroup,i),this.removeDropdownKeydownHandler&&this.removeDropdownKeydownHandler(),this.removeDropdownKeydownHandler=sk(i,"keydown",t=>{let i=(t.which||t.keyCode)===this.keyCodes.tab,s=e.accessibility;i&&(t.preventDefault(),t.stopPropagation(),s&&s.keyboardNavigation.move(t.shiftKey?-1:1))}))}getRangeSelectorButtonNavigation(){let e=this.chart,t=this.keyCodes,i=this;return new Q(e,{keyCodeMap:[[[t.left,t.right,t.up,t.down],function(e){return i.onButtonNavKbdArrowKey(this,e)}],[[t.enter,t.space],function(){return i.onButtonNavKbdClick(this)}]],validate:function(){return!!(e.rangeSelector&&e.rangeSelector.buttons&&e.rangeSelector.buttons.length)},init:function(t){let s=e.rangeSelector;if(s&&s.hasVisibleDropdown)i.initDropdownNav();else if(s){let i=s.buttons.length-1;e.highlightRangeSelectorButton(t>0?0:i)}},terminate:function(){i.removeDropdownKeydownHandler&&(i.removeDropdownKeydownHandler(),delete i.removeDropdownKeydownHandler)}})}getRangeSelectorInputNavigation(){let e=this.chart,t=this;return new Q(e,{keyCodeMap:[],validate:function(){return!!(e.rangeSelector&&e.rangeSelector.inputGroup&&"hidden"!==e.rangeSelector.inputGroup.element.style.visibility&&!1!==e.options.rangeSelector.inputEnabled&&e.rangeSelector.minInput&&e.rangeSelector.maxInput)},init:function(e){t.onInputNavInit(e)},terminate:function(){t.onInputNavTerminate()}})}getKeyboardNavigation(){return[this.getRangeSelectorButtonNavigation(),this.getRangeSelectorInputNavigation()]}destroy(){this.removeDropdownKeydownHandler&&this.removeDropdownKeydownHandler(),this.removeInputKeydownHandler&&this.removeInputKeydownHandler(),this.announcer&&this.announcer.destroy()}}!function(e){function t(e){let t=this.rangeSelector&&this.rangeSelector.buttons||[],i=this.highlightedRangeSelectorItemIx,s=this.rangeSelector&&this.rangeSelector.selected;return void 0!==i&&t[i]&&i!==s&&t[i].setState(this.oldRangeSelectorItemState||0),this.highlightedRangeSelectorItemIx=e,!!t[e]&&(this.setFocusToElement(t[e].box,t[e].element),e!==s&&(this.oldRangeSelectorItemState=t[e].state,t[e].setState(1)),!0)}function i(){let e=this.chart.accessibility;if(e&&e.components.rangeSelector)return e.components.rangeSelector.onAfterBtnClick()}e.compose=function(e,s){let n=e.prototype;n.highlightRangeSelectorButton||(n.highlightRangeSelectorButton=t,sk(s,"afterBtnClick",i))}}(sP||(sP={}));let sD=sP,{composed:sN}=w(),{addEvent:sB,merge:sI,pushUnique:sF}=w();!function(e){function t(e){sI(!0,e,{marker:{enabled:!0,states:{normal:{opacity:0}}}})}function i(e){return e.marker.states&&e.marker.states.normal&&e.marker.states.normal.opacity}function s(e){return!!(e._hasPointMarkers&&e.points&&e.points.length)}function n(){this.chart.styledMode&&(this.markerGroup&&this.markerGroup[this.a11yMarkersForced?"addClass":"removeClass"]("highcharts-a11y-markers-hidden"),s(this)&&this.points.forEach(e=>{e.graphic&&(e.graphic[e.hasForcedA11yMarker?"addClass":"removeClass"]("highcharts-a11y-marker-hidden"),e.graphic[!1===e.hasForcedA11yMarker?"addClass":"removeClass"]("highcharts-a11y-marker-visible"))}))}function r(e){this.resetA11yMarkerOptions=sI(e.options.marker||{},this.userOptions.marker||{})}function o(){let e=this.options;!function(e){let t=e.chart.options.accessibility.enabled,i=!1!==(e.options.accessibility&&e.options.accessibility.enabled);return t&&i&&function(e){let t=e.chart.options.accessibility;return e.points.length-1;t.highlightedPoint===this&&i!==e&&!n&&e&&e.focus&&e.focus()})}onDrillupAll(){let e;let t=this.lastDrilledDownPoint,i=this.chart,s=t&&sW(i,t.seriesName);t&&s&&sK(t.x)&&sK(t.y)&&(e=sV(s,t.x,t.y)),e=e||sZ(i),i.container&&i.container.focus(),e&&e.highlight&&e.highlight(!1)}getKeyboardNavigationHandler(){let e=this,t=this.keyCodes,i=this.chart,s=i.inverted;return new Q(i,{keyCodeMap:[[s?[t.up,t.down]:[t.left,t.right],function(t){return e.onKbdSideways(this,t)}],[s?[t.left,t.right]:[t.up,t.down],function(t){return e.onKbdVertical(this,t)}],[[t.enter,t.space],function(e,t){let s=i.highlightedPoint;if(s){let{plotLeft:e,plotTop:i}=this.chart,{plotX:n=0,plotY:r=0}=s;t={...t,chartX:e+n,chartY:i+r,point:s,target:s.graphic?.element||t.target},sU(s.series,"click",t),s.firePointEvent("click",t)}return this.response.success}],[[t.home],function(){return sQ(i),this.response.success}],[[t.end],function(){return s$(i),this.response.success}],[[t.pageDown,t.pageUp],function(e){return i.highlightAdjacentSeries(e===t.pageDown),this.response.success}]],init:function(){return e.onHandlerInit(this)},validate:function(){return!!sZ(i)},terminate:function(){return e.onHandlerTerminate()}})}onKbdSideways(e,t){let i=this.keyCodes,s=t===i.right||t===i.down;return this.attemptHighlightAdjacentPoint(e,s)}onHandlerInit(e){let t=this.chart;return t.options.accessibility.keyboardNavigation.seriesNavigation.rememberPointFocus&&t.highlightedPoint?t.highlightedPoint.highlight():sQ(t),e.response.success}onKbdVertical(e,t){let i=this.chart,s=this.keyCodes,n=t===s.down||t===s.right,r=i.options.accessibility.keyboardNavigation.seriesNavigation;if(r.mode&&"serialize"===r.mode)return this.attemptHighlightAdjacentPoint(e,n);let o=i.highlightedPoint&&i.highlightedPoint.series.keyboardMoveVertical?"highlightAdjacentPointVertical":"highlightAdjacentSeries";return i[o](n),e.response.success}onHandlerTerminate(){let e=this.chart,t=e.options.accessibility.keyboardNavigation;e.tooltip&&e.tooltip.hide(0);let i=e.highlightedPoint&&e.highlightedPoint.series;i&&i.onMouseOut&&i.onMouseOut(),e.highlightedPoint&&e.highlightedPoint.onMouseOut&&e.highlightedPoint.onMouseOut(),t.seriesNavigation.rememberPointFocus||delete e.highlightedPoint}attemptHighlightAdjacentPoint(e,t){let i=this.chart,s=i.options.accessibility.keyboardNavigation.wrapAround;return i.highlightAdjacentPoint(t)?e.response.success:s&&(t?sQ(i):s$(i))?e.response.success:e.response[t?"next":"prev"]}onSeriesDestroy(e){let t=this.chart;t.highlightedPoint&&t.highlightedPoint.series===e&&(delete t.highlightedPoint,t.focusElement&&t.focusElement.removeFocusBorder())}destroy(){this.eventProvider.removeAddedEvents()}}!function(e){function t(e){let t,i;let s=this.series,n=this.highlightedPoint,r=n&&sY(n)||0,o=n&&n.series.points||[],a=this.series&&this.series[this.series.length-1],l=a&&a.points&&a.points[a.points.length-1];if(!s[0]||!s[0].points)return!1;if(n){if(t=s[n.series.index+(e?1:-1)],(i=o[r+(e?1:-1)])||!t||(i=t.points[e?0:t.points.length-1]),!i)return!1}else i=e?s[0].points[0]:l;return s_(i)?(sj(t=i.series)?this.highlightedPoint=e?t.points[t.points.length-1]:t.points[0]:this.highlightedPoint=i,this.highlightAdjacentPoint(e)):i.highlight()}function i(e){let t=this.highlightedPoint,i=1/0,s;return!!(sK(t.plotX)&&sK(t.plotY))&&(this.series.forEach(n=>{sj(n)||n.points.forEach(r=>{if(!sK(r.plotY)||!sK(r.plotX)||r===t)return;let o=r.plotY-t.plotY,a=Math.abs(r.plotX-t.plotX),l=Math.abs(o)*Math.abs(o)+a*a*4;n.yAxis&&n.yAxis.reversed&&(o*=-1),!(o<=0&&e||o>=0&&!e||l<5||s_(r))&&l!(sK(e.plotX)&&sK(e.plotY));if(!h(e)){for(;l--;)!h(r=t.points[l])&&(a=(e.plotX-r.plotX)*(e.plotX-r.plotX)*4+(e.plotY-r.plotY)*(e.plotY-r.plotY)*1)=0;--e)if(!s_(i[e]))return i[e].highlight()}return!1}e.compose=function(e,o,a){let l=e.prototype,h=o.prototype,c=a.prototype;l.highlightAdjacentPoint||(l.highlightAdjacentPoint=t,l.highlightAdjacentPointVertical=i,l.highlightAdjacentSeries=s,h.highlight=n,c.keyboardMoveVertical=!0,["column","gantt","pie"].forEach(e=>{sq[e]&&(sq[e].prototype.keyboardMoveVertical=!1)}),c.highlightNextValidPoint=r)}}(sJ||(sJ={}));let s0=sJ,{hideSeriesFromAT:s1}=K,{describeSeries:s2}=i8,s3=class extends Z{static compose(e,t,i){sl.compose(i),sO.compose(i),s0.compose(e,t,i)}init(){this.newDataAnnouncer=new sl(this.chart),this.newDataAnnouncer.init(),this.keyboardNavigation=new s0(this.chart,this.keyCodes),this.keyboardNavigation.init(),this.hideTooltipFromATWhenShown(),this.hideSeriesLabelsFromATWhenShown()}hideTooltipFromATWhenShown(){let e=this;this.chart.tooltip&&this.addEvent(this.chart.tooltip.constructor,"refresh",function(){this.chart===e.chart&&this.label&&this.label.element&&this.label.element.setAttribute("aria-hidden",!0)})}hideSeriesLabelsFromATWhenShown(){this.addEvent(this.chart,"afterDrawSeriesLabels",function(){this.series.forEach(function(e){e.labelBySeries&&e.labelBySeries.attr("aria-hidden",!0)})})}onChartRender(){this.chart.series.forEach(function(e){!1!==(e.options.accessibility&&e.options.accessibility.enabled)&&e.visible&&0!==e.getPointsCollection().length?s2(e):s1(e)})}getKeyboardNavigation(){return this.keyboardNavigation.getKeyboardNavigationHandler()}destroy(){this.newDataAnnouncer.destroy(),this.keyboardNavigation.destroy()}},{unhideChartElementFromAT:s5}=K,{getFakeMouseEvent:s4}=S,{attr:s6,pick:s9}=w(),s8=class extends Z{constructor(){super(...arguments),this.focusedMapNavButtonIx=-1}init(){let e=this,t=this.chart;this.proxyProvider.addGroup("zoom","div"),["afterShowResetZoom","afterApplyDrilldown","drillupall"].forEach(i=>{e.addEvent(t,i,function(){e.updateProxyOverlays()})})}onChartUpdate(){let e=this.chart,t=this;e.mapNavigation&&e.mapNavigation.navButtons.forEach((i,s)=>{s5(e,i.element),t.setMapNavButtonAttrs(i.element,"accessibility.zoom.mapZoom"+(s?"Out":"In"))})}setMapNavButtonAttrs(e,t){let i=this.chart;s6(e,{tabindex:-1,role:"button","aria-label":i.langFormat(t,{chart:i})})}onChartRender(){this.updateProxyOverlays()}updateProxyOverlays(){let e=this.chart;if(this.proxyProvider.clearGroup("zoom"),e.resetZoomButton&&this.createZoomProxyButton(e.resetZoomButton,"resetZoomProxyButton",e.langFormat("accessibility.zoom.resetZoomButton",{chart:e})),e.drillUpButton&&e.breadcrumbs&&e.breadcrumbs.list){let t=e.breadcrumbs.list[e.breadcrumbs.list.length-1];this.createZoomProxyButton(e.drillUpButton,"drillUpProxyButton",e.langFormat("accessibility.drillUpButton",{chart:e,buttonText:e.breadcrumbs.getButtonText(t)}))}}createZoomProxyButton(e,t,i){this[t]=this.proxyProvider.addProxyElement("zoom",{click:e},"button",{"aria-label":i,tabindex:-1})}getMapZoomNavigation(){let e=this.keyCodes,t=this.chart,i=this;return new Q(t,{keyCodeMap:[[[e.up,e.down,e.left,e.right],function(e){return i.onMapKbdArrow(this,e)}],[[e.tab],function(e,t){return i.onMapKbdTab(this,t)}],[[e.space,e.enter],function(){return i.onMapKbdClick(this)}]],validate:function(){return!!(t.mapView&&t.mapNavigation&&t.mapNavigation.navButtons.length)},init:function(e){return i.onMapNavInit(e)}})}onMapKbdArrow(e,t){let i=this.chart,s=this.keyCodes,n=i.container,r=t===s.up||t===s.down,o=t===s.left||t===s.up?1:-1,a=(r?i.plotHeight:i.plotWidth)/10*o,l=10*Math.random(),h={x:n.offsetLeft+i.plotLeft+i.plotWidth/2+l,y:n.offsetTop+i.plotTop+i.plotHeight/2+l},c=r?{x:h.x,y:h.y+a}:{x:h.x+a,y:h.y};return[s4("mousedown",h),s4("mousemove",c),s4("mouseup",c)].forEach(e=>n.dispatchEvent(e)),e.response.success}onMapKbdTab(e,t){let i=this.chart,s=e.response,n=t.shiftKey,r=n&&!this.focusedMapNavButtonIx||!n&&this.focusedMapNavButtonIx;if(i.mapNavigation.navButtons[this.focusedMapNavButtonIx].setState(0),r)return i.mapView&&i.mapView.zoomBy(),s[n?"prev":"next"];this.focusedMapNavButtonIx+=n?-1:1;let o=i.mapNavigation.navButtons[this.focusedMapNavButtonIx];return i.setFocusToElement(o.box,o.element),o.setState(2),s.success}onMapKbdClick(e){let t=this.chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].element;return this.fakeClickEvent(t),e.response.success}onMapNavInit(e){let t=this.chart,i=t.mapNavigation.navButtons[0],s=t.mapNavigation.navButtons[1],n=e>0?i:s;t.setFocusToElement(n.box,n.element),n.setState(2),this.focusedMapNavButtonIx=e>0?0:1}simpleButtonNavigation(e,t,i){let s=this.keyCodes,n=this,r=this.chart;return new Q(r,{keyCodeMap:[[[s.tab,s.up,s.down,s.left,s.right],function(e,t){let i=e===s.tab&&t.shiftKey||e===s.left||e===s.up;return this.response[i?"prev":"next"]}],[[s.space,s.enter],function(){return s9(i(this,r),this.response.success)}]],validate:function(){return r[e]&&r[e].box&&n[t].innerElement},init:function(){r.setFocusToElement(r[e].box,n[t].innerElement)}})}getKeyboardNavigation(){return[this.simpleButtonNavigation("resetZoomButton","resetZoomProxyButton",function(e,t){t.zoomOut()}),this.simpleButtonNavigation("drillUpButton","drillUpProxyButton",function(e,t){return t.drillUp(),e.response.prev}),this.getMapZoomNavigation()]}},{doc:s7,isMS:ne,win:nt}=w(),ni={isHighContrastModeActive:function(){let e=/(Edg)/.test(nt.navigator.userAgent);if(nt.matchMedia&&e)return nt.matchMedia("(-ms-high-contrast: active)").matches;if(ne&&nt.getComputedStyle){let e=s7.createElement("div");e.style.backgroundImage="url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)",s7.body.appendChild(e);let t=(e.currentStyle||nt.getComputedStyle(e)).backgroundImage;return s7.body.removeChild(e),"none"===t}return nt.matchMedia&&nt.matchMedia("(forced-colors: active)").matches},setHighContrastTheme:function(e){e.highContrastModeActive=!0;let t=e.options.accessibility.highContrastTheme;e.update(t,!1);let i=t.colors?.length>1;e.series.forEach(function(e){let s=t.plotOptions[e.type]||{},n=i&&void 0!==e.colorIndex?t.colors[e.colorIndex]:s.color||"window",r={color:s.color||"windowText",colors:i?t.colors:[s.color||"windowText"],borderColor:s.borderColor||"window",fillColor:n};e.update(r,!1),e.points&&e.points.forEach(function(e){e.options&&e.options.color&&e.update({color:s.color||"windowText",borderColor:s.borderColor||"window"},!1)})}),e.redraw()}},{error:ns,pick:nn}=w();function nr(e,t,i){let s=e,n,r=0;for(;r"series"!==e)):Object.keys(this.components):[]}update(){let e=this.components,t=this.chart,i=t.options.accessibility;nu(t,"beforeA11yUpdate"),t.types=this.getChartTypes();let s=i.keyboardNavigation.order;this.proxyProvider.updateGroupOrder(s),this.getComponentOrder().forEach(function(i){e[i].onChartUpdate(),nu(t,"afterA11yComponentUpdate",{name:i,component:e[i]})}),this.keyboardNavigation.update(s),!t.highContrastModeActive&&!1!==i.highContrastMode&&(ni.isHighContrastModeActive()||!0===i.highContrastMode)&&ni.setHighContrastTheme(t),nu(t,"afterA11yUpdate",{accessibility:this})}destroy(){let e=this.chart||{},t=this.components;Object.keys(t).forEach(function(e){t[e].destroy(),t[e].destroyBase()}),this.proxyProvider&&this.proxyProvider.destroy(),e.announcerContainer&&ng(e.announcerContainer),this.keyboardNavigation&&this.keyboardNavigation.destroy(),e.renderTo&&e.renderTo.setAttribute("aria-hidden",!0),e.focusElement&&e.focusElement.removeFocusBorder()}getChartTypes(){let e={};return this.chart.series.forEach(function(t){e[t.type]=1}),Object.keys(e)}}!function(e){function t(){this.accessibility&&this.accessibility.destroy()}function i(){this.a11yDirty&&this.renderTo&&(delete this.a11yDirty,this.updateA11yEnabled());let e=this.accessibility;e&&!e.zombie&&(e.proxyProvider.updateProxyElementPositions(),e.getComponentOrder().forEach(function(t){e.components[t].onChartRender()}))}function s(e){let t=e.options.accessibility;t&&(t.customComponents&&(this.options.accessibility.customComponents=t.customComponents,delete t.customComponents),np(!0,this.options.accessibility,t),this.accessibility&&this.accessibility.destroy&&(this.accessibility.destroy(),delete this.accessibility)),this.a11yDirty=!0}function n(){let t=this.accessibility,i=this.options.accessibility,s=this.renderer.boxWrapper.element,n=this.title;if(i&&i.enabled)t&&!t.zombie?t.update():(this.accessibility=t=new e(this),t&&!t.zombie&&t.update(),"img"===s.getAttribute("role")&&s.removeAttribute("role"));else if(t)t.destroy&&t.destroy(),delete this.accessibility;else{this.renderTo.setAttribute("role","img"),this.renderTo.setAttribute("aria-hidden",!1),this.renderTo.setAttribute("aria-label",(n&&n.element.textContent||"").replace(/{nc(e,t,function(){this.a11yDirty=!0})}),["afterApplyDrilldown","drillupall"].forEach(t=>{nc(e,t,function(){let e=this.accessibility;e&&!e.zombie&&e.update()})}),nc(a,"update",r),["update","updatedData","remove"].forEach(e=>{nc(l,e,function(){this.chart.accessibility&&(this.chart.a11yDirty=!0)})}))}}(nm||(nm={})),np(!0,nl,{accessibility:{enabled:!0,screenReaderSection:{beforeChartFormat:"<{headingTagName}>{chartTitle}
    {typeDescription}
    {chartSubtitle}
    {chartLongdesc}
    {playAsSoundButton}
    {viewTableButton}
    {xAxisDescription}
    {yAxisDescription}
    {annotationsTitle}{annotationsList}
    ",afterChartFormat:"{endOfChartMarker}",axisRangeDateFormat:"%Y-%m-%d %H:%M:%S"},series:{descriptionFormat:"{seriesDescription}{authorDescription}{axisDescription}",describeSingleSeries:!1,pointDescriptionEnabledThreshold:200},point:{valueDescriptionFormat:"{xDescription}{separator}{value}.",describeNull:!0},landmarkVerbosity:"all",linkedDescription:'*[data-highcharts-chart="{index}"] + .highcharts-description',highContrastMode:"auto",keyboardNavigation:{enabled:!0,focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:"#334eff",lineWidth:2,borderRadius:3},margin:2},order:["series","zoom","rangeSelector","navigator","legend","chartMenu"],wrapAround:!0,seriesNavigation:{skipNullPoints:!0,pointNavigationEnabledThreshold:!1,rememberPointFocus:!1}},announceNewData:{enabled:!1,minAnnounceInterval:5e3,interruptUser:!1}},legend:{accessibility:{enabled:!0,keyboardNavigation:{enabled:!0}}},exporting:{accessibility:{enabled:!0}},navigator:{accessibility:{enabled:!0}}},{accessibility:{highContrastTheme:{chart:{backgroundColor:"window"},title:{style:{color:"windowText"}},subtitle:{style:{color:"windowText"}},colorAxis:{minColor:"windowText",maxColor:"windowText",stops:[],dataClasses:[]},colors:["windowText"],xAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",tickColor:"windowText",title:{style:{color:"windowText"}}},yAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",tickColor:"windowText",title:{style:{color:"windowText"}}},tooltip:{backgroundColor:"window",borderColor:"windowText",style:{color:"windowText"}},plotOptions:{series:{lineColor:"windowText",fillColor:"window",borderColor:"windowText",edgeColor:"windowText",borderWidth:1,dataLabels:{connectorColor:"windowText",color:"windowText",style:{color:"windowText",textOutline:"none"}},marker:{lineColor:"windowText",fillColor:"windowText"}},pie:{color:"window",colors:["window"],borderColor:"windowText",borderWidth:1},boxplot:{fillColor:"window"},candlestick:{lineColor:"windowText",fillColor:"window"},errorbar:{fillColor:"window"}},legend:{backgroundColor:"window",itemStyle:{color:"windowText"},itemHoverStyle:{color:"windowText"},itemHiddenStyle:{color:"#555"},title:{style:{color:"windowText"}}},credits:{style:{color:"windowText"}},drilldown:{activeAxisLabelStyle:{color:"windowText"},activeDataLabelStyle:{color:"windowText"}},navigation:{buttonOptions:{symbolStroke:"windowText",theme:{fill:"window"}}},rangeSelector:{buttonTheme:{fill:"window",stroke:"windowText",style:{color:"windowText"},states:{hover:{fill:"window",stroke:"windowText",style:{color:"windowText"}},select:{fill:"#444",stroke:"windowText",style:{color:"windowText"}}}},inputBoxBorderColor:"windowText",inputStyle:{backgroundColor:"window",color:"windowText"},labelStyle:{color:"windowText"}},navigator:{handles:{backgroundColor:"window",borderColor:"windowText"},outlineColor:"windowText",maskFill:"transparent",series:{color:"windowText",lineColor:"windowText"},xAxis:{gridLineColor:"windowText"}},scrollbar:{barBackgroundColor:"#444",barBorderColor:"windowText",buttonArrowColor:"windowText",buttonBackgroundColor:"window",buttonBorderColor:"windowText",rifleColor:"windowText",trackBackgroundColor:"window",trackBorderColor:"windowText"}}},lang:{accessibility:{defaultChartTitle:"Chart",chartContainerLabel:"{title}. Highcharts interactive chart.",svgContainerLabel:"Interactive chart",drillUpButton:"{buttonText}",credits:"Chart credits: {creditsStr}",thousandsSep:",",svgContainerTitle:"",graphicContainerLabel:"",screenReaderSection:{beforeRegionLabel:"",afterRegionLabel:"",annotations:{heading:"Chart annotations summary",descriptionSinglePoint:"{annotationText}. Related to {annotationPoint}",descriptionMultiplePoints:"{annotationText}. Related to {annotationPoint}{#each additionalAnnotationPoints}, also related to {this}{/each}",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}"},navigator:{handleLabel:"{#eq handleIx 0}Start, percent{else}End, percent{/eq}",groupLabel:"Axis zoom",changeAnnouncement:"{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 {#eq numPoints 1}point{else}points{/eq}.",defaultMultiple:"Chart with {numSeries} data series.",splineSingle:"Line chart with {numPoints} data {#eq numPoints 1}point{else}points{/eq}.",splineMultiple:"Line chart with {numSeries} lines.",lineSingle:"Line chart with {numPoints} data {#eq numPoints 1}point{else}points{/eq}.",lineMultiple:"Line chart with {numSeries} lines.",columnSingle:"Bar chart with {numPoints} {#eq numPoints 1}bar{else}bars{/eq}.",columnMultiple:"Bar chart with {numSeries} data series.",barSingle:"Bar chart with {numPoints} {#eq numPoints 1}bar{else}bars{/eq}.",barMultiple:"Bar chart with {numSeries} data series.",pieSingle:"Pie chart with {numPoints} {#eq numPoints 1}slice{else}slices{/eq}.",pieMultiple:"Pie chart with {numSeries} pies.",scatterSingle:"Scatter chart with {numPoints} {#eq numPoints 1}point{else}points{/eq}.",scatterMultiple:"Scatter chart with {numSeries} data series.",boxplotSingle:"Boxplot with {numPoints} {#eq numPoints 1}box{else}boxes{/eq}.",boxplotMultiple:"Boxplot with {numSeries} data series.",bubbleSingle:"Bubble chart with {numPoints} {#eq numPoints 1}bubbles{else}bubble{/eq}.",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}{#unless @first},{/unless}{#if @last} and{/if} {this}{/each}.",yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}. {ranges[0]}",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#each names}{#unless @first},{/unless}{#if @last} and{/if} {this}{/each}.",timeRangeDays:"Data range: {range} days.",timeRangeHours:"Data range: {range} hours.",timeRangeMinutes:"Data range: {range} minutes.",timeRangeSeconds:"Data range: {range} seconds.",rangeFromTo:"Data ranges from {rangeFrom} to {rangeTo}.",rangeCategories:"Data range: {numCategories} categories."},exporting:{chartMenuLabel:"Chart menu",menuButtonLabel:"View chart menu, {chartTitle}"},series:{summary:{default:"{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",defaultCombination:"{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",line:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",lineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",spline:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",splineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",column:"{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.",columnCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.",bar:"{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.",barCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.",pie:"{series.name}, pie {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}slice{else}slices{/eq}.",pieCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Pie with {series.points.length} {#eq series.points.length 1}slice{else}slices{/eq}.",scatter:"{series.name}, scatter plot {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}point{else}points{/eq}.",scatterCombination:"{series.name}, series {seriesNumber} of {chart.series.length}, scatter plot with {series.points.length} {#eq series.points.length 1}point{else}points{/eq}.",boxplot:"{series.name}, boxplot {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}box{else}boxes{/eq}.",boxplotCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Boxplot with {series.points.length} {#eq series.points.length 1}box{else}boxes{/eq}.",bubble:"{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.",bubbleCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.",map:"{series.name}, map {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}area{else}areas{/eq}.",mapCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Map with {series.points.length} {#eq series.points.length 1}area{else}areas{/eq}.",mapline:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",maplineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.",mapbubble:"{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.",mapbubbleCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}."},description:"{description}",xAxisDescription:"X axis, {name}",yAxisDescription:"Y axis, {name}",nullPointValue:"No value",pointAnnotationsDescription:"{#each annotations}Annotation: {this}{/each}"}}}});let nb=nm,nf=w();nf.i18nFormat=nb.i18nFormat,nf.A11yChartUtilities=K,nf.A11yHTMLUtilities=S,nf.AccessibilityComponent=Z,nf.KeyboardNavigationHandler=Q,nf.SeriesAccessibilityDescriber=i8,nb.compose(nf.Chart,nf.Legend,nf.Point,nf.Series,nf.SVGElement,nf.RangeSelector);let nx=w();return y.default})()); \ No newline at end of file diff --git a/Scripts/highcharts/dashboards.js b/Scripts/highcharts/dashboards.js new file mode 100644 index 000000000..7004aae67 --- /dev/null +++ b/Scripts/highcharts/dashboards.js @@ -0,0 +1,11 @@ +!/** + * Highcharts Dashboards v3.2.0 (2025-03-26) + * + * (c) 2009-2024 Highsoft AS + * + * License: www.highcharts.com/license + */function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports=t&&t.document?e(t):e):"function"==typeof define&&define.amd?define("dashboards/dashboards",function(){return e(t)}):(t.Dashboards&&t.Dashboards.error(16,!0),t.Dashboards=e(t))}("undefined"!=typeof window?window:this,function(t){"use strict";var e={};function s(e,s,i,n){!e.hasOwnProperty(s)&&(e[s]=n.apply(null,i),t&&"function"==typeof CustomEvent&&t.dispatchEvent(new CustomEvent("DashboardsModuleLoaded",{detail:{path:s,module:e[s]}})))}return s(e,"Core/Globals.js",[],function(){var e,s;return(s=e||(e={})).SVG_NS="http://www.w3.org/2000/svg",s.product="Highcharts",s.version="3.2.0",s.win=void 0!==t?t:{},s.doc=s.win.document,s.svg=!!s.doc?.createElementNS?.(s.SVG_NS,"svg")?.createSVGRect,s.pageLang=s.doc?.documentElement?.closest("[lang]")?.lang,s.userAgent=s.win.navigator?.userAgent||"",s.isChrome=s.win.chrome,s.isFirefox=-1!==s.userAgent.indexOf("Firefox"),s.isMS=/(edge|msie|trident)/i.test(s.userAgent)&&!s.win.opera,s.isSafari=!s.isChrome&&-1!==s.userAgent.indexOf("Safari"),s.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(s.userAgent),s.isWebKit=-1!==s.userAgent.indexOf("AppleWebKit"),s.deg2rad=2*Math.PI/360,s.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],s.noop=function(){},s.supportsPassiveEvents=function(){let t=!1;if(!s.isMS){let e=Object.defineProperty({},"passive",{get:function(){t=!0}});s.win.addEventListener&&s.win.removeEventListener&&(s.win.addEventListener("testPassive",s.noop,e),s.win.removeEventListener("testPassive",s.noop,e))}return t}(),s.charts=[],s.composed=[],s.dateFormats={},s.seriesTypes={},s.symbolSizes={},s.chartCount=0,e}),s(e,"Core/Utilities.js",[e["Core/Globals.js"]],function(t){let e;let{charts:s,doc:i,win:n}=t;function o(e,s,i,r){let a=s?"Highcharts error":"Highcharts warning";32===e&&(e=`${a}: Deprecated member`);let l=u(e),h=l?`${a} #${e}: www.highcharts.com/errors/${e}/`:e.toString();if(void 0!==r){let t="";l&&(h+="?"),O(r,function(e,s){t+=` + - ${s}: ${e}`,l&&(h+=encodeURI(s)+"="+encodeURI(e))}),h+=t}N(t,"displayError",{chart:i,code:e,message:h,params:r},function(){if(s)throw Error(h);n.console&&-1===o.messages.indexOf(h)&&console.warn(h)}),o.messages.push(h)}function r(t,e){return parseInt(t,e||10)}function a(t){return"string"==typeof t}function l(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function h(t,e){return!!t&&"object"==typeof t&&(!e||!l(t))}function c(t){return h(t)&&"number"==typeof t.nodeType}function d(t){let e=t?.constructor;return!!(h(t,!0)&&!c(t)&&e?.name&&"Object"!==e.name)}function u(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function p(t){return null!=t}function m(t,e,s){let i;let n=a(e)&&!p(s),o=(e,s)=>{p(e)?t.setAttribute(s,e):n?(i=t.getAttribute(s))||"class"!==s||(i=t.getAttribute(s+"Name")):t.removeAttribute(s)};return a(e)?o(s,e):O(e,o),i}function f(t){return l(t)?t:[t]}function g(t,e){let s;for(s in t||(t={}),e)t[s]=e[s];return t}function y(){let t=arguments,e=t.length;for(let s=0;s1e14?t:parseFloat(t.toPrecision(e||14))}(o||(o={})).messages=[],Math.easeInOutSine=function(t){return -.5*(Math.cos(Math.PI*t)-1)};let v=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let s;let i=t.length;for(s=0;st.order-e.order),t.forEach(t=>{!1===t.fn.call(e,n)&&n.preventDefault()})}o&&!n.defaultPrevented&&o.call(e,n)}let x=function(){let t=Math.random().toString(36).substring(2,9)+"-",s=0;return function(){return"highcharts-"+(e?"":t)+s++}}();return n.jQuery&&(n.jQuery.fn.highcharts=function(){let e=[].slice.call(arguments);if(this[0])return e[0]?(new t[a(e[0])?e.shift():"Chart"](this[0],e[0],e[1]),this):s[m(this[0],"data-highcharts-chart")]}),{addEvent:function(e,s,i,n={}){let o="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents;t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,s,i,!!t.supportsPassiveEvents&&{passive:void 0===n.passive?-1!==s.indexOf("touch"):n.passive,capture:!1}),r[s]||(r[s]=[]);let l={fn:i,order:"number"==typeof n.order?n.order:1/0};return r[s].push(l),r[s].sort((t,e)=>t.order-e.order),function(){D(e,s,i)}},arrayMax:function(t){let e=t.length,s=t[0];for(;e--;)t[e]>s&&(s=t[e]);return s},arrayMin:function(t){let e=t.length,s=t[0];for(;e--;)t[e]e?t-1&&n[c]){s=f(s),o[c]=[];for(let e=0;e({center:.5,right:1,middle:.5,bottom:1})[t]||0,getClosestDistance:function(t,e){let s,i,n,o;let r=!e;return t.forEach(t=>{if(t.length>1)for(o=i=t.length-1;o>0;o--)(n=t[o]-t[o-1])<0&&!r?(e?.(),e=void 0):n&&(void 0===s||n=s-1&&(s=Math.floor(i)),Math.max(0,s-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===s)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));let a=n.getComputedStyle(e,void 0);return a&&(o=a.getPropertyValue(s),y(i,"opacity"!==s)&&(o=r(o))),o},insertItem:function(t,e){let s;let i=t.options.index,n=e.length;for(s=t.options.isInternal?n:0;s=t))&&(n||!(a<=(e[o]+(e[o+1]||e[o]))/2)));o++);return w(r*s,-Math.round(Math.log(.001)/Math.LN10))},objectEach:O,offset:function(t){let e=i.documentElement,s=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:s.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:s.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:s.width,height:s.height}},pad:function(t,e,s){return Array((e||2)+1-String(t).replace("-","").length).join(s||"0")+t},pick:y,pInt:r,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,s){return/%$/.test(t)?e*parseFloat(t)/100+(s||0):parseFloat(t)},removeEvent:D,replaceNested:function(t,...e){let s,i;do for(i of(s=t,e))t=t.replace(i[0],i[1]);while(t!==s);return t},splat:f,stableSort:function(t,e){let s,i;let n=t.length;for(i=0;i0?setTimeout(t,e,s):(t.call(0,s),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(t){return a(t)?t.substring(0,1).toUpperCase()+t.substring(1):String(t)},uniqueKey:x,useSerialIds:function(t){return e=y(t,e)},wrap:function(t,e,s){let i=t[e];t[e]=function(){let t=arguments,e=this;return s.apply(this,[function(){return i.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}}),s(e,"Core/Renderer/HTML/AST.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{SVG_NS:s,win:i}=t,{attr:n,createElement:o,css:r,error:a,isFunction:l,isString:h,objectEach:c,splat:d}=e,{trustedTypes:u}=i,p=u&&l(u.createPolicy)&&u.createPolicy("highcharts",{createHTML:t=>t}),m=p?p.createHTML(""):"";class f{static filterUserAttributes(t){return c(t,(e,s)=>{let i=!0;-1===f.allowedAttributes.indexOf(s)&&(i=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(s)&&(i=h(e)&&f.allowedReferences.some(t=>0===e.indexOf(t))),i||(a(33,!1,void 0,{"Invalid attribute in config":`${s}`}),delete t[s]),h(e)&&t[s]&&(t[s]=e.replace(/{let s=e.split(":").map(t=>t.trim()),i=s.shift();return i&&s.length&&(t[i.replace(/-([a-z])/g,t=>t[1].toUpperCase())]=s.join(":")),t},{})}static setElementHTML(t,e){t.innerHTML=f.emptyHTML,e&&new f(e).addToDOM(t)}constructor(t){this.nodes="string"==typeof t?this.parseMarkup(t):t}addToDOM(e){return function e(i,o){let l;return d(i).forEach(function(i){let h;let d=i.tagName,u=i.textContent?t.doc.createTextNode(i.textContent):void 0,p=f.bypassHTMLFiltering;if(d){if("#text"===d)h=u;else if(-1!==f.allowedTags.indexOf(d)||p){let a="svg"===d?s:o.namespaceURI||s,l=t.doc.createElementNS(a,d),m=i.attributes||{};c(i,function(t,e){"tagName"!==e&&"attributes"!==e&&"children"!==e&&"style"!==e&&"textContent"!==e&&(m[e]=t)}),n(l,p?m:f.filterUserAttributes(m)),i.style&&r(l,i.style),u&&l.appendChild(u),e(i.children||[],l),h=l}else a(33,!1,void 0,{"Invalid tagName in config":d})}h&&o.appendChild(h),l=h}),l}(this.nodes,e)}parseMarkup(t){let e;let s=[];t=t.trim().replace(/ style=(["'])/g," data-style=$1");try{e=new DOMParser().parseFromString(p?p.createHTML(t):t,"text/html")}catch(t){}if(!e){let s=o("div");s.innerHTML=t,e={body:s}}let i=(t,e)=>{let s=t.nodeName.toLowerCase(),n={tagName:s};"#text"===s&&(n.textContent=t.textContent||"");let o=t.attributes;if(o){let t={};[].forEach.call(o,e=>{"data-style"===e.name?n.style=f.parseStyle(e.value):t[e.name]=e.value}),n.attributes=t}if(t.childNodes.length){let e=[];[].forEach.call(t.childNodes,t=>{i(t,e)}),e.length&&(n.children=e)}e.push(n)};return[].forEach.call(e.body.childNodes,t=>i(t,s)),s}}return f.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],f.allowedReferences=["https://","http://","mailto:","/","../","./","#"],f.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],f.emptyHTML=m,f.bypassHTMLFiltering=!1,f}),s(e,"Dashboards/Components/ComponentRegistry.js",[],function(){var t,e;return(e=t||(t={})).types={},e.registerComponent=function(t,s){return!!t&&!e.types[t]&&!!(e.types[t]=s)},t}),s(e,"Dashboards/Globals.js",[],function(){var e,s;return(s=e||(e={})).classNamePrefix="highcharts-dashboards-",s.classNames={layout:s.classNamePrefix+"layout",cell:s.classNamePrefix+"cell",cellHover:s.classNamePrefix+"cell-state-hover",cellActive:s.classNamePrefix+"cell-state-active",cellLoading:s.classNamePrefix+"cell-state-loading",row:s.classNamePrefix+"row",layoutsWrapper:s.classNamePrefix+"layouts-wrapper",boardContainer:s.classNamePrefix+"wrapper"},s.guiElementType={row:"row",cell:"cell",layout:"layout"},s.boards=[],s.win=t,s.doc=document,s.noop=function(){},s.isMS=/(edge|msie|trident)/i.test(s.win.navigator&&s.win.navigator.userAgent||"")&&!s.win.opera,s.supportsPassiveEvents=function(){let t=!1;if(!s.isMS){let e=Object.defineProperty({},"passive",{get:function(){t=!0}});s.win.addEventListener&&s.win.removeEventListener&&(s.win.addEventListener("testPassive",s.noop,e),s.win.removeEventListener("testPassive",s.noop,e))}return t}(),e}),s(e,"Dashboards/EditMode/EditGlobals.js",[e["Dashboards/Globals.js"]],function(t){let e=t.classNamePrefix+"edit-";return{classNames:{resizeSnap:e+"resize-snap",resizeSnapX:e+"resize-snap-x",resizeSnapY:e+"resize-snap-y",separator:e+"separator",contextMenuBtn:e+"context-menu-btn",contextMenuBtnText:e+"context-menu-btn-text",contextMenu:e+"context-menu",contextMenuItem:e+"context-menu-item",editModeEnabled:e+"enabled",editToolbar:e+"toolbar",editToolbarCellOutline:e+"toolbar-cell-outline",editToolbarRowOutline:e+"toolbar-row-outline",editToolbarItem:e+"toolbar-item",editToolbarRow:e+"toolbar-row",editToolbarCell:e+"toolbar-cell",editSidebar:e+"sidebar",editSidebarShow:e+"sidebar-show",editSidebarHide:e+"sidebar-hide",editSidebarHeader:e+"sidebar-header",editSidebarTitle:e+"sidebar-title",editSidebarMenuItem:e+"sidebar-item",rowContextHighlight:e+"row-context-highlight",cellEditHighlight:e+"cell-highlight",dashboardCellEditHighlightActive:e+"cell-highlight-active",dragMock:e+"drag-mock",dropPointer:e+"drop-pointer",contextDetectionPointer:e+"ctx-detection-pointer",resizePointer:e+"resize-pointer",currentEditedElement:e+"unmask",maskElement:e+"mask",menuItem:e+"menu-item",menu:e+"menu",menuVerticalSeparator:e+"menu-vertical-separator",menuHorizontalSeparator:e+"menu-horizontal-separator",menuDestroy:e+"menu-destroy",editSidebarWrapper:e+"sidebar-wrapper",customSelect:e+"custom-select",customSelectButton:e+"custom-option-button",toggleContainer:e+"toggle-container",toggleWrapper:e+"toggle-wrapper",toggleSlider:e+"toggle-slider",toggleWrapperColored:e+"toggle-wrapper-colored",toggleLabels:e+"toggle-labels",labeledToggleWrapper:e+"labeled-toggle-wrapper",button:e+"button",sidebarNavButton:e+"sidebar-button-nav",labelText:e+"label-text",editSidebarTabBtn:e+"sidebar-tab-btn",editToolsBtn:e+"tools-btn",editTools:e+"tools",editGridItems:e+"grid-items",confirmationPopup:e+"confirmation-popup",popupButtonContainer:e+"confirmation-popup-button-container",popupContentContainer:e+"confirmation-popup-content",popupCancelBtn:e+"confirmation-popup-cancel-btn",popupConfirmBtn:e+"confirmation-popup-confirm-btn",popupCloseButton:e+"popup-close",editOverlay:e+"overlay",editOverlayActive:e+"overlay-active",resizerMenuBtnActive:e+"resizer-menu-btn-active",sidebarCloseButton:e+"close-btn",editSidebarTabBtnWrapper:e+"tabs-buttons-wrapper",editSidebarRight:e+"sidebar-right",editSidebarRightShow:e+"sidebar-right-show",viewFullscreen:e+"view-fullscreen",accordionMenu:e+"accordion-menu",accordionContainer:e+"accordion",accordionHeader:e+"accordion-header",accordionHeaderBtn:e+"accordion-header-btn",accordionHeaderWrapper:e+"accordion-header-wrapper",accordionHeaderIcon:e+"accordion-header-icon",accordionContent:e+"accordion-content",accordionNestedWrapper:e+"accordion-nested",accordionMenuButtonsContainer:e+"accordion-menu-buttons-container",accordionMenuButton:e+"accordion-menu-button",accordionStandaloneWrapper:e+"accordion-standalone-wrapper",hiddenElement:e+"hidden-element",collapsableContentHeader:e+"collapsable-content-header",standaloneElement:e+"standalone-element",collapsedElement:e+"collapsed-element",dropdown:e+"dropdown",dropdownContent:e+"dropdown-content",dropdownButton:e+"dropdown-button",dropdownButtonContent:e+"dropdown-button-content",dropdownIcon:e+"pointer",icon:e+"icon"},lang:{accessibility:{contextMenu:{button:"Context menu"},editMode:{editMode:"Edit mode toggle button"}},addComponent:"Add component",cancelButton:"Cancel",caption:"Caption",chartClassName:"Chart class name",chartConfig:"Chart configuration",chartID:"Chart ID",chartOptions:"Chart options",chartType:"Chart type",connectorName:"Connector name",confirmButton:"Confirm",confirmDestroyCell:"Do you really want to destroy the cell?",confirmDestroyRow:"Do you really want to destroy the row?",confirmDiscardChanges:"Do you really want to discard the changes?",dataLabels:"Data labels",editMode:"Edit mode",errorMessage:"Something went wrong",exitFullscreen:"Exit full screen",htmlInput:"HTML",id:"Id",off:"off",on:"on",pointFormat:"Point format",settings:"Settings",style:"Styles",title:"Title",viewFullscreen:"View in full screen",sidebar:{HTML:"HTML",row:"Row",Highcharts:"Highcharts",DataGrid:"DataGrid",KPI:"KPI"}}}}),s(e,"Dashboards/Layout/GUIElement.js",[e["Dashboards/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{addEvent:s,createElement:i,uniqueKey:n,objectEach:o,error:r}=e;return class{static getOffsets(t,e){let s={left:0,top:0,right:0,bottom:0};if(!t.container)return s;let i=t.container.getBoundingClientRect(),n=e?e.getBoundingClientRect():{left:0,top:0};return s.left=i.left-n.left,s.top=i.top-n.top,s.right=i.right-n.left,s.bottom=i.bottom-n.top,s}static getDimFromOffsets(t){return{width:t.right-t.left,height:t.bottom-t.top}}static getElementId(e){return t.classNamePrefix+e+"-"+n().slice(11)}static getPercentageWidth(t){let e;let s=/^(\d{1})[\-\/\.](\d{1,2})$/;if(s.test(t)){let i=t.match(s)||[];e=((e=100*+i[1]/+i[2])<=100?e:100)+"%"}else if(-1!==t.indexOf("%")){let s=parseFloat(t);e=(s<=100?s>=0?s:0:100)+"%"}return e}getElementContainer(t){let e;let n=this;if(t.render)t.attribs&&!t.attribs.id&&delete t.attribs.id;else if("string"==typeof t.elementId){let e=document.getElementById(t.elementId);e?n.container=e:r("Element "+t.elementId+" does not exist")}return t.element instanceof HTMLElement?e=t.element:e=i("div",t.attribs||{},t.style||{},t.parentContainer),n.removeBindedEventFn=s(e,"bindedGUIElement",function(t){t.guiElement=n,t.stopImmediatePropagation()}),e}destroy(){let t=this;t.removeBindedEventFn&&t.removeBindedEventFn(),t.container&&t.container.parentNode&&t.container.parentNode.removeChild(t.container),o(t,function(e,s){delete t[s]})}getType(){return this.type}changeVisibility(t=!0,e){let s=this.isVisible&&!t||!this.isVisible&&t;this.container&&s&&(this.container.style.display=t?e||"block":"none",this.isVisible=t)}hide(){this.changeVisibility(!1)}show(){this.changeVisibility()}}}),s(e,"Dashboards/Layout/CellHTML.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/Globals.js"],e["Dashboards/Layout/GUIElement.js"]],function(t,e,s){var i;class n extends s{constructor(t){super(),this.type="cell-html",this.options=t,this.id=t.id,this.container=t.container,this.mountedComponent=t.mountedComponent}destroy(){this.mountedComponent?.destroy(),super.destroy()}setHighlight(){this.container.classList.toggle(t.classNames.cellEditHighlight),this.mountedComponent?.board.container.classList.toggle(t.classNames.dashboardCellEditHighlightActive)}setActiveState(){this.container&&this.container.classList.add(e.classNames.cellActive)}}return(i=n||(n={})).isCellHTML=function(t){return t instanceof i},n}),s(e,"Dashboards/Actions/Bindings.js",[e["Dashboards/Components/ComponentRegistry.js"],e["Dashboards/Layout/CellHTML.js"],e["Dashboards/Globals.js"],e["Core/Utilities.js"]],function(t,e,s,i){var n;let{addEvent:o,fireEvent:r}=i;return function(i){function n(t,e){let s;"string"==typeof t&&document.querySelectorAll("#"+t).length>1&&console.warn(`Multiple cells have identical ID %c${t}%c, potentially leading to unexpected behavior. +Ensure that each cell has a unique ID on the page.`,"font-weight: bold","");let i=e?e.querySelector("#"+t):document.getElementById(t);return null!==i&&r(i,"bindedGUIElement",{},function(t){s=t.guiElement}),s}async function a(n,a,l){let h=n.states,c=n.events,d=n.renderTo||n.cell;if(!d){console.error("The%c renderTo%c option is required to render the component.","font-weight: bold","");return}if(a.mountedComponents.filter(t=>(t.options.renderTo||t.options.cell)===d).length>0){console.error(`A component has already been declared in the cell %c${d}%c use a different cell.`,"font-weight: bold","");return}l=l||i.getCell(d,a.container);let u=l?.container||document.querySelector("#"+d);if(!u||!n.type){console.error(`The component is unable to find the HTML cell element %c${d}%c to render the content.`,"font-weight: bold","");return}let p=t.types[n.type];!p&&(console.error(`The component's type %c${n.type}%c does not exist.`,"font-weight: bold",""),l&&(p=t.types.HTML,n.title={text:a.editMode?.lang.errorMessage||"Something went wrong",className:s.classNamePrefix+"component-title-error "+s.classNamePrefix+"component-title"}));let m=new p(l,n,a),f=m.load().catch(t=>{console.error(t),m.update({connector:{id:""},title:{text:a.editMode?.lang.errorMessage||"Something went wrong",className:s.classNamePrefix+"component-title-error "+s.classNamePrefix+"component-title"}})});return l&&(m.setCell(l),l.mountedComponent=m),a.mountedComponents.push({options:n,component:m,cell:l||new e({id:d,container:u,mountedComponent:m})}),l&&h?.active?.enabled&&h?.active?.isActive&&(l.setActiveState(),m.isActive=!0),r(m,"mount"),o(u,"click",()=>{c&&c.click&&c.click.call(m),l&&m&&u&&h?.active?.enabled&&(l.setActiveState(),m.isActive=!0)}),h?.hover?.enabled&&u.classList.add(s.classNames.cellHover),r(m,"afterLoad"),f}i.addComponent=a,i.componentFromJSON=function(e){let s=t.types[e.$class];if(!s)return;let n=i.getCell(e.options.renderTo||"");if(!n)return;let o=s.fromJSON(e,n);return o&&o.render(),o},i.getCell=function(t,e){let s=n(t,e);if(s&&"cell"===s.getType())return s},i.getRow=function(t,e){let s=n(t,e);if(s&&"row"===s.getType())return s},i.getLayout=function(t,e){let s=n(t,e);if(s&&"layout"===s.getType())return s}}(n||(n={})),n}),s(e,"Dashboards/Layout/Cell.js",[e["Dashboards/Actions/Bindings.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/Globals.js"],e["Dashboards/Layout/GUIElement.js"],e["Core/Utilities.js"]],function(t,e,s,i,n){var o;let{componentFromJSON:r}=t,{merge:a,fireEvent:l}=n;class h extends i{static fromJSON(t,e){if(e){let s=t.options,i=s.containerId;return e.layout.copyId&&(i=i+"_"+e.layout.copyId),new h(e,{id:i,parentContainerId:e.container&&e.container.id||s.parentContainerId,mountedComponentJSON:s.mountedComponentJSON,style:s.style,layoutJSON:s.layoutJSON,width:s.width,height:s.height})}}constructor(t,e,i){let n;super(),this.type=s.guiElementType.cell,this.id=e.id,this.options=e,this.row=t,this.isVisible=!0;let o=document.getElementById(e.parentContainerId||"")||t.container,r=t.layout.options||{},l=t.options||{},h=r.cellClassName||"";if(e.height&&(n="number"==typeof e.height?e.height+"px":e.height),this.container=this.getElementContainer({render:t.layout.board.guiEnabled,parentContainer:o,attribs:{id:e.id,className:s.classNames.cell+" "+h},element:i,elementId:e.id,style:a(r.style,l.style,e.style,{height:n})}),this.options.mountedComponentJSON&&this.mountComponentFromJSON(this.options.mountedComponentJSON),this.options.layout&&this.setNestedLayout(),this.options.layoutJSON){let t=this.row.layout,e=t.board,s=t.constructor.fromJSON;this.nestedLayout=s(a(this.options.layoutJSON,{parentContainerId:this.options.id}),e,this)}}setNestedLayout(){let t=this.row.layout.board,e=this.row.layout.constructor,s=t.options.gui;this.nestedLayout=new e(t,a({},s&&s.layoutOptions,this.options.layout,{parentContainerId:this.options.id}),this)}mountComponentFromJSON(t){this.id!==t.options.parentElement&&(t.options.parentElement=this.id);let e=r(t);return!!e&&(this.mountedComponent=e,!0)}destroy(){let{row:t}=this;this.mountedComponent?.destroy(),this.nestedLayout?.destroy(),t.unmountCell(this);let e=t.cells?.length===0;super.destroy(),e&&t.destroy()}toJSON(){let t=(this.row.container||{}).id||"";return{$class:"Dashboards.Layout.Cell",options:{containerId:this.container.id,parentContainerId:t,width:this.options.width,height:this.options.height,mountedComponentJSON:this.mountedComponent&&this.mountedComponent.toJSON(),style:this.options.style,layoutJSON:this.nestedLayout&&this.nestedLayout.toJSON()}}}getOptions(){return this.options}changeVisibility(t=!0){super.changeVisibility(t);let e=this,s=e.row;e.row.getVisibleCells().length?e.isVisible&&!s.isVisible&&e.row.show():e.row.hide(),setTimeout(()=>{l(s,"cellChange",{row:s,cell:e})},0)}getParentCell(t){let e;if(t<=this.row.layout.level){if(this.row.layout.level===t)return this;if(this.row.layout.level-1>=0&&(e=this.row.layout.parentCell))return e.getParentCell(t)}}getOverlappingLevels(t,e,s){let n=this.row.layout.parentCell,o=[this.row.layout.level];if(n){let r=s||i.getOffsets(this)[t],a=i.getOffsets(n)[t];Math.abs(r-a){t.cell.container&&t.cell.container.classList.remove(s.classNames.cellActive),t.component.isActive=!1}),this.container&&this.container.classList.add(s.classNames.cellActive)}setLoadingState(t=!0){this.container?.classList?.toggle(s.classNames.cellLoading,t)}convertWidthToValue(t){return"number"==typeof t?t+"px":/px/.test(t)?t:i.getPercentageWidth(t)||""}}return(o=h||(h={})).isCell=function(t){return t instanceof o},h}),s(e,"Dashboards/CallbackRegistry.js",[],function(){return class{constructor(){this.registry={}}addCallback(t,e){this.registry[t]=e}getCallback(t){return this.registry[t]}toJSON(){let t={};return Object.keys(this.registry).forEach(e=>{let{func:s,type:i}=this.getCallback(e);t[e]={func:s.toString(),type:i}}),t}}}),s(e,"Dashboards/Components/ConnectorHandler.js",[e["Dashboards/Layout/Cell.js"],e["Dashboards/Globals.js"]],function(t,e){return class{constructor(t,e){this.tableEvents=[],this.component=t,this.options=e}async initConnector(){let e=this.component,s=this.options.id,i=this.component.board.dataPool;if(s&&(this.connectorId!==s||i.isNewConnector(s))){t.isCell(e.cell)&&e.cell.setLoadingState();let n=await i.getConnector(s);this.setConnector(n)}return e}setConnector(t){for(;this.tableEvents.length;){let t=this.tableEvents.pop();"function"==typeof t&&t()}return this.connector=t,t&&(this.clearTableListeners(),this.setupTableListeners(t.table),t.table.on("setModifier",()=>this.clearTableListeners()),t.table.on("afterSetModifier",e=>{"afterSetModifier"===e.type&&e.modified&&(this.setupTableListeners(e.modified),this.component.emit({type:"tableChanged",connector:t}))}),t.table&&(this.presentationModifier?this.presentationTable=this.presentationModifier.modifyTable(t.table.modified.clone()).modified:this.presentationTable=t.table)),this.addConnectorAssignment(),this.component}setupTableListeners(t){let s=this.connector;s&&t&&["afterDeleteRows","afterSetCell","afterSetColumns","afterSetRows"].forEach(i=>{this.tableEvents.push(t.on(i,t=>{clearTimeout(this.tableEventTimeout),this.tableEventTimeout=e.win.setTimeout(()=>{this.component.emit({...t,type:"tableChanged",targetConnector:s}),this.tableEventTimeout=void 0})}))})}clearTableListeners(){let t=this.connector,s=this.tableEvents;this.removeTableEvents(),t&&s.push(t.table.on("afterSetModifier",s=>{"afterSetModifier"===s.type&&(clearTimeout(this.tableEventTimeout),this.tableEventTimeout=e.win.setTimeout(()=>{t.emit({...s,type:"tableChanged",targetConnector:t}),this.tableEventTimeout=void 0}))}))}addConnectorAssignment(){let{connector:t}=this;if(t&&(t.components||(t.components=[]),!t.components.includes(this.component))){let e=t.options;t.components.push(this.component),"enablePolling"in e&&e.enablePolling&&!t.polling&&1===t.components.length&&"dataRefreshRate"in e&&t.startPolling(1e3*Math.max(e.dataRefreshRate||0,1))}}removeConnectorAssignment(){let{connector:t}=this;if(!t?.components)return;let e=t.components.indexOf(this.component);e>-1&&(t.components.splice(e,1),t.components.length||(t.stopPolling(),delete t.components))}removeTableEvents(){this.tableEvents.forEach(t=>t()),this.tableEvents.length=0}updateOptions(t){this.options=t}destroy(){this.removeConnectorAssignment(),this.removeTableEvents()}}}),s(e,"Dashboards/Components/EditableOptions.js",[],function(){class t{constructor(e,s=t.defaultBindings){this.component=e,this.bindings=s}getOptions(){let t=this.component.options.editableOptions;if(!t)return[];for(let e=0,s=t.length;e"connector"===t)){let t=this.component.board,e=t?t.dataPool.getConnectorIds().map(t=>({name:t})):[];s.selectOptions=e}}return t}}return t.defaultBindings={keyMap:{color:"colorPicker",title:"text",caption:"text",style:"textarea"},typeMap:{string:"text",number:"input",boolean:"toggle"},skipRedraw:[]},t.defaultTypeMap={string:"text",number:"input",boolean:"toggle"},t}),s(e,"Dashboards/Components/Sync/Emitter.js",[],function(){class t{static register(t){let{id:e}=t;this.registry[e]=t}static get(t){return this.registry[t]}constructor(e,s){this.id=e,this.func=s,t.register(this)}create(t){this.callback=this.func.call(t)}remove(){this.callback&&this.callback()}}return t.registry={},t}),s(e,"Dashboards/Components/Sync/Handler.js",[],function(){class t{static register(t){let{id:e}=t;this.registry[e]=t}static get(t){return this.registry[t]}constructor(e,s){this.id=e,this.func=s,t.register(this)}register(t){let{func:e}=this;this.callback=e.call(t)}remove(){this.callback&&this.callback()}}return t.registry={},t}),s(e,"Dashboards/Components/Sync/Sync.js",[e["Dashboards/Components/Sync/Emitter.js"],e["Dashboards/Components/Sync/Handler.js"],e["Core/Utilities.js"]],function(t,e,s){let{merge:i,isObject:n}=s;class o{constructor(t,e){this.component=t,this.predefinedSyncConfig=e,this.syncConfig=o.prepareSyncConfig(e,t.options.sync),this.registeredSyncHandlers={},this.registeredSyncEmitters={},this.isSyncing=!1,this.listeners=[]}static prepareSyncConfig(t,e={}){let{defaultSyncPairs:s,defaultSyncOptions:o}=t;return Object.keys(e).reduce((t,r)=>{if(r){let a=s[r],l=o[r],h=e[r],c=i(l||{},{enabled:n(h)?h.enabled:h},n(h)?h:{});if(a&&c.enabled)for(let t of["emitter","handler"])(!0===c[t]||void 0===c[t])&&(c[t]=a[t]);t[r]=c}return t},{})}registerSyncEmitter(t){let{id:e}=t;this.registeredSyncEmitters[e]=t}isRegisteredEmitter(t){return!!this.registeredSyncEmitters[t]}registerSyncHandler(t){let{id:e}=t;this.registeredSyncHandlers[e]=t}isRegisteredHandler(t){return!!this.registeredSyncHandlers[t]}start(){let{component:s}=this;for(let i of(this.syncConfig=o.prepareSyncConfig(this.predefinedSyncConfig,s.options.sync),Object.keys(this.syncConfig))){let n=this.syncConfig[i];if(!n)continue;let{emitter:r,handler:a}=n;if(a){!0===a&&(a=o.defaultHandlers[i].handler);let t=new e(i,a);this.isRegisteredHandler(t.id)||(this.registerSyncHandler(t),t.register(s))}if(r){!0===r&&(r=o.defaultHandlers[i].emitter);let e=new t(i,r);this.isRegisteredEmitter(e.id)||(this.registerSyncEmitter(e),e.create(s))}}this.isSyncing=!0,this.listeners.push(s.on("update",()=>this.stop()))}stop(){let{component:t,listeners:e,registeredSyncHandlers:s,registeredSyncEmitters:i}=this;Object.keys(s).forEach(t=>{s[t].remove(),delete s[t]}),Object.keys(i).forEach(t=>{i[t].remove(),delete i[t]}),this.isSyncing=!1;for(let t=0,s=e.length;t{this.start()}))}}return o.defaultHandlers={},o}),s(e,"Dashboards/Components/ComponentUtilities.js",[],function(){var e;return function(e){function s(e,s){let i=t.getComputedStyle(e);return s.map(t=>i[t])}function i(t,e){return e&&(t+="number"==typeof e?e:parseFloat(e)),t}e.getMargins=function(t,e=!0){let n={x:["borderLeft","borderRight"],y:["borderTop","borderBottom"]};return{y:s(t,["marginTop","marginBottom",...e?n.y:[]]).reduce(i,0),x:s(t,["marginLeft","marginTop",...e?n.x:[]]).reduce(i,0)}},e.getPaddings=function(t){return{x:s(t,["paddingLeft","paddingRight"]).reduce(i,0),y:s(t,["paddingTop","paddingBottom"]).reduce(i,0)}},e.getStyles=s,e.sumPixels=i}(e||(e={})),e}),s(e,"Dashboards/Utilities.js",[e["Dashboards/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{doc:s,supportsPassiveEvents:i}=t,{error:n,isClass:o,isDOMElement:r,isObject:a,objectEach:l,uniqueKey:h}=e;function c(t,e){let s;for(s in t||(t={}),e)t[s]=e[s];return t}function d(t,e,s){function i(e,s){let i=t.removeEventListener;i&&i.call(t,e,s,!1)}function n(s){let n,o;t.nodeName&&(e?(n={})[e]=!0:n=s,l(n,function(t,e){if(s[e])for(o=s[e].length;o--;)i(e,s[e][o].fn)}))}let o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){let t=o.hcEvents;if(e){let o=t[e]||[];s?(t[e]=o.filter(function(t){return s!==t.fn}),i(e,s)):(n(t),t[e]=[])}else n(t),delete o.hcEvents}}return{addEvent:function(t,e,s,n={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents,a=t.addEventListener;a&&a.call(t,e,s,!!i&&{passive:void 0===n.passive?-1!==e.indexOf("touch"):n.passive,capture:!1}),r[e]||(r[e]=[]);let l={fn:s,order:"number"==typeof n.order?n.order:1/0};return r[e].push(l),r[e].sort((t,e)=>t.order-e.order),function(){d(t,e,s)}},deepClone:function t(e,s){if(Array.isArray(e))return e.map(e=>t(e,s));if(e&&"object"==typeof e){let i={};for(let n of Object.keys(e))s&&s.includes(n)?i[n]=e[n]:i[n]=t(e[n],s);return i}return e},error:function(t,e){if(16===t){console.warn("Dashboard error: Dashboards library loaded more than once.This may cause undefined behavior.");return}n(t,e)},fireEvent:function(e,i,n,o){if(n=n||{},s?.createEvent&&(e.dispatchEvent||e.fireEvent&&e!==t)){let t=s.createEvent("Events");t.initEvent(i,!0,!0),n=c(t,n),e.dispatchEvent?e.dispatchEvent(n):e.fireEvent(i,n)}else if(e.hcEvents){n.target||c(n,{preventDefault:function(){n.defaultPrevented=!0},target:e,type:i});let t=[],s=e,o=!1;for(;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[i]&&(t.length&&(o=!0),t.unshift.apply(t,s.hcEvents[i])),s=Object.getPrototypeOf(s);o&&t.sort((t,e)=>t.order-e.order),t.forEach(t=>{!1===t.fn.call(e,n)&&n.preventDefault()})}o&&!n.defaultPrevented&&o.call(e,n)},merge:function(t,...e){let s=0,i={},n=Error("Recursive copy depth > 100"),h=(t,e)=>{if("object"!=typeof t&&(t={}),++s>100)throw n;return l(e,(s,i)=>{"__proto__"!==i&&"constructor"!==i&&(!a(s,!0)||o(s)||r(s)?t[i]=e[i]:t[i]=h(t[i]||{},s))}),--s,t};!0===t?i=e.shift():e.unshift(t);for(let t=0,s=e.length;t{e.isCell(this.cell)&&this.cell.setLoadingState()}),this.on("afterRender",()=>{e.isCell(this.cell)&&this.cell.setLoadingState(!1)})),this.on("tableChanged",()=>{this.onTableChanged()})}getOptionsOnDrop(t){return{}}getFirstConnector(){return this.connectorHandlers[0]?.connector}attachCellListeners(){for(;this.cellListeners.length;){let t=this.cellListeners.pop();t&&t()}if(this.cell&&e.isCell(this.cell)&&Object.keys(this.cell).length){let t=this.cell.row.layout.board;this.cellListeners.push(f(t,"cellResize",()=>{this.resizeTo(this.parentElement)}),f(this.cell.row,"cellChange",t=>{let{row:e}=t;e&&this.cell&&void 0===e.getCellIndex(this.cell)&&this.cell&&this.setCell(this.cell)}))}}setCell(t,e=!1){this.cell=t,t.container&&(this.parentElement=t.container),this.attachCellListeners(),e&&this.resizeTo(this.parentElement)}async initConnectors(){for(let t of(m(this,"setConnectors",{connectorHandlers:this.connectorHandlers}),this.connectorHandlers))await t.initConnector();return m(this,"afterSetConnectors",{connectorHandlers:this.connectorHandlers}),this}getContentHeight(){return(this.titleElement?this.titleElement.clientHeight+v(this.titleElement).y:0)+(this.captionElement?this.captionElement.clientHeight+v(this.captionElement).y:0)}resize(t,e){if(e){let t=O(this.element).y+v(this.element).y;this.element.style.height="calc(100% - "+t+"px)",this.contentElement.style.height="calc(100% - "+this.getContentHeight()+"px)"}else null===e&&(this.dimensions.height=null,this.element.style.removeProperty("height"));m(this,"resize",{width:t,height:e})}resizeDynamicContent(t,e){let{element:s}=this;if(e){let t=v(s).y,i=O(s).y;"string"==typeof e&&(e=parseFloat(e)),e=Math.round(e),s.style.height=`${e-t-i}px`,this.contentElement.style.height=`${s.clientHeight-this.getContentHeight()-i}px`}else null===e&&(this.dimensions.height=null,s.style.removeProperty("height"));m(this,"resize",{width:t,height:e})}resizeTo(t){for(;this.resizeTimeouts.length;){let t=this.resizeTimeouts.pop();t&&cancelAnimationFrame(t)}let e=requestAnimationFrame(()=>{let{width:e,height:s}=t.getBoundingClientRect(),i=O(t),n=v(t);this.resize(e-i.x-n.x,s-i.y-n.y)});this.resizeTimeouts.push(e)}async update(t,e=!0){let s={options:t,shouldForceRerender:!1};m(this,"update",s),t.connector&&Array.isArray(this.options.connector)&&(this.options.connector=void 0),this.options=p(this.options,t);let n=this.options.connector?u(this.options.connector)?this.options.connector:[this.options.connector]:[],o=n.length!==this.connectorHandlers.length;if(!o)for(let t=0,e=n.length;t{let s=e[t];s&&this.callbackRegistry.addCallback(t,{type:"component",func:s})}),g(e,(t,e)=>{y(t)&&this.on(e,t)}));let s=()=>{this.resizeTo(this.parentElement)};if("function"==typeof ResizeObserver)this.resizeObserver=new ResizeObserver(s),this.resizeObserver.observe(this.element);else{let e=f(t,"resize",s);f(this,"destroy",e)}}setTitle(t){let e=this.titleElement;if(t&&("string"==typeof t||t.text)){let s=x.createTextElement("h2","title",t);s&&(e?e.replaceWith(s):this.element.insertBefore(s,this.element.firstChild),this.titleElement=s)}else if(e){e.remove(),delete this.titleElement;return}}setCaption(t){let e=this.captionElement;if(t&&("string"==typeof t||t.text)){let s=x.createTextElement("div","caption",t);s&&(e?e.replaceWith(s):this.element.appendChild(s),this.captionElement=s)}else if(e){e.remove(),delete this.captionElement;return}}async load(){return await this.initConnectors(),this.render(),this}render(){return this.emit({type:"render"}),this.setTitle(this.options.title),this.setCaption(this.options.caption),this.resizeTo(this.parentElement),this}destroy(){for(this.sync.isSyncing&&this.sync.stop();this.element.firstChild;)this.element.firstChild.remove();for(let t of(m(this,"unmount"),this.connectorHandlers))t.destroy();w(this),this.element.remove()}on(t,e){return f(this,t,e)}emit(t){t.target||(t.target=this),m(this,t.type,t)}toJSON(){let t={width:0,height:0};return g(this.dimensions,function(e,s){null!==e&&(t[s]=e)}),{$class:this.options.type,options:{renderTo:this.options.renderTo,parentElement:this.parentElement.id,dimensions:t,id:this.id,type:this.type}}}getOptions(){return C(this.options,x.defaultOptions)}getEditableOptions(){return D(this.options,["dataTable","points","series","data","editableOptions"])}getEditableOptionValue(t){if(!t)return;let e=this.getEditableOptions();for(let s=0,i=t.length;s1)return"multiple connectors";if(!e)return;!1===(e=e[t[s]])&&(t.indexOf("title")>=0||t.indexOf("subtitle")>=0||t.indexOf("caption")>=0)&&(e="")}return e}}return x.Sync=o,x.predefinedSyncConfig={defaultSyncOptions:{},defaultSyncPairs:{}},x.defaultOptions={className:`${c}component`,id:"",title:!1,caption:!1,sync:o.defaultHandlers,editableOptions:[{name:"title",propertyPath:["title"],type:"input"},{name:"caption",propertyPath:["caption"],type:"input"}]},x}),s(e,"Dashboards/Components/HTMLComponent/HTMLComponentDefaults.js",[e["Dashboards/Components/Component.js"]],function(t){return{type:"HTML",className:[t.defaultOptions.className,`${t.defaultOptions.className}-html`].join(" "),elements:[],editableOptions:[...t.defaultOptions.editableOptions||[],{name:"htmlInput",propertyPath:["html"],type:"textarea"}]}}),s(e,"Dashboards/Components/HTMLComponent/HTMLSyncs/HTMLSyncs.js",[],function(){return{defaultSyncPairs:{},defaultSyncOptions:{}}}),s(e,"Dashboards/Components/HTMLComponent/HTMLComponent.js",[e["Core/Renderer/HTML/AST.js"],e["Dashboards/Components/Component.js"],e["Dashboards/Components/HTMLComponent/HTMLComponentDefaults.js"],e["Dashboards/Components/HTMLComponent/HTMLSyncs/HTMLSyncs.js"],e["Dashboards/Utilities.js"],e["Core/Utilities.js"]],function(t,e,s,i,n,o){let{merge:r,diffObjects:a}=o,{deepClone:l}=n;t.allowedTags=[...t.allowedTags,"option","select","label","input","textarea"],t.allowedAttributes=[...t.allowedAttributes,"for","value","checked","src","name","selected"],t.allowedReferences=[...t.allowedReferences,"data:image/"];class h extends e{static fromJSON(t,e){let s=new h(e,r(t.options,{elements:t.elements?t.elements.map(t=>JSON.parse(t)):[]}));return s.emit({type:"fromJSON",json:t}),s}constructor(t,e){e.className&&(e.className=`${h.defaultOptions.className} ${e.className}`),super(t,e=r(h.defaultOptions,e)),this.options=e,this.type="HTML",this.elements=[]}async load(){this.emit({type:"load"}),await super.load();let e=this.options,s=!1;if(e.elements?.length?this.elements=e.elements.map(function(e){return"string"==typeof e?new t(e).nodes[0]:(e.textContent||e.tagName||!e.attributes||(s=!0),e)}):e.html&&(this.elements=this.getElementsFromString(e.html),this.options.elements=this.elements),this.constructTree(),this.emit({type:"afterLoad"}),s)throw Error(`Missing tagName param in component: ${e.renderTo}`);return this}render(){return super.render(),this.constructTree(),this.sync.start(),this.emit({type:"afterRender"}),this}resize(t,e){return super.resize(t,e),this}async update(t,e=!0){t.html?(this.elements=this.getElementsFromString(t.html),this.options.elements=this.elements,this.constructTree()):t.elements&&(this.elements=t.elements),await super.update(t,e),this.emit({type:"afterUpdate"})}getOptionsOnDrop(){return{cell:"",type:"HTML",elements:[{tagName:"span",textContent:"[Your custom HTML here- edit the component]"}]}}constructTree(){for(;this.contentElement.firstChild;)this.contentElement.firstChild.remove();new t(this.options.elements||[]).addToDOM(this.contentElement)}getElementsFromString(e){return new t(e).nodes}toJSON(){let t=(this.options.elements||[]).map(t=>JSON.stringify(t)),e=r(super.toJSON(),{elements:t,options:this.options});return this.emit({type:"toJSON",json:e}),e}getOptions(){return{...a(this.options,h.defaultOptions),type:"HTML"}}getEditableOptions(){return l(this.options,["editableOptions"])}getEditableOptionValue(t){if(t){if("html"===t[0]){let e=this.getEditableOptions();return!e.html&&e.elements?this.getStringFromElements(e.elements):e[t[0]]}return super.getEditableOptionValue(t)}}getStringFromElements(t){let e="";for(let s of t)e+=this.serializeNode(s);return e}serializeNode(t){if(!t.tagName||"#text"===t.tagName)return t.textContent||"";let e=t.attributes,s=`<${t.tagName}`;if(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let i=e[t];void 0!==i&&(s+=` ${t}="${i}"`)}}return s+=">",s+=t.textContent||"",(t.children||[]).forEach(t=>{s+=this.serializeNode(t)}),s+=``}onTableChanged(t){t.detail?.sender!==this.id&&this.render()}}return h.defaultOptions=r(e.defaultOptions,s),h.predefinedSyncConfig=i,h}),s(e,"Data/ColumnUtils.js",[],function(){var t,e;return(e=t||(t={})).setLength=function(t,e,s){return Array.isArray(t)?(t.length=e,t):t[s?"subarray":"slice"](0,e)},e.splice=function(t,e,s,i,n=[]){if(Array.isArray(t))return Array.isArray(n)||(n=Array.from(n)),{removed:t.splice(e,s,...n),array:t};let o=Object.getPrototypeOf(t).constructor,r=t[i?"subarray":"slice"](e,e+s),a=new o(t.length-s+n.length);return a.set(t.subarray(0,e),0),a.set(n,e),a.set(t.subarray(e+s),e+n.length),{removed:r,array:a}},t}),s(e,"Data/DataTableCore.js",[e["Data/ColumnUtils.js"],e["Core/Utilities.js"]],function(t,e){let{setLength:s,splice:i}=t,{fireEvent:n,objectEach:o,uniqueKey:r}=e;return class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||r(),this.modified=this,this.rowCount=0,this.versionTag=r();let e=0;o(t.columns||{},(t,s)=>{this.columns[s]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,o(this.columns,(e,i)=>{e.length!==t&&(this.columns[i]=s(e,t))})}deleteRows(t,e=1){if(e>0&&t{this.columns[o]=i(n,t,e).array,s=n.length}),this.rowCount=s}n(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=r()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],s=0,i){this.setColumns({[t]:e},s,i)}setColumns(t,e,s){let i=this.rowCount;o(t,(t,e)=>{this.columns[e]=t.slice(),i=t.length}),this.applyRowCount(i),s?.silent||(n(this,"afterSetColumns"),this.versionTag=r())}setRow(t,e=this.rowCount,s,a){let{columns:l}=this,h=s?this.rowCount+1:e+1;o(t,(t,n)=>{let o=l[n]||a?.addColumns!==!1&&Array(h);o&&(s?o=i(o,e,0,!0,[t]).array:o[e]=t,l[n]=o)}),h>this.rowCount&&this.applyRowCount(h),a?.silent||(n(this,"afterSetRows"),this.versionTag=r())}}}),s(e,"Data/DataTable.js",[e["Data/ColumnUtils.js"],e["Data/DataTableCore.js"],e["Core/Utilities.js"]],function(t,e,s){let{addEvent:i,defined:n,extend:o,fireEvent:r,isNumber:a,uniqueKey:l}=s;class h extends e{static isNull(t){if(t===h.NULL)return!0;if(t instanceof Array){if(!t.length)return!1;for(let e=0,s=t.length;e0&&e=this.rowCount&&(this.rowCount=e+1),r[e]=s,o&&o.modifyCell(this,t,e,s),this.emit({type:"afterSetCell",cellValue:s,columnName:t,detail:i,rowIndex:e}))}setColumns(t,e,s,i){let r=this.columns,a=this.modifier,l=Object.keys(t),h=this.rowCount;if(this.emit({type:"setColumns",columns:t,columnNames:l,detail:s,rowIndex:e}),n(e)||i){for(let s=0,n=l.length,o,a,c,d;s(s.emit({type:"afterSetModifier",detail:e,modifier:t,modified:s.modified}),s)).catch(e=>{throw s.emit({type:"setModifierError",error:e,modifier:t,modified:s.modified}),e})}setOriginalRowIndexes(t,e=!1){if(this.originalRowIndexes=t,e)return;let s=this.localRowIndexes=[];for(let e=0,i=t.length,o;ethis.rowCount){this.rowCount=c;for(let e=0,s=r.length;ee.getFullYear()-2e3?s+=1900:s+=2e3,Date.UTC(s,t[3]-1,+t[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(t){return t?Date.UTC(+t[4]+2e3,t[1]-1,+t[3]):NaN}}};let e=r(a.defaultOptions,t),s=e.decimalPoint;("."===s||","===s)&&(s="."===s?"\\.":",",this.decimalRegExp=RegExp("^(-?[0-9]+)"+s+"([0-9]+)$")),this.options=e}asBoolean(t){return"boolean"==typeof t?t:"string"==typeof t?""!==t&&"0"!==t&&"false"!==t:!!this.asNumber(t)}asDate(t){let e;if("string"==typeof t)e=this.parseDate(t);else if("number"==typeof t)e=t;else{if(t instanceof Date)return t;e=this.parseDate(this.asString(t))}return new Date(e)}asGuessedType(t){return({number:this.asNumber,Date:this.asDate,string:this.asString})[this.guessType(t)].call(this,t)}asNumber(t){if("number"==typeof t)return t;if("boolean"==typeof t)return t?1:0;if("string"==typeof t){let e=this.decimalRegExp;if(t.indexOf(" ")>-1&&(t=t.replace(/\s+/g,"")),e){if(!e.test(t))return NaN;t=t.replace(e,"$1.$2")}return parseFloat(t)}return t instanceof Date?t.getDate():t?t.getRowCount():NaN}asString(t){return""+t}deduceDateFormat(t,e,s){let i=[],n=[],o="YYYY/mm/dd",r,a=[],l=0,h=!1,c,d;for((!e||e>t.length)&&(e=t.length);l31?c<100?a[d]="YY":a[d]="YYYY":c>12&&c<=31?(a[d]="dd",h=!0):a[d].length||(a[d]="mm"));if(h){for(d=0;d12&&"YY"!==a[d]&&"YYYY"!==a[d]&&(a[d]="YY"):n[d]>12&&"mm"===a[d]&&(a[d]="dd");3===a.length&&"dd"===a[1]&&"dd"===a[2]&&(a[2]="YY"),o=a.join("/")}return s&&(this.options.dateFormat=o),o}emit(t){n(this,t.type,t)}export(t,e){throw this.emit({type:"exportError",columns:[],headers:[]}),Error("Not implemented")}getTable(){throw Error("Not implemented")}guessType(t){let e="string";if("string"==typeof t){let s=this.trim(`${t}`),i=this.decimalRegExp,n=this.trim(s,!0);i&&(n=i.test(n)?n.replace(i,"$1.$2"):"");let r=parseFloat(n);+n===r?t=r:e=o(this.parseDate(t))?"Date":"string"}return"number"==typeof t&&(e=t>31536e6?"Date":"number"),e}on(t,e){return i(this,t,e)}parse(t){throw this.emit({type:"parseError",columns:[],headers:[]}),Error("Not implemented")}parseDate(t,e){let s=this.options,i=e||s.dateFormat,n=NaN,r,a,l;if(s.parseDate)n=s.parseDate(t);else{if(i)(a=this.dateFormats[i])||(a=this.dateFormats["YYYY/mm/dd"]),(l=t.match(a.regex))&&(n=a.parser(l));else for(r in this.dateFormats)if(a=this.dateFormats[r],l=t.match(a.regex)){i=r,n=a.parser(l);break}!l&&("object"==typeof(l=Date.parse(t))&&null!==l&&l.getTime?n=l.getTime()-6e4*l.getTimezoneOffset():o(l)&&(n=l-6e4*new Date(l).getTimezoneOffset(),-1===t.indexOf("2001")&&2001===new Date(n).getFullYear()&&(n=NaN)))}return n}trim(t,e){return"string"==typeof t&&(t=t.replace(/^\s+|\s+$/g,""),e&&/^[\d\s]+$/.test(t)&&(t=t.replace(/\s/g,""))),t}}return a.defaultOptions={dateFormat:"",alternativeFormat:"",startColumn:0,endColumn:Number.MAX_VALUE,startRow:0,endRow:Number.MAX_VALUE,firstRowAsNames:!0,switchRowsAndColumns:!1},(s=a||(a={})).types={},s.registerType=function(t,e){return!!t&&!s.types[t]&&!!(s.types[t]=e)},s.getTableFromColumns=function(e=[],s=[]){let i=new t;for(let t=0,n=Math.max(s.length,e.length);t`"${t}"`).join(r));for(let e=0;e2&&void 0===d[t][s];)d[t].pop(),s--;h.push(d[t].join(r))}}}return h.join(i)}parse(t,e){let i=this.dataTypes,n=s(this.options,t),{beforeParse:o,lineDelimiter:r,firstRowAsNames:a,itemDelimiter:l}=n,h,c=0,{csv:d,startRow:u,endRow:p}=n,m;if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:e,headers:this.headers}),d&&o&&(d=o(d)),d){if(h=d.replace(/\r\n|\r/g,"\n").split(r||"\n"),(!u||u<0)&&(u=0),(!p||p>=h.length)&&(p=h.length-1),l||(this.guessedItemDelimiter=this.guessDelimiter(h)),a){let t=h[0].split(l||this.guessedItemDelimiter||",");for(let e=0;e{c=t[e]},f=t=>{n.length{if(o>u||u>r){++u,d="";return}if("string"==typeof d?!isNaN(parseFloat(d))&&isFinite(d)?(d=parseFloat(d),f("number")):isNaN(Date.parse(d))?f("string"):(d=d.replace(/\//g,"-"),f("date")):f("number"),i.length13)break;let c=t[i];for(let t=0;tn[","]?i=";":(n[","],n[";"],i=","),e>s?this.guessedDecimalPoint=".":this.guessedDecimalPoint=",",i}getTable(){return t.getTableFromColumns(this.columns,this.headers)}}return i.defaultOptions={...t.defaultOptions,lineDelimiter:"\n"},t.registerType("CSV",i),i}),s(e,"Data/Modifiers/DataModifier.js",[e["Core/Utilities.js"]],function(e){var s;let{addEvent:i,fireEvent:n,merge:o}=e;class r{benchmark(e,s){let i=[],n=this,r=()=>{n.modifyTable(e),n.emit({type:"afterBenchmarkIteration"})},{iterations:a}=o({iterations:1},s);n.on("afterBenchmarkIteration",()=>{if(i.length===a){n.emit({type:"afterBenchmark",results:i});return}r()});let l={startTime:0,endTime:0};return n.on("modify",()=>{l.startTime=t.performance.now()}),n.on("afterModify",()=>{l.endTime=t.performance.now(),i.push(l.endTime-l.startTime)}),r(),i}emit(t){n(this,t.type,t)}modify(t,e){let s=this;return new Promise((i,n)=>{t.modified===t&&(t.modified=t.clone(!1,e));try{i(s.modifyTable(t,e))}catch(i){s.emit({type:"error",detail:e,table:t}),n(i)}})}modifyCell(t,e,s,i,n){return this.modifyTable(t)}modifyColumns(t,e,s,i){return this.modifyTable(t)}modifyRows(t,e,s,i){return this.modifyTable(t)}on(t,e){return i(this,t,e)}}return(s=r||(r={})).types={},s.registerType=function(t,e){return!!t&&!s.types[t]&&!!(s.types[t]=e)},r}),s(e,"Data/Connectors/DataConnector.js",[e["Data/Modifiers/DataModifier.js"],e["Data/DataTable.js"],e["Core/Utilities.js"]],function(e,s,i){var n;let{addEvent:o,fireEvent:r,merge:a,pick:l}=i;class h{constructor(t={}){this.table=new s(t.dataTable),this.metadata=t.metadata||{columns:{}}}get polling(){return!!this._polling}describeColumn(t,e){let s=this.metadata.columns;s[t]=a(s[t]||{},e)}describeColumns(t){let e;let s=Object.keys(t);for(;"string"==typeof(e=s.pop());)this.describeColumn(e,t[e])}emit(t){r(this,t.type,t)}getColumnOrder(t){let e=this.metadata.columns,s=Object.keys(e||{});if(s.length)return s.sort((t,s)=>l(e[t].index,0)-l(e[s].index,0))}getSortedColumns(t){return this.table.getColumns(this.getColumnOrder(t))}load(){return r(this,"afterLoad",{table:this.table}),Promise.resolve(this)}on(t,e){return o(this,t,e)}save(){return r(this,"saveError",{table:this.table}),Promise.reject(Error("Not implemented"))}setColumnOrder(t){for(let e=0,s=t.length;ethis)}startPolling(e=1e3){let s=this;t.clearTimeout(s._polling),s._polling=t.setTimeout(()=>s.load().catch(t=>s.emit({type:"loadError",error:t,table:s.table})).then(()=>{s._polling&&s.startPolling(e)}),e)}stopPolling(){t.clearTimeout(this._polling),delete this._polling}whatIs(t){return this.metadata.columns[t]}}return(n=h||(h={})).types={},n.registerType=function(t,e){return!!t&&!n.types[t]&&!!(n.types[t]=e)},h}),s(e,"Data/Connectors/CSVConnector.js",[e["Data/Converters/CSVConverter.js"],e["Data/Connectors/DataConnector.js"],e["Core/Utilities.js"]],function(t,e,s){let{merge:i}=s;class n extends e{constructor(e){let s=i(n.defaultOptions,e);super(s),this.converter=new t(s),this.options=s,s.enablePolling&&this.startPolling(1e3*Math.max(s.dataRefreshRate||0,1))}load(t){let e=this,s=e.converter,i=e.table,{csv:n,csvURL:o,dataModifier:r}=e.options;return e.emit({type:"load",csv:n,detail:t,table:i}),Promise.resolve(o?fetch(o).then(t=>t.text()):n||"").then(t=>(t&&(i.deleteColumns(),s.parse({csv:t}),i.setColumns(s.getTable().getColumns())),e.setModifierOptions(r).then(()=>t))).then(s=>(e.emit({type:"afterLoad",csv:s,detail:t,table:i}),e)).catch(s=>{throw e.emit({type:"loadError",detail:t,error:s,table:i}),s})}}return n.defaultOptions={csv:"",csvURL:"",enablePolling:!1,dataRefreshRate:1,firstRowAsNames:!0},e.registerType("CSV",n),n}),s(e,"Data/Converters/GoogleSheetsConverter.js",[e["Data/Converters/DataConverter.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s,uniqueKey:i}=e;class n extends t{constructor(t){let e=s(n.defaultOptions,t);super(e),this.columns=[],this.header=[],this.options=e}parse(t,e){let n;let o=s(this.options,t),r=(o.json?.values||[]).map(t=>t.slice());if(0===r.length)return!1;this.header=[],this.columns=[],this.emit({type:"parse",columns:this.columns,detail:e,headers:this.header});let{beforeParse:a,json:l}=o;a&&l&&(r=a(l.values)),this.columns=r;for(let t=0,e=r.length;tt.json()).then(t=>{if("object"==typeof t&&t&&"object"==typeof t.error&&t.error&&"number"==typeof t.error.code&&"string"==typeof t.error.message&&"string"==typeof t.error.status)throw Error(t.error.message);return s.parse({firstRowAsNames:l,json:t}),i.deleteColumns(),i.setColumns(s.getTable().getColumns()),e.setModifierOptions(n)}).then(()=>(e.emit({type:"afterLoad",detail:t,table:i,url:d}),a&&setTimeout(()=>e.load(),1e3*Math.max(r||0,1)),e)).catch(s=>{throw e.emit({type:"loadError",detail:t,error:s,table:i}),s})}}return o.defaultOptions={googleAPIKey:"",googleSpreadsheetKey:"",enablePolling:!1,dataRefreshRate:2,firstRowAsNames:!0},function(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function s(t={}){let{endColumn:i,endRow:o,googleSpreadsheetRange:r,startColumn:a,startRow:l}=t;return r||(e[a||0]||"A")+(Math.max(l||0,0)+1)+":"+(e[n(i,25)]||"Z")+(o?Math.max(o,0):"Z")}t.buildFetchURL=function(t,e,i={}){let n=new URL(`https://sheets.googleapis.com/v4/spreadsheets/${e}/values/`),o=i.onlyColumnNames?"A1:Z1":s(i);n.pathname+=o;let r=n.searchParams;return r.set("alt","json"),i.onlyColumnNames||(r.set("dateTimeRenderOption","FORMATTED_STRING"),r.set("majorDimension","COLUMNS"),r.set("valueRenderOption","UNFORMATTED_VALUE")),r.set("prettyPrint","false"),r.set("key",t),n.href},t.buildQueryRange=s}(o||(o={})),t.registerType("GoogleSheets",o),o}),s(e,"Data/Converters/HTMLTableConverter.js",[e["Data/Converters/DataConverter.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s}=e;class i extends t{constructor(t){let e=s(i.defaultOptions,t);super(e),this.columns=[],this.headers=[],this.options=e,e.tableElement&&(this.tableElement=e.tableElement,this.tableElementID=e.tableElement.id)}export(t,e=this.options){let s=!1!==e.firstRowAsNames,i=e.useMultiLevelHeaders,n=t.getSortedColumns(e.usePresentationOrder),o=Object.keys(n),r=[],a=o.length,l=[],h="";if(s){let t=[];if(i){for(let e of o){let s=n[e];Array.isArray(s)||(s=Array.from(s));let i=(s.shift()||"").toString();n[e]=s,t.push(i)}h=this.getTableHeaderHTML(o,t,e)}else h=this.getTableHeaderHTML(void 0,o,e)}for(let t=0;t"+l[i].join("")+"")}}let c="";return e.tableCaption&&(c=''+e.tableCaption+""),""+c+h+""+r.join("")+"
    "}getCellHTMLFromValue(t,e,s,i,n){let o=i,r="text"+(e?" "+e:"");return"number"==typeof o?(o=o.toString(),","===n&&(o=o.replace(".",n)),r="number"):i||(o="",r="empty"),"<"+t+(s?" "+s:"")+' class="'+r+'">'+o+""}getTableHeaderHTML(t=[],e=[],s=this.options){let{useMultiLevelHeaders:i,useRowspanHeaders:n}=s,o="",r=0,a=e&&e.length,l,h=0,c;if(i&&t&&e&&!function(t,e){let s=t.length;if(e.length!==s)return!1;for(;--s;)if(t[s]!==e[s])return!1;return!0}(t,e)){for(o+="";r1?' valign="top" rowspan="'+c+'"':""),l));o+=""}if(e){for(o+="",r=0,a=e.length;r"}return o+""}parse(t,e){let i=[],n=[],o=s(this.options,t),{endRow:r,startColumn:a,endColumn:l,firstRowAsNames:h}=o,c=o.tableElement||this.tableElement;if(!(c instanceof HTMLElement)){this.emit({type:"parseError",columns:i,detail:e,headers:n,error:"Not a valid HTML Table"});return}this.tableElement=c,this.tableElementID=c.id,this.emit({type:"parse",columns:this.columns,detail:e,headers:this.headers});let d=c.getElementsByTagName("tr"),u=d.length,p=0,m,{startRow:f}=o;if(h&&u){let t=d[0].children,e=t.length;for(let s=a;sl);s++)("TD"===(m=t[s]).tagName||"TH"===m.tagName)&&n.push(m.innerHTML);f++}for(;p=f&&p<=r){let t=d[p].children,e=t.length,s=0;for(;s=a&&s<=l){i[e]||(i[e]=[]);let t=this.asGuessedType(m.innerHTML);t instanceof Date&&(t=t.getTime()),i[e][p-f]=t;let s=1;for(;p-f>=s&&void 0===n[p-f-s];)n[p-f-s]=null,s++}s++}}p++}this.columns=i,this.headers=n,this.emit({type:"afterParse",columns:i,detail:e,headers:n})}getTable(){return t.getTableFromColumns(this.columns,this.headers)}}return i.defaultOptions={...t.defaultOptions,useRowspanHeaders:!0,useMultiLevelHeaders:!0},t.registerType("HTMLTable",i),i}),s(e,"Data/Connectors/HTMLTableConnector.js",[e["Data/Connectors/DataConnector.js"],e["Core/Globals.js"],e["Data/Converters/HTMLTableConverter.js"],e["Core/Utilities.js"]],function(t,e,s,i){let{win:n}=e,{merge:o}=i;class r extends t{constructor(t){let e=o(r.defaultOptions,t);super(e),this.converter=new s(e),this.options=e}load(t){let e;let s=this,i=s.converter,r=s.table,{dataModifier:a,table:l}=s.options;if(s.emit({type:"load",detail:t,table:r,tableElement:s.tableElement}),"string"==typeof l?(s.tableID=l,e=n.document.getElementById(l)):(e=l,s.tableID=e.id),s.tableElement=e||void 0,!s.tableElement){let e="HTML table not provided, or element with ID not found";return s.emit({type:"loadError",detail:t,error:e,table:r}),Promise.reject(Error(e))}return i.parse(o({tableElement:s.tableElement},s.options),t),r.deleteColumns(),r.setColumns(i.getTable().getColumns()),s.setModifierOptions(a).then(()=>(s.emit({type:"afterLoad",detail:t,table:r,tableElement:s.tableElement}),s))}}return r.defaultOptions={table:""},t.registerType("HTMLTable",r),r}),s(e,"Data/Converters/JSONConverter.js",[e["Data/Converters/DataConverter.js"],e["Data/DataTable.js"],e["Core/Utilities.js"]],function(t,e,s){let{error:i,isArray:n,merge:o,objectEach:r}=s;class a extends t{constructor(t){let s=o(a.defaultOptions,t);super(s),this.columns=[],this.headers=[],this.options=s,this.table=new e}parse(t,e){let{beforeParse:s,orientation:a,firstRowAsNames:l,columnNames:h}=t=o(this.options,t),c=t.data;if(c){if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:e,headers:this.headers}),s&&(c=s(c)),c=c.slice(),"columns"===a)for(let t=0,e=c.length;t{t[i]=s.reduce((t,e)=>t[e],e)}),e=t}this.table.setRows([e],t)}}}this.emit({type:"afterParse",columns:this.columns,detail:e,headers:this.headers})}}getTable(){return this.table}}return a.defaultOptions={...t.defaultOptions,data:[],orientation:"rows"},t.registerType("JSON",a),a}),s(e,"Data/Connectors/JSONConnector.js",[e["Data/Connectors/DataConnector.js"],e["Core/Utilities.js"],e["Data/Converters/JSONConverter.js"]],function(t,e,s){let{merge:i}=e;class n extends t{constructor(t){let e=i(n.defaultOptions,t);super(e),this.converter=new s(e),this.options=e,e.enablePolling&&this.startPolling(1e3*Math.max(e.dataRefreshRate||0,1))}load(t){let e=this,s=e.converter,i=e.table,{data:n,dataUrl:o,dataModifier:r}=e.options;return e.emit({type:"load",data:n,detail:t,table:i}),Promise.resolve(o?fetch(o).then(t=>t.json()).catch(s=>{e.emit({type:"loadError",detail:t,error:s,table:i}),console.warn(`Unable to fetch data from ${o}.`)}):n||[]).then(t=>(t&&(i.deleteColumns(),s.parse({data:t}),i.setColumns(s.getTable().getColumns())),e.setModifierOptions(r).then(()=>t))).then(s=>(e.emit({type:"afterLoad",data:s,detail:t,table:i}),e)).catch(s=>{throw e.emit({type:"loadError",detail:t,error:s,table:i}),s})}}return n.defaultOptions={data:[],enablePolling:!1,dataRefreshRate:0,firstRowAsNames:!0,orientation:"rows"},t.registerType("JSON",n),n}),s(e,"Data/Modifiers/ChainModifier.js",[e["Data/Modifiers/DataModifier.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s}=e;class i extends t{constructor(e,...n){super(),this.chain=n,this.options=s(i.defaultOptions,e);let o=this.options.chain||[];for(let e=0,s=o.length,i,r;e0&&!i&&(e.deleteRows(),e.setRows(a),e.setOriginalRowIndexes(s,!0),r=e.getColumns(),a=[],s=[]),d=r[c.column]||[];for(let n=0,r=d.length,l,h,u;n=c.minValue&&l<=c.maxValue&&(i?(h=t.getRow(n),u=t.getOriginalRowIndex(n)):(h=e.getRow(n),u=e.getOriginalRowIndex(n)),h&&(a.push(h),s.push(u)))}}e.deleteRows(),e.setRows(a),e.setOriginalRowIndexes(s)}return this.emit({type:"afterModify",detail:e,table:t}),t}}return i.defaultOptions={type:"Range",ranges:[]},t.registerType("Range",i),i}),s(e,"Data/Modifiers/SortModifier.js",[e["Data/Modifiers/DataModifier.js"],e["Data/DataTable.js"],e["Core/Utilities.js"]],function(t,e,s){let{merge:i}=s;class n extends t{static ascending(t,e){return(t||0)<(e||0)?-1:(t||0)>(e||0)?1:0}static descending(t,e){return(e||0)<(t||0)?-1:(e||0)>(t||0)?1:0}constructor(t){super(),this.options=i(n.defaultOptions,t)}getRowReferences(t){let e=t.getRows(),s=[];for(let t=0,i=e.length;t-1&&(r&&s[a[0]].length?(t.modified.setColumns(s,i),t.modified.setColumn(r,this.modifyTable(new e({columns:t.getColumns([o,r])})).modified.getColumn(r))):this.modifyTable(t,n)),t}modifyRows(t,s,i,n){let{orderByColumn:o,orderInColumn:r}=this.options;return r&&s.length?(t.modified.setRows(s,i),t.modified.setColumn(r,this.modifyTable(new e({columns:t.getColumns([o,r])})).modified.getColumn(r))):this.modifyTable(t,n),t}modifyTable(t,e){this.emit({type:"modify",detail:e,table:t});let s=t.getColumnNames(),i=t.getRowCount(),o=this.getRowReferences(t),{direction:r,orderByColumn:a,orderInColumn:l}=this.options,h="asc"===r?n.ascending:n.descending,c=s.indexOf(a),d=t.modified;if(-1!==c&&o.sort((t,e)=>h(t.row[c],e.row[c])),l){let t=[];for(let e=0;e=0)return this;try{this.emittingRegister.push(d);for(let t=0,e=a.length;t=0&&this.emittingRegister.splice(t,1)}}return this}remitCursor(e,s){let i=this.stateMap[e]&&this.stateMap[e][s.state];if(i){let e=t.getIndex(s,i);e>=0&&i.splice(e,1)}return this}removeListener(t,e,s){let i=this.listenerMap[t]&&this.listenerMap[t][e];if(i){let t=i.indexOf(s);t>=0&&i.splice(t,1)}return this}}return t.version="1.0.0",function(t){function e(t,e){if("range"===t.type)return t;let s={type:"range",firstRow:t.row??(e&&e.firstRow)??0,lastRow:t.row??(e&&e.lastRow)??Number.MAX_VALUE,state:t.state};return void 0!==t.column&&(s.columns=[t.column]),s}t.getIndex=function(t,e){if("position"===t.type){for(let s,i=0,n=e.length;i=s.firstRow&&t.lastRow<=s.lastRow&&(!i||!n||i.every(t=>n.indexOf(t)>=0))},t.toPositions=function(t){if("position"===t.type)return[t];let e=t.columns||[],s=[],i=t.state;for(let n=t.firstRow,o=t.lastRow;n{delete this.waiting[t];for(let t=0,i=s.length;t{delete this.waiting[t];for(let t=0,i=s.length;t{s.push([t,e])})}getConnectorIds(){let t=this.options.connectors,e=[];for(let s=0,i=t.length;st.table)}isNewConnector(t){return!this.connectors[t]}loadConnector(e){return new Promise((s,i)=>{this.emit({type:"load",options:e});let n=t.types[e.type];if(!n)throw Error(`Connector type not found. (${e.type})`);new n(e.options).load().then(t=>{this.connectors[e.id]=t,this.emit({type:"afterLoad",options:e}),s(t)}).catch(i)})}on(t,e){return s.addEvent(this,t,e)}setConnectorOptions(t){let e=this.options.connectors,s=this.connectors;this.emit({type:"setConnectorOptions",options:t});for(let s=0,i=e.length;s{h(s,"cellChange",{row:s,cell:t})},0))}unmountCell(t){let e=this.getCellIndex(t);r(e)&&this.cells.splice(e,1),setTimeout(()=>{h(this,"cellChange",{row:this,cell:t})},0)}getVisibleCells(){let t=[];for(let e=0,s=this.cells.length;e{n.push(t)}),n}getRowLevelInfo(t){let e;let s=this.getRowLevels();for(let i=0,n=s.length;it&&(e={index:i,rowLevels:s,rowLevel:s[i]});return e}}return c}),s(e,"Dashboards/Layout/Layout.js",[e["Dashboards/Utilities.js"],e["Core/Utilities.js"],e["Dashboards/Layout/Row.js"],e["Dashboards/Layout/GUIElement.js"],e["Dashboards/Globals.js"]],function(t,e,s,i,n){let{uniqueKey:o}=t,{pick:r,defined:a}=e;class l extends i{static fromJSON(t,e,s){let i=t.options,n=document.getElementById(t.options.containerId),r=new l(e,{id:i.containerId,copyId:n?o():"",parentContainerId:i.parentContainerId||e.container.id,rowsJSON:i.rows,style:i.style},s);return r&&!s&&e.layouts.push(r),r}static importLocal(t,e){let s;let i=localStorage.getItem(n.classNamePrefix+t);return i&&(s=l.fromJSON(JSON.parse(i),e)),s}constructor(t,e,s){super(),this.type=n.guiElementType.layout,this.board=t,this.rows=[],this.options=e,this.isVisible=!0;let i=s?s.container:document.getElementById(e.parentContainerId||"")||t.layoutsWrapper;s?(this.parentCell=s,this.level=s.row.layout.level+1):this.level=0,e.copyId&&(this.copyId=e.copyId);let o=(this.options||{}).rowClassName||"";this.container=this.getElementContainer({render:t.guiEnabled,parentContainer:i,attribs:{id:(e.id||"")+(this.copyId?"_"+this.copyId:""),className:n.classNames.layout+" "+o},elementId:e.id,style:this.options.style}),this.options.rows&&this.setRows(),e.rowsJSON&&!this.rows.length&&this.setRowsFromJSON(e.rowsJSON)}setRows(){let t,e,s;let i=r(this.options.rows,this.container&&this.container.getElementsByClassName(this.options.rowClassName||""))||[];for(e=0,s=i.length;e=0;t--)this.board.layouts[t]===this&&this.board.layouts.splice(t,1);this.parentCell&&delete this.parentCell.nestedLayout;for(let t=this.rows.length-1;t>=0;t--)this.rows[t].destroy();this.parentCell&&this.parentCell.destroy(),super.destroy()}exportLocal(){localStorage.setItem(n.classNamePrefix+this.options.id,JSON.stringify(this.toJSON()))}getRowIndex(t){for(let e=0,s=this.rows.length;ethis):this}initEvents(){let e=this,s=()=>{e.reflow()};if("function"==typeof ResizeObserver)this.resizeObserver=new ResizeObserver(s),this.resizeObserver.observe(e.container);else{let e=m(t,"resize",s);m(this,"destroy",e)}}initContainer(e){"string"==typeof e&&(e=t.document.getElementById(e)),e||f(13,!0),this.container=e}initEditMode(){if(Dashboards.EditMode)this.editMode=new Dashboards.EditMode(this,this.options.editMode);else if(this.editModeEnabled)throw Error("Missing layout.js module")}setComponents(t){let s=[];for(let i=0,n=t.length;ie.component.id===t)?.component}getComponentByCellId(t){return this.mountedComponents.find(e=>e.cell.id===t)?.component}}return(u=b||(b={})).defaultOptions={gui:{enabled:!0,layoutOptions:{rowClassName:void 0,cellClassName:void 0},layouts:[]},components:[]},u.importLocal=function(){let t=localStorage.getItem(a.classNamePrefix+"1");if(t)try{return h.fromJSON(JSON.parse(t))}catch(t){throw Error(""+t)}},h.registerClassPrototype("Board",b.prototype),s.registerComponent("HTML",c),b}),s(e,"Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridExtremesSync.js",[],function(){return{defaultOptions:{},syncPair:{emitter:void 0,handler:function(){if("DataGrid"!==this.type&&"Grid"!==this.type)return;let t=this,e=this.sync.syncConfig.extremes,s=e.group?":"+e.group:"",{board:i}=t,n=e=>{let s=e.cursor;if("position"===s.type&&t.dataGrid&&"number"==typeof s?.row){let{row:e}=s,{viewport:i}=t.dataGrid,n=i?.dataTable?.getLocalRowIndex(e);void 0!==n&&t.dataGrid.viewport?.scrollToRow(n)}};if(i)return(()=>{let{dataCursor:e}=i;if(!e)return;let o=t.connectorHandlers?.[0]?.connector?.table;o&&e.addListener(o.id,"xAxis.extremes.min"+s,n)})(),()=>{let e=t.connectorHandlers?.[0]?.connector?.table,{dataCursor:o}=i;e&&o.removeListener(e.id,"xAxis.extremes.min"+s,n)}}}}}),s(e,"Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridHighlightSync.js",[e["Core/Utilities.js"]],function(t){let{addEvent:e,removeEvent:s}=t;return{defaultOptions:{autoScroll:!1},syncPair:{emitter:function(){if("DataGrid"!==this.type&&"Grid"!==this.type)return;let{dataGrid:t,board:i}=this,n=this.sync.syncConfig.highlight,o=n.group?":"+n.group:"";if(!i||!t||!n?.enabled)return;let{dataCursor:r}=i,a=t=>{let e=this.getFirstConnector()?.table;if(e){let s=t.target;r.emitCursor(e,{type:"position",row:s.row.id,column:s.column.id,state:"dataGrid.hoverRow"+o})}},l=()=>{let t=this.getFirstConnector()?.table;t&&r.emitCursor(t,{type:"position",state:"dataGrid.hoverOut"+o})};return e(t,"cellMouseOver",a),e(t,"cellMouseOut",l),function(){s(t.container,"cellMouseOver",a),s(t.container,"cellMouseOut",l)}},handler:function(){if("DataGrid"!==this.type&&"Grid"!==this.type)return;let t=this,{board:e}=t,s=t.sync.syncConfig.highlight,i=s.group?":"+s.group:"";if(!s?.enabled)return;let n=e=>{let i=e.cursor;if("position"!==i.type)return;let{row:n,column:o}=i,{dataGrid:r}=t,a=r?.viewport;if(void 0===n||!a)return;let l=a.dataTable.getLocalRowIndex(n);void 0!==l&&(s.autoScroll&&a.scrollToRow(l),r.syncRow(l),r.syncColumn(o))},o=()=>{let{dataGrid:e}=t;e&&(e.syncColumn(),e.syncRow())};if(e)return(()=>{let{dataCursor:s}=e;if(!s)return;let r=t.connectorHandlers?.[0]?.connector?.table;r&&(s.addListener(r.id,"point.mouseOver"+i,n),s.addListener(r.id,"point.mouseOut"+i,o))})(),()=>{let s=e.dataCursor,r=t.connectorHandlers?.[0]?.connector?.table;r&&(s.removeListener(r.id,"point.mouseOver"+i,n),s.removeListener(r.id,"point.mouseOut"+i,o))}}}}}),s(e,"Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridVisibilitySync.js",[],function(){return{defaultOptions:{},syncPair:{emitter:void 0,handler:function(){if("DataGrid"!==this.type&&"Grid"!==this.type)return;let t=this,e=this.sync.syncConfig.visibility,s=e.group?":"+e.group:"",{board:i}=t,n=e=>{let i=e.cursor,n=t.dataGrid;n&&"position"===i.type&&i.column&&n.updateColumn(i.column,{enabled:i.state!=="series.hide"+s})};if(i)return(()=>{let{dataCursor:e}=i;if(!e)return;let o=t.connectorHandlers?.[0]?.connector?.table;o&&(e.addListener(o.id,"series.show"+s,n),e.addListener(o.id,"series.hide"+s,n))})(),()=>{let e=t.connectorHandlers?.[0]?.connector?.table,{dataCursor:o}=i;e&&(o.removeListener(e.id,"series.show"+s,n),o.removeListener(e.id,"series.hide"+s,n))}}}}}),s(e,"Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridSyncs.js",[e["Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridExtremesSync.js"],e["Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridHighlightSync.js"],e["Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridVisibilitySync.js"]],function(t,e,s){return{defaultSyncPairs:{extremes:t.syncPair,highlight:e.syncPair,visibility:s.syncPair},defaultSyncOptions:{extremes:t.defaultOptions,highlight:e.defaultOptions,visibility:s.defaultOptions}}}),s(e,"Dashboards/Components/DataGridComponent/DataGridComponentDefaults.js",[e["Data/Converters/DataConverter.js"],e["Core/Utilities.js"]],function(t,e){let{uniqueKey:s}=e;return{gridClassName:"dataGrid-container",gridID:"dataGrid-"+s(),gridOptions:{},editableOptions:[{name:"connectorName",propertyPath:["connector","id"],type:"select"},{name:"title",propertyPath:["title"],type:"input"},{name:"caption",propertyPath:["caption"],type:"input"},{name:"Grid options",type:"nested",nestedOptions:[{name:"General",options:[{name:"Caption/title",propertyPath:["gridOptions","caption","text"],type:"input"},{name:"Columns distribution",propertyPath:["gridOptions","rendering","columns","distribution"],type:"select",selectOptions:[{name:"full"},{name:"fixed"}]},{name:"Editable Grid",propertyPath:["gridOptions","columnDefaults","cells","editable"],type:"toggle"},{name:"Resizable columns",propertyPath:["gridOptions","columnDefaults","resizing"],type:"toggle"},{name:"Sortable columns",propertyPath:["gridOptions","columnDefaults","sorting","sortable"],type:"toggle"},{name:"Cell text truncation",propertyPath:["gridOptions","rendering","rows","strictHeights"],type:"toggle"}]}]},{name:"Grid class name",propertyPath:["gridClassName"],type:"input"},{name:"Grid ID",propertyPath:["gridID"],type:"input"}],onUpdate:(e,s)=>{let i=e.target;if(i){let e=i.closest(".highcharts-datagrid-row"),n=i.closest(".highcharts-datagrid-cell");if(e&&e instanceof HTMLElement&&n&&n instanceof HTMLElement){let o=e.dataset.rowIndex,{columnName:r}=n.dataset;if(void 0!==o&&void 0!==r){let e=s.table;if(e){let s=new t().asGuessedType(i.value);s instanceof Date&&(s=s.toString()),e.setCell(r,Number(o),s)}}}}}}}),s(e,"Dashboards/Components/DataGridComponent/DataGridComponent.js",[e["Dashboards/Components/Component.js"],e["Dashboards/Components/DataGridComponent/DataGridSyncs/DataGridSyncs.js"],e["Dashboards/Components/DataGridComponent/DataGridComponentDefaults.js"],e["Core/Utilities.js"],e["Dashboards/Utilities.js"]],function(t,e,s,i,n){let{merge:o,diffObjects:r,getStyle:a}=i,{deepClone:l}=n;class h extends t{static get DataGridNamespace(){return h.GridNamespace}static fromJSON(t,e){let s=t.options,i=JSON.parse((s.gridOptions||s.dataGridOptions)??""),n=new h(e,o(s,{gridOptions:i}));return n.emit({type:"fromJSON",json:t}),n}get dataGrid(){return this.grid}constructor(t,e,s){super(t,e=o(h.defaultOptions,e),s),this.options=e,this.type="Grid",this.setOptions()}async update(t){await super.update(t),this.setOptions(),this.grid&&(this.grid.update(o({},t.gridOptions,t.dataGridOptions),!1),this.grid?.viewport?.dataTable?.id!==this.getFirstConnector()?.table?.id&&this.grid.update({dataTable:this.getFirstConnector()?.table?.modified},!1),this.grid.renderViewport()),this.emit({type:"afterUpdate"})}render(){return super.render(),this.grid?this.grid.renderViewport():this.grid=this.constructGrid(),this.grid.initialContainerHeight=a(this.parentElement,"height",!0)||0,this.sync.start(),this.emit({type:"afterRender"}),this}resize(t,e){e?this.contentElement.style.minHeight="0":null===e&&this.contentElement.style.removeProperty("min-height"),this.resizeDynamicContent(t,e),this.grid?.viewport?.reflow()}onTableChanged(){this.grid?.update({dataTable:this.getFirstConnector()?.table?.modified})}getEditableOptions(){let t=this.options;return l(o({gridOptions:this.grid?.options},t),["editableOptions","dataTable"])}getOptionsOnDrop(t){let e=t.editMode.board.dataPool.getConnectorIds(),s={cell:"",type:"Grid"};return e.length&&(s={...s,connector:{id:e[0]}}),s}getOptions(){let t=o(this.options);return t.connector?.id?delete t.gridOptions?.dataTable:t.gridOptions?.dataTable?.id&&(t.gridOptions.dataTable={columns:t.gridOptions.dataTable.columns}),{...r(t,h.defaultOptions),type:"Grid"}}destroy(){this.sync.stop(),this.grid?.destroy(),super.destroy()}setOptions(){let t=this.options,e=t.gridClassName||t.dataGridClassName,i=t.gridID||t.dataGridID;e&&(this.contentElement.classList.value=s.className+" "+e),i&&(this.contentElement.id=i)}constructGrid(){let t=h.GridNamespace;if(!t)throw Error("Grid not connected.");let e=this.getFirstConnector()?.table,s=this.options,i=o({},s.gridOptions,s.dataGridOptions);e&&(i.dataTable=e.modified);let n=new t.Grid(this.contentElement,i);return this.options.gridOptions=n.options,n}}return h.predefinedSyncConfig=e,h.defaultOptions=o(t.defaultOptions,s),h}),s(e,"Dashboards/Plugins/DataGridPlugin.js",[e["Dashboards/Components/DataGridComponent/DataGridComponent.js"]],function(t){function e(e){t.GridNamespace=e}return{custom:{connectDataGrid:function(t){e(t)},connectGrid:e},name:"DataGrid.DashboardsPlugin",onRegister:function(e){let{ComponentRegistry:s}=e;s.registerComponent("DataGrid",t),s.registerComponent("Grid",t)},onUnregister:function(t){}}}),s(e,"Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsExtremesSync.js",[e["Core/Utilities.js"]],function(t){let{addEvent:e,isString:s}=t;return{defaultOptions:{},syncPair:{emitter:function(){if("Highcharts"!==this.type)return;let t=this,i=[],{chart:n,board:o}=t,r=t.connectorHandlers?.[0]?.connector,a=r&&r.table,l=this.sync.syncConfig.extremes,h=l.group?":"+l.group:"",{dataCursor:c}=o;if(a&&n){let o=e=>{let i=!!e.resetSelection;if((!e.trigger||e.trigger&&"dashboards-sync"!==e.trigger)&&!i){let i=e.target,o=Object.keys(t.seriesFromConnector),r=o.length>0?n.get(o[0]):i.series[0];if(r){let n=r.points.filter(t=>t.isInside||!1),l={type:"position",state:`${i.coll}.extremes.min${h}`},d={type:"position",state:`${i.coll}.extremes.max${h}`};if(o.length>0&&"xAxis"===i.coll&&n.length){let e;let o=(t.connectorHandlers[0]?.options).columnAssignment;if(o){let t=o.find(t=>t.seriesId===r.options.id);if(t){let i=t.data;e=s(i)?i:Array.isArray(i)?i[i.length-1]:i.y}}e||(e=i.dateTime&&(a.hasColumns(["x"])?"x":r.options.id??r.name)),l.row=n[0].index,l.column=e,d.row=n[n.length-1].index,d.column=e}c.emitCursor(a,l,e,!0).emitCursor(a,d,e,!0)}}},r=()=>n.axes.map(t=>e(t,"afterSetExtremes",o)),l=r(),d=()=>{l.forEach(t=>{t()}),l=[]};i.push(e(n,"selection",t=>{t.resetSelection&&(d(),c.emitCursor(a,{type:"position",state:"chart.zoomOut"+h},t),l.push(...r()))})),i.push(()=>{c.remitCursor(a.id,{type:"position",state:"xAxis.extremes.min"+h}),c.remitCursor(a.id,{type:"position",state:"xAxis.extremes.max"+h}),d()})}return function(){i.forEach(t=>{t()})}},handler:function(){if("Highcharts"!==this.type)return;let t=this,e=this.sync.syncConfig.extremes,s=e.group?":"+e.group:"",{chart:i,board:n}=t;if(i&&n&&i.zooming?.type){let e=i.zooming.type.split("").map(t=>t+"Axis"),o=[];return e.forEach(e=>{let r=t=>{let{cursor:s,event:n}=t;if("position"===s.type){let t=n?.target;if(t&&i){let s=i[e],n=!1;s.forEach(e=>{t.coll===e.coll&&t!==e&&null!==t.min&&null!==t.max&&(e.max!==t.max||e.min!==t.min)&&(e.setExtremes(t.min,t.max,!1,void 0,{trigger:"dashboards-sync"}),n=!0)}),n&&!i.resetZoomButton&&i.showResetZoom(),i.redraw()}}};n&&(()=>{let{dataCursor:a}=n,l=t.connectorHandlers?.[0]?.connector;if(l){let{table:n}=l;a.addListener(n.id,`${e}.extremes.min${s}`,r),a.addListener(n.id,`${e}.extremes.max${s}`,r);let h=()=>{i.zoomOut(),setTimeout(()=>{t.element.querySelectorAll(".highcharts-reset-zoom").forEach(t=>{t.remove()})})};a.addListener(n.id,"chart.zoomOut",h),o.push(()=>{a.removeListener(n.id,`${e}.extremes.min${s}`,r),a.removeListener(n.id,`${e}.extremes.max${s}`,r),a.removeListener(n.id,"chart.zoomOut"+s,h)})}})()}),function(){o.forEach(t=>{t()})}}}}}}),s(e,"Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsHighlightSync.js",[e["Dashboards/Utilities.js"]],function(t){let{error:e}=t;return{defaultOptions:{affectedSeriesId:null,highlightPoint:!0,showTooltip:!0,showCrosshair:!0},syncPair:{emitter:function(){if("Highcharts"!==this.type)return;let{chart:t,board:e}=this,s=this.sync.syncConfig.highlight,i=s.group?":"+s.group:"";if(!s.enabled||!t)return;let{dataCursor:n}=e;for(let e=0,s=t.series?.length??0;et.seriesId===r);if(c){let{data:t}=c;s="string"==typeof t?t:Array.isArray(t)?t[1]:t.y??t.value}s||(s=o.name),o.update({point:{events:{mouseOver:function(){n.emitCursor(l,{type:"position",row:h.getOriginalRowIndex(this.index),column:s,state:"point.mouseOver"+i})},mouseOut:function(){n.emitCursor(l,{type:"position",row:h.getOriginalRowIndex(this.index),column:s,state:"point.mouseOut"+i})}}}},!1)}return t.redraw(),function(){t&&t.series&&(t.series.forEach(t=>{t.update({point:{events:{mouseOver:void 0,mouseOut:void 0}}},!1)}),t.redraw())}},handler:function(){if("Highcharts"!==this.type)return;let t=this,s=this.sync.syncConfig.highlight.group?":"+this.sync.syncConfig.highlight.group:"",{chart:i,board:n}=t,o=s=>{let{table:n,cursor:o}=s,r=this.sync.syncConfig.highlight;if(i&&i.series?.length&&"position"===o.type){let s;let a=r.affectedSeriesId;if(r.affectedSeriesId){let t=i.get(r.affectedSeriesId);t?.points?s=t:e("No series with ID '"+a+"' found in the chart. Affected series will be selected according to the column assignment.")}if(!s){let e=Object.keys(t.seriesFromConnector);for(let r=0,a=e.length;rt.seriesId===a)??{};if(!c||!o.column)break;if("string"==typeof c){if(c===o.column)break}else if(Array.isArray(c)){if(c.includes(o.column))break}else if(Object.keys(c).map(t=>c[t]).includes(o.column))break}}let l=o.row;if(s?.visible&&void 0!==l){let t=n.modified.getLocalRowIndex(l);if(void 0===t)return;let e=s.data[t];if(e?.visible)return e}}},r=t=>{let e=this.sync.syncConfig.highlight;if(!e.enabled)return;let s=o(t);if(!s||!i||!s.isInside&&s.series.isCartesian||s===i.hoverPoint)return;let n=i.tooltip;if(n&&e.showTooltip){let t=n.shared,e=i.hoverPoint,o=e?.series||i.hoverSeries,r=i.pointer?.getHoverData(s,o,i.series,!0,!0);i.tooltip&&r?.hoverPoints.length&&n.refresh(t?r.hoverPoints:s)}e.highlightPoint&&(!n?.shared&&e.showTooltip||!e.showTooltip)&&s.setState("hover"),e.showCrosshair&&(s.series.xAxis?.drawCrosshair(void 0,s),s.series.yAxis?.drawCrosshair(void 0,s))},a=t=>{let e=this.sync.syncConfig.highlight;if(!i||!i.series.length||!e.enabled)return;let s=o(t);if(s&&(!s.isInside&&s.series.isCartesian||s===i.hoverPoint))return;let n=!1,r=()=>{let t=i.series.length;for(let e=0;e{let{dataCursor:t}=n,{connectorHandlers:e}=this;if(t)for(let i=0,n=e.length;i{let{dataCursor:t}=n,{connectorHandlers:e}=this;if(t)for(let i=0,n=e.length;i{s.update({events:{show:function(){t.emitCursor(o,{type:"position",state:"series.show"+e,column:this.name})},hide:function(){t.emitCursor(o,{type:"position",state:"series.hide"+e,column:this.name})}}},!1)}),s.redraw()}return function(){s&&s.series?.length&&(s.series.forEach(t=>{t.update({events:{show:void 0,hide:void 0}},!1)}),s.redraw())}},handler:function(){if("Highcharts"!==this.type)return;let t=this,e=this.sync.syncConfig.visibility,s=e.group?":"+e.group:"",{board:i}=t,n=(t,e)=>{for(let s of t)if(s.name===e)return s},o=e=>{let s=t.chart;if(s&&s.series?.length&&"position"===e.cursor.type&&void 0!==e.cursor.column){let t=n(s.series,e.cursor.column);t&&t.setVisible(!0,!0)}},r=e=>{let s=t.chart;if(s&&s.series?.length&&"position"===e.cursor.type&&void 0!==e.cursor.column){let t=n(s.series,e.cursor.column);t&&t.setVisible(!1,!0)}};if(i)return(()=>{let{dataCursor:e}=i;if(!e)return;let n=t.connectorHandlers?.[0]?.connector?.table;n&&(e.addListener(n.id,"series.show"+s,o),e.addListener(n.id,"series.hide"+s,r))})(),()=>{let e=t.connectorHandlers?.[0]?.connector?.table;e&&(i.dataCursor.removeListener(e.id,"series.show"+s,o),i.dataCursor.removeListener(e.id,"series.hide"+s,r))}}}}}),s(e,"Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsSyncs.js",[e["Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsExtremesSync.js"],e["Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsHighlightSync.js"],e["Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsVisibilitySync.js"]],function(t,e,s){return{defaultSyncPairs:{extremes:t.syncPair,highlight:e.syncPair,visibility:s.syncPair},defaultSyncOptions:{extremes:t.defaultOptions,highlight:e.defaultOptions,visibility:s.defaultOptions}}}),s(e,"Dashboards/Components/HighchartsComponent/HighchartsComponentDefaults.js",[e["Dashboards/Components/Component.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s,uniqueKey:i}=e;return{allowConnectorUpdate:!0,className:[t.defaultOptions.className,`${t.defaultOptions.className}-highcharts`].join(" "),chartClassName:"chart-container",chartID:"chart-"+i(),chartOptions:{series:[]},chartConstructor:"chart",editableOptions:[{name:"connectorName",propertyPath:["connector","id"],type:"select"},...t.defaultOptions.editableOptions||[],{name:"chartOptions",type:"nested",nestedOptions:[{name:"chart",options:[{name:"title",propertyPath:["chartOptions","title","text"],type:"input"},{name:"subtitle",propertyPath:["chartOptions","subtitle","text"],type:"input"},{name:"type",propertyPath:["chartOptions","chart","type"],type:"select",selectOptions:[{name:"column",iconURL:"series-types/icon-column.svg"},{name:"line",iconURL:"series-types/icon-line.svg"},{name:"scatter",iconURL:"series-types/icon-scatter.svg"},{name:"pie",iconURL:"series-types/icon-pie.svg"}]}]},{name:"xAxis",options:[{name:"title",propertyPath:["chartOptions","xAxis","title","text"],type:"input"},{name:"type",propertyPath:["chartOptions","xAxis","type"],type:"select",selectOptions:[{name:"linear"},{name:"datetime"},{name:"logarithmic"}]}]},{name:"yAxis",options:[{name:"title",propertyPath:["chartOptions","yAxis","title","text"],type:"input"},{name:"type",propertyPath:["chartOptions","yAxis","type"],type:"select",selectOptions:[{name:"linear"},{name:"datetime"},{name:"logarithmic"}]}]},{name:"legend",showToggle:!0,propertyPath:["chartOptions","legend","enabled"],options:[{name:"align",propertyPath:["chartOptions","legend","align"],type:"select",selectOptions:[{name:"left"},{name:"center"},{name:"right"}]}]},{name:"tooltip",showToggle:!0,propertyPath:["chartOptions","tooltip","enabled"],options:[{name:"split",propertyPath:["chartOptions","tooltip","split"],type:"toggle"}]},{name:"dataLabels",propertyPath:["chartOptions","plotOptions","series","dataLabels","enabled"],showToggle:!0,options:[{name:"align",propertyPath:["chartOptions","plotOptions","series","dataLabels","align"],type:"select",selectOptions:[{name:"left"},{name:"center"},{name:"right"}]}]},{name:"credits",showToggle:!0,propertyPath:["chartOptions","credits","enabled"],options:[{name:"name",propertyPath:["chartOptions","credits","text"],type:"input"},{name:"url",propertyPath:["chartOptions","credits","href"],type:"input"}]}]},{name:"chartConfig",propertyPath:["chartOptions"],type:"textarea"},{name:"chartClassName",propertyPath:["chartClassName"],type:"input"},{name:"chartID",propertyPath:["chartID"],type:"input"}],editableOptionsBindings:s(t.defaultOptions.editableOptionsBindings,{skipRedraw:["chartOptions","chartConfig"]})}}),s(e,"Dashboards/Components/HighchartsComponent/HighchartsComponent.js",[e["Dashboards/Components/Component.js"],e["Data/Converters/DataConverter.js"],e["Data/DataTable.js"],e["Dashboards/Globals.js"],e["Dashboards/Components/HighchartsComponent/HighchartsSyncs/HighchartsSyncs.js"],e["Dashboards/Components/HighchartsComponent/HighchartsComponentDefaults.js"],e["Dashboards/Utilities.js"],e["Core/Utilities.js"]],function(t,e,s,i,n,o,r,a){let{createElement:l,diffObjects:h,isString:c,merge:d,splat:u}=a,{deepClone:p}=r;class m extends t{static fromJSON(t,e){let s=new m(e,d(t.options,{chartOptions:JSON.parse(t.options.chartOptions||"{}")}));return s.emit({type:"fromJSON",json:t}),s}constructor(t,e,s){for(let i of(super(t,e=d(m.defaultOptions,e),s),this.seriesFromConnector={},this.options=e,this.chartConstructor=this.options.chartConstructor||"chart",this.type="Highcharts",this.chartContainer=l("figure",void 0,void 0,this.contentElement,!0),this.setOptions(),this.chartOptions=d(this.options.chartOptions||{chart:{}},{tooltip:{}}),this.connectorHandlers)){let t=i.connector;t&&t.on("afterLoad",e=>{e.table&&t.table.setColumns(e.table.getColumns())})}this.innerResizeTimeouts=[]}onTableChanged(){this.updateSeries()}async load(){return this.emit({type:"load"}),await super.load(),this.emit({type:"afterLoad"}),this}render(){return super.render(),this.chart=this.getChart(),this.updateSeries(),this.emit({type:"afterRender"}),this.setupConnectorUpdate(),this.sync.start(),this}resize(t,e){for(this.resizeDynamicContent(t,e);this.innerResizeTimeouts.length;){let t=this.innerResizeTimeouts.pop();t&&clearTimeout(t)}return this.innerResizeTimeouts.push(setTimeout(()=>{if(this.chart&&this.chart.container){let t=this.contentElement.offsetHeight-this.chart?.container.offsetHeight;this.chart.setSize(null,Math.abs(t)>1?this.contentElement.offsetHeight:null,!1)}},33)),this}setupConnectorUpdate(){let{connectorHandlers:t,chart:e}=this;if(!e||!this.options.allowConnectorUpdate)return;let s=e.series.length;for(let i=0,n=t.length;i{this.onChartUpdate(t.target,n)}}}},!1)}}onChartUpdate(t,s){let i;let n=s.connector?.table,o=s.columnAssignment,r=t.series.options.id,a=new e().asNumber(t.y);if(n){if(o&&r){let t=o.find(t=>t.seriesId===r)?.data;c(t)?i=t:Array.isArray(t)?i=t[1]:t&&(i=t.y??t.value)}i||(i=r??t.series.name),n.setCell(i,t.index,a)}}setOptions(){this.options.chartClassName&&(this.chartContainer.classList.value=o.className+" "+this.options.chartClassName),this.options.chartID&&(this.chartContainer.id=this.options.chartID)}async update(t,e=!0){await super.update(t,!1),this.setOptions(),this.options.chartConstructor!==this.chartConstructor?(this.chartConstructor=this.options.chartConstructor||"chart",this.chartOptions=this.options.chartOptions||{},this.chart?.destroy(),delete this.chart):this.chart?.update(d(this.options.chartOptions)||{}),this.emit({type:"afterUpdate"}),e&&this.render()}updateSeries(){let{chart:t}=this,e=this.connectorHandlers;if(!t)return;let s=[];for(let t of e){let e=t.options.columnAssignment;if(!e&&t.presentationTable&&(e=this.getDefaultColumnAssignment(t.presentationTable.getColumnNames(),t.presentationTable)),e)for(let{seriesId:i}of(t.columnAssignment=e,e))i&&s.push(i)}let i=Object.keys(this.seriesFromConnector);for(let e=0,n=i.length;et===n))continue;let o=t.get(n);o&&o.destroy()}for(let t of(this.seriesFromConnector={},e))this.updateSeriesFromConnector(t);t.redraw()}updateSeriesFromConnector(t){let e=this.chart;if(!t.connector||!e||!t.presentationTable)return;let i=t.presentationTable.modified,n=t.presentationTable.getModifier()?.options,o=t.columnAssignment??[];for(let r=0,a=o.length;r{n?.type==="Math"&&n.columnFormulas?.some(e=>t(e.column))&&(d.dragDrop={draggableY:!1})};if(c(l)){let t=i.getColumn(l);t&&(d.data=t.slice()),u(t=>t===l)}else if(Array.isArray(l)){let t=new s({columns:i.getColumns(l)});d.data=t.getRows(),u(t=>l.some(e=>e===t))}else{let t=Object.keys(l),e=[];for(let s=0,i=t.length;se.some(e=>e===t))}h?h.update(d,!1):e.addSeries({name:a.seriesId,id:a.seriesId,...d},!1),this.seriesFromConnector[a.seriesId]=t}}getChart(){return this.chart||this.createChart()}destroy(){this.chart?.destroy(),super.destroy()}getDefaultColumnAssignment(t=[],e){let s=[],i=e.getColumn(t[0]);if(i&&c(i[0])){for(let e=1,i=t.length;e{let s=t[e]||{};return!Array.isArray(s)&&s.events&&(s=[s]),s&&"object"==typeof s&&Array.isArray(s)&&s.reduce((t,s,i)=>(s&&s.events&&(t[s.id||`${e}-${i}`]=s.events),t),{})||{}}).forEach(t=>{Object.keys(t).forEach(e=>{let s=t[e];Object.keys(s).forEach(t=>{this.callbackRegistry.addCallback(`${e}-${t}`,{type:"seriesEvent",func:s[t]})})})})}}getOptionsOnDrop(t){let e=t.editMode.board.dataPool.getConnectorIds(),s={cell:"",type:"Highcharts",chartOptions:{chart:{animation:!1,type:"column",zooming:{}}}};return e.length&&(s={...s,connector:{id:e[0]}}),s}toJSON(){let t=JSON.stringify(this.options.chartOptions),e=this.options.chartConstructor||"chart";this.registerChartEvents();let s=super.toJSON(),i={...s,type:"Highcharts",options:{...s.options,chartOptions:t,chartConstructor:e,type:"Highcharts",sync:{}}};return this.emit({type:"toJSON",json:i}),i}getOptions(){return{...h(this.options,m.defaultOptions),type:"Highcharts"}}getEditableOptions(){let t=this.options,e=this.chart,s=e&&e.options,i=s?.chart?.type||"line";return p(d({chartOptions:s},{chartOptions:{yAxis:u(e&&e.yAxis[0].options),xAxis:u(e&&e.xAxis[0].options),plotOptions:{series:(s&&s.plotOptions||{})[i]}}},t),["dataTable","points","series","data","editableOptions"])}getEditableOptionValue(t){return t?1===t.length&&"chartOptions"===t[0]?JSON.stringify(this.options.chartOptions,null,2):super.getEditableOptionValue.call(this,t):void 0}}return m.predefinedSyncConfig=n,m.defaultOptions=d(t.defaultOptions,o),m}),s(e,"Dashboards/Components/KPIComponent/KPISyncs/KPIExtremesSync.js",[e["Core/Utilities.js"]],function(t){let{defined:e}=t;return{defaultOptions:{},syncPair:{emitter:void 0,handler:function(){if("KPI"!==this.type)return;let t=this,s=this.sync.syncConfig.extremes,i=s.group?":"+s.group:"",{board:n}=this,o=s=>{let i=s.cursor;if("position"===i.type&&"number"==typeof i?.row&&e(i.column)&&t.connectorHandlers?.[0]?.connector&&!e(t.options.value)){let e=t.connectorHandlers[0].connector.table.modified.getCellAsString(i.column,i.row);t.setValue(e)}};if(n)return(()=>{let{dataCursor:t}=n;if(!t)return;let e=this.getFirstConnector()?.table;e&&t.addListener(e.id,"xAxis.extremes.max"+i,o)})(),()=>{let t=this.getFirstConnector()?.table,{dataCursor:e}=n;t&&e.removeListener(t.id,"xAxis.extremes.max"+i,o)}}}}}),s(e,"Dashboards/Components/KPIComponent/KPISyncs/KPISyncs.js",[e["Dashboards/Components/KPIComponent/KPISyncs/KPIExtremesSync.js"]],function(t){return{defaultSyncPairs:{extremes:t.syncPair},defaultSyncOptions:{extremes:t.defaultOptions}}}),s(e,"Dashboards/Components/KPIComponent/KPIComponentDefaults.js",[e["Dashboards/Components/Component.js"]],function(t){return{type:"KPI",className:[t.defaultOptions.className,`${t.defaultOptions.className}-kpi`].join(" "),minFontSize:20,thresholdColors:["#f45b5b","#90ed7d"],editableOptions:[{name:"connectorName",propertyPath:["connector","id"],type:"select"},...t.defaultOptions.editableOptions||[],{name:"Value",type:"input",propertyPath:["value"]},{name:"Column name",type:"input",propertyPath:["columnName"]},{name:"Value format",type:"input",propertyPath:["valueFormat"]}],linkedValueTo:{enabled:!0,seriesIndex:0,pointIndex:0}}}),s(e,"Data/Formula/FormulaTypes.js",[],function(){let t=["+","-","*","/","^","=","<","<=",">",">="];return{isFormula:function(t){return t instanceof Array},isFunction:function(t){return"object"==typeof t&&!(t instanceof Array)&&"function"===t.type},isOperator:function(e){return"string"==typeof e&&t.indexOf(e)>=0},isRange:function(t){return"object"==typeof t&&!(t instanceof Array)&&"range"===t.type},isReference:function(t){return"object"==typeof t&&!(t instanceof Array)&&"reference"===t.type},isValue:function(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t}}}),s(e,"Data/Formula/FormulaProcessor.js",[e["Data/Formula/FormulaTypes.js"]],function(t){let{isFormula:e,isFunction:s,isOperator:i,isRange:n,isReference:o,isValue:r}=t,a=/ */,l=Number.MAX_VALUE/1.000000000001,h=Number.MAX_VALUE/1.000000000002,c=Number.MAX_VALUE,d={"^":3,"*":2,"/":2,"+":1,"-":1,"=":0,"<":0,"<=":0,">":0,">=":0},u={},p=/^[A-Z][A-Z\.]*$/;function m(t){switch(typeof t){case"boolean":return t?c:l;case"string":return h;case"number":return t;default:return NaN}}function f(t){return"string"==typeof t?t.toLowerCase().replace(a,"\0"):t}function g(t){switch(typeof t){case"boolean":return t?1:0;case"string":return parseFloat(t.replace(",","."));case"number":return t;default:return NaN}}function y(t,e,s){let i;switch(t){case"=":return f(e)===f(s);case"<":if(typeof e==typeof s)return f(e)":if(typeof e==typeof s)return f(e)>f(s);return m(e)>m(s);case">=":if(typeof e==typeof s)return f(e)>=f(s);return m(e)>=m(s)}switch(e=g(e),s=g(s),t){case"+":i=e+s;break;case"-":i=e-s;break;case"*":i=e*s;break;case"/":i=e/s;break;case"^":i=Math.pow(e,s);break;default:return NaN}return i%1?Math.round(1e9*i)/1e9:i}function b(t,i){return r(t)?t:n(t)?i&&C(t,i)||[]:s(t)?O(t,i):v(e(t)?t:[t],i)}function C(t,e){let s=e.getColumnNames().slice(t.beginColumn,t.endColumn+1),i=[];for(let n=0,o=s.length,a;no&&(o=i);break;case"object":(i=s(i))>o&&(o=i)}return isFinite(o)?o:0}return t.registerProcessorFunction("MAX",s),s}),s(e,"Data/Formula/Functions/MIN.js",[e["Data/Formula/FormulaProcessor.js"]],function(t){let{getArgumentsValues:e}=t;function s(t,i){let n=e(t,i),o=Number.POSITIVE_INFINITY;for(let t=0,e=n.length,i;tvoid 0===t.main;return class{constructor(t,e){this.options={timezone:"UTC"},this.variableTimezone=!1,this.Date=i.Date,this.update(t),this.lang=e}update(t={}){this.dTLCache={},this.options=t=c(!0,this.options,t);let{timezoneOffset:e,useUTC:s}=t;this.Date=t.Date||i.Date||Date;let o=t.timezone;n(s)&&(o=s?"UTC":void 0),e&&e%60==0&&(o="Etc/GMT"+(e>0?"+":"")+e/60),this.variableTimezone="UTC"!==o&&o?.indexOf("Etc/GMT")!==0,this.timezone=o,["months","shortMonths","weekdays","shortWeekdays"].forEach(t=>{let e=/months/i.test(t),s=/short/.test(t),i={timeZone:"UTC"};i[e?"month":"weekday"]=s?"short":"long",this[t]=(e?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(t=>this.dateFormat(i,(e?31:1)*24*36e5*t))})}toParts(t){let[e,s,i,n,o,r,a]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},t,"es").split(/(?:, | |\/|:)/g);return[n,+i-1,s,o,r,a,Math.floor(Number(t)||0)%1e3,"DLMXJVS".indexOf(e)].map(Number)}dateTimeFormat(t,e,i=this.options.locale||s){let n=JSON.stringify(t)+i;h(t)&&(t=this.str2dtf(t));let r=this.dTLCache[n];if(!r){t.timeZone??(t.timeZone=this.timezone);try{r=new Intl.DateTimeFormat(i,t)}catch(e){/Invalid time zone/i.test(e.message)?(o(34),t.timeZone="UTC",r=new Intl.DateTimeFormat(i,t)):o(e.message,!1)}}return this.dTLCache[n]=r,r?.format(e)||""}str2dtf(t,e={}){let s={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(s).forEach(i=>{-1!==t.indexOf(i)&&r(e,s[i])}),e}makeTime(t,e,s=1,i=0,n,o,r){let a=this.Date.UTC(t,e,s,i,n||0,o||0,r||0);if("UTC"!==this.timezone){let t=this.getTimezoneOffset(a);if(a+=t,-1!==[2,3,8,9,10,11].indexOf(e)&&(i<5||i>20)){let e=this.getTimezoneOffset(a);t!==e?a+=e-t:t-36e5!==this.getTimezoneOffset(a-36e5)||g||(a-=36e5)}}return a}parse(t){if(!h(t))return t??void 0;let e=(t=t.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(t),s=/^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(t);e||s||(t+="Z");let i=Date.parse(t);if(a(i))return i+(!e||s?this.getTimezoneOffset(i):0)}getTimezoneOffset(t){if("UTC"!==this.timezone){let[e,s,i,n,o=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},t,"en").split(/(GMT|:)/).map(Number),r=-(36e5*(i+o/60));if(a(r))return r}return 0}dateFormat(e,s,i){let o=this.lang;if(!n(s)||isNaN(s))return o?.invalidDate||"";if(h(e=e??"%Y-%m-%d %H:%M:%S")){let t;let i=/%\[([a-zA-Z]+)\]/g;for(;t=i.exec(e);)e=e.replace(t[0],this.dateTimeFormat(t[1],s,o?.locale))}if(h(e)&&-1!==e.indexOf("%")){let i=this,[n,a,l,c,p,m,f,g]=this.toParts(s),y=o?.weekdays||this.weekdays,b=o?.shortWeekdays||this.shortWeekdays,C=o?.months||this.months,w=o?.shortMonths||this.shortMonths;d(r({a:b?b[g]:y[g].substr(0,3),A:y[g],d:u(l),e:u(l,2," "),w:g,v:o?.weekFrom??"",b:w[a],B:C[a],m:u(a+1),o:a+1,y:n.toString().substr(2,2),Y:n,H:u(c),k:c,I:u(c%12||12),l:c%12||12,M:u(p),p:c<12?"AM":"PM",P:c<12?"am":"pm",S:u(m),L:u(f,3)},t.dateFormats),function(t,n){if(h(e))for(;-1!==e.indexOf("%"+n);)e=e.replace("%"+n,"function"==typeof t?t.call(i,s):t)})}else if(l(e)){let t=(this.getTimezoneOffset(s)||0)/36e5,i=this.timezone||"Etc/GMT"+(t>=0?"+":"")+t,{prefix:n="",suffix:o=""}=e;e=n+this.dateTimeFormat(r({timeZone:i},e),s)+o}return i?f(e):e}resolveDTLFormat(t){return l(t,!0)?l(t,!0)&&y(t)?{main:t}:t:{main:(t=p(t))[0],from:t[1],to:t[2]}}getDateFormat(t,e,s,i){let n=this.dateFormat("%m-%d %H:%M:%S.%L",e),o="01-01 00:00:00.000",r={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond",l=a;for(a in m){if(t&&t===m.week&&+this.dateFormat("%w",e)===s&&n.substr(6)===o.substr(6)){a="week";break}if(t&&m[a]>t){a=l;break}if(r[a]&&n.substr(r[a])!==o.substr(r[a]))break;"week"!==a&&(l=a)}return this.resolveDTLFormat(i[a]).main}}}),s(e,"Core/Time.js",[e["Shared/TimeBase.js"],e["Core/Utilities.js"]],function(t,e){let{defined:s,extend:i,timeUnits:n}=e;return class extends t{getTimeTicks(t,e,o,r){let a=this,l=[],h={},{count:c=1,unitRange:d}=t,[u,p,m,f,g,y]=a.toParts(e),b=(e||0)%1e3,C;if(r??(r=1),s(e)){if(b=d>=n.second?0:c*Math.floor(b/c),d>=n.second&&(y=d>=n.minute?0:c*Math.floor(y/c)),d>=n.minute&&(g=d>=n.hour?0:c*Math.floor(g/c)),d>=n.hour&&(f=d>=n.day?0:c*Math.floor(f/c)),d>=n.day&&(m=d>=n.month?1:Math.max(1,c*Math.floor(m/c))),d>=n.month&&(p=d>=n.year?0:c*Math.floor(p/c)),d>=n.year&&(u-=u%c),d===n.week){c&&(e=a.makeTime(u,p,m,f,g,y,b));let t=this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},e,"es"),s="DLMXJVS".indexOf(t);m+=-s+r+(s4*n.month||a.getTimezoneOffset(e)!==a.getTimezoneOffset(o));let t=e,i=1;for(;t1?t=a.makeTime(u,p,m,f+i*c):t+=d*c,i++;l.push(t),d<=n.hour&&l.length<1e4&&l.forEach(t=>{t%18e5==0&&"000000000"===a.dateFormat("%H%M%S%L",t)&&(h[t]="day")})}return l.info=i(t,{higherRanks:h,totalRange:d*c}),l}}}),s(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],function(t,e,s,i,n){let{isTouchDevice:o}=e,{fireEvent:r,merge:a}=n,l={colors:s.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{weekFrom:"week from",chartTitle:"Chart title",locale:void 0,loading:"Loading...",months:void 0,seriesName:"Series {add index 1}",shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],pieSliceName:"Slice",resetZoom:"Reset zoom",yAxisTitle:"Values",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:t,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:t=>Math.sqrt(1-Math.pow(t-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"%v %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,position:{x:0,y:3},shared:!1,snap:o?25:10,headerFormat:'{ucfirst point.key}
    ',pointFormat:'● {series.name}: {point.y}
    ',backgroundColor:"#ffffff",borderWidth:void 0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}},h=new i(l.time,l.lang);return{defaultOptions:l,defaultTime:h,getOptions:function(){return l},setOptions:function(t){return r(e,"setOptions",{options:t}),a(!0,l,t),t.time&&h.update(l.time),t.lang&&"locale"in t.lang&&h.update({locale:t.lang.locale}),t.lang?.chartTitle&&(l.title={...l.title,text:t.lang.chartTitle}),l}}}),s(e,"Core/Templating.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,s){let{defaultOptions:i,defaultTime:n}=t,{pageLang:o}=e,{extend:r,getNestedProperty:a,isArray:l,isNumber:h,isObject:c,isString:d,pick:u,ucfirst:p}=s,m={add:(t,e)=>t+e,divide:(t,e)=>0!==e?t/e:"",eq:(t,e)=>t==e,each:function(t){let e=arguments[arguments.length-1];return!!l(t)&&t.map((s,i)=>y(e.body,r(c(s)?s:{"@this":s},{"@index":i,"@first":0===i,"@last":i===t.length-1}))).join("")},ge:(t,e)=>t>=e,gt:(t,e)=>t>e,if:t=>!!t,le:(t,e)=>t<=e,lt:(t,e)=>tt*e,ne:(t,e)=>t!=e,subtract:(t,e)=>t-e,ucfirst:p,unless:t=>!t},f={},g=t=>/^["'].+["']$/.test(t);function y(t="",e,s){let o=/\{([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'’= #\(\)]+)\}/g,r=/\(([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/g,l=[],h=/f$/,c=/\.(\d)/,p=s?.options?.lang||i.lang,f=s?.time||n,C=s?.numberFormatter||b,w=(t="")=>{let s;return"true"===t||"false"!==t&&((s=Number(t)).toString()===t?s:g(t)?t.slice(1,-1):a(t,e))},v,O,D=0,N;for(;null!==(v=o.exec(t));){let s=v,i=r.exec(v[1]);i&&(v=i,N=!0),O?.isBlock||(O={ctx:e,expression:v[1],find:v[0],isBlock:"#"===v[1].charAt(0),start:v.index,startInner:v.index+v[0].length,length:v[0].length});let n=(O.isBlock?s:v)[1].split(" ")[0].replace("#","");m[n]&&(O.isBlock&&n===O.fn&&D++,O.fn||(O.fn=n));let o="else"===v[1];if(O.isBlock&&O.fn&&(v[1]===`/${O.fn}`||o)){if(D)!o&&D--;else{let e=O.startInner,s=t.substr(e,v.index-e);void 0===O.body?(O.body=s,O.startInner=v.index+v[0].length):O.elseBody=s,O.find+=s+v[0],o||(l.push(O),O=void 0)}}else O.isBlock||l.push(O);if(i&&!O?.isBlock)break}return l.forEach(i=>{let n,o;let{body:a,elseBody:l,expression:b,fn:v}=i;if(v){let t=[i],r=[],h=b.length,c=0,d;for(o=0;o<=h;o++){let t=b.charAt(o);d||'"'!==t&&"'"!==t?d===t&&(d=""):d=t,d||" "!==t&&o!==h||(r.push(b.substr(c,o-c)),c=o+1)}for(o=m[v].length;o--;)t.unshift(w(r[o+1]));n=m[v].apply(e,t),i.isBlock&&"boolean"==typeof n&&(n=y(n?a:l,e,s))}else{let t=g(b)?[b]:b.split(":");if(n=w(t.shift()||""),t.length&&"number"==typeof n){let e=t.join(":");if(h.test(e)){let t=parseInt((e.match(c)||["","-1"])[1],10);null!==n&&(n=C(n,t,p.decimalPoint,e.indexOf(",")>-1?p.thousandsSep:""))}else n=f.dateFormat(e,n)}r.lastIndex=0,r.test(i.find)&&d(n)&&(n=`"${n}"`)}t=t.replace(i.find,u(n,""))}),N?y(t,e,s):t}function b(t,e,s,n){e=+e;let r,a,[l,c]=(t=+t||0).toString().split("e").map(Number),d=this?.options?.lang||i.lang,u=(t.toString().split(".")[1]||"").split("e")[0].length,p=e,m={};s??(s=d.decimalPoint),n??(n=d.thousandsSep),-1===e?e=Math.min(u,20):h(e)?e&&c<0&&((a=e+c)>=0?(l=+l.toExponential(a).split("e")[0],e=a):(l=Math.floor(l),t=e<20?+(l*Math.pow(10,c)).toFixed(e):0,c=0)):e=2,c&&(e??(e=2),t=l),h(e)&&e>=0&&(m.minimumFractionDigits=e,m.maximumFractionDigits=e),""===n&&(m.useGrouping=!1);let g=n||s,y=g?"en":this?.locale||d.locale||o,b=JSON.stringify(m)+y;return r=(f[b]??(f[b]=new Intl.NumberFormat(y,m))).format(t),g&&(r=r.replace(/([,\.])/g,"_$1").replace(/_\,/g,n??",").replace("_.",s??".")),(e||0!=+r)&&(!(c<0)||p)||(r="0"),c&&0!=+r&&(r+="e"+(c<0?"":"+")+c),r}return{dateFormat:function(t,e,s){return n.dateFormat(t,e,s)},format:y,helpers:m,numberFormat:b}}),s(e,"Dashboards/Components/KPIComponent/KPIComponent.js",[e["Core/Renderer/HTML/AST.js"],e["Dashboards/Components/Component.js"],e["Dashboards/Components/KPIComponent/KPISyncs/KPISyncs.js"],e["Dashboards/Components/KPIComponent/KPIComponentDefaults.js"],e["Data/Formula/Functions/SUM.js"],e["Data/Formula/Functions/AVERAGE.js"],e["Data/Formula/Functions/MEDIAN.js"],e["Data/Formula/Functions/MAX.js"],e["Data/Formula/Functions/MIN.js"],e["Data/Formula/Functions/COUNT.js"],e["Data/Formula/Functions/PRODUCT.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,s,i,n,o,r,a,l,h,c,d,u){let{format:p}=d,{createElement:m,css:f,defined:g,diffObjects:y,isArray:b,isNumber:C,merge:w,isFunction:v}=u;class O extends e{static fromJSON(t,e){let s=t.options,i=s.chartOptions&&JSON.parse(s.chartOptions),n=JSON.parse(s.subtitle||"{}"),o=s.title&&JSON.parse(s.title);return new O(e,w(s,{chartOptions:i,title:o,subtitle:n}))}constructor(t,e,s){super(t,e=w(O.defaultOptions,e),s),this.options=e,this.type="KPI",this.value=m("span",{className:`${e.className}-value`},{},this.contentElement),this.subtitle=m("span",{className:this.getSubtitleClassName()},{},this.contentElement)}async load(){return await super.load(),this.linkValueToChart(),this}resize(t,e){return super.resize(t,e),this.chart&&this.chart.container&&this.chart.reflow(),this}render(){super.render(),this.updateElements();let t=O.charter?.Chart;return t&&this.options.chartOptions&&!this.chart?(this.chartContainer||(this.chartContainer=m("div",{className:`${this.options.className}-chart-container`},{padding:"0.1px"},this.contentElement)),this.chart=t.chart(this.chartContainer,w(O.defaultChartOptions,this.options.chartOptions))):this.chart&&!this.options.chartOptions&&"chartOptions"in this.options&&(this.chart.destroy(),this.chart=void 0),this.sync.start(),this.emit({type:"afterRender"}),this}async update(t,e=!0){await super.update(t),t.chartOptions&&this.chart&&this.chart.update(t.chartOptions),e&&this.render()}onTableChanged(){this.setValue()}destroy(){this.chart?.destroy(),super.destroy()}getFormulaValue(){let t=this.options.formula,e=this.getFirstConnector(),s=e?.table.modified,i=s?.getColumn(this.options.columnName);if(!i||!t)return;if(v(t))return t.call(this,i);let n=Array.isArray(i)?i.slice().filter(g):Array.from(i);("MIN"===t||"MAX"===t||"MEDIAN"===t)&&(n=n.filter(t=>""!==t&&!isNaN(Number(t)))),"MEDIAN"===t&&n.sort((t,e)=>Number(t)-Number(e));try{return O.formulaFunctions[t](n)}catch{console.warn("Invalid formula option provided.")}}getValue(){if(g(this.options.value))return this.options.value;let t=this.getFirstConnector();if(t&&this.options.columnName){if(g(this.options.formula))return this.getFormulaValue();let e=t.table.modified,s=e.getColumn(this.options.columnName),i=s?.length||0;return e.getCellAsString(this.options.columnName,i-1)}}setValue(e=this.getValue()){let{valueFormat:s,valueFormatter:i}=this.options;if(g(e)){let n;C(+e)&&(n=+e),i?e=i.call(this,e):s?e=p(s,{value:e}):C(e)&&(e=e.toLocaleString()),t.setElementHTML(this.value,""+e),this.linkValueToChart(n),this.prevValue=n}}linkValueToChart(t=this.getValue()){let e=this.chart,s=this.options.linkedValueTo;if(!e||!s.enabled||!g(t)||!C(+t))return;t=+t;let i=e.series[s.seriesIndex??0],n=i?.points[s.pointIndex??0];if(i){if(n){n.update({y:t});return}i.addPoint({y:t});return}e.addSeries({data:[{y:t}]})}updateElements(){let{style:e,subtitle:s}=this.options;this.setValue(),t.setElementHTML(this.subtitle,this.getSubtitle()),e&&f(this.element,e),"object"==typeof s&&(s.style&&f(this.subtitle,s.style),this.subtitle.className=this.getSubtitleClassName()),this.chartContainer&&(this.chartContainer.style.flex=this.options.chartOptions?"1":"0"),this.chart&&this.chart.reflow(),this.value.style.color=this.getValueColor()}getSubtitle(){let{subtitle:t,value:e}=this.options;if("string"==typeof t)return t;if(t){if(C(this.prevValue)&&C(e)){let s=e-this.prevValue,i="";if(s>0)i='▲ +';else{if(!(s<0))return this.subtitle.innerHTML;i='▼ '}if("diff"===t.type)return i+s.toLocaleString();if("diffpercent"===t.type)return i+p("{v:,.2f}%",{v:s/this.prevValue*100})}return t.text||""}return""}getSubtitleClassName(){let{subtitle:t}=this.options;return`${e.defaultOptions.className}-subtitle`+("object"==typeof t&&t.className||"")}getValueColor(){let{threshold:t,thresholdColors:e,value:s}=this.options;if(e&&t&&C(s)){if(b(t)){for(let i=t.length-1;i>=0;i--)if(s>=t[i]){if(i+1=t)return e[1];return e[0]}return""}getOptionsOnDrop(t){let e=t.editMode.board.dataPool.getConnectorIds(),s={cell:"",type:"KPI"};return e.length&&(s={...s,connector:{id:e[0]}}),s}toJSON(){let t=super.toJSON(),e={...t,type:"KPI",options:{...t.options,type:"KPI",value:this.options.value,subtitle:JSON.stringify(this.options.subtitle),title:JSON.stringify(this.options.title),threshold:this.options.threshold,thresholdColors:this.options.thresholdColors,chartOptions:JSON.stringify(this.options.chartOptions),valueFormat:this.options.valueFormat}};return this.emit({type:"toJSON",json:t}),e}getOptions(){return{...y(this.options,O.defaultOptions),type:"KPI"}}}return O.defaultOptions=w(e.defaultOptions,i),O.predefinedSyncConfig=s,O.defaultChartOptions={chart:{type:"spline",zooming:{mouseWheel:{enabled:!1}}},title:{text:void 0},xAxis:{visible:!1},yAxis:{visible:!1,title:{text:null}},legend:{enabled:!1},credits:{enabled:!1},tooltip:{outside:!0},plotOptions:{series:{marker:{enabled:!1}}}},O.formulaFunctions={SUM:n,AVERAGE:o,MEDIAN:r,MAX:a,MIN:l,COUNT:h,PRODUCT:c},O}),s(e,"Dashboards/Components/NavigatorComponent/NavigatorComponentDefaults.js",[e["Dashboards/Components/Component.js"]],function(t){return{type:"Navigator",className:[t.defaultOptions.className,`${t.defaultOptions.className}-navigator`].join(" "),chartOptions:{chart:{animation:!1,height:200,type:"column",zooming:{mouseWheel:{enabled:!1}}},credits:{enabled:!1},legend:{enabled:!1},navigator:{enabled:!0,outlineWidth:0,series:{animation:!1,lineWidth:0,colorIndex:0},xAxis:{endOnTick:!0,gridZIndex:4,labels:{x:1,y:22},opposite:!0,showFirstLabel:!0,showLastLabel:!0,startOnTick:!0,tickPosition:"inside"},yAxis:{maxPadding:.5}},plotOptions:{series:{borderRadius:0,marker:{enabled:!1},states:{hover:{enabled:!1}}}},scrollbar:{enabled:!0},title:{text:""},tooltip:{enabled:!1},xAxis:{visible:!1,minRange:Number.MIN_VALUE},yAxis:{visible:!1}},editableOptions:(t.defaultOptions.editableOptions||[]).concat()}}),s(e,"Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorSyncUtils.js",[],function(){var t,e;return(e=t||(t={})).setRangeOptions=function(t,e,s,i){let n=!1;for(let o=0,r=t.length;o{if(s.connectorHandlers?.[0]?.connector){let n=s.connectorHandlers[0].connector.table,o=s.board.dataCursor,a=s.getColumnAssignment()[0],[l,h]=s.getAxisExtremes(),c=n.getModifier();c instanceof i?e.setRangeOptions(c.options.ranges,a,l,h):c=new i({ranges:[{column:a,maxValue:h,minValue:l}]}),await n.setModifier(c),o.emitCursor(n,{type:"position",column:a,row:n.getRowIndexBy(a,l),state:"crossfilter"+r},t),o.emitCursor(n,{type:"position",column:a,row:n.getRowIndexBy(a,h),state:"crossfilter"+r},t)}};return n(s.chart.xAxis[0],"afterSetExtremes",function(e){clearTimeout(t),t=setTimeout(a,50,this,e)})},handler:void 0}}}),s(e,"Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorExtremesSync.js",[e["Data/Modifiers/DataModifier.js"],e["Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorSyncUtils.js"],e["Core/Utilities.js"]],function(t,e,s){let{Range:i}=t.types,{addEvent:n,pick:o,defined:r}=s;return{defaultOptions:{},syncPair:{emitter:function(){let t;if("Navigator"!==this.type)return;let e=this,s=this.sync.syncConfig.extremes,i=s.group?":"+s.group:"",o=t=>{if(e.connectorHandlers?.[0]?.connector){let s=e.connectorHandlers[0].connector.table,n=e.board.dataCursor,o=e.getColumnAssignment()[0],[r,a]=e.getAxisExtremes();n.emitCursor(s,{type:"position",column:o,row:s.getRowIndexBy(o,r),state:"xAxis.extremes.min"+i},t),n.emitCursor(s,{type:"position",column:o,row:s.getRowIndexBy(o,a),state:"xAxis.extremes.max"+i},t)}};return n(e.chart.xAxis[0],"afterSetExtremes",function(e){clearTimeout(t),t=setTimeout(o,50,this,e)})},handler:function(){if("Navigator"!==this.type)return;let t=this,s=this.sync.syncConfig.extremes,n=s.group?":"+s.group:"",a=t.board.dataCursor,l=s=>{let a=s.cursor;if(!t.connectorHandlers?.[0]?.connector)return;let l=t.connectorHandlers[0].connector.table,h=l.getColumnNames()[0],c=l.getRowCount(),d=0;"range"===a.type?(c=a.lastRow,d=a.firstRow,a.columns&&(h=o(a.columns[0],h))):a.state==="xAxis.extremes.max"+n?(h=o(a.column,h),c=o(a.row,c)):(h=o(a.column,h),d=o(a.row,d));let u=l.getModifier();if("string"==typeof h&&u instanceof i){let t=u.options.ranges,s=l.getCell(h,d),i=l.getCell(h,c);r(i)&&r(s)&&(e.unsetRangeOptions(t,h),t.unshift({column:h,maxValue:i,minValue:s}),l.setModifier(u))}};return(()=>{let e=t.connectorHandlers?.[0]?.connector?.table;e&&(a.addListener(e.id,"xAxis.extremes"+n,l),a.addListener(e.id,"xAxis.extremes.max"+n,l),a.addListener(e.id,"xAxis.extremes.min"+n,l))})(),()=>{let e=t.connectorHandlers?.[0]?.connector?.table;e&&(a.removeListener(e.id,"xAxis.extremes"+n,l),a.removeListener(e.id,"xAxis.extremes.max"+n,l),a.removeListener(e.id,"xAxis.extremes.min"+n,l))}}}}}),s(e,"Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorSyncs.js",[e["Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorCrossfilterSync.js"],e["Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorExtremesSync.js"]],function(t,e){return{defaultSyncPairs:{crossfilter:t.syncPair,extremes:e.syncPair},defaultSyncOptions:{crossfilter:t.defaultOptions,extremes:e.defaultOptions}}}),s(e,"Dashboards/Components/NavigatorComponent/NavigatorComponent.js",[e["Dashboards/Components/Component.js"],e["Dashboards/Globals.js"],e["Dashboards/Components/NavigatorComponent/NavigatorComponentDefaults.js"],e["Dashboards/Components/NavigatorComponent/NavigatorSyncs/NavigatorSyncs.js"],e["Core/Utilities.js"]],function(t,e,s,i,n){let{diffObjects:o,isNumber:r,isString:a,merge:l,pick:h}=n;class c extends t{static fromJSON(t,e){let s=new c(e,t.options);return s.emit({type:"fromJSON",json:t}),s}constructor(t,s){super(t,s),this.type="Navigator",this.options=l(c.defaultOptions,s);let i=c.charter.Chart||e.win.Highcharts;this.chartContainer=e.win.document.createElement("div"),this.chart=i.chart(this.chartContainer,this.options.chartOptions||{}),this.chartContainer.classList.add(e.classNamePrefix+"navigator"),this.sync.syncConfig.crossfilter?.enabled&&this.chart.update(l({navigator:{xAxis:{labels:{format:"{value}"}}}},this.options.chartOptions||{}),!1)}adjustNavigator(){let t=this.chart,e=h(t.chartHeight,this.contentElement.clientHeight),s=this.contentElement.clientWidth,i={};if((t.chartHeight!==e||t.chartWidth!==s)&&(i.chart={height:e,width:s}),t.navigator){let s=t.navigator,n=s.top-t.plotTop+s.height;s.height!==n&&(i.navigator={handles:{height:Math.round(e/4)},height:n}),Object.keys(i).length&&t.update(i,!1),s.series&&s.series[0]&&s.series[0].update({type:t.series[0].type},!1)}else Object.keys(i).length&&t.update(i,!1)}getColumnAssignment(){let t;let e=this.options.columnAssignment??this.options.columnAssignments??{};for(let s of Object.keys(e))if(null!==(t=e[s]))return[s,t];let s=this.getFirstConnector();if(s){let t=s.table.getColumnNames();if(t.length)return[t[0],"y"]}return["","y"]}getOptions(){return{...o(this.options,s),type:"Navigator"}}getAxisExtremes(){let t=this.chart.xAxis[0],e=t.getExtremes(),s=r(e.min)?e.min:e.dataMin,i=r(e.max)?e.max:e.dataMax;return this.categories?[this.categories[Math.max(0,Math.ceil(s))],this.categories[Math.min(this.categories.length-1,Math.floor(i))]]:t.hasNames?[t.names[Math.ceil(s)],t.names[Math.floor(i)]]:[s,i]}async load(){return await super.load(),this.contentElement.appendChild(this.chartContainer),this.parentElement.appendChild(this.element),this.adjustNavigator(),this.emit({type:"afterLoad"}),this}onTableChanged(){this.renderNavigator()}redrawNavigator(){let t=this.resizeTimeouts;for(let e=0,s=t.length;e{this.adjustNavigator(),this.chart.redraw()},33))}render(){return super.render(),this.renderNavigator(),this.sync.start(),this.emit({type:"afterRender"}),this}renderNavigator(){let t=this.chart,e=this.getFirstConnector();if(e){let s;let i=e.table,n=this.getColumnAssignment(),o=i.getColumn(n[0],!0)||[];s=this.sync.syncConfig.crossfilter?.enabled?this.generateCrossfilterData():o.slice(),t.series[0]?t.series[0].setData(s,!1):t.addSeries({id:i.id,data:s},!1)}this.redrawNavigator()}generateCrossfilterData(){let t;let e=this.sync.syncConfig.crossfilter,s=this.getFirstConnector()?.table,i=s?.getColumn(this.getColumnAssignment()[0],!0)||[];if(!s||i.length<1||!e)return[];let n=[],o=[];for(let t=0,e=i.length;th(t,NaN)=(n.minValue??-1/0)&&i[t][s]<=(n.maxValue??1/0))){a=!1;break}}a&&t.push(o)}}else t=n;let c=[];if(this.stringData){this.categories=o;for(let t=0,e=o.length;tn.revision||"number"==typeof r&&r(()=>{"use strict";var a={532:e=>{e.exports=t},960:e=>{e.exports=s},260:e=>{e.exports=i},512:e=>{e.exports=r},944:t=>{t.exports=e}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return a[e](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};o.d(l,{default:()=>$});var h=o(944),u=o.n(h);let{win:d}=u(),{discardElement:p,objectEach:c}=u(),m={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},s=new XMLHttpRequest;function i(t,s){e.error&&e.error(t,s)}if(!e.url)return!1;s.open((e.type||"get").toUpperCase(),e.url,!0),e.headers&&e.headers["Content-Type"]||s.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),c(e.headers,function(e,t){s.setRequestHeader(t,e)}),e.responseType&&(s.responseType=e.responseType),s.onreadystatechange=function(){let t;if(4===s.readyState){if(200===s.status){if("blob"!==e.responseType&&(t=s.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return i(s,e)}return e.success&&e.success(t,s)}i(s,s.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),s.send(e.data)},getJSON:function(e,t){m.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(e,t,s){let i=new d.FormData;c(t,function(e,t){i.append(t,e)}),i.append("b64","true");let{filename:r,type:a}=t;return d.fetch(e,{method:"POST",body:i,...s}).then(e=>{e.ok&&e.text().then(e=>{let t=document.createElement("a");t.href=`data:${a};base64,${e}`,t.download=r,t.click(),p(t)})})}};var f=o(532),g=o.n(f),x=o(960),y=o.n(x),v=o(260),C=o.n(v),T=o(512),N=o.n(T);let{getOptions:R}=u(),{doc:A}=u(),{ajax:Y}=m,{seriesTypes:D}=N(),{addEvent:w,defined:U,extend:b,fireEvent:F,isNumber:O,merge:H,objectEach:S,pick:E,splat:j}=u();function L(e){return!!(e&&(e.rowsURL||e.csvURL||e.columnsURL))}class M{static data(e,t={},s){return new M(e,t,s)}static rowsToColumns(e){let t,s,i,r,a;if(e)for(t=0,a=[],s=e.length;tt.getFullYear()-2e3?s+=1900:s+=2e3,Date.UTC(s,+e[2]-1,+e[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})[\-\/\.](\d{1,2})[\-\/\.](\d{2})$/,parser:function(e){return e?Date.UTC(+e[3]+2e3,+e[1]-1,+e[2]):NaN}}},this.chart=s,this.chartOptions=t,this.options=e,this.rawColumns=[],this.init(e,t,s)}init(e,t,s){let i=e.decimalPoint,r;t&&(this.chartOptions=t),s&&(this.chart=s),"."!==i&&","!==i&&(i=void 0),this.options=e,this.columns=e.columns||this.rowsToColumns(e.rows)||[],this.firstRowAsNames=E(e.firstRowAsNames,this.firstRowAsNames,!0),this.decimalRegex=i&&RegExp("^(-?[0-9]+)"+i+"([0-9]+)$"),void 0!==this.liveDataTimeout&&clearTimeout(this.liveDataTimeout),this.rawColumns=[],this.columns.length&&(this.dataFound(),r=!L(e)),r||(r=this.fetchLiveData()),r||(r=!!this.parseCSV().length),r||(r=!!this.parseTable().length),r||(r=this.parseGoogleSpreadsheet()),!r&&e.afterComplete&&e.afterComplete(this)}getColumnDistribution(){let e=this.chartOptions,t=this.options,s=[],i=function(e="line"){return(D[e].prototype.pointArrayMap||[0]).length},r=function(e="line"){return D[e].prototype.pointArrayMap},a=e?.chart?.type,n=[],o=[],l=t?.seriesMapping||e?.series?.map(function(){return{x:0}})||[],h=0;(e?.series||[]).forEach(e=>{n.push(i(e.type||a))}),l.forEach(e=>{s.push(e.x||0)}),0===s.length&&s.push(0),l.forEach(t=>{let s=new I,l=n[h]||i(a),u=(e?.series??[])[h]??{},d=r(u.type||a),p=d??["y"];(U(t.x)||u.isCartesian||!d)&&s.addColumnReader(t.x,"x"),S(t,function(e,t){"x"!==t&&s.addColumnReader(e,t)});for(let e=0;e=p.length)&&(u=p.length-1),i.itemDelimiter)d=i.itemDelimiter;else{let e,s,r;e=0,s=0,r=!1,p.some(function(t,i){let r=!1,a,n,l,h="";if(i>13)return!0;for(let i=0;io[","]?r=";":(o[","],o[";"],r=","),i.decimalPoint||(e>s?i.decimalPoint=".":i.decimalPoint=",",t.decimalRegex=RegExp("^(-?[0-9]+)"+i.decimalPoint+"([0-9]+)$")),d=r}let e=0;for(c=h;c<=u;c++)"#"===p[c][0]?e++:function(e,t,o,l){let h=0,u="",p="",c="",m="",f=0,g=0;function x(t){u=e[t],p=e[t-1],c=e[t+1]}function y(e){n.lengthf||f>a){++f,m="";return}i.columnTypes||(!isNaN(parseFloat(m))&&isFinite(m)?(m=parseFloat(m),y("number")):isNaN(Date.parse(m))?y("string"):(m=m.replace(/\//g,"-"),y("date"))),s.lengthe.length)&&(s=e.length);u31?o[p]<100?l[p]="YY":l[p]="YYYY":o[p]>12&&o[p]<=31?(l[p]="dd",d=!0):l[p].length||(l[p]="mm")));if(d){for(p=0;p12&&"YY"!==l[p]&&"YYYY"!==l[p]&&(l[p]="YY"):n[p]>12&&"mm"===l[p]&&(l[p]="dd");return(3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),h=l.join("/"),(i.dateFormats||t.dateFormats)[h])?h:(F(t,"deduceDateFailed"),r)}return r}(s[0])),this.dataFound()}return s}parseTable(){let e=this.options,t=this.columns||[],s=e.startRow||0,i=e.endRow||Number.MAX_VALUE,r=e.startColumn||0,a=e.endColumn||Number.MAX_VALUE;if(e.table){let n=e.table;"string"==typeof n&&(n=A.getElementById(n)),[].forEach.call(n.getElementsByTagName("tr"),(e,n)=>{n>=s&&n<=i&&[].forEach.call(e.children,(e,i)=>{let o=t[i-r],l=1;if(("TD"===e.tagName||"TH"===e.tagName)&&i>=r&&i<=a)for(t[i-r]||(t[i-r]=[]),t[i-r][n-s]=e.innerHTML;n-s>=l&&void 0===o[n-s-l];)o[n-s-l]=null,l++})}),this.dataFound()}return t}fetchLiveData(){let e=this,t=this.chart,s=this.options,i=s.enablePolling,r=H(s),a=0,n=1e3*(s.dataRefreshRate||2);return!!L(s)&&(n<1e3&&(n=1e3),delete s.csvURL,delete s.rowsURL,delete s.columnsURL,!function o(l){function h(r,h,u){if(!r||!/^(http|\/|\.\/|\.\.\/)/.test(r))return r&&s.error&&s.error("Invalid URL"),!1;function d(){i&&t.liveDataURL===r&&(e.liveDataTimeout=setTimeout(o,n))}return l&&(clearTimeout(e.liveDataTimeout),t.liveDataURL=r),Y({url:r,dataType:u||"json",success:function(e){t?.series&&h(e),d()},error:function(e,t){return++a<3&&d(),s.error?.(t,e)}}),!0}h(r.csvURL,function(e){t.update({data:{csv:e}})},"text")||h(r.rowsURL,function(e){t.update({data:{rows:e}})})||h(r.columnsURL,function(e){t.update({data:{columns:e}})})}(!0),L(s))}parseGoogleSpreadsheet(){let e=this,t=this.options,s=t.googleSpreadsheetKey,i=this.chart,r=Math.max(1e3*(t.dataRefreshRate||2),4e3),a=()=>{if(t.googleSpreadsheetRange)return t.googleSpreadsheetRange;let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=(e.charAt(t.startColumn||0)||"A")+((t.startRow||0)+1),i=e.charAt(E(t.endColumn,-1))||"ZZ";return U(t.endRow)&&(i+=t.endRow+1),`${s}:${i}`};return s&&(delete t.googleSpreadsheetKey,function i(n){Y({url:["https://sheets.googleapis.com/v4/spreadsheets",s,"values",a(),"?alt=json&majorDimension=COLUMNS&valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=FORMATTED_STRING&key="+t.googleAPIKey].join("/"),dataType:"json",success:function(s){n(s),t.enablePolling&&(e.liveDataTimeout=setTimeout(function(){i(n)},r))},error:function(e,s){return t.error?.(s,e)}})}(function(t){let s=t.values;if(!s||0===s.length)return!1;let r=s.reduce((e,t)=>Math.max(e,t.length),0);s.forEach(e=>{for(let t=0;t31536e6&&"float"!==l?e.isDatetime=!0:e.isNumeric=!0,void 0!==e[d+1]&&(y=c>e[d+1])):(m?.length&&(g=this.parseDate(p)),a&&O(g)&&"float"!==l?(n[d]=p,e[d]=g,e.isDatetime=!0,void 0!==e[d+1]&&((x=g>e[d+1])!==y&&void 0!==y&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,d=e.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):e.unsorted=!0),y=x)):(e[d]=""===m?null:m,0!==d&&(e.isDatetime||e.isNumeric)&&(e.mixed=!0)));if(a&&e.mixed&&(i[t]=s[t]),a&&y&&this.options.sort){for(t=0;t0;){for((d=new I).addColumnReader(0,"x"),-1!==(m=p.indexOf(0))&&p.splice(m,1),n=0;n0&&s[0].readers.length>0&&void 0!==(c=e?.[s[0].readers[0].columnIndex??-1])&&(c.isDatetime?i="datetime":c.isNumeric||(i="category")),"category"===i)for(h=0;h{void 0===t.columnIndex&&(t.columnIndex=e.shift())}),this.readers.forEach(e=>{void 0===e.columnIndex&&(t=!1)}),t}read(e,t){let s=this.pointIsArray,i=s?[]:{};if(this.readers.forEach(r=>{let a=e[r.columnIndex][t];s?i.push(a):r.configName.indexOf(".")>0?C().prototype.setNestedProperty(i,a,r.configName):i[r.configName]=a}),void 0===this.name&&this.readers.length>=2){let t=[];this.readers.forEach(function(e){("x"===e.configName||"name"===e.configName||"y"===e.configName)&&void 0!==e.columnIndex&&t.push(e.columnIndex)}),t.length>=2&&(t.shift(),t.sort(function(e,t){return e-t})),this.name=e[E(t.shift(),0)].name}return i}addColumnReader(e,t){this.readers.push({columnIndex:e,configName:t}),"x"===t||"y"===t||void 0===t||(this.pointIsArray=!1)}getReferencedColumnIndexes(){let e,t;let s=[];for(e=0;e-1/0}function m(e){return null!=e}function f(e,t,i){let s;let r=l(t)&&!m(i),o=(t,i)=>{m(t)?e.setAttribute(i,t):r?(s=e.getAttribute(i))||"class"!==i||(s=e.getAttribute(i+"Name")):e.removeAttribute(i)};return l(t)?o(i,t):T(t,o),s}function p(e){return a(e)?e:[e]}function g(e,t){let i;for(i in e||(e={}),t)e[i]=t[i];return e}function C(){let e=arguments,t=e.length;for(let i=0;i1e14?e:parseFloat(e.toPrecision(t||14))}(o||(o={})).messages=[],Math.easeInOutSine=function(e){return -.5*(Math.cos(Math.PI*e)-1)};let v=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){let i;let s=e.length;for(i=0;ie.order-t.order),e.forEach(e=>{!1===e.fn.call(t,r)&&r.preventDefault()})}o&&!r.defaultPrevented&&o.call(t,r)}let D=function(){let e=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(t?"":e)+i++}}();return r.jQuery&&(r.jQuery.fn.highcharts=function(){let t=[].slice.call(arguments);if(this[0])return t[0]?(new e[l(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):i[f(this[0],"data-highcharts-chart")]}),{addEvent:function(t,i,s,r={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let n=o.hcEvents;e.Point&&t instanceof e.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let l=t.addEventListener;l&&l.call(t,i,s,!!e.supportsPassiveEvents&&{passive:void 0===r.passive?-1!==i.indexOf("touch"):r.passive,capture:!1}),n[i]||(n[i]=[]);let a={fn:s,order:"number"==typeof r.order?r.order:1/0};return n[i].push(a),n[i].sort((e,t)=>e.order-t.order),function(){E(t,i,s)}},arrayMax:function(e){let t=e.length,i=e[0];for(;t--;)e[t]>i&&(i=e[t]);return i},arrayMin:function(e){let t=e.length,i=e[0];for(;t--;)e[t]t?e-1&&r[h]){i=p(i),o[h]=[];for(let t=0;t({center:.5,right:1,middle:.5,bottom:1})[e]||0,getClosestDistance:function(e,t){let i,s,r,o;let n=!t;return e.forEach(e=>{if(e.length>1)for(o=s=e.length-1;o>0;o--)(r=e[o]-e[o-1])<0&&!n?(t?.(),t=void 0):r&&(void 0===i||r=i-1&&(i=Math.floor(s)),Math.max(0,i-(e(t,"padding-left",!0)||0)-(e(t,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(e(t,"padding-top",!0)||0)-(e(t,"padding-bottom",!0)||0));let l=r.getComputedStyle(t,void 0);return l&&(o=l.getPropertyValue(i),C(s,"opacity"!==i)&&(o=n(o))),o},insertItem:function(e,t){let i;let s=e.options.index,r=t.length;for(i=e.options.isInternal?r:0;i=e))&&(r||!(l<=(t[o]+(t[o+1]||t[o]))/2)));o++);return b(n*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:T,offset:function(e){let t=s.documentElement,i=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(r.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(r.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:i.width,height:i.height}},pad:function(e,t,i){return Array((t||2)+1-String(e).replace("-","").length).join(i||"0")+e},pick:C,pInt:n,pushUnique:function(e,t){return 0>e.indexOf(t)&&!!e.push(t)},relativeLength:function(e,t,i){return/%$/.test(e)?t*parseFloat(e)/100+(i||0):parseFloat(e)},removeEvent:E,replaceNested:function(e,...t){let i,s;do for(s of(i=e,t))e=e.replace(s[0],s[1]);while(e!==i);return e},splat:p,stableSort:function(e,t){let i,s;let r=e.length;for(s=0;s0?setTimeout(e,t,i):(e.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(e){return l(e)?e.substring(0,1).toUpperCase()+e.substring(1):String(e)},uniqueKey:D,useSerialIds:function(e){return t=C(e,t)},wrap:function(e,t,i){let s=e[t];e[t]=function(){let e=arguments,t=this;return i.apply(this,[function(){return s.apply(t,arguments.length?arguments:e)}].concat([].slice.call(arguments)))}}}}),i(t,"Core/Renderer/HTML/AST.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{SVG_NS:i,win:s}=e,{attr:r,createElement:o,css:n,error:l,isFunction:a,isString:d,objectEach:h,splat:u}=t,{trustedTypes:c}=s,m=c&&a(c.createPolicy)&&c.createPolicy("highcharts",{createHTML:e=>e}),f=m?m.createHTML(""):"";class p{static filterUserAttributes(e){return h(e,(t,i)=>{let s=!0;-1===p.allowedAttributes.indexOf(i)&&(s=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(s=d(t)&&p.allowedReferences.some(e=>0===t.indexOf(e))),s||(l(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete e[i]),d(t)&&e[i]&&(e[i]=t.replace(/{let i=t.split(":").map(e=>e.trim()),s=i.shift();return s&&i.length&&(e[s.replace(/-([a-z])/g,e=>e[1].toUpperCase())]=i.join(":")),e},{})}static setElementHTML(e,t){e.innerHTML=p.emptyHTML,t&&new p(t).addToDOM(e)}constructor(e){this.nodes="string"==typeof e?this.parseMarkup(e):e}addToDOM(t){return function t(s,o){let a;return u(s).forEach(function(s){let d;let u=s.tagName,c=s.textContent?e.doc.createTextNode(s.textContent):void 0,m=p.bypassHTMLFiltering;if(u){if("#text"===u)d=c;else if(-1!==p.allowedTags.indexOf(u)||m){let l="svg"===u?i:o.namespaceURI||i,a=e.doc.createElementNS(l,u),f=s.attributes||{};h(s,function(e,t){"tagName"!==t&&"attributes"!==t&&"children"!==t&&"style"!==t&&"textContent"!==t&&(f[t]=e)}),r(a,m?f:p.filterUserAttributes(f)),s.style&&n(a,s.style),c&&a.appendChild(c),t(s.children||[],a),d=a}else l(33,!1,void 0,{"Invalid tagName in config":u})}d&&o.appendChild(d),a=d}),a}(this.nodes,t)}parseMarkup(e){let t;let i=[];e=e.trim().replace(/ style=(["'])/g," data-style=$1");try{t=new DOMParser().parseFromString(m?m.createHTML(e):e,"text/html")}catch(e){}if(!t){let i=o("div");i.innerHTML=e,t={body:i}}let s=(e,t)=>{let i=e.nodeName.toLowerCase(),r={tagName:i};"#text"===i&&(r.textContent=e.textContent||"");let o=e.attributes;if(o){let e={};[].forEach.call(o,t=>{"data-style"===t.name?r.style=p.parseStyle(t.value):e[t.name]=t.value}),r.attributes=e}if(e.childNodes.length){let t=[];[].forEach.call(e.childNodes,e=>{s(e,t)}),t.length&&(r.children=t)}t.push(r)};return[].forEach.call(t.body.childNodes,e=>s(e,i)),i}}return p.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],p.allowedReferences=["https://","http://","mailto:","/","../","./","#"],p.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],p.emptyHTML=f,p.bypassHTMLFiltering=!1,p}),i(t,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),i(t,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),i(t,"Shared/TimeBase.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{pageLang:i,win:s}=e,{defined:r,error:o,extend:n,isNumber:l,isObject:a,isString:d,merge:h,objectEach:u,pad:c,splat:m,timeUnits:f,ucfirst:p}=t,g=e.isSafari&&s.Intl&&!s.Intl.DateTimeFormat.prototype.formatRange,C=e=>void 0===e.main;return class{constructor(e,t){this.options={timezone:"UTC"},this.variableTimezone=!1,this.Date=s.Date,this.update(e),this.lang=t}update(e={}){this.dTLCache={},this.options=e=h(!0,this.options,e);let{timezoneOffset:t,useUTC:i}=e;this.Date=e.Date||s.Date||Date;let o=e.timezone;r(i)&&(o=i?"UTC":void 0),t&&t%60==0&&(o="Etc/GMT"+(t>0?"+":"")+t/60),this.variableTimezone="UTC"!==o&&o?.indexOf("Etc/GMT")!==0,this.timezone=o,["months","shortMonths","weekdays","shortWeekdays"].forEach(e=>{let t=/months/i.test(e),i=/short/.test(e),s={timeZone:"UTC"};s[t?"month":"weekday"]=i?"short":"long",this[e]=(t?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(e=>this.dateFormat(s,(t?31:1)*24*36e5*e))})}toParts(e){let[t,i,s,r,o,n,l]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},e,"es").split(/(?:, | |\/|:)/g);return[r,+s-1,i,o,n,l,Math.floor(Number(e)||0)%1e3,"DLMXJVS".indexOf(t)].map(Number)}dateTimeFormat(e,t,s=this.options.locale||i){let r=JSON.stringify(e)+s;d(e)&&(e=this.str2dtf(e));let n=this.dTLCache[r];if(!n){e.timeZone??(e.timeZone=this.timezone);try{n=new Intl.DateTimeFormat(s,e)}catch(t){/Invalid time zone/i.test(t.message)?(o(34),e.timeZone="UTC",n=new Intl.DateTimeFormat(s,e)):o(t.message,!1)}}return this.dTLCache[r]=n,n?.format(t)||""}str2dtf(e,t={}){let i={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(i).forEach(s=>{-1!==e.indexOf(s)&&n(t,i[s])}),t}makeTime(e,t,i=1,s=0,r,o,n){let l=this.Date.UTC(e,t,i,s,r||0,o||0,n||0);if("UTC"!==this.timezone){let e=this.getTimezoneOffset(l);if(l+=e,-1!==[2,3,8,9,10,11].indexOf(t)&&(s<5||s>20)){let t=this.getTimezoneOffset(l);e!==t?l+=t-e:e-36e5!==this.getTimezoneOffset(l-36e5)||g||(l-=36e5)}}return l}parse(e){if(!d(e))return e??void 0;let t=(e=e.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(e),i=/^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(e);t||i||(e+="Z");let s=Date.parse(e);if(l(s))return s+(!t||i?this.getTimezoneOffset(s):0)}getTimezoneOffset(e){if("UTC"!==this.timezone){let[t,i,s,r,o=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},e,"en").split(/(GMT|:)/).map(Number),n=-(36e5*(s+o/60));if(l(n))return n}return 0}dateFormat(t,i,s){let o=this.lang;if(!r(i)||isNaN(i))return o?.invalidDate||"";if(d(t=t??"%Y-%m-%d %H:%M:%S")){let e;let s=/%\[([a-zA-Z]+)\]/g;for(;e=s.exec(t);)t=t.replace(e[0],this.dateTimeFormat(e[1],i,o?.locale))}if(d(t)&&-1!==t.indexOf("%")){let s=this,[r,l,a,h,m,f,p,g]=this.toParts(i),C=o?.weekdays||this.weekdays,w=o?.shortWeekdays||this.shortWeekdays,y=o?.months||this.months,b=o?.shortMonths||this.shortMonths;u(n({a:w?w[g]:C[g].substr(0,3),A:C[g],d:c(a),e:c(a,2," "),w:g,v:o?.weekFrom??"",b:b[l],B:y[l],m:c(l+1),o:l+1,y:r.toString().substr(2,2),Y:r,H:c(h),k:h,I:c(h%12||12),l:h%12||12,M:c(m),p:h<12?"AM":"PM",P:h<12?"am":"pm",S:c(f),L:c(p,3)},e.dateFormats),function(e,r){if(d(t))for(;-1!==t.indexOf("%"+r);)t=t.replace("%"+r,"function"==typeof e?e.call(s,i):e)})}else if(a(t)){let e=(this.getTimezoneOffset(i)||0)/36e5,s=this.timezone||"Etc/GMT"+(e>=0?"+":"")+e,{prefix:r="",suffix:o=""}=t;t=r+this.dateTimeFormat(n({timeZone:s},t),i)+o}return s?p(t):t}resolveDTLFormat(e){return a(e,!0)?a(e,!0)&&C(e)?{main:e}:e:{main:(e=m(e))[0],from:e[1],to:e[2]}}getDateFormat(e,t,i,s){let r=this.dateFormat("%m-%d %H:%M:%S.%L",t),o="01-01 00:00:00.000",n={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond",a=l;for(l in f){if(e&&e===f.week&&+this.dateFormat("%w",t)===i&&r.substr(6)===o.substr(6)){l="week";break}if(e&&f[l]>e){l=a;break}if(n[l]&&r.substr(n[l])!==o.substr(n[l]))break;"week"!==l&&(a=l)}return this.resolveDTLFormat(s[l]).main}}}),i(t,"Core/Time.js",[t["Shared/TimeBase.js"],t["Core/Utilities.js"]],function(e,t){let{defined:i,extend:s,timeUnits:r}=t;return class extends e{getTimeTicks(e,t,o,n){let l=this,a=[],d={},{count:h=1,unitRange:u}=e,[c,m,f,p,g,C]=l.toParts(t),w=(t||0)%1e3,y;if(n??(n=1),i(t)){if(w=u>=r.second?0:h*Math.floor(w/h),u>=r.second&&(C=u>=r.minute?0:h*Math.floor(C/h)),u>=r.minute&&(g=u>=r.hour?0:h*Math.floor(g/h)),u>=r.hour&&(p=u>=r.day?0:h*Math.floor(p/h)),u>=r.day&&(f=u>=r.month?1:Math.max(1,h*Math.floor(f/h))),u>=r.month&&(m=u>=r.year?0:h*Math.floor(m/h)),u>=r.year&&(c-=c%h),u===r.week){h&&(t=l.makeTime(c,m,f,p,g,C,w));let e=this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},t,"es"),i="DLMXJVS".indexOf(e);f+=-i+n+(i4*r.month||l.getTimezoneOffset(t)!==l.getTimezoneOffset(o));let e=t,s=1;for(;e1?e=l.makeTime(c,m,f,p+s*h):e+=u*h,s++;a.push(e),u<=r.hour&&a.length<1e4&&a.forEach(e=>{e%18e5==0&&"000000000"===l.dateFormat("%H%M%S%L",e)&&(d[e]="day")})}return a.info=s(e,{higherRanks:d,totalRange:u*h}),a}}}),i(t,"Core/Defaults.js",[t["Core/Chart/ChartDefaults.js"],t["Core/Globals.js"],t["Core/Color/Palettes.js"],t["Core/Time.js"],t["Core/Utilities.js"]],function(e,t,i,s,r){let{isTouchDevice:o}=t,{fireEvent:n,merge:l}=r,a={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{weekFrom:"week from",chartTitle:"Chart title",locale:void 0,loading:"Loading...",months:void 0,seriesName:"Series {add index 1}",shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],pieSliceName:"Slice",resetZoom:"Reset zoom",yAxisTitle:"Values",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:e,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:e=>Math.sqrt(1-Math.pow(e-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"%v %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,position:{x:0,y:3},shared:!1,snap:o?25:10,headerFormat:'{ucfirst point.key}
    ',pointFormat:'● {series.name}: {point.y}
    ',backgroundColor:"#ffffff",borderWidth:void 0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}},d=new s(a.time,a.lang);return{defaultOptions:a,defaultTime:d,getOptions:function(){return a},setOptions:function(e){return n(t,"setOptions",{options:e}),l(!0,a,e),e.time&&d.update(a.time),e.lang&&"locale"in e.lang&&d.update({locale:e.lang.locale}),e.lang?.chartTitle&&(a.title={...a.title,text:e.lang.chartTitle}),a}}}),i(t,"Core/Templating.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i){let{defaultOptions:s,defaultTime:r}=e,{pageLang:o}=t,{extend:n,getNestedProperty:l,isArray:a,isNumber:d,isObject:h,isString:u,pick:c,ucfirst:m}=i,f={add:(e,t)=>e+t,divide:(e,t)=>0!==t?e/t:"",eq:(e,t)=>e==t,each:function(e){let t=arguments[arguments.length-1];return!!a(e)&&e.map((i,s)=>C(t.body,n(h(i)?i:{"@this":i},{"@index":s,"@first":0===s,"@last":s===e.length-1}))).join("")},ge:(e,t)=>e>=t,gt:(e,t)=>e>t,if:e=>!!e,le:(e,t)=>e<=t,lt:(e,t)=>ee*t,ne:(e,t)=>e!=t,subtract:(e,t)=>e-t,ucfirst:m,unless:e=>!e},p={},g=e=>/^["'].+["']$/.test(e);function C(e="",t,i){let o=/\{([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'’= #\(\)]+)\}/g,n=/\(([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/g,a=[],d=/f$/,h=/\.(\d)/,m=i?.options?.lang||s.lang,p=i?.time||r,y=i?.numberFormatter||w,b=(e="")=>{let i;return"true"===e||"false"!==e&&((i=Number(e)).toString()===e?i:g(e)?e.slice(1,-1):l(e,t))},v,T,E=0,x;for(;null!==(v=o.exec(e));){let i=v,s=n.exec(v[1]);s&&(v=s,x=!0),T?.isBlock||(T={ctx:t,expression:v[1],find:v[0],isBlock:"#"===v[1].charAt(0),start:v.index,startInner:v.index+v[0].length,length:v[0].length});let r=(T.isBlock?i:v)[1].split(" ")[0].replace("#","");f[r]&&(T.isBlock&&r===T.fn&&E++,T.fn||(T.fn=r));let o="else"===v[1];if(T.isBlock&&T.fn&&(v[1]===`/${T.fn}`||o)){if(E)!o&&E--;else{let t=T.startInner,i=e.substr(t,v.index-t);void 0===T.body?(T.body=i,T.startInner=v.index+v[0].length):T.elseBody=i,T.find+=i+v[0],o||(a.push(T),T=void 0)}}else T.isBlock||a.push(T);if(s&&!T?.isBlock)break}return a.forEach(s=>{let r,o;let{body:l,elseBody:a,expression:w,fn:v}=s;if(v){let e=[s],n=[],d=w.length,h=0,u;for(o=0;o<=d;o++){let e=w.charAt(o);u||'"'!==e&&"'"!==e?u===e&&(u=""):u=e,u||" "!==e&&o!==d||(n.push(w.substr(h,o-h)),h=o+1)}for(o=f[v].length;o--;)e.unshift(b(n[o+1]));r=f[v].apply(t,e),s.isBlock&&"boolean"==typeof r&&(r=C(r?l:a,t,i))}else{let e=g(w)?[w]:w.split(":");if(r=b(e.shift()||""),e.length&&"number"==typeof r){let t=e.join(":");if(d.test(t)){let e=parseInt((t.match(h)||["","-1"])[1],10);null!==r&&(r=y(r,e,m.decimalPoint,t.indexOf(",")>-1?m.thousandsSep:""))}else r=p.dateFormat(t,r)}n.lastIndex=0,n.test(s.find)&&u(r)&&(r=`"${r}"`)}e=e.replace(s.find,c(r,""))}),x?C(e,t,i):e}function w(e,t,i,r){t=+t;let n,l,[a,h]=(e=+e||0).toString().split("e").map(Number),u=this?.options?.lang||s.lang,c=(e.toString().split(".")[1]||"").split("e")[0].length,m=t,f={};i??(i=u.decimalPoint),r??(r=u.thousandsSep),-1===t?t=Math.min(c,20):d(t)?t&&h<0&&((l=t+h)>=0?(a=+a.toExponential(l).split("e")[0],t=l):(a=Math.floor(a),e=t<20?+(a*Math.pow(10,h)).toFixed(t):0,h=0)):t=2,h&&(t??(t=2),e=a),d(t)&&t>=0&&(f.minimumFractionDigits=t,f.maximumFractionDigits=t),""===r&&(f.useGrouping=!1);let g=r||i,C=g?"en":this?.locale||u.locale||o,w=JSON.stringify(f)+C;return n=(p[w]??(p[w]=new Intl.NumberFormat(C,f))).format(e),g&&(n=n.replace(/([,\.])/g,"_$1").replace(/_\,/g,r??",").replace("_.",i??".")),(t||0!=+n)&&(!(h<0)||m)||(n="0"),h&&0!=+n&&(n+="e"+(h<0?"":"+")+h),n}return{dateFormat:function(e,t,i){return r.dateFormat(e,t,i)},format:C,helpers:f,numberFormat:w}}),i(t,"Data/Modifiers/DataModifier.js",[t["Core/Utilities.js"]],function(t){var i;let{addEvent:s,fireEvent:r,merge:o}=t;class n{benchmark(t,i){let s=[],r=this,n=()=>{r.modifyTable(t),r.emit({type:"afterBenchmarkIteration"})},{iterations:l}=o({iterations:1},i);r.on("afterBenchmarkIteration",()=>{if(s.length===l){r.emit({type:"afterBenchmark",results:s});return}n()});let a={startTime:0,endTime:0};return r.on("modify",()=>{a.startTime=e.performance.now()}),r.on("afterModify",()=>{a.endTime=e.performance.now(),s.push(a.endTime-a.startTime)}),n(),s}emit(e){r(this,e.type,e)}modify(e,t){let i=this;return new Promise((s,r)=>{e.modified===e&&(e.modified=e.clone(!1,t));try{s(i.modifyTable(e,t))}catch(s){i.emit({type:"error",detail:t,table:e}),r(s)}})}modifyCell(e,t,i,s,r){return this.modifyTable(e)}modifyColumns(e,t,i,s){return this.modifyTable(e)}modifyRows(e,t,i,s){return this.modifyTable(e)}on(e,t){return s(this,e,t)}}return(i=n||(n={})).types={},i.registerType=function(e,t){return!!e&&!i.types[e]&&!!(i.types[e]=t)},n}),i(t,"Data/ColumnUtils.js",[],function(){var e,t;return(t=e||(e={})).setLength=function(e,t,i){return Array.isArray(e)?(e.length=t,e):e[i?"subarray":"slice"](0,t)},t.splice=function(e,t,i,s,r=[]){if(Array.isArray(e))return Array.isArray(r)||(r=Array.from(r)),{removed:e.splice(t,i,...r),array:e};let o=Object.getPrototypeOf(e).constructor,n=e[s?"subarray":"slice"](t,t+i),l=new o(e.length-i+r.length);return l.set(e.subarray(0,t),0),l.set(r,t),l.set(e.subarray(t+i),t+r.length),{removed:n,array:l}},e}),i(t,"Data/DataTableCore.js",[t["Data/ColumnUtils.js"],t["Core/Utilities.js"]],function(e,t){let{setLength:i,splice:s}=e,{fireEvent:r,objectEach:o,uniqueKey:n}=t;return class{constructor(e={}){this.autoId=!e.id,this.columns={},this.id=e.id||n(),this.modified=this,this.rowCount=0,this.versionTag=n();let t=0;o(e.columns||{},(e,i)=>{this.columns[i]=e.slice(),t=Math.max(t,e.length)}),this.applyRowCount(t)}applyRowCount(e){this.rowCount=e,o(this.columns,(t,s)=>{t.length!==e&&(this.columns[s]=i(t,e))})}deleteRows(e,t=1){if(t>0&&e{this.columns[o]=s(r,e,t).array,i=r.length}),this.rowCount=i}r(this,"afterDeleteRows",{rowIndex:e,rowCount:t}),this.versionTag=n()}getColumn(e,t){return this.columns[e]}getColumns(e,t){return(e||Object.keys(this.columns)).reduce((e,t)=>(e[t]=this.columns[t],e),{})}getRow(e,t){return(t||Object.keys(this.columns)).map(t=>this.columns[t]?.[e])}setColumn(e,t=[],i=0,s){this.setColumns({[e]:t},i,s)}setColumns(e,t,i){let s=this.rowCount;o(e,(e,t)=>{this.columns[t]=e.slice(),s=e.length}),this.applyRowCount(s),i?.silent||(r(this,"afterSetColumns"),this.versionTag=n())}setRow(e,t=this.rowCount,i,l){let{columns:a}=this,d=i?this.rowCount+1:t+1;o(e,(e,r)=>{let o=a[r]||l?.addColumns!==!1&&Array(d);o&&(i?o=s(o,t,0,!0,[e]).array:o[t]=e,a[r]=o)}),d>this.rowCount&&this.applyRowCount(d),l?.silent||(r(this,"afterSetRows"),this.versionTag=n())}}}),i(t,"Data/DataTable.js",[t["Data/ColumnUtils.js"],t["Data/DataTableCore.js"],t["Core/Utilities.js"]],function(e,t,i){let{addEvent:s,defined:r,extend:o,fireEvent:n,isNumber:l,uniqueKey:a}=i;class d extends t{static isNull(e){if(e===d.NULL)return!0;if(e instanceof Array){if(!e.length)return!1;for(let t=0,i=e.length;t0&&t=this.rowCount&&(this.rowCount=t+1),n[t]=i,o&&o.modifyCell(this,e,t,i),this.emit({type:"afterSetCell",cellValue:i,columnName:e,detail:s,rowIndex:t}))}setColumns(e,t,i,s){let n=this.columns,l=this.modifier,a=Object.keys(e),d=this.rowCount;if(this.emit({type:"setColumns",columns:e,columnNames:a,detail:i,rowIndex:t}),r(t)||s){for(let i=0,r=a.length,o,l,h,u;i(i.emit({type:"afterSetModifier",detail:t,modifier:e,modified:i.modified}),i)).catch(t=>{throw i.emit({type:"setModifierError",error:t,modifier:e,modified:i.modified}),t})}setOriginalRowIndexes(e,t=!1){if(this.originalRowIndexes=e,t)return;let i=this.localRowIndexes=[];for(let t=0,s=e.length,o;tthis.rowCount){this.rowCount=h;for(let t=0,i=n.length;ta(t[e].index,0)-a(t[i].index,0))}getSortedColumns(e){return this.table.getColumns(this.getColumnOrder(e))}load(){return n(this,"afterLoad",{table:this.table}),Promise.resolve(this)}on(e,t){return o(this,e,t)}save(){return n(this,"saveError",{table:this.table}),Promise.reject(Error("Not implemented"))}setColumnOrder(e){for(let t=0,i=e.length;tthis)}startPolling(t=1e3){let i=this;e.clearTimeout(i._polling),i._polling=e.setTimeout(()=>i.load().catch(e=>i.emit({type:"loadError",error:e,table:i.table})).then(()=>{i._polling&&i.startPolling(t)}),t)}stopPolling(){e.clearTimeout(this._polling),delete this._polling}whatIs(e){return this.metadata.columns[e]}}return(r=d||(d={})).types={},r.registerType=function(e,t){return!!e&&!r.types[e]&&!!(r.types[e]=t)},d}),i(t,"Data/Converters/DataConverter.js",[t["Data/DataTable.js"],t["Core/Utilities.js"]],function(e,t){var i;let{addEvent:s,fireEvent:r,isNumber:o,merge:n}=t;class l{constructor(e){this.dateFormats={"YYYY/mm/dd":{regex:/^(\d{4})([\-\.\/])(\d{1,2})\2(\d{1,2})$/,parser:function(e){return e?Date.UTC(+e[1],e[3]-1,+e[4]):NaN}},"dd/mm/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(e){return e?Date.UTC(+e[4],e[3]-1,+e[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(e){return e?Date.UTC(+e[4],e[1]-1,+e[3]):NaN}},"dd/mm/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(e){let t=new Date;if(!e)return NaN;let i=+e[4];return i>t.getFullYear()-2e3?i+=1900:i+=2e3,Date.UTC(i,e[3]-1,+e[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(e){return e?Date.UTC(+e[4]+2e3,e[1]-1,+e[3]):NaN}}};let t=n(l.defaultOptions,e),i=t.decimalPoint;("."===i||","===i)&&(i="."===i?"\\.":",",this.decimalRegExp=RegExp("^(-?[0-9]+)"+i+"([0-9]+)$")),this.options=t}asBoolean(e){return"boolean"==typeof e?e:"string"==typeof e?""!==e&&"0"!==e&&"false"!==e:!!this.asNumber(e)}asDate(e){let t;if("string"==typeof e)t=this.parseDate(e);else if("number"==typeof e)t=e;else{if(e instanceof Date)return e;t=this.parseDate(this.asString(e))}return new Date(t)}asGuessedType(e){return({number:this.asNumber,Date:this.asDate,string:this.asString})[this.guessType(e)].call(this,e)}asNumber(e){if("number"==typeof e)return e;if("boolean"==typeof e)return e?1:0;if("string"==typeof e){let t=this.decimalRegExp;if(e.indexOf(" ")>-1&&(e=e.replace(/\s+/g,"")),t){if(!t.test(e))return NaN;e=e.replace(t,"$1.$2")}return parseFloat(e)}return e instanceof Date?e.getDate():e?e.getRowCount():NaN}asString(e){return""+e}deduceDateFormat(e,t,i){let s=[],r=[],o="YYYY/mm/dd",n,l=[],a=0,d=!1,h,u;for((!t||t>e.length)&&(t=e.length);a31?h<100?l[u]="YY":l[u]="YYYY":h>12&&h<=31?(l[u]="dd",d=!0):l[u].length||(l[u]="mm"));if(d){for(u=0;u12&&"YY"!==l[u]&&"YYYY"!==l[u]&&(l[u]="YY"):r[u]>12&&"mm"===l[u]&&(l[u]="dd");3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),o=l.join("/")}return i&&(this.options.dateFormat=o),o}emit(e){r(this,e.type,e)}export(e,t){throw this.emit({type:"exportError",columns:[],headers:[]}),Error("Not implemented")}getTable(){throw Error("Not implemented")}guessType(e){let t="string";if("string"==typeof e){let i=this.trim(`${e}`),s=this.decimalRegExp,r=this.trim(i,!0);s&&(r=s.test(r)?r.replace(s,"$1.$2"):"");let n=parseFloat(r);+r===n?e=n:t=o(this.parseDate(e))?"Date":"string"}return"number"==typeof e&&(t=e>31536e6?"Date":"number"),t}on(e,t){return s(this,e,t)}parse(e){throw this.emit({type:"parseError",columns:[],headers:[]}),Error("Not implemented")}parseDate(e,t){let i=this.options,s=t||i.dateFormat,r=NaN,n,l,a;if(i.parseDate)r=i.parseDate(e);else{if(s)(l=this.dateFormats[s])||(l=this.dateFormats["YYYY/mm/dd"]),(a=e.match(l.regex))&&(r=l.parser(a));else for(n in this.dateFormats)if(l=this.dateFormats[n],a=e.match(l.regex)){s=n,r=l.parser(a);break}!a&&("object"==typeof(a=Date.parse(e))&&null!==a&&a.getTime?r=a.getTime()-6e4*a.getTimezoneOffset():o(a)&&(r=a-6e4*new Date(a).getTimezoneOffset(),-1===e.indexOf("2001")&&2001===new Date(r).getFullYear()&&(r=NaN)))}return r}trim(e,t){return"string"==typeof e&&(e=e.replace(/^\s+|\s+$/g,""),t&&/^[\d\s]+$/.test(e)&&(e=e.replace(/\s/g,""))),e}}return l.defaultOptions={dateFormat:"",alternativeFormat:"",startColumn:0,endColumn:Number.MAX_VALUE,startRow:0,endRow:Number.MAX_VALUE,firstRowAsNames:!0,switchRowsAndColumns:!1},(i=l||(l={})).types={},i.registerType=function(e,t){return!!e&&!i.types[e]&&!!(i.types[e]=t)},i.getTableFromColumns=function(t=[],i=[]){let s=new e;for(let e=0,r=Math.max(i.length,t.length);e=0)return this;try{this.emittingRegister.push(u);for(let e=0,t=l.length;e=0&&this.emittingRegister.splice(e,1)}}return this}remitCursor(t,i){let s=this.stateMap[t]&&this.stateMap[t][i.state];if(s){let t=e.getIndex(i,s);t>=0&&s.splice(t,1)}return this}removeListener(e,t,i){let s=this.listenerMap[e]&&this.listenerMap[e][t];if(s){let e=s.indexOf(i);e>=0&&s.splice(e,1)}return this}}return e.version="1.0.0",function(e){function t(e,t){if("range"===e.type)return e;let i={type:"range",firstRow:e.row??(t&&t.firstRow)??0,lastRow:e.row??(t&&t.lastRow)??Number.MAX_VALUE,state:e.state};return void 0!==e.column&&(i.columns=[e.column]),i}e.getIndex=function(e,t){if("position"===e.type){for(let i,s=0,r=t.length;s=i.firstRow&&e.lastRow<=i.lastRow&&(!s||!r||s.every(e=>r.indexOf(e)>=0))},e.toPositions=function(e){if("position"===e.type)return[e];let t=e.columns||[],i=[],s=e.state;for(let r=e.firstRow,o=e.lastRow;r1;e.series.forEach(function(e){let s=t.plotOptions[e.type]||{},r=i&&void 0!==e.colorIndex?t.colors[e.colorIndex]:s.color||"window",o={color:s.color||"windowText",colors:i?t.colors:[s.color||"windowText"],borderColor:s.borderColor||"window",fillColor:r};e.update(o,!1),e.points&&e.points.forEach(function(e){e.options&&e.options.color&&e.update({color:s.color||"windowText",borderColor:s.borderColor||"window"},!1)})}),e.redraw()}}}),i(t,"Grid/Core/Globals.js",[],function(){var t,i;return(i=t||(t={})).classNamePrefix="hcg-",i.rawClassNames={container:"container",tableElement:"table",captionElement:"caption",descriptionElement:"description",theadElement:"thead",tbodyElement:"tbody",rowElement:"row",rowEven:"row-even",rowOdd:"row-odd",hoveredRow:"hovered-row",columnElement:"column",hoveredCell:"hovered-cell",hoveredColumn:"hovered-column",syncedRow:"synced-row",syncedCell:"synced-cell",syncedColumn:"synced-column",editedCell:"edited-cell",mockedRow:"mocked-row",rowsContentNowrap:"rows-content-nowrap",virtualization:"virtualization",scrollableContent:"scrollable-content",headerCell:"header-cell",headerCellContent:"header-cell-content",headerRow:"head-row-content",noData:"no-data",columnFirst:"column-first",columnSortable:"column-sortable",columnSortableIcon:"column-sortable-icon",columnSortedAsc:"column-sorted-asc",columnSortedDesc:"column-sorted-desc",resizerWrapper:"resizer-content",resizerHandles:"column-resizer",resizedColumn:"column-resized",creditsContainer:"credits-container",creditsText:"credits",creditsPro:"credits-pro",visuallyHidden:"visually-hidden",lastHeaderCellInRow:"last-header-cell-in-row",loadingWrapper:"loading-wrapper",loadingSpinner:"spinner",loadingMessage:"loading-message"},i.win=e,i.composed=[],i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=-1!==i.userAgent.indexOf("Chrome"),i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),i.getClassName=e=>i.classNamePrefix+i.rawClassNames[e],t}),i(t,"Grid/Core/GridUtils.js",[t["Core/Renderer/HTML/AST.js"]],function(e){var t;return function(t){function i(e,t,i){let s=document.createElement(e);if(t){let e=Object.keys(t);for(let i=0;i{this.announcerElement.remove()},3e3)}userSortedColumn(e){let t;let{options:i}=this.grid,s=i?.lang?.accessibility?.sorting?.announcements;if(i?.accessibility?.announcements?.sorting){switch(e){case"asc":t=s?.ascending;break;case"desc":t=s?.descending;break;default:t=s?.none}t&&this.announce(t,!0)}}setColumnSortState(e,t){e?.setAttribute("aria-sort",t)}addHighContrast(){let t=this.grid.options?.accessibility?.highContrastMode;!1!==t&&(e.isHighContrastModeActive()||!0===t)&&this.grid.contentWrapper?.classList.add("hcg-theme-highcontrast")}setRowIndex(e,t){e.setAttribute("aria-rowindex",t)}setA11yOptions(){let e=this.grid,t=e.tableElement;t&&(t.setAttribute("aria-rowcount",e.dataTable?.getRowCount()||0),e.captionElement&&t.setAttribute("aria-labelledby",e.captionElement.id),e.descriptionElement&&t.setAttribute("aria-describedby",e.descriptionElement.id),this.addHighContrast())}destroy(){this.element.remove(),this.announcerElement.remove(),clearTimeout(this.announcerTimeout)}}}),i(t,"Grid/Core/Defaults.js",[t["Core/Utilities.js"]],function(e){var t,i;let{merge:s}=e;return(i=t||(t={})).defaultOptions={accessibility:{enabled:!0,highContrastMode:"auto",announcements:{sorting:!0}},lang:{accessibility:{sorting:{sortable:"Sortable.",announcements:{ascending:"Sorted ascending.",descending:"Sorted descending.",none:"Not sorted."}}},loading:"Loading...",noData:"No data to display"},time:{timezone:"UTC"},rendering:{columns:{distribution:"full"},rows:{bufferSize:10,minVisibleRows:2,strictHeights:!1,virtualizationThreshold:50},header:{enabled:!0},theme:"hcg-theme-default"},columnDefaults:{sorting:{sortable:!0},resizing:!0}},i.setOptions=function(e){s(!0,i.defaultOptions,e)},t}),i(t,"Grid/Core/Table/Column.js",[t["Core/Utilities.js"],t["Grid/Core/GridUtils.js"],t["Core/Templating.js"],t["Grid/Core/Globals.js"]],function(e,t,i,s){let{merge:r}=e,{makeHTMLElement:o}=t;class n{constructor(e,t,i){this.cells=[],this.options=r(e.grid.options?.columnDefaults??{},e.grid.columnOptionsMap?.[t]??{}),this.id=t,this.index=i,this.viewport=e,this.width=this.getInitialWidth(),this.loadData()}loadData(){this.data=this.viewport.dataTable.getColumn(this.id,!0)}registerCell(e){e.htmlElement.setAttribute("data-column-id",this.id),this.options.className&&e.htmlElement.classList.add(...this.options.className.split(/\s+/g)),this.viewport.grid.hoveredColumnId===this.id&&e.htmlElement.classList.add(s.getClassName("hoveredColumn")),this.cells.push(e)}unregisterCell(e){let t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getWidth(){let e=this.viewport;return"full"===e.columnDistribution?e.getWidthFromRatio(this.width):this.width}setHoveredState(e){this.header?.htmlElement?.classList[e?"add":"remove"](s.getClassName("hoveredColumn"));for(let t=0,i=this.cells.length;t=0;--e)this.cells[e].destroy();this.htmlElement.remove()}}getCell(e){return this.cells.find(t=>t.column?.id===e)}registerCell(e){this.cells.push(e)}unregisterCell(e){let t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}}}),i(t,"Grid/Core/Table/Cell.js",[t["Core/Templating.js"]],function(e){return class{constructor(e,t){this.cellEvents=[],this.column=t,this.row=e,this.row.registerCell(this),this.htmlElement=this.init(),this.htmlElement.setAttribute("tabindex","-1"),this.initEvents()}init(){return document.createElement("td",{})}initEvents(){this.cellEvents.push(["blur",()=>this.onBlur()]),this.cellEvents.push(["focus",()=>this.onFocus()]),this.cellEvents.push(["click",e=>{this.onClick(e)}]),this.cellEvents.push(["keydown",e=>{this.onKeyDown(e)}]),this.cellEvents.forEach(e=>{this.htmlElement.addEventListener(e[0],e[1])})}onFocus(){let e=this.row.viewport,t=e.rowsVirtualizer.focusAnchorCell?.htmlElement;t?.setAttribute("tabindex","-1")}onBlur(){let e=this.row.viewport,t=e.rowsVirtualizer.focusAnchorCell?.htmlElement;t?.setAttribute("tabindex","0"),delete e.focusCursor}onKeyDown(e){let{row:t,column:i}=this;if(!i)return;let s=t.viewport,r={ArrowDown:[1,0],ArrowUp:[-1,0],ArrowLeft:[0,-1],ArrowRight:[0,1]}[e.key];if(r){e.preventDefault(),e.stopPropagation();let o=(void 0===t.index?-1:t.index-s.rows[0].index)+r[0];if(o<0&&s.header){s.columns[i.index+r[1]]?.header?.htmlElement.focus();return}let n=s.rows[o];n&&n.cells[i.index+r[1]]?.htmlElement.focus()}}render(){this.row.htmlElement.appendChild(this.htmlElement)}reflow(){let e=this.column;if(!e)return;let t=this.htmlElement.style;t.width=t.maxWidth=e.getWidth()+"px"}format(t){return e.format(t,this,this.row.viewport.grid)}setCustomClassName(e){let t=this.htmlElement;if(this.customClassName&&t.classList.remove(...this.customClassName.split(/\s+/g)),!e){delete this.customClassName;return}let i=this.format(e);if(!i){delete this.customClassName;return}t.classList.add(...i.split(/\s+/g)),this.customClassName=i}destroy(){this.cellEvents.forEach(e=>{this.htmlElement.removeEventListener(e[0],e[1])}),this.column?.unregisterCell(this),this.row.unregisterCell(this),this.htmlElement.remove()}}}),i(t,"Grid/Core/Table/Actions/ColumnSorting.js",[t["Grid/Core/GridUtils.js"],t["Grid/Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i){let{makeHTMLElement:s}=e,{fireEvent:r}=i;return class{constructor(e,i){this.toggle=()=>{let e=this.column.viewport.grid.querying.sorting,t=(e.currentSorting?.columnId===this.column.id?e.currentSorting.order:null)||"none";this.setOrder({none:"asc",asc:"desc",desc:null}[t])},this.column=e,this.headerCellElement=i,this.addHeaderElementAttributes(),e.options.sorting?.sortable&&(s("span",{className:t.getClassName("columnSortableIcon"),innerText:"▲"},i).setAttribute("aria-hidden",!0),i.classList.add(t.getClassName("columnSortable")))}addHeaderElementAttributes(){let e=this.column,i=e.viewport.grid.accessibility,s=e.options.sorting,{currentSorting:r}=e.viewport.grid.querying.sorting,o=t.getClassName("columnSortedAsc"),n=t.getClassName("columnSortedDesc"),l=this.headerCellElement;if(r?.columnId!==e.id||!r?.order){l.classList.remove(o),l.classList.remove(n),s?.sortable&&i?.setColumnSortState(l,"none");return}switch(r?.order){case"asc":l.classList.add(o),l.classList.remove(n),i?.setColumnSortState(l,"ascending");break;case"desc":l.classList.remove(o),l.classList.add(n),i?.setColumnSortState(l,"descending")}}async setOrder(e){let t=this.column.viewport,i=t.grid.querying,s=i.sorting,o=t.grid.accessibility;for(let r of(s.setSorting(e,this.column.id),await i.proceed(),t.loadPresentationData(),t.columns))r.sorting?.addHeaderElementAttributes();o?.userSortedColumn(e),r(this.column,"afterSorting",{target:this.column})}}}),i(t,"Grid/Core/Table/Header/HeaderCell.js",[t["Grid/Core/Table/Cell.js"],t["Grid/Core/GridUtils.js"],t["Grid/Core/Table/Actions/ColumnSorting.js"],t["Grid/Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i,s,r){let{makeHTMLElement:o,setHTMLContent:n}=t,{fireEvent:l,merge:a,isString:d}=r;return class extends e{constructor(e,t,i){if(super(e,t),this.options={},this.columns=[],this.value="",t)t.header=this,this.columns.push(t);else if(i){let e=this.row.viewport;for(let t of e.grid.getColumnIds(i,!0)){let i=e.getColumn(t);i&&this.columns.push(i)}}}init(){let e=document.createElement("th",{});return e.classList.add(s.getClassName("headerCell")),e}render(){let{column:e}=this,t=a(e?.options||{},this.options),i=t.header||{},r=t.sorting?.sortable&&e?.data;i.formatter?this.value=i.formatter.call(this).toString():d(i.format)?this.value=e?e.format(i.format):i.format:this.value=e?.id||"",this.row.htmlElement.appendChild(this.htmlElement),this.headerContent=o("span",{className:s.getClassName("headerCellContent")},this.htmlElement),n(this.headerContent,this.value),this.htmlElement.setAttribute("scope","col"),this.options.className&&this.htmlElement.classList.add(...this.options.className.split(/\s+/g)),e&&(this.htmlElement.setAttribute("data-column-id",e.id),r&&e.viewport.grid.accessibility?.addSortableColumnHint(this.headerContent),e.options.className&&this.htmlElement.classList.add(...e.options.className.split(/\s+/g)),e.viewport.columnsResizer?.renderColumnDragHandles(e,this),this.initColumnSorting()),this.setCustomClassName(t.header?.className)}reflow(){let e=this.htmlElement;if(!e)return;let t=0;for(let e of this.columns)t+=e.getWidth()||0;e.style.width=e.style.maxWidth=t+"px"}onKeyDown(e){if(this.column&&e.target===this.htmlElement){if("Enter"===e.key){this.column.options.sorting?.sortable&&this.column.sorting?.toggle();return}super.onKeyDown(e)}}onClick(e){let t=this.column;t&&(e.target===this.htmlElement||e.target===t.header?.headerContent)&&(t.options.sorting?.sortable&&t.sorting?.toggle(),l(this,"click",{originalEvent:e,target:this.column}))}initColumnSorting(){let{column:e}=this;e&&(e.sorting=new i(e,this.htmlElement))}isLastColumn(){let e=this.row.viewport;return e.columns[e.columns.length-1]===this.columns?.[this.columns.length-1]}}}),i(t,"Grid/Core/Table/Header/HeaderRow.js",[t["Grid/Core/Table/Row.js"],t["Grid/Core/Table/Header/HeaderCell.js"],t["Grid/Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i,s){let{isString:r}=s;return class extends e{constructor(e,t){super(e),this.level=t,this.setRowAttributes()}createCell(e,i){return new t(this,e,i)}renderMultipleLevel(e){let t=this.viewport.grid.options?.header,s=this.viewport,o=s.grid.enabledColumns;if(s.theadElement?.appendChild(this.htmlElement),this.htmlElement.classList.add(i.getClassName("headerRow")),t){let n=this.getColumnsAtLevel(t,e);for(let t=0,l=n.length;to.indexOf(h)||!u&&0===d)continue;let f=this.createCell(u,a?void 0:l.columns);a||s.grid.accessibility?.addHeaderCellDescription(f.htmlElement,l.accessibility?.description),r(c)&&(f.options.header||(f.options.header={}),f.options.header.format=c),m&&(f.options.className=m),u?.index===0&&0===t&&f.htmlElement.classList.add(i.getClassName("columnFirst")),f.render(),h?f.htmlElement.setAttribute("rowSpan",(this.viewport.header?.levels||1)-e):d>1&&f.htmlElement.setAttribute("colSpan",d)}}else super.render();let n=this.cells[this.cells.length-1];n.isLastColumn()&&n.htmlElement.classList.add(i.getClassName("lastHeaderCellInRow"))}reflow(){for(let e=0,t=this.cells.length;e0&&"full"===this.viewport.columnDistribution){let e=this.columns[this.columns.length-1].header?.row,t=e?.cells[e.cells.length-1]?.htmlElement;t&&(t.style.width=t.style.maxWidth=t.offsetWidth+o+"px")}}getRowLevels(e){let t=0;for(let i of e)if("string"!=typeof i&&i.columns){let e=this.getRowLevels(i.columns);e>t&&(t=e)}return t+1}scrollHorizontally(e){let t=this.viewport.theadElement;t&&(t.style.transform=`translateX(${-e}px)`)}}}),i(t,"Grid/Core/Table/Content/TableCell.js",[t["Grid/Core/Table/Cell.js"],t["Core/Utilities.js"],t["Grid/Core/GridUtils.js"]],function(e,t,i){let{setHTMLContent:s}=i,{defined:r,fireEvent:o}=t;return class extends e{constructor(e,t){super(e,t),this.column=t,this.row=e,this.column.registerCell(this)}render(){super.render(),this.setValue(this.column.data?.[this.row.index],!1)}initEvents(){this.cellEvents.push(["dblclick",e=>this.onDblClick(e)]),this.cellEvents.push(["mouseout",()=>this.onMouseOut()]),this.cellEvents.push(["mouseover",()=>this.onMouseOver()]),this.cellEvents.push(["mousedown",e=>{this.onMouseDown(e)}]),super.initEvents()}onFocus(){super.onFocus(),this.row.viewport.focusCursor=[this.row.index,this.column.index]}onMouseDown(e){e.target===this.htmlElement&&this.htmlElement.focus(),o(this,"mouseDown",{target:this,originalEvent:e})}onMouseOver(){let{grid:e}=this.row.viewport;e.hoverRow(this.row.index),e.hoverColumn(this.column.id),o(this,"mouseOver",{target:this})}onMouseOut(){let{grid:e}=this.row.viewport;e.hoverRow(),e.hoverColumn(),o(this,"mouseOut",{target:this})}onDblClick(e){o(this,"dblClick",{target:this,originalEvent:e})}onClick(){o(this,"click",{target:this})}onKeyDown(e){e.target===this.htmlElement&&(o(this,"keyDown",{target:this,originalEvent:e}),super.onKeyDown(e))}async setValue(e,t){let i;this.value=e;let r=this.column.viewport;if(s(this.htmlElement,this.formatCell()),this.htmlElement.setAttribute("data-value",this.value+""),this.setCustomClassName(this.column.options.cells?.className),o(this,"afterSetValue",{target:this}),!t)return;let{dataTable:n}=r.grid,l=this.row.id&&n?.getLocalRowIndex(this.row.id);if(n&&void 0!==l&&(n.setCell(this.column.id,l,this.value),!r.grid.querying.willNotModify()&&(r.focusCursor&&(i=r.dataTable.getOriginalRowIndex(r.focusCursor[0])),await r.grid.querying.proceed(!0),r.loadPresentationData(),void 0!==i&&r.focusCursor))){let e=r.dataTable.getLocalRowIndex(i);void 0!==e&&r.rows[e-r.rows[0].index]?.cells[r.focusCursor[1]].htmlElement.focus()}}formatCell(){let e=this.row.viewport.grid.options?.columnDefaults?.cells||{},{format:t,formatter:i}=this.column.options.cells||{},s=e.format===t,o=e.formatter===i,n=this.value;r(n)||(n="");let l="";return s&&o?l=i?i.call(this).toString():t?this.format(t):n+"":s?l=i?.call(this).toString()||n+"":o&&(l=t?this.format(t):n+""),l}destroy(){super.destroy()}}}),i(t,"Grid/Core/Table/Content/TableRow.js",[t["Grid/Core/Table/Row.js"],t["Grid/Core/Table/Content/TableCell.js"],t["Grid/Core/Globals.js"]],function(e,t,i){return class extends e{constructor(e,t){super(e),this.data={},this.translateY=0,this.index=t,this.id=e.dataTable.getOriginalRowIndex(t),this.loadData(),this.setRowAttributes()}createCell(e){return new t(this,e)}loadData(){let e=this.viewport.dataTable.getRowObject(this.index);e&&(this.data=e)}setHoveredState(e){this.htmlElement.classList[e?"add":"remove"](i.getClassName("hoveredRow")),e&&(this.viewport.grid.hoveredRowIndex=this.index)}setSyncedState(e){this.htmlElement.classList[e?"add":"remove"](i.getClassName("syncedRow")),e&&(this.viewport.grid.syncedRowIndex=this.index)}setRowAttributes(){let e=this.index,t=this.htmlElement,s=this.viewport.grid.accessibility;t.classList.add(i.getClassName("rowElement")),t.setAttribute("data-row-index",e),void 0!==this.id&&t.setAttribute("data-row-id",this.id),s?.setRowIndex(t,e+(this.viewport.header?.levels??1)+1),t.classList.add(i.getClassName(e%2?"rowEven":"rowOdd")),this.viewport.grid.hoveredRowIndex===e&&t.classList.add(i.getClassName("hoveredRow")),this.viewport.grid.syncedRowIndex===e&&t.classList.add(i.getClassName("syncedRow"))}setTranslateY(e){this.translateY=e,this.htmlElement.style.transform=`translateY(${e}px)`}getDefaultTopOffset(){return this.index*this.viewport.rowsVirtualizer.defaultRowHeight}}}),i(t,"Grid/Core/Table/Actions/RowsVirtualizer.js",[t["Grid/Core/Table/Content/TableRow.js"],t["Grid/Core/Globals.js"]],function(e,t){return class{constructor(e){this.rowCursor=0,this.preventScroll=!1,this.rowSettings=e.grid.options?.rendering?.rows,this.viewport=e,this.strictRowHeights=this.rowSettings.strictHeights,this.buffer=Math.max(this.rowSettings.bufferSize,0),this.defaultRowHeight=this.getDefaultRowHeight(),this.strictRowHeights&&e.tbodyElement.classList.add(t.getClassName("rowsContentNowrap"))}initialRender(){this.rowSettings?.virtualization&&this.viewport.reflow(),this.renderRows(this.rowCursor),this.rowSettings?.virtualization&&this.adjustRowHeights()}rerender(){let e;let t=this.viewport.tbodyElement,i=this.viewport.rows,s=t.scrollLeft;if(i.length){e=t.scrollTop;for(let e=0,t=i.length;ee.scrollTop)||this.preventScroll||(e.scrollTop=i,this.preventScroll=!0)}adjustBottomRowHeights(){let e=this.viewport.rows,t=e.length,i=e[t-1],s=i.translateY,r=s+i.htmlElement.offsetHeight,o=i.cells[0].htmlElement.offsetHeight;s=r-o,i.htmlElement.style.height=o+"px",i.setTranslateY(s);for(let e=0,t=i.cells.length;e=0;i--){let t=e[i];s-=o=t.cells[0].htmlElement.offsetHeight,t.htmlElement.style.height=o+"px",t.setTranslateY(s);for(let e=0,i=t.cells.length;e50&&console.warn("Grid: a large dataset can cause performance issues."),!n.length){let t=new e(i,i.dataTable.getRowCount()-1);t.render(),n.push(t),i.tbodyElement.appendChild(t.htmlElement),r&&t.setTranslateY(t.getDefaultTopOffset())}let l=Math.max(0,Math.min(t-s,i.dataTable.getRowCount()-o)),a=Math.min(t+o+s,n[n.length-1].index-1),d=n.pop(),h=[];for(let e=0,t=n.length;ea?t.destroy():h.push(t)}n=h,i.rows=n;for(let t=l;t<=a;++t)if(!n[t-(n[0]?.index||0)]){let s=new e(i,t);n.push(s),s.rendered=!1,r&&s.setTranslateY(s.getDefaultTopOffset())}n.sort((e,t)=>e.index-t.index);for(let e=0,t=n.length;et.index===e);s&&s.cells[t]?.htmlElement.focus({preventScroll:!0})}this.focusAnchorCell?.htmlElement.setAttribute("tabindex","-1");let u=n[t-n[0].index];this.focusAnchorCell=u?.cells[0],this.focusAnchorCell?.htmlElement.setAttribute("tabindex","0")}adjustRowHeights(){if(this.strictRowHeights)return;let{rowCursor:e,defaultRowHeight:t}=this,{rows:i,tbodyElement:s}=this.viewport,r=i.length,o=i[0].getDefaultTopOffset();for(let o=0;oe)&&r.htmlElement.offsetHeight>t){let i=Math.floor(n-(n-t)*(s.scrollTop/t-e));r.htmlElement.style.height=i+"px";for(let e=0,t=r.cells.length;e{if(!this.draggedResizeHandle||!this.draggedColumn)return;let t=e.pageX-(this.dragStartX||0),i=this.viewport;"full"===i.columnDistribution?this.fullDistributionResize(t):this.fixedDistributionResize(t),i.reflow(!0),i.grid.options?.rendering?.rows?.virtualization&&i.rowsVirtualizer.adjustRowHeights(),o(this.draggedColumn,"afterResize",{target:this.draggedColumn,originalEvent:e})},this.onDocumentMouseUp=()=>{this.draggedColumn?.header?.htmlElement?.classList.remove(i.getClassName("resizedColumn")),this.dragStartX=void 0,this.draggedColumn=void 0,this.draggedResizeHandle=void 0,this.columnStartWidth=void 0,this.nextColumnStartWidth=void 0},this.viewport=e,document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp)}renderColumnDragHandles(e,t){let s=e.viewport;if(s.columnsResizer&&("full"!==s.columnDistribution||s.grid.enabledColumns&&e.index{let r=t.viewport,{grid:o}=r;o.options?.rendering?.rows?.virtualization||(o.contentWrapper?.classList.add(i.getClassName("resizerWrapper")),r.reflow(!0)),this.dragStartX=s.pageX,this.draggedColumn=t,this.draggedResizeHandle=e,this.columnStartWidth=t.getWidth(),this.nextColumnStartWidth=r.columns[t.index+1]?.getWidth(),t.header?.htmlElement.classList.add(i.getClassName("resizedColumn"))};this.handles.push([e,s]),e.addEventListener("mousedown",s)}removeEventListeners(){document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp);for(let e=0,t=this.handles.length;e(n(e,"padding-left",!0)||0)+(n(e,"padding-right",!0)||0)+(n(e,"border-left",!0)||0)+(n(e,"border-right",!0)||0),o=e.MIN_COLUMN_WIDTH;return i&&(o=Math.max(o,r(i))),s&&(o=Math.max(o,r(s))),o}}return l}),i(t,"Grid/Core/Table/Table.js",[t["Grid/Core/GridUtils.js"],t["Core/Utilities.js"],t["Grid/Core/Table/Column.js"],t["Grid/Core/Table/Header/TableHeader.js"],t["Grid/Core/Table/Actions/RowsVirtualizer.js"],t["Grid/Core/Table/Actions/ColumnsResizer.js"],t["Grid/Core/Globals.js"],t["Grid/Core/Defaults.js"]],function(e,t,i,s,r,o,n,l){let{makeHTMLElement:a}=e,{fireEvent:d,getStyle:h,defined:u}=t;return class{constructor(e,t){this.columns=[],this.rows=[],this.onTBodyFocus=e=>{e.preventDefault(),this.rows[this.rowsVirtualizer.rowCursor-this.rows[0].index]?.cells[0]?.htmlElement.focus()},this.onResize=()=>{this.reflow(this.scrollable)},this.onScroll=()=>{this.virtualRows&&this.rowsVirtualizer.scroll(),this.header?.scrollHorizontally(this.tbodyElement.scrollLeft)},this.grid=e,this.dataTable=this.grid.presentationTable;let i=e.options,s=i?.rendering?.table?.className;this.columnDistribution=i?.rendering?.columns?.distribution,this.virtualRows=!!i?.rendering?.rows?.virtualization,this.scrollable=!!(this.grid.initialContainerHeight||this.virtualRows),i?.rendering?.header?.enabled&&(this.theadElement=a("thead",{},t)),this.tbodyElement=a("tbody",{},t),this.virtualRows&&t.classList.add(n.getClassName("virtualization")),i?.columnDefaults?.resizing&&(this.columnsResizer=new o(this)),s&&t.classList.add(...s.split(/\s+/g)),this.loadColumns(),this.rowsVirtualizer=new r(this),this.init(),this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(t),this.tbodyElement.addEventListener("scroll",this.onScroll),this.scrollable&&t.classList.add(n.getClassName("scrollableContent")),this.tbodyElement.addEventListener("focus",this.onTBodyFocus)}init(){d(this,"beforeInit"),this.setTbodyMinHeight(),this.grid.options?.rendering?.header?.enabled&&(this.header=new s(this),this.header.render()),this.rowsVirtualizer.initialRender()}setTbodyMinHeight(){let{options:e}=this.grid,t=e?.rendering?.rows?.minVisibleRows,i=this.tbodyElement;u(t)&&!h(i,"min-height",!0)&&(i.style.minHeight=t*this.rowsVirtualizer.defaultRowHeight+"px")}loadColumns(){let e;let{enabledColumns:t}=this.grid;if(t)for(let s=0,r=t.length;s=t&&this.grid.update()}loadPresentationData(){for(let e of(this.dataTable=this.grid.presentationTable,this.columns))e.loadData();this.updateVirtualization(),this.rowsVirtualizer.rerender()}reflow(e=!1){let t=this.grid.options?.rendering?.rows?.virtualization;if("fixed"===this.columnDistribution){let e=0;for(let t=0,i=this.columns.length;te.width),focusCursor:this.focusCursor}}applyStateMeta(e){if(this.tbodyElement.scrollTop=e.scrollTop,this.tbodyElement.scrollLeft=e.scrollLeft,this.columnDistribution===e.columnDistribution&&this.columns.length===e.columnWidths.length){let t=e.columnWidths;for(let e=0,i=t.length;et.id===e)}}}),i(t,"Data/Modifiers/ChainModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(t,...r){super(),this.chain=r,this.options=i(s.defaultOptions,t);let o=this.options.chain||[];for(let t=0,i=o.length,s,n;t(t||0)?1:0}static descending(e,t){return(t||0)<(e||0)?-1:(t||0)>(e||0)?1:0}constructor(e){super(),this.options=s(r.defaultOptions,e)}getRowReferences(e){let t=e.getRows(),i=[];for(let e=0,s=t.length;e-1&&(n&&i[l[0]].length?(e.modified.setColumns(i,s),e.modified.setColumn(n,this.modifyTable(new t({columns:e.getColumns([o,n])})).modified.getColumn(n))):this.modifyTable(e,r)),e}modifyRows(e,i,s,r){let{orderByColumn:o,orderInColumn:n}=this.options;return n&&i.length?(e.modified.setRows(i,s),e.modified.setColumn(n,this.modifyTable(new t({columns:e.getColumns([o,n])})).modified.getColumn(n))):this.modifyTable(e,r),e}modifyTable(e,t){this.emit({type:"modify",detail:t,table:e});let i=e.getColumnNames(),s=e.getRowCount(),o=this.getRowReferences(e),{direction:n,orderByColumn:l,orderInColumn:a}=this.options,d="asc"===n?r.ascending:r.descending,h=i.indexOf(l),u=e.modified;if(-1!==h&&o.sort((e,t)=>d(e.row[h],t.row[h])),a){let e=[];for(let t=0;t-1;--r){let o=i[r],n=t[o],l=n.sorting?.order;if(l){if(e){console.warn(`Grid: Only one column can be sorted at a time. Data will be sorted only by the last found column with the sorting order defined in the options: "${e}".`);break}s=l,e=o}}return{columnId:e,order:s}}loadOptions(){let e=this.getSortingOptions();(e.columnId!==this.initialSorting?.columnId||e.order!==this.initialSorting?.order)&&(this.initialSorting=e,this.setSorting(e.order,e.columnId))}createModifier(){if(!this.currentSorting)return;let{columnId:t,order:i}=this.currentSorting;if(i)return new e({orderByColumn:t,direction:i})}}}),i(t,"Grid/Core/Querying/QueryingController.js",[t["Data/Modifiers/ChainModifier.js"],t["Grid/Core/Querying/SortingController.js"]],function(e,t){return class{constructor(e){this.grid=e,this.sorting=new t(e)}async proceed(e=!1){(e||this.sorting.shouldBeUpdated)&&await this.modifyData()}loadOptions(){this.sorting.loadOptions()}willNotModify(){return!this.sorting.modifier}async modifyData(){let t=this.grid.dataTable;if(!t)return;let i=[];if(this.sorting.modifier&&i.push(this.sorting.modifier),i.length>0){let s=new e({},...i),r=t.clone();await s.modify(r.modified),this.grid.presentationTable=r.modified}else this.grid.presentationTable=t.modified;this.sorting.shouldBeUpdated=!1}}}),i(t,"Grid/Core/Grid.js",[t["Grid/Core/Accessibility/Accessibility.js"],t["Core/Renderer/HTML/AST.js"],t["Grid/Core/Defaults.js"],t["Grid/Core/GridUtils.js"],t["Data/DataTable.js"],t["Grid/Core/Table/Table.js"],t["Core/Utilities.js"],t["Grid/Core/Querying/QueryingController.js"],t["Grid/Core/Globals.js"],t["Shared/TimeBase.js"]],function(e,t,i,s,r,o,n,l,a,d){let{makeHTMLElement:h,setHTMLContent:u}=s,{fireEvent:c,extend:m,getStyle:f,merge:p,pick:g,defined:C}=n;class w{static grid(e,t,i){return i?new Promise(i=>{new w(e,t,e=>{i(e)})}):new w(e,t)}constructor(e,t,i){this.columnOptionsMap={},this.userOptions={},this.initialContainerHeight=0,this.loadUserOptions(t),this.querying=new l(this),this.id=this.options?.id||n.uniqueKey(),this.initContainers(e),this.initAccessibility(),this.loadDataTable(this.options?.dataTable),this.initVirtualization(),this.locale=this.options?.lang?.locale||this.container?.closest("[lang]")?.lang,this.time=new d(m(this.options?.time,{locale:this.locale}),this.options?.lang),this.querying.loadOptions(),this.querying.proceed().then(()=>{this.renderViewport(),i?.(this)}),w.grids.push(this)}initAccessibility(){this.accessibility?.destroy(),delete this.accessibility,this.options?.accessibility?.enabled&&(this.accessibility=new e(this))}initContainers(e){let i="string"==typeof e?a.win.document.getElementById(e):e;if(!i){console.error(` + Rendering div not found. It is unable to find the HTML element + to render the Grid in. + `);return}this.initialContainerHeight=f(i,"height",!0)||0,this.container=i,this.container.innerHTML=t.emptyHTML,this.contentWrapper=h("div",{className:a.getClassName("container")},this.container)}loadUserOptions(e,t=!1){(e=p(e)).columns&&(t?this.loadColumnOptionsOneToOne(e.columns):this.loadColumnOptions(e.columns),delete e.columns),this.userOptions=p(this.userOptions,e),this.options=p(this.options??i.defaultOptions,this.userOptions);let s=this.options?.columns;if(!s)return;let r={};for(let e=0,t=s?.length??0;ee.id===r.id);if(Object.keys(r).length<2){t&&-1!==o&&i.splice(o,1);continue}-1===o?i.push(r):t?i[o]=r:i[o]=p(i[o],r)}i.length<1&&delete this.userOptions.columns}loadColumnOptionsOneToOne(e){let t;let i=this.userOptions.columns,s=[];for(let r=0,o=e.length;re.id===o.id);void 0!==n&&-1!==n&&(t=i?.[n]);let l=p(t??{},o);Object.keys(l).length>1&&s.push(l)}this.userOptions.columns=s}async update(e={},t=!0,i=!1){this.loadUserOptions(e,i),this.initAccessibility();let s=!1;(!this.dataTable||e.dataTable)&&(this.userOptions.dataTable=e.dataTable,(this.options??{}).dataTable=e.dataTable,this.loadDataTable(this.options?.dataTable),s=!0,this.initVirtualization()),this.querying.loadOptions(),t&&(await this.querying.proceed(s),this.renderViewport())}async updateColumn(e,t,i=!0,s=!1){this.loadColumnOptions([{id:e,...t}],s),await this.update(void 0,i)}hoverRow(e){let t=this.viewport?.rows;if(!t)return;let i=this.viewport?.rows[0]?.index??0;void 0!==this.hoveredRowIndex&&t[this.hoveredRowIndex-i]?.setHoveredState(!1),void 0!==e&&t[e-i]?.setHoveredState(!0),this.hoveredRowIndex=e}hoverColumn(e){let t=this.viewport;t&&(this.hoveredColumnId&&t.getColumn(this.hoveredColumnId)?.setHoveredState(!1),e&&t.getColumn(e)?.setHoveredState(!0),this.hoveredColumnId=e)}syncRow(e){let t=this.viewport?.rows;if(!t)return;let i=this.viewport?.rows[0]?.index??0;void 0!==this.syncedRowIndex&&t[this.syncedRowIndex-i]?.setSyncedState(!1),void 0!==e&&t[e-i]?.setSyncedState(!0),this.syncedRowIndex=e}syncColumn(e){let t=this.viewport;t&&(this.syncedColumnId&&t.getColumn(this.syncedColumnId)?.setSyncedState(!1),e&&t.getColumn(e)?.setSyncedState(!0),this.syncedColumnId=e)}renderCaption(){let e=this.options?.caption,t=e?.text;t&&(this.captionElement=h("div",{className:a.getClassName("captionElement"),id:this.id+"-caption"},this.contentWrapper),u(this.captionElement,t),e.className&&this.captionElement.classList.add(...e.className.split(/\s+/g)))}renderDescription(){let e=this.options?.description,t=e?.text;t&&(this.descriptionElement=h("div",{className:a.getClassName("descriptionElement"),id:this.id+"-description"},this.contentWrapper),u(this.descriptionElement,t),e.className&&this.descriptionElement.classList.add(...e.className.split(/\s+/g)))}resetContentWrapper(){this.contentWrapper&&(this.contentWrapper.innerHTML=t.emptyHTML,this.contentWrapper.className=a.getClassName("container")+" "+this.options?.rendering?.theme||"")}renderViewport(){let e=this.viewport?.getStateMeta();this.enabledColumns=this.getEnabledColumnIDs(),this.credits?.destroy(),this.viewport?.destroy(),delete this.viewport,this.resetContentWrapper(),this.renderCaption(),this.enabledColumns.length>0?(this.viewport=this.renderTable(),e&&this.viewport&&this.viewport.applyStateMeta(e)):this.renderNoData(),this.renderDescription(),this.accessibility?.setA11yOptions(),this.viewport?.virtualRows&&this.viewport.reflow(),c(this,"afterRenderViewport")}renderTable(){return this.tableElement=h("table",{className:a.getClassName("tableElement")},this.contentWrapper),new o(this,this.tableElement)}renderNoData(){h("div",{className:a.getClassName("noData"),innerText:this.options?.lang?.noData},this.contentWrapper)}getEnabledColumnIDs(){let e;let{columnOptionsMap:t}=this,i=this.options?.header,s=this.getColumnIds(i||[],!1),r=this.options?.rendering?.columns?.included||(s&&s.length>0?s:this.dataTable?.getColumnNames());if(!r?.length)return[];if(!t)return r;let o=[];for(let i=0,s=r.length;ie===this);this.viewport?.destroy(),this.container&&(this.container.innerHTML=t.emptyHTML,this.container.classList.remove(a.getClassName("container"))),Object.keys(this).forEach(e=>{delete this[e]}),w.grids.splice(e,1)}showLoading(e){this.loadingWrapper||(this.loadingWrapper=h("div",{className:a.getClassName("loadingWrapper")},this.contentWrapper),h("div",{className:a.getClassName("loadingSpinner")},this.loadingWrapper),u(h("span",{className:a.getClassName("loadingMessage")},this.loadingWrapper),g(e,this.options?.lang?.loading,"")))}hideLoading(){this.loadingWrapper?.remove(),delete this.loadingWrapper}getData(){let e=this.viewport?.dataTable.modified.columns;if(!this.enabledColumns||!e)return"{}";for(let t of Object.keys(e))-1===this.enabledColumns.indexOf(t)&&delete e[t];return JSON.stringify(e)}getJSON(){return this.getData()}getOptions(e=!0){let t=e?p(this.userOptions):p(this.options);return t.dataTable?.id&&(t.dataTable={columns:t.dataTable.columns}),t}getOptionsJSON(e=!0){return JSON.stringify(this.getOptions(e))}initVirtualization(){var e,t;let s=this.userOptions.rendering?.rows,r=s?.virtualization,o=Number(s?.virtualizationThreshold||i.defaultOptions.rendering?.rows?.virtualizationThreshold),n=Number(this.dataTable?.rowCount);(t=(e=this.options??(this.options={})).rendering??(e.rendering={})).rows??(t.rows={}),this.options.rendering.rows.virtualization=C(r)?r:n>=o}}return w.grids=[],w}),i(t,"Data/DataPoolDefaults.js",[],function(){return{connectors:[]}}),i(t,"Data/DataPool.js",[t["Data/Connectors/DataConnector.js"],t["Data/DataPoolDefaults.js"],t["Core/Utilities.js"]],function(e,t,i){class s{constructor(e=t){e.connectors=e.connectors||[],this.connectors={},this.options=e,this.waiting={}}emit(e){i.fireEvent(this,e.type,e)}getConnector(e){let t=this.connectors[e];if(t)return Promise.resolve(t);let i=this.waiting[e];if(!i){i=this.waiting[e]=[];let t=this.getConnectorOptions(e);if(!t)throw Error(`Connector '${e}' not found.`);this.loadConnector(t).then(t=>{delete this.waiting[e];for(let e=0,s=i.length;e{delete this.waiting[e];for(let e=0,s=i.length;e{i.push([e,t])})}getConnectorIds(){let e=this.options.connectors,t=[];for(let i=0,s=e.length;ie.table)}isNewConnector(e){return!this.connectors[e]}loadConnector(t){return new Promise((i,s)=>{this.emit({type:"load",options:t});let r=e.types[t.type];if(!r)throw Error(`Connector type not found. (${t.type})`);new r(t.options).load().then(e=>{this.connectors[t.id]=e,this.emit({type:"afterLoad",options:t}),i(e)}).catch(s)})}on(e,t){return i.addEvent(this,e,t)}setConnectorOptions(e){let t=this.options.connectors,i=this.connectors;this.emit({type:"setConnectorOptions",options:e});for(let i=0,s=t.length;i{i(n,e,t=>{let i=t.target;i.row.viewport.grid.options?.events?.cell?.[e]?.call(i),o["cell_"+e]?.call(i)})}),["afterResize","afterSorting"].forEach(t=>{i(e,t,e=>{let i=e.target;i.viewport.grid.options?.events?.column?.[t]?.call(i)})}),i(s,"click",e=>{let t=e.target;t.viewport.grid.options?.events?.header?.click?.call(t)}))}}}),i(t,"Grid/Pro/CellEditing/CellEditing.js",[t["Grid/Core/GridUtils.js"],t["Grid/Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i){let{makeHTMLElement:s}=e,{fireEvent:r}=i;return class{constructor(e){this.onInputBlur=()=>{this.stopEditing()},this.onInputKeyDown=e=>{let{keyCode:t}=e;(13===t||27===t)&&this.stopEditing(13===t)},this.viewport=e}startEditing(e){if(this.editedCell===e)return;this.editedCell&&this.stopEditing(),this.editedCell=e;let i=e.htmlElement;i.innerHTML="",i.classList.add(t.getClassName("editedCell")),this.renderInput(),r(e,"startedEditing")}stopEditing(e=!0){let i=this.editedCell,s=this.inputElement;if(!i||!s)return;let o=s.value;this.destroyInput(),i.htmlElement.classList.remove(t.getClassName("editedCell")),i.htmlElement.focus(),isNaN(+o)||(o=+o),i.setValue(e?o:i.value,e&&i.value!==o),r(i,"stoppedEditing",{submit:e}),delete this.editedCell}renderInput(){let e=this.editedCell;if(!e)return;let t=e.htmlElement,i=this.inputElement=s("input",{},t);i.value=""+e.value,i.focus(),i.addEventListener("blur",this.onInputBlur),i.addEventListener("keydown",this.onInputKeyDown)}destroyInput(){let e=this.inputElement;e&&(e.removeEventListener("keydown",this.onInputKeyDown),e.removeEventListener("blur",this.onInputBlur),e.remove(),delete this.inputElement)}}}),i(t,"Grid/Pro/CellEditing/CellEditingComposition.js",[t["Grid/Core/Defaults.js"],t["Grid/Core/Globals.js"],t["Grid/Pro/CellEditing/CellEditing.js"],t["Grid/Core/GridUtils.js"],t["Core/Utilities.js"]],function(e,t,i,s,r){var o;let{makeHTMLElement:n}=s,{addEvent:l,merge:a,pushUnique:d}=r;return function(s){let r={accessibility:{announcements:{cellEditing:!0}},lang:{accessibility:{cellEditing:{editable:"Editable.",announcements:{started:"Entered cell editing mode.",edited:"Edited cell value.",cancelled:"Editing canceled."}}}}};function o(){this.cellEditing=new i(this)}function h(e){e.originalEvent?.key==="Enter"&&this.column.options.cells?.editable&&this.row.viewport.cellEditing?.startEditing(this)}function u(){this.column.options.cells?.editable&&this.row.viewport.cellEditing?.startEditing(this)}function c(){if(!this.row.viewport.grid.accessibility)return;let e=this.row.viewport.grid.options?.lang?.accessibility?.cellEditing?.editable;this.column.options.cells?.editable&&e&&n("span",{className:t.getClassName("visuallyHidden"),innerText:", "+e},this.htmlElement)}function m(e,t){let i=e.row.viewport.grid.accessibility;if(!i)return;let{options:s}=i.grid;if(!s?.accessibility?.announcements?.cellEditing)return;let r=s?.lang?.accessibility?.cellEditing?.announcements,o=r?.[t];o&&i.announce(o)}s.compose=function(i,s){d(t.composed,"CellEditing")&&(a(!0,e.defaultOptions,r),l(i,"beforeInit",o),l(s,"keyDown",h),l(s,"dblClick",u),l(s,"afterSetValue",c),l(s,"startedEditing",function(){m(this,"started")}),l(s,"stoppedEditing",function(e){this.column.viewport.grid.options?.events?.cell?.afterEdit?.call(this),m(this,e.submit?"edited":"cancelled")}))}}(o||(o={})),o}),i(t,"Grid/Pro/Dash3Compatibility.js",[t["Core/Utilities.js"],t["Core/Globals.js"]],function(e,t){let{pushUnique:i}=e;return{compose:function(e){i(t.composed,"Dash3Compatibility")&&Object.defineProperty(e.prototype,"dataGrid",{get:function(){return this.grid},configurable:!0,enumerable:!1})}}}),i(t,"Grid/Core/Credits.js",[t["Grid/Core/Globals.js"],t["Grid/Core/GridUtils.js"]],function(e,t){let{makeHTMLElement:i}=t;class s{constructor(t,r){this.grid=t,this.containerElement=i("div",{className:e.getClassName("creditsContainer")}),this.textElement=this.renderAnchor(),this.options=r??s.defaultOptions,this.render()}render(){let e=this.grid,t=e.contentWrapper,{text:i,href:s}=this.options;this.containerElement.remove(),this.textElement||(this.textElement=this.renderAnchor()),i&&s&&(this.textElement.innerHTML=i,this.textElement.setAttribute("href",s||"")),e.descriptionElement?t?.insertBefore(this.containerElement,e.descriptionElement):t?.appendChild(this.containerElement),this.grid.viewport?.reflow()}renderAnchor(){let t=i("a",{className:e.getClassName("creditsText")},this.containerElement);return t.setAttribute("target","_blank"),t}getHeight(){return this.containerElement.offsetHeight}destroy(){this.containerElement.remove()}}return s.defaultOptions={enabled:!0,text:` + + Highcharts logo + `,href:"https://www.highcharts.com",position:"bottom"},s}),i(t,"Grid/Pro/Credits/CreditsPro.js",[t["Grid/Core/Globals.js"],t["Grid/Core/Credits.js"]],function(e,t){return class extends t{setContent(){let{text:e,href:t}=this.options;this.textElement.innerHTML=e||"",this.textElement.setAttribute("href",t||"")}appendToContainer(){let t=this.grid,i=t.contentWrapper,{position:s}=this.options;if("top"===s){i?.prepend(this.containerElement);return}t.descriptionElement?i?.insertBefore(this.containerElement,t.descriptionElement):i?.appendChild(this.containerElement),this.containerElement.classList.add(e.getClassName("creditsPro"))}update(e,t=!0){e&&(this.grid.update({credits:e},!1),this.options=this.grid.options?.credits??{}),t&&this.render()}render(){let e=this.options.enabled??!1;this.containerElement.remove(),e?(this.setContent(),this.appendToContainer()):this.destroy(),this.grid.viewport?.reflow()}destroy(){super.destroy(),delete this.grid.credits}}}),i(t,"Grid/Pro/Credits/CreditsProComposition.js",[t["Grid/Pro/Credits/CreditsPro.js"],t["Grid/Core/Globals.js"],t["Core/Utilities.js"],t["Grid/Core/Defaults.js"]],function(e,t,i,s){var r;let{addEvent:o,merge:n,pushUnique:l}=i;return function(i){function r(){this.credits=new e(this,this.options?.credits)}i.compose=function(i){l(t.composed,"CreditsPro")&&(n(!0,s.defaultOptions,{credits:e.defaultOptions}),o(i,"afterRenderViewport",r))}}(r||(r={})),r}),i(t,"Data/Converters/CSVConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){let t=i(s.defaultOptions,e);super(t),this.columns=[],this.headers=[],this.dataTypes=[],this.options=t}export(e,t=this.options){let{useLocalDecimalPoint:i,lineDelimiter:s}=t,r=!1!==this.options.firstRowAsNames,{decimalPoint:o,itemDelimiter:n}=t;o||(o=","!==n&&i?1.1.toLocaleString()[1]:"."),n||(n=","===o?";":",");let l=e.getSortedColumns(t.usePresentationOrder),a=Object.keys(l),d=[],h=a.length,u=[];r&&d.push(a.map(e=>`"${e}"`).join(n));for(let t=0;t2&&void 0===u[e][i];)u[e].pop(),i--;d.push(u[e].join(n))}}}return d.join(s)}parse(e,t){let s=this.dataTypes,r=i(this.options,e),{beforeParse:o,lineDelimiter:n,firstRowAsNames:l,itemDelimiter:a}=r,d,h=0,{csv:u,startRow:c,endRow:m}=r,f;if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers}),u&&o&&(u=o(u)),u){if(d=u.replace(/\r\n|\r/g,"\n").split(n||"\n"),(!c||c<0)&&(c=0),(!m||m>=d.length)&&(m=d.length-1),a||(this.guessedItemDelimiter=this.guessDelimiter(d)),l){let e=d[0].split(a||this.guessedItemDelimiter||",");for(let t=0;t{h=e[t]},p=e=>{r.length{if(o>c||c>n){++c,u="";return}if("string"==typeof u?!isNaN(parseFloat(u))&&isFinite(u)?(u=parseFloat(u),p("number")):isNaN(Date.parse(u))?p("string"):(u=u.replace(/\//g,"-"),p("date")):p("number"),s.length13)break;let h=e[s];for(let e=0;er[","]?s=";":(r[","],r[";"],s=","),t>i?this.guessedDecimalPoint=".":this.guessedDecimalPoint=",",s}getTable(){return e.getTableFromColumns(this.columns,this.headers)}}return s.defaultOptions={...e.defaultOptions,lineDelimiter:"\n"},e.registerType("CSV",s),s}),i(t,"Data/Connectors/CSVConnector.js",[t["Data/Converters/CSVConverter.js"],t["Data/Connectors/DataConnector.js"],t["Core/Utilities.js"]],function(e,t,i){let{merge:s}=i;class r extends t{constructor(t){let i=s(r.defaultOptions,t);super(i),this.converter=new e(i),this.options=i,i.enablePolling&&this.startPolling(1e3*Math.max(i.dataRefreshRate||0,1))}load(e){let t=this,i=t.converter,s=t.table,{csv:r,csvURL:o,dataModifier:n}=t.options;return t.emit({type:"load",csv:r,detail:e,table:s}),Promise.resolve(o?fetch(o).then(e=>e.text()):r||"").then(e=>(e&&(s.deleteColumns(),i.parse({csv:e}),s.setColumns(i.getTable().getColumns())),t.setModifierOptions(n).then(()=>e))).then(i=>(t.emit({type:"afterLoad",csv:i,detail:e,table:s}),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return r.defaultOptions={csv:"",csvURL:"",enablePolling:!1,dataRefreshRate:1,firstRowAsNames:!0},t.registerType("CSV",r),r}),i(t,"Data/Converters/GoogleSheetsConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i,uniqueKey:s}=t;class r extends e{constructor(e){let t=i(r.defaultOptions,e);super(t),this.columns=[],this.header=[],this.options=t}parse(e,t){let r;let o=i(this.options,e),n=(o.json?.values||[]).map(e=>e.slice());if(0===n.length)return!1;this.header=[],this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.header});let{beforeParse:l,json:a}=o;l&&a&&(n=l(a.values)),this.columns=n;for(let e=0,t=n.length;ee.json()).then(e=>{if("object"==typeof e&&e&&"object"==typeof e.error&&e.error&&"number"==typeof e.error.code&&"string"==typeof e.error.message&&"string"==typeof e.error.status)throw Error(e.error.message);return i.parse({firstRowAsNames:a,json:e}),s.deleteColumns(),s.setColumns(i.getTable().getColumns()),t.setModifierOptions(r)}).then(()=>(t.emit({type:"afterLoad",detail:e,table:s,url:u}),l&&setTimeout(()=>t.load(),1e3*Math.max(n||0,1)),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return o.defaultOptions={googleAPIKey:"",googleSpreadsheetKey:"",enablePolling:!1,dataRefreshRate:2,firstRowAsNames:!0},function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function i(e={}){let{endColumn:s,endRow:o,googleSpreadsheetRange:n,startColumn:l,startRow:a}=e;return n||(t[l||0]||"A")+(Math.max(a||0,0)+1)+":"+(t[r(s,25)]||"Z")+(o?Math.max(o,0):"Z")}e.buildFetchURL=function(e,t,s={}){let r=new URL(`https://sheets.googleapis.com/v4/spreadsheets/${t}/values/`),o=s.onlyColumnNames?"A1:Z1":i(s);r.pathname+=o;let n=r.searchParams;return n.set("alt","json"),s.onlyColumnNames||(n.set("dateTimeRenderOption","FORMATTED_STRING"),n.set("majorDimension","COLUMNS"),n.set("valueRenderOption","UNFORMATTED_VALUE")),n.set("prettyPrint","false"),n.set("key",e),r.href},e.buildQueryRange=i}(o||(o={})),e.registerType("GoogleSheets",o),o}),i(t,"Data/Converters/HTMLTableConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){let t=i(s.defaultOptions,e);super(t),this.columns=[],this.headers=[],this.options=t,t.tableElement&&(this.tableElement=t.tableElement,this.tableElementID=t.tableElement.id)}export(e,t=this.options){let i=!1!==t.firstRowAsNames,s=t.useMultiLevelHeaders,r=e.getSortedColumns(t.usePresentationOrder),o=Object.keys(r),n=[],l=o.length,a=[],d="";if(i){let e=[];if(s){for(let t of o){let i=r[t];Array.isArray(i)||(i=Array.from(i));let s=(i.shift()||"").toString();r[t]=i,e.push(s)}d=this.getTableHeaderHTML(o,e,t)}else d=this.getTableHeaderHTML(void 0,o,t)}for(let e=0;e"+a[s].join("")+"")}}let h="";return t.tableCaption&&(h=''+t.tableCaption+""),""+h+d+""+n.join("")+"
    "}getCellHTMLFromValue(e,t,i,s,r){let o=s,n="text"+(t?" "+t:"");return"number"==typeof o?(o=o.toString(),","===r&&(o=o.replace(".",r)),n="number"):s||(o="",n="empty"),"<"+e+(i?" "+i:"")+' class="'+n+'">'+o+""}getTableHeaderHTML(e=[],t=[],i=this.options){let{useMultiLevelHeaders:s,useRowspanHeaders:r}=i,o="",n=0,l=t&&t.length,a,d=0,h;if(s&&e&&t&&!function(e,t){let i=e.length;if(t.length!==i)return!1;for(;--i;)if(e[i]!==t[i])return!1;return!0}(e,t)){for(o+="";n1?' valign="top" rowspan="'+h+'"':""),a));o+=""}if(t){for(o+="",n=0,l=t.length;n"}return o+""}parse(e,t){let s=[],r=[],o=i(this.options,e),{endRow:n,startColumn:l,endColumn:a,firstRowAsNames:d}=o,h=o.tableElement||this.tableElement;if(!(h instanceof HTMLElement)){this.emit({type:"parseError",columns:s,detail:t,headers:r,error:"Not a valid HTML Table"});return}this.tableElement=h,this.tableElementID=h.id,this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers});let u=h.getElementsByTagName("tr"),c=u.length,m=0,f,{startRow:p}=o;if(d&&c){let e=u[0].children,t=e.length;for(let i=l;ia);i++)("TD"===(f=e[i]).tagName||"TH"===f.tagName)&&r.push(f.innerHTML);p++}for(;m=p&&m<=n){let e=u[m].children,t=e.length,i=0;for(;i=l&&i<=a){s[t]||(s[t]=[]);let e=this.asGuessedType(f.innerHTML);e instanceof Date&&(e=e.getTime()),s[t][m-p]=e;let i=1;for(;m-p>=i&&void 0===r[m-p-i];)r[m-p-i]=null,i++}i++}}m++}this.columns=s,this.headers=r,this.emit({type:"afterParse",columns:s,detail:t,headers:r})}getTable(){return e.getTableFromColumns(this.columns,this.headers)}}return s.defaultOptions={...e.defaultOptions,useRowspanHeaders:!0,useMultiLevelHeaders:!0},e.registerType("HTMLTable",s),s}),i(t,"Data/Connectors/HTMLTableConnector.js",[t["Data/Connectors/DataConnector.js"],t["Core/Globals.js"],t["Data/Converters/HTMLTableConverter.js"],t["Core/Utilities.js"]],function(e,t,i,s){let{win:r}=t,{merge:o}=s;class n extends e{constructor(e){let t=o(n.defaultOptions,e);super(t),this.converter=new i(t),this.options=t}load(e){let t;let i=this,s=i.converter,n=i.table,{dataModifier:l,table:a}=i.options;if(i.emit({type:"load",detail:e,table:n,tableElement:i.tableElement}),"string"==typeof a?(i.tableID=a,t=r.document.getElementById(a)):(t=a,i.tableID=t.id),i.tableElement=t||void 0,!i.tableElement){let t="HTML table not provided, or element with ID not found";return i.emit({type:"loadError",detail:e,error:t,table:n}),Promise.reject(Error(t))}return s.parse(o({tableElement:i.tableElement},i.options),e),n.deleteColumns(),n.setColumns(s.getTable().getColumns()),i.setModifierOptions(l).then(()=>(i.emit({type:"afterLoad",detail:e,table:n,tableElement:i.tableElement}),i))}}return n.defaultOptions={table:""},e.registerType("HTMLTable",n),n}),i(t,"Data/Converters/JSONConverter.js",[t["Data/Converters/DataConverter.js"],t["Data/DataTable.js"],t["Core/Utilities.js"]],function(e,t,i){let{error:s,isArray:r,merge:o,objectEach:n}=i;class l extends e{constructor(e){let i=o(l.defaultOptions,e);super(i),this.columns=[],this.headers=[],this.options=i,this.table=new t}parse(e,t){let{beforeParse:i,orientation:l,firstRowAsNames:a,columnNames:d}=e=o(this.options,e),h=e.data;if(h){if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers}),i&&(h=i(h)),h=h.slice(),"columns"===l)for(let e=0,t=h.length;e{e[s]=i.reduce((e,t)=>e[t],t)}),t=e}this.table.setRows([t],e)}}}this.emit({type:"afterParse",columns:this.columns,detail:t,headers:this.headers})}}getTable(){return this.table}}return l.defaultOptions={...e.defaultOptions,data:[],orientation:"rows"},e.registerType("JSON",l),l}),i(t,"Data/Connectors/JSONConnector.js",[t["Data/Connectors/DataConnector.js"],t["Core/Utilities.js"],t["Data/Converters/JSONConverter.js"]],function(e,t,i){let{merge:s}=t;class r extends e{constructor(e){let t=s(r.defaultOptions,e);super(t),this.converter=new i(t),this.options=t,t.enablePolling&&this.startPolling(1e3*Math.max(t.dataRefreshRate||0,1))}load(e){let t=this,i=t.converter,s=t.table,{data:r,dataUrl:o,dataModifier:n}=t.options;return t.emit({type:"load",data:r,detail:e,table:s}),Promise.resolve(o?fetch(o).then(e=>e.json()).catch(i=>{t.emit({type:"loadError",detail:e,error:i,table:s}),console.warn(`Unable to fetch data from ${o}.`)}):r||[]).then(e=>(e&&(s.deleteColumns(),i.parse({data:e}),s.setColumns(i.getTable().getColumns())),t.setModifierOptions(n).then(()=>e))).then(i=>(t.emit({type:"afterLoad",data:i,detail:e,table:s}),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return r.defaultOptions={data:[],enablePolling:!1,dataRefreshRate:0,firstRowAsNames:!0,orientation:"rows"},e.registerType("JSON",r),r}),i(t,"Data/Modifiers/InvertModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){super(),this.options=i(s.defaultOptions,e)}modifyCell(e,t,i,s,r){let o=e.modified,n=o.getRowIndexBy("columnNames",t);return void 0===n?o.setColumns(this.modifyTable(e.clone()).getColumns(),void 0,r):o.setCell(`${i}`,n,s,r),e}modifyColumns(e,t,i,s){let r=e.modified,o=r.getColumn("columnNames")||[],n=e.getColumnNames(),l=e.getRowCount()!==o.length;if(!l){for(let e=0,t=n.length;e0&&!s&&(t.deleteRows(),t.setRows(l),t.setOriginalRowIndexes(i,!0),n=t.getColumns(),l=[],i=[]),u=n[h.column]||[];for(let r=0,n=u.length,a,d,c;r=h.minValue&&a<=h.maxValue&&(s?(d=e.getRow(r),c=e.getOriginalRowIndex(r)):(d=t.getRow(r),c=t.getOriginalRowIndex(r)),d&&(l.push(d),i.push(c)))}}t.deleteRows(),t.setRows(l),t.setOriginalRowIndexes(i)}return this.emit({type:"afterModify",detail:t,table:e}),e}}return s.defaultOptions={type:"Range",ranges:[]},e.registerType("Range",s),s}),i(t,"masters/datagrid.src.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Templating.js"],t["Data/Connectors/DataConnector.js"],t["Data/Converters/DataConverter.js"],t["Data/DataCursor.js"],t["Grid/Core/Grid.js"],t["Data/Modifiers/DataModifier.js"],t["Data/DataPool.js"],t["Data/DataTable.js"],t["Grid/Core/Defaults.js"],t["Grid/Core/Globals.js"],t["Accessibility/HighContrastMode.js"],t["Core/Utilities.js"],t["Grid/Core/Table/Table.js"],t["Grid/Core/Table/Column.js"],t["Grid/Core/Table/Header/HeaderCell.js"],t["Grid/Core/Table/Content/TableCell.js"],t["Grid/Pro/GridEvents.js"],t["Grid/Pro/CellEditing/CellEditingComposition.js"],t["Grid/Pro/Dash3Compatibility.js"],t["Grid/Pro/Credits/CreditsProComposition.js"]],function(e,t,i,s,r,o,n,l,a,d,h,u,c,m,f,p,g,C,w,y,b){return h.AST=e,h.classNamePrefix="highcharts-datagrid-",h.DataConnector=i,h.DataCursor=r,h.DataConverter=s,h.DataGrid=o,h.dataGrid=o.grid,h.dataGrids=o.grids,h.Grid=o,h.grid=o.grid,h.grids=o.grids,h.DataModifier=n,h.DataPool=l,h.DataTable=a,h.defaultOptions=d.defaultOptions,h.isHighContrastModeActive=u.isHighContrastModeActive,h.setOptions=d.setOptions,h.Templating=t,h.product="Grid Pro",h.merge=c.merge,h.Table=h.Table||m,h.Column=h.Column||f,h.HeaderCell=h.HeaderCell||p,h.TableCell=h.TableCell||g,C.compose(h.Column,h.HeaderCell,h.TableCell),w.compose(h.Table,h.TableCell),b.compose(h.Grid),y.compose(h.Table),h.win.DataGrid||(h.win.DataGrid=h),h.win.Grid||(h.win.Grid=h),h}),t["masters/datagrid.src.js"]._modules=t,t["masters/datagrid.src.js"]}); \ No newline at end of file diff --git a/Scripts/highcharts/exporting.js b/Scripts/highcharts/exporting.js new file mode 100644 index 000000000..0fe04194f --- /dev/null +++ b/Scripts/highcharts/exporting.js @@ -0,0 +1,11 @@ +!/** + * Highcharts JS v12.1.2 (2024-12-21) + * @module highcharts/modules/exporting + * @requires highcharts + * + * Exporting module + * + * (c) 2010-2024 Torstein Honsi + * + * License: www.highcharts.com/license + */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.AST,e._Highcharts.Chart):"function"==typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts/highcharts"],function(e){return t(e,e.AST,e.Chart)}):"object"==typeof exports?exports["highcharts/modules/exporting"]=t(e._Highcharts,e._Highcharts.AST,e._Highcharts.Chart):e.Highcharts=t(e.Highcharts,e.Highcharts.AST,e.Highcharts.Chart)}("undefined"==typeof window?this:window,(e,t,n)=>(()=>{"use strict";var i,o,r,s={660:e=>{e.exports=t},960:e=>{e.exports=n},944:t=>{t.exports=e}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return s[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};a.d(c,{default:()=>_});var p=a(944),h=a.n(p),u=a(660),d=a.n(u);a(960),function(e){e.compose=function(e){return e.navigation||(e.navigation=new t(e)),e};class t{constructor(e){this.updates=[],this.chart=e}addUpdate(e){this.chart.navigation.updates.push(e)}update(e,t){this.updates.forEach(n=>{n.call(this.chart,e,t)})}}e.Additions=t}(i||(i={}));let g=i,{isTouchDevice:f}=h(),m={exporting:{allowTableSorting:!0,type:"image/png",url:"https://export-svg.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadSVG"],y:-5}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen&&this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:5,height:28,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:f?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}};!function(e){let t=[];function n(e,t,n,i){return[["M",e,t+2.5],["L",e+n,t+2.5],["M",e,t+i/2+.5],["L",e+n,t+i/2+.5],["M",e,t+i-1.5],["L",e+n,t+i-1.5]]}function i(e,t,n,i){let o=i/3-2;return[].concat(this.circle(n-o,t,o,o),this.circle(n-o,t+o+4,o,o),this.circle(n-o,t+2*(o+4),o,o))}e.compose=function(e){if(-1===t.indexOf(e)){t.push(e);let o=e.prototype.symbols;o.menu=n,o.menuball=i.bind(o)}}}(o||(o={}));let x=o,{composed:y}=h(),{addEvent:b,fireEvent:v,pushUnique:w}=h();function S(){this.fullscreen=new E(this)}class E{static compose(e){w(y,"Fullscreen")&&b(e,"beforeRender",S)}constructor(e){this.chart=e,this.isOpen=!1;let t=e.renderTo;!this.browserProps&&("function"==typeof t.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:t.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:t.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:t.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let e=this,t=e.chart,n=t.options.chart;v(t,"fullscreenClose",null,function(){e.isOpen&&e.browserProps&&t.container.ownerDocument instanceof Document&&t.container.ownerDocument[e.browserProps.exitFullscreen](),e.unbindFullscreenEvent&&(e.unbindFullscreenEvent=e.unbindFullscreenEvent()),t.setSize(e.origWidth,e.origHeight,!1),e.origWidth=void 0,e.origHeight=void 0,n.width=e.origWidthOption,n.height=e.origHeightOption,e.origWidthOption=void 0,e.origHeightOption=void 0,e.isOpen=!1,e.setButtonText()})}open(){let e=this,t=e.chart,n=t.options.chart;v(t,"fullscreenOpen",null,function(){if(n&&(e.origWidthOption=n.width,e.origHeightOption=n.height),e.origWidth=t.chartWidth,e.origHeight=t.chartHeight,e.browserProps){let n=b(t.container.ownerDocument,e.browserProps.fullscreenChange,function(){e.isOpen?(e.isOpen=!1,e.close()):(t.setSize(null,null,!1),e.isOpen=!0,e.setButtonText())}),i=b(t,"destroy",n);e.unbindFullscreenEvent=()=>{n(),i()};let o=t.renderTo[e.browserProps.requestFullscreen]();o&&o.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let e=this.chart,t=e.exportDivElements,n=e.options.exporting,i=n&&n.buttons&&n.buttons.contextButton.menuItems,o=e.options.lang;if(n&&n.menuItemDefinitions&&o&&o.exitFullscreen&&o.viewFullscreen&&i&&t){let e=t[i.indexOf("viewFullscreen")];e&&d().setElementHTML(e,this.isOpen?o.exitFullscreen:n.menuItemDefinitions.viewFullscreen.text||o.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}let{win:C}=h(),{discardElement:T,objectEach:O}=h(),F={ajax:function(e){let t={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},n=new XMLHttpRequest;function i(t,n){e.error&&e.error(t,n)}if(!e.url)return!1;n.open((e.type||"get").toUpperCase(),e.url,!0),e.headers&&e.headers["Content-Type"]||n.setRequestHeader("Content-Type",t[e.dataType||"json"]||t.text),O(e.headers,function(e,t){n.setRequestHeader(t,e)}),e.responseType&&(n.responseType=e.responseType),n.onreadystatechange=function(){let t;if(4===n.readyState){if(200===n.status){if("blob"!==e.responseType&&(t=n.responseText,"json"===e.dataType))try{t=JSON.parse(t)}catch(e){if(e instanceof Error)return i(n,e)}return e.success&&e.success(t,n)}i(n,n.responseText)}},e.data&&"string"!=typeof e.data&&(e.data=JSON.stringify(e.data)),n.send(e.data)},getJSON:function(e,t){F.ajax({url:e,success:t,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(e,t,n){let i=new C.FormData;O(t,function(e,t){i.append(t,e)}),i.append("b64","true");let{filename:o,type:r}=t;return C.fetch(e,{method:"POST",body:i,...n}).then(e=>{e.ok&&e.text().then(e=>{let t=document.createElement("a");t.href=`data:${r};base64,${e}`,t.download=o,t.click(),T(t)})})}},{defaultOptions:P}=h(),{doc:M,SVG_NS:k,win:H}=h(),{addEvent:N,css:D,createElement:G,discardElement:I,extend:W,find:R,fireEvent:j,isObject:q,merge:V,objectEach:$,pick:z,removeEvent:L,splat:A,uniqueKey:K}=h();!function(e){let t;let n=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^\d+$/],i=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"];e.inlineAllowlist=[];let o=["clipPath","defs","desc"];function r(e){let t,n;let i=this,o=i.renderer,r=V(i.options.navigation.buttonOptions,e),s=r.onclick,l=r.menuItems,a=r.symbolSize||12;if(i.btnCount||(i.btnCount=0),i.exportDivElements||(i.exportDivElements=[],i.exportSVGElements=[]),!1===r.enabled||!r.theme)return;let c=i.styledMode?{}:r.theme;s?n=function(e){e&&e.stopPropagation(),s.call(i,e)}:l&&(n=function(e){e&&e.stopPropagation(),i.contextMenu(p.menuClassName,l,p.translateX||0,p.translateY||0,p.width||0,p.height||0,p),p.setState(2)}),r.text&&r.symbol?c.paddingLeft=z(c.paddingLeft,30):r.text||W(c,{width:r.width,height:r.height,padding:0});let p=o.button(r.text,0,0,n,c,void 0,void 0,void 0,void 0,r.useHTML).addClass(e.className).attr({title:z(i.options.lang[r._titleKey||r.titleKey],"")});p.menuClassName=e.menuClassName||"highcharts-menu-"+i.btnCount++,r.symbol&&(t=o.symbol(r.symbol,Math.round((r.symbolX||0)-a/2),Math.round((r.symbolY||0)-a/2),a,a,{width:a,height:a}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(p),i.styledMode||t.attr({stroke:r.symbolStroke,fill:r.symbolFill,"stroke-width":r.symbolStrokeWidth||1})),p.add(i.exportingGroup).align(W(r,{width:p.width,x:z(r.x,i.buttonOffset)}),!0,"spacingBox"),i.buttonOffset+=((p.width||0)+r.buttonSpacing)*("right"===r.align?-1:1),i.exportSVGElements.push(p,t)}function s(){if(!this.printReverseInfo)return;let{childNodes:e,origDisplay:n,resetParams:i}=this.printReverseInfo;this.moveContainers(this.renderTo),[].forEach.call(e,function(e,t){1===e.nodeType&&(e.style.display=n[t]||"")}),this.isPrinting=!1,i&&this.setSize.apply(this,i),delete this.printReverseInfo,t=void 0,j(this,"afterPrint")}function l(){let e=M.body,t=this.options.exporting.printMaxWidth,n={childNodes:e.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,this.pointer?.reset(void 0,0),j(this,"beforePrint"),t&&this.chartWidth>t&&(n.resetParams=[this.options.chart.width,void 0,!1],this.setSize(t,void 0,!1)),[].forEach.call(n.childNodes,function(e,t){1===e.nodeType&&(n.origDisplay[t]=e.style.display,e.style.display="none")}),this.moveContainers(e),this.printReverseInfo=n}function a(e){e.renderExporting(),N(e,"redraw",e.renderExporting),N(e,"destroy",e.destroyExport)}function c(e,t,n,i,o,r,s){let l=this,a=l.options.navigation,c=l.chartWidth,p=l.chartHeight,u="cache-"+e,g=Math.max(o,r),f,m=l[u];m||(l.exportContextMenu=l[u]=m=G("div",{className:e},{position:"absolute",zIndex:1e3,padding:g+"px",pointerEvents:"auto",...l.renderer.style},l.scrollablePlotArea?.fixedDiv||l.container),f=G("ul",{className:"highcharts-menu"},l.styledMode?{}:{listStyle:"none",margin:0,padding:0},m),l.styledMode||D(f,W({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},a.menuStyle)),m.hideMenu=function(){D(m,{display:"none"}),s&&s.setState(0),l.openMenu=!1,D(l.renderTo,{overflow:"hidden"}),D(l.container,{overflow:"hidden"}),h().clearTimeout(m.hideTimer),j(l,"exportMenuHidden")},l.exportEvents.push(N(m,"mouseleave",function(){m.hideTimer=H.setTimeout(m.hideMenu,500)}),N(m,"mouseenter",function(){h().clearTimeout(m.hideTimer)}),N(M,"mouseup",function(t){l.pointer?.inClass(t.target,e)||m.hideMenu()}),N(m,"click",function(){l.openMenu&&m.hideMenu()})),t.forEach(function(e){if("string"==typeof e&&(e=l.options.exporting.menuItemDefinitions[e]),q(e,!0)){let t;e.separator?t=G("hr",void 0,void 0,f):("viewData"===e.textKey&&l.isDataTableVisible&&(e.textKey="hideData"),t=G("li",{className:"highcharts-menu-item",onclick:function(t){t&&t.stopPropagation(),m.hideMenu(),"string"!=typeof e&&e.onclick&&e.onclick.apply(l,arguments)}},void 0,f),d().setElementHTML(t,e.text||l.options.lang[e.textKey]),l.styledMode||(t.onmouseover=function(){D(this,a.menuItemHoverStyle)},t.onmouseout=function(){D(this,a.menuItemStyle)},D(t,W({cursor:"pointer"},a.menuItemStyle||{})))),l.exportDivElements.push(t)}}),l.exportDivElements.push(f,m),l.exportMenuWidth=m.offsetWidth,l.exportMenuHeight=m.offsetHeight);let x={display:"block"};n+(l.exportMenuWidth||0)>c?x.right=c-n-o-g+"px":x.left=n-g+"px",i+r+(l.exportMenuHeight||0)>p&&s.alignOptions?.verticalAlign!=="top"?x.bottom=p-i-g+"px":x.top=i+r-g+"px",D(m,x),D(l.renderTo,{overflow:""}),D(l.container,{overflow:""}),l.openMenu=!0,j(l,"exportMenuShown")}function p(e){let t;let n=e?e.target:this,i=n.exportSVGElements,o=n.exportDivElements,r=n.exportEvents;i&&(i.forEach((e,o)=>{e&&(e.onclick=e.ontouchstart=null,n[t="cache-"+e.menuClassName]&&delete n[t],i[o]=e.destroy())}),i.length=0),n.exportingGroup&&(n.exportingGroup.destroy(),delete n.exportingGroup),o&&(o.forEach(function(e,t){e&&(h().clearTimeout(e.hideTimer),L(e,"mouseleave"),o[t]=e.onmouseout=e.onmouseover=e.ontouchstart=e.onclick=null,I(e))}),o.length=0),r&&(r.forEach(function(e){e()}),r.length=0)}function u(e,t){let n=this.getSVGForExport(e,t);e=V(this.options.exporting,e),F.post(e.url,{filename:e.filename?e.filename.replace(/\//g,"-"):this.getFilename(),type:e.type,width:e.width,scale:e.scale,svg:n},e.fetchOptions)}function f(e){return e&&this.inlineStyles(),this.container.innerHTML}function y(){let e=this.userOptions.title&&this.userOptions.title.text,t=this.options.exporting.filename;return t?t.replace(/\//g,"-"):("string"==typeof e&&(t=e.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z\d\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!t||t.length<5)&&(t="chart"),t)}function b(e){let t,n,i=V(this.options,e);i.plotOptions=V(this.userOptions.plotOptions,e&&e.plotOptions),i.time=V(this.userOptions.time,e&&e.time);let o=G("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},M.body),r=this.renderTo.style.width,s=this.renderTo.style.height,l=i.exporting.sourceWidth||i.chart.width||/px$/.test(r)&&parseInt(r,10)||(i.isGantt?800:600),a=i.exporting.sourceHeight||i.chart.height||/px$/.test(s)&&parseInt(s,10)||400;W(i.chart,{animation:!1,renderTo:o,forExport:!0,renderer:"SVGRenderer",width:l,height:a}),i.exporting.enabled=!1,delete i.data,i.series=[],this.series.forEach(function(e){(n=V(e.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:e.visible})).isInternal||i.series.push(n)});let c={};this.axes.forEach(function(e){e.userOptions.internalKey||(e.userOptions.internalKey=K()),e.options.isInternal||(c[e.coll]||(c[e.coll]=!0,i[e.coll]=[]),i[e.coll].push(V(e.userOptions,{visible:e.visible,type:e.type,uniqueNames:e.uniqueNames})))}),i.colorAxis=this.userOptions.colorAxis;let p=new this.constructor(i,this.callback);return e&&["xAxis","yAxis","series"].forEach(function(t){let n={};e[t]&&(n[t]=e[t],p.update(n))}),this.axes.forEach(function(t){let n=R(p.axes,e=>e.options.internalKey===t.userOptions.internalKey);if(n){let i=t.getExtremes(),o=A(e?.[t.coll]||{})[0],r="min"in o?o.min:i.userMin,s="max"in o?o.max:i.userMax;(void 0!==r&&r!==n.min||void 0!==s&&s!==n.max)&&n.setExtremes(r??void 0,s??void 0,!0,!1)}}),t=p.getChartHTML(this.styledMode||i.exporting?.applyStyleSheets),j(this,"getSVG",{chartCopy:p}),t=this.sanitizeSVG(t,i),i=null,p.destroy(),I(o),t}function v(e,t){let n=this.options.exporting;return this.getSVG(V({chart:{borderRadius:0}},n.chartOptions,t,{exporting:{sourceWidth:e&&e.sourceWidth||n.sourceWidth,sourceHeight:e&&e.sourceHeight||n.sourceHeight}}))}function w(){let t;let r=e.inlineAllowlist,s={},l=M.createElement("iframe");D(l,{width:"1px",height:"1px",visibility:"hidden"}),M.body.appendChild(l);let a=l.contentWindow&&l.contentWindow.document;a&&a.body.appendChild(a.createElementNS(k,"svg")),function e(l){let c,p,u,d,g,f;let m={};if(a&&1===l.nodeType&&-1===o.indexOf(l.nodeName)){if(c=H.getComputedStyle(l,null),p="svg"===l.nodeName?{}:H.getComputedStyle(l.parentNode,null),!s[l.nodeName]){t=a.getElementsByTagName("svg")[0],u=a.createElementNS(l.namespaceURI,l.nodeName),t.appendChild(u);let e=H.getComputedStyle(u,null),n={};for(let t in e)t.length<1e3&&"string"==typeof e[t]&&!/^\d+$/.test(t)&&(n[t]=e[t]);s[l.nodeName]=n,"text"===l.nodeName&&delete s.text.fill,t.removeChild(u)}for(let e in c)(h().isFirefox||h().isMS||h().isSafari||Object.hasOwnProperty.call(c,e))&&function(e,t){if(d=g=!1,r.length){for(f=r.length;f--&&!g;)g=r[f].test(t);d=!g}for("transform"===t&&"none"===e&&(d=!0),f=n.length;f--&&!d;){if(t.length>1e3)throw Error("Input too long");d=n[f].test(t)||"function"==typeof e}!d&&(p[t]!==e||"svg"===l.nodeName)&&s[l.nodeName][t]!==e&&(i&&-1===i.indexOf(t)?m[t]=e:e&&l.setAttribute(t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),e))}(c[e],e);if(D(l,m),"svg"===l.nodeName&&l.setAttribute("stroke-width","1px"),"text"===l.nodeName)return;[].forEach.call(l.children||l.childNodes,e)}}(this.container.querySelector("svg")),t.parentNode.removeChild(t),l.parentNode.removeChild(l)}function S(e){let{scrollablePlotArea:t}=this;(t?[t.fixedDiv,t.scrollingContainer]:[this.container]).forEach(function(t){e.appendChild(t)})}function C(){let e=this,t=(t,n,i)=>{e.isDirtyExporting=!0,V(!0,e.options[t],n),z(i,!0)&&e.redraw()};e.exporting={update:function(e,n){t("exporting",e,n)}},g.compose(e).navigation.addUpdate((e,n)=>{t("navigation",e,n)})}function T({alignTo:e,key:t,textPxLength:n}){let i=this.options.exporting,{align:o,buttonSpacing:r=0,verticalAlign:s,width:l=0}=V(this.options.navigation?.buttonOptions,i?.buttons?.contextButton),a=e.width-n,c=l+r;(i?.enabled??!0)&&"title"===t&&"right"===o&&"top"===s&&a<2*c&&(a{H.focus(),H.print(),h().isSafari||setTimeout(()=>{e.afterPrint()},1e3)},1))}function B(){let e=this,t=e.options.exporting,n=t.buttons,i=e.isDirtyExporting||!e.exportSVGElements;e.buttonOffset=0,e.isDirtyExporting&&e.destroyExport(),i&&!1!==t.enabled&&(e.exportEvents=[],e.exportingGroup=e.exportingGroup||e.renderer.g("exporting-group").attr({zIndex:3}).add(),$(n,function(t){e.addButton(t)}),e.isDirtyExporting=!1)}function J(e,t){let n=e.indexOf("")+6,i=e.substr(n);return e=e.substr(0,n),t&&t.exporting&&t.exporting.allowHTML&&i&&(i=''+i.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"",e=e.replace("",i+"")),e=e.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery\d+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|")\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/(()=>{"use strict";let t,e;var i,s,o,r,a,n,h,l,d,c,p,g,u,f,m,x,y,b={};b.d=(t,e)=>{for(var i in e)b.o(e,i)&&!b.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},b.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var v={};b.d(v,{default:()=>lb}),function(t){t.SVG_NS="http://www.w3.org/2000/svg",t.product="Highcharts",t.version="12.1.2",t.win="undefined"!=typeof window?window:{},t.doc=t.win.document,t.svg=t.doc&&t.doc.createElementNS&&!!t.doc.createElementNS(t.SVG_NS,"svg").createSVGRect,t.pageLang=t.doc?.documentElement?.closest("[lang]")?.lang,t.userAgent=t.win.navigator&&t.win.navigator.userAgent||"",t.isChrome=t.win.chrome,t.isFirefox=-1!==t.userAgent.indexOf("Firefox"),t.isMS=/(edge|msie|trident)/i.test(t.userAgent)&&!t.win.opera,t.isSafari=!t.isChrome&&-1!==t.userAgent.indexOf("Safari"),t.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(t.userAgent),t.isWebKit=-1!==t.userAgent.indexOf("AppleWebKit"),t.deg2rad=2*Math.PI/360,t.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],t.noop=function(){},t.supportsPassiveEvents=function(){let e=!1;if(!t.isMS){let i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.win.addEventListener&&t.win.removeEventListener&&(t.win.addEventListener("testPassive",t.noop,i),t.win.removeEventListener("testPassive",t.noop,i))}return e}(),t.charts=[],t.composed=[],t.dateFormats={},t.seriesTypes={},t.symbolSizes={},t.chartCount=0}(i||(i={}));let k=i,{charts:w,doc:M,win:S}=k;function T(t,e,i,s){let o=e?"Highcharts error":"Highcharts warning";32===t&&(t=`${o}: Deprecated member`);let r=I(t),a=r?`${o} #${t}: www.highcharts.com/errors/${t}/`:t.toString();if(void 0!==s){let t="";r&&(a+="?"),G(s,function(e,i){t+=` + - ${i}: ${e}`,r&&(a+=encodeURI(i)+"="+encodeURI(e))}),a+=t}j(k,"displayError",{chart:i,code:t,message:a,params:s},function(){if(e)throw Error(a);S.console&&-1===T.messages.indexOf(a)&&console.warn(a)}),T.messages.push(a)}function C(t,e){return parseInt(t,e||10)}function A(t){return"string"==typeof t}function P(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function L(t,e){return!!t&&"object"==typeof t&&(!e||!P(t))}function O(t){return L(t)&&"number"==typeof t.nodeType}function E(t){let e=t&&t.constructor;return!!(L(t,!0)&&!O(t)&&e&&e.name&&"Object"!==e.name)}function I(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function D(t){return null!=t}function B(t,e,i){let s;let o=A(e)&&!D(i),r=(e,i)=>{D(e)?t.setAttribute(i,e):o?(s=t.getAttribute(i))||"class"!==i||(s=t.getAttribute(i+"Name")):t.removeAttribute(i)};return A(e)?r(i,e):G(e,r),s}function N(t){return P(t)?t:[t]}function z(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function R(){let t=arguments,e=t.length;for(let i=0;i1e14?t:parseFloat(t.toPrecision(e||14))}(T||(T={})).messages=[],Math.easeInOutSine=function(t){return -.5*(Math.cos(Math.PI*t)-1)};let F=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i;let s=t.length;for(i=0;it.order-e.order),s.forEach(e=>{!1===e.fn.call(t,i)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(t,i)}let U=function(){let e=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(t?"":e)+i++}}();S.jQuery&&(S.jQuery.fn.highcharts=function(){let t=[].slice.call(arguments);if(this[0])return t[0]?(new k[A(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):w[B(this[0],"data-highcharts-chart")]});let $={addEvent:function(t,e,i,s={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents;k.Point&&t instanceof k.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let a=t.addEventListener;a&&a.call(t,e,i,!!k.supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),r[e]||(r[e]=[]);let n={fn:i,order:"number"==typeof s.order?s.order:1/0};return r[e].push(n),r[e].sort((t,e)=>t.order-e.order),function(){Y(t,e,i)}},arrayMax:function(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i},arrayMin:function(t){let e=t.length,i=t[0];for(;e--;)t[e]e?t-1&&o[h]){i=N(i),r[h]=[];for(let e=0;e({center:.5,right:1,middle:.5,bottom:1})[t]||0,getClosestDistance:function(t,e){let i,s,o,r;let a=!e;return t.forEach(t=>{if(t.length>1)for(r=s=t.length-1;r>0;r--)(o=t[r]-t[r-1])<0&&!a?(e?.(),e=void 0):o&&(void 0===i||o=i-1&&(i=Math.floor(s)),Math.max(0,i-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));let r=S.getComputedStyle(e,void 0);return r&&(o=r.getPropertyValue(i),R(s,"opacity"!==i)&&(o=C(o))),o},insertItem:function(t,e){let i;let s=t.options.index,o=e.length;for(i=t.options.isInternal?o:0;i=t))&&(o||!(n<=(e[r]+(e[r+1]||e[r]))/2)));r++);return X(a*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:G,offset:function(t){let e=M.documentElement,i=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(S.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(S.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:i.width,height:i.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:R,pInt:C,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:Y,replaceNested:function(t,...e){let i,s;do for(s of(i=t,e))t=t.replace(s[0],s[1]);while(t!==i);return t},splat:N,stableSort:function(t,e){let i,s;let o=t.length;for(s=0;s0?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(t){return A(t)?t.substring(0,1).toUpperCase()+t.substring(1):String(t)},uniqueKey:U,useSerialIds:function(e){return t=R(e,t)},wrap:function(t,e,i){let s=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return s.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}},{pageLang:V,win:_}=k,{defined:q,error:Z,extend:K,isNumber:J,isObject:Q,isString:tt,merge:te,objectEach:ti,pad:ts,splat:to,timeUnits:tr,ucfirst:ta}=$,tn=k.isSafari&&_.Intl&&!_.Intl.DateTimeFormat.prototype.formatRange,th=t=>void 0===t.main,tl=t=>["D","L","M","X","J","V","S"].indexOf(t),td=class{constructor(t){this.options={timezone:"UTC"},this.variableTimezone=!1,this.Date=_.Date,this.update(t)}update(t={}){this.dTLCache={},this.options=t=te(!0,this.options,t);let{timezoneOffset:e,useUTC:i}=t;this.Date=t.Date||_.Date||Date;let s=t.timezone;q(i)&&(s=i?"UTC":void 0),e&&e%60==0&&(s="Etc/GMT"+(e>0?"+":"")+e/60),this.variableTimezone="UTC"!==s&&s?.indexOf("Etc/GMT")!==0,this.timezone=s,["months","shortMonths","weekdays","shortWeekdays"].forEach(t=>{let e=/months/i.test(t),i=/short/.test(t),s={timeZone:"UTC"};s[e?"month":"weekday"]=i?"short":"long",this[t]=(e?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(t=>this.dateFormat(s,(e?31:1)*24*36e5*t))})}toParts(t){let[e,i,s,o,r,a,n]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},t,"es").split(/(?:, |\/|:)/g);return[o,+s-1,i,r,a,n,Math.floor(Number(t)||0)%1e3,tl(e)].map(Number)}dateTimeFormat(t,e,i=this.options.locale||V){let s=JSON.stringify(t)+i;tt(t)&&(t=this.str2dtf(t));let o=this.dTLCache[s];if(!o){t.timeZone??(t.timeZone=this.timezone);try{o=new Intl.DateTimeFormat(i,t)}catch(e){/Invalid time zone/i.test(e.message)?(Z(34),t.timeZone="UTC",o=new Intl.DateTimeFormat(i,t)):Z(e.message,!1)}}return this.dTLCache[s]=o,o?.format(e)||""}str2dtf(t,e={}){let i={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(i).forEach(s=>{-1!==t.indexOf(s)&&K(e,i[s])}),e}makeTime(t,e,i=1,s=0,o,r,a){let n=this.Date.UTC(t,e,i,s,o||0,r||0,a||0);if("UTC"!==this.timezone){let t=this.getTimezoneOffset(n);if(n+=t,-1!==[2,3,8,9,10,11].indexOf(e)&&(s<5||s>20)){let e=this.getTimezoneOffset(n);t!==e?n+=e-t:t-36e5!==this.getTimezoneOffset(n-36e5)||tn||(n-=36e5)}}return n}parse(t){if(!tt(t))return t??void 0;let e=(t=t.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(t),i=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(t);e||i||(t+="Z");let s=Date.parse(t);if(J(s))return s+(!e||i?this.getTimezoneOffset(s):0)}getTimezoneOffset(t){if("UTC"!==this.timezone){let[e,i,s,o,r=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},t,"en").split(/(GMT|:)/).map(Number),a=-(36e5*(s+r/60));if(J(a))return a}return 0}dateFormat(t,e,i){let s=k.defaultOptions?.lang;if(!q(e)||isNaN(e))return s?.invalidDate||"";if(tt(t=t??"%Y-%m-%d %H:%M:%S")){let i;let s=/%\[([a-zA-Z]+)\]/g;for(;i=s.exec(t);)t=t.replace(i[0],this.dateTimeFormat(i[1],e))}if(tt(t)&&-1!==t.indexOf("%")){let i=this,[o,r,a,n,h,l,d,c]=this.toParts(e),p=s?.weekdays||this.weekdays,g=s?.shortWeekdays||this.shortWeekdays,u=s?.months||this.months,f=s?.shortMonths||this.shortMonths;ti(K({a:g?g[c]:p[c].substr(0,3),A:p[c],d:ts(a),e:ts(a,2," "),w:c,b:f[r],B:u[r],m:ts(r+1),o:r+1,y:o.toString().substr(2,2),Y:o,H:ts(n),k:n,I:ts(n%12||12),l:n%12||12,M:ts(h),p:n<12?"AM":"PM",P:n<12?"am":"pm",S:ts(l),L:ts(d,3)},k.dateFormats),function(s,o){if(tt(t))for(;-1!==t.indexOf("%"+o);)t=t.replace("%"+o,"function"==typeof s?s.call(i,e):s)})}else if(Q(t)){let i=(this.getTimezoneOffset(e)||0)/36e5,s=this.timezone||"Etc/GMT"+(i>=0?"+":"")+i,{prefix:o="",suffix:r=""}=t;t=o+this.dateTimeFormat(K({timeZone:s},t),e)+r}return i?ta(t):t}resolveDTLFormat(t){return Q(t,!0)?Q(t,!0)&&th(t)?{main:t}:t:{main:(t=to(t))[0],from:t[1],to:t[2]}}getTimeTicks(t,e,i,s){let o=this,r=[],a={},{count:n=1,unitRange:h}=t,[l,d,c,p,g,u]=o.toParts(e),f=(e||0)%1e3,m;if(s??(s=1),q(e)){if(f=h>=tr.second?0:n*Math.floor(f/n),h>=tr.second&&(u=h>=tr.minute?0:n*Math.floor(u/n)),h>=tr.minute&&(g=h>=tr.hour?0:n*Math.floor(g/n)),h>=tr.hour&&(p=h>=tr.day?0:n*Math.floor(p/n)),h>=tr.day&&(c=h>=tr.month?1:Math.max(1,n*Math.floor(c/n))),h>=tr.month&&(d=h>=tr.year?0:n*Math.floor(d/n)),h>=tr.year&&(l-=l%n),h===tr.week){n&&(e=o.makeTime(l,d,c,p,g,u,f));let t=tl(this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},e,"es"));c+=-t+s+(t4*tr.month||o.getTimezoneOffset(e)!==o.getTimezoneOffset(i));let t=e,x=1;for(;t1?t=o.makeTime(l,d,c,p+x*n):t+=h*n,x++;r.push(t),h<=tr.hour&&r.length<1e4&&r.forEach(t=>{t%18e5==0&&"000000000"===o.dateFormat("%H%M%S%L",t)&&(a[t]="day")})}return r.info=K(t,{higherRanks:a,totalRange:h*n}),r}getDateFormat(t,e,i,s){let o=this.dateFormat("%m-%d %H:%M:%S.%L",e),r="01-01 00:00:00.000",a={millisecond:15,second:12,minute:9,hour:6,day:3},n="millisecond",h=n;for(n in tr){if(t===tr.week&&+this.dateFormat("%w",e)===i&&o.substr(6)===r.substr(6)){n="week";break}if(tr[n]>t){n=h;break}if(a[n]&&o.substr(a[n])!==r.substr(a[n]))break;"week"!==n&&(h=n)}return this.resolveDTLFormat(s[n]).main}},{isTouchDevice:tc}=k,{fireEvent:tp,merge:tg}=$,tu={colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{locale:void 0,loading:"Loading...",months:void 0,shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:t=>Math.sqrt(1-Math.pow(t-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"Week from %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:tc?25:10,headerFormat:'{ucfirst point.key}
    ',pointFormat:'● {series.name}: {point.y}
    ',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}},tf=new td(tu.time),tm={defaultOptions:tu,defaultTime:tf,getOptions:function(){return tu},setOptions:function(t){return tp(k,"setOptions",{options:t}),tg(!0,tu,t),t.time&&tf.update(tu.time),t.lang&&"locale"in t.lang&&tf.update({locale:t.lang.locale}),tu}},{isNumber:tx,merge:ty,pInt:tb,defined:tv}=$;class tk{static parse(t){return t?new tk(t):tk.None}constructor(t){let e,i,s,o;this.rgba=[NaN,NaN,NaN,NaN],this.input=t;let r=k.Color;if(r&&r!==tk)return new r(t);if("object"==typeof t&&void 0!==t.stops)this.stops=t.stops.map(t=>new tk(t[1]));else if("string"==typeof t)for(this.input=t=tk.names[t.toLowerCase()]||t,s=tk.parsers.length;s--&&!i;)(e=(o=tk.parsers[s]).regex.exec(t))&&(i=o.parse(e));i&&(this.rgba=i)}get(t){let e=this.input,i=this.rgba;if("object"==typeof e&&void 0!==this.stops){let i=ty(e);return i.stops=[].slice.call(i.stops),this.stops.forEach((e,s)=>{i.stops[s]=[i.stops[s][0],e.get(t)]}),i}return i&&tx(i[0])?"rgb"!==t&&(t||1!==i[3])?"a"===t?`${i[3]}`:"rgba("+i.join(",")+")":"rgb("+i[0]+","+i[1]+","+i[2]+")":e}brighten(t){let e=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(tx(t)&&0!==t)for(let i=0;i<3;i++)e[i]+=tb(255*t),e[i]<0&&(e[i]=0),e[i]>255&&(e[i]=255);return this}setOpacity(t){return this.rgba[3]=t,this}tweenTo(t,e){let i=this.rgba,s=t.rgba;if(!tx(i[0])||!tx(s[0]))return t.input||"none";let o=1!==s[3]||1!==i[3],r=(t,s)=>t+(i[s]-t)*(1-e),a=s.slice(0,3).map(r).map(Math.round);return o&&a.push(r(s[3],3)),(o?"rgba(":"rgb(")+a.join(",")+")"}}tk.names={white:"#ffffff",black:"#000000"},tk.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(t){return[tb(t[1]),tb(t[2]),tb(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(t){return[tb(t[1]),tb(t[2]),tb(t[3]),1]}},{regex:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?$/i,parse:function(t){return[tb(t[1]+t[1],16),tb(t[2]+t[2],16),tb(t[3]+t[3],16),tv(t[4])?tb(t[4]+t[4],16)/255:1]}},{regex:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?$/i,parse:function(t){return[tb(t[1],16),tb(t[2],16),tb(t[3],16),tv(t[4])?tb(t[4],16)/255:1]}}],tk.None=new tk("");let{parse:tw}=tk,{win:tM}=k,{isNumber:tS,objectEach:tT}=$;class tC{constructor(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}dSetter(){let t=this.paths,e=t&&t[0],i=t&&t[1],s=this.now||0,o=[];if(1!==s&&e&&i){if(e.length===i.length&&s<1)for(let t=0;t=n+this.startTime?(this.now=this.end,this.pos=1,this.update(),h[this.prop]=!0,i=!0,tT(h,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(r),e=!1):(this.pos=o.easing((s-this.startTime)/n),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e}initPath(t,e,i){let s=t.startX,o=t.endX,r=i.slice(),a=t.isArea,n=a?2:1,h=e&&i.length>e.length&&i.hasStackedCliffs,l,d,c,p,g=e&&e.slice();if(!g||h)return[r,r];function u(t,e){for(;t.length{let i=tN(t.options.animation);r=tE(e)&&tA(e.defer)?s.defer:Math.max(r,i.duration+i.defer),a=Math.min(s.duration,i.duration)}),t.renderer.forExport&&(r=0),{defer:Math.max(0,r-a),duration:Math.min(r,a)}},setAnimation:function(t,e){e.renderer.globalAnimation=tB(t,e.options.chart.animation,!0)},stop:tz},{SVG_NS:tW,win:tH}=k,{attr:tX,createElement:tF,css:tG,error:tY,isFunction:tj,isString:tU,objectEach:t$,splat:tV}=$,{trustedTypes:t_}=tH,tq=t_&&tj(t_.createPolicy)&&t_.createPolicy("highcharts",{createHTML:t=>t}),tZ=tq?tq.createHTML(""):"";class tK{static filterUserAttributes(t){return t$(t,(e,i)=>{let s=!0;-1===tK.allowedAttributes.indexOf(i)&&(s=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(s=tU(e)&&tK.allowedReferences.some(t=>0===e.indexOf(t))),s||(tY(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete t[i]),tU(e)&&t[i]&&(t[i]=e.replace(/{let i=e.split(":").map(t=>t.trim()),s=i.shift();return s&&i.length&&(t[s.replace(/-([a-z])/g,t=>t[1].toUpperCase())]=i.join(":")),t},{})}static setElementHTML(t,e){t.innerHTML=tK.emptyHTML,e&&new tK(e).addToDOM(t)}constructor(t){this.nodes="string"==typeof t?this.parseMarkup(t):t}addToDOM(t){return function t(e,i){let s;return tV(e).forEach(function(e){let o;let r=e.tagName,a=e.textContent?k.doc.createTextNode(e.textContent):void 0,n=tK.bypassHTMLFiltering;if(r){if("#text"===r)o=a;else if(-1!==tK.allowedTags.indexOf(r)||n){let s="svg"===r?tW:i.namespaceURI||tW,h=k.doc.createElementNS(s,r),l=e.attributes||{};t$(e,function(t,e){"tagName"!==e&&"attributes"!==e&&"children"!==e&&"style"!==e&&"textContent"!==e&&(l[e]=t)}),tX(h,n?l:tK.filterUserAttributes(l)),e.style&&tG(h,e.style),a&&h.appendChild(a),t(e.children||[],h),o=h}else tY(33,!1,void 0,{"Invalid tagName in config":r})}o&&i.appendChild(o),s=o}),s}(this.nodes,t)}parseMarkup(t){let e;let i=[];t=t.trim().replace(/ style=(["'])/g," data-style=$1");try{e=new DOMParser().parseFromString(tq?tq.createHTML(t):t,"text/html")}catch(t){}if(!e){let i=tF("div");i.innerHTML=t,e={body:i}}let s=(t,e)=>{let i=t.nodeName.toLowerCase(),o={tagName:i};"#text"===i&&(o.textContent=t.textContent||"");let r=t.attributes;if(r){let t={};[].forEach.call(r,e=>{"data-style"===e.name?o.style=tK.parseStyle(e.value):t[e.name]=e.value}),o.attributes=t}if(t.childNodes.length){let e=[];[].forEach.call(t.childNodes,t=>{s(t,e)}),e.length&&(o.children=e)}e.push(o)};return[].forEach.call(e.body.childNodes,t=>s(t,i)),i}}tK.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],tK.allowedReferences=["https://","http://","mailto:","/","../","./","#"],tK.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],tK.emptyHTML=tZ,tK.bypassHTMLFiltering=!1;let{defaultOptions:tJ,defaultTime:tQ}=tm,{pageLang:t0}=k,{extend:t1,getNestedProperty:t2,isArray:t3,isNumber:t5,isObject:t6,isString:t9,pick:t4,ucfirst:t8}=$,t7={add:(t,e)=>t+e,divide:(t,e)=>0!==e?t/e:"",eq:(t,e)=>t==e,each:function(t){let e=arguments[arguments.length-1];return!!t3(t)&&t.map((i,s)=>ei(e.body,t1(t6(i)?i:{"@this":i},{"@index":s,"@first":0===s,"@last":s===t.length-1}))).join("")},ge:(t,e)=>t>=e,gt:(t,e)=>t>e,if:t=>!!t,le:(t,e)=>t<=e,lt:(t,e)=>tt*e,ne:(t,e)=>t!=e,subtract:(t,e)=>t-e,ucfirst:t8,unless:t=>!t},et={},ee=t=>/^["'].+["']$/.test(t);function ei(t="",e,i){let s=/\{([\p{L}\d:\.,;\-\/<>\[\]%_@+"'’= #\(\)]+)\}/gu,o=/\(([\p{L}\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/gu,r=[],a=/f$/,n=/\.(\d)/,h=i?.options.lang||tJ.lang,l=i&&i.time||tQ,d=i&&i.numberFormatter||es,c=(t="")=>{let i;return"true"===t||"false"!==t&&((i=Number(t)).toString()===t?i:ee(t)?t.slice(1,-1):t2(t,e))},p,g,u=0,f;for(;null!==(p=s.exec(t));){let i=p,s=o.exec(p[1]);s&&(p=s,f=!0),g&&g.isBlock||(g={ctx:e,expression:p[1],find:p[0],isBlock:"#"===p[1].charAt(0),start:p.index,startInner:p.index+p[0].length,length:p[0].length});let a=(g.isBlock?i:p)[1].split(" ")[0].replace("#","");t7[a]&&(g.isBlock&&a===g.fn&&u++,g.fn||(g.fn=a));let n="else"===p[1];if(g.isBlock&&g.fn&&(p[1]===`/${g.fn}`||n)){if(u)!n&&u--;else{let e=g.startInner,i=t.substr(e,p.index-e);void 0===g.body?(g.body=i,g.startInner=p.index+p[0].length):g.elseBody=i,g.find+=i+p[0],n||(r.push(g),g=void 0)}}else g.isBlock||r.push(g);if(s&&!g?.isBlock)break}return r.forEach(s=>{let r,p;let{body:g,elseBody:u,expression:f,fn:m}=s;if(m){let t=[s],o=[],a=f.length,n=0,h;for(p=0;p<=a;p++){let t=f.charAt(p);h||'"'!==t&&"'"!==t?h===t&&(h=""):h=t,h||" "!==t&&p!==a||(o.push(f.substr(n,p-n)),n=p+1)}for(p=t7[m].length;p--;)t.unshift(c(o[p+1]));r=t7[m].apply(e,t),s.isBlock&&"boolean"==typeof r&&(r=ei(r?g:u,e,i))}else{let t=ee(f)?[f]:f.split(":");if(r=c(t.shift()||""),t.length&&"number"==typeof r){let e=t.join(":");if(a.test(e)){let t=parseInt((e.match(n)||["","-1"])[1],10);null!==r&&(r=d(r,t,h.decimalPoint,e.indexOf(",")>-1?h.thousandsSep:""))}else r=l.dateFormat(e,r)}o.lastIndex=0,o.test(s.find)&&t9(r)&&(r=`"${r}"`)}t=t.replace(s.find,t4(r,""))}),f?ei(t,e,i):t}function es(t,e,i,s){e=+e;let o,r,[a,n]=(t=+t||0).toString().split("e").map(Number),h=this?.options?.lang||tJ.lang,l=(t.toString().split(".")[1]||"").split("e")[0].length,d=e,c={};i??(i=h.decimalPoint),s??(s=h.thousandsSep),-1===e?e=Math.min(l,20):t5(e)?e&&n<0&&((r=e+n)>=0?(a=+a.toExponential(r).split("e")[0],e=r):(a=Math.floor(a),t=e<20?+(a*Math.pow(10,n)).toFixed(e):0,n=0)):e=2,n&&(e??(e=2),t=a),t5(e)&&e>=0&&(c.minimumFractionDigits=e,c.maximumFractionDigits=e),""===s&&(c.useGrouping=!1);let p=s||i,g=p?"en":this?.locale||h.locale||t0,u=JSON.stringify(c)+g;return o=(et[u]??(et[u]=new Intl.NumberFormat(g,c))).format(t),p&&(o=o.replace(/([,\.])/g,"_$1").replace(/_\,/g,s??",").replace("_.",i??".")),(e||0!=+o)&&(!(n<0)||d)||(o="0"),n&&0!=+o&&(o+="e"+(n<0?"":"+")+n),o}let eo={dateFormat:function(t,e,i){return tQ.dateFormat(t,e,i)},format:ei,helpers:t7,numberFormat:es};!function(t){let e;t.rendererTypes={},t.getRendererType=function(i=e){return t.rendererTypes[i]||t.rendererTypes[e]},t.registerRendererType=function(i,s,o){t.rendererTypes[i]=s,(!e||o)&&(e=i,k.Renderer=s)}}(s||(s={}));let er=s,{clamp:ea,pick:en,pushUnique:eh,stableSort:el}=$;(o||(o={})).distribute=function t(e,i,s){let o=e,r=o.reducedLen||i,a=(t,e)=>t.target-e.target,n=[],h=e.length,l=[],d=n.push,c,p,g,u=!0,f,m,x=0,y;for(c=h;c--;)x+=e[c].size;if(x>r){for(el(e,(t,e)=>(e.rank||0)-(t.rank||0)),g=(y=e[0].rank===e[e.length-1].rank)?h/2:-1,p=y?g:h-1;g&&x>r;)f=e[c=Math.floor(p)],eh(l,c)&&(x-=f.size),p+=g,y&&p>=e.length&&(g/=2,p=g);l.sort((t,e)=>e-t).forEach(t=>d.apply(n,e.splice(t,1)))}for(el(e,a),e=e.map(t=>({size:t.size,targets:[t.target],align:en(t.align,.5)}));u;){for(c=e.length;c--;)f=e[c],m=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=ea(m-f.size*f.align,0,i-f.size);for(c=e.length,u=!1;c--;)c>0&&e[c-1].pos+e[c-1].size>e[c].pos&&(e[c-1].size+=e[c].size,e[c-1].targets=e[c-1].targets.concat(e[c].targets),e[c-1].align=.5,e[c-1].pos+e[c-1].size>i&&(e[c-1].pos=i-e[c-1].size),e.splice(c,1),u=!0)}return d.apply(o,n),c=0,e.some(e=>{let r=0;return(e.targets||[]).some(()=>(o[c].pos=e.pos+r,void 0!==s&&Math.abs(o[c].pos-o[c].target)>s)?(o.slice(0,c+1).forEach(t=>delete t.pos),o.reducedLen=(o.reducedLen||i)-.1*i,o.reducedLen>.1*i&&t(o,i,s),!0):(r+=o[c].size,c++,!1))}),el(o,a),o};let ed=o,{animate:ec,animObject:ep,stop:eg}=tR,{deg2rad:eu,doc:ef,svg:em,SVG_NS:ex,win:ey,isFirefox:eb}=k,{addEvent:ev,attr:ek,createElement:ew,crisp:eM,css:eS,defined:eT,erase:eC,extend:eA,fireEvent:eP,getAlignFactor:eL,isArray:eO,isFunction:eE,isNumber:eI,isObject:eD,isString:eB,merge:eN,objectEach:ez,pick:eR,pInt:eW,pushUnique:eH,replaceNested:eX,syncTimeout:eF,uniqueKey:eG}=$;class eY{_defaultGetter(t){let e=eR(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0);return/^-?[\d\.]+$/.test(e)&&(e=parseFloat(e)),e}_defaultSetter(t,e,i){i.setAttribute(e,t)}add(t){let e;let i=this.renderer,s=this.element;return t&&(this.parentGroup=t),void 0!==this.textStr&&"text"===this.element.nodeName&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(s),this.onAdd&&this.onAdd(),this}addClass(t,e){let i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce(function(t,e){return -1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" "))!==i&&this.attr("class",t),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(t,e,i,s=!0){let o=this.renderer,r=o.alignedObjects,a=!!t;t?(this.alignOptions=t,this.alignByTranslate=e,this.alignTo=i):(t=this.alignOptions||{},e=this.alignByTranslate,i=this.alignTo);let n=!i||eB(i)?i||"renderer":void 0;n&&(a&&eH(r,this),i=void 0);let h=eR(i,o[n],o),l=(h.x||0)+(t.x||0)+((h.width||0)-(t.width||0))*eL(t.align),d=(h.y||0)+(t.y||0)+((h.height||0)-(t.height||0))*eL(t.verticalAlign),c={"text-align":t?.align};return c[e?"translateX":"x"]=Math.round(l),c[e?"translateY":"y"]=Math.round(d),s&&(this[this.placed?"animate":"attr"](c),this.placed=!0),this.alignAttr=c,this}alignSetter(t){let e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))}animate(t,e,i){let s=ep(eR(e,this.renderer.globalAnimation,!0)),o=s.defer;return ef.hidden&&(s.duration=0),0!==s.duration?(i&&(s.complete=i),eF(()=>{this.element&&ec(this,t,s)},o)):(this.attr(t,void 0,i||s.complete),ez(t,function(t,e){s.step&&s.step.call(this,t,{prop:e,pos:1,elem:this})},this)),this}applyTextOutline(t){let e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));let i=t.split(" "),s=i[i.length-1],o=i[0];if(o&&"none"!==o&&k.svg){this.fakeTS=!0,o=o.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*Number(e)+i}),this.removeTextOutline();let t=ef.createElementNS(ex,"tspan");ek(t,{class:"highcharts-text-outline",fill:s,stroke:s,"stroke-width":o,"stroke-linejoin":"round"});let i=e.querySelector("textPath")||e;[].forEach.call(i.childNodes,e=>{let i=e.cloneNode(!0);i.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(t=>i.removeAttribute(t)),t.appendChild(i)});let r=0;[].forEach.call(i.querySelectorAll("text tspan"),t=>{r+=Number(t.getAttribute("dy"))});let a=ef.createElementNS(ex,"tspan");a.textContent="​",ek(a,{x:Number(e.getAttribute("x")),dy:-r}),t.appendChild(a),i.insertBefore(t,i.firstChild)}}attr(t,e,i,s){let{element:o}=this,r=eY.symbolCustomAttribs,a,n,h=this,l;return"string"==typeof t&&void 0!==e&&(a=t,(t={})[a]=e),"string"==typeof t?h=(this[t+"Getter"]||this._defaultGetter).call(this,t,o):(ez(t,function(e,i){l=!1,s||eg(this,i),this.symbolName&&-1!==r.indexOf(i)&&(n||(this.symbolAttr(t),n=!0),l=!0),this.rotation&&("x"===i||"y"===i)&&(this.doTransform=!0),l||(this[i+"Setter"]||this._defaultSetter).call(this,e,i,o)},this),this.afterSetters()),i&&i.call(this),h}clip(t){if(t&&!t.clipPath){let e=eG()+"-",i=this.renderer.createElement("clipPath").attr({id:e}).add(this.renderer.defs);eA(t,{clipPath:i,id:e,count:0}),t.add(i)}return this.attr("clip-path",t?`url(${this.renderer.url}#${t.id})`:"none")}crisp(t,e){e=Math.round(e||t.strokeWidth||0);let i=t.x||this.x||0,s=t.y||this.y||0,o=(t.width||this.width||0)+i,r=(t.height||this.height||0)+s,a=eM(i,e),n=eM(s,e);return eA(t,{x:a,y:n,width:eM(o,e)-a,height:eM(r,e)-n}),eT(t.strokeWidth)&&(t.strokeWidth=e),t}complexColor(t,e,i){let s=this.renderer,o,r,a,n,h,l,d,c,p,g,u=[],f;eP(this.renderer,"complexColor",{args:arguments},function(){if(t.radialGradient?r="radialGradient":t.linearGradient&&(r="linearGradient"),r){if(a=t[r],h=s.gradients,l=t.stops,p=i.radialReference,eO(a)&&(t[r]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===r&&p&&!eT(a.gradientUnits)&&(n=a,a=eN(a,s.getRadialAttr(p,n),{gradientUnits:"userSpaceOnUse"})),ez(a,function(t,e){"id"!==e&&u.push(e,t)}),ez(l,function(t){u.push(t)}),h[u=u.join(",")])g=h[u].attr("id");else{a.id=g=eG();let t=h[u]=s.createElement(r).attr(a).add(s.defs);t.radAttr=n,t.stops=[],l.forEach(function(e){0===e[1].indexOf("rgba")?(d=(o=tk.parse(e[1])).get("rgb"),c=o.get("a")):(d=e[1],c=1);let i=s.createElement("stop").attr({offset:e[0],"stop-color":d,"stop-opacity":c}).add(t);t.stops.push(i)})}f="url("+s.url+"#"+g+")",i.setAttribute(e,f),i.gradient=u,t.toString=function(){return f}}})}css(t){let e=this.styles,i={},s=this.element,o,r=!e;if(e&&ez(t,function(t,s){e&&e[s]!==t&&(i[s]=t,r=!0)}),r){e&&(t=eA(e,i)),null===t.width||"auto"===t.width?delete this.textWidth:"text"===s.nodeName.toLowerCase()&&t.width&&(o=this.textWidth=eW(t.width)),eA(this.styles,t),o&&!em&&this.renderer.forExport&&delete t.width;let r=eb&&t.fontSize||null;r&&(eI(r)||/^\d+$/.test(r))&&(t.fontSize+="px");let a=eN(t);s.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","whiteSpace","width"].forEach(t=>a&&delete a[t]),a.color&&(a.fill=a.color)),eS(s,a)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t.textOutline&&this.applyTextOutline(t.textOutline)),this}dashstyleSetter(t){let e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){let s=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=s.length;e--;)s[e]=""+eW(s[e])*eR(i,NaN);t=s.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}}destroy(){let t=this,e=t.element||{},i=t.renderer,s=e.ownerSVGElement,o="SPAN"===e.nodeName&&t.parentGroup||void 0,r,a;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,eg(t),t.clipPath&&s){let e=t.clipPath;[].forEach.call(s.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){t.getAttribute("clip-path").indexOf(e.element.id)>-1&&t.removeAttribute("clip-path")}),t.clipPath=e.destroy()}if(t.connector=t.connector?.destroy(),t.stops){for(a=0;ae&&e.join?(i?t+" ":"")+e.join(" "):(e||"").toString(),"")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)}fillSetter(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)}hrefSetter(t,e,i){i.setAttributeNS("http://www.w3.org/1999/xlink",e,t)}getBBox(t,e){let i,s,o,r;let{alignValue:a,element:n,renderer:h,styles:l,textStr:d}=this,{cache:c,cacheKeys:p}=h,g=n.namespaceURI===this.SVG_NS,u=eR(e,this.rotation,0),f=h.styledMode?n&&eY.prototype.getStyle.call(n,"font-size"):l.fontSize;if(eT(d)&&(-1===(r=d.toString()).indexOf("<")&&(r=r.replace(/\d/g,"0")),r+=["",h.rootFontSize,f,u,this.textWidth,a,l.lineClamp,l.textOverflow,l.fontWeight].join(",")),r&&!t&&(i=c[r]),!i||i.polygon){if(g||h.forExport){try{o=this.fakeTS&&function(t){let e=n.querySelector(".highcharts-text-outline");e&&eS(e,{display:t})},eE(o)&&o("none"),i=n.getBBox?eA({},n.getBBox()):{width:n.offsetWidth,height:n.offsetHeight,x:0,y:0},eE(o)&&o("")}catch(t){}(!i||i.width<0)&&(i={x:0,y:0,width:0,height:0})}else i=this.htmlGetBBox();s=i.height,g&&(i.height=s=({"11px,17":14,"13px,20":16})[`${f||""},${Math.round(s)}`]||s),u&&(i=this.getRotatedBox(i,u));let t={bBox:i};eP(this,"afterGetBBox",t),i=t.bBox}if(r&&(""===d||i.height>0)){for(;p.length>250;)delete c[p.shift()];c[r]||p.push(r),c[r]=i}return i}getRotatedBox(t,e){let{x:i,y:s,width:o,height:r}=t,{alignValue:a,translateY:n,rotationOriginX:h=0,rotationOriginY:l=0}=this,d=eL(a),c=Number(this.element.getAttribute("y")||0)-(n?0:s),p=e*eu,g=(e-90)*eu,u=Math.cos(p),f=Math.sin(p),m=o*u,x=o*f,y=Math.cos(g),b=Math.sin(g),[[v,k],[w,M]]=[h,l].map(t=>[t-t*u,t*f]),S=i+d*(o-m)+v+M+c*y,T=S+m,C=T-r*y,A=C-m,P=s+c-d*x-k+w+c*b,L=P+x,O=L-r*b,E=O-x,I=Math.min(S,T,C,A),D=Math.min(P,L,O,E),B=Math.max(S,T,C,A)-I,N=Math.max(P,L,O,E)-D;return{x:I,y:D,width:B,height:N,polygon:[[S,P],[T,L],[C,O],[A,E]]}}getStyle(t){return ey.getComputedStyle(this.element||this,"").getPropertyValue(t)}hasClass(t){return -1!==(""+this.attr("class")).split(" ").indexOf(t)}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(t,e){this.onEvents={},this.opacity=1,this.SVG_NS=ex,this.element="span"===e||"body"===e?ew(e):ef.createElementNS(this.SVG_NS,e),this.renderer=t,this.styles={},eP(this,"afterInit")}on(t,e){let{onEvents:i}=this;return i[t]&&i[t](),i[t]=ev(this.element,t,e),this}opacitySetter(t,e,i){let s=Number(Number(t).toFixed(3));this.opacity=s,i.setAttribute(e,s)}reAlign(){this.alignOptions?.width&&"left"!==this.alignOptions.align&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(t){return this.attr("class",(""+this.attr("class")).replace(eB(t)?RegExp(`(^| )${t}( |$)`):t," ").replace(/ +/g," ").trim())}removeTextOutline(){let t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)}safeRemoveChild(t){let e=t.parentNode;e&&e.removeChild(t)}setRadialReference(t){let e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this}shadow(t){let{renderer:e}=this,i=eN(this.parentGroup?.rotation===90?{offsetX:-1,offsetY:-1}:{},eD(t)?t:{}),s=e.shadowDefinition(i);return this.attr({filter:t?`url(${e.url}#${s})`:"none"})}show(t=!0){return this.attr({visibility:t?"inherit":"visible"})}"stroke-widthSetter"(t,e,i){this[e]=t,i.setAttribute(e,t)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let t=this.getStyle("stroke-width"),e=0,i;return/px$/.test(t)?e=eW(t):""!==t&&(ek(i=ef.createElementNS(ex,"rect"),{width:t,"stroke-width":0}),this.element.parentNode.appendChild(i),e=i.getBBox().width,i.parentNode.removeChild(i)),e}symbolAttr(t){let e=this;eY.symbolCustomAttribs.forEach(function(i){e[i]=eR(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})}textSetter(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(t){let e=this.element,i=e.getElementsByTagName("title")[0]||ef.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=eX(eR(t,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let t=this.element;return t.parentNode.appendChild(t),this}translate(t,e){return this.attr({translateX:t,translateY:e})}updateTransform(t="transform"){let{element:e,matrix:i,rotation:s=0,rotationOriginX:o,rotationOriginY:r,scaleX:a,scaleY:n,translateX:h=0,translateY:l=0}=this,d=["translate("+h+","+l+")"];eT(i)&&d.push("matrix("+i.join(",")+")"),s&&(d.push("rotate("+s+" "+eR(o,e.getAttribute("x"),0)+" "+eR(r,e.getAttribute("y")||0)+")"),this.text?.element.tagName==="SPAN"&&this.text.attr({rotation:s,rotationOriginX:(o||0)-this.padding,rotationOriginY:(r||0)-this.padding})),(eT(a)||eT(n))&&d.push("scale("+eR(a,1)+" "+eR(n,1)+")"),d.length&&!(this.text||this).textPath&&e.setAttribute(t,d.join(" "))}visibilitySetter(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t}xGetter(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)}zIndexSetter(t,e){let i=this.renderer,s=this.parentGroup,o=(s||i).element||i.box,r=this.element,a=o===i.box,n,h,l,d=!1,c,p=this.added,g;if(eT(t)?(r.setAttribute("data-z-index",t),t=+t,this[e]===t&&(p=!1)):eT(this[e])&&r.removeAttribute("data-z-index"),this[e]=t,p){for((t=this.zIndex)&&s&&(s.handleZ=!0),g=(n=o.childNodes).length-1;g>=0&&!d;g--)c=!eT(l=(h=n[g]).getAttribute("data-z-index")),h!==r&&(t<0&&c&&!a&&!g?(o.insertBefore(r,n[g]),d=!0):(eW(l)<=t||c&&(!eT(t)||t>=0))&&(o.insertBefore(r,n[g+1]),d=!0));d||(o.insertBefore(r,n[a?3:0]),d=!0)}return d}}eY.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],eY.prototype.strokeSetter=eY.prototype.fillSetter,eY.prototype.yGetter=eY.prototype.xGetter,eY.prototype.matrixSetter=eY.prototype.rotationOriginXSetter=eY.prototype.rotationOriginYSetter=eY.prototype.rotationSetter=eY.prototype.scaleXSetter=eY.prototype.scaleYSetter=eY.prototype.translateXSetter=eY.prototype.translateYSetter=eY.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0};let ej=eY,{defined:eU,extend:e$,getAlignFactor:eV,isNumber:e_,merge:eq,pick:eZ,removeEvent:eK}=$;class eJ extends ej{constructor(t,e,i,s,o,r,a,n,h,l){let d;super(t,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=e,this.x=i,this.y=s,this.anchorX=r,this.anchorY=a,this.baseline=h,this.className=l,this.addClass("button"===l?"highcharts-no-tooltip":"highcharts-label"),l&&this.addClass("highcharts-"+l),this.text=t.text(void 0,0,0,n).attr({zIndex:1}),"string"==typeof o&&((d=/^url\((.*?)\)$/.test(o))||this.renderer.symbols[o])&&(this.symbolKey=o),this.bBox=eJ.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=t.styledMode||d,this.deferredAttr={},this.alignFactor=0}alignSetter(t){let e=eV(t);this.textAlign=t,e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&e_(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)}boxAttr(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e}css(t){if(t){let e={};t=eq(t),eJ.textProps.forEach(i=>{void 0!==t[i]&&(e[i]=t[i],delete t[i])}),this.text.css(e),"fontSize"in e||"fontWeight"in e?this.updateTextPadding():("width"in e||"textOverflow"in e)&&this.updateBoxSize()}return ej.prototype.css.call(this,t)}destroy(){eK(this.element,"mouseenter"),eK(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),ej.prototype.destroy.call(this)}fillSetter(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)}getBBox(t,e){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();let{padding:i,height:s=0,translateX:o=0,translateY:r=0,width:a=0}=this,n=eZ(this.paddingLeft,i),h=e??(this.rotation||0),l={width:a,height:s,x:o+this.bBox.x-n,y:r+this.bBox.y-i+this.baselineOffset};return h&&(l=this.getRotatedBox(l,h)),l}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(t){this.heightSetting=t,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:eZ(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&eU(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(t,e){e_(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0}rSetter(t,e){this.boxAttr(e,t)}strokeSetter(t,e){this.stroke=t,this.boxAttr(e,t)}"stroke-widthSetter"(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)}"text-alignSetter"(t){this.textAlign=this["text-align"]=t,this.updateTextPadding()}textSetter(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let t;let e=this.text,i={},s=this.padding,o=this.bBox=(!e_(this.widthSetting)||!e_(this.heightSetting)||this.textAlign)&&eU(e.textStr)?e.getBBox(void 0,0):eJ.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||o.height||0)+2*s;let r=this.renderer.fontMetrics(e);if(this.baselineOffset=s+Math.min((this.text.firstLineMetrics||r).b,o.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-r.h)/2),this.needsBox&&!e.textPath){if(!this.box){let t=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();t.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),t.add(this)}t=this.getCrispAdjust(),i.x=t,i.y=(this.baseline?-this.baselineOffset:0)+t,i.width=Math.round(this.width),i.height=Math.round(this.height),this.box.attr(e$(i,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let t=this.text,e=t.styles.textAlign||this.textAlign;if(!t.textPath){this.updateBoxSize();let i=this.baseline?0:this.baselineOffset,s=(this.paddingLeft??this.padding)+eV(e)*(this.widthSetting??this.bBox.width);(s!==t.x||i!==t.y)&&(t.attr({align:e,x:s}),void 0!==i&&t.attr("y",i)),t.x=s,t.y=i}}widthSetter(t){this.widthSetting=e_(t)?t:void 0,this.doUpdate=!0}getPaddedWidth(){let t=this.padding,e=eZ(this.paddingLeft,t),i=eZ(this.paddingRight,t);return(this.widthSetting||this.bBox.width||0)+e+i}xSetter(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)}ySetter(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)}}eJ.emptyBBox={width:0,height:0,x:0,y:0},eJ.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineClamp","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"];let{defined:eQ,isNumber:e0,pick:e1}=$;function e2(t,e,i,s,o){let r=[];if(o){let a=o.start||0,n=e1(o.r,i),h=e1(o.r,s||i),l=2e-4/(o.borderRadius?1:Math.max(n,1)),d=Math.abs((o.end||0)-a-2*Math.PI)0&&h0)return l;if(t+n>i-a){if(h>e+a&&he+a&&h0){let i=hs&&na&&l.splice(1,1,["L",n-6,e],["L",n,e-6],["L",n+6,e],["L",i-r,e]);return l},circle:function(t,e,i,s){return e2(t+i/2,e+s/2,i/2,s/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(t,e,i,s){return[["M",t+i/2,e],["L",t+i,e+s/2],["L",t+i/2,e+s],["L",t,e+s/2],["Z"]]},rect:e3,roundedRect:e5,square:e3,triangle:function(t,e,i,s){return[["M",t+i/2,e],["L",t+i,e+s],["L",t,e+s],["Z"]]},"triangle-down":function(t,e,i,s){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+s],["Z"]]}},{doc:e9,SVG_NS:e4,win:e8}=k,{attr:e7,extend:it,fireEvent:ie,isString:ii,objectEach:is,pick:io}=$,ir=(t,e)=>t.substring(0,e)+"…",ia=class{constructor(t){let e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!!(e&&"ellipsis"===e.textOverflow),this.lineClamp=e?.lineClamp,this.noWrap=!!(e&&"nowrap"===e.whiteSpace)}buildSVG(){let t=this.svgElement,e=t.element,i=t.renderer,s=io(t.textStr,"").toString(),o=-1!==s.indexOf("<"),r=e.childNodes,a=!t.added&&i.box,n=[s,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,t.getStyle("font-size"),t.styles.lineClamp,this.width].join(",");if(n!==t.textCache){t.textCache=n,delete t.actualWidth;for(let t=r.length;t--;)e.removeChild(r[t]);if(o||this.ellipsis||this.width||t.textPath||-1!==s.indexOf(" ")&&(!this.noWrap||//g.test(s))){if(""!==s){a&&a.appendChild(e);let i=new tK(s);this.modifyTree(i.nodes),i.addToDOM(e),this.modifyDOM(),this.ellipsis&&-1!==(e.textContent||"").indexOf("…")&&t.attr("title",this.unescapeEntities(t.textStr||"",["<",">"])),a&&a.removeChild(e)}}else e.appendChild(e9.createTextNode(this.unescapeEntities(s)));ii(this.textOutline)&&t.applyTextOutline&&t.applyTextOutline(this.textOutline)}}modifyDOM(){let t;let e=this.svgElement,i=e7(e.element,"x");for(e.firstLineMetrics=void 0;t=e.element.firstChild;)if(/^[\s\u200B]*$/.test(t.textContent||" "))e.element.removeChild(t);else break;[].forEach.call(e.element.querySelectorAll("tspan.highcharts-br"),(t,s)=>{t.nextSibling&&t.previousSibling&&(0===s&&1===t.previousSibling.nodeType&&(e.firstLineMetrics=e.renderer.fontMetrics(t.previousSibling)),e7(t,{dy:this.getLineHeight(t.nextSibling),x:i}))});let s=this.width||0;if(!s)return;let o=(t,o)=>{let r=t.textContent||"",a=r.replace(/([^\^])-/g,"$1- ").split(" "),n=!this.noWrap&&(a.length>1||e.element.childNodes.length>1),h=this.getLineHeight(o),l=Math.max(0,s-.8*h),d=0,c=e.actualWidth;if(n){let r=[],n=[];for(;o.firstChild&&o.firstChild!==t;)n.push(o.firstChild),o.removeChild(o.firstChild);for(;a.length;)if(a.length&&!this.noWrap&&d>0&&(r.push(t.textContent||""),t.textContent=a.join(" ").replace(/- /g,"-")),this.truncate(t,void 0,a,0===d&&c||0,s,l,(t,e)=>a.slice(0,e).join(" ").replace(/- /g,"-")),c=e.actualWidth,d++,this.lineClamp&&d>=this.lineClamp){a.length&&(this.truncate(t,t.textContent||"",void 0,0,s,l,ir),t.textContent=t.textContent?.replace("…","")+"…");break}n.forEach(e=>{o.insertBefore(e,t)}),r.forEach(e=>{o.insertBefore(e9.createTextNode(e),t);let s=e9.createElementNS(e4,"tspan");s.textContent="​",e7(s,{dy:h,x:i}),o.insertBefore(s,t)})}else this.ellipsis&&r&&this.truncate(t,r,void 0,0,s,l,ir)},r=t=>{[].slice.call(t.childNodes).forEach(i=>{i.nodeType===e8.Node.TEXT_NODE?o(i,t):(-1!==i.className.baseVal.indexOf("highcharts-br")&&(e.actualWidth=0),r(i))})};r(e.element)}getLineHeight(t){let e=t.nodeType===e8.Node.TEXT_NODE?t.parentElement:t;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h}modifyTree(t){let e=(i,s)=>{let{attributes:o={},children:r,style:a={},tagName:n}=i,h=this.renderer.styledMode;if("b"===n||"strong"===n?h?o.class="highcharts-strong":a.fontWeight="bold":("i"===n||"em"===n)&&(h?o.class="highcharts-emphasized":a.fontStyle="italic"),a&&a.color&&(a.fill=a.color),"br"===n){o.class="highcharts-br",i.textContent="​";let e=t[s+1];e&&e.textContent&&(e.textContent=e.textContent.replace(/^ +/gm,""))}else"a"===n&&r&&r.some(t=>"#text"===t.tagName)&&(i.children=[{children:r,tagName:"tspan"}]);"#text"!==n&&"a"!==n&&(i.tagName="tspan"),it(i,{attributes:o,style:a}),r&&r.filter(t=>"#text"!==t.tagName).forEach(e)};t.forEach(e),ie(this.svgElement,"afterModifyTree",{nodes:t})}truncate(t,e,i,s,o,r,a){let n,h;let l=this.svgElement,{rotation:d}=l,c=[],p=i&&!s?1:0,g=(e||i||"").length,u=g;i||(o=r);let f=function(e,o){let r=o||e,a=t.parentNode;if(a&&void 0===c[r]&&a.getSubStringLength)try{c[r]=s+a.getSubStringLength(0,i?r+1:r)}catch(t){}return c[r]};if(l.rotation=0,s+(h=f(t.textContent.length))>o){for(;p<=g;)u=Math.ceil((p+g)/2),i&&(n=a(i,u)),h=f(u,n&&n.length-1),p===g?p=g+1:h>o?g=u-1:p=u;0===g?t.textContent="":e&&g===e.length-1||(t.textContent=n||a(e||i,u)),this.ellipsis&&h>o&&this.truncate(t,t.textContent||"",void 0,0,o,r,ir)}i&&i.splice(0,u),l.actualWidth=h,l.rotation=d}unescapeEntities(t,e){return is(this.renderer.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(RegExp(i,"g"),s))}),t}},{defaultOptions:ih}=tm,{charts:il,deg2rad:id,doc:ic,isFirefox:ip,isMS:ig,isWebKit:iu,noop:im,SVG_NS:ix,symbolSizes:iy,win:ib}=k,{addEvent:iv,attr:ik,createElement:iw,crisp:iM,css:iS,defined:iT,destroyObjectProperties:iC,extend:iA,isArray:iP,isNumber:iL,isObject:iO,isString:iE,merge:iI,pick:iD,pInt:iB,replaceNested:iN,uniqueKey:iz}=$;class iR{constructor(t,e,i,s,o,r,a){let n,h;let l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),d=l.element;a||l.css(this.getStyle(s||{})),t.appendChild(d),ik(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&ik(d,"xmlns",this.SVG_NS),this.box=d,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(ic.createTextNode("Created with Highcharts 12.1.2")),this.defs=this.createElement("defs").add(),this.allowHTML=r,this.forExport=o,this.styledMode=a,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=l.getStyle("font-size"),this.setSize(e,i,!1),ip&&t.getBoundingClientRect&&((n=function(){iS(t,{left:0,top:0}),h=t.getBoundingClientRect(),iS(t,{left:Math.ceil(h.left)-h.left+"px",top:Math.ceil(h.top)-h.top+"px"})})(),this.unSubPixelFix=iv(ib,"resize",n))}definition(t){return new tK([t]).addToDOM(this.defs.element)}getReferenceURL(){if((ip||iu)&&ic.getElementsByTagName("base").length){if(!iT(e)){let t=iz(),i=new tK([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:t},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${t})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(ic.body);iS(i,{position:"fixed",top:0,left:0,zIndex:9e5});let s=ic.elementFromPoint(6,6);e="hitme"===(s&&s.id),ic.body.removeChild(i)}if(e)return iN(ib.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(t){return this.style=iA({fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif',fontSize:"1rem"},t),this.style}setStyle(t){this.boxWrapper.css(this.getStyle(t))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),iC(this.gradients||{}),this.gradients=null,this.defs=t.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(t){return new this.Element(this,t)}getRadialAttr(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}}shadowDefinition(t){let e=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(t).map(e=>`${e}-${t[e]}`)].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),i=iI({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t);return this.defs.element.querySelector(`#${e}`)||this.definition({tagName:"filter",attributes:{id:e,filterUnits:i.filterUnits},children:this.getShadowFilterContent(i)}),e}getShadowFilterContent(t){return[{tagName:"feDropShadow",attributes:{dx:t.offsetX,dy:t.offsetY,"flood-color":t.color,"flood-opacity":Math.min(5*t.opacity,1),stdDeviation:t.width/2}}]}buildText(t){new ia(t).buildSVG()}getContrast(t){let e=tk.parse(t).rgba.map(t=>{let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}),i=.2126*e[0]+.7152*e[1]+.0722*e[2];return 1.05/(i+.05)>(i+.05)/.05?"#FFFFFF":"#000000"}button(t,e,i,s,o={},r,a,n,h,l){let d=this.label(t,e,i,h,void 0,void 0,l,void 0,"button"),c=this.styledMode,p=arguments,g=0;o=iI(ih.global.buttonTheme,o),c&&(delete o.fill,delete o.stroke,delete o["stroke-width"]);let u=o.states||{},f=o.style||{};delete o.states,delete o.style;let m=[tK.filterUserAttributes(o)],x=[f];return c||["hover","select","disabled"].forEach((t,e)=>{m.push(iI(m[0],tK.filterUserAttributes(p[e+5]||u[t]||{}))),x.push(m[e+1].style),delete m[e+1].style}),iv(d.element,ig?"mouseover":"mouseenter",function(){3!==g&&d.setState(1)}),iv(d.element,ig?"mouseout":"mouseleave",function(){3!==g&&d.setState(g)}),d.setState=(t=0)=>{if(1!==t&&(d.state=g=t),d.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t]),!c){d.attr(m[t]);let e=x[t];iO(e)&&d.css(e)}},d.attr(m[0]),!c&&(d.css(iA({cursor:"default"},f)),l&&d.text.css({pointerEvents:"none"})),d.on("touchstart",t=>t.stopPropagation()).on("click",function(t){3!==g&&s.call(d,t)})}crispLine(t,e){let[i,s]=t;return iT(i[1])&&i[1]===s[1]&&(i[1]=s[1]=iM(i[1],e)),iT(i[2])&&i[2]===s[2]&&(i[2]=s[2]=iM(i[2],e)),t}path(t){let e=this.styledMode?{}:{fill:"none"};return iP(t)?e.d=t:iO(t)&&iA(e,t),this.createElement("path").attr(e)}circle(t,e,i){let s=iO(t)?t:void 0===t?{}:{x:t,y:e,r:i},o=this.createElement("circle");return o.xSetter=o.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},o.attr(s)}arc(t,e,i,s,o,r){let a;iO(t)?(e=(a=t).y,i=a.r,s=a.innerR,o=a.start,r=a.end,t=a.x):a={innerR:s,start:o,end:r};let n=this.symbol("arc",t,e,i,i,a);return n.r=i,n}rect(t,e,i,s,o,r){let a=iO(t)?t:void 0===t?{}:{x:t,y:e,r:o,width:Math.max(i||0,0),height:Math.max(s||0,0)},n=this.createElement("rect");return this.styledMode||(void 0!==r&&(a["stroke-width"]=r,iA(a,n.crisp(a))),a.fill="none"),n.rSetter=function(t,e,i){n.r=t,ik(i,{rx:t,ry:t})},n.rGetter=function(){return n.r||0},n.attr(a)}roundedRect(t){return this.symbol("roundedRect").attr(t)}setSize(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:iD(i,!0)?void 0:0}),this.alignElements()}g(t){let e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e}image(t,e,i,s,o,r){let a={preserveAspectRatio:"none"};iL(e)&&(a.x=e),iL(i)&&(a.y=i),iL(s)&&(a.width=s),iL(o)&&(a.height=o);let n=this.createElement("image").attr(a),h=function(e){n.attr({href:t}),r.call(n,e)};if(r){n.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let e=new ib.Image;iv(e,"load",h),e.src=t,e.complete&&h({})}else n.attr({href:t});return n}symbol(t,e,i,s,o,r){let a,n,h,l;let d=this,c=/^url\((.*?)\)$/,p=c.test(t),g=!p&&(this.symbols[t]?t:"circle"),u=g&&this.symbols[g];if(u)"number"==typeof e&&(n=u.call(this.symbols,e||0,i||0,s||0,o||0,r)),a=this.path(n),d.styledMode||a.attr("fill","none"),iA(a,{symbolName:g||void 0,x:e,y:i,width:s,height:o}),r&&iA(a,r);else if(p){h=t.match(c)[1];let s=a=this.image(h);s.imgwidth=iD(r&&r.width,iy[h]&&iy[h].width),s.imgheight=iD(r&&r.height,iy[h]&&iy[h].height),l=t=>t.attr({width:t.width,height:t.height}),["width","height"].forEach(t=>{s[`${t}Setter`]=function(t,e){this[e]=t;let{alignByTranslate:i,element:s,width:o,height:a,imgwidth:n,imgheight:h}=this,l="width"===e?n:h,d=1;r&&"within"===r.backgroundSize&&o&&a&&n&&h?(d=Math.min(o/n,a/h),ik(s,{width:Math.round(n*d),height:Math.round(h*d)})):s&&l&&s.setAttribute(e,l),!i&&n&&h&&this.translate(((o||0)-n*d)/2,((a||0)-h*d)/2)}}),iT(e)&&s.attr({x:e,y:i}),s.isImg=!0,s.symbolUrl=t,iT(s.imgwidth)&&iT(s.imgheight)?l(s):(s.attr({width:0,height:0}),iw("img",{onload:function(){let t=il[d.chartIndex];0===this.width&&(iS(this,{position:"absolute",top:"-999em"}),ic.body.appendChild(this)),iy[h]={width:this.width,height:this.height},s.imgwidth=this.width,s.imgheight=this.height,s.element&&l(s),this.parentNode&&this.parentNode.removeChild(this),d.imgCount--,d.imgCount||!t||t.hasLoaded||t.onload()},src:h}),this.imgCount++)}return a}clipRect(t,e,i,s){return this.rect(t,e,i,s,0)}text(t,e,i,s){let o={};if(s&&(this.allowHTML||!this.forExport))return this.html(t,e,i);o.x=Math.round(e||0),i&&(o.y=Math.round(i)),iT(t)&&(o.text=t);let r=this.createElement("text").attr(o);return s&&(!this.forExport||this.allowHTML)||(r.xSetter=function(t,e,i){let s=i.getElementsByTagName("tspan"),o=i.getAttribute(e);for(let i=0,r;it.align())}}iA(iR.prototype,{Element:ej,SVG_NS:ix,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:e6,draw:im}),er.registerRendererType("svg",iR,!0);let{composed:iW}=k,{attr:iH,css:iX,createElement:iF,defined:iG,extend:iY,getAlignFactor:ij,isNumber:iU,pInt:i$,pushUnique:iV}=$;function i_(t,e,i){let s=this.div?.style||i.style;ej.prototype[`${e}Setter`].call(this,t,e,i),s&&(s[e]=t)}let iq=(t,e)=>{if(!t.div){let i=iH(t.element,"class"),s=t.css,o=iF("div",i?{className:i}:void 0,{position:"absolute",left:`${t.translateX||0}px`,top:`${t.translateY||0}px`,...t.styles,display:t.display,opacity:t.opacity,visibility:t.visibility},t.parentGroup?.div||e);t.classSetter=(t,e,i)=>{i.setAttribute("class",t),o.className=t},t.translateXSetter=t.translateYSetter=(e,i)=>{t[i]=e,o.style["translateX"===i?"left":"top"]=`${e}px`,t.doTransform=!0},t.opacitySetter=t.visibilitySetter=i_,t.css=e=>(s.call(t,e),e.cursor&&(o.style.cursor=e.cursor),e.pointerEvents&&(o.style.pointerEvents=e.pointerEvents),t),t.on=function(){return ej.prototype.on.apply({element:o,onEvents:t.onEvents},arguments),t},t.div=o}return t.div};class iZ extends ej{static compose(t){iV(iW,this.compose)&&(t.prototype.html=function(t,e,i){return new iZ(this,"span").attr({text:t,x:Math.round(e),y:Math.round(i)})})}constructor(t,e){super(t,e),this.css({position:"absolute",...t.styledMode?{}:{fontFamily:t.style.fontFamily,fontSize:t.style.fontSize}})}getSpanCorrection(t,e,i){this.xCorr=-t*i,this.yCorr=-e}css(t){let e;let{element:i}=this,s="SPAN"===i.tagName&&t&&"width"in t,o=s&&t.width;return s&&(delete t.width,this.textWidth=i$(o)||void 0,e=!0),t?.textOverflow==="ellipsis"&&(t.overflow="hidden"),t?.lineClamp&&(t.display="-webkit-box",t.WebkitLineClamp=t.lineClamp,t.WebkitBoxOrient="vertical",t.overflow="hidden"),iU(Number(t?.fontSize))&&(t.fontSize=t.fontSize+"px"),iY(this.styles,t),iX(i,t),e&&this.updateTransform(),this}htmlGetBBox(){let{element:t}=this;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}updateTransform(){if(!this.added){this.alignOnAdd=!0;return}let{element:t,renderer:e,rotation:i,rotationOriginX:s,rotationOriginY:o,scaleX:r,scaleY:a,styles:n,textAlign:h="left",textWidth:l,translateX:d=0,translateY:c=0,x:p=0,y:g=0}=this,{display:u="block",whiteSpace:f}=n;if(iX(t,{marginLeft:`${d}px`,marginTop:`${c}px`}),"SPAN"===t.tagName){let n;let d=[i,h,t.innerHTML,l,this.textAlign].join(","),c=-(this.parentGroup?.padding*1)||0;if(l!==this.oldTextWidth){let e=this.textPxLength?this.textPxLength:(iX(t,{width:"",whiteSpace:f||"nowrap"}),t.offsetWidth),s=l||0;(s>this.oldTextWidth||e>s)&&(/[ \-]/.test(t.textContent||t.innerText)||"ellipsis"===t.style.textOverflow)&&(iX(t,{width:e>s||i||r?l+"px":"auto",display:u,whiteSpace:f||"normal"}),this.oldTextWidth=l)}d!==this.cTT&&(n=e.fontMetrics(t).b,iG(i)&&(i!==(this.oldRotation||0)||h!==this.oldAlign)&&this.setSpanRotation(i,c,c),this.getSpanCorrection(!iG(i)&&!this.textWidth&&this.textPxLength||t.offsetWidth,n,ij(h)));let{xCorr:m=0,yCorr:x=0}=this,y={left:`${p+m}px`,top:`${g+x}px`,textAlign:h,transformOrigin:`${(s??p)-m-p-c}px ${(o??g)-x-g-c}px`};(r||a)&&(y.transform=`scale(${r??1},${a??1})`),iX(t,y),this.cTT=d,this.oldRotation=i,this.oldAlign=h}}setSpanRotation(t,e,i){iX(this.element,{transform:`rotate(${t}deg)`,transformOrigin:`${e}% ${i}px`})}add(t){let e;let i=this.renderer.box.parentNode,s=[];if(this.parentGroup=t,t&&!(e=t.div)){let o=t;for(;o;)s.push(o),o=o.parentGroup;for(let t of s.reverse())e=iq(t,i)}return(e||i).appendChild(this.element),this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(t){t!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,tK.setElementHTML(this.element,t??""),this.textStr=t,this.doTransform=!0)}alignSetter(t){this.alignValue=this.textAlign=t,this.doTransform=!0}xSetter(t,e){this[e]=t,this.doTransform=!0}}let iK=iZ.prototype;iK.visibilitySetter=iK.opacitySetter=i_,iK.ySetter=iK.rotationSetter=iK.rotationOriginXSetter=iK.rotationOriginYSetter=iK.xSetter,function(t){t.xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%[HMSL]",range:!1},second:{main:"%[HMS]",range:!1},minute:{main:"%[HM]",range:!1},hour:{main:"%[HM]",range:!1},day:{main:"%[eb]"},week:{main:"%[eb]"},month:{main:"%[bY]"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em",textOverflow:"ellipsis"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},t.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:t}=this.axis.chart;return t(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0}}(r||(r={}));let iJ=r,{addEvent:iQ,isFunction:i0,objectEach:i1,removeEvent:i2}=$;(a||(a={})).registerEventOptions=function(t,e){t.eventOptions=t.eventOptions||{},i1(e.events,function(e,i){t.eventOptions[i]!==e&&(t.eventOptions[i]&&(i2(t,i,t.eventOptions[i]),delete t.eventOptions[i]),i0(e)&&(t.eventOptions[i]=e,iQ(t,i,e,{order:0})))})};let i3=a,{deg2rad:i5}=k,{clamp:i6,correctFloat:i9,defined:i4,destroyObjectProperties:i8,extend:i7,fireEvent:st,getAlignFactor:se,isNumber:si,merge:ss,objectEach:so,pick:sr}=$,sa=class{constructor(t,e,i,s,o){this.isNew=!0,this.isNewLabel=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=o||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,st(this,"init"),i||s||this.addLabel()}addLabel(){let t=this,e=t.axis,i=e.options,s=e.chart,o=e.categories,r=e.logarithmic,a=e.names,n=t.pos,h=sr(t.options&&t.options.labels,i.labels),l=e.tickPositions,d=n===l[0],c=n===l[l.length-1],p=(!h.step||1===h.step)&&1===e.tickInterval,g=l.info,u=t.label,f,m,x,y=this.parameters.category||(o?sr(o[n],a[n],n):n);r&&si(y)&&(y=i9(r.lin2log(y))),e.dateTime&&(g?f=(m=s.time.resolveDTLFormat(i.dateTimeLabelFormats[!i.grid&&g.higherRanks[n]||g.unitName])).main:si(y)&&(f=e.dateTime.getXDateFormat(y,i.dateTimeLabelFormats||{}))),t.isFirst=d,t.isLast=c;let b={axis:e,chart:s,dateTimeLabelFormat:f,isFirst:d,isLast:c,pos:n,tick:t,tickPositionInfo:g,value:y};st(this,"labelFormat",b);let v=t=>h.formatter?h.formatter.call(t,t):h.format?(t.text=e.defaultLabelFormatter.call(t),eo.format(h.format,t,s)):e.defaultLabelFormatter.call(t),k=v.call(b,b),w=m&&m.list;w?t.shortenLabel=function(){for(x=0;x0&&s+d*c>n&&(x=Math.round((o-s)/Math.cos(l*i5))):(f=s-d*c,m=s+(1-d)*c,fn&&(g=n-t.x+g*d,u=-1),(g=Math.min(p,g))g||e.autoRotation&&(h.styles||{}).width)&&(x=g)),x&&h&&(this.shortenLabel?this.shortenLabel():h.css(i7({},{width:Math.floor(x)+"px",lineClamp:e.isRadial?0:1})))}moveLabel(t,e){let i=this,s=i.label,o=i.axis,r=!1,a;s&&s.textStr===t?(i.movedLabel=s,r=!0,delete i.label):so(o.ticks,function(e){r||e.isNew||e===i||!e.label||e.label.textStr!==t||(i.movedLabel=e.label,r=!0,e.labelPos=i.movedLabel.xy,delete e.label)}),!r&&(i.labelPos||s)&&(a=i.labelPos||s.xy,i.movedLabel=i.createLabel(t,e,a),i.movedLabel&&i.movedLabel.attr({opacity:0}))}render(t,e,i){let s=this.axis,o=s.horiz,r=this.pos,a=sr(this.tickmarkOffset,s.tickmarkOffset),n=this.getPosition(o,r,a,e),h=n.x,l=n.y,d=s.pos,c=d+s.len,p=o?h:l;!s.chart.polar&&this.isNew&&(i9(p)c)&&(i=0);let g=sr(i,this.label&&this.label.newOpacity,1);i=sr(i,1),this.isActive=!0,this.renderGridLine(e,i),this.renderMark(n,i),this.renderLabel(n,e,g,t),this.isNew=!1,st(this,"afterRender")}renderGridLine(t,e){let i=this.axis,s=i.options,o={},r=this.pos,a=this.type,n=sr(this.tickmarkOffset,i.tickmarkOffset),h=i.chart.renderer,l=this.gridLine,d,c=s.gridLineWidth,p=s.gridLineColor,g=s.gridLineDashStyle;"minor"===this.type&&(c=s.minorGridLineWidth,p=s.minorGridLineColor,g=s.minorGridLineDashStyle),l||(i.chart.styledMode||(o.stroke=p,o["stroke-width"]=c||0,o.dashstyle=g),a||(o.zIndex=1),t&&(e=0),this.gridLine=l=h.path().attr(o).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(i.gridGroup)),l&&(d=i.getPlotLinePath({value:r+n,lineWidth:l.strokeWidth(),force:"pass",old:t,acrossPanes:!1}))&&l[t||this.isNew?"attr":"animate"]({d:d,opacity:e})}renderMark(t,e){let i=this.axis,s=i.options,o=i.chart.renderer,r=this.type,a=i.tickSize(r?r+"Tick":"tick"),n=t.x,h=t.y,l=sr(s["minor"!==r?"tickWidth":"minorTickWidth"],!r&&i.isXAxis?1:0),d=s["minor"!==r?"tickColor":"minorTickColor"],c=this.mark,p=!c;a&&(i.opposite&&(a[0]=-a[0]),c||(this.mark=c=o.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(i.axisGroup),i.chart.styledMode||c.attr({stroke:d,"stroke-width":l})),c[p?"attr":"animate"]({d:this.getMarkPath(n,h,a[0],c.strokeWidth(),i.horiz,o),opacity:e}))}renderLabel(t,e,i,s){let o=this.axis,r=o.horiz,a=o.options,n=this.label,h=a.labels,l=h.step,d=sr(this.tickmarkOffset,o.tickmarkOffset),c=t.x,p=t.y,g=!0;n&&si(c)&&(n.xy=t=this.getLabelPosition(c,p,n,r,h,d,s,l),(!this.isFirst||this.isLast||a.showFirstLabel)&&(!this.isLast||this.isFirst||a.showLastLabel)?!r||h.step||h.rotation||e||0===i||this.handleOverflow(t):g=!1,l&&s%l&&(g=!1),g&&si(t.y)?(t.opacity=i,n[this.isNewLabel?"attr":"animate"](t).show(!0),this.isNewLabel=!1):(n.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let t=this.label,e=this.axis;t&&!this.isNew&&(t.animate({opacity:0},void 0,t.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}},{animObject:sn}=tR,{xAxis:sh,yAxis:sl}=iJ,{defaultOptions:sd}=tm,{registerEventOptions:sc}=i3,{deg2rad:sp}=k,{arrayMax:sg,arrayMin:su,clamp:sf,correctFloat:sm,defined:sx,destroyObjectProperties:sy,erase:sb,error:sv,extend:sk,fireEvent:sw,getClosestDistance:sM,insertItem:sS,isArray:sT,isNumber:sC,isString:sA,merge:sP,normalizeTickInterval:sL,objectEach:sO,pick:sE,relativeLength:sI,removeEvent:sD,splat:sB,syncTimeout:sN}=$,sz=(t,e)=>sL(e,void 0,void 0,sE(t.options.allowDecimals,e<.5||void 0!==t.tickAmount),!!t.tickAmount);sk(sd,{xAxis:sh,yAxis:sP(sh,sl)});class sR{constructor(t,e,i){this.init(t,e,i)}init(t,e,i=this.coll){let s="xAxis"===i,o=this.isZAxis||(t.inverted?!s:s);this.chart=t,this.horiz=o,this.isXAxis=s,this.coll=i,sw(this,"init",{userOptions:e}),this.opposite=sE(e.opposite,this.opposite),this.side=sE(e.side,this.side,o?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);let r=this.options,a=r.labels;this.type??(this.type=r.type||"linear"),this.uniqueNames??(this.uniqueNames=r.uniqueNames??!0),sw(this,"afterSetType"),this.userOptions=e,this.minPixelPadding=0,this.reversed=sE(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===this.type||!0===r.categories,this.categories=sT(r.categories)&&r.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=sx(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.max=void 0,this.min=void 0;let n=sE(r.crosshair,sB(t.options.tooltip.crosshairs)[s?0:1]);this.crosshair=!0===n?{}:n,-1===t.axes.indexOf(this)&&(s?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),sS(this,t[this.coll])),t.orderItems(this.coll),this.series=this.series||[],t.inverted&&!this.isZAxis&&s&&!sx(this.reversed)&&(this.reversed=!0),this.labelRotation=sC(a.rotation)?a.rotation:void 0,sc(this,r),sw(this,"afterInit")}setOptions(t){let e=this.horiz?{labels:{autoRotation:[-45],padding:3},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=sP(e,sd[this.coll],t),sw(this,"afterSetOptions",{userOptions:t})}defaultLabelFormatter(){let t=this.axis,{numberFormatter:e}=this.chart,i=sC(this.value)?this.value:NaN,s=t.chart.time,o=t.categories,r=this.dateTimeLabelFormat,a=sd.lang,n=a.numericSymbols,h=a.numericSymbolMagnitude||1e3,l=t.logarithmic?Math.abs(i):t.tickInterval,d=n&&n.length,c,p;if(o)p=`${this.value}`;else if(r)p=s.dateFormat(r,i,!0);else if(d&&n&&l>=1e3)for(;d--&&void 0===p;)l>=(c=Math.pow(h,d+1))&&10*i%c==0&&null!==n[d]&&0!==i&&(p=e(i/c,-1)+n[d]);return void 0===p&&(p=Math.abs(i)>=1e4?e(i,-1):e(i,-1,void 0,"")),p}getSeriesExtremes(){let t;let e=this;sw(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=void 0,e.softThreshold=!e.isXAxis,e.series.forEach(i=>{if(i.reserveSpace()){let s=i.options,o,r=s.threshold,a,n;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=(r||0)&&(r=void 0),e.isXAxis)(o=i.getColumn("x")).length&&(o=e.logarithmic?o.filter(t=>t>0):o,a=(t=i.getXExtremes(o)).min,n=t.max,sC(a)||a instanceof Date||(o=o.filter(sC),a=(t=i.getXExtremes(o)).min,n=t.max),o.length&&(e.dataMin=Math.min(sE(e.dataMin,a),a),e.dataMax=Math.max(sE(e.dataMax,n),n)));else{let t=i.applyExtremes();sC(t.dataMin)&&(a=t.dataMin,e.dataMin=Math.min(sE(e.dataMin,a),a)),sC(t.dataMax)&&(n=t.dataMax,e.dataMax=Math.max(sE(e.dataMax,n),n)),sx(r)&&(e.threshold=r),(!s.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}})}),sw(this,"afterGetSeriesExtremes")}translate(t,e,i,s,o,r){let a=this.linkedParent||this,n=s&&a.old?a.old.min:a.min;if(!sC(n))return NaN;let h=a.minPixelPadding,l=(a.isOrdinal||a.brokenAxis?.hasBreaks||a.logarithmic&&o)&&a.lin2val,d=1,c=0,p=s&&a.old?a.old.transA:a.transA,g=0;return p||(p=a.transA),i&&(d*=-1,c=a.len),a.reversed&&(d*=-1,c-=d*(a.sector||a.len)),e?(g=(t=t*d+c-h)/p+n,l&&(g=a.lin2val(g))):(l&&(t=a.val2lin(t)),g=d*(t-n)*p+c+d*h+(sC(r)?p*r:0),a.isRadial||(g=sm(g))),g}toPixels(t,e){return this.translate(this.chart?.time.parse(t)??NaN,!1,!this.horiz,void 0,!0)+(e?0:this.pos)}toValue(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(t){let e=this,i=e.chart,s=e.left,o=e.top,r=t.old,a=t.value,n=t.lineWidth,h=r&&i.oldChartHeight||i.chartHeight,l=r&&i.oldChartWidth||i.chartWidth,d=e.transB,c=t.translatedValue,p=t.force,g,u,f,m,x;function y(t,e,i){return"pass"!==p&&(ti)&&(p?t=sf(t,e,i):x=!0),t}let b={value:a,lineWidth:n,old:r,force:p,acrossPanes:t.acrossPanes,translatedValue:c};return sw(this,"getPlotLinePath",b,function(t){g=f=(c=sf(c=sE(c,e.translate(a,void 0,void 0,r)),-1e9,1e9))+d,u=m=h-c-d,sC(c)?e.horiz?(u=o,m=h-e.bottom+(e.options.isInternal?0:i.scrollablePixelsY||0),g=f=y(g,s,s+e.width)):(g=s,f=l-e.right+(i.scrollablePixelsX||0),u=m=y(u,o,o+e.height)):(x=!0,p=!1),t.path=x&&!p?void 0:i.renderer.crispLine([["M",g,u],["L",f,m]],n||1)}),b.path}getLinearTickPositions(t,e,i){let s,o,r;let a=sm(Math.floor(e/t)*t),n=sm(Math.ceil(i/t)*t),h=[];if(sm(a+t)===a&&(r=20),this.single)return[e];for(s=a;s<=n&&(h.push(s),(s=sm(s+t,r))!==o);)o=s;return h}getMinorTickInterval(){let{minorTicks:t,minorTickInterval:e}=this.options;return!0===t?sE(e,"auto"):!1!==t?e:void 0}getMinorTickPositions(){let t=this.options,e=this.tickPositions,i=this.minorTickInterval,s=this.pointRangePadding||0,o=(this.min||0)-s,r=(this.max||0)+s,a=this.brokenAxis?.hasBreaks?this.brokenAxis.unitLength:r-o,n=[],h;if(a&&a/i{let e=t.getColumn("x");return t.xIncrement?e.slice(0,2):e}))||0),this.dataMax-this.dataMin)),sC(s)&&sC(o)&&sC(r)&&s-o=r,a=(r-s+o)/2,h=[o-a,i.parse(t.min)??o-a],n&&(h[2]=e?e.log2lin(this.dataMin):this.dataMin),l=[(o=sg(h))+r,i.parse(t.max)??o+r],n&&(l[2]=e?e.log2lin(this.dataMax):this.dataMax),(s=su(l))-ot-e),t=sM([i]))}return t&&e?Math.min(t,e):t||e}nameToX(t){let e=sT(this.options.categories),i=e?this.categories:this.names,s=t.options.x,o;return t.series.requireSorting=!1,sx(s)||(s=this.uniqueNames&&i?e?i.indexOf(t.name):sE(i.keys[t.name],-1):t.series.autoIncrement()),-1===s?!e&&i&&(o=i.length):sC(s)&&(o=s),void 0!==o?(this.names[o]=t.name,this.names.keys[t.name]=o):t.x&&(o=t.x),o}updateNames(){let t=this,e=this.names;e.length>0&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(e=>{e.xIncrement=null,(!e.points||e.isDirtyData)&&(t.max=Math.max(t.max||0,e.dataTable.rowCount-1),e.processData(),e.generatePoints());let i=e.getColumn("x").slice();e.data.forEach((e,s)=>{let o=i[s];e?.options&&void 0!==e.name&&void 0!==(o=t.nameToX(e))&&o!==e.x&&(i[s]=e.x=o)}),e.dataTable.setColumn("x",i)}))}setAxisTranslation(){let t=this,e=t.max-t.min,i=t.linkedParent,s=!!t.categories,o=t.isXAxis,r=t.axisPointRange||0,a,n=0,h=0,l,d=t.transA;(o||s||r)&&(a=t.getClosest(),i?(n=i.minPointOffset,h=i.pointRangePadding):t.series.forEach(function(e){let i=s?1:o?sE(e.options.pointRange,a,0):t.axisPointRange||0,l=e.options.pointPlacement;if(r=Math.max(r,i),!t.single||s){let t=e.is("xrange")?!o:o;n=Math.max(n,t&&sA(l)?0:i/2),h=Math.max(h,t&&"on"===l?0:i)}}),l=t.ordinal&&t.ordinal.slope&&a?t.ordinal.slope/a:1,t.minPointOffset=n*=l,t.pointRangePadding=h*=l,t.pointRange=Math.min(r,t.single&&s?1:e),o&&a&&(t.closestPointRange=a)),t.translationSlope=t.transA=d=t.staticScale||t.len/(e+h||1),t.transB=t.horiz?t.left:t.bottom,t.minPixelPadding=d*n,sw(this,"afterSetAxisTranslation")}minFromRange(){let{max:t,min:e}=this;return sC(t)&&sC(e)&&t-e||void 0}setTickInterval(t){let{categories:e,chart:i,dataMax:s,dataMin:o,dateTime:r,isXAxis:a,logarithmic:n,options:h,softThreshold:l}=this,d=i.time,c=sC(this.threshold)?this.threshold:void 0,p=this.minRange||0,{ceiling:g,floor:u,linkedTo:f,softMax:m,softMin:x}=h,y=sC(f)&&i[this.coll]?.[f],b=h.tickPixelInterval,v=h.maxPadding,k=h.minPadding,w=0,M,S=sC(h.tickInterval)&&h.tickInterval>=0?h.tickInterval:void 0,T,C,A,P;if(r||e||y||this.getTickAmount(),A=sE(this.userMin,d.parse(h.min)),P=sE(this.userMax,d.parse(h.max)),y?(this.linkedParent=y,M=y.getExtremes(),this.min=sE(M.min,M.dataMin),this.max=sE(M.max,M.dataMax),this.type!==y.type&&sv(11,!0,i)):(l&&sx(c)&&sC(s)&&sC(o)&&(o>=c?(T=c,k=0):s<=c&&(C=c,v=0)),this.min=sE(A,T,o),this.max=sE(P,C,s)),sC(this.max)&&sC(this.min)&&(n&&(this.positiveValuesOnly&&!t&&0>=Math.min(this.min,sE(o,this.min))&&sv(10,!0,i),this.min=sm(n.log2lin(this.min),16),this.max=sm(n.log2lin(this.max),16)),this.range&&sC(o)&&(this.userMin=this.min=A=Math.max(o,this.minFromRange()||0),this.userMax=P=this.max,this.range=void 0)),sw(this,"foundExtremes"),this.adjustForMinRange(),sC(this.min)&&sC(this.max)){if(!sC(this.userMin)&&sC(x)&&xthis.max&&(this.max=P=m),e||this.axisPointRange||this.stacking?.usePercentage||y||!(w=this.max-this.min)||(!sx(A)&&k&&(this.min-=w*k),sx(P)||!v||(this.max+=w*v)),!sC(this.userMin)&&sC(u)&&(this.min=Math.max(this.min,u)),!sC(this.userMax)&&sC(g)&&(this.max=Math.min(this.max,g)),l&&sC(o)&&sC(s)){let t=c||0;!sx(A)&&this.min=t?this.min=h.minRange?Math.min(t,this.max-p):t:!sx(P)&&this.max>t&&s<=t&&(this.max=h.minRange?Math.max(t,this.min+p):t)}!i.polar&&this.min>this.max&&(sx(h.min)?this.max=this.min:sx(h.max)&&(this.min=this.max)),w=this.max-this.min}if(this.min!==this.max&&sC(this.min)&&sC(this.max)?y&&!S&&b===y.options.tickPixelInterval?this.tickInterval=S=y.tickInterval:this.tickInterval=sE(S,this.tickAmount?w/Math.max(this.tickAmount-1,1):void 0,e?1:w*b/Math.max(this.len,b)):this.tickInterval=1,a&&!t){let t=this.min!==this.old?.min||this.max!==this.old?.max;this.series.forEach(function(e){e.forceCrop=e.forceCropping?.(),e.processData(t)}),sw(this,"postProcessData",{hasExtremesChanged:t})}this.setAxisTranslation(),sw(this,"initialAxisTranslation"),this.pointRange&&!S&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let L=sE(h.minTickInterval,r&&!this.series.some(t=>!t.sorted)?this.closestPointRange:0);!S&&this.tickIntervalMath.max(2*this.len,200))n=[this.min,this.max],sv(19,!1,this.chart);else if(this.dateTime)n=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,t.units),this.min,this.max,t.startOfWeek,this.ordinal?.positions,this.closestPointRange,!0);else if(this.logarithmic)n=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let t=this.tickInterval,e=t;for(;e<=2*t;)if(n=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&n.length>this.tickAmount)this.tickInterval=sz(this,e*=1.1);else break}n.length>this.len&&(n=[n[0],n[n.length-1]])[0]===n[1]&&(n.length=1),i&&(this.tickPositions=n,(h=i.apply(this,[this.min,this.max]))&&(n=h))}this.tickPositions=n,this.minorTickInterval="auto"===s&&this.tickInterval?this.tickInterval/t.minorTicksPerMajor:s,this.paddedTicks=n.slice(0),this.trimTicks(n,r,a),!this.isLinked&&sC(this.min)&&sC(this.max)&&(this.single&&n.length<2&&!this.categories&&!this.series.some(t=>t.is("heatmap")&&"between"===t.options.pointPlacement)&&(this.min-=.5,this.max+=.5),e||h||this.adjustTickAmount()),sw(this,"afterSetTickPositions")}trimTicks(t,e,i){let s=t[0],o=t[t.length-1],r=!this.isOrdinal&&this.minPointOffset||0;if(sw(this,"trimTicks"),!this.isLinked){if(e&&s!==-1/0)this.min=s;else for(;this.min-r>t[0];)t.shift();if(i)this.max=o;else for(;this.max+r{let{horiz:e,options:i}=t;return[e?i.left:i.top,i.width,i.height,i.pane].join(",")},r=o(this);i[this.coll].forEach(function(i){let{series:a}=i;a.length&&a.some(t=>t.visible)&&i!==e&&o(i)===r&&(t=!0,s.push(i))})}if(t&&a){s.forEach(t=>{let i=t.getThresholdAlignment(e);sC(i)&&n.push(i)});let t=n.length>1?n.reduce((t,e)=>t+=e,0)/n.length:void 0;s.forEach(e=>{e.thresholdAlignment=t})}return t}getThresholdAlignment(t){if((!sC(this.dataMin)||this!==t&&this.series.some(t=>t.isDirty||t.isDirtyData))&&this.getSeriesExtremes(),sC(this.threshold)){let t=sf((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(t=1-t),t}}getTickAmount(){let t=this.options,e=t.tickPixelInterval,i=t.tickAmount;sx(t.tickInterval)||i||!(this.lenr.push(sm(r[r.length-1]+p)),f=()=>r.unshift(sm(r[0]-p));if(sC(n)&&(g=n<.5?Math.ceil(n*(a-1)):Math.floor(n*(a-1)),o.reversed&&(g=a-1-g)),t.hasData()&&sC(s)&&sC(i)){let n=()=>{t.transA*=(h-1)/(a-1),t.min=o.startOnTick?r[0]:Math.min(s,r[0]),t.max=o.endOnTick?r[r.length-1]:Math.max(i,r[r.length-1])};if(sC(g)&&sC(t.threshold)){for(;r[g]!==l||r.length!==a||r[0]>s||r[r.length-1]t.threshold?f():u();if(p>8*t.tickInterval)break;p*=2}n()}else if(h0&&c{i=i||t.isDirtyData||t.isDirty,s=s||t.xAxis&&t.xAxis.isDirty||!1}),this.setAxisSize();let o=this.len!==(this.old&&this.old.len);o||i||s||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(e&&"yAxis"===t&&e.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),e&&"xAxis"===t&&e.buildStacks(),this.isDirty||(this.isDirty=o||this.min!==this.old?.min||this.max!==this.old?.max)):e&&e.cleanStacks(),i&&delete this.allExtremes,sw(this,"afterSetScale")}setExtremes(t,e,i=!0,s,o){let r=this.chart;this.series.forEach(t=>{delete t.kdTree}),t=r.time.parse(t),e=r.time.parse(e),sw(this,"setExtremes",o=sk(o,{min:t,max:e}),t=>{this.userMin=t.min,this.userMax=t.max,this.eventArgs=t,i&&r.redraw(s)})}setAxisSize(){let t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],s=this.horiz,o=this.width=Math.round(sI(sE(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),r=this.height=Math.round(sI(sE(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),a=this.top=Math.round(sI(sE(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop)),n=this.left=Math.round(sI(sE(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft));this.bottom=t.chartHeight-r-a,this.right=t.chartWidth-o-n,this.len=Math.max(s?o:r,0),this.pos=s?n:a}getExtremes(){let t=this.logarithmic;return{min:t?sm(t.lin2log(this.min)):this.min,max:t?sm(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(t){let e=this.logarithmic,i=e?e.lin2log(this.min):this.min,s=e?e.lin2log(this.max):this.max;return null===t||t===-1/0?t=i:t===1/0?t=s:i>t?t=i:s15&&e<165?t.align="right":e>195&&e<345&&(t.align="left")}),i.align}tickSize(t){let e=this.options,i=sE(e["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0),s=e["tick"===t?"tickLength":"minorTickLength"],o;i&&s&&("inside"===e[t+"Position"]&&(s=-s),o=[s,i]);let r={tickSize:o};return sw(this,"afterTickSize",r),r.tickSize}labelMetrics(){let t=this.chart.renderer,e=this.ticks,i=e[Object.keys(e)[0]]||{};return this.chart.renderer.fontMetrics(i.label||i.movedLabel||t.box)}unsquish(){let t=this.options.labels,e=t.padding||0,i=this.horiz,s=this.tickInterval,o=this.len/(((this.categories?1:0)+this.max-this.min)/s),r=t.rotation,a=sm(.8*this.labelMetrics().h),n=Math.max(this.max-this.min,0),h=function(t){let i=(t+2*e)/(o||1);return(i=i>1?Math.ceil(i):1)*s>n&&t!==1/0&&o!==1/0&&n&&(i=Math.ceil(n/s)),sm(i*s)},l=s,d,c=Number.MAX_VALUE,p;if(i){if(!t.staggerLines&&(sC(r)?p=[r]:o=-90&&i<=90)&&(e=(t=h(Math.abs(a/Math.sin(sp*i))))+Math.abs(i/360))u&&(u=i)}),this.maxLabelLength=u,this.autoRotation?u>h&&u>d.h?l.rotation=this.labelRotation:this.labelRotation=0:n&&(p=h),l.rotation&&(p=u>.5*t.chartHeight?.33*t.chartHeight:u,c||(g=1)),this.labelAlign=o.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(l.align=this.labelAlign),i.forEach(function(t){let e=s[t],i=e&&e.label,o=r.width,a={};i&&(i.attr(l),e.shortenLabel?e.shortenLabel():p&&!o&&"nowrap"!==r.whiteSpace&&(p<(i.textPxLength||0)||"SPAN"===i.element.tagName)?i.css(sk(a,{width:`${p}px`,lineClamp:g})):!i.styles.width||a.width||o||i.css({width:"auto"}),e.rotation=l.rotation)},this),this.tickRotCorr=e.rotCorr(d.b,this.labelRotation||0,0!==this.side)}hasData(){return this.series.some(function(t){return t.hasData()})||this.options.showEmpty&&sx(this.min)&&sx(this.max)}addTitle(t){let e;let i=this.chart.renderer,s=this.horiz,o=this.opposite,r=this.options.title,a=this.chart.styledMode;this.axisTitle||((e=r.textAlign)||(e=(s?{low:"left",middle:"center",high:"right"}:{low:o?"right":"left",middle:"center",high:o?"left":"right"})[r.align]),this.axisTitle=i.text(r.text||"",0,0,r.useHTML).attr({zIndex:7,rotation:r.rotation||0,align:e}).addClass("highcharts-axis-title"),a||this.axisTitle.css(sP(r.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||r.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[t?"show":"hide"](t)}generateTick(t){let e=this.ticks;e[t]?e[t].addLabel():e[t]=new sa(this,t)}createGroups(){let{axisParent:t,chart:e,coll:i,options:s}=this,o=e.renderer,r=(e,r,a)=>o.g(e).attr({zIndex:a}).addClass(`highcharts-${i.toLowerCase()}${r} `+(this.isRadial?`highcharts-radial-axis${r} `:"")+(s.className||"")).add(t);this.axisGroup||(this.gridGroup=r("grid","-grid",s.gridZIndex),this.axisGroup=r("axis","",s.zIndex),this.labelGroup=r("axis-labels","-labels",s.labels.zIndex))}getOffset(){let t=this,{chart:e,horiz:i,options:s,side:o,ticks:r,tickPositions:a,coll:n}=t,h=e.inverted&&!t.isZAxis?[1,0,3,2][o]:o,l=t.hasData(),d=s.title,c=s.labels,p=sC(s.crossing),g=e.axisOffset,u=e.clipOffset,f=[-1,1,1,-1][o],m,x=0,y,b=0,v=0,k,w;if(t.showAxis=m=l||s.showEmpty,t.staggerLines=t.horiz&&c.staggerLines||void 0,t.createGroups(),l||t.isLinked?(a.forEach(function(e){t.generateTick(e)}),t.renderUnsquish(),t.reserveSpaceDefault=0===o||2===o||({1:"left",3:"right"})[o]===t.labelAlign,sE(c.reserveSpace,!p&&null,"center"===t.labelAlign||null,t.reserveSpaceDefault)&&a.forEach(function(t){v=Math.max(r[t].getLabelSize(),v)}),t.staggerLines&&(v*=t.staggerLines),t.labelOffset=v*(t.opposite?-1:1)):sO(r,function(t,e){t.destroy(),delete r[e]}),d?.text&&!1!==d.enabled&&(t.addTitle(m),m&&!p&&!1!==d.reserveSpace&&(t.titleOffset=x=t.axisTitle.getBBox()[i?"height":"width"],b=sx(y=d.offset)?0:sE(d.margin,i?5:10))),t.renderLine(),t.offset=f*sE(s.offset,g[o]?g[o]+(s.margin||0):0),t.tickRotCorr=t.tickRotCorr||{x:0,y:0},w=0===o?-t.labelMetrics().h:2===o?t.tickRotCorr.y:0,k=Math.abs(v)+b,v&&(k-=w,k+=f*(i?sE(c.y,t.tickRotCorr.y+f*c.distance):sE(c.x,f*c.distance))),t.axisTitleMargin=sE(y,k),t.getMaxLabelDimensions&&(t.maxLabelDimensions=t.getMaxLabelDimensions(r,a)),"colorAxis"!==n&&u){let e=this.tickSize("tick");g[o]=Math.max(g[o],(t.axisTitleMargin||0)+x+f*t.offset,k,a&&a.length&&e?e[0]+f*t.offset:0);let i=!t.axisLine||s.offset?0:t.axisLine.strokeWidth()/2;u[h]=Math.max(u[h],i)}sw(this,"afterGetOffset")}getLinePath(t){let e=this.chart,i=this.opposite,s=this.offset,o=this.horiz,r=this.left+(i?this.width:0)+s,a=e.chartHeight-this.bottom-(i?this.height:0)+s;return i&&(t*=-1),e.renderer.crispLine([["M",o?this.left:r,o?a:this.top],["L",o?e.chartWidth-this.right:r,o?a:e.chartHeight-this.bottom]],t)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(t){let e=this.horiz,i=this.left,s=this.top,o=this.len,r=this.options.title,a=e?i:s,n=this.opposite,h=this.offset,l=r.x,d=r.y,c=this.chart.renderer.fontMetrics(t),p=t?Math.max(t.getBBox(!1,0).height-c.h-1,0):0,g={low:a+(e?0:o),middle:a+o/2,high:a+(e?o:0)}[r.align],u=(e?s+this.height:i)+(e?1:-1)*(n?-1:1)*(this.axisTitleMargin||0)+[-p,p,c.f,-p][this.side],f={x:e?g+l:u+(n?this.width:0)+h+l,y:e?u+d-(n?this.height:0)+h:g+d};return sw(this,"afterGetTitlePosition",{titlePosition:f}),f}renderMinorTick(t,e){let i=this.minorTicks;i[t]||(i[t]=new sa(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)}renderTick(t,e,i){let s=this.isLinked,o=this.ticks;(!s||t>=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(o[t]||(o[t]=new sa(this,t)),i&&o[t].isNew&&o[t].render(e,!0,-1),o[t].render(e))}render(){let t,e;let i=this,s=i.chart,o=i.logarithmic,r=s.renderer,a=i.options,n=i.isLinked,h=i.tickPositions,l=i.axisTitle,d=i.ticks,c=i.minorTicks,p=i.alternateBands,g=a.stackLabels,u=a.alternateGridColor,f=a.crossing,m=i.tickmarkOffset,x=i.axisLine,y=i.showAxis,b=sn(r.globalAnimation);if(i.labelEdge.length=0,i.overlap=!1,[d,c,p].forEach(function(t){sO(t,function(t){t.isActive=!1})}),sC(f)){let t=this.isXAxis?s.yAxis[0]:s.xAxis[0],e=[1,-1,-1,1][this.side];if(t){let s=t.toPixels(f,!0);i.horiz&&(s=t.len-s),i.offset=e*s}}if(i.hasData()||n){let r=i.chart.hasRendered&&i.old&&sC(i.old.min);i.minorTickInterval&&!i.categories&&i.getMinorTickPositions().forEach(function(t){i.renderMinorTick(t,r)}),h.length&&(h.forEach(function(t,e){i.renderTick(t,e,r)}),m&&(0===i.min||i.single)&&(d[-1]||(d[-1]=new sa(i,-1,null,!0)),d[-1].render(-1))),u&&h.forEach(function(r,a){e=void 0!==h[a+1]?h[a+1]+m:i.max-m,a%2==0&&r=.5)t=Math.round(t),n=o.getLinearTickPositions(t,e,i);else if(t>=.08){let o,r,a,h,l,d,c;let p=Math.floor(e);for(o=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],r=p;re&&(!s||d<=i)&&void 0!==d&&n.push(d),d>i&&(c=!0),d=l}else{let h=this.lin2log(e),l=this.lin2log(i),d=s?o.getMinorTickInterval():a.tickInterval,c=a.tickPixelInterval/(s?5:1),p=s?r/o.tickPositions.length:r;t=sj(t=sU("auto"===d?null:d,this.minorAutoInterval,(l-h)*c/(p||1))),n=o.getLinearTickPositions(t,h,l).map(this.log2lin),s||(this.minorAutoInterval=t/5)}return s||(o.tickInterval=t),n}lin2log(t){return Math.pow(10,t)}log2lin(t){return Math.log(t)/Math.LN10}}t.Additions=s}(h||(h={}));let s$=h,{erase:sV,extend:s_,isNumber:sq}=$;!function(t){let e;function i(t){return this.addPlotBandOrLine(t,"plotBands")}function s(t,i){let s=this.userOptions,o=new e(this,t);if(this.visible&&(o=o.render()),o){if(this._addedPlotLB||(this._addedPlotLB=!0,(s.plotLines||[]).concat(s.plotBands||[]).forEach(t=>{this.addPlotBandOrLine(t)})),i){let e=s[i]||[];e.push(t),s[i]=e}this.plotLinesAndBands.push(o)}return o}function o(t){return this.addPlotBandOrLine(t,"plotLines")}function r(t,e,i){i=i||this.options;let s=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes}),o=[],r=this.horiz,a=!sq(this.min)||!sq(this.max)||tthis.max&&e>this.max,n=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes}),h,l=1,d;if(n&&s)for(a&&(d=n.toString()===s.toString(),l=0),h=0;h{let t=[];for(let e of this.axes)for(let{label:i,options:s}of e.plotLinesAndBands)i&&!s?.label?.allowOverlap&&t.push(i);return t})}),sZ.compose(s4,e)}constructor(t,e){this.axis=t,this.options=e,this.id=e.id}render(){s3(this,"render");let{axis:t,options:e}=this,{horiz:i,logarithmic:s}=t,{color:o,events:r,zIndex:a=0}=e,{renderer:n,time:h}=t.chart,l={},d=h.parse(e.to),c=h.parse(e.from),p=h.parse(e.value),g=e.borderWidth,u=e.label,{label:f,svgElem:m}=this,x=[],y,b=s0(c)&&s0(d),v=s0(p),k=!m,w={class:"highcharts-plot-"+(b?"band ":"line ")+(e.className||"")},M=b?"bands":"lines";if(!t.chart.styledMode&&(v?(w.stroke=o||"#999999",w["stroke-width"]=s9(e.width,1),e.dashStyle&&(w.dashstyle=e.dashStyle)):b&&(w.fill=o||"#e6e9ff",g&&(w.stroke=e.borderColor,w["stroke-width"]=g))),l.zIndex=a,M+="-"+a,(y=t.plotLinesAndBandsGroups[M])||(t.plotLinesAndBandsGroups[M]=y=n.g("plot-"+M).attr(l).add()),m||(this.svgElem=m=n.path().attr(w).add(y)),s0(p))x=t.getPlotLinePath({value:s?.log2lin(p)??p,lineWidth:m.strokeWidth(),acrossPanes:e.acrossPanes});else{if(!(s0(c)&&s0(d)))return;x=t.getPlotBandPath(s?.log2lin(c)??c,s?.log2lin(d)??d,e)}return!this.eventsAdded&&r&&(s6(r,(t,e)=>{m?.on(e,t=>{r[e].apply(this,[t])})}),this.eventsAdded=!0),(k||!m.d)&&x?.length?m.attr({d:x}):m&&(x?(m.show(),m.animate({d:x})):m.d&&(m.hide(),f&&(this.label=f=f.destroy()))),u&&(s0(u.text)||s0(u.formatter))&&x?.length&&t.width>0&&t.height>0&&!x.isFlat?(u=s5({align:i&&b?"center":void 0,x:i?!b&&4:10,verticalAlign:!i&&b?"middle":void 0,y:i?b?16:10:b?6:-4,rotation:i&&!b?90:0,...b?{inside:!0}:{}},u),this.renderLabel(u,x,b,a)):f&&f.hide(),this}renderLabel(t,e,i,s){let o=this.axis,r=o.chart.renderer,a=t.inside,n=this.label;n||(this.label=n=r.text(this.getLabelText(t),0,0,t.useHTML).attr({align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(i?"band":"line")+"-label "+(t.className||""),zIndex:s}),o.chart.styledMode||n.css(s5({fontSize:"0.8em",textOverflow:i&&!a?"":"ellipsis"},t.style)),n.add());let h=e.xBounds||[e[0][1],e[1][1],i?e[2][1]:e[0][1]],l=e.yBounds||[e[0][2],e[1][2],i?e[2][2]:e[0][2]],d=sQ(h),c=sQ(l),p=sJ(h)-d;n.align(t,!1,{x:d,y:c,width:p,height:sJ(l)-c}),(!n.alignValue||"left"===n.alignValue||s0(a))&&n.css({width:(t.style?.width||(i&&a?p:90===n.rotation?o.height-(n.alignAttr.y-o.top):(t.clip?o.width:o.chart.chartWidth)-(n.alignAttr.x-o.left)))+"px"}),n.show(!0)}getLabelText(t){return s0(t.formatter)?t.formatter.call(this):t.text}destroy(){s2(this.axis.plotLinesAndBands,this),delete this.axis,s1(this)}}let{animObject:s8}=tR,{format:s7}=eo,{composed:ot,dateFormats:oe,doc:oi,isSafari:os}=k,{distribute:oo}=ed,{addEvent:or,clamp:oa,css:on,discardElement:oh,extend:ol,fireEvent:od,isArray:oc,isNumber:op,isObject:og,isString:ou,merge:of,pick:om,pushUnique:ox,splat:oy,syncTimeout:ob}=$;class ov{constructor(t,e,i){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=t,this.init(t,e),this.pointer=i}bodyFormatter(t){return t.map(t=>{let e=t.series.tooltipOptions,i=t.formatPrefix||"point";return(e[i+"Formatter"]||t.tooltipFormatter).call(t,e[i+"Format"]||"")})}cleanSplit(t){this.chart.series.forEach(function(e){let i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})}defaultFormatter(t){let e;let i=this.points||oy(this);return(e=(e=[t.headerFooterFormatter(i[0])]).concat(t.bodyFormatter(i))).push(t.headerFooterFormatter(i[0],!0)),e}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),oh(this.container)),$.clearTimeout(this.hideTimer)}getAnchor(t,e){let i;let{chart:s,pointer:o}=this,r=s.inverted,a=s.plotTop,n=s.plotLeft;if((t=oy(t))[0].series&&t[0].series.yAxis&&!t[0].series.yAxis.options.reversedStacks&&(t=t.slice().reverse()),this.followPointer&&e)void 0===e.chartX&&(e=o.normalize(e)),i=[e.chartX-n,e.chartY-a];else if(t[0].tooltipPos)i=t[0].tooltipPos;else{let s=0,o=0;t.forEach(function(t){let e=t.pos(!0);e&&(s+=e[0],o+=e[1])}),s/=t.length,o/=t.length,this.shared&&t.length>1&&e&&(r?s=e.chartX:o=e.chartY),i=[s-n,o-a]}return i.map(Math.round)}getClassName(t,e,i){let s=this.options,o=t.series,r=o.options;return[s.className,"highcharts-label",i&&"highcharts-tooltip-header",e?"highcharts-tooltip-box":"highcharts-tooltip",!i&&"highcharts-color-"+om(t.colorIndex,o.colorIndex),r&&r.className].filter(ou).join(" ")}getLabel({anchorX:t,anchorY:e}={anchorX:0,anchorY:0}){let i=this,s=this.chart.styledMode,o=this.options,r=this.split&&this.allowShared,a=this.container,n=this.chart.renderer;if(this.label){let t=!this.label.hasClass("highcharts-label");(!r&&t||r&&!t)&&this.destroy()}if(!this.label){if(this.outside){let t=this.chart,e=t.options.chart.style,i=er.getRendererType();this.container=a=k.doc.createElement("div"),a.className="highcharts-tooltip-container "+(t.renderTo.className.match(/(highcharts[a-zA-Z0-9-]+)\s?/gm)||""),on(a,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(e&&e.zIndex||0)+3)}),this.renderer=n=new i(a,0,0,e,void 0,void 0,n.styledMode)}if(r?this.label=n.g("tooltip"):(this.label=n.label("",t,e,o.shape,void 0,void 0,o.useHTML,void 0,"tooltip").attr({padding:o.padding,r:o.borderRadius}),s||this.label.attr({fill:o.backgroundColor,"stroke-width":o.borderWidth||0}).css(o.style).css({pointerEvents:o.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),i.outside){let t=this.label;[t.xSetter,t.ySetter].forEach((e,s)=>{t[s?"ySetter":"xSetter"]=o=>{e.call(t,i.distance),t[s?"y":"x"]=o,a&&(a.style[s?"top":"left"]=`${o}px`)}})}this.label.attr({zIndex:8}).shadow(o.shadow).add()}return a&&!a.parentElement&&k.doc.body.appendChild(a),this.label}getPlayingField(){let{body:t,documentElement:e}=oi,{chart:i,distance:s,outside:o}=this;return{width:o?Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)-2*s-2:i.chartWidth,height:o?Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight):i.chartHeight}}getPosition(t,e,i){let{distance:s,chart:o,outside:r,pointer:a}=this,{inverted:n,plotLeft:h,plotTop:l,polar:d}=o,{plotX:c=0,plotY:p=0}=i,g={},u=n&&i.h||0,{height:f,width:m}=this.getPlayingField(),x=a.getChartPosition(),y=t=>t*x.scaleX,b=t=>t*x.scaleY,v=i=>{let a="x"===i;return[i,a?m:f,a?t:e].concat(r?[a?y(t):b(e),a?x.left-s+y(c+h):x.top-s+b(p+l),0,a?m:f]:[a?t:e,a?c+h:p+l,a?h:l,a?h+o.plotWidth:l+o.plotHeight])},k=v("y"),w=v("x"),M,S=!!i.negative;!d&&o.hoverSeries?.yAxis?.reversed&&(S=!S);let T=!this.followPointer&&om(i.ttBelow,!d&&!n===S),C=function(t,e,i,o,a,n,h){let l=r?"y"===t?b(s):y(s):s,d=(i-o)/2,c=oe?m:m+u)}},A=function(t,e,i,o,r){if(re-s)return!1;re-o/2?g[t]=e-o-2:g[t]=r-i/2},P=function(t){[k,w]=[w,k],M=t},L=()=>{!1!==C.apply(0,k)?!1!==A.apply(0,w)||M||(P(!0),L()):M?g.x=g.y=0:(P(!0),L())};return(n&&!d||this.len>1)&&P(),L(),g}hide(t){let e=this;$.clearTimeout(this.hideTimer),t=om(t,this.options.hideDelay),this.isHidden||(this.hideTimer=ob(function(){let i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:()=>{i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0},t))}init(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=om(e.outside,!!(t.scrollablePixelsX||t.scrollablePixelsY))}shouldStickOnContact(t){return!!(!this.followPointer&&this.options.stickOnContact&&(!t||this.pointer.inClass(t.target,"highcharts-tooltip")))}move(t,e,i,s){let o=this,r=s8(!o.isHidden&&o.options.animation),a=o.followPointer||(o.len||0)>1,n={x:t,y:e};a||(n.anchorX=i,n.anchorY=s),r.step=()=>o.drawTracker(),o.getLabel().animate(n,r)}refresh(t,e){let{chart:i,options:s,pointer:o,shared:r}=this,a=oy(t),n=a[0],h=s.format,l=s.formatter||this.defaultFormatter,d=i.styledMode,c=this.allowShared;if(!s.enabled||!n.series)return;$.clearTimeout(this.hideTimer),this.allowShared=!(!oc(t)&&t.series&&t.series.noSharedTooltip),c=c&&!this.allowShared,this.followPointer=!this.split&&n.series.tooltipOptions.followPointer;let p=this.getAnchor(t,e),g=p[0],u=p[1];r&&this.allowShared&&(o.applyInactiveState(a),a.forEach(t=>t.setState("hover")),n.points=a),this.len=a.length;let f=ou(h)?s7(h,n,i):l.call(n,this);n.points=void 0;let m=n.series;if(this.distance=om(m.tooltipOptions.distance,16),!1===f)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(f,a);else{let t=g,r=u;if(e&&o.isDirectTouch&&(t=e.chartX-i.plotLeft,r=e.chartY-i.plotTop),i.polar||!1===m.options.clip||a.some(e=>o.isDirectTouch||e.series.shouldShowTooltip(t,r))){let t=this.getLabel(c&&this.tt||{});(!s.style.width||d)&&t.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),t.attr({class:this.getClassName(n),text:f&&f.join?f.join(""):f}),this.outside&&t.attr({x:oa(t.x||0,0,this.getPlayingField().width-(t.width||0)-1)}),d||t.attr({stroke:s.borderColor||n.color||m.color||"#666666"}),this.updatePosition({plotX:g,plotY:u,negative:n.negative,ttBelow:n.ttBelow,h:p[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}od(this,"refresh")}renderSplit(t,e){let i=this,{chart:s,chart:{chartWidth:o,chartHeight:r,plotHeight:a,plotLeft:n,plotTop:h,scrollablePixelsY:l=0,scrollablePixelsX:d,styledMode:c},distance:p,options:g,options:{positioner:u},pointer:f}=i,{scrollLeft:m=0,scrollTop:x=0}=s.scrollablePlotArea?.scrollingContainer||{},y=i.outside&&"number"!=typeof d?oi.documentElement.getBoundingClientRect():{left:m,right:m+o,top:x,bottom:x+r},b=i.getLabel(),v=this.renderer||s.renderer,k=!!(s.xAxis[0]&&s.xAxis[0].opposite),{left:w,top:M}=f.getChartPosition(),S=h+x,T=0,C=a-l;function A(t,e,s,o,r=!0){let a,n;return s?(a=k?0:C,n=oa(t-o/2,y.left,y.right-o-(i.outside?w:0))):(a=e-S,n=oa(n=r?t-o-p:t+p,r?n:y.left,y.right)),{x:n,y:a}}ou(t)&&(t=[!1,t]);let P=t.slice(0,e.length+1).reduce(function(t,s,o){if(!1!==s&&""!==s){let r=e[o-1]||{isHeader:!0,plotX:e[0].plotX,plotY:a,series:{}},l=r.isHeader,d=l?i:r.series,f=d.tt=function(t,e,s){let o=t,{isHeader:r,series:a}=e;if(!o){let t={padding:g.padding,r:g.borderRadius};c||(t.fill=g.backgroundColor,t["stroke-width"]=g.borderWidth??1),o=v.label("",0,0,g[r?"headerShape":"shape"],void 0,void 0,g.useHTML).addClass(i.getClassName(e,!0,r)).attr(t).add(b)}return o.isActive=!0,o.attr({text:s}),c||o.css(g.style).attr({stroke:g.borderColor||e.color||a.color||"#333333"}),o}(d.tt,r,s.toString()),m=f.getBBox(),x=m.width+f.strokeWidth();l&&(T=m.height,C+=T,k&&(S-=T));let{anchorX:w,anchorY:M}=function(t){let e,i;let{isHeader:s,plotX:o=0,plotY:r=0,series:l}=t;if(s)e=Math.max(n+o,n),i=h+a/2;else{let{xAxis:t,yAxis:s}=l;e=t.pos+oa(o,-p,t.len+p),l.shouldShowTooltip(0,s.pos-h+r,{ignoreX:!0})&&(i=s.pos+r)}return{anchorX:e=oa(e,y.left-p,y.right+p),anchorY:i}}(r);if("number"==typeof M){let e=m.height+1,s=u?u.call(i,x,e,r):A(w,M,l,x);t.push({align:u?0:void 0,anchorX:w,anchorY:M,boxWidth:x,point:r,rank:om(s.rank,l?1:0),size:e,target:s.y,tt:f,x:s.x})}else f.isActive=!1}return t},[]);!u&&P.some(t=>{let{outside:e}=i,s=(e?w:0)+t.anchorX;return ss})&&(P=P.map(t=>{let{x:e,y:i}=A(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1);return ol(t,{target:i,x:e})})),i.cleanSplit(),oo(P,C);let L={left:w,right:w};P.forEach(function(t){let{x:e,boxWidth:s,isHeader:o}=t;!o&&(i.outside&&w+eL.right&&(L.right=w+e))}),P.forEach(function(t){let{x:e,anchorX:s,anchorY:o,pos:r,point:{isHeader:a}}=t,n={visibility:void 0===r?"hidden":"inherit",x:e,y:(r||0)+S,anchorX:s,anchorY:o};if(i.outside&&e0&&(a||(n.x=e+t,n.anchorX=s+t),a&&(n.x=(L.right-L.left)/2,n.anchorX=s+t))}t.tt.attr(n)});let{container:O,outside:E,renderer:I}=i;if(E&&O&&I){let{width:t,height:e,x:i,y:s}=b.getBBox();I.setSize(t+i,e+s,!1),O.style.left=L.left+"px",O.style.top=M+"px"}os&&b.attr({opacity:1===b.opacity?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let t=this.chart,e=this.label,i=this.shared?t.hoverPoints:t.hoverPoint;if(!e||!i)return;let s={x:0,y:0,width:0,height:0},o=this.getAnchor(i),r=e.getBBox();o[0]+=t.plotLeft-(e.translateX||0),o[1]+=t.plotTop-(e.translateY||0),s.x=Math.min(0,o[0]),s.y=Math.min(0,o[1]),s.width=o[0]<0?Math.max(Math.abs(o[0]),r.width-o[0]):Math.max(Math.abs(o[0]),r.width),s.height=o[1]<0?Math.max(Math.abs(o[1]),r.height-Math.abs(o[1])):Math.max(Math.abs(o[1]),r.height),this.tracker?this.tracker.attr(s):(this.tracker=e.renderer.rect(s).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}headerFooterFormatter(t,e){let i=t.series,s=i.tooltipOptions,o=i.xAxis,r=o&&o.dateTime,a={isFooter:e,point:t},n=s.xDateFormat||"",h=s[e?"footerFormat":"headerFormat"];return od(this,"headerFormatter",a,function(e){if(r&&!n&&op(t.key)&&(n=r.getXDateFormat(t.key,s.dateTimeLabelFormats)),r&&n){if(og(n)){let t=n;oe[0]=e=>i.chart.time.dateFormat(t,e),n="%0"}(t.tooltipDateKeys||["key"]).forEach(t=>{h=h.replace(RegExp("point\\."+t+"([ \\)}])",""),`(point.${t}:${n})$1`)})}i.chart.styledMode&&(h=this.styledModeFormat(h)),e.text=s7(h,t,this.chart)}),a.text||""}update(t){this.destroy(),this.init(this.chart,of(!0,this.options,t))}updatePosition(t){let{chart:e,container:i,distance:s,options:o,pointer:r,renderer:a}=this,{height:n=0,width:h=0}=this.getLabel(),{left:l,top:d,scaleX:c,scaleY:p}=r.getChartPosition(),g=(o.positioner||this.getPosition).call(this,h,n,t),u=k.doc,f=(t.plotX||0)+e.plotLeft,m=(t.plotY||0)+e.plotTop,x;a&&i&&(o.positioner&&(g.x+=l-s,g.y+=d-s),x=(o.borderWidth||0)+2*s+2,a.setSize(oa(h+x,0,u.documentElement.clientWidth)-1,n+x,!1),(1!==c||1!==p)&&(on(i,{transform:`scale(${c}, ${p})`}),f*=c,m*=p),f+=l-g.x,m+=d-g.y),this.move(Math.round(g.x),Math.round(g.y||0),f,m)}}!function(t){t.compose=function(e){ox(ot,"Core.Tooltip")&&or(e,"afterInit",function(){let e=this.chart;e.options.tooltip&&(e.tooltip=new t(e,e.options.tooltip,this))})}}(ov||(ov={}));let ok=ov,{animObject:ow}=tR,{defaultOptions:oM}=tm,{format:oS}=eo,{addEvent:oT,crisp:oC,erase:oA,extend:oP,fireEvent:oL,getNestedProperty:oO,isArray:oE,isFunction:oI,isNumber:oD,isObject:oB,merge:oN,pick:oz,syncTimeout:oR,removeEvent:oW,uniqueKey:oH}=$;class oX{animateBeforeDestroy(){let t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach(function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)}),i.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(oP({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})}applyOptions(t,e){let i=this.series,s=i.options.pointValKey||i.pointValKey;return oP(this,t=oX.prototype.optionsToObject.call(this,t)),this.options=this.options?oP(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,s&&(this.y=oX.prototype.getNestedProperty.call(this,s)),this.selected&&(this.state="select"),"name"in this&&void 0===e&&i.xAxis&&i.xAxis.hasNames&&(this.x=i.xAxis.nameToX(this)),void 0===this.x&&i?this.x=e??i.autoIncrement():oD(t.x)&&i.options.relativeXValue?this.x=i.autoIncrement(t.x):"string"==typeof this.x&&(e??(e=i.chart.time.parse(this.x)),oD(e)&&(this.x=e)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let t=this,e=t.series,i=e.chart,s=e.options.dataSorting,o=i.hoverPoints,r=ow(t.series.chart.renderer.globalAnimation),a=()=>{for(let e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(oW(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),o&&(t.setState(),oA(o,t),o.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),s&&s.enabled?(this.animateBeforeDestroy(),oR(a,r.duration)):a(),i.pointCount--}this.destroyed=!0}destroyElements(t){let e=this,i=e.getGraphicalProps(t);i.singular.forEach(function(t){e[t]=e[t].destroy()}),i.plural.forEach(function(t){e[t].forEach(function(t){t&&t.element&&t.destroy()}),delete e[t]})}firePointEvent(t,e,i){let s=this,o=this.series.options;s.manageEvent(t),"click"===t&&o.allowPointSelect&&(i=function(t){!s.destroyed&&s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),oL(s,t,e,i)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(t){let e,i;let s=this,o=[],r={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&o.push("graphic","connector"),t.dataLabel&&o.push("dataLabel","dataLabelPath","dataLabelUpper"),i=o.length;i--;)s[e=o[i]]&&r.singular.push(e);return["graphic","dataLabel"].forEach(function(e){let i=e+"s";t[e]&&s[i]&&r.plural.push(i)}),r}getNestedProperty(t){return t?0===t.indexOf("custom.")?oO(t,this.options):this[t]:void 0}getZone(){let t=this.series,e=t.zones,i=t.zoneAxis||"y",s,o=0;for(s=e[0];this[i]>=s.value;)s=e[++o];return this.nonZonedColor||(this.nonZonedColor=this.color),s&&s.color&&!this.options.color?this.color=s.color:this.color=this.nonZonedColor,s}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(t,e,i){this.formatPrefix="point",this.visible=!0,this.point=this,this.series=t,this.applyOptions(e,i),this.id??(this.id=oH()),this.resolveColor(),t.chart.pointCount++,oL(this,"afterInit")}isValid(){return(oD(this.x)||this.x instanceof Date)&&oD(this.y)}optionsToObject(t){let e=this.series,i=e.options.keys,s=i||e.pointArrayMap||["y"],o=s.length,r={},a,n=0,h=0;if(oD(t)||null===t)r[s[0]]=t;else if(oE(t))for(!i&&t.length>o&&("string"==(a=typeof t[0])?e.xAxis?.dateTime?r.x=e.chart.time.parse(t[0]):r.name=t[0]:"number"===a&&(r.x=t[0]),n++);h0?oX.prototype.setNestedProperty(r,t[n],s[h]):r[s[h]]=t[n]),n++,h++;else"object"==typeof t&&(r=t,t.dataLabels&&(e.hasDataLabels=()=>!0),t.marker&&(e._hasPointMarkers=!0));return r}pos(t,e=this.plotY){if(!this.destroyed){let{plotX:i,series:s}=this,{chart:o,xAxis:r,yAxis:a}=s,n=0,h=0;if(oD(i)&&oD(e))return t&&(n=r?r.pos:o.plotLeft,h=a?a.pos:o.plotTop),o.inverted&&r&&a?[a.len-e+h,r.len-i+n]:[i+n,e+h]}}resolveColor(){let t=this.series,e=t.chart.options.chart,i=t.chart.styledMode,s,o,r=e.colorCount,a;delete this.nonZonedColor,t.options.colorByPoint?(i||(s=(o=t.options.colors||t.chart.options.colors)[t.colorCounter],r=o.length),a=t.colorCounter,t.colorCounter++,t.colorCounter===r&&(t.colorCounter=0)):(i||(s=t.color),a=t.colorIndex),this.colorIndex=oz(this.options.colorIndex,a),this.color=oz(this.options.color,s)}setNestedProperty(t,e,i){return i.split(".").reduce(function(t,i,s,o){let r=o.length-1===s;return t[i]=r?e:oB(t[i],!0)?t[i]:{},t[i]},t),t}shouldDraw(){return!this.isNull}tooltipFormatter(t){let{chart:e,pointArrayMap:i=["y"],tooltipOptions:s}=this.series,{valueDecimals:o="",valuePrefix:r="",valueSuffix:a=""}=s;return e.styledMode&&(t=e.tooltip?.styledModeFormat(t)||t),i.forEach(e=>{e="{point."+e,(r||a)&&(t=t.replace(RegExp(e+"}","g"),r+e+"}"+a)),t=t.replace(RegExp(e+"}","g"),e+":,."+o+"f}")}),oS(t,this,e)}update(t,e,i,s){let o;let r=this,a=r.series,n=r.graphic,h=a.chart,l=a.options;function d(){r.applyOptions(t);let s=n&&r.hasMockGraphic,d=null===r.y?!s:s;n&&d&&(r.graphic=n.destroy(),delete r.hasMockGraphic),oB(t,!0)&&(n&&n.element&&t&&t.marker&&void 0!==t.marker.symbol&&(r.graphic=n.destroy()),t?.dataLabels&&r.dataLabel&&(r.dataLabel=r.dataLabel.destroy())),o=r.index;let c={};for(let t of a.dataColumnKeys())c[t]=r[t];a.dataTable.setRow(c,o),l.data[o]=oB(l.data[o],!0)||oB(t,!0)?r.options:oz(t,l.data[o]),a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===l.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}e=oz(e,!0),!1===s?d():r.firePointEvent("update",{options:t},d)}remove(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}select(t,e){let i=this,s=i.series,o=s.chart;t=oz(t,!i.selected),this.selectedStaging=t,i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,s.options.data[s.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||o.getSelectedPoints().forEach(function(t){let e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(o.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(t){let{inverted:e,pointer:i}=this.series.chart;i&&(t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e),i.runPointActions(t,this))}onMouseOut(){let t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null}manageEvent(t){let e=oN(this.series.options.point,this.options),i=e.events?.[t];oI(i)&&(!this.hcEvents?.[t]||this.hcEvents?.[t]?.map(t=>t.fn).indexOf(i)===-1)?(this.importedUserEvent?.(),this.importedUserEvent=oT(this,t,i),this.hcEvents&&(this.hcEvents[t].userEvent=!0)):this.importedUserEvent&&!i&&this.hcEvents?.[t]&&this.hcEvents?.[t].userEvent&&(oW(this,t),delete this.hcEvents[t],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(t,e){let i=this.series,s=this.state,o=i.options.states[t||"normal"]||{},r=oM.plotOptions[i.type].marker&&i.options.marker,a=r&&!1===r.enabled,n=r&&r.states&&r.states[t||"normal"]||{},h=!1===n.enabled,l=this.marker||{},d=i.chart,c=r&&i.markerAttribs,p=i.halo,g,u,f,m=i.stateMarkerGraphic,x;if((t=t||"")===this.state&&!e||this.selected&&"select"!==t||!1===o.enabled||t&&(h||a&&!1===n.enabled)||t&&l.states&&l.states[t]&&!1===l.states[t].enabled)return;if(this.state=t,c&&(g=i.markerAttribs(this,t)),this.graphic&&!this.hasMockGraphic){if(s&&this.graphic.removeClass("highcharts-point-"+s),t&&this.graphic.addClass("highcharts-point-"+t),!d.styledMode){u=i.pointAttribs(this,t),f=oz(d.options.chart.animation,o.animation);let e=u.opacity;i.options.inactiveOtherPoints&&oD(e)&&(this.dataLabels||[]).forEach(function(t){t&&!t.hasClass("highcharts-data-label-hidden")&&(t.animate({opacity:e},f),t.connector&&t.connector.animate({opacity:e},f))}),this.graphic.animate(u,f)}g&&this.graphic.animate(g,oz(d.options.chart.animation,n.animation,r.animation)),m&&m.hide()}else t&&n&&(x=l.symbol||i.symbol,m&&m.currentSymbol!==x&&(m=m.destroy()),g&&(m?m[e?"animate":"attr"]({x:g.x,y:g.y}):x&&(i.stateMarkerGraphic=m=d.renderer.symbol(x,g.x,g.y,g.width,g.height,oN(r,n)).add(i.markerGroup),m.currentSymbol=x)),!d.styledMode&&m&&"inactive"!==this.state&&m.attr(i.pointAttribs(this,t))),m&&(m[t&&this.isInside?"show":"hide"](),m.element.point=this,m.addClass(this.getClassName(),!0));let y=o.halo,b=this.graphic||m,v=b&&b.visibility||"inherit";y&&y.size&&b&&"hidden"!==v&&!this.isCluster?(p||(i.halo=p=d.renderer.path().add(b.parentGroup)),p.show()[e?"animate":"attr"]({d:this.haloPath(y.size)}),p.attr({class:"highcharts-halo highcharts-color-"+oz(this.colorIndex,i.colorIndex)+(this.className?" "+this.className:""),visibility:v,zIndex:-1}),p.point=this,d.styledMode||p.attr(oP({fill:this.color||i.color,"fill-opacity":y.opacity},tK.filterUserAttributes(y.attributes||{})))):p?.point?.haloPath&&!p.point.destroyed&&p.animate({d:p.point.haloPath(0)},null,p.hide),oL(this,"afterSetState",{state:t})}haloPath(t){let e=this.pos();return e?this.series.chart.renderer.symbols.circle(oC(e[0],1)-t,e[1]-t,2*t,2*t):[]}}let oF=oX,{parse:oG}=tk,{charts:oY,composed:oj,isTouchDevice:oU}=k,{addEvent:o$,attr:oV,css:o_,extend:oq,find:oZ,fireEvent:oK,isNumber:oJ,isObject:oQ,objectEach:o0,offset:o1,pick:o2,pushUnique:o3,splat:o5}=$;class o6{applyInactiveState(t){let e=[],i;(t||[]).forEach(function(t){i=t.series,e.push(i),i.linkedParent&&e.push(i.linkedParent),i.linkedSeries&&(e=e.concat(i.linkedSeries)),i.navigatorSeries&&e.push(i.navigatorSeries)}),this.chart.series.forEach(function(t){-1===e.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})}destroy(){let t=this;this.eventsToUnbind.forEach(t=>t()),this.eventsToUnbind=[],!k.chartCount&&(o6.unbindDocumentMouseUp.forEach(t=>t.unbind()),o6.unbindDocumentMouseUp.length=0,o6.unbindDocumentTouchEnd&&(o6.unbindDocumentTouchEnd=o6.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),o0(t,function(e,i){t[i]=void 0})}getSelectionMarkerAttrs(t,e){let i={args:{chartX:t,chartY:e},attrs:{},shapeType:"rect"};return oK(this,"getSelectionMarkerAttrs",i,i=>{let s;let{chart:o,zoomHor:r,zoomVert:a}=this,{mouseDownX:n=0,mouseDownY:h=0}=o,l=i.attrs;l.x=o.plotLeft,l.y=o.plotTop,l.width=r?1:o.plotWidth,l.height=a?1:o.plotHeight,r&&(s=t-n,l.width=Math.max(1,Math.abs(s)),l.x=(s>0?0:s)+n),a&&(s=e-h,l.height=Math.max(1,Math.abs(s)),l.y=(s>0?0:s)+h)}),i}drag(t){let{chart:e}=this,{mouseDownX:i=0,mouseDownY:s=0}=e,{panning:o,panKey:r,selectionMarkerFill:a}=e.options.chart,n=e.plotLeft,h=e.plotTop,l=e.plotWidth,d=e.plotHeight,c=oQ(o)?o.enabled:o,p=r&&t[`${r}Key`],g=t.chartX,u=t.chartY,f,m=this.selectionMarker;if((!m||!m.touch)&&(gn+l&&(g=n+l),uh+d&&(u=h+d),this.hasDragged=Math.sqrt(Math.pow(i-g,2)+Math.pow(s-u,2)),this.hasDragged>10)){f=e.isInsidePlot(i-n,s-h,{visiblePlotOnly:!0});let{shapeType:r,attrs:l}=this.getSelectionMarkerAttrs(g,u);(e.hasCartesianSeries||e.mapView)&&this.hasZoom&&f&&!p&&!m&&(this.selectionMarker=m=e.renderer[r](),m.attr({class:"highcharts-selection-marker",zIndex:7}).add(),e.styledMode||m.attr({fill:a||oG("#334eff").setOpacity(.25).get()})),m&&m.attr(l),f&&!m&&c&&e.pan(t,o)}}dragStart(t){let e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=t.chartX,e.mouseDownY=t.chartY}getSelectionBox(t){let e={args:{marker:t},result:t.getBBox()};return oK(this,"getSelectionBox",e),e.result}drop(t){let e;let{chart:i,selectionMarker:s}=this;for(let t of i.axes)t.isPanning&&(t.isPanning=!1,(t.options.startOnTick||t.options.endOnTick||t.series.some(t=>t.boosted))&&(t.forceRedraw=!0,t.setExtremes(t.userMin,t.userMax,!1),e=!0));if(e&&i.redraw(),s&&t){if(this.hasDragged){let e=this.getSelectionBox(s);i.transform({axes:i.axes.filter(t=>t.zoomEnabled&&("xAxis"===t.coll&&this.zoomX||"yAxis"===t.coll&&this.zoomY)),selection:{originalEvent:t,xAxis:[],yAxis:[],...e},from:e})}oJ(i.index)&&(this.selectionMarker=s.destroy())}i&&oJ(i.index)&&(o_(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[])}findNearestKDPoint(t,e,i){let s;return t.forEach(function(t){let o=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y"),r=t.searchPoint(i,o);oQ(r,!0)&&r.series&&(!oQ(s,!0)||function(t,i){let s=t.distX-i.distX,o=t.dist-i.dist,r=i.series.group?.zIndex-t.series.group?.zIndex;return 0!==s&&e?s:0!==o?o:0!==r?r:t.series.index>i.series.index?-1:1}(s,r)>0)&&(s=r)}),s}getChartCoordinatesFromPoint(t,e){let{xAxis:i,yAxis:s}=t.series,o=t.shapeArgs;if(i&&s){let r=t.clientX??t.plotX??0,a=t.plotY||0;return t.isNode&&o&&oJ(o.x)&&oJ(o.y)&&(r=o.x,a=o.y),e?{chartX:s.len+s.pos-a,chartY:i.len+i.pos-r}:{chartX:r+i.pos,chartY:a+s.pos}}if(o&&o.x&&o.y)return{chartX:o.x,chartY:o.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:t}=this.chart,e=o1(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};let{offsetHeight:i,offsetWidth:s}=t;return s>2&&i>2&&(this.chartPosition.scaleX=e.width/s,this.chartPosition.scaleY=e.height/i),this.chartPosition}getCoordinates(t){let e={xAxis:[],yAxis:[]};for(let i of this.chart.axes)e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])});return e}getHoverData(t,e,i,s,o,r){let a=[],n=function(t){return t.visible&&!(!o&&t.directTouch)&&o2(t.options.enableMouseTracking,!0)},h=e,l,d={chartX:r?r.chartX:void 0,chartY:r?r.chartY:void 0,shared:o};oK(this,"beforeGetHoverData",d),l=h&&!h.stickyTracking?[h]:i.filter(t=>t.stickyTracking&&(d.filter||n)(t));let c=s&&t||!r?t:this.findNearestKDPoint(l,o,r);return h=c&&c.series,c&&(o&&!h.noSharedTooltip?(l=i.filter(function(t){return d.filter?d.filter(t):n(t)&&!t.noSharedTooltip})).forEach(function(t){let e=oZ(t.points,function(t){return t.x===c.x&&!t.isNull});oQ(e)&&(t.boosted&&t.boost&&(e=t.boost.getPoint(e)),a.push(e))}):a.push(c)),oK(this,"afterGetHoverData",d={hoverPoint:c}),{hoverPoint:d.hoverPoint,hoverSeries:h,hoverPoints:a}}getPointFromEvent(t){let e=t.target,i;for(;e&&!i;)i=e.point,e=e.parentNode;return i}onTrackerMouseOut(t){let e=this.chart,i=t.relatedTarget,s=e.hoverSeries;this.isDirectTouch=!1,!s||!i||s.stickyTracking||this.inClass(i,"highcharts-tooltip")||this.inClass(i,"highcharts-series-"+s.index)&&this.inClass(i,"highcharts-tracker")||s.onMouseOut()}inClass(t,e){let i=t,s;for(;i;){if(s=oV(i,"class")){if(-1!==s.indexOf(e))return!0;if(-1!==s.indexOf("highcharts-container"))return!1}i=i.parentElement}}constructor(t,e){this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=e,this.chart=t,this.runChartClick=!!e.chart.events?.click,this.pinchDown=[],this.setDOMEvents(),oK(this,"afterInit")}normalize(t,e){let i=t.touches,s=i?i.length?i.item(0):o2(i.changedTouches,t.changedTouches)[0]:t;e||(e=this.getChartPosition());let o=s.pageX-e.left,r=s.pageY-e.top;return oq(t,{chartX:Math.round(o/=e.scaleX),chartY:Math.round(r/=e.scaleY)})}onContainerClick(t){let e=this.chart,i=e.hoverPoint,s=this.normalize(t),o=e.plotLeft,r=e.plotTop;!e.cancelClick&&(i&&this.inClass(s.target,"highcharts-tracker")?(oK(i.series,"click",oq(s,{point:i})),e.hoverPoint&&i.firePointEvent("click",s)):(oq(s,this.getCoordinates(s)),e.isInsidePlot(s.chartX-o,s.chartY-r,{visiblePlotOnly:!0})&&oK(e,"click",s)))}onContainerMouseDown(t){let e=(1&(t.buttons||t.button))==1;t=this.normalize(t),k.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||e)&&(this.zoomOption(t),e&&t.preventDefault?.(),this.dragStart(t))}onContainerMouseLeave(t){let{pointer:e}=oY[o2(o6.hoverChartIndex,-1)]||{};t=this.normalize(t),this.onContainerMouseMove(t),e&&!this.inClass(t.relatedTarget,"highcharts-tooltip")&&(e.reset(),e.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(t){let e=this.chart,i=e.tooltip,s=this.normalize(t);this.setHoverChartIndex(t),("mousedown"===e.mouseIsDown||this.touchSelect(s))&&this.drag(s),!e.openMenu&&(this.inClass(s.target,"highcharts-tracker")||e.isInsidePlot(s.chartX-e.plotLeft,s.chartY-e.plotTop,{visiblePlotOnly:!0}))&&!(i&&i.shouldStickOnContact(s))&&(this.inClass(s.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(s))}onDocumentTouchEnd(t){this.onDocumentMouseUp(t)}onContainerTouchMove(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)}onContainerTouchStart(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))}onDocumentMouseMove(t){let e=this.chart,i=e.tooltip,s=this.chartPosition,o=this.normalize(t,s);!s||e.isInsidePlot(o.chartX-e.plotLeft,o.chartY-e.plotTop,{visiblePlotOnly:!0})||i&&i.shouldStickOnContact(o)||o.target!==e.container.ownerDocument&&this.inClass(o.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(t){oY[o2(o6.hoverChartIndex,-1)]?.pointer?.drop(t)}pinch(t){let e=this,{chart:i,hasZoom:s,lastTouches:o}=e,r=[].map.call(t.touches||[],t=>e.normalize(t)),a=r.length,n=1===a&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),h=i.tooltip,l=1===a&&o2(h?.options.followTouchMove,!0);a>1?e.initiated=!0:l&&(e.initiated=!1),s&&e.initiated&&!n&&!1!==t.cancelable&&t.preventDefault(),"touchstart"===t.type?(e.pinchDown=r,e.res=!0,i.mouseDownX=t.chartX):l?this.runPointActions(e.normalize(t)):o&&(oK(i,"touchpan",{originalEvent:t,touches:r},()=>{let e=t=>{let e=t[0],i=t[1]||e;return{x:e.chartX,y:e.chartY,width:i.chartX-e.chartX,height:i.chartY-e.chartY}};i.transform({axes:i.axes.filter(t=>t.zoomEnabled&&(this.zoomHor&&t.horiz||this.zoomVert&&!t.horiz)),to:e(r),from:e(o),trigger:t.type})}),e.res&&(e.res=!1,this.reset(!1,0))),e.lastTouches=r}reset(t,e){let i=this.chart,s=i.hoverSeries,o=i.hoverPoint,r=i.hoverPoints,a=i.tooltip,n=a&&a.shared?r:o;t&&n&&o5(n).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?a&&n&&o5(n).length&&(a.refresh(n),a.shared&&r?r.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):o&&(o.setState(o.state,!0),i.axes.forEach(function(t){t.crosshair&&o.series[t.coll]===t&&t.drawCrosshair(null,o)}))):(o&&o.onMouseOut(),r&&r.forEach(function(t){t.setState()}),s&&s.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),i.hoverPoints=i.hoverPoint=void 0)}runPointActions(t,e,i){let s=this.chart,o=s.series,r=s.tooltip&&s.tooltip.options.enabled?s.tooltip:void 0,a=!!r&&r.shared,n=e||s.hoverPoint,h=n&&n.series||s.hoverSeries,l=(!t||"touchmove"!==t.type)&&(!!e||h&&h.directTouch&&this.isDirectTouch),d=this.getHoverData(n,h,o,l,a,t);n=d.hoverPoint,h=d.hoverSeries;let c=d.hoverPoints,p=h&&h.tooltipOptions.followPointer&&!h.tooltipOptions.split,g=a&&h&&!h.noSharedTooltip;if(n&&(i||n!==s.hoverPoint||r&&r.isHidden)){if((s.hoverPoints||[]).forEach(function(t){-1===c.indexOf(t)&&t.setState()}),s.hoverSeries!==h&&h.onMouseOver(),this.applyInactiveState(c),(c||[]).forEach(function(t){t.setState("hover")}),s.hoverPoint&&s.hoverPoint.firePointEvent("mouseOut"),!n.series)return;s.hoverPoints=c,s.hoverPoint=n,n.firePointEvent("mouseOver",void 0,()=>{r&&n&&r.refresh(g?c:n,t)})}else if(p&&r&&!r.isHidden){let e=r.getAnchor([{}],t);s.isInsidePlot(e[0],e[1],{visiblePlotOnly:!0})&&r.updatePosition({plotX:e[0],plotY:e[1]})}this.unDocMouseMove||(this.unDocMouseMove=o$(s.container.ownerDocument,"mousemove",t=>oY[o6.hoverChartIndex??-1]?.pointer?.onDocumentMouseMove(t)),this.eventsToUnbind.push(this.unDocMouseMove)),s.axes.forEach(function(e){let i;let o=o2((e.crosshair||{}).snap,!0);!o||(i=s.hoverPoint)&&i.series[e.coll]===e||(i=oZ(c,t=>t.series&&t.series[e.coll]===e)),i||!o?e.drawCrosshair(t,i):e.hideCrosshair()})}setDOMEvents(){let t=this.chart.container,e=t.ownerDocument;t.onmousedown=this.onContainerMouseDown.bind(this),t.onmousemove=this.onContainerMouseMove.bind(this),t.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(o$(t,"mouseenter",this.onContainerMouseEnter.bind(this)),o$(t,"mouseleave",this.onContainerMouseLeave.bind(this))),o6.unbindDocumentMouseUp.some(t=>t.doc===e)||o6.unbindDocumentMouseUp.push({doc:e,unbind:o$(e,"mouseup",this.onDocumentMouseUp.bind(this))});let i=this.chart.renderTo.parentElement;for(;i&&"BODY"!==i.tagName;)this.eventsToUnbind.push(o$(i,"scroll",()=>{delete this.chartPosition})),i=i.parentElement;this.eventsToUnbind.push(o$(t,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),o$(t,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),o6.unbindDocumentTouchEnd||(o6.unbindDocumentTouchEnd=o$(e,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),o$(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){if(!oU)return;let t=this.pointerCaptureEventsToUnbind,e=this.chart,i=e.container,s=o2(e.options.tooltip?.followTouchMove,!0)&&e.series.some(t=>t.options.findNearestPointBy.indexOf("y")>-1);!this.hasPointerCapture&&s?(t.push(o$(i,"pointerdown",t=>{t.target?.hasPointerCapture(t.pointerId)&&t.target?.releasePointerCapture(t.pointerId)}),o$(i,"pointermove",t=>{e.pointer?.getPointFromEvent(t)?.onMouseOver(t)})),e.styledMode||o_(i,{"touch-action":"none"}),i.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!s&&(t.forEach(t=>t()),t.length=0,e.styledMode||o_(i,{"touch-action":o2(e.options.chart.style?.["touch-action"],"manipulation")}),i.className=i.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(t){let e=this.chart,i=k.charts[o2(o6.hoverChartIndex,-1)];if(i&&i!==e){let s={relatedTarget:e.container};t&&!t?.relatedTarget&&Object.assign({},t,s),i.pointer?.onContainerMouseLeave(t||s)}i&&i.mouseIsDown||(o6.hoverChartIndex=e.index)}touch(t,e){let i;let{chart:s,pinchDown:o=[]}=this;this.setHoverChartIndex(),1===(t=this.normalize(t)).touches.length?s.isInsidePlot(t.chartX-s.plotLeft,t.chartY-s.plotTop,{visiblePlotOnly:!0})&&!s.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(i=!!o[0]&&Math.pow(o[0].chartX-t.chartX,2)+Math.pow(o[0].chartY-t.chartY,2)>=16),o2(i,!0)&&this.pinch(t)):e&&this.reset():2===t.touches.length&&this.pinch(t)}touchSelect(t){return!!(this.chart.zooming.singleTouch&&t.touches&&1===t.touches.length)}zoomOption(t){let e=this.chart,i=e.inverted,s=e.zooming.type||"",o,r;/touch/.test(t.type)&&(s=o2(e.zooming.pinchType,s)),this.zoomX=o=/x/.test(s),this.zoomY=r=/y/.test(s),this.zoomHor=o&&!i||r&&i,this.zoomVert=r&&!i||o&&i,this.hasZoom=o||r}}o6.unbindDocumentMouseUp=[],function(t){t.compose=function(e){o3(oj,"Core.Pointer")&&o$(e,"beforeRender",function(){this.pointer=new t(this,this.options)})}}(o6||(o6={}));let o9=o6,{fireEvent:o4,isArray:o8,objectEach:o7,uniqueKey:rt}=$,re=class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||rt(),this.modified=this,this.rowCount=0,this.versionTag=rt();let e=0;o7(t.columns||{},(t,i)=>{this.columns[i]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,o7(this.columns,e=>{o8(e)&&(e.length=t)})}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],i=0,s){this.setColumns({[t]:e},i,s)}setColumns(t,e,i){let s=this.rowCount;o7(t,(t,e)=>{this.columns[e]=t.slice(),s=t.length}),this.applyRowCount(s),i?.silent||(o4(this,"afterSetColumns"),this.versionTag=rt())}setRow(t,e=this.rowCount,i,s){let{columns:o}=this,r=i?this.rowCount+1:e+1;o7(t,(t,a)=>{let n=o[a]||s?.addColumns!==!1&&Array(r);n&&(i?n.splice(e,0,t):n[e]=t,o[a]=n)}),r>this.rowCount&&this.applyRowCount(r),s?.silent||(o4(this,"afterSetRows"),this.versionTag=rt())}},{extend:ri,merge:rs,pick:ro}=$;!function(t){function e(t,e,i){let s=this.legendItem=this.legendItem||{},{chart:o,options:r}=this,{baseline:a=0,symbolWidth:n,symbolHeight:h}=t,l=this.symbol||"circle",d=h/2,c=o.renderer,p=s.group,g=a-Math.round((t.fontMetrics?.b||h)*(i?.4:.3)),u={},f,m=r.marker,x=0;if(o.styledMode||(u["stroke-width"]=Math.min(r.lineWidth||0,24),r.dashStyle?u.dashstyle=r.dashStyle:"square"===r.linecap||(u["stroke-linecap"]="round")),s.line=c.path().addClass("highcharts-graph").attr(u).add(p),i&&(s.area=c.path().addClass("highcharts-area").add(p)),u["stroke-linecap"]&&(x=Math.min(s.line.strokeWidth(),n)/2),n){let t=[["M",x,g],["L",n-x,g]];s.line.attr({d:t}),s.area?.attr({d:[...t,["L",n-x,a],["L",x,a]]})}if(m&&!1!==m.enabled&&n){let t=Math.min(ro(m.radius,d),d);0===l.indexOf("url")&&(m=rs(m,{width:h,height:h}),t=0),s.symbol=f=c.symbol(l,n/2-t,g-t,2*t,2*t,ri({context:"legend"},m)).addClass("highcharts-point").add(p),f.isMarker=!0}}t.areaMarker=function(t,i){e.call(this,t,i,!0)},t.lineMarker=e,t.rectangle=function(t,e){let i=e.legendItem||{},s=t.options,o=t.symbolHeight,r=s.squareSymbol,a=r?o:t.symbolWidth;i.symbol=this.chart.renderer.rect(r?(t.symbolWidth-o)/2:0,t.baseline-o+1,a,o,ro(t.options.symbolRadius,o/2)).addClass("highcharts-point").attr({zIndex:3}).add(i.group)}}(d||(d={}));let rr=d,{defaultOptions:ra}=tm,{extend:rn,extendClass:rh,merge:rl}=$;!function(t){function e(e,i){let s=ra.plotOptions||{},o=i.defaultOptions,r=i.prototype;return r.type=e,r.pointClass||(r.pointClass=oF),!t.seriesTypes[e]&&(o&&(s[e]=o),t.seriesTypes[e]=i,!0)}t.seriesTypes=k.seriesTypes,t.registerSeriesType=e,t.seriesType=function(i,s,o,r,a){let n=ra.plotOptions||{};if(s=s||"",n[i]=rl(n[s],o),delete t.seriesTypes[i],e(i,rh(t.seriesTypes[s]||function(){},r)),t.seriesTypes[i].prototype.type=i,a){class e extends oF{}rn(e.prototype,a),t.seriesTypes[i].prototype.pointClass=e}return t.seriesTypes[i]}}(c||(c={}));let rd=c,{animObject:rc,setAnimation:rp}=tR,{defaultOptions:rg}=tm,{registerEventOptions:ru}=i3,{svg:rf,win:rm}=k,{seriesTypes:rx}=rd,{arrayMax:ry,arrayMin:rb,clamp:rv,correctFloat:rk,crisp:rw,defined:rM,destroyObjectProperties:rS,diffObjects:rT,erase:rC,error:rA,extend:rP,find:rL,fireEvent:rO,getClosestDistance:rE,getNestedProperty:rI,insertItem:rD,isArray:rB,isNumber:rN,isString:rz,merge:rR,objectEach:rW,pick:rH,removeEvent:rX,syncTimeout:rF}=$;class rG{constructor(){this.zoneAxis="y"}init(t,e){let i;rO(this,"init",{options:e}),this.dataTable??(this.dataTable=new re);let s=t.series;this.eventsToUnbind=[],this.chart=t,this.options=this.setOptions(e);let o=this.options,r=!1!==o.visible;this.linkedSeries=[],this.bindAxes(),rP(this,{name:o.name,state:"",visible:r,selected:!0===o.selected}),ru(this,o);let a=o.events;(a&&a.click||o.point&&o.point.events&&o.point.events.click||o.allowPointSelect)&&(t.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.isCartesian&&(t.hasCartesianSeries=!0),s.length&&(i=s[s.length-1]),this._i=rH(i&&i._i,-1)+1,this.opacity=this.options.opacity,t.orderItems("series",rD(this,s)),o.dataSorting&&o.dataSorting.enabled?this.setDataSortingOptions():this.points||this.data||this.setData(o.data,!1),rO(this,"afterInit")}is(t){return rx[t]&&this instanceof rx[t]}bindAxes(){let t;let e=this,i=e.options,s=e.chart;rO(this,"bindAxes",null,function(){(e.axisTypes||[]).forEach(function(o){(s[o]||[]).forEach(function(s){t=s.options,(rH(i[o],0)===s.index||void 0!==i[o]&&i[o]===t.id)&&(rD(e,s.series),e[o]=s,s.isDirty=!0)}),e[o]||e.optionalAxis===o||rA(18,!0,s)})}),rO(this,"afterBindAxes")}hasData(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.dataTable.rowCount>0}hasMarkerChanged(t,e){let i=t.marker,s=e.marker||{};return i&&(s.enabled&&!i.enabled||s.symbol!==i.symbol||s.height!==i.height||s.width!==i.width)}autoIncrement(t){let e;let i=this.options,{pointIntervalUnit:s,relativeXValue:o}=this.options,r=this.chart.time,a=this.xIncrement??r.parse(i.pointStart)??0;if(this.pointInterval=e=rH(this.pointInterval,i.pointInterval,1),o&&rN(t)&&(e*=t),s){let t=r.toParts(a);"day"===s?t[2]+=e:"month"===s?t[1]+=e:"year"===s&&(t[0]+=e),e=r.makeTime.apply(r,t)-a}return o&&rN(t)?a+e:(this.xIncrement=a+e,a)}setDataSortingOptions(){let t=this.options;rP(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),rM(t.pointRange)||(t.pointRange=1)}setOptions(t){let e;let i=this.chart,s=i.options.plotOptions,o=i.userOptions||{},r=rR(t),a=i.styledMode,n={plotOptions:s,userOptions:r};rO(this,"setOptions",n);let h=n.plotOptions[this.type],l=o.plotOptions||{},d=l.series||{},c=rg.plotOptions[this.type]||{},p=l[this.type]||{};this.userOptions=n.userOptions;let g=rR(h,s.series,p,r);this.tooltipOptions=rR(rg.tooltip,rg.plotOptions.series?.tooltip,c?.tooltip,i.userOptions.tooltip,l.series?.tooltip,p.tooltip,r.tooltip),this.stickyTracking=rH(r.stickyTracking,p.stickyTracking,d.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||g.stickyTracking),null===h.marker&&delete g.marker,this.zoneAxis=g.zoneAxis||"y";let u=this.zones=(g.zones||[]).map(t=>({...t}));return(g.negativeColor||g.negativeFillColor)&&!g.zones&&(e={value:g[this.zoneAxis+"Threshold"]||g.threshold||0,className:"highcharts-negative"},a||(e.color=g.negativeColor,e.fillColor=g.negativeFillColor),u.push(e)),u.length&&rM(u[u.length-1].value)&&u.push(a?{}:{color:this.color,fillColor:this.fillColor}),rO(this,"afterSetOptions",{options:g}),g}getName(){return rH(this.options.name,"Series "+(this.index+1))}getCyclic(t,e,i){let s,o;let r=this.chart,a=`${t}Index`,n=`${t}Counter`,h=i?.length||r.options.chart.colorCount;!e&&(rM(o=rH("color"===t?this.options.colorIndex:void 0,this[a]))?s=o:(r.series.length||(r[n]=0),s=r[n]%h,r[n]+=1),i&&(e=i[s])),void 0!==s&&(this[a]=s),this[t]=e}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||rg.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols)}getColumn(t,e){return(e?this.dataTable.modified:this.dataTable).getColumn(t,!0)||[]}findPointIndex(t,e){let i,s,o;let r=t.id,a=t.x,n=this.points,h=this.options.dataSorting;if(r){let t=this.chart.get(r);t instanceof oF&&(i=t)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let e=e=>!e.touched&&e.index===t.index;if(h&&h.matchByName?e=e=>!e.touched&&e.name===t.name:this.options.relativeXValue&&(e=e=>!e.touched&&e.options.x===t.x),!(i=rL(n,e)))return}return i&&void 0!==(o=i&&i.index)&&(s=!0),void 0===o&&rN(a)&&(o=this.getColumn("x").indexOf(a,e)),-1!==o&&void 0!==o&&this.cropped&&(o=o>=this.cropStart?o-this.cropStart:o),!s&&rN(o)&&n[o]&&n[o].touched&&(o=void 0),o}updateData(t,e){let i=this.options,s=i.dataSorting,o=this.points,r=[],a=this.requireSorting,n=t.length===o.length,h,l,d,c,p=!0;if(this.xIncrement=null,t.forEach(function(t,e){let l;let d=rM(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},p=d.x;d.id||rN(p)?(-1===(l=this.findPointIndex(d,c))||void 0===l?r.push(t):o[l]&&t!==i.data[l]?(o[l].update(t,!1,null,!1),o[l].touched=!0,a&&(c=l+1)):o[l]&&(o[l].touched=!0),(!n||e!==l||s&&s.enabled||this.hasDerivedData)&&(h=!0)):r.push(t)},this),h)for(l=o.length;l--;)(d=o[l])&&!d.touched&&d.remove&&d.remove(!1,e);else!n||s&&s.enabled?p=!1:(t.forEach(function(t,e){t===o[e].y||o[e].destroyed||o[e].update(t,!1,null,!1)}),r.length=0);if(o.forEach(function(t){t&&(t.touched=!1)}),!p)return!1;r.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this);let g=this.getColumn("x");return null===this.xIncrement&&g.length&&(this.xIncrement=ry(g),this.autoIncrement()),!0}dataColumnKeys(){return["x",...this.pointArrayMap||["y"]]}setData(t,e=!0,i,s){let o=this.points,r=o&&o.length||0,a=this.options,n=this.chart,h=a.dataSorting,l=this.xAxis,d=a.turboThreshold,c=this.dataTable,p=this.dataColumnKeys(),g=this.pointValKey||"y",u=(this.pointArrayMap||[]).length,f=a.keys,m,x,y=0,b=1,v;n.options.chart.allowMutatingData||(a.data&&delete this.options.data,this.userOptions.data&&delete this.userOptions.data,v=rR(!0,t));let k=(t=v||t||[]).length;if(h&&h.enabled&&(t=this.sortData(t)),n.options.chart.allowMutatingData&&!1!==s&&k&&r&&!this.cropped&&!this.hasGroupedData&&this.visible&&!this.boosted&&(x=this.updateData(t,i)),!x){this.xIncrement=null,this.colorCounter=0;let e=d&&k>d;if(e){let i=this.getFirstValidPoint(t),s=this.getFirstValidPoint(t,k-1,-1),o=t=>!!(rB(t)&&(f||rN(t[0])));if(rN(i)&&rN(s)){let e=[],i=[];for(let s of t)e.push(this.autoIncrement()),i.push(s);c.setColumns({x:e,[g]:i})}else if(o(i)&&o(s)){if(u){let e=i.length===u?1:0,s=Array(p.length).fill(0).map(()=>[]);for(let i of t){e&&s[0].push(this.autoIncrement());for(let t=e;t<=u;t++)s[t]?.push(i[t-e])}c.setColumns(p.reduce((t,e,i)=>(t[e]=s[i],t),{}))}else{f&&(y=f.indexOf("x"),b=f.indexOf("y"),y=y>=0?y:0,b=b>=0?b:1),1===i.length&&(b=0);let e=[],s=[];if(y===b)for(let i of t)e.push(this.autoIncrement()),s.push(i[b]);else for(let i of t)e.push(i[y]),s.push(i[b]);c.setColumns({x:e,[g]:s})}}else e=!1}if(!e){let e=p.reduce((t,e)=>(t[e]=[],t),{});for(m=0;m{let s=rI(i,t),o=rI(i,e);return os?1:0}).forEach(function(t,e){t.x=e},this),e.linkedSeries&&e.linkedSeries.forEach(function(e){let i=e.options,o=i.data;i.dataSorting&&i.dataSorting.enabled||!o||(o.forEach(function(i,r){o[r]=s(e,i),t[r]&&(o[r].x=t[r].x,o[r].index=r)}),e.setData(o,!1))}),t}getProcessedData(t){let e=this,{dataTable:i,isCartesian:s,options:o,xAxis:r}=e,a=o.cropThreshold,n=t||e.getExtremesFromAll,h=r?.logarithmic,l=i.rowCount,d,c,p=0,g,u,f,m=e.getColumn("x"),x=i,y=!1;return r&&(u=(g=r.getExtremes()).min,f=g.max,y=!!(r.categories&&!r.names.length),s&&e.sorted&&!n&&(!a||l>a||e.forceCrop)&&(m[l-1]f?x=new re:e.getColumn(e.pointValKey||"y").length&&(m[0]f)&&(x=(d=this.cropData(i,u,f)).modified,p=d.start,c=!0))),m=x.getColumn("x")||[],{modified:x,cropped:c,cropStart:p,closestPointRange:rE([h?m.map(h.log2lin):m],()=>e.requireSorting&&!y&&rA(15,!1,e.chart))}}processData(t){let e=this.xAxis,i=this.dataTable;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;let s=this.getProcessedData();i.modified=s.modified,this.cropped=s.cropped,this.cropStart=s.cropStart,this.closestPointRange=this.basePointRange=s.closestPointRange,rO(this,"afterProcessData")}cropData(t,e,i){let s=t.getColumn("x",!0)||[],o=s.length,r={},a,n,h=0,l=o;for(a=0;a=e){h=Math.max(0,a-1);break}for(n=a;ni){l=n+1;break}for(let e of this.dataColumnKeys()){let i=t.getColumn(e,!0);i&&(r[e]=i.slice(h,l))}return{modified:new re({columns:r}),start:h,end:l}}generatePoints(){let t=this.options,e=this.processedData||t.data,i=this.dataTable.modified,s=this.getColumn("x",!0),o=this.pointClass,r=i.rowCount,a=this.cropStart||0,n=this.hasGroupedData,h=t.keys,l=[],d=t.dataGrouping&&t.dataGrouping.groupAll?a:0,c=this.xAxis?.categories,p=this.pointArrayMap||["y"],g=this.dataColumnKeys(),u,f,m,x,y=this.data,b;if(!y&&!n){let t=[];t.length=e?.length||0,y=this.data=t}for(h&&n&&(this.options.keys=!1),x=0;xr.getColumn(t,!0)||[])||[],l=this.getColumn("x",!0),d=[],c=this.requireSorting&&!this.is("column")?1:0,p=!!s&&s.positiveValuesOnly,g=o||this.cropped||!i,u,f,m,x=0,y=0;for(i&&(x=(u=i.getExtremes()).min,y=u.max),m=0;m=x&&(l[m-c]||f)<=y)for(let t of h){let e=t[m];rN(e)&&(e>0||!p)&&d.push(e)}let b={activeYData:d,dataMin:rb(d),dataMax:ry(d)};return rO(this,"afterGetExtremes",{dataExtremes:b}),b}applyExtremes(){let t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t}getFirstValidPoint(t,e=0,i=1){let s=t.length,o=e;for(;o>=0&&o1)&&(r.step=function(t,e){i&&i.apply(e,arguments),"width"===e.prop&&h?.element&&h.attr(o?"height":"width",t+99)}),n.addClass("highcharts-animating").animate(t,r)}}afterAnimate(){this.setClip(),rW(this.chart.sharedClips,(t,e,i)=>{t&&!this.chart.container.querySelector(`[clip-path="url(#${t.id})"]`)&&(t.destroy(),delete i[e])}),this.finishedAnimating=!0,rO(this,"afterAnimate")}drawPoints(t=this.points){let e,i,s,o,r,a,n;let h=this.chart,l=h.styledMode,{colorAxis:d,options:c}=this,p=c.marker,g=this[this.specialGroup||"markerGroup"],u=this.xAxis,f=rH(p.enabled,!u||!!u.isRadial||null,this.closestPointRangePx>=p.enabledThreshold*p.radius);if(!1!==p.enabled||this._hasPointMarkers)for(e=0;e0||i.hasImage)&&(i.graphic=s=h.renderer.symbol(t,n.x,n.y,n.width,n.height,a?r:p).add(g),this.enabledDataSorting&&h.hasRendered&&(s.attr({x:i.startXPos}),o="animate")),s&&"animate"===o&&s[e?"show":"hide"](e).animate(n),s){let t=this.pointAttribs(i,l||!i.selected?void 0:"select");l?d&&s.css({fill:t.fill}):s[o](t)}s&&s.addClass(i.getClassName(),!0)}else s&&(i.graphic=s.destroy())}markerAttribs(t,e){let i=this.options,s=i.marker,o=t.marker||{},r=o.symbol||s.symbol,a={},n,h,l=rH(o.radius,s&&s.radius);e&&(n=s.states[e],l=rH((h=o.states&&o.states[e])&&h.radius,n&&n.radius,l&&l+(n&&n.radiusPlus||0))),t.hasImage=r&&0===r.indexOf("url"),t.hasImage&&(l=0);let d=t.pos();return rN(l)&&d&&(i.crisp&&(d[0]=rw(d[0],t.hasImage?0:"rect"===r?s?.lineWidth||0:1)),a.x=d[0]-l,a.y=d[1]-l),l&&(a.width=a.height=2*l),a}pointAttribs(t,e){let i=this.options.marker,s=t&&t.options,o=s&&s.marker||{},r=s&&s.color,a=t&&t.color,n=t&&t.zone&&t.zone.color,h,l,d=this.color,c,p,g=rH(o.lineWidth,i.lineWidth),u=1;return d=r||n||a||d,c=o.fillColor||i.fillColor||d,p=o.lineColor||i.lineColor||d,e=e||"normal",h=i.states[e]||{},g=rH((l=o.states&&o.states[e]||{}).lineWidth,h.lineWidth,g+rH(l.lineWidthPlus,h.lineWidthPlus,0)),c=l.fillColor||h.fillColor||c,{stroke:p=l.lineColor||h.lineColor||p,"stroke-width":g,fill:c,opacity:u=rH(l.opacity,h.opacity,u)}}destroy(t){let e,i,s;let o=this,r=o.chart,a=/AppleWebKit\/533/.test(rm.navigator.userAgent),n=o.data||[];for(rO(o,"destroy",{keepEventsForUpdate:t}),this.removeEvents(t),(o.axisTypes||[]).forEach(function(t){(s=o[t])&&s.series&&(rC(s.series,o),s.isDirty=s.forceRedraw=!0)}),o.legendItem&&o.chart.legend.destroyItem(o),e=n.length;e--;)(i=n[e])&&i.destroy&&i.destroy();for(let t of o.zones)rS(t,void 0,!0);$.clearTimeout(o.animationTimeout),rW(o,function(t,e){t instanceof ej&&!t.survive&&t[a&&"group"===e?"hide":"destroy"]()}),r.hoverSeries===o&&(r.hoverSeries=void 0),rC(r.series,o),r.orderItems("series"),rW(o,function(e,i){t&&"hcEvents"===i||delete o[i]})}applyZones(){let{area:t,chart:e,graph:i,zones:s,points:o,xAxis:r,yAxis:a,zoneAxis:n}=this,{inverted:h,renderer:l}=e,d=this[`${n}Axis`],{isXAxis:c,len:p=0,minPointOffset:g=0}=d||{},u=(i?.strokeWidth()||0)/2+1,f=(t,e=0,i=0)=>{h&&(i=p-i);let{translated:s=0,lineClip:o}=t,r=i-s;o?.push(["L",e,Math.abs(r){t.forEach((e,i)=>{("M"===e[0]||"L"===e[0])&&(t[i]=[e[0],c?p-e[1]:e[1],c?e[2]:p-e[2]])})};if(s.forEach(t=>{t.lineClip=[],t.translated=rv(d.toPixels(rH(t.value,e),!0)||0,0,p)}),i&&!this.showLine&&i.hide(),t&&t.hide(),"y"===n&&o.length{let s=e.lineClip||[],o=Math.round(e.translated||0);r.reversed&&s.reverse();let{clip:n,simpleClip:d}=e,p=0,g=0,f=r.len,y=a.len;c?(p=o,f=x):(g=o,y=x);let b=[["M",p,g],["L",f,g],["L",f,y],["L",p,y],["Z"]],v=[b[0],...s,b[1],b[2],...m,b[3],b[4]];m=s.reverse(),x=o,h&&(u(v),t&&u(b)),n?(n.animate({d:v}),d?.animate({d:b})):(n=e.clip=l.path(v),t&&(d=e.simpleClip=l.path(b))),i&&e.graph?.clip(n),t&&e.area?.clip(d)})}else this.visible&&(i&&i.show(),t&&t.show())}plotGroup(t,e,i,s,o){let r=this[t],a=!r,n={visibility:i,zIndex:s||.1};return rM(this.opacity)&&!this.chart.styledMode&&"inactive"!==this.state&&(n.opacity=this.opacity),r||(this[t]=r=this.chart.renderer.g().add(o)),r.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(rM(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(r.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),r.attr(n)[a?"attr":"animate"](this.getPlotBox(e)),r}getPlotBox(t){let e=this.xAxis,i=this.yAxis,s=this.chart,o=s.inverted&&!s.polar&&e&&this.invertible&&"series"===t;return s.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:s.plotLeft,translateY:i?i.top:s.plotTop,rotation:o?90:0,rotationOriginX:o?(e.len-i.len)/2:0,rotationOriginY:o?(e.len+i.len)/2:0,scaleX:o?-1:1,scaleY:1}}removeEvents(t){let{eventsToUnbind:e}=this;t||rX(this),e.length&&(e.forEach(t=>{t()}),e.length=0)}render(){let t=this,{chart:e,options:i,hasRendered:s}=t,o=rc(i.animation),r=t.visible?"inherit":"hidden",a=i.zIndex,n=e.seriesGroup,h=t.finishedAnimating?0:o.duration;rO(this,"render"),t.plotGroup("group","series",r,a,n),t.markerGroup=t.plotGroup("markerGroup","markers",r,a,n),!1!==i.clip&&t.setClip(),h&&t.animate?.(!0),t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels?.(),t.redrawPoints?.(),i.enableMouseTracking&&t.drawTracker?.(),h&&t.animate?.(),s||(h&&o.defer&&(h+=o.defer),t.animationTimeout=rF(()=>{t.afterAnimate()},h||0)),t.isDirty=!1,t.hasRendered=!0,rO(t,"afterRender")}redraw(){let t=this.isDirty||this.isDirtyData;this.translate(),this.render(),t&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(t,e){let{xAxis:i,yAxis:s}=this,o=this.chart.inverted;return this.searchKDTree({clientX:o?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:o?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)}buildKDTree(t){this.buildingKdTree=!0;let e=this,i=e.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e.kdTree,rF(function(){e.kdTree=function t(i,s,o){let r,a;let n=i?.length;if(n)return r=e.kdAxisArray[s%o],i.sort((t,e)=>(t[r]||0)-(e[r]||0)),{point:i[a=Math.floor(n/2)],left:t(i.slice(0,a),s+1,o),right:t(i.slice(a+1),s+1,o)}}(e.getValidPoints(void 0,!e.directTouch),i,i),e.buildingKdTree=!1},e.options.kdNow||t?.type==="touchstart"?0:1)}searchKDTree(t,e,i,s,o){let r=this,[a,n]=this.kdAxisArray,h=e?"distX":"dist",l=(r.options.findNearestPointBy||"").indexOf("y")>-1?2:1,d=!!r.isBubble,c=s||((t,e,i)=>[(t[i]||0)<(e[i]||0)?t:e,!1]),p=o||((t,e)=>t=0&&r<=(s?s.len:e.plotHeight)&&o>=0&&o<=(i?i.len:e.plotWidth)}drawTracker(){let t=this,e=t.options,i=e.trackByArea,s=[].concat((i?t.areaPath:t.graphPath)||[]),o=t.chart,r=o.pointer,a=o.renderer,n=o.options.tooltip?.snap||0,h=()=>{e.enableMouseTracking&&o.hoverSeries!==t&&t.onMouseOver()},l="rgba(192,192,192,"+(rf?1e-4:.002)+")",d=t.tracker;d?d.attr({d:s}):t.graph&&(t.tracker=d=a.path(s).attr({visibility:t.visible?"inherit":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),o.styledMode||d.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:l,fill:i?l:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*n)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach(t=>{t&&(t.addClass("highcharts-tracker").on("mouseover",h).on("mouseout",t=>{r?.onTrackerMouseOut(t)}),e.cursor&&!o.styledMode&&t.css({cursor:e.cursor}),t.on("touchstart",h))})),rO(this,"afterDrawTracker")}addPoint(t,e,i,s,o){let r,a;let n=this.options,{chart:h,data:l,dataTable:d,xAxis:c}=this,p=c&&c.hasNames&&c.names,g=n.data,u=this.getColumn("x");e=rH(e,!0);let f={series:this};this.pointClass.prototype.applyOptions.apply(f,[t]);let m=f.x;if(a=u.length,this.requireSorting&&mm;)a--;d.setRow(f,a,!0,{addColumns:!1}),p&&f.name&&(p[m]=f.name),g?.splice(a,0,t),(r||this.processedData)&&(this.data.splice(a,0,null),this.processData()),"point"===n.legendType&&this.generatePoints(),i&&(l[0]&&l[0].remove?l[0].remove(!1):([l,g,...Object.values(d.getColumns())].filter(rM).forEach(t=>{t.shift()}),d.rowCount-=1,rO(d,"afterDeleteRows"))),!1!==o&&rO(this,"addPoint",{point:f}),this.isDirty=!0,this.isDirtyData=!0,e&&h.redraw(s)}removePoint(t,e,i){let s=this,{chart:o,data:r,points:a,dataTable:n}=s,h=r[t],l=function(){[a?.length===r.length?a:void 0,r,s.options.data,...Object.values(n.getColumns())].filter(rM).forEach(e=>{e.splice(t,1)}),n.rowCount-=1,rO(n,"afterDeleteRows"),h?.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&o.redraw()};rp(i,o),e=rH(e,!0),h?h.firePointEvent("remove",null,l):l()}remove(t,e,i,s){let o=this,r=o.chart;function a(){o.destroy(s),r.isDirtyLegend=r.isDirtyBox=!0,r.linkSeries(s),rH(t,!0)&&r.redraw(e)}!1!==i?rO(o,"remove",null,a):a()}update(t,e){rO(this,"update",{options:t=rT(t,this.userOptions)});let i=this,s=i.chart,o=i.userOptions,r=i.initialType||i.type,a=s.options.plotOptions,n=rx[r].prototype,h=i.finishedAnimating&&{animation:!1},l={},d,c,p=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],g=t.type||o.type||s.options.chart.type,u=!(this.hasDerivedData||g&&g!==this.type||void 0!==t.keys||void 0!==t.pointStart||void 0!==t.pointInterval||void 0!==t.relativeXValue||t.joinBy||t.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(t=>i.hasOptionChanged(t)));g=g||r,u?(p.push("data","isDirtyData","isDirtyCanvas","points","dataTable","processedData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"),!1!==t.visible&&p.push("area","graph"),i.parallelArrays.forEach(function(t){p.push(t+"Data")}),t.data&&(t.dataSorting&&rP(i.options.dataSorting,t.dataSorting),this.setData(t.data,!1))):this.dataTable.modified=this.dataTable,t=rR(o,{index:void 0===o.index?i.index:o.index,pointStart:a?.series?.pointStart??o.pointStart??i.getColumn("x")[0]},!u&&{data:i.options.data},t,h),u&&t.data&&(t.data=i.options.data),(p=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(p)).forEach(function(t){p[t]=i[t],delete i[t]});let f=!1;if(rx[g]){if(f=g!==i.type,i.remove(!1,!1,!1,!0),f){if(s.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(i,rx[g].prototype);else{let t=Object.hasOwnProperty.call(i,"hcEvents")&&i.hcEvents;for(c in n)i[c]=void 0;rP(i,rx[g].prototype),t?i.hcEvents=t:delete i.hcEvents}}}else rA(17,!0,s,{missingModuleFor:g});if(p.forEach(function(t){i[t]=p[t]}),i.init(s,t),u&&this.points)for(let t of(!1===(d=i.options).visible?(l.graphic=1,l.dataLabel=1):(this.hasMarkerChanged(d,o)&&(l.graphic=1),i.hasDataLabels?.()||(l.dataLabel=1)),this.points))t&&t.series&&(t.resolveColor(),Object.keys(l).length&&t.destroyElements(l),!1===d.showInLegend&&t.legendItem&&s.legend.destroyItem(t));i.initialType=r,s.linkSeries(),s.setSortedData(),f&&i.linkedSeries.length&&(i.isDirtyData=!0),rO(this,"afterUpdate"),rH(e,!0)&&s.redraw(!!u&&void 0)}setName(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}hasOptionChanged(t){let e=this.chart,i=this.options[t],s=e.options.plotOptions,o=this.userOptions[t],r=rH(s?.[this.type]?.[t],s?.series?.[t]);return o&&!rM(r)?i!==o:i!==rH(r,i)}onMouseOver(){let t=this.chart,e=t.hoverSeries,i=t.pointer;i?.setHoverChartIndex(),e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&rO(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this}onMouseOut(){let t=this.options,e=this.chart,i=e.tooltip,s=e.hoverPoint;e.hoverSeries=null,s&&s.onMouseOut(),this&&t.events.mouseOut&&rO(this,"mouseOut"),i&&!this.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),e.series.forEach(function(t){t.setState("",!0)})}setState(t,e){let i=this,s=i.options,o=i.graph,r=s.inactiveOtherPoints,a=s.states,n=rH(a[t||"normal"]&&a[t||"normal"].animation,i.chart.options.chart.animation),h=s.lineWidth,l=s.opacity;if(t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach(function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))}),i.state=t,!i.chart.styledMode)){if(a[t]&&!1===a[t].enabled)return;if(t&&(h=a[t].lineWidth||h+(a[t].lineWidthPlus||0),l=rH(a[t].opacity,l)),o&&!o.dashstyle&&rN(h))for(let t of[o,...this.zones.map(t=>t.graph)])t?.animate({"stroke-width":h},n);r||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach(function(t){t&&t.animate({opacity:l},n)})}e&&r&&i.points&&i.setAllPointsToState(t||void 0)}setAllPointsToState(t){this.points.forEach(function(e){e.setState&&e.setState(t)})}setVisible(t,e){let i=this,s=i.chart,o=s.options.chart.ignoreHiddenSeries,r=i.visible;i.visible=t=i.options.visible=i.userOptions.visible=void 0===t?!r:t;let a=t?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(t=>{i[t]?.[a]()}),(s.hoverSeries===i||s.hoverPoint?.series===i)&&i.onMouseOut(),i.legendItem&&s.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&s.series.forEach(t=>{t.options.stacking&&t.visible&&(t.isDirty=!0)}),i.linkedSeries.forEach(e=>{e.setVisible(t,!1)}),o&&(s.isDirtyBox=!0),rO(i,a),!1!==e&&s.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),rO(this,t?"select":"unselect")}shouldShowTooltip(t,e,i={}){return i.series=this,i.visiblePlotOnly=!0,this.chart.isInsidePlot(t,e,i)}drawLegendSymbol(t,e){rr[this.options.legendSymbol||"rectangle"]?.call(this,t,e)}}rG.defaultOptions={lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:t}=this.series.chart;return"number"!=typeof this.y?"":t(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},rG.types=rd.seriesTypes,rG.registerType=rd.registerSeriesType,rP(rG.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:oF,requireSorting:!0,sorted:!0}),rd.series=rG;let rY=rG,{animObject:rj,setAnimation:rU}=tR,{registerEventOptions:r$}=i3,{composed:rV,marginNames:r_}=k,{distribute:rq}=ed,{format:rZ}=eo,{addEvent:rK,createElement:rJ,css:rQ,defined:r0,discardElement:r1,find:r2,fireEvent:r3,isNumber:r5,merge:r6,pick:r9,pushUnique:r4,relativeLength:r8,stableSort:r7,syncTimeout:at}=$;class ae{constructor(t,e){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=t,this.setOptions(e),e.enabled&&(this.render(),r$(this,e),rK(this.chart,"endResize",function(){this.legend.positionCheckboxes()})),rK(this.chart,"render",()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())})}setOptions(t){let e=r9(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=r6(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop,this.itemMarginBottom=t.itemMarginBottom,this.padding=e,this.initialItemY=e-5,this.symbolWidth=r9(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted,this.baseline=void 0}update(t,e){let i=this.chart;this.setOptions(r6(!0,this.options,t)),"events"in this.options&&r$(this,this.options),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,r9(e,!0)&&i.redraw(),r3(this,"afterUpdate",{redraw:e})}colorizeItem(t,e){let i=t.color,{area:s,group:o,label:r,line:a,symbol:n}=t.legendItem||{};if((t instanceof rY||t instanceof oF)&&(t.color=t.options?.legendSymbolColor||i),o?.[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:i={}}=this,o=i.color,{fillColor:h,fillOpacity:l,lineColor:d,marker:c}=t.options,p=t=>(!e&&(t.fill&&(t.fill=o),t.stroke&&(t.stroke=o)),t);r?.css(r6(e?this.itemStyle:i)),a?.attr(p({stroke:d||t.color})),n&&n.attr(p(c&&n.isMarker?t.pointAttribs():{fill:t.color})),s?.attr(p({fill:h||t.color,"fill-opacity":h?1:l??.75}))}t.color=i,r3(this,"afterColorizeItem",{item:t,visible:e})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(t){let{group:e,x:i=0,y:s=0}=t.legendItem||{},o=this.options,r=o.symbolPadding,a=!o.rtl,n=t.checkbox;if(e&&e.element){let o={translateX:a?i:this.legendWidth-i-2*r-4,translateY:s};e[r0(e.translateY)?"animate":"attr"](o,void 0,()=>{r3(this,"afterPositionItem",{item:t})})}n&&(n.x=i,n.y=s)}destroyItem(t){let e=t.checkbox,i=t.legendItem||{};for(let t of["group","label","line","symbol"])i[t]&&(i[t]=i[t].destroy());e&&r1(e),t.legendItem=void 0}destroy(){for(let t of this.getAllItems())this.destroyItem(t);for(let t of["clipRect","up","down","pager","nav","box","title","group"])this[t]&&(this[t]=this[t].destroy());this.display=null}positionCheckboxes(){let t;let e=this.group&&this.group.alignAttr,i=this.clipHeight||this.legendHeight,s=this.titleHeight;e&&(t=e.translateY,this.allItems.forEach(function(o){let r;let a=o.checkbox;a&&(r=t+s+a.y+(this.scrollOffset||0)+3,rQ(a,{left:e.translateX+o.checkboxOffset+a.x-20+"px",top:r+"px",display:this.proximate||r>t-6&&r1.5*k?v.height:k))}layoutItem(t){let e=this.options,i=this.padding,s="horizontal"===e.layout,o=t.itemHeight,r=this.itemMarginBottom,a=this.itemMarginTop,n=s?r9(e.itemDistance,20):0,h=this.maxLegendWidth,l=e.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:t.itemWidth,d=t.legendItem||{};s&&this.itemX-i+l>h&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+r),this.lastLineHeight=0),this.lastItemY=a+this.itemY+r,this.lastLineHeight=Math.max(o,this.lastLineHeight),d.x=this.itemX,d.y=this.itemY,s?this.itemX+=l:(this.itemY+=a+o+r,this.lastLineHeight=o),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:n):l)+i,this.offsetWidth)}getAllItems(){let t=[];return this.chart.series.forEach(function(e){let i=e&&e.options;e&&r9(i.showInLegend,!r0(i.linkedTo)&&void 0,!0)&&(t=t.concat((e.legendItem||{}).labels||("point"===i.legendType?e.data:e)))}),r3(this,"afterGetAllItems",{allItems:t}),t}getAlignment(){let t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)}adjustMargins(t,e){let i=this.chart,s=this.options,o=this.getAlignment();o&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(r,a){r.test(o)&&!r0(t[a])&&(i[r_[a]]=Math.max(i[r_[a]],i.legend[(a+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][a]*s[a%2?"x":"y"]+r9(s.margin,12)+e[a]+(i.titleOffset[a]||0)))})}proximatePositions(){let t;let e=this.chart,i=[],s="left"===this.options.align;for(let o of(this.allItems.forEach(function(t){let o,r,a=s,n,h;t.yAxis&&(t.xAxis.options.reversed&&(a=!a),t.points&&(o=r2(a?t.points:t.points.slice(0).reverse(),function(t){return r5(t.plotY)})),r=this.itemMarginTop+t.legendItem.label.getBBox().height+this.itemMarginBottom,h=t.yAxis.top-e.plotTop,n=t.visible?(o?o.plotY:t.yAxis.height)+(h-.3*r):h+t.yAxis.height,i.push({target:n,size:r,item:t}))},this),rq(i,e.plotHeight)))t=o.item.legendItem||{},r5(o.pos)&&(t.y=e.plotTop-e.spacing[0]+o.pos)}render(){let t=this.chart,e=t.renderer,i=this.options,s=this.padding,o=this.getAllItems(),r,a,n,h=this.group,l,d=this.box;this.itemX=s,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=r8(i.width,t.spacingBox.width-s),l=t.spacingBox.width-2*s-i.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(l/=2),this.maxLegendWidth=this.widthOption||l,h||(this.group=h=e.g("legend").addClass(i.className||"").attr({zIndex:7}).add(),this.contentGroup=e.g().attr({zIndex:1}).add(h),this.scrollGroup=e.g().add(this.contentGroup)),this.renderTitle(),r7(o,(t,e)=>(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)),i.reversed&&o.reverse(),this.allItems=o,this.display=r=!!o.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,o.forEach(this.renderItem,this),o.forEach(this.layoutItem,this),a=(this.widthOption||this.offsetWidth)+s,n=this.lastItemY+this.lastLineHeight+this.titleHeight,n=this.handleOverflow(n)+s,d||(this.box=d=e.rect().addClass("highcharts-legend-box").attr({r:i.borderRadius}).add(h)),t.styledMode||d.attr({stroke:i.borderColor,"stroke-width":i.borderWidth||0,fill:i.backgroundColor||"none"}).shadow(i.shadow),a>0&&n>0&&d[d.placed?"animate":"attr"](d.crisp.call({},{x:0,y:0,width:a,height:n},d.strokeWidth())),h[r?"show":"hide"](),t.styledMode&&"none"===h.getStyle("display")&&(a=n=0),this.legendWidth=a,this.legendHeight=n,r&&this.align(),this.proximate||this.positionItems(),r3(this,"afterRender")}align(t=this.chart.spacingBox){let e=this.chart,i=this.options,s=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&e.titleOffset[0]>0?s+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e.titleOffset[2]>0&&(s-=e.titleOffset[2]),s!==t.y&&(t=r6(t,{y:s})),e.hasRendered||(this.group.placed=!1),this.group.align(r6(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)}handleOverflow(t){let e=this,i=this.chart,s=i.renderer,o=this.options,r=o.y,a="top"===o.verticalAlign,n=this.padding,h=o.maxHeight,l=o.navigation,d=r9(l.animation,!0),c=l.arrowSize||12,p=this.pages,g=this.allItems,u=function(t){"number"==typeof t?k.attr({height:t}):k&&(e.clipRect=k.destroy(),e.contentGroup.clip()),e.contentGroup.div&&(e.contentGroup.div.style.clip=t?"rect("+n+"px,9999px,"+(n+t)+"px,0)":"auto")},f=function(t){return e[t]=s.circle(0,0,1.3*c).translate(c/2,c/2).add(v),i.styledMode||e[t].attr("fill","rgba(0,0,0,0.0001)"),e[t]},m,x,y,b=i.spacingBox.height+(a?-r:r)-n,v=this.nav,k=this.clipRect;return"horizontal"!==o.layout||"middle"===o.verticalAlign||o.floating||(b/=2),h&&(b=Math.min(b,h)),p.length=0,t&&b>0&&t>b&&!1!==l.enabled?(this.clipHeight=m=Math.max(b-20-this.titleHeight-n,0),this.currentPage=r9(this.currentPage,1),this.fullHeight=t,g.forEach((t,e)=>{let i=(y=t.legendItem||{}).y||0,s=Math.round(y.label.getBBox().height),o=p.length;(!o||i-p[o-1]>m&&(x||i)!==p[o-1])&&(p.push(x||i),o++),y.pageIx=o-1,x&&((g[e-1].legendItem||{}).pageIx=o-1),e===g.length-1&&i+s-p[o-1]>m&&i>p[o-1]&&(p.push(i),y.pageIx=o),i!==x&&(x=i)}),k||(k=e.clipRect=s.clipRect(0,n-2,9999,0),e.contentGroup.clip(k)),u(m),v||(this.nav=v=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,c,c).add(v),f("upTracker").on("click",function(){e.scroll(-1,d)}),this.pager=s.text("",15,10).addClass("highcharts-legend-navigation"),!i.styledMode&&l.style&&this.pager.css(l.style),this.pager.add(v),this.down=s.symbol("triangle-down",0,0,c,c).add(v),f("downTracker").on("click",function(){e.scroll(1,d)})),e.scroll(0),t=b):v&&(u(),this.nav=v.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t}scroll(t,e){let i=this.chart,s=this.pages,o=s.length,r=this.clipHeight,a=this.options.navigation,n=this.pager,h=this.padding,l=this.currentPage+t;l>o&&(l=o),l>0&&(void 0!==e&&rU(e,i),this.nav.attr({translateX:h,translateY:r+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===l?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),n.attr({text:l+"/"+o}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:l===o?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),i.styledMode||(this.up.attr({fill:1===l?a.inactiveColor:a.activeColor}),this.upTracker.css({cursor:1===l?"default":"pointer"}),this.down.attr({fill:l===o?a.inactiveColor:a.activeColor}),this.downTracker.css({cursor:l===o?"default":"pointer"})),this.scrollOffset=-s[l-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=l,this.positionCheckboxes(),at(()=>{r3(this,"afterScroll",{currentPage:l})},rj(r9(e,i.renderer.globalAnimation,!0)).duration))}setItemEvents(t,e,i){let s=this,o=t.legendItem||{},r=s.chart.renderer.boxWrapper,a=t instanceof oF,n=t instanceof rY,h="highcharts-legend-"+(a?"point":"series")+"-active",l=s.chart.styledMode,d=i?[e,o.symbol]:[o.group],c=e=>{s.allItems.forEach(i=>{t!==i&&[i].concat(i.linkedSeries||[]).forEach(t=>{t.setState(e,!a)})})};for(let i of d)i&&i.on("mouseover",function(){t.visible&&c("inactive"),t.setState("hover"),t.visible&&r.addClass(h),l||e.css(s.options.itemHoverStyle)}).on("mouseout",function(){s.chart.styledMode||e.css(r6(t.visible?s.itemStyle:s.itemHiddenStyle)),c(""),r.removeClass(h),t.setState()}).on("click",function(e){let i=function(){t.setVisible&&t.setVisible(),c(t.visible?"inactive":"")};r.removeClass(h),r3(s,"itemClick",{browserEvent:e,legendItem:t},i),a?t.firePointEvent("legendItemClick",{browserEvent:e}):n&&r3(t,"legendItemClick",{browserEvent:e})})}createCheckboxForItem(t){t.checkbox=rJ("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),rK(t.checkbox,"click",function(e){let i=e.target;r3(t.series||t,"checkboxClick",{checked:i.checked,item:t},function(){t.select()})})}}!function(t){t.compose=function(e){r4(rV,"Core.Legend")&&rK(e,"beforeMargins",function(){this.legend=new t(this,this.options.legend)})}}(ae||(ae={}));let ai=ae,{animate:as,animObject:ao,setAnimation:ar}=tR,{defaultOptions:aa}=tm,{numberFormat:an}=eo,{registerEventOptions:ah}=i3,{charts:al,doc:ad,marginNames:ac,svg:ap,win:ag}=k,{seriesTypes:au}=rd,{addEvent:af,attr:am,createElement:ax,css:ay,defined:ab,diffObjects:av,discardElement:ak,erase:aw,error:aM,extend:aS,find:aT,fireEvent:aC,getAlignFactor:aA,getStyle:aP,isArray:aL,isNumber:aO,isObject:aE,isString:aI,merge:aD,objectEach:aB,pick:aN,pInt:az,relativeLength:aR,removeEvent:aW,splat:aH,syncTimeout:aX,uniqueKey:aF}=$;class aG{static chart(t,e,i){return new aG(t,e,i)}constructor(t,e,i){this.sharedClips={};let s=[...arguments];(aI(t)||t.nodeName)&&(this.renderTo=s.shift()),this.init(s[0],s[1])}setZoomOptions(){let t=this.options.chart,e=t.zooming;this.zooming={...e,type:aN(t.zoomType,e.type),key:aN(t.zoomKey,e.key),pinchType:aN(t.pinchType,e.pinchType),singleTouch:aN(t.zoomBySingleTouch,e.singleTouch,!1),resetButton:aD(e.resetButton,t.resetZoomButton)}}init(t,e){aC(this,"init",{args:arguments},function(){let i=aD(aa,t),s=i.chart,o=this.renderTo||s.renderTo;this.userOptions=aS({},t),(this.renderTo=aI(o)?ad.getElementById(o):o)||aM(13,!0,this),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=e,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.locale=i.lang.locale??this.renderTo.closest("[lang]")?.lang,this.time=new td(aS(i.time||{},{locale:this.locale})),i.time=this.time.options,this.numberFormatter=(s.numberFormatter||an).bind(this),this.styledMode=s.styledMode,this.hasCartesianSeries=s.showAxes,this.index=al.length,al.push(this),k.chartCount++,ah(this,s),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),aC(this,"afterInit"),this.firstRender()})}initSeries(t){let e=this.options.chart,i=t.type||e.type,s=au[i];s||aM(17,!0,this,{missingModuleFor:i});let o=new s;return"function"==typeof o.init&&o.init(this,t),o}setSortedData(){this.getSeriesOrderByLinks().forEach(function(t){t.points||t.data||!t.enabledDataSorting||t.setData(t.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(t,e){return t.linkedSeries.length||e.linkedSeries.length?e.linkedSeries.length-t.linkedSeries.length:0})}orderItems(t,e=0){let i=this[t],s=this.options[t]=aH(this.options[t]).slice(),o=this.userOptions[t]=this.userOptions[t]?aH(this.userOptions[t]).slice():[];if(this.hasRendered&&(s.splice(e),o.splice(e)),i)for(let t=e,r=i.length;t=Math.max(h+r,t.pos)&&e<=Math.min(h+r+c.width,t.pos+t.len)||(u.isInsidePlot=!1)}if(!i.ignoreY&&u.isInsidePlot){let t=!s&&i.axis&&!i.axis.isXAxis&&i.axis||d&&(s?d.xAxis:d.yAxis)||{pos:a,len:1/0},e=i.paneCoordinates?t.pos+g:a+g;e>=Math.max(l+a,t.pos)&&e<=Math.min(l+a+c.height,t.pos+t.len)||(u.isInsidePlot=!1)}return aC(this,"afterIsInsidePlot",u),u.isInsidePlot}redraw(t){aC(this,"beforeRedraw");let e=this.hasCartesianSeries?this.axes:this.colorAxis||[],i=this.series,s=this.pointer,o=this.legend,r=this.userOptions.legend,a=this.renderer,n=a.isHidden(),h=[],l,d,c,p=this.isDirtyBox,g=this.isDirtyLegend,u;for(a.rootFontSize=a.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),ar(!!this.hasRendered&&t,this),n&&this.temporaryDisplay(),this.layOutTitles(!1),c=i.length;c--;)if(((u=i[c]).options.stacking||u.options.centerInCategory)&&(d=!0,u.isDirty)){l=!0;break}if(l)for(c=i.length;c--;)(u=i[c]).options.stacking&&(u.isDirty=!0);i.forEach(function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),g=!0):r&&(r.labelFormatter||r.labelFormat)&&(g=!0)),t.isDirtyData&&aC(t,"updatedData")}),g&&o&&o.options.enabled&&(o.render(),this.isDirtyLegend=!1),d&&this.getStacks(),e.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),e.forEach(function(t){t.isDirty&&(p=!0)}),e.forEach(function(t){let e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,h.push(function(){aC(t,"afterSetExtremes",aS(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(p||d)&&t.redraw()}),p&&this.drawChartBox(),aC(this,"predraw"),i.forEach(function(t){(p||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),s&&s.reset(!0),a.draw(),aC(this,"redraw"),aC(this,"render"),n&&this.temporaryDisplay(!0),h.forEach(function(t){t.call()})}get(t){let e=this.series;function i(e){return e.id===t||e.options&&e.options.id===t}let s=aT(this.axes,i)||aT(this.series,i);for(let t=0;!s&&t(e.getPointsCollection().forEach(e=>{aN(e.selectedStaging,e.selected)&&t.push(e)}),t),[])}getSelectedSeries(){return this.series.filter(t=>t.selected)}setTitle(t,e,i){this.applyDescription("title",t),this.applyDescription("subtitle",e),this.applyDescription("caption",void 0),this.layOutTitles(i)}applyDescription(t,e){let i=this,s=this.options[t]=aD(this.options[t],e),o=this[t];o&&e&&(this[t]=o=o.destroy()),s&&!o&&((o=this.renderer.text(s.text,0,0,s.useHTML).attr({align:s.align,class:"highcharts-"+t,zIndex:s.zIndex||4}).css({textOverflow:"ellipsis",whiteSpace:"nowrap"}).add()).update=function(e,s){i.applyDescription(t,e),i.layOutTitles(s)},this.styledMode||o.css(aS("title"===t?{fontSize:this.options.isStock?"1em":"1.2em"}:{},s.style)),o.textPxLength=o.getBBox().width,o.css({whiteSpace:s.style?.whiteSpace}),this[t]=o)}layOutTitles(t=!0){let e=[0,0,0],{options:i,renderer:s,spacingBox:o}=this;["title","subtitle","caption"].forEach(t=>{let i=this[t],r=this.options[t],a=aD(o),n=i?.textPxLength||0;if(i&&r){aC(this,"layOutTitle",{alignTo:a,key:t,textPxLength:n});let o=s.fontMetrics(i),h=o.b,l=o.h,d=r.verticalAlign||"top",c="top"===d,p=c&&r.minScale||1,g="title"===t?c?-3:0:c?e[0]+2:0,u=Math.min(a.width/n,1),f=Math.max(p,u),m=aD({y:"bottom"===d?h:g+h},{align:"title"===t?up?this.chartWidth:a.width)/f;i.alignValue!==m.align&&(i.placed=!1);let y=Math.round(i.css({width:`${x}px`}).getBBox(r.useHTML).height);if(m.height=y,i.align(m,!1,a).attr({align:m.align,scaleX:f,scaleY:f,"transform-origin":`${a.x+n*f*aA(m.align)} ${l}`}),!r.floating){let t=y*(y<1.2*l?1:f);"top"===d?e[0]=Math.ceil(e[0]+t):"bottom"===d&&(e[2]=Math.ceil(e[2]+t))}}},this),e[0]&&"top"===(i.title?.verticalAlign||"top")&&(e[0]+=i.title?.margin||0),e[2]&&i.caption?.verticalAlign==="bottom"&&(e[2]+=i.caption?.margin||0);let r=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,aC(this,"afterLayOutTitles"),!this.isDirtyBox&&r&&(this.isDirtyBox=this.isDirtyLegend=r,this.hasRendered&&t&&this.isDirtyBox&&this.redraw())}getContainerBox(){let t=[].map.call(this.renderTo.children,t=>{if(t!==this.container){let e=t.style.display;return t.style.display="none",[t,e]}}),e={width:aP(this.renderTo,"width",!0)||0,height:aP(this.renderTo,"height",!0)||0};return t.filter(Boolean).forEach(([t,e])=>{t.style.display=e}),e}getChartSize(){let t=this.options.chart,e=t.width,i=t.height,s=this.getContainerBox(),o=s.height<=1||!this.renderTo.parentElement?.style.height&&"100%"===this.renderTo.style.height;this.chartWidth=Math.max(0,e||s.width||600),this.chartHeight=Math.max(0,aR(i,this.chartWidth)||(o?400:s.height)),this.containerBox=s}temporaryDisplay(t){let e=this.renderTo,i;if(t)for(;e&&e.style;)e.hcOrigStyle&&(ay(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(ad.body.removeChild(e),e.hcOrigDetached=!1),e=e.parentNode;else for(;e&&e.style&&(ad.body.contains(e)||e.parentNode||(e.hcOrigDetached=!0,ad.body.appendChild(e)),("none"===aP(e,"display",!1)||e.hcOricDetached)&&(e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},i={display:"block",overflow:"hidden"},e!==this.renderTo&&(i.height=0),ay(e,i),e.offsetWidth||e.style.setProperty("display","block","important")),(e=e.parentNode)!==ad.body););}setClassName(t){this.container.className="highcharts-container "+(t||"")}getContainer(){let t;let e=this.options,i=e.chart,s="data-highcharts-chart",o=aF(),r=this.renderTo,a=az(am(r,s));aO(a)&&al[a]&&al[a].hasRendered&&al[a].destroy(),am(r,s,this.index),r.innerHTML=tK.emptyHTML,i.skipClone||r.offsetWidth||this.temporaryDisplay(),this.getChartSize();let n=this.chartHeight,h=this.chartWidth;ay(r,{overflow:"hidden"}),this.styledMode||(t=aS({position:"relative",overflow:"hidden",width:h+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},i.style||{}));let l=ax("div",{id:o},t,r);this.container=l,this.getChartSize(),h===this.chartWidth||(h=this.chartWidth,this.styledMode||ay(l,{width:aN(i.style?.width,h+"px")})),this.containerBox=this.getContainerBox(),this._cursor=l.style.cursor;let d=i.renderer||!ap?er.getRendererType(i.renderer):iR;if(this.renderer=new d(l,h,n,void 0,i.forExport,e.exporting&&e.exporting.allowHTML,this.styledMode),ar(void 0,this),this.setClassName(i.className),this.styledMode)for(let t in e.defs)this.renderer.definition(e.defs[t]);else this.renderer.setStyle(i.style);this.renderer.chartIndex=this.index,aC(this,"afterGetContainer")}getMargins(t){let{spacing:e,margin:i,titleOffset:s}=this;this.resetMargins(),s[0]&&!ab(i[0])&&(this.plotTop=Math.max(this.plotTop,s[0]+e[0])),s[2]&&!ab(i[2])&&(this.marginBottom=Math.max(this.marginBottom,s[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),aC(this,"getMargins"),t||this.getAxisMargins()}getAxisMargins(){let t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,s=t.margin,o=function(t){t.forEach(function(t){t.visible&&t.getOffset()})};t.hasCartesianSeries?o(t.axes):i&&i.length&&o(i),ac.forEach(function(i,o){ab(s[o])||(t[i]+=e[o])}),t.setChartSize()}getOptions(){return av(this.userOptions,aa)}reflow(t){let e=this,i=e.containerBox,s=e.getContainerBox();delete e.pointer?.chartPosition,!e.isPrinting&&!e.isResizing&&i&&s.width&&((s.width!==i.width||s.height!==i.height)&&($.clearTimeout(e.reflowTimeout),e.reflowTimeout=aX(function(){e.container&&e.setSize(void 0,void 0,!1)},t?100:0)),e.containerBox=s)}setReflow(){let t=this,e=e=>{t.options?.chart.reflow&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{let t=af(ag,"resize",e);af(this,"destroy",t)}}setSize(t,e,i){let s=this,o=s.renderer;s.isResizing+=1,ar(i,s);let r=o.globalAnimation;s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==t&&(s.options.chart.width=t),void 0!==e&&(s.options.chart.height=e),s.getChartSize();let{chartWidth:a,chartHeight:n,scrollablePixelsX:h=0,scrollablePixelsY:l=0}=s;(s.isDirtyBox||a!==s.oldChartWidth||n!==s.oldChartHeight)&&(s.styledMode||(r?as:ay)(s.container,{width:`${a+h}px`,height:`${n+l}px`},r),s.setChartSize(!0),o.setSize(a,n,r),s.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(r),s.oldChartHeight=void 0,aC(s,"resize"),setTimeout(()=>{s&&aC(s,"endResize")},ao(r).duration)),s.isResizing-=1}setChartSize(t){let e,i,s,o;let{chartHeight:r,chartWidth:a,inverted:n,spacing:h,renderer:l}=this,d=this.clipOffset,c=Math[n?"floor":"round"];this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=s=Math.max(0,Math.round(a-e-this.marginRight)),this.plotHeight=o=Math.max(0,Math.round(r-i-this.marginBottom)),this.plotSizeX=n?o:s,this.plotSizeY=n?s:o,this.spacingBox=l.spacingBox={x:h[3],y:h[0],width:a-h[3]-h[1],height:r-h[0]-h[2]},this.plotBox=l.plotBox={x:e,y:i,width:s,height:o},d&&(this.clipBox={x:c(d[3]),y:c(d[0]),width:c(this.plotSizeX-d[1]-d[3]),height:c(this.plotSizeY-d[0]-d[2])}),t||(this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),l.alignElements()),aC(this,"afterSetChartSize",{skipAxes:t})}resetMargins(){aC(this,"resetMargins");let t=this,e=t.options.chart,i=e.plotBorderWidth||0,s=i/2;["margin","spacing"].forEach(function(i){let s=e[i],o=aE(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach(function(s,r){t[i][r]=aN(e[i+s],o[r])})}),ac.forEach(function(e,i){t[e]=aN(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[s,s,s,s],t.plotBorderWidth=i}drawChartBox(){let t=this.options.chart,e=this.renderer,i=this.chartWidth,s=this.chartHeight,o=this.styledMode,r=this.plotBGImage,a=t.backgroundColor,n=t.plotBackgroundColor,h=t.plotBackgroundImage,l=this.plotLeft,d=this.plotTop,c=this.plotWidth,p=this.plotHeight,g=this.plotBox,u=this.clipRect,f=this.clipBox,m=this.chartBackground,x=this.plotBackground,y=this.plotBorder,b,v,k,w="animate";m||(this.chartBackground=m=e.rect().addClass("highcharts-background").add(),w="attr"),o?b=v=m.strokeWidth():(v=(b=t.borderWidth||0)+(t.shadow?8:0),k={fill:a||"none"},(b||m["stroke-width"])&&(k.stroke=t.borderColor,k["stroke-width"]=b),m.attr(k).shadow(t.shadow)),m[w]({x:v/2,y:v/2,width:i-v-b%2,height:s-v-b%2,r:t.borderRadius}),w="animate",x||(w="attr",this.plotBackground=x=e.rect().addClass("highcharts-plot-background").add()),x[w](g),!o&&(x.attr({fill:n||"none"}).shadow(t.plotShadow),h&&(r?(h!==r.attr("href")&&r.attr("href",h),r.animate(g)):this.plotBGImage=e.image(h,l,d,c,p).add())),u?u.animate({width:f.width,height:f.height}):this.clipRect=e.clipRect(f),w="animate",y||(w="attr",this.plotBorder=y=e.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),o||y.attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth||0,fill:"none"}),y[w](y.crisp({x:l,y:d,width:c,height:p},-y.strokeWidth())),this.isDirtyBox=!1,aC(this,"afterDrawChartBox")}propFromSeries(){let t,e,i;let s=this,o=s.options.chart,r=s.options.series;["inverted","angular","polar"].forEach(function(a){for(e=au[o.type],i=o[a]||e&&e.prototype[a],t=r&&r.length;!i&&t--;)(e=au[r[t].type])&&e.prototype[a]&&(i=!0);s[a]=i})}linkSeries(t){let e=this,i=e.series;i.forEach(function(t){t.linkedSeries.length=0}),i.forEach(function(t){let{linkedTo:i}=t.options;if(aI(i)){let s;(s=":previous"===i?e.series[t.index-1]:e.get(i))&&s.linkedParent!==t&&(s.linkedSeries.push(t),t.linkedParent=s,s.enabledDataSorting&&t.setDataSortingOptions(),t.visible=aN(t.options.visible,s.options.visible,t.visible))}}),aC(this,"afterLinkSeries",{isUpdating:t})}renderSeries(){this.series.forEach(function(t){t.translate(),t.render()})}render(){let t=this.axes,e=this.colorAxis,i=this.renderer,s=this.options.chart.axisLayoutRuns||2,o=t=>{t.forEach(t=>{t.visible&&t.render()})},r=0,a=!0,n,h=0;for(let e of(this.setTitle(),aC(this,"beforeMargins"),this.getStacks?.(),this.getMargins(!0),this.setChartSize(),t)){let{options:t}=e,{labels:i}=t;if(this.hasCartesianSeries&&e.horiz&&e.visible&&i.enabled&&e.series.length&&"colorAxis"!==e.coll&&!this.polar){r=t.tickLength,e.createGroups();let s=new sa(e,0,"",!0),o=s.createLabel("x",i);if(s.destroy(),o&&aN(i.reserveSpace,!aO(t.crossing))&&(r=o.getBBox().height+i.distance+Math.max(t.offset||0,0)),r){o?.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-r,0);(a||n||s>1)&&h(h?1:1.1),n=i/this.plotHeight>(h?1:1.05),h++}this.drawChartBox(),this.hasCartesianSeries?o(t):e&&e.length&&o(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(t){let e=this,i=aD(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){i.href&&(ag.location.href=i.href)}).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})}destroy(){let t;let e=this,i=e.axes,s=e.series,o=e.container,r=o&&o.parentNode;for(aC(e,"destroy"),e.renderer.forExport?aw(al,e):al[e.index]=void 0,k.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),aW(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=s.length;t--;)s[t]=s[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(function(t){let i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),o&&(o.innerHTML=tK.emptyHTML,aW(o),r&&ak(o)),aB(e,function(t,i){delete e[i]})}firstRender(){let t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.createAxes();let i=aL(e.series)?e.series:[];e.series=[],i.forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSortedData(),aC(t,"beforeRender"),t.render(),t.pointer?.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),aC(this,"load"),aC(this,"render"),ab(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:t,title:e}=this;!t||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e&&e.element.textContent||"").replace(/this.transform({reset:!0,trigger:"zoom"}))}pan(t,e){let i=this,s="object"==typeof e?e:{enabled:e,type:"x"},o=s.type,r=o&&i[({x:"xAxis",xy:"axes",y:"yAxis"})[o]].filter(t=>t.options.panningEnabled&&!t.options.isInternal),a=i.options.chart;a?.panning&&(a.panning=s),aC(this,"pan",{originalEvent:t},()=>{i.transform({axes:r,event:t,to:{x:t.chartX-(i.mouseDownX||0),y:t.chartY-(i.mouseDownY||0)},trigger:"pan"}),ay(i.container,{cursor:"move"})})}transform(t){let{axes:e=this.axes,event:i,from:s={},reset:o,selection:r,to:a={},trigger:n}=t,{inverted:h,time:l}=this,d=!1,c,p;for(let t of(this.hoverPoints?.forEach(t=>t.setState()),e)){let{horiz:e,len:g,minPointOffset:u=0,options:f,reversed:m}=t,x=e?"width":"height",y=e?"x":"y",b=aN(a[x],t.len),v=aN(s[x],t.len),k=10>Math.abs(b)?1:b/v,w=(s[y]||0)+v/2-t.pos,M=w-((a[y]??t.pos)+b/2-t.pos)/k,S=m&&!h||!m&&h?-1:1;if(!o&&(w<0||w>t.len))continue;let T=t.toValue(M,!0)+(r||t.isOrdinal?0:u*S),C=t.toValue(M+g/k,!0)-(r||t.isOrdinal?0:u*S||0),A=t.allExtremes;if(T>C&&([T,C]=[C,T]),1===k&&!o&&"yAxis"===t.coll&&!A){for(let e of t.series){let t=e.getExtremes(e.getProcessedData(!0).modified.getColumn("y")||[],!0);A??(A={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),aO(t.dataMin)&&aO(t.dataMax)&&(A.dataMin=Math.min(t.dataMin,A.dataMin),A.dataMax=Math.max(t.dataMax,A.dataMax))}t.allExtremes=A}let{dataMin:P,dataMax:L,min:O,max:E}=aS(t.getExtremes(),A||{}),I=l.parse(f.min),D=l.parse(f.max),B=P??I,N=L??D,z=C-T,R=t.categories?0:Math.min(z,N-B),W=B-R*(ab(I)?0:f.minPadding),H=N+R*(ab(D)?0:f.maxPadding),X=t.allowZoomOutside||1===k||"zoom"!==n&&k>1,F=Math.min(I??W,W,X?O:W),G=Math.max(D??H,H,X?E:H);(!t.isOrdinal||t.options.overscroll||1!==k||o)&&(T=1&&(C=T+z)),C>G&&(C=G,k>=1&&(T=C-z)),(o||t.series.length&&(T!==O||C!==E)&&T>=F&&C<=G)&&(r?r[t.coll].push({axis:t,min:T,max:C}):(t.isPanning="zoom"!==n,t.isPanning&&(p=!0),t.setExtremes(o?void 0:T,o?void 0:C,!1,!1,{move:M,trigger:n,scale:k}),!o&&(T>F||C{delete t.selection,t.trigger="zoom",this.transform(t)}):(!c||p||this.resetZoomButton?!c&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw("zoom"===n&&(this.options.chart.animation??this.pointCount<100)))),d}}aS(aG.prototype,{callbacks:[],collectionsWithInit:{xAxis:[aG.prototype.addAxis,[!0]],yAxis:[aG.prototype.addAxis,[!1]],series:[aG.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]});let{stop:aY}=tR,{composed:aj}=k,{addEvent:aU,createElement:a$,css:aV,defined:a_,erase:aq,merge:aZ,pushUnique:aK}=$;function aJ(){let t=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!t&&(this.scrollablePlotArea=t=new a0(this)),t?.applyFixed()}function aQ(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class a0{static compose(t,e,i){aK(aj,this.compose)&&(aU(t,"afterInit",aQ),aU(e,"afterSetChartSize",t=>this.afterSetSize(t.target,t)),aU(e,"render",aJ),aU(i,"show",aQ))}static afterSetSize(t,e){let i,s,o;let{minWidth:r,minHeight:a}=t.options.chart.scrollablePlotArea||{},{clipBox:n,plotBox:h,inverted:l,renderer:d}=t;if(!d.forExport&&(r?(t.scrollablePixelsX=i=Math.max(0,r-t.chartWidth),i&&(t.scrollablePlotBox=aZ(t.plotBox),h.width=t.plotWidth+=i,n[l?"height":"width"]+=i,o=!0)):a&&(t.scrollablePixelsY=s=Math.max(0,a-t.chartHeight),a_(s)&&(t.scrollablePlotBox=aZ(t.plotBox),h.height=t.plotHeight+=s,n[l?"width":"height"]+=s,o=!1)),a_(o)&&!e.skipAxes))for(let e of t.axes)(e.horiz===o||t.hasParallelCoordinates&&"yAxis"===e.coll)&&(e.setAxisSize(),e.setAxisTranslation())}constructor(t){let e;let i=t.options.chart,s=er.getRendererType(),o=i.scrollablePlotArea||{},r=this.moveFixedElements.bind(this),a={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};t.scrollablePixelsX&&(a.overflowX="auto"),t.scrollablePixelsY&&(a.overflowY="auto"),this.chart=t;let n=this.parentDiv=a$("div",{className:"highcharts-scrolling-parent"},{position:"relative"},t.renderTo),h=this.scrollingContainer=a$("div",{className:"highcharts-scrolling"},a,n),l=this.innerContainer=a$("div",{className:"highcharts-inner-container"},void 0,h),d=this.fixedDiv=a$("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(i.style?.zIndex||0)+2,top:0},void 0,!0),c=this.fixedRenderer=new s(d,t.chartWidth,t.chartHeight,i.style);this.mask=c.path().attr({fill:i.backgroundColor||"#fff","fill-opacity":o.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),h.parentNode.insertBefore(d,h),aV(t.renderTo,{overflow:"visible"}),aU(t,"afterShowResetZoom",r),aU(t,"afterApplyDrilldown",r),aU(t,"afterLayOutTitles",r),aU(h,"scroll",()=>{let{pointer:i,hoverPoint:s}=t;i&&(delete i.chartPosition,s&&(e=s),i.runPointActions(void 0,e,!0))}),l.appendChild(t.container)}applyFixed(){let{chart:t,fixedRenderer:e,isDirty:i,scrollingContainer:s}=this,{axisOffset:o,chartWidth:r,chartHeight:a,container:n,plotHeight:h,plotLeft:l,plotTop:d,plotWidth:c,scrollablePixelsX:p=0,scrollablePixelsY:g=0}=t,{scrollPositionX:u=0,scrollPositionY:f=0}=t.options.chart.scrollablePlotArea||{},m=r+p,x=a+g;e.setSize(r,a),(i??!0)&&(this.isDirty=!1,this.moveFixedElements()),aY(t.container),aV(n,{width:`${m}px`,height:`${x}px`}),t.renderer.boxWrapper.attr({width:m,height:x,viewBox:[0,0,m,x].join(" ")}),t.chartBackground?.attr({width:m,height:x}),aV(s,{width:`${r}px`,height:`${a}px`}),a_(i)||(s.scrollLeft=p*u,s.scrollTop=g*f);let y=d-o[0]-1,b=l-o[3]-1,v=d+h+o[2]+1,k=l+c+o[1]+1,w=l+c-p,M=d+h-g,S=[["M",0,0]];p?S=[["M",0,y],["L",l-1,y],["L",l-1,v],["L",0,v],["Z"],["M",w,y],["L",r,y],["L",r,v],["L",w,v],["Z"]]:g&&(S=[["M",b,0],["L",b,d-1],["L",k,d-1],["L",k,0],["Z"],["M",b,M],["L",b,a],["L",k,a],["L",k,M],["Z"]]),"adjustHeight"!==t.redrawTrigger&&this.mask.attr({d:S})}moveFixedElements(){let t;let{container:e,inverted:i,scrollablePixelsX:s,scrollablePixelsY:o}=this.chart,r=this.fixedRenderer,a=a0.fixedSelectors;if(s&&!i?t=".highcharts-yaxis":s&&i?t=".highcharts-xaxis":o&&!i?t=".highcharts-xaxis":o&&i&&(t=".highcharts-yaxis"),t&&!(this.chart.hasParallelCoordinates&&".highcharts-yaxis"===t))for(let e of[`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`])aK(a,e);else for(let t of[".highcharts-xaxis",".highcharts-yaxis"])for(let e of[`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`])aq(a,e);for(let t of a)[].forEach.call(e.querySelectorAll(t),t=>{(t.namespaceURI===r.SVG_NS?r.box:r.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})}}a0.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];let{format:a1}=eo,{series:a2}=rd,{destroyObjectProperties:a3,fireEvent:a5,getAlignFactor:a6,isNumber:a9,pick:a4}=$,a8=class{constructor(t,e,i,s,o){let r=t.chart.inverted,a=t.reversed;this.axis=t;let n=this.isNegative=!!i!=!!a;this.options=e=e||{},this.x=s,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=o,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(r?n?"left":"right":"center"),verticalAlign:e.verticalAlign||(r?"middle":n?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(r?n?"right":"left":"center")}destroy(){a3(this,this.axis)}render(t){let e=this.axis.chart,i=this.options,s=i.format,o=s?a1(s,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:"hidden"});else{this.label=e.renderer.label(o,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");let s={r:i.borderRadius||0,text:o,padding:a4(i.padding,5),visibility:"hidden"};e.styledMode||(s.fill=i.backgroundColor,s.stroke=i.borderColor,s["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(s),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,a5(this,"afterRender")}setOffset(t,e,i,s,o,r){let{alignOptions:a,axis:n,label:h,options:l,textAlign:d}=this,c=n.chart,p=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:s,defaultX:o,xAxis:r}),{verticalAlign:g}=a;if(h&&p){let t=h.getBBox(void 0,0),e=h.padding,i="justify"===a4(l.overflow,"justify"),s;a.x=l.x||0,a.y=l.y||0;let{x:o,y:r}=this.adjustStackPosition({labelBox:t,verticalAlign:g,textAlign:d});p.x-=o,p.y-=r,h.align(a,!1,p),(s=c.isInsidePlot(h.alignAttr.x+a.x+o,h.alignAttr.y+a.y+r))||(i=!1),i&&a2.prototype.justifyDataLabel.call(n,h,a,h.alignAttr,t,p),h.attr({x:h.alignAttr.x,y:h.alignAttr.y,rotation:l.rotation,rotationOriginX:t.width*a6(l.textAlign||"center"),rotationOriginY:t.height/2}),a4(!i&&l.crop,!0)&&(s=a9(h.x)&&a9(h.y)&&c.isInsidePlot(h.x-e+(h.width||0),h.y)&&c.isInsidePlot(h.x+e,h.y)),h[s?"show":"hide"]()}a5(this,"afterSetOffset",{xOffset:t,width:e})}adjustStackPosition({labelBox:t,verticalAlign:e,textAlign:i}){return{x:t.width/2+t.width/2*(2*a6(i)-1),y:t.height/2*2*(1-a6(e))}}getStackBox(t){let e=this.axis,i=e.chart,{boxTop:s,defaultX:o,xOffset:r,width:a,boxBottom:n}=t,h=e.stacking.usePercentage?100:a4(s,this.total,0),l=e.toPixels(h),d=t.xAxis||i.xAxis[0],c=a4(o,d.translate(this.x))+r,p=Math.abs(l-e.toPixels(n||a9(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),g=i.inverted,u=this.isNegative;return g?{x:(u?l:l-p)-i.plotLeft,y:d.height-c-a+d.top-i.plotTop,width:p,height:a}:{x:c+d.transB-i.plotLeft,y:(u?l-p:l)-i.plotTop,width:a,height:p}}},{getDeferredAnimation:a7}=tR,{series:{prototype:nt}}=rd,{addEvent:ne,correctFloat:ni,defined:ns,destroyObjectProperties:no,fireEvent:nr,isNumber:na,objectEach:nn,pick:nh}=$;function nl(){let t=this.inverted;this.axes.forEach(t=>{t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)}),this.series.forEach(e=>{let i=e.xAxis&&e.xAxis.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,nh(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))})}function nd(){let t=this.stacking;if(t){let e=t.stacks;nn(e,(t,i)=>{no(t),delete e[i]}),t.stackTotalGroup?.destroy()}}function nc(){this.stacking||(this.stacking=new nx(this))}function np(t,e,i,s){return!ns(t)||t.x!==e||s&&t.stackKey!==s?t={x:e,index:0,key:s,stackKey:s}:t.index++,t.key=[i,e,t.index].join(","),t}function ng(){let t;let e=this,i=e.yAxis,s=e.stackKey||"",o=i.stacking.stacks,r=e.getColumn("x",!0),a=e.options.stacking,n=e[a+"Stacker"];n&&[s,"-"+s].forEach(i=>{let s=r.length,a,h,l;for(;s--;)a=r[s],t=e.getStackIndicator(t,a,e.index,i),h=o[i]?.[a],(l=h?.points[t.key||""])&&n.call(e,l,h,s)})}function nu(t,e,i){let s=e.total?100/e.total:0;t[0]=ni(t[0]*s),t[1]=ni(t[1]*s),this.stackedYData[i]=t[1]}function nf(t){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&this.chart.series.length>1?nt.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks())}function nm(t,e){let i,s,o,r,a,n,h;let l=e||this.options.stacking;if(!l||!this.reserveSpace()||(({group:"xAxis"})[l]||"yAxis")!==t.coll)return;let d=this.getColumn("x",!0),c=this.getColumn(this.pointValKey||"y",!0),p=[],g=c.length,u=this.options,f=u.threshold||0,m=u.startFromThreshold?f:0,x=u.stack,y=e?`${this.type},${l}`:this.stackKey||"",b="-"+y,v=this.negStacks,k=t.stacking,w=k.stacks,M=k.oldStacks;for(k.stacksTouched+=1,h=0;h0&&!1===this.singleStacks&&(o.points[n][0]=o.points[this.index+","+e+",0"][0])):(delete o.points[n],delete o.points[this.index]);let S=o.total||0;"percent"===l?(r=s?y:b,S=v&&w[r]?.[e]?(r=w[r][e]).total=Math.max(r.total||0,S)+Math.abs(u):ni(S+Math.abs(u))):"group"===l?na(g)&&S++:S=ni(S+u),"group"===l?o.cumulative=(S||1)-1:o.cumulative=ni(nh(o.cumulative,m)+u),o.total=S,null!==g&&(o.points[n].push(o.cumulative),p[h]=o.cumulative,o.hasValidPoints=!0)}"percent"===l&&(k.usePercentage=!0),"group"!==l&&(this.stackedYData=p),k.oldStacks={}}class nx{constructor(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}buildStacks(){let t,e;let i=this.axis,s=i.series,o="xAxis"===i.coll,r=i.options.reversedStacks,a=s.length;for(this.resetStacks(),this.usePercentage=!1,e=a;e--;)t=s[r?e:a-e-1],o&&t.setGroupedPoints(i),t.setStackedPoints(i);if(!o)for(e=0;e{nn(t,t=>{t.cumulative=t.total})}))}resetStacks(){nn(this.stacks,t=>{nn(t,(e,i)=>{na(e.touched)&&e.touched{nn(t,t=>{t.render(r)})}),r.animate({opacity:1},o)}}(p||(p={})).compose=function(t,e,i){let s=e.prototype,o=i.prototype;s.getStacks||(ne(t,"init",nc),ne(t,"destroy",nd),s.getStacks=nl,o.getStackIndicator=np,o.modifyStacks=ng,o.percentStacker=nu,o.setGroupedPoints=nf,o.setStackedPoints=nm)};let ny=p,{defined:nb,merge:nv,isObject:nk}=$;class nw extends rY{drawGraph(){let t=this.options,e=(this.gappedPath||this.getGraphPath).call(this),i=this.chart.styledMode;[this,...this.zones].forEach((s,o)=>{let r,a=s.graph,n=a?"animate":"attr",h=s.dashStyle||t.dashStyle;a?(a.endX=this.preventGraphAnimation?null:e.xMap,a.animate({d:e})):e.length&&(s.graph=a=this.chart.renderer.path(e).addClass("highcharts-graph"+(o?` highcharts-zone-graph-${o-1} `:" ")+(o&&s.className||"")).attr({zIndex:1}).add(this.group)),a&&!i&&(r={stroke:!o&&t.lineColor||s.color||this.color||"#cccccc","stroke-width":t.lineWidth||0,fill:this.fillGraph&&this.color||"none"},h?r.dashstyle=h:"square"!==t.linecap&&(r["stroke-linecap"]=r["stroke-linejoin"]="round"),a[n](r).shadow(t.shadow&&nv({filterUnits:"userSpaceOnUse"},nk(t.shadow)?t.shadow:{}))),a&&(a.startX=e.xMap,a.isArea=e.isArea)})}getGraphPath(t,e,i){let s=this,o=s.options,r=[],a=[],n,h=o.step,l=(t=t||s.points).reversed;return l&&t.reverse(),(h=({right:1,center:2})[h]||h&&3)&&l&&(h=4-h),(t=this.getValidPoints(t,!1,!(o.connectNulls&&!e&&!i))).forEach(function(l,d){let c;let p=l.plotX,g=l.plotY,u=t[d-1],f=l.isNull||"number"!=typeof g;(l.leftCliff||u&&u.rightCliff)&&!i&&(n=!0),f&&!nb(e)&&d>0?n=!o.connectNulls:f&&!e?n=!0:(0===d||n?c=[["M",l.plotX,l.plotY]]:s.getPointSpline?c=[s.getPointSpline(t,l,d)]:h?(c=1===h?[["L",u.plotX,g]]:2===h?[["L",(u.plotX+p)/2,u.plotY],["L",(u.plotX+p)/2,g]]:[["L",p,u.plotY]]).push(["L",p,g]):c=[["L",p,g]],a.push(l.x),h&&(a.push(l.x),2===h&&a.push(l.x)),r.push.apply(r,c),n=!1)}),r.xMap=a,s.graphPath=r,r}}nw.defaultOptions=nv(rY.defaultOptions,{legendSymbol:"lineMarker"}),rd.registerSeriesType("line",nw);let{seriesTypes:{line:nM}}=rd,{extend:nS,merge:nT,objectEach:nC,pick:nA}=$;class nP extends nM{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:t,options:e}=this;[this,...this.zones].forEach((i,s)=>{let o={},r=i.fillColor||e.fillColor,a=i.area,n=a?"animate":"attr";a?(a.endX=this.preventGraphAnimation?null:t.xMap,a.animate({d:t})):(o.zIndex=0,(a=i.area=this.chart.renderer.path(t).addClass("highcharts-area"+(s?` highcharts-zone-area-${s-1} `:" ")+(s&&i.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(o.fill=r||i.color||this.color,o["fill-opacity"]=r?1:e.fillOpacity??.75,a.css({pointerEvents:this.stickyTracking?"none":"auto"})),a[n](o),a.startX=t.xMap,a.shiftUnit=e.step?2:1})}getGraphPath(t){let e,i,s;let o=nM.prototype.getGraphPath,r=this.options,a=r.stacking,n=this.yAxis,h=[],l=[],d=this.index,c=n.stacking.stacks[this.stackKey],p=r.threshold,g=Math.round(n.getThreshold(r.threshold)),u=nA(r.connectNulls,"percent"===a),f=function(i,s,o){let r=t[i],u=a&&c[r.x].points[d],f=r[o+"Null"]||0,m=r[o+"Cliff"]||0,x,y,b=!0;m||f?(x=(f?u[0]:u[1])+m,y=u[0]+m,b=!!f):!a&&t[s]&&t[s].isNull&&(x=y=p),void 0!==x&&(l.push({plotX:e,plotY:null===x?g:n.getThreshold(x),isNull:b,isCliff:!0}),h.push({plotX:e,plotY:null===y?g:n.getThreshold(y),doCurve:!1}))};t=t||this.points,a&&(t=this.getStackPoints(t));for(let o=0,r=t.length;o1&&a&&l.some(t=>t.isCliff)&&(b.hasStackedCliffs=v.hasStackedCliffs=!0),b.xMap=m.xMap,this.areaPath=b,v}getStackPoints(t){let e=this,i=[],s=[],o=this.xAxis,r=this.yAxis,a=r.stacking.stacks[this.stackKey],n={},h=r.series,l=h.length,d=r.options.reversedStacks?1:-1,c=h.indexOf(e);if(t=t||this.points,this.options.stacking){for(let e=0;et.visible);s.forEach(function(t,g){let u=0,f,m;if(n[t]&&!n[t].isNull)i.push(n[t]),[-1,1].forEach(function(i){let o=1===i?"rightNull":"leftNull",r=a[s[g+i]],u=0;if(r){let i=c;for(;i>=0&&i=0&&ei&&o>h?(o=Math.max(i,h),a=2*h-o):op&&a>h?(a=Math.max(p,h),o=2*h-a):a1){let o=this.xAxis.series.filter(t=>t.visible).map(t=>t.index),r=0,a=0;nK(this.xAxis.stacking?.stacks,t=>{let e="number"==typeof i.x?t[i.x.toString()]?.points:void 0,s=e?.[this.index],n={};if(e&&nV(s)){let t=this.index,i=Object.keys(e).filter(t=>!t.match(",")&&e[t]&&e[t].length>1).map(parseFloat).filter(t=>-1!==o.indexOf(t)).filter(e=>{let i=this.chart.series[e].options,s=i.stacking&&i.stack;if(nj(s)){if(n_(n[s]))return t===e&&(t=n[s]),!1;n[s]=e}return!0}).sort((t,e)=>e-t);r=i.indexOf(t),a=i.length}}),r=this.xAxis.reversed?a-1-r:r;let n=(a-1)*s.paddedWidth+e;t=(i.plotX||0)+n/2-e-r*s.paddedWidth}return t}translate(){let t=this,e=t.chart,i=t.options,s=t.dense=t.closestPointRange*t.xAxis.transA<2,o=t.borderWidth=nZ(i.borderWidth,s?0:1),r=t.xAxis,a=t.yAxis,n=i.threshold,h=nZ(i.minPointLength,5),l=t.getColumnMetrics(),d=l.width,c=t.pointXOffset=l.offset,p=t.dataMin,g=t.dataMax,u=t.translatedThreshold=a.getThreshold(n),f=t.barW=Math.max(d,1+2*o);i.pointPadding&&i.crisp&&(f=Math.ceil(f)),rY.prototype.translate.apply(t),t.points.forEach(function(s){let o=nZ(s.yBottom,u),m=999+Math.abs(o),x=s.plotX||0,y=nG(s.plotY,-m,a.len+m),b,v=Math.min(y,o),k=Math.max(y,o)-v,w=d,M=x+c,S=f;h&&Math.abs(k)h?o-h:u-(b?h:0)),nj(s.options.pointWidth)&&(M-=Math.round(((w=S=Math.ceil(s.options.pointWidth))-d)/2)),i.centerInCategory&&(M=t.adjustForMissingColumns(M,w,s,l)),s.barX=M,s.pointWidth=w,s.tooltipPos=e.inverted?[nG(a.len+a.pos-e.plotLeft-y,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),r.len+r.pos-e.plotTop-M-S/2,k]:[r.left-e.plotLeft+M+S/2,nG(y+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),k],s.shapeType=t.pointClass.prototype.shapeType||"roundedRect",s.shapeArgs=t.crispCol(M,s.isNull?u:v,S,s.isNull?0:k)}),n$(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(t,e){let i=this.options,s=this.pointAttrToOptions||{},o=s.stroke||"borderColor",r=s["stroke-width"]||"borderWidth",a,n,h,l=t&&t.color||this.color,d=t&&t[o]||i[o]||l,c=t&&t.options.dashStyle||i.dashStyle,p=t&&t[r]||i[r]||this[r]||0,g=nZ(t&&t.opacity,i.opacity,1);t&&this.zones.length&&(n=t.getZone(),l=t.options.color||n&&(n.color||t.nonZonedColor)||this.color,n&&(d=n.borderColor||d,c=n.dashStyle||c,p=n.borderWidth||p)),e&&t&&(h=(a=nq(i.states[e],t.options.states&&t.options.states[e]||{})).brightness,l=a.color||void 0!==h&&nX(l).brighten(a.brightness).get()||l,d=a[o]||d,p=a[r]||p,c=a.dashStyle||c,g=nZ(a.opacity,g));let u={fill:l,stroke:d,"stroke-width":p,opacity:g};return c&&(u.dashstyle=c),u}drawPoints(t=this.points){let e;let i=this,s=this.chart,o=i.options,r=s.renderer,a=o.animationLimit||250;t.forEach(function(t){let n=t.plotY,h=t.graphic,l=!!h,d=h&&s.pointCountt?.enabled)}function i(t,e,i,s,o){let{chart:r,enabledDataSorting:a}=this,n=this.isCartesian&&r.inverted,h=t.plotX,l=t.plotY,d=i.rotation||0,c=n2(h)&&n2(l)&&r.isInsidePlot(h,Math.round(l),{inverted:n,paneCoordinates:!0,series:this}),p=0===d&&"justify"===ht(i.overflow,a?"none":"justify"),g=this.visible&&!1!==t.visible&&n2(h)&&(t.series.forceDL||a&&!p||c||ht(i.inside,!!this.options.stacking)&&s&&r.isInsidePlot(h,n?s.x+1:s.y+s.height-1,{inverted:n,paneCoordinates:!0,series:this})),u=t.pos();if(g&&u){var f;let h=e.getBBox(),l=e.getBBox(void 0,0);if(s=n3({x:u[0],y:Math.round(u[1]),width:0,height:0},s||{}),"plotEdges"===i.alignTo&&this.isCartesian&&(s[n?"x":"y"]=0,s[n?"width":"height"]=this.yAxis?.len||0),n3(i,{width:h.width,height:h.height}),f=s,a&&this.xAxis&&!p&&this.setDataLabelStartPos(t,e,o,c,f),e.align(n8(i,{width:l.width,height:l.height}),!1,s,!1),e.alignAttr.x+=n6(i.align)*(l.width-h.width),e.alignAttr.y+=n6(i.verticalAlign)*(l.height-h.height),e[e.placed?"animate":"attr"]({"text-align":e.alignAttr["text-align"]||"center",x:e.alignAttr.x+(h.width-l.width)/2,y:e.alignAttr.y+(h.height-l.height)/2,rotationOriginX:(e.width||0)/2,rotationOriginY:(e.height||0)/2}),p&&s.height>=0)this.justifyDataLabel(e,i,e.alignAttr,h,s,o);else if(ht(i.crop,!0)){let{x:t,y:i}=e.alignAttr;g=r.isInsidePlot(t,i,{paneCoordinates:!0,series:this})&&r.isInsidePlot(t+h.width-1,i+h.height-1,{paneCoordinates:!0,series:this})}i.shape&&!d&&e[o?"attr":"animate"]({anchorX:u[0],anchorY:u[1]})}o&&a&&(e.placed=!1),g||a&&!p?(e.show(),e.placed=!0):(e.hide(),e.placed=!1)}function s(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function o(t){let e=this.hasRendered||0,i=this.initDataLabelsGroup().attr({opacity:+e});return!e&&i&&(this.visible&&i.show(),this.options.animation?i.animate({opacity:1},t):i.attr({opacity:1})),i}function r(t){let e;t=t||this.points;let i=this,s=i.chart,o=i.options,r=s.renderer,{backgroundColor:a,plotBackgroundColor:l}=s.options.chart,d=r.getContrast(n4(l)&&l||n4(a)&&a||"#000000"),c=h(i),{animation:p,defer:g}=c[0],u=g?n0(s,p,i):{defer:0,duration:0};n5(this,"drawDataLabels"),i.hasDataLabels?.()&&(e=this.initDataLabels(u),t.forEach(t=>{let a=t.dataLabels||[];hi(n(c,t.dlOptions||t.options?.dataLabels)).forEach((n,h)=>{let l=n.enabled&&(t.visible||t.dataLabelOnHidden)&&(!t.isNull||t.dataLabelOnNull)&&function(t,e){let i=e.filter;if(i){let e=i.operator,s=t[i.property],o=i.value;return">"===e&&s>o||"<"===e&&s="===e&&s>=o||"<="===e&&s<=o||"=="===e&&s==o||"==="===e&&s===o||"!="===e&&s!=o||"!=="===e&&s!==o}return!0}(t,n),{backgroundColor:c,borderColor:p,distance:g,style:u={}}=n,f,m,x,y={},b=a[h],v=!b,k;l&&(m=n2(f=ht(n[t.formatPrefix+"Format"],n.format))?n1(f,t,s):(n[t.formatPrefix+"Formatter"]||n.formatter).call(t,n),x=n.rotation,!s.styledMode&&(u.color=ht(n.color,u.color,n4(i.color)?i.color:void 0,"#000000"),"contrast"===u.color?("none"!==c&&(k=c),t.contrastColor=r.getContrast("auto"!==k&&k||t.color||i.color),u.color=k||!n2(g)&&n.inside||0>he(g||0)||o.stacking?t.contrastColor:d):delete t.contrastColor,o.cursor&&(u.cursor=o.cursor)),y={r:n.borderRadius||0,rotation:x,padding:n.padding,zIndex:1},s.styledMode||(y.fill="auto"===c?t.color:c,y.stroke="auto"===p?t.color:p,y["stroke-width"]=n.borderWidth),n7(y,(t,e)=>{void 0===t&&delete y[e]})),!b||l&&n2(m)&&!!b.div==!!n.useHTML&&(b.rotation&&n.rotation||b.rotation===n.rotation)||(b=void 0,v=!0),l&&n2(m)&&(b?y.text=m:(b=r.label(m,0,0,n.shape,void 0,void 0,n.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(n.className||"")+(n.useHTML?" highcharts-tracker":"")),b&&(b.options=n,b.attr(y),s.styledMode?u.width&&b.css({width:u.width,textOverflow:u.textOverflow,whiteSpace:u.whiteSpace}):b.css(u).shadow(n.shadow),n5(b,"beforeAddingDataLabel",{labelOptions:n,point:t}),b.added||b.add(e),i.alignDataLabel(t,b,n,void 0,v),b.isActive=!0,a[h]&&a[h]!==b&&a[h].destroy(),a[h]=b))});let h=a.length;for(;h--;)a[h]&&a[h].isActive?a[h].isActive=!1:(a[h]?.destroy(),a.splice(h,1));t.dataLabel=a[0],t.dataLabels=a})),n5(this,"afterDrawDataLabels")}function a(t,e,i,s,o,r){let a=this.chart,n=e.align,h=e.verticalAlign,l=t.box?0:t.padding||0,d=a.inverted?this.yAxis:this.xAxis,c=d?d.left-a.plotLeft:0,p=a.inverted?this.xAxis:this.yAxis,g=p?p.top-a.plotTop:0,{x:u=0,y:f=0}=e,m,x;return(m=(i.x||0)+l+c)<0&&("right"===n&&u>=0?(e.align="left",e.inside=!0):u-=m,x=!0),(m=(i.x||0)+s.width-l+c)>a.plotWidth&&("left"===n&&u<=0?(e.align="right",e.inside=!0):u+=a.plotWidth-m,x=!0),(m=i.y+l+g)<0&&("bottom"===h&&f>=0?(e.verticalAlign="top",e.inside=!0):f-=m,x=!0),(m=(i.y||0)+s.height-l+g)>a.plotHeight&&("top"===h&&f<=0?(e.verticalAlign="bottom",e.inside=!0):f+=a.plotHeight-m,x=!0),x&&(e.x=u,e.y=f,t.placed=!r,t.align(e,void 0,o)),x}function n(t,e){let i=[],s;if(n9(t)&&!n9(e))i=t.map(function(t){return n8(t,e)});else if(n9(e)&&!n9(t))i=e.map(function(e){return n8(t,e)});else if(n9(t)||n9(e)){if(n9(t)&&n9(e))for(s=Math.max(t.length,e.length);s--;)i[s]=n8(t[s],e[s])}else i=n8(t,e);return i}function h(t){let e=t.chart.options.plotOptions;return hi(n(n(e?.series?.dataLabels,e?.[t.type]?.dataLabels),t.options.dataLabels))}function l(t,e,i,s,o){let r=this.chart,a=r.inverted,n=this.xAxis,h=n.reversed,l=((a?e.height:e.width)||0)/2,d=t.pointWidth,c=d?d/2:0;e.startXPos=a?o.x:h?-l-c:n.width-l+c,e.startYPos=a?h?this.yAxis.height-l+c:-l-c:o.y,s?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),r.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}t.compose=function(t){let n=t.prototype;n.initDataLabels||(n.initDataLabels=o,n.initDataLabelsGroup=s,n.alignDataLabel=i,n.drawDataLabels=r,n.justifyDataLabel=a,n.setDataLabelStartPos=l,n.hasDataLabels=e)}}(g||(g={}));let hs=g,{composed:ho}=k,{series:hr}=rd,{merge:ha,pick:hn,pushUnique:hh}=$;!function(t){function e(t,e,i,s,o){let r=this.chart.inverted,a=t.series,n=(a.xAxis?a.xAxis.len:this.chart.plotSizeX)||0,h=(a.yAxis?a.yAxis.len:this.chart.plotSizeY)||0,l=t.dlBox||t.shapeArgs,d=hn(t.below,t.plotY>hn(this.translatedThreshold,h)),c=hn(i.inside,!!this.options.stacking);if(l){if(s=ha(l),!("allow"===i.overflow&&!1===i.crop)){s.y<0&&(s.height+=s.y,s.y=0);let t=s.y+s.height-h;t>0&&t● {series.name}
    ',pointFormat:"x: {point.x}
    y: {point.y}
    "}}),hm(hy.prototype,{drawTracker:hg.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),hf(hy,"afterTranslate",function(){this.applyJitter()}),rd.registerSeriesType("scatter",hy);let{deg2rad:hb}=k,{fireEvent:hv,isNumber:hk,pick:hw,relativeLength:hM}=$;!function(t){t.getCenter=function(){let t=this.options,e=this.chart,i=2*(t.slicedOffset||0),s=e.plotWidth-2*i,o=e.plotHeight-2*i,r=t.center,a=Math.min(s,o),n=t.thickness,h,l=t.size,d=t.innerSize||0,c,p;"string"==typeof l&&(l=parseFloat(l)),"string"==typeof d&&(d=parseFloat(d));let g=[hw(r?.[0],"50%"),hw(r?.[1],"50%"),hw(l&&l<0?void 0:t.size,"100%"),hw(d&&d<0?void 0:t.innerSize||0,"0%")];for(!e.angular||this instanceof rY||(g[3]=0),c=0;c<4;++c)p=g[c],h=c<2||2===c&&/%$/.test(p),g[c]=hM(p,[s,o,a,g[2]][c])+(h?i:0);return g[3]>g[2]&&(g[3]=g[2]),hk(n)&&2*n0&&(g[3]=g[2]-2*n),hv(this,"afterGetCenter",{positions:g}),g},t.getStartAndEndRadians=function(t,e){let i=hk(t)?t:0,s=hk(e)&&e>i&&e-i<360?e:i+360;return{start:hb*(i+-90),end:hb*(s+-90)}}}(f||(f={}));let hS=f,{setAnimation:hT}=tR,{addEvent:hC,defined:hA,extend:hP,isNumber:hL,pick:hO,relativeLength:hE}=$;class hI extends oF{getConnectorPath(t){let e=t.dataLabelPosition,i=t.options||{},s=i.connectorShape,o=this.connectorShapes[s]||s;return e&&o.call(this,{...e.computed,alignment:e.alignment},e.connectorPosition,i)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(t){let e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:e.r-1,start:e.start,end:e.end,borderRadius:e.borderRadius})}constructor(t,e,i){super(t,e,i),this.half=0,this.name??(this.name="Slice");let s=t=>{this.slice("select"===t.type)};hC(this,"select",s),hC(this,"unselect",s)}isValid(){return hL(this.y)&&this.y>=0}setVisible(t,e=!0){t!==this.visible&&this.update({visible:t??!this.visible},e,void 0,!1)}slice(t,e,i){let s=this.series;hT(i,s.chart),e=hO(e,!0),this.sliced=this.options.sliced=t=hA(t)?t:!this.sliced,s.options.data[s.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}hP(hI.prototype,{connectorShapes:{fixedOffset:function(t,e,i){let s=e.breakAt,o=e.touchingSliceAt,r=i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*s.x-o.x,2*s.y-o.y,s.x,s.y]:["L",s.x,s.y];return[["M",t.x,t.y],r,["L",o.x,o.y]]},straight:function(t,e){let i=e.touchingSliceAt;return[["M",t.x,t.y],["L",i.x,i.y]]},crookedLine:function(t,e,i){let{angle:s=this.angle||0,breakAt:o,touchingSliceAt:r}=e,{series:a}=this,[n,h,l]=a.center,d=l/2,{plotLeft:c,plotWidth:p}=a.chart,g="left"===t.alignment,{x:u,y:f}=t,m=o.x;if(i.crookDistance){let t=hE(i.crookDistance,1);m=g?n+d+(p+c-n-d)*(1-t):c+(n-d)*t}else m=n+(h-f)*Math.tan(s-Math.PI/2);let x=[["M",u,f]];return(g?m<=u&&m>=o.x:m>=u&&m<=o.x)&&x.push(["L",m,f]),x.push(["L",o.x,o.y],["L",r.x,r.y]),x}}});let{getStartAndEndRadians:hD}=hS,{noop:hB}=k,{clamp:hN,extend:hz,fireEvent:hR,merge:hW,pick:hH}=$;class hX extends rY{animate(t){let e=this,i=e.points,s=e.startAngleRad;t||i.forEach(function(t){let i=t.graphic,o=t.shapeArgs;i&&o&&(i.attr({r:hH(t.startR,e.center&&e.center[3]/2),start:s,end:s}),i.animate({r:o.r,start:o.start,end:o.end},e.options.animation))})}drawEmpty(){let t,e;let i=this.startAngleRad,s=this.endAngleRad,o=this.options;0===this.total&&this.center?(t=this.center[0],e=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t,e,this.center[1]/2,0,i,s).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:e6.arc(t,e,this.center[2]/2,0,{start:i,end:s,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":o.borderWidth,fill:o.fillColor||"none",stroke:o.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let t=this.chart.renderer;this.points.forEach(function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(t,e,i,s){let o=this.center,r=this.radii?this.radii[i.index]||0:o[2]/2,a=s.dataLabelPosition,n=a?.distance||0,h=Math.asin(hN((t-o[1])/(r+n),-1,1));return o[0]+Math.cos(h)*(r+n)*(e?-1:1)+(n>0?(e?-1:1)*(s.padding||0):0)}hasData(){return!!this.dataTable.rowCount}redrawPoints(){let t,e,i,s;let o=this,r=o.chart;this.drawEmpty(),o.group&&!r.styledMode&&o.group.shadow(o.options.shadow),o.points.forEach(function(a){let n={};e=a.graphic,!a.isNull&&e?(s=a.shapeArgs,t=a.getTranslate(),r.styledMode||(i=o.pointAttribs(a,a.selected&&"select")),a.delayedRendering?(e.setRadialReference(o.center).attr(s).attr(t),r.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}),a.delayedRendering=!1):(e.setRadialReference(o.center),r.styledMode||hW(!0,n,i),hW(!0,n,s,t),e.animate(n)),e.attr({visibility:a.visible?"inherit":"hidden"}),e.addClass(a.getClassName(),!0)):e&&(a.graphic=e.destroy())})}sortByAngle(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})}translate(t){hR(this,"translate"),this.generatePoints();let e=this.options,i=e.slicedOffset,s=hD(e.startAngle,e.endAngle),o=this.startAngleRad=s.start,r=(this.endAngleRad=s.end)-o,a=this.points,n=e.ignoreHiddenPoint,h=a.length,l,d,c,p,g,u,f,m=0;for(t||(this.center=t=this.getCenter()),u=0;u1.5*Math.PI?c-=2*Math.PI:c<-Math.PI/2&&(c+=2*Math.PI),f.slicedTranslation={translateX:Math.round(Math.cos(c)*i),translateY:Math.round(Math.sin(c)*i)},p=Math.cos(c)*t[2]/2,g=Math.sin(c)*t[2]/2,f.tooltipPos=[t[0]+.7*p,t[1]+.7*g],f.half=c<-Math.PI/2||c>Math.PI/2?1:0,f.angle=c}hR(this,"afterTranslate")}updateTotals(){let t=this.points,e=t.length,i=this.options.ignoreHiddenPoint,s,o,r=0;for(s=0;s0&&(o.visible||!i)?o.y/r*100:0,o.total=r}}hX.defaultOptions=hW(rY.defaultOptions,{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.isNull?void 0:this.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}),hz(hX.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:nQ.prototype.drawTracker,getCenter:hS.getCenter,getSymbol:hB,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:nQ.prototype.pointAttribs,pointClass:hI,requireSorting:!1,searchPoint:hB,trackerGroups:["group","dataLabelsGroup"]}),rd.registerSeriesType("pie",hX);let{composed:hF,noop:hG}=k,{distribute:hY}=ed,{series:hj}=rd,{arrayMax:hU,clamp:h$,defined:hV,pick:h_,pushUnique:hq,relativeLength:hZ}=$;!function(t){let e={radialDistributionY:function(t,e){return(e.dataLabelPosition?.top||0)+t.distributeBox.pos},radialDistributionX:function(t,e,i,s,o){let r=o.dataLabelPosition;return t.getX(i<(r?.top||0)+2||i>(r?.bottom||0)-2?s:i,e.half,e,o)},justify:function(t,e,i,s){return s[0]+(t.half?-1:1)*(i+(e.dataLabelPosition?.distance||0))},alignToPlotEdges:function(t,e,i,s){let o=t.getBBox().width;return e?o+s:i-o-s},alignToConnectors:function(t,e,i,s){let o=0,r;return t.forEach(function(t){(r=t.dataLabel.getBBox().width)>o&&(o=r)}),e?o+s:i-o-s}};function i(t,e){let i=Math.PI/2,{start:s=0,end:o=0}=t.shapeArgs||{},r=t.angle||0;e>0&&si&&r>i/2&&r<1.5*i&&(r=r<=i?Math.max(i/2,(s+i)/2):Math.min(1.5*i,(i+o)/2));let{center:a,options:n}=this,h=a[2]/2,l=Math.cos(r),d=Math.sin(r),c=a[0]+l*h,p=a[1]+d*h,g=Math.min((n.slicedOffset||0)+(n.borderWidth||0),e/5);return{natural:{x:c+l*e,y:p+d*e},computed:{},alignment:e<0?"center":t.half?"right":"left",connectorPosition:{angle:r,breakAt:{x:c+l*g,y:p+d*g},touchingSliceAt:{x:c,y:p}},distance:e}}function s(){let t=this,e=t.points,i=t.chart,s=i.plotWidth,o=i.plotHeight,r=i.plotLeft,a=Math.round(i.chartWidth/3),n=t.center,h=n[2]/2,l=n[1],d=[[],[]],c=[0,0,0,0],p=t.dataLabelPositioners,g,u,f,m=0;t.visible&&t.hasDataLabels?.()&&(e.forEach(t=>{(t.dataLabels||[]).forEach(t=>{t.shortened&&(t.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.shortened=!1)})}),hj.prototype.drawDataLabels.apply(t),e.forEach(t=>{(t.dataLabels||[]).forEach((e,i)=>{let s=n[2]/2,o=e.options,r=hZ(o?.distance||0,s);0===i&&d[t.half].push(t),!hV(o?.style?.width)&&e.getBBox().width>a&&(e.css({width:Math.round(.7*a)+"px"}),e.shortened=!0),e.dataLabelPosition=this.getDataLabelPosition(t,r),m=Math.max(m,r)})}),d.forEach((e,a)=>{let d=e.length,g=[],x,y,b=0,v;d&&(t.sortByAngle(e,a-.5),m>0&&(x=Math.max(0,l-h-m),y=Math.min(l+h+m,i.plotHeight),e.forEach(t=>{(t.dataLabels||[]).forEach(e=>{let s=e.dataLabelPosition;s&&s.distance>0&&(s.top=Math.max(0,l-h-s.distance),s.bottom=Math.min(l+h+s.distance,i.plotHeight),b=e.getBBox().height||21,e.lineHeight=i.renderer.fontMetrics(e.text||e).h+2*e.padding,t.distributeBox={target:(e.dataLabelPosition?.natural.y||0)-s.top+e.lineHeight/2,size:b,rank:t.y},g.push(t.distributeBox))})}),hY(g,v=y+b-x,v/5)),e.forEach(i=>{(i.dataLabels||[]).forEach(l=>{let d=l.options||{},m=i.distributeBox,x=l.dataLabelPosition,y=x?.natural.y||0,b=d.connectorPadding||0,v=l.lineHeight||21,k=(v-l.getBBox().height)/2,w=0,M=y,S="inherit";if(x){if(g&&hV(m)&&x.distance>0&&(void 0===m.pos?S="hidden":(f=m.size,M=p.radialDistributionY(i,l))),d.justify)w=p.justify(i,l,h,n);else switch(d.alignTo){case"connectors":w=p.alignToConnectors(e,a,s,r);break;case"plotEdges":w=p.alignToPlotEdges(l,a,s,r);break;default:w=p.radialDistributionX(t,i,M-k,y,l)}if(x.attribs={visibility:S,align:x.alignment},x.posAttribs={x:w+(d.x||0)+(({left:b,right:-b})[x.alignment]||0),y:M+(d.y||0)-v/2},x.computed.x=w,x.computed.y=M-k,h_(d.crop,!0)){let t;w-(u=l.getBBox().width)s-b&&0===a&&(t=Math.round(w+u-s+b),c[1]=Math.max(t,c[1])),M-f/2<0?c[0]=Math.max(Math.round(-M+f/2),c[0]):M+f/2>o&&(c[2]=Math.max(Math.round(M+f/2-o),c[2])),x.sideOverflow=t}}})}))}),(0===hU(c)||this.verifyDataLabelOverflow(c))&&(this.placeDataLabels(),this.points.forEach(e=>{(e.dataLabels||[]).forEach(s=>{let{connectorColor:o,connectorWidth:r=1}=s.options||{},a=s.dataLabelPosition;if(r){let n;g=s.connector,a&&a.distance>0?(n=!g,g||(s.connector=g=i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(t.dataLabelsGroup)),i.styledMode||g.attr({"stroke-width":r,stroke:o||e.color||"#666666"}),g[n?"attr":"animate"]({d:e.getConnectorPath(s)}),g.attr({visibility:a.attribs?.visibility})):g&&(s.connector=g.destroy())}})})))}function o(){this.points.forEach(t=>{(t.dataLabels||[]).forEach(t=>{let e=t.dataLabelPosition;e?(e.sideOverflow&&(t.css({width:Math.max(t.getBBox().width-e.sideOverflow,0)+"px",textOverflow:(t.options?.style||{}).textOverflow||"ellipsis"}),t.shortened=!0),t.attr(e.attribs),t[t.moved?"animate":"attr"](e.posAttribs),t.moved=!0):t&&t.attr({y:-9999})}),delete t.distributeBox},this)}function r(t){let e=this.center,i=this.options,s=i.center,o=i.minSize||80,r=o,a=null!==i.size;return!a&&(null!==s[0]?r=Math.max(e[2]-Math.max(t[1],t[3]),o):(r=Math.max(e[2]-t[1]-t[3],o),e[0]+=(t[3]-t[1])/2),null!==s[1]?r=h$(r,o,e[2]-Math.max(t[0],t[2])):(r=h$(r,o,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),r(t.x+=e.x,t.y+=e.y,t),{x:0,y:0});return{x:e.x/t.length,y:e.y/t.length}},t.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},t.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},t.pointInPolygon=function({x:t,y:e},i){let s=i.length,o,r,a=!1;for(o=0,r=s-1;oe!=l>e&&t<(h-s)*(e-n)/(l-n)+s&&(a=!a)}return a}}(x||(x={}));let{pointInPolygon:hJ}=x,{addEvent:hQ,fireEvent:h0,objectEach:h1,pick:h2}=$;function h3(t){let e=t.length,i=(t,e)=>!(e.x>=t.x+t.width||e.x+e.width<=t.x||e.y>=t.y+t.height||e.y+e.height<=t.y),s=(t,e)=>{for(let i of t)if(hJ({x:i[0],y:i[1]},e))return!0;return!1},o,r,a,n,h,l=!1;for(let i=0;i(e.labelrank||0)-(t.labelrank||0));for(let o=0;o{h1(t,t=>{t.label&&e.push(t.label)})});for(let i of t.series||[])if(i.visible&&i.hasDataLabels?.()){let s=i=>{for(let s of i)s.visible&&(s.dataLabels||[]).forEach(i=>{let o=i.options||{};i.labelrank=h2(o.labelrank,s.labelrank,s.shapeArgs?.height),o.allowOverlap??Number(o.distance)>0?(i.oldOpacity=i.opacity,i.newOpacity=1,h5(i,t)):e.push(i)})};s(i.nodes||[]),s(i.points)}this.hideOverlappingLabels(e)}let h9={compose:function(t){let e=t.prototype;e.hideOverlappingLabels||(e.hideOverlappingLabels=h3,hQ(t,"render",h6))}},{defaultOptions:h4}=tm,{noop:h8}=k,{addEvent:h7,extend:lt,isObject:le,merge:li,relativeLength:ls}=$,lo={radius:0,scope:"stack",where:void 0},lr=h8,la=h8;function ln(t,e,i,s,o={}){let r=lr(t,e,i,s,o),{innerR:a=0,r:n=i,start:h=0,end:l=0}=o;if(o.open||!o.borderRadius)return r;let d=l-h,c=Math.sin(d/2),p=Math.max(Math.min(ls(o.borderRadius||0,n-a),(n-a)/2,n*c/(1+c)),0),g=Math.min(p,d/Math.PI*2*a),u=r.length-1;for(;u--;)!function(t,e,i){let s,o,r;let a=t[e],n=t[e+1];if("Z"===n[0]&&(n=t[0]),("M"===a[0]||"L"===a[0])&&"A"===n[0]?(s=a,o=n,r=!0):"A"===a[0]&&("M"===n[0]||"L"===n[0])&&(s=n,o=a),s&&o&&o.params){let a=o[1],n=o[5],h=o.params,{start:l,end:d,cx:c,cy:p}=h,g=n?a-i:a+i,u=g?Math.asin(i/g):0,f=n?u:-u,m=Math.cos(u)*g;r?(h.start=l+f,s[1]=c+m*Math.cos(l),s[2]=p+m*Math.sin(l),t.splice(e+1,0,["A",i,i,0,0,1,c+a*Math.cos(h.start),p+a*Math.sin(h.start)])):(h.end=d-f,o[6]=c+a*Math.cos(h.end),o[7]=p+a*Math.sin(h.end),t.splice(e+1,0,["A",i,i,0,0,1,c+m*Math.cos(d),p+m*Math.sin(d)])),o[4]=Math.abs(h.end-h.start)1?g:p);return r}function lh(){if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:t,yAxis:e}=this,i="percent"===t.stacking,s=h4.plotOptions?.[this.type]?.borderRadius,o=ll(t.borderRadius,le(s)?s:{}),r=e.options.reversed;for(let s of this.points){let{shapeArgs:a}=s;if("roundedRect"===s.shapeType&&a){let{width:n=0,height:h=0,y:l=0}=a,d=l,c=h;if("stack"===o.scope&&s.stackTotal){let o=e.translate(i?100:s.stackTotal,!1,!0,!1,!0),r=e.translate(t.threshold||0,!1,!0,!1,!0),a=this.crispCol(0,Math.min(o,r),0,Math.abs(o-r));d=a.y,c=a.height}let p=(s.negative?-1:1)*(r?-1:1)==-1,g=o.where;!g&&this.is("waterfall")&&Math.abs((s.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(g="all"),g||(g="end");let u=Math.min(ls(o.radius,n),n/2,"all"===g?h/2:1/0)||0;"end"===g&&(p&&(d-=u),c+=u),lt(a,{brBoxHeight:c,brBoxY:d,r:u})}}}}function ll(t,e){return le(t)||(t={radius:t||0}),li(lo,e,t)}function ld(){let t=ll(this.options.borderRadius);for(let e of this.points){let i=e.shapeArgs;i&&(i.borderRadius=ls(t.radius,(i.r||0)-(i.innerR||0)))}}function lc(t,e,i,s,o={}){let r=la(t,e,i,s,o),{r:a=0,brBoxHeight:n=s,brBoxY:h=e}=o,l=e-h,d=h+n-(e+s),c=l-a>-.1?0:a,p=d-a>-.1?0:a,g=Math.max(c&&l,0),u=Math.max(p&&d,0),f=[t+c,e],m=[t+i-c,e],x=[t+i,e+c],y=[t+i,e+s-p],b=[t+i-p,e+s],v=[t+p,e+s],k=[t,e+s-p],w=[t,e+c],M=(t,e)=>Math.sqrt(Math.pow(t,2)-Math.pow(e,2));if(g){let t=M(c,c-g);f[0]-=t,m[0]+=t,x[1]=w[1]=e+c-g}if(s=lm(i.minWidth,0)&&this.chartHeight>=lm(i.minHeight,0)}).call(this)&&e.push(t._id)}function i(t,e){let i=this.options.responsive,s=this.currentResponsive,o=[],r;!e&&i&&i.rules&&i.rules.forEach(t=>{void 0===t._id&&(t._id=lx()),this.matchResponsiveRule(t,o)},this);let a=lf(...o.map(t=>lu((i||{}).rules||[],e=>e._id===t)).map(t=>t&&t.chartOptions));a.isResponsiveOptions=!0,o=o.toString()||void 0;let n=s&&s.ruleIds;o===n||(s&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(s.undoOptions,t,!0),this.updatingResponsive=!1),o?((r=lp(a,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:o,mergedOptions:a,undoOptions:r},this.updatingResponsive||this.update(a,t,!0)):this.currentResponsive=void 0)}t.compose=function(t){let s=t.prototype;return s.matchResponsiveRule||lg(s,{matchResponsiveRule:e,setResponsive:i}),t}}(y||(y={}));let ly=y;k.AST=tK,k.Axis=sR,k.Chart=aG,k.Color=tk,k.DataLabel=hs,k.DataTableCore=re,k.Fx=tC,k.HTMLElement=iZ,k.Legend=ai,k.LegendSymbol=rr,k.OverlappingDataLabels=k.OverlappingDataLabels||h9,k.PlotLineOrBand=s4,k.Point=oF,k.Pointer=o9,k.RendererRegistry=er,k.Series=rY,k.SeriesRegistry=rd,k.StackItem=a8,k.SVGElement=ej,k.SVGRenderer=iR,k.Templating=eo,k.Tick=sa,k.Time=td,k.Tooltip=ok,k.animate=tR.animate,k.animObject=tR.animObject,k.chart=aG.chart,k.color=tk.parse,k.dateFormat=eo.dateFormat,k.defaultOptions=tm.defaultOptions,k.distribute=ed.distribute,k.format=eo.format,k.getDeferredAnimation=tR.getDeferredAnimation,k.getOptions=tm.getOptions,k.numberFormat=eo.numberFormat,k.seriesType=rd.seriesType,k.setAnimation=tR.setAnimation,k.setOptions=tm.setOptions,k.stop=tR.stop,k.time=tm.defaultTime,k.timers=tC.timers,({compose:function(t,e,i){let s=t.types.pie;if(!e.symbolCustomAttribs.includes("borderRadius")){let o=i.prototype.symbols;h7(t,"afterColumnTranslate",lh,{order:9}),h7(s,"afterTranslate",ld),e.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY"),lr=o.arc,la=o.roundedRect,o.arc=ln,o.roundedRect=lc}},optionsToObject:ll}).compose(k.Series,k.SVGElement,k.SVGRenderer),hl.compose(k.Series.types.column),hs.compose(k.Series),sG.compose(k.Axis),iZ.compose(k.SVGRenderer),ai.compose(k.Chart),s$.compose(k.Axis),h9.compose(k.Chart),hK.compose(k.Series.types.pie),s4.compose(k.Chart,k.Axis),o9.compose(k.Chart),ly.compose(k.Chart),a0.compose(k.Axis,k.Chart,k.Series),ny.compose(k.Axis,k.Chart,k.Series),ok.compose(k.Pointer),$.extend(k,$);let lb=k;return v.default})()); \ No newline at end of file diff --git a/Scripts/highcharts/layout.js b/Scripts/highcharts/layout.js new file mode 100644 index 000000000..f8fa82431 --- /dev/null +++ b/Scripts/highcharts/layout.js @@ -0,0 +1,14 @@ +!/** + * Highcharts Dashboards Layout 3.2.0 (2025-03-26) + * + * (c) 2009-2024 Highsoft AS + * + * License: www.highcharts.com/license + */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("dashboards/modules/layout",["dashboards"],function(e){return t(e),t.Dashboards=e,t}):t("undefined"!=typeof Dashboards?Dashboards:void 0)}(function(t){"use strict";var e=t?t._modules:{};function s(e,s,i,o){e.hasOwnProperty(s)||(e[s]=o.apply(null,i),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("DashboardsModuleLoaded",{detail:{path:s,module:e[s]}})))}s(e,"Dashboards/EditMode/EditRenderer.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s,createElement:i,defined:o}=e;function n(e,s){let o;let n=s.options.contextMenu;return n&&(o=i("button",{className:t.classNames.contextMenuBtn,onclick:function(t){t.stopPropagation(),s.onContextBtnClick()}},{},e),n.icon&&i("img",{src:n.icon,className:t.classNames.icon},{},o),n.text&&i("span",{className:t.classNames.contextMenuBtnText,textContent:n.text},{},o),o.setAttribute("aria-label",s.lang.accessibility.contextMenu.button),o.setAttribute("aria-expanded","false")),o}function l(e,s){let o;let{name:n,showToggle:l,onchange:a,isEnabled:d,isNested:c,isStandalone:h,lang:p}=s,u=i("div",{className:t.classNames[c?"accordionNestedWrapper":"accordionContainer"]+" "+(h?t.classNames.accordionStandaloneWrapper:"")+" "+t.classNames.collapsableContentHeader},{},e),m=i("div",{className:t.classNames.accordionHeader},{},u);if((!h||l)&&(o=i(h&&l?"span":"button",{className:t.classNames[h?"accordionHeaderWrapper":"accordionHeaderBtn"]},{},m)),i("span",{textContent:p[n]||n},{},o),l&&m&&r(m,{enabledOnOffLabels:!0,id:n,name:"",onchange:a,value:d||!1,lang:p}),!h){let e=i("span",{className:t.classNames.accordionHeaderIcon+" "+t.classNames.collapsedElement},{},o);o?.addEventListener("click",function(){b.classList.toggle(t.classNames.hiddenElement),e?.classList.toggle(t.classNames.collapsedElement)})}let b=i("div",{className:t.classNames.accordionContent+" "+(h?t.classNames.standaloneElement:t.classNames.hiddenElement)},{},u);return{outerElement:u,content:b}}function a(o,n){let l;if(!o)return;n.name&&d(o,{title:n.name,isLabel:!0});let a=n.iconsURLPrefix||"",r=i("div",{className:t.classNames.dropdown+" "+t.classNames.collapsableContentHeader},{},o),c=i("button",{className:t.classNames.dropdownButton},{},r),h=i("div",{className:t.classNames.dropdownButtonContent},{},c),p=(e.find(n.selectOptions,t=>t.name===n.value)||{}).iconURL;p&&(l=i("img",{src:a+p,className:t.classNames.icon},{},h));let u=i("span",{textContent:n.value,id:n.id||""},{},h),m=i("img",{className:t.classNames.dropdownIcon+" "+t.classNames.collapsedElement,src:a+"dropdown-pointer.svg"},{},c),b=i("ul",{className:t.classNames.dropdownContent+" "+t.classNames.hiddenElement},{},r);c.addEventListener("click",function(){b.classList.toggle(t.classNames.hiddenElement),m.classList.toggle(t.classNames.collapsedElement)});for(let e=0,o=n.selectOptions.length;e{p(!h.checked),h.checked=!h.checked,r.setAttribute("aria-checked",h.checked),t.stopPropagation()});let m=i("span",{className:t.classNames.toggleSlider},{},c);return p&&m.addEventListener("click",t=>{t.preventDefault()}),s.enabledOnOffLabels&&d(r,{title:o.on,className:t.classNames.toggleLabels}),r}function d(e,s){let o;let{title:n,className:l,isLabel:a}=s;if(e){let s=a?{htmlFor:n}:{};o=i(a?"label":"div",{className:t.classNames.labelText+" "+(l||""),textContent:n,...s},{},e)}return o}function c(t,e){let{icon:s,callback:o}=e;if(!t)return;let n=i("div",{onclick:o,className:e.className||""},{},t);n.style["background-image"]="url("+s+")";let l=e.mousedown,a=e.click;return l&&(n.onmousedown=function(){l.apply(this,arguments)}),a&&n.addEventListener("click",function(){a.apply(this,arguments)}),n}function h(t,e){if(!t)return;e.name&&d(t,{title:e.name,isLabel:!0});let s=i("input",{type:"text",onclick:e.callback,id:e.id||"",name:e.name||"",value:o(e.value)&&e.value.toString().replace(/\"/g,"")||""},{},t),n=e.onchange;return n&&s.addEventListener("change",function(t){n(t.target.value)}),s}function p(t,e){if(!t)return;e.name&&d(t,{title:e.name,isLabel:!0});let s=i("textarea",{id:e.id,name:e.name,value:e.value||""},{},t),o=e.onchange;return o&&s.addEventListener("change",function(t){o(t.target.value)}),s}function u(t,e){let s;return t&&(s=i("input",{type:"checkbox",checked:!!e},{},t)),s}function m(e,s){if(!e)return;let o=i("button",{className:t.classNames.button+" "+(s.className||""),onclick:s.callback,textContent:s.text},s.style||{},e);return s.icon&&(o.style["background-image"]="url("+s.icon+")"),o}return{renderSelect:a,renderToggle:r,renderText:d,renderCollapseHeader:l,renderIcon:c,renderContextButton:n,renderInput:h,renderTextarea:p,renderCheckbox:u,renderButton:m,getRendererFunction:function(t){return({select:a,toggle:r,text:d,collapse:l,icon:c,contextButton:n,input:h,textarea:p,checkbox:u,button:m})[t]}}}),s(e,"Dashboards/EditMode/Menu/MenuItem.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Core/Utilities.js"],e["Dashboards/EditMode/EditRenderer.js"]],function(t,e,s){let{createElement:i,merge:o}=e;class n{constructor(t,e){this.menu=t,this.isActive=!1,this.options=o(n.defaultOptions,e),this.container=this.setContainer(),this.innerElement=this.setInnerElement()}setContainer(){let e=this.options,s=t.classNames.menuItem;return this.menu.options.itemsClassName&&(s+=" "+this.menu.options.itemsClassName),e.className&&(s+=" "+e.className),i("div",{className:s||""},o(this.options.style||{},this.isActive?{display:"block"}:{}),this.menu.container)}setInnerElement(){let t=this.options,e=this.container,i=t.langKey;return"toggle"===t.type?s.renderToggle(e,{id:t.id,name:t.id,title:i?this.menu.editMode.lang[i]:t.text,value:!!(t.getValue&&t.getValue(this)),lang:this.menu.editMode.lang,langKey:i,onchange:t.events?.click?.bind(this)}):"text"===t.type?s.renderText(e,{title:i?this.menu.editMode.lang[i]:t.text||"",className:t.className||""}):"icon"===t.type?s.renderIcon(e,{icon:t.icon||"",mousedown:t.events?.onmousedown?.bind(this),click:t.events?.click?.bind(this)}):"button"===t.type?s.renderButton(e,{callback:t.events?.click?.bind(this),className:t.className||"",style:t.style||{},text:i?this.menu.editMode.lang[i]:t.text||""}):void 0}update(){let t=this.options;t.events&&t.events.update&&t.events.update.apply(this,arguments)}activate(){this.update(),this.container&&(this.isActive=!0,this.container.style.display="block")}deactivate(){this.container&&(this.isActive=!1,this.container.style.display="none")}}return n.defaultOptions={type:"text"},n}),s(e,"Dashboards/EditMode/Menu/MenuItemBindings.js",[],function(){return{viewFullscreen:{id:"viewFullscreen",type:"button",langKey:"viewFullscreen",events:{click:function(){let t=this.menu.editMode.board.fullscreen;t&&t.toggle()}}}}}),s(e,"Dashboards/EditMode/Menu/Menu.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Core/Utilities.js"],e["Dashboards/EditMode/Menu/MenuItem.js"],e["Dashboards/EditMode/Menu/MenuItemBindings.js"]],function(t,e,s,i){let{createElement:o,merge:n}=e;class l{constructor(t,e,s,i){this.parentElement=t,this.isVisible=!1,this.activeItems=[],this.options=e,this.items={},this.editMode=s,i&&(this.parent=i),this.container=this.setContainer()}setContainer(){return o("div",{className:t.classNames.menu+" "+(this.options.className||"")},{},this.parentElement)}initItems(t,e){let i,o,l,a;let r=this.options.items||[];for(let d=0,c=r.length;d{s.closePopup()}},text:e.lang.confirmDestroyCell})}}}),o}constructor(t){super(t,a(c.defaultOptions,(t.options.toolbars||{}).cell,{menu:{items:c.getItemsConfig(t.options,t.iconsURLPrefix)}})),t.customHTMLMode&&this.filterOptionsAvailableInCustomHTMLMode(),this.menu.initItems({})}showToolbar(t){let e=t.container,s=this.editMode.cellToolbar;if(s){if(e&&this.editMode.isActive()&&!(this.editMode.dragDrop||{}).isActive){let e=i.getOffsets(t,this.editMode.board.container),o=e.right-30-10,n=e.top+10;d(this.menu.items,e=>{if(!t.options?.editMode?.toolbarItems){e.activate();return}let s=t.options.editMode.toolbarItems;if(s[e.options.id]?.enabled===!1){e.deactivate();return}e.activate()}),this.setPosition(o,n),this.cell=t,this.refreshOutline(),s.isVisible=!0}else this.isVisible&&(this.hide(),s.isVisible=!1)}}refreshOutline(){this.cell&&this.cell.container&&this.outline&&super.refreshOutline(-this.cell.container.offsetWidth,0,this.cell,-1)}onCellOptions(){let t=this.editMode;t.sidebar&&(t.sidebar.show(this.cell),this.highlightCell())}onCellDestroy(){if(this.cell&&t.isCell(this.cell)){let t=this.cell.row,e=this.cell.id;this.cell.row.setHighlight(),this.resetEditedCell(),this.cell.destroy(),this.cell=void 0,this.editMode.hideToolbars(["cell","row"]),this.editMode.resizer?.disableResizer(),t&&t.cells&&t.cells.length&&(r(this.editMode.board,"cellResize",{cell:t.cells[0]}),r(t,"cellChange",{cell:t.cells[0],row:t}),r(this.editMode,"layoutChanged",{type:"cellDestroyed",target:e,board:this.editMode.board}))}}resetEditedCell(){this.editedCell=void 0}filterOptionsAvailableInCustomHTMLMode(){this.options.menu.items=this.options.menu.items?.filter(t=>"string"!=typeof t&&"settings"===t.id)}highlightCell(){this.cell&&(this.cell.setHighlight?this.cell.setHighlight():(this.cell.container.classList.add(e.classNames.cellEditHighlight),this.editMode.board.container.classList.add(e.classNames.dashboardCellEditHighlightActive)))}}return c.defaultOptions={enabled:!0,className:e.classNames.editToolbar,outline:!1,outlineClassName:e.classNames.editToolbarCellOutline,menu:{className:e.classNames.editToolbarCell,itemsClassName:e.classNames.editToolbarItem,items:[]}},c}),s(e,"Dashboards/EditMode/Toolbar/RowEditToolbar.js",[e["Core/Utilities.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/EditMode/Toolbar/EditToolbar.js"],e["Dashboards/Layout/GUIElement.js"]],function(t,e,s,i){let{fireEvent:o,merge:n,objectEach:l}=t;class a extends s{static getMenuItemsConfig(t,s){let i=[];return t.dragDrop?.enabled&&i.push({id:"drag",type:"icon",icon:s+"drag.svg",events:{onmousedown:function(t){let e=this.menu.parent,s=e.editMode.dragDrop;t.preventDefault(),s&&e.row&&s.onDragStart(t,e.row)}}}),i.push({id:"destroy",type:"icon",className:e.classNames.menuDestroy,icon:s+"destroy.svg",events:{click:function(){let t=this.menu.parent,e=this.menu.parent.editMode,s=e.confirmationPopup;s.show({confirmButton:{value:e.lang.confirmButton,callback:t.onRowDestroy,context:t},cancelButton:{value:e.lang.cancelButton,callback:()=>{s.closePopup()}},text:e.lang.confirmDestroyRow})}}}),i}constructor(t){super(t,n(a.defaultOptions,(t.options.toolbars||{}).row,{menu:{items:a.getMenuItemsConfig(t.options,t.iconsURLPrefix)}})),this.menu.initItems({})}refreshOutline(t,e){this.row&&this.row.container&&super.refreshOutline(t,e,this.row,2)}showToolbar(t){let e,s,o;let n=t.container,a=this.editMode.rowToolbar;if(a){if(n&&this.editMode.isActive()&&!(this.editMode.dragDrop||{}).isActive){let n=i.getOffsets(t,this.editMode.board.container),r=n.right-n.left;l(this.menu.items,e=>{if(!t.options?.editMode?.toolbarItems){e.activate();return}let s=t.options.editMode.toolbarItems;if(s[e.options.id]?.enabled===!1){e.deactivate();return}e.activate()}),o=r/2-this.container.clientWidth/2,e=n.left+o,s=n.top-this.container.clientHeight,this.setPosition(e,s),this.row=t,this.refreshOutline(-o,this.container.clientHeight),a.isVisible=!0}else this.isVisible&&(this.hide(),a.isVisible=!1)}}onRowOptions(){this.editMode.sidebar&&this.editMode.sidebar.show(this.row)}onRowDestroy(){if(this.row){let t=this.row.options.id||-1;this.resetEditedRow(),this.row.destroy(),this.row=void 0,this.editMode.hideToolbars(["cell","row"]),o(this.editMode,"layoutChanged",{type:"rowDestroyed",target:t,board:this.editMode.board})}}resetEditedRow(){this.editedRow=void 0}}return a.defaultOptions={enabled:!0,className:e.classNames.editToolbar,outline:!0,outlineClassName:e.classNames.editToolbarRowOutline,menu:{className:e.classNames.editToolbarRow,itemsClassName:e.classNames.editToolbarItem,items:[]}},a}),s(e,"Shared/BaseForm.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Utilities.js"]],function(t,e){let{addEvent:s,createElement:i}=e;return class{constructor(t,e){this.iconsURL=e,this.container=this.createPopupContainer(t),this.closeButton=this.addCloseButton()}createPopupContainer(t,e="highcharts-popup highcharts-no-tooltip"){return i("div",{className:e},void 0,t)}addCloseButton(t="highcharts-popup-close"){let e=this,o=this.iconsURL,n=i("button",{className:t},void 0,this.container);return n.style["background-image"]="url("+(o.match(/png|svg|jpeg|jpg|gif/ig)?o:o+"close.svg")+")",["click","touchstart"].forEach(t=>{s(n,t,e.closeButtonEvents.bind(e))}),s(document,"keydown",function(t){"Escape"===t.code&&e.closeButtonEvents()}),n}closeButtonEvents(){this.closePopup()}showPopup(e="highcharts-annotation-toolbar"){let s=this.container,i=this.closeButton;this.type=void 0,s.innerHTML=t.emptyHTML,s.className.indexOf(e)>=0&&(s.classList.remove(e),s.removeAttribute("style")),s.appendChild(i),s.style.display="block",s.style.height=""}closePopup(){this.container.style.display="none"}}}),s(e,"Dashboards/EditMode/ConfirmationPopup.js",[e["Core/Utilities.js"],e["Shared/BaseForm.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/EditMode/EditRenderer.js"]],function(t,e,s,i){let{createElement:o}=t;return class extends e{constructor(t,e,s,i){super(t,e=i&&i.close&&i.close.icon?i.close.icon:e),this.editMode=s,this.options=i}createPopupContainer(t,e=s.classNames.confirmationPopup){return super.createPopupContainer(t,e)}addCloseButton(t=s.classNames.popupCloseButton){return super.addCloseButton(t)}closeButtonEvents(){let t=this.contentOptions?.cancelButton.callback;t&&t()}renderContent(){let t=this.contentOptions;if(!t)return;this.contentContainer=o("div",{className:s.classNames.popupContentContainer},{},this.container);let e=this.contentContainer.parentNode;e.style.marginTop="0px";let n=e.getBoundingClientRect().top;e.style.marginTop=(n<0?Math.abs(n-200):200)+"px",i.renderText(this.contentContainer,{title:t.text||""}),this.buttonContainer=o("div",{className:s.classNames.popupButtonContainer},{},this.container),i.renderButton(this.buttonContainer,{text:t.cancelButton.value,className:s.classNames.popupCancelBtn,callback:t.cancelButton.callback}),i.renderButton(this.buttonContainer,{text:t.confirmButton.value,className:s.classNames.popupConfirmBtn,callback:()=>{t.confirmButton.callback.call(t.confirmButton.context),this.closePopup()}})}show(t){this.contentOptions=t,this.showPopup(),this.renderContent(),this.editMode.setEditOverlay()}closePopup(){super.closePopup(),this.editMode.setEditOverlay(!0)}}}),s(e,"Dashboards/EditMode/AccordionMenu.js",[e["Dashboards/EditMode/EditRenderer.js"],e["Core/Utilities.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/EditMode/ConfirmationPopup.js"]],function(t,e,s,i){let{createElement:o,merge:n,error:l,fireEvent:a}=e;return class{constructor(t,e){this.changedOptions={},this.chartOptionsJSON={},this.oldOptionsBuffer={},this.waitingForConfirmation=!1,this.iconsURLPrefix=t,this.closeSidebar=e}renderContent(e,l,r){let d,c;let{editMode:h}=l.board,p=l.editableOptions.getOptions();this.component=l,this.oldOptionsBuffer=l.getEditableOptions(),h&&(this.confirmationPopup=new i(l.board.container,h.iconsURLPrefix,h,{close:{icon:""}}));let u=o("div",{className:s.classNames.accordionMenu},{},e);for(let e=0,i=p.length;e{await this.confirmChanges(),a(h,"confirmEditing")}}),t.renderButton(m,{text:(l.board?.editMode||s).lang.cancelButton,className:s.classNames.popupCancelBtn,callback:()=>{this.cancelChanges(),a(h,"cancelEditing")}}),r.appendChild(m)}updateOptions(t,e){let s,i,o,n;let a=t.length-1,r=this.changedOptions;if(0===a&&"chartOptions"===t[0])try{let t=JSON.parse(e);this.chartOptionsJSON=t}catch(t){l(`Dashboards Error: Wrong JSON config structure passed as a chart options. +____________ +${t}`)}for(let e=0;ethis.updateOptions(e.propertyPath||[],t)})}renderNested(e,i,o){if(!e||!i.nestedOptions)return;let l=i.nestedOptions;for(let i=0,a=l.length;ithis.updateOptions(c,t),isNested:!!r,isStandalone:!r,lang:h});for(let t=0,e=r?.length;t{await this.discardChanges(),this.waitingForConfirmation=!1,this.closeSidebar()},context:this},cancelButton:{value:e.lang.cancelButton,callback:()=>{t.closePopup(),e.setEditOverlay(),setTimeout(()=>{this.waitingForConfirmation=!1},100)}}}))}}}),s(e,"Dashboards/EditMode/SidebarPopup.js",[e["Core/Renderer/HTML/AST.js"],e["Dashboards/Layout/CellHTML.js"],e["Dashboards/EditMode/AccordionMenu.js"],e["Shared/BaseForm.js"],e["Dashboards/Actions/Bindings.js"],e["Dashboards/Layout/Cell.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/EditMode/EditRenderer.js"],e["Dashboards/Layout/GUIElement.js"],e["Dashboards/Layout/Layout.js"],e["Core/Utilities.js"]],function(t,e,s,i,o,n,l,a,r,d,c){let{addEvent:h,createElement:p,fireEvent:u,merge:m}=c;class b extends i{constructor(t,e,i){super(t,e),this.options={components:["HTML","row","Highcharts","DataGrid","KPI"]},this.isVisible=!1,this.componentsList=[],this.editMode=i,this.options=m(this.options,i.options.toolbars?.sidebar||{}),this.componentsList=this.getComponentsList(this.options.components||[]),this.accordionMenu=new s(this.iconsURL,this.hide.bind(this))}detectRightSidebar(t){let e=this.editMode,s=e.customHTMLMode?e.board.container:e.board.layoutsWrapper;return!!s&&r.getOffsets(t,s).left{e.add(l.classNames[t?"editSidebarRightShow":"editSidebarShow"])})}show(t){let e=this.editMode,s=!!(t&&this.detectRightSidebar(t));this.showPopup(l.classNames.editSidebarShow),this.addClassNames(s),e.resizer&&e.resizer.disableResizer(),n.isCell(e.editCellContext)&&e.editCellContext.row&&e.editCellContext.row.setHighlight(),e.hideToolbars(["cell","row"]),e.stopContextDetection(),this.isVisible=!0,this.generateContent(t)}generateContent(e){if(this.container.innerHTML=t.emptyHTML,this.renderHeader(e?this.editMode.lang.settings:this.editMode.lang.addComponent,""),this.sidebarWrapper=p("div",{className:l.classNames.editSidebarWrapper},void 0,this.container),!e){this.renderAddComponentsList();return}if(this.type=e.getType(),"cell-html"===this.type||"cell"===this.type){let t=e.mountedComponent;if(!t)return;this.accordionMenu.renderContent(this.sidebarWrapper,t,this.container)}}renderAddComponentsList(){let t;let e=this,s=this.componentsList,i=p("div",{className:l.classNames.editGridItems},{},e.sidebarWrapper);for(let o=0,n=s.length;o{t.preventDefault();let i=e.editMode.dragDrop;if(i){let n=t=>{let s=e.container.getBoundingClientRect();(t.clientXs.right||t.clientYs.bottom)&&(e.hide(),document.removeEventListener("mousemove",n))},l=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",l),i.onDragStart(t,void 0,t=>{if(0===this.editMode.board.layouts.length){let e=this.editMode.board,s=new d(e,{id:r.getElementId("layout"),copyId:"",parentContainerId:e.container.id,rows:[{}],style:{}});s&&e.layouts.push(s),t=s.rows[0]}if(!t){let s=e.editMode.board.layouts;i.dropContext=t=s[s.length-1].addRow({},void 0)}let l=s[o].onDrop(e,t),a=h(this.editMode,"layoutChanged",t=>{if(l&&"newComponent"===t.type){if(l.mountedComponent.chart){let t=h(l.mountedComponent.chart,"render",()=>{e.editMode.setEditCellContext(l),e.show(l),l.setHighlight(),t(),a()})}else e.editMode.setEditCellContext(l),e.show(l),l.setHighlight()}});document.removeEventListener("mousemove",n)})}}),t.innerHTML=s[o].text}onDropNewComponent(t,e){let s=this.editMode.dragDrop;if(!s)return;let i=("cell"===t.getType()?t.row:t).addCell({id:r.getElementId("col")});s.onCellDragEnd(i);let n=m(e,{cell:i.id}),l=o.addComponent(n,this.editMode.board,i);return this.editMode.setEditOverlay(),(async()=>{let t=await l;t&&u(this.editMode,"layoutChanged",{type:"newComponent",target:t})})(),i}hide(){let t=this.editMode,s=t.editCellContext;this.removeClassNames(),this.container.style.display="none",t.isEditOverlayActive&&t.setEditOverlay(!0),n.isCell(s)&&s.row?(t.showToolbars(["cell","row"],s),s.row.setHighlight(),s.setHighlight(!0)):e.isCellHTML(s)&&t.cellToolbar&&(t.cellToolbar.showToolbar(s),s.setHighlight()),t.isContextDetectionActive=!0,this.isVisible=!1}closeButtonEvents(){"cell"===this.type||"cell-html"===this.type?this.accordionMenu.cancelChanges():this.hide()}renderHeader(t,e){if(!this.container)return;let s=p("div",{className:l.classNames.editSidebarHeader},{},this.container);this.container.appendChild(s),this.headerWrapper=s;let i=a.renderIcon(this.headerWrapper,{icon:e,className:l.classNames.editSidebarTitle});i&&(i.textContent=t),this.headerWrapper?.appendChild(this.closeButton)}getComponentsList(t){let e=this.editMode,s=e.board.componentTypes,i=[];return t.forEach(t=>{let o=s[t];o?i.push({text:e.lang?.sidebar[t]||o.name,onDrop:function(t,e){let s=o.prototype.getOptionsOnDrop(t);if(s)return t.onDropNewComponent(e,s)}}):"row"===t&&i.push({...b.addRow,text:e.lang?.sidebar[t]||b.addRow.text})}),i}addCloseButton(t=l.classNames.popupCloseButton){return h(document,"click",t=>{t.stopPropagation(),"block"===this.container.style.display&&!this.container.contains(t.target)&&this.container.classList.value.includes("show")&&("cell"===this.type||"cell-html"===this.type?this.accordionMenu.cancelChanges():this.hide())}),super.addCloseButton.call(this,t)}createPopupContainer(t,e=l.classNames.editSidebar){return super.createPopupContainer.call(this,t,e)}}return b.addRow={text:l.lang.sidebar.row,onDrop:function(t,e){if(!e)return;let s=("cell"===e.getType()?e.row:e).layout.board,i=r.getElementId("layout"),n=r.getElementId("cell"),l=new d(s,{id:i,copyId:"",parentContainerId:s.container.id,rows:[{cells:[{id:n}]}],style:{}});l&&(s.layouts.push(l),u(s.editMode,"layoutChanged",{type:"newLayout",target:l,board:s})),o.addComponent({type:"HTML",cell:n,className:"highcharts-dashboards-component-placeholder",html:` +

    Placeholder

    + This placeholder can be deleted when you add extra + components to this row. + + `},s)}},b}),s(e,"Dashboards/EditMode/EditContextMenu.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Core/Utilities.js"],e["Dashboards/EditMode/Menu/Menu.js"]],function(t,e,s){let{addEvent:i,merge:o}=e;class n extends s{constructor(t,e,s){if(super(s.board.container,o(n.defaultOptions,e||{}),s),this.editMode=s,this.options=o(n.defaultOptions,e||{}),this.editMode.board.layoutsWrapper?.parentNode.insertBefore(this.container,this.editMode.board.layoutsWrapper),this.container.style.width=this.options.width+"px",super.initItems(n.items),this.options.items){let t=[];for(let e=0,s=this.options.items.length;e{s.target!==this.container&&s.target!==e.editMode.tools.contextButtonElement&&!s.target.classList.contains(t.classNames.toggleSlider)&&"INPUT"!==s.target.tagName&&this.isVisible&&this.setVisible(!1)})}setVisible(t){let e=this.editMode.tools.contextButtonElement;this.container&&e&&(t?(this.container.style.display="block",this.isVisible=!0,e.setAttribute("aria-expanded","true")):(this.container.style.display="none",this.isVisible=!1,e.setAttribute("aria-expanded","false")));let s=this.activeItems.find(t=>"editMode"===t.options.langKey);s&&s.options.setValue(s,this.editMode.isActive())}updatePosition(t,e,s){let i=this.options.width||0,o=t?t.offsetLeft-i+t.offsetWidth:e,n=t?t.offsetTop+t.offsetHeight:s;o&&n&&(this.container.style.left=o+"px",this.container.style.top=n+"px")}}return n.defaultOptions={enabled:!0,width:150,className:t.classNames.contextMenu,itemsClassName:t.classNames.contextMenuItem,items:["editMode"]},n.items=o(s.items,{editMode:{id:"editMode",type:"toggle",getValue:function(t){return t.menu.editMode.isActive()},setValue:function(t,e){let s=t.innerElement?.querySelector("input");s&&(s.checked=e)},langKey:"editMode",events:{click:function(){this.menu.editMode.toggleEditMode()}}}}),n}),s(e,"Dashboards/Actions/ContextDetection.js",[e["Dashboards/Layout/GUIElement.js"],e["Core/Utilities.js"]],function(t,e){let{defined:s}=e;class i{static isGUIElementOnParentEdge(t,e){let s="top"===e||"bottom"===e?t.row.layout.getVisibleRows():"left"===e||"right"===e?t.row.getVisibleCells():[],i=s.length-1;return s[i]===t&&"right"===e||s[i]===t.row&&"bottom"===e||s[0]===t&&"left"===e||s[0]===t.row&&"top"===e}static getContextLevel(t,e,s,i){let o=t.getOverlappingLevels(i,e/2),n=e/o.length,l=o[o.length-1],a=t.row.layout.level-Math.floor(s/n);return at.row.layout.level?t.row.layout.level:a}static getContext(e,o,n){let l;let a=t.getOffsets(e),{width:r,height:d}=t.getDimFromOffsets(a);r<2*n&&(n=r/2);let c=o.clientX-a.left,h=o.clientY-a.top,p="bottom";switch(c>=-n&&c<=n?p="left":c-r>=-n&&c-r<=n?p="right":h>=-n&&h<=n?p="top":h-d>=-n&&h-d<=n&&(p="bottom"),p){case"right":l=c-r+n;break;case"left":l=n-c;break;case"top":l=n-h;break;case"bottom":l=h-d+n}let u={cell:e,side:p};if(e.row?.layout.level&&p&&i.isGUIElementOnParentEdge(e,p)&&s(l)){let t=i.getContextLevel(e,n,l,p),s=e.getParentCell(t);s&&(u.cell=s)}return u}}return i}),s(e,"Dashboards/Actions/DragDrop.js",[e["Core/Utilities.js"],e["Dashboards/Globals.js"],e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/Layout/GUIElement.js"],e["Dashboards/Actions/ContextDetection.js"]],function(t,e,s,i,o){let{addEvent:n,merge:l,css:a,fireEvent:r,createElement:d}=t;class c{constructor(t,e){this.editMode=t,this.options=l(c.defaultOptions,e),this.mockElement=d("div",{className:s.classNames.dragMock},{},t.board.container),this.dropPointer={isVisible:!1,align:"",element:d("div",{className:s.classNames.dropPointer},{},t.board.container)},this.isActive=!1,this.initEvents()}showDropPointer(t,e,s,i){this.dropPointer.isVisible=!0,a(this.dropPointer.element,{display:"block",left:t+"px",top:e+"px",height:i+"px",width:s+"px"})}hideDropPointer(){this.dropPointer.isVisible&&(this.dropPointer.isVisible=!1,this.dropPointer.align="",this.dropPointer.element.style.display="none")}setMockElementPosition(t){let e=this.editMode.board.container.getBoundingClientRect(),s=this.mockElement.clientWidth/2,i=t.clientX-e.left-s,o=t.clientY-e.top-s;a(this.mockElement,{left:i+"px",top:o+"px"})}initEvents(){n(document,"mousemove",this.onDrag.bind(this)),n(document,"mouseup",this.onDragEnd.bind(this))}onDragStart(t,s,i){this.isActive=!0,this.editMode.hideToolbars(["cell","row"]),this.editMode.resizer&&this.editMode.resizer.disableResizer(),this.setMockElementPosition(t),s?(this.context=s,s.hide(),s.getType()===e.guiElementType.cell&&(r(this.editMode.board,"cellResize",{cell:s}),r(s.row,"cellChange",{cell:s,row:s.row}))):i&&(this.dragEndCallback=i),a(this.mockElement,{cursor:"grabbing",display:"block"})}onDrag(t){this.isActive&&(t.preventDefault(),this.setMockElementPosition(t),this.context?this.context.getType()===e.guiElementType.cell?this.onCellDrag(t):this.context.getType()===e.guiElementType.row&&this.onRowDrag(t):this.dragEndCallback&&this.onCellDrag(t))}onDragEnd(){this.isActive&&(this.isActive=!1,a(this.mockElement,{cursor:"grab",display:"none"}),this.context?(this.context.getType()===e.guiElementType.cell?this.onCellDragEnd():this.context.getType()===e.guiElementType.row&&this.onRowDragEnd(),this.context=void 0,this.editMode.editCellContext&&(this.editMode.showToolbars(["row","cell"],this.editMode.editCellContext),this.editMode.resizer&&this.editMode.resizer.setSnapPositions(this.editMode.editCellContext))):this.dragEndCallback&&(this.dragEndCallback(this.dropContext),this.dragEndCallback=void 0,this.hideDropPointer()))}onRowDrag(t,e){let s=this.mouseCellContext,n=this.options.dropPointerSize||0,l=this.options.rowDropOffset||0,a=!1;if(s){let r=e||o.getContext(s,t,l),d=r.side;if((this.dropPointer.align!==d||this.dropContext!==r.cell.row)&&(a=!0,this.dropPointer.align=d,this.dropContext=r.cell.row),d){let t=i.getOffsets(this.dropContext,this.editMode.board.container),{width:e,height:s}=i.getDimFromOffsets(t);(!this.dropPointer.isVisible||a)&&this.showDropPointer(t.left,t.top+("bottom"===this.dropPointer.align?s:0)-n/2,e,n)}else this.dropContext=void 0,this.hideDropPointer()}}onRowDragEnd(){let t=this.context,e=this.dropContext;this.dropPointer.align&&(t.layout.unmountRow(t),0===t.layout.rows.length&&t.layout.destroy(),e.layout.mountRow(t,(e.layout.getRowIndex(e)||0)+("bottom"===this.dropPointer.align?1:0)),t.cells[0]&&(r(this.editMode.board,"cellResize",{cell:t.cells[0]}),r(t,"cellChange",{cell:t.cells[0],row:t}))),this.hideDropPointer(),t.show(),r(this.editMode,"layoutChanged",{type:"rowDragEnd",target:t,board:this.editMode.board})}onCellDrag(t,e){let s=this.mouseCellContext,i=this.options.cellDropOffset||0;s||e?this.onCellDragCellCtx(t,e||o.getContext(s,t,i)):this.mouseRowContext&&this.onCellDragRowCtx(t,this.mouseRowContext)}onCellDragCellCtx(t,e){let s=this.options.dropPointerSize||0,o=e.side,n=!1;if((this.dropPointer.align!==o||this.dropContext!==e.cell)&&(n=!0,this.dropPointer.align=o,this.dropContext=e.cell),"right"===o||"left"===o){let e=i.getOffsets(this.dropContext,this.editMode.board.container),{width:l,height:a}=i.getDimFromOffsets(e);if(!this.dropPointer.isVisible||n){let i=this.dropContext.row.getRowLevelInfo(t.clientY),n=i?i.rowLevel.bottom-i.rowLevel.top:a;this.showDropPointer(e.left+("right"===o?l:0)-s/2,e.top,s,n)}}else if("top"===o||"bottom"===o){let s=i.getOffsets(this.dropContext),n=this.dropContext.row.getRowLevelInfo(s.top);n&&(0===n.index&&"top"===o||n.index===n.rowLevels.length-1&&"bottom"===o)&&this.onRowDrag(t,e)}else this.dropContext=void 0,this.hideDropPointer()}onCellDragRowCtx(t,e){let s,o;let n=this.options.dropPointerSize||0,l=i.getOffsets(e),a=e.getRowLevelInfo(t.clientY);if(a)for(let e=0,r=a.rowLevel.cells.length;e=t.clientX)o.top>t.clientY||o.bottomt.clientX||e===r-1&&o.rightt.clientX);else if(o.rightt.clientX?0:d)-n/2-h.left,o.top-h.top,i>n?i:n,p||c),this.dropPointer.align="right",this.dropContext=s}e=r}}else s.isVisible||s!==this.context||(this.dropContext=void 0,this.hideDropPointer())}}onCellDragEnd(t){let s=t||this.context,o=this.dropContext;if(this.dropPointer.align&&o&&s){if(s.row.unmountCell(s),0===s.row.cells.length&&s.row.destroy(),("top"===this.dropPointer.align||"bottom"===this.dropPointer.align)&&o.getType()===e.guiElementType.row)o.layout.addRow({},void 0,(o.layout.getRowIndex(o)||0)+("bottom"===this.dropPointer.align?1:0)).mountCell(s,0);else if("nestedBottom"===this.dropPointer.align&&o.getType()===e.guiElementType.cell){let t=o.row,e=t.getCellIndex(o);t.unmountCell(o);let n=t.addCell({id:i.getElementId("col-nested"),layout:{rows:[{},{}]}},void 0,e);n.nestedLayout&&(n.nestedLayout.rows[0].mountCell(o),n.nestedLayout.rows[1].mountCell(s))}else o.getType()===e.guiElementType.cell&&o.row.mountCell(s,(o.row.getCellIndex(o)||0)+("right"===this.dropPointer.align?1:0))}r(this.editMode.board,"cellResize",{cell:s}),r(s.row,"cellChange",{cell:s,row:s.row}),this.hideDropPointer(),s.show(),r(this.editMode,"layoutChanged",{type:"cellDragEnd",target:s,board:this.editMode.board})}}return c.defaultOptions={enabled:!0,rowDropOffset:30,cellDropOffset:30,dropPointerSize:16},c}),s(e,"Dashboards/Actions/Resizer.js",[e["Dashboards/EditMode/EditGlobals.js"],e["Dashboards/Layout/GUIElement.js"],e["Core/Utilities.js"]],function(t,e,s){let{merge:i,addEvent:o,createElement:n,fireEvent:l,removeEvent:a}=s;class r{static fromJSON(t,e){return new r(t,e.options)}constructor(t,e){this.editMode=t,this.options=i({},r.defaultOptions,t.options.resize,e),this.currentCell=void 0,this.isX=this.options.type.indexOf("x")>-1,this.isY=this.options.type.indexOf("y")>-1,this.isActive=!1,this.startX=0,this.tempSiblingsWidth=[],this.addSnaps()}addSnaps(){let e=this.editMode.iconsURLPrefix,s=this.options.snap.width||0,i=this.options.snap.height||0,o=this.editMode.board.container;this.snapRight=n("img",{className:t.classNames.resizeSnap+" "+t.classNames.resizeSnapX,src:e+"resize-handle.svg"},{width:s+"px",height:i+"px",left:"-9999px"},o),this.snapBottom=n("img",{className:t.classNames.resizeSnap+" "+t.classNames.resizeSnapY,src:e+"resize-handle.svg"},{width:s+"px",height:i+"px",top:"-9999px",left:"0px"},o),this.addResizeEvents()}disableResizer(){this.isActive=!1,this.currentDimension=void 0,this.currentCell=void 0,this.snapRight&&(this.snapRight.style.left="-9999px"),this.snapBottom&&(this.snapBottom.style.left="-9999px")}setSnapPositions(t){this.currentCell=t;let s=e.getOffsets(t,this.editMode.board.container),i=s.left||0,o=s.top||0,{width:n,height:l}=e.getDimFromOffsets(s),a=this.options.snap.width||0,r=this.options.snap.height||0;this.snapRight&&(this.snapRight.style.left=i+n-a+"px",this.snapRight.style.top=o+l/2-r/2+"px"),this.snapBottom&&(this.snapBottom.style.top=o+l-r+"px",this.snapBottom.style.left=i+n/2-a/2+"px")}setTempWidthSiblings(){let t=this.currentCell;if(t){let s,i;let o=e.getOffsets(t),n=t.row.getRowLevelInfo(o.top),l=n&&n.rowLevel.cells||[];for(let e=0,o=l.length;e{n.currentCell&&n.setSnapPositions(n.currentCell)};if("function"==typeof ResizeObserver)this.resizeObserver=new ResizeObserver(l),this.resizeObserver.observe(n.editMode.board.container);else{let t=o(window,"resize",l);o(this,"destroy",t)}}onMouseMove(t){let s=this.currentCell,i=s&&s.container,o=this.currentDimension;if(s&&i&&!((s.row.layout.board.editMode||{}).dragDrop||{}).isActive){let i=e.getOffsets(s),{width:n}=e.getDimFromOffsets(e.getOffsets(s.row));if("x"===o){let e=Math.min(t.clientX-i.left,n)/n*100+"%";s.setSize(e),this.startX=t.clientX}"y"===o&&s.setSize(void 0,t.clientY-i.top),l(this.editMode.board,"cellResize",{cell:s}),l(s.row,"cellChange",{cell:s,row:s.row}),this.setSnapPositions(s)}}destroy(){let t;let e=["snapRight","snapBottom"];a(document,"mousemove"),a(document,"mouseup"),this.resizeObserver?.unobserve(this.editMode.board.container);for(let s=0,i=e.length;s{t.hideContextPointer()})}initLayout(){let t=this.board;t.container.innerHTML="",t.container=f("div",{className:u.classNames.boardContainer},{},t.boardWrapper),t.layoutsWrapper=f("div",{className:u.classNames.layoutsWrapper},{},t.container),t.options.gui&&this.setLayouts(t.options.gui),t.options.layoutsJSON&&!t.layouts.length&&this.setLayoutsFromJSON(t.options.layoutsJSON)}setLayouts(t){let e=this.board,s=t.layouts;for(let i=0,o=s.length;i{t.sidebar&&(t.sidebar.show(),t.setEditOverlay())},style:{display:"none"}})}}onDetectContext(){let t;if(this.isActive()&&this.isContextDetectionActive&&(this.mouseCellContext||this.mouseRowContext)&&!(this.dragDrop||{}).isActive&&(this.mouseCellContext?t=this.mouseCellContext:this.mouseRowContext&&(t=this.mouseRowContext.layout.parentCell),this.potentialCellContext=t,t)){let e=p.getOffsets(t,this.board.container),{width:s,height:i}=p.getDimFromOffsets(e);this.showContextPointer(e.left,e.top,s,i)}}stopContextDetection(){this.isContextDetectionActive=!1,this.dragDrop&&(this.dragDrop.mouseCellContext=void 0),this.mouseCellContext=void 0,this.hideContextPointer()}onContextConfirm(){this.isContextDetectionActive&&this.potentialCellContext&&this.editCellContext!==this.potentialCellContext&&this.setEditCellContext(this.potentialCellContext,this.editCellContext)}setEditCellContext(t,e){if(s.isCellHTML(t)||s.isCellHTML(e))this.editCellContext=t,this.cellToolbar?.showToolbar(t);else{let s=e?.row;this.editCellContext=t,this.showToolbars(["row","cell"],t),(!s||s!==t.row)&&(s&&s.setHighlight(),t.row&&t.row.setHighlight()),this.resizer&&this.resizer.setSnapPositions(t)}}showContextPointer(t,e,s,i){this.contextPointer&&(this.contextPointer.isVisible=!0,C(this.contextPointer.element,{display:"block",left:t+"px",top:e+"px",height:i+"px",width:s+"px"}))}hideContextPointer(){this.contextPointer?.isVisible&&(this.contextPointer.isVisible=!1,this.contextPointer.element.style.display="none")}setEditOverlay(t){let e=this.editOverlay,s=e?.classList.contains(i.classNames.editOverlayActive);t||s?t&&s&&(e?.classList.remove(i.classNames.editOverlayActive),this.isEditOverlayActive=!1):(e?.classList.add(i.classNames.editOverlayActive),this.isEditOverlayActive=!0)}}}),s(e,"Dashboards/EditMode/Fullscreen.js",[e["Core/Utilities.js"],e["Dashboards/Globals.js"]],function(t,e){let{addEvent:s}=t;return class{constructor(t){this.isOpen=!1,this.board=t,this.board.boardWrapper.classList.add(e.classNamePrefix+"-fullscreen")}toggle(){this[this.isOpen?"close":"open"]()}open(){if(this.isOpen)return;let t=this,e=t.board,i=s(e.boardWrapper.ownerDocument,"fullscreenchange",function(){t.isOpen?(t.isOpen=!1,t.close()):(t.isOpen=!0,t.setButtonText())});t.unbindFullscreenEvent=()=>{i()},e.boardWrapper.requestFullscreen().catch(()=>{throw Error("Full screen is not supported.")})}close(){let t=this.board;this.isOpen&&t.boardWrapper.ownerDocument instanceof Document&&t.boardWrapper.ownerDocument.exitFullscreen(),this.unbindFullscreenEvent&&(this.unbindFullscreenEvent=this.unbindFullscreenEvent()),this.isOpen=!1,this.setButtonText()}setButtonText(){let t=this.board.editMode,e=t&&t.tools.contextMenu,s=e&&e.items.viewFullscreen;if(s&&s.innerElement){let e=t.lang;s.innerElement.innerHTML=(this.isOpen?e.exitFullscreen:e.viewFullscreen)||""}}}}),s(e,"masters/modules/layout.src.js",[e["Dashboards/Globals.js"],e["Dashboards/EditMode/EditMode.js"],e["Dashboards/EditMode/Fullscreen.js"]],function(t,e,s){return t.EditMode=e,t.Fullscreen=s,t})}); \ No newline at end of file