/* Highcharts JS v8.2.0 (2020-08-20) Exporting module (c) 2010-2019 Torstein Honsi License: www.highcharts.com/license */ (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(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,d,e,c){a.hasOwnProperty(d)||(a[d]=c.apply(null,e))}a=a?a._modules:{};g(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var d=a.win,e=d.navigator,c=d.document, g=d.URL||d.webkitURL||d,u=/Edge\/\d+/.test(e.userAgent),v=a.dataURLtoBlob=function(f){if((f=f.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3b.userAgent.indexOf("Chrome"),c=p.URL||p.webkitURL||p;try{if(b.msSaveOrOpenBlob&&p.MSBlobBuilder){var q=new p.MSBlobBuilder;q.append(a);return q.getBlob("image/svg+xml")}if(!f)return c.createObjectURL(new p.Blob(["\ufeff"+a],{type:d}))}catch(M){}}var v=e.doc,f=e.seriesTypes,p=e.win;e=c.addEvent;var I=c.defined,J=c.extend,E=c.find,D= c.fireEvent,K=c.getOptions,L=c.isNumber,w=c.pick;c=c.setOptions;var F=g.downloadURL;c({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"}});e(d,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&!this.dataTableDiv&&this.viewData()});d.prototype.setUpKeyToAxis=function(){f.arearange&&(f.arearange.prototype.keyToAxis={low:"y",high:"y"});f.gantt&&(f.gantt.prototype.keyToAxis={start:"x",end:"x"})};d.prototype.getDataRows=function(b){var d=this.hasParallelCoordinates,f=this.time,c=this.options.exporting&&this.options.exporting.csv||{},e=this.xAxis, q={},g=[],p=[],n=[],r;var t=this.options.lang.exportData;var A=t.categoryHeader,x=t.categoryDatetimeHeader,G=function(l,d,f){if(c.columnHeaderFormatter){var h=c.columnHeaderFormatter(l,d,f);if(!1!==h)return h}return l?l instanceof a?l.options.title&&l.options.title.text||(l.dateTime?x:A):b?{columnTitle:1',c=this.options,d=a?(1.1).toLocaleString()[1]:".",f=w(c.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(f);var e=0,g=f?a.shift():null,p=a.shift(),n=function(a,b,c,f){var e=w(f,""); b="text"+(b?" "+b:"");"number"===typeof e?(e=e.toString(),","===d&&(e=e.replace(".",d)),b="number"):f||(b="empty");return"<"+a+(c?" "+c:"")+' class="'+b+'">'+e+""};!1!==c.exporting.tableCaption&&(b+=''+w(c.exporting.tableCaption,c.title.text?c.title.text.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/"):"Chart")+"");for(var r=0,t=a.length;r e&&(e=a[r].length);b+=function(a,b,d){var e="",g=0;d=d||b&&b.length;var h,k=0;if(h=f&&a&&b){a:if(h=a.length,b.length===h){for(;h--;)if(a[h]!==b[h]){h=!1;break a}h=!0}else h=!1;h=!h}if(h){for(e+="";g"}return e+""}(g,p,Math.max(e,p.length));b+="";a.forEach(function(a){b+="";for(var c=0;c"});b+="";a={html:b};D(this,"afterGetTable",a);return a.html};d.prototype.downloadCSV=function(){var a=this.getCSV(!0);F(u(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+ ".csv")};d.prototype.downloadXLS=function(){var a='\x3c!--[if gte mso 9]>Ark1td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}'+ this.getTable(!0)+"";F(u(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+p.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};d.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=v.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling),this.dataTableDiv.innerHTML=this.getTable());if(""===this.dataTableDiv.style.display||"none"=== this.dataTableDiv.style.display)this.dataTableDiv.style.display="block";this.isDataTableVisible=!0;D(this,"afterViewData",this.dataTableDiv)};d.prototype.hideData=function(){this.dataTableDiv&&"block"===this.dataTableDiv.style.display&&(this.dataTableDiv.style.display="none");this.isDataTableVisible=!1};d.prototype.toggleDataTable=function(){var a,c=this.exportDivElements,d=null===(a=null===n||void 0===n?void 0:n.buttons)||void 0===a?void 0:a.contextButton.menuItems;a=this.options.lang;this.isDataTableVisible? this.hideData():this.viewData();(null===n||void 0===n?0:n.menuItemDefinitions)&&(null===a||void 0===a?0:a.viewData)&&a.hideData&&d&&c&&c.length&&(c[d.indexOf("viewData")].innerHTML=this.isDataTableVisible?a.hideData:a.viewData)};var n=K().exporting;n&&(J(n.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}), n.buttons&&n.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData"));f.map&&(f.map.prototype.exportKey="name");f.mapbubble&&(f.mapbubble.prototype.exportKey="name");f.treemap&&(f.treemap.prototype.exportKey="name")});g(a,"masters/modules/export-data.src.js",[],function(){})}); //# sourceMappingURL=export-data.js.map