/* Highcharts JS v9.1.1 (2021-06-03) Exporting module (c) 2010-2021 Torstein Honsi License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/export-data",["highcharts","highcharts/modules/exporting"],function(k){a(k);a.Highcharts=k;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function k(a,d,f,p){a.hasOwnProperty(d)||(a[d]=p.apply(null,f))}a=a?a._modules:{};k(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var d=a.isSafari, f=a.win,p=f.document,l=f.URL||f.webkitURL||f,t=a.dataURLtoBlob=function(a){if((a=a.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3b.userAgent.indexOf("Chrome"),f=n.URL||n.webkitURL||n;try{if(b.msSaveOrOpenBlob&&n.MSBlobBuilder){var r=new n.MSBlobBuilder;r.append(a);return r.getBlob("image/svg+xml")}if(!c)return f.createObjectURL(new n.Blob(["\ufeff"+ a],{type:B}))}catch(O){}}var J=p.doc,c=p.seriesTypes,n=p.win;p=l.getOptions;l=l.setOptions;var F=t.addEvent,K=t.defined,G=t.extend,L=t.find,D=t.fireEvent,M=t.isNumber,w=t.pick,H=g.downloadURL;l({exporting:{csv:{annotations:{itemDelimiter:"; ",join:!1},columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",exportData:{annotationHeader:"Annotations", categoryHeader:"Category",categoryDatetimeHeader:"DateTime"},viewData:"View data table",hideData:"Hide data table"}});F(d,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&!this.dataTableDiv&&this.viewData()});d.prototype.setUpKeyToAxis=function(){c.arearange&&(c.arearange.prototype.keyToAxis={low:"y",high:"y"});c.gantt&&(c.gantt.prototype.keyToAxis={start:"x",end:"x"})};d.prototype.getDataRows=function(b){var c=this.hasParallelCoordinates, m=this.time,f=this.options.exporting&&this.options.exporting.csv||{},d=this.xAxis,r={},g=[],p=[],n=[],y;var z=this.options.lang.exportData;var l=z.categoryHeader,N=z.categoryDatetimeHeader,u=function(q,e,m){if(f.columnHeaderFormatter){var c=f.columnHeaderFormatter(q,e,m);if(!1!==c)return c}return q?q instanceof a?q.options.title&&q.options.title.text||(q.dateTime?N:l):b?{columnTitle:1"};a=this.getTableAST(a);return b(a)};d.prototype.getTableAST=function(a){var b=0,c=[],d=this.options,f=a?(1.1).toLocaleString()[1]:".",l=w(d.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(l);var g=l?a.shift():null,k=a.shift(),n=function(a,b,c,d){var h=w(d,"");b="text"+(b?" "+b:"");"number"===typeof h?(h=h.toString(),","===f&&(h=h.replace(".",f)),b="number"):d||(b="empty");c=G({"class":b},c);return{tagName:a,attributes:c,textContent:h}}; !1!==d.exporting.tableCaption&&c.push({tagName:"caption",attributes:{"class":"highcharts-table-caption"},textContent:w(d.exporting.tableCaption,d.title.text?d.title.text:"Chart")});for(var p=0,t=a.length;pb&&(b=a[p].length);c.push(function(a,b,c){var f=[],h=0;c=c||b&&b.length;var g=0,e;if(e=l&&a&&b){a:if(e=a.length,b.length===e){for(;e--;)if(a[e]!==b[e]){e=!1;break a}e=!0}else e=!1;e=!e}if(e){for(e=[];h";H(k(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+n.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};d.prototype.viewData=function(){this.toggleDataTable(!0)};d.prototype.hideData=function(){this.toggleDataTable(!1)};d.prototype.toggleDataTable=function(a){(a=w(a,!this.isDataTableVisible))&&!this.dataTableDiv&&(this.dataTableDiv=J.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv, this.renderTo.nextSibling));this.dataTableDiv&&(this.dataTableDiv.style.display=a?"block":"none",a&&(this.dataTableDiv.innerHTML="",(new f([this.getTableAST()])).addToDOM(this.dataTableDiv),D(this,"afterViewData",this.dataTableDiv)));this.isDataTableVisible=a;a=this.exportDivElements;var b=this.options.exporting;b=b&&b.buttons&&b.buttons.contextButton.menuItems;var c=this.options.lang;v&&v.menuItemDefinitions&&c&&c.viewData&&c.hideData&&b&&a&&a.length&&f.setElementHTML(a[b.indexOf("viewData")],this.isDataTableVisible? c.hideData:c.viewData)};var v=p().exporting;v&&(G(v.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}),v.buttons&&v.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData"));c.map&&(c.map.prototype.exportKey="name");c.mapbubble&&(c.mapbubble.prototype.exportKey="name");c.treemap&& (c.treemap.prototype.exportKey="name")});k(a,"masters/modules/export-data.src.js",[],function(){})}); //# sourceMappingURL=export-data.js.map