/* Highcharts JS v11.1.0 (2023-06-05) Data module (c) 2012-2021 Torstein Honsi License: www.highcharts.com/license */ 'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c(new Date).getFullYear()- 2E3?f+1900:f+2E3;return Date.UTC(f,a[2]-1,+a[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(a){return a?Date.UTC(+a[3]+2E3,a[1]-1,+a[2]):NaN}}};this.chart=k;this.chartOptions=l;this.options=a;this.rawColumns=[];this.init(a,l,k)}init(a,l,k){let f=a.decimalPoint,e;l&&(this.chartOptions=l);k&&(this.chart=k);"."!==f&&","!==f&&(f=void 0);this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.firstRowAsNames=G(a.firstRowAsNames, this.firstRowAsNames,!0);this.decimalRegex=f&&new RegExp("^(-?[0-9]+)"+f+"([0-9]+)$");void 0!==this.liveDataTimeout&&clearTimeout(this.liveDataTimeout);this.rawColumns=[];this.columns.length&&(this.dataFound(),e=!b(a));e||(e=this.fetchLiveData());e||(e=!!this.parseCSV().length);e||(e=!!this.parseTable().length);e||(e=this.parseGoogleSpreadsheet());!e&&a.afterComplete&&a.afterComplete()}getColumnDistribution(){const a=this.chartOptions;var l=this.options;const k=[],b=function(a){return(F[a||"line"].prototype.pointArrayMap|| [0]).length},e=a&&a.chart&&a.chart.type,g=[],c=[];l=l&&l.seriesMapping||a&&a.series&&a.series.map(function(){return{x:0}})||[];let z=0,p;(a&&a.series||[]).forEach(a=>{g.push(b(a.type||e))});l.forEach(a=>{k.push(a.x||0)});0===k.length&&k.push(0);l.forEach(f=>{const l=new K,k=g[z]||b(e),n=(a&&a.series||[])[z]||{},u=F[n.type||e||"line"].prototype.pointArrayMap,r=u||["y"];(C(f.x)||n.isCartesian||!u)&&l.addColumnReader(f.x,"x");O(f,function(a,f){"x"!==f&&l.addColumnReader(a,f)});for(p=0;pw||w>p?(++w,u=""):(!isNaN(parseFloat(u))&&isFinite(u)?(u=parseFloat(u),c("number")):isNaN(Date.parse(u))?c("string"):(u=u.replace(/\//g,"-"),c("date")),g.lengthm[","]?";":",";c.decimalPoint||(c.decimalPoint=f>l?".":",",e.decimalRegex= new RegExp("^(-?[0-9]+)"+c.decimalPoint+"([0-9]+)$"));return k}function b(a,f){const l=[],k=[];let b,g=[],n=0,m=!1,d;if(!f||f>a.length)f=a.length;for(;nb[d]?"YY":"YYYY":12=b[d]?(g[d]="dd",m=!0):g[d].length||(g[d]="mm")));if(m){for(d=0;da)a=0;if(!h||h>=d.length)h=d.length-1;c.itemDelimiter?q=c.itemDelimiter:(q=null,q=k(d));let e=0;for(t=a;t<=h;t++)"#"===d[t][0]?e++:f(d[t],t-a-e);c.columnTypes&&0!==c.columnTypes.length||!r.length||!r[0].length||"date"!==r[0][1]||c.dateFormat|| (c.dateFormat=b(g[0]));this.dataFound()}return g}parseTable(){var a=this.options;const l=this.columns||[],k=a.startRow||0,c=a.endRow||Number.MAX_VALUE,e=a.startColumn||0,g=a.endColumn||Number.MAX_VALUE;a.table&&(a=a.table,"string"===typeof a&&(a=L.getElementById(a)),[].forEach.call(a.getElementsByTagName("tr"),(a,f)=>{f>=k&&f<=c&&[].forEach.call(a.children,(a,c)=>{const b=l[c-e];let d=1;if(("TD"===a.tagName||"TH"===a.tagName)&&c>=e&&c<=g)for(l[c-e]||(l[c-e]=[]),l[c-e][f-k]=a.innerHTML;f-k>=d&&void 0=== b[f-k-d];)b[f-k-d]=null,d++})}),this.dataFound());return l}fetchLiveData(){function a(f){function b(b,g,n){function m(){e&&k.liveDataURL===b&&(l.liveDataTimeout=setTimeout(a,h))}if(!b||!/^(http|\/|\.\/|\.\.\/)/.test(b))return b&&c.error&&c.error("Invalid URL"),!1;f&&(clearTimeout(l.liveDataTimeout),k.liveDataURL=b);H({url:b,dataType:n||"json",success:function(a){k&&k.series&&g(a);m()},error:function(a,f){3>++d&&m();return c.error&&c.error(f,a)}});return!0}b(g.csvURL,function(a){k.update({data:{csv:a}})}, "text")||b(g.rowsURL,function(a){k.update({data:{rows:a}})})||b(g.columnsURL,function(a){k.update({data:{columns:a}})})}const l=this,k=this.chart,c=this.options,e=c.enablePolling,g=x(c);let d=0,h=1E3*(c.dataRefreshRate||2);if(!b(c))return!1;1E3>h&&(h=1E3);delete c.csvURL;delete c.rowsURL;delete c.columnsURL;a(!0);return b(c)}parseGoogleSpreadsheet(){function a(f){const e=["https://sheets.googleapis.com/v4/spreadsheets",d,"values",h(),"?alt=json&majorDimension=COLUMNS&valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=FORMATTED_STRING&key="+ b.googleAPIKey].join("/");H({url:e,dataType:"json",success:function(e){f(e);b.enablePolling&&(c.liveDataTimeout=setTimeout(function(){a(f)},g))},error:function(a,f){return b.error&&b.error(f,a)}})}const c=this,b=this.options,d=b.googleSpreadsheetKey,e=this.chart,g=Math.max(1E3*(b.dataRefreshRate||2),4E3),h=()=>{if(b.googleSpreadsheetRange)return b.googleSpreadsheetRange;const a=("ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(b.startColumn||0)||"A")+((b.startRow||0)+1);let f="ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(G(b.endColumn, -1))||"ZZ";C(b.endRow)&&(f+=b.endRow+1);return`${a}:${f}`};d&&(delete b.googleSpreadsheetKey,a(function(a){a=a.values;if(!a||0===a.length)return!1;const f=a.reduce((a,f)=>Math.max(a,f.length),0);a.forEach(a=>{for(let b=0;ba[m+1])):(v&&v.length&&(t=this.parseDate(y)),g&&J(t)&&"float"!==h?(d[m]=y,a[m]=t,a.isDatetime=!0,"undefined"!==typeof a[m+1]&&(y=t>a[m+1],y!==w&&"undefined"!==typeof w&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,m=a.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):a.unsorted=!0),w= y)):(a[m]=""===v?null:v,0!==m&&(a.isDatetime||a.isNumeric)&&(a.mixed=!0)))}g&&a.mixed&&(f[b]=c[b]);if(g&&w&&this.options.sort)for(b=0;b{"undefined"===typeof b.columnIndex&&(b.columnIndex=a.shift())});this.readers.forEach(a=>{"undefined"===typeof a.columnIndex&&(b=!1)});return b}read(a,b){const c=this.pointIsArray,d=c?[]:{};this.readers.forEach(e=>{const f=a[e.columnIndex][b];c?d.push(f):0