!/** * Highcharts JS v12.5.0 (2026-01-12) * @module highcharts/modules/data * @requires highcharts * * Data module * * (c) 2012-2026 Highsoft AS * Author: Torstein Honsi * * A commercial license may be required depending on use. * See www.highcharts.com/license */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Axis,e._Highcharts.Chart,e._Highcharts.Point,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/data",["highcharts/highcharts"],function(e){return t(e,e.Axis,e.Chart,e.Point,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/data"]=t(e._Highcharts,e._Highcharts.Axis,e._Highcharts.Chart,e._Highcharts.Point,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.Axis,e.Highcharts.Chart,e.Highcharts.Point,e.Highcharts.SeriesRegistry)}("u"(()=>{"use strict";var r={260:e=>{e.exports=i},512:e=>{e.exports=a},532:e=>{e.exports=t},944:t=>{t.exports=e},960:e=>{e.exports=s}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return r[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?.["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?.(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"}})}};m.post=async function(e,t,s){let i=new d.FormData;c(t,function(e,t){i.append(t,e)}),i.append("b64","true");let a=await d.fetch(e,{method:"POST",body:i,...s});if(a.ok){let e=await a.text(),s=document.createElement("a");s.href=`data:${t.type};base64,${e}`,s.download=t.filename,s.click(),p(s)}};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,a,r;if(e)for(t=0,r=[],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,a;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(),a=!L(e)),a||(a=this.fetchLiveData()),a||(a=!!this.parseCSV().length),a||(a=!!this.parseTable().length),a||(a=this.parseGoogleSpreadsheet()),!a&&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},a=function(e="line"){return D[e].prototype.pointArrayMap},r=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||r))}),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(r),u=(e?.series??[])[h]??{},d=a(u.type||r),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,a;e=0,s=0,a=!1,p.some(function(t,i){let a=!1,r,n,l,h="";if(i>13)return!0;for(let i=0;io[","]?a=";":(o[","],o[";"],a=","),i.decimalPoint||(e>s?i.decimalPoint=".":i.decimalPoint=",",t.decimalRegex=RegExp("^(-?[0-9]+)"+i.decimalPoint+"([0-9]+)$")),d=a}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>r){++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"),a)}return a}(s[0])),this.dataFound()}return s}parseTable(){let e=this.options,t=this.columns||[],s=e.startRow||0,i=e.endRow||Number.MAX_VALUE,a=e.startColumn||0,r=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-a],l=1;if(("TD"===e.tagName||"TH"===e.tagName)&&i>=a&&i<=r)for(t[i-a]||(t[i-a]=[]),t[i-a][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,a=H(s),r=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(a,h,u){if(!a||!/^(http|\/|\.\/|\.\.\/)/.test(a))return a&&s.error&&s.error("Invalid URL"),!1;function d(){i&&t.liveDataURL===a&&(e.liveDataTimeout=setTimeout(o,n))}return l&&(clearTimeout(e.liveDataTimeout),t.liveDataURL=a),Y({url:a,dataType:u||"json",success:function(e){t?.series&&h(e),d()},error:function(e,t){return++r<3&&d(),s.error?.(t,e)}}),!0}h(a.csvURL,function(e){t.update({data:{csv:e}})},"text")||h(a.rowsURL,function(e){t.update({data:{rows:e}})})||h(a.columnsURL,function(e){t.update({data:{columns:e}})})}(!0),L(s))}parseGoogleSpreadsheet(){let e=this,t=this.options,s=t.googleSpreadsheetKey,i=this.chart,a=Math.max(1e3*(t.dataRefreshRate||2),4e3);return s&&(delete t.googleSpreadsheetKey,!function i(r){Y({url:["https://sheets.googleapis.com/v4/spreadsheets",s,"values",(()=>{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}`})(),"?alt=json&majorDimension=COLUMNS&valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=FORMATTED_STRING&key="+t.googleAPIKey].join("/"),dataType:"json",success:function(s){r(s),t.enablePolling&&(e.liveDataTimeout=setTimeout(function(){i(r)},a))},error:function(e,s){return t.error?.(s,e)}})}(function(t){let s=t.values;if(!s||0===s.length)return!1;let a=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)),r&&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(r&&e.mixed&&(i[t]=s[t]),r&&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(a=>{let r=e[a.columnIndex][t];s?i.push(r):a.configName.indexOf(".")>0?C().prototype.setNestedProperty(i,r,a.configName):i[a.configName]=r}),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,s=[];for(e=0;e