Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-excel-export

Package Overview
Dependencies
Maintainers
4
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-excel-export - npm Package Compare versions

Comparing version 17.1.50 to 17.2.28-beta

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### Excel Export
#### Bug Fixes
- Double quotes will be preserved proper on exporting grid data to CSV
## 17.1.1-beta (2019-01-29)

@@ -7,0 +13,0 @@

4

dist/ej2-excel-export.umd.min.js
/*!
* filename: ej2-excel-export.umd.min.js
* version : 17.1.50
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-compression","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Compression,e.ej2Base)}(this,function(e,t,r){"use strict";var o=function(){return function(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.indent=0,this.rotation=0,this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}}(),n=function(){return function(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}}(),i=function(){return function(){}}(),s=function(){return function(){}}(),l=function(){return function(){}}(),a=function(){return function(){this.name="Normal",this.xfId=0}}(),m=function(){return function(e,t){this.numFmtId=e,this.formatCode=t}}(),h=function(){return function(e,t){this.lineStyle=e,this.color=t}}(),d=function(){return function(){this.left=new h("none","#FFFFFF"),this.right=new h("none","#FFFFFF"),this.top=new h("none","#FFFFFF"),this.bottom=new h("none","#FFFFFF"),this.all=new h("none","#FFFFFF")}}(),p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){return function(){}}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[o]=e,r=!0),o++}r||t.push(e)},t}return p(t,e),t}(Array),f=function(){return function(){}}(),y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),v=function(){return function(){}}(),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[o]=e,r=!0),o++}r||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(){return function(){this.isSummaryRowBelow=!0,this.showGridLines=!0}}(),S=function(){return function(){}}(),C=function(){return function(){}}(),I=function(){return function(){}}(),k=function(){return function(){}}(),T=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.add=function(e){for(var o=!1,n=0,i=0,s=r;i<s.length;i++){var l=s[i];if(t.isIntersecting(l,e)){var a=new k;a.x=Math.min(l.x,e.x),a.y=Math.min(l.Y,e.y),a.width=Math.max(l.Width+l.X,e.width+e.x),a.height=Math.max(l.Height+l.Y,e.height+e.y),a.ref=r[n].ref.split(":")[0]+":"+e.ref.split(":")[1],r[n]=a,e=a,o=!0}n++}return o||r.push(e),e},r}return F(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array),N=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var o=e;return r.isNullOrUndefined(t)||r.isNullOrUndefined(e)||(o=t(e)),o},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}(),A=function(){function e(e){if(this.csvStr="",this.formatter=new N,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,r=0,o=e;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,r=0,o=e.cells;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;if(void 0!==e.value)if(e.value instanceof Date)if(void 0!==e.style&&void 0!==e.style.numberFormat)try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:e.style.numberFormat}))}else if(void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name))try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:this.globalStyles.get(e.style.name)}))}else t+=e.value;else"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value);this.csvStr=t},e.prototype.parseCellValue=function(e){return-1!==e.indexOf(",")||-1!==e.indexOf("\n")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),r=document.createElementNS("http://www.w3.org/1999/xhtml","a");r.download=e,r.href=t;var o=document.createEvent("MouseEvent");o.initEvent("click",!0,!0),r.dispatchEvent(o),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},e}(),P=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}(),R=function(){function e(e,i,s,l){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==s?s:"en-US",this.currency=void 0!==l?l:"USD",this.intl=new r.Internationalization(this.culture),this.mSaveType=i,"xlsx"===i){if(this.mArchive=new t.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new o),this.mFonts.push(new n),this.cellStyles.set("Normal",new a),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var m=0;m<e.styles.length;m++)if(void 0!==e.styles[m].name){if(this.cellStyles.has(e.styles[m].name))throw Error("Style name "+e.styles[m].name+" is already existed");var h=new o;h.isGlobalStyle=!0,this.parserCellStyle(e.styles[m],h,"none");var d=new a;d.name=h.name,d.xfId=h.index-1,this.cellStyles.set(d.name,d);var p={};void 0!==e.styles[m].numberFormat&&(p.format=e.styles[m].numberFormat),void 0!==e.styles[m].type?p.type=e.styles[m].type:p.type="datetime",void 0!==p.format&&this.globalStyles.set(e.styles[m].name,p)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new B,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new A(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new x;for(var t=e.length,r=0;r<t;r++){var o=e[r],n=new w;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==o.name&&void 0!==o.name?n.name=o.name:n.name="Sheet"+(r+1).toString(),n.index=r+1,null!==o.columns&&void 0!==o.columns&&this.parserColumns(o.columns,n),null!==o.rows&&void 0!==o.rows&&this.parserRows(o.rows,n),null!==o.showGridLines&&void 0!==o.showGridLines&&(n.showGridLines=o.showGridLines),null!==o.freeze&&void 0!==o.freeze&&this.parserFreezePanes(o.freeze,n),null!==o.printTitle&&void 0!==o.printTitle&&this.parserPrintTitle(o.printTitle,n),void 0!==o.pageSetup&&void 0!==o.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=o.pageSetup.isSummaryRowBelow),n.index=r+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var r={};return this.applyProperties(e,r),this.applyProperties(t,r),r},e.prototype.applyProperties=function(e,t){for(var r=Object.keys(e),o=0;o<r.length;o++)"name"!==r[o]&&(t[r[o]]=e[r[o]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var r=e%26;e=e/26-1,t=String.fromCharCode(65+r)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var r,o="";if(null!==e.fromRow&&void 0!==e.fromRow){r="$"+e.fromRow+":$"+(null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow)}var n;if(null!==e.fromColumn&&void 0!==e.fromColumn){var i=e.fromColumn,s=void 0;s=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,n="$"+this.getColumnName(i)+":$"+this.getColumnName(s)}void 0!==r&&(o+=t.name+"!"+r),void 0!==n&&void 0!==r?o+=","+t.name+"!"+n:void 0!==n&&(o+=t.name+"!"+n),""!==o&&this.printTitles.set(t.index-1,o)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new I,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var r=e.length;t.columns=[];for(var o=0;o<r;o++){var n=new f;if(null===e[o].index||void 0===e[o].index)throw Error("Column index is missing.");n.index=e[o].index,null!==e[o].width&&void 0!==e[o].width&&(n.width=e[o].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var r=e.length;t.rows=new g;for(var o=0,n=0;n<r;n++){var i=this.parserRow(e[n],o);o=i.index,t.rows.add(i)}this.insertMergedCellsStyle(t)},e.prototype.insertMergedCellsStyle=function(e){var t=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(o,n){var i=e.rows.filter(function(e){return e.index===o.y})[0];if(r.isNullOrUndefined(i)){var s=e.rows.filter(function(e){return e.index<=o.y}),l=new v;l.index=o.y,l.cells=new c,l.cells.add(t.createCell(o,n));h=0;s.length>0&&(h=e.rows.indexOf(s[s.length-1])+1),e.rows.splice(h,0,l)}else{var a=i.cells.filter(function(e){return e.index===o.x})[0];if(r.isNullOrUndefined(a)){var m=i.cells.filter(function(e){return e.index<=o.x}),h=0;m.length>0&&(h=i.cells.indexOf(m[m.length-1])+1),i.cells.splice(h,0,t.createCell(o,n))}else a.styleIndex=o.styleIndex}})},e.prototype.createCell=function(e,t){var r=new u;return r.refName=t,r.index=e.x,r.cellStyle=new o,r.styleIndex=e.styleIndex,r},e.prototype.parserRow=function(e,t){var r=new v;if(null!==e.height&&void 0!==e.height&&(r.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return r.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,r),this.parseCells(e.cells,r),r},e.prototype.parseGrouping=function(e,t){t.grouping=new C,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new c;for(var r=void 0!==e?e.length:0,n=1,i=1,s=0;s<r;s++){var l=e[s],a=new u;if(null===l.index||void 0===l.index)throw Error("Cell index is missing.");if(a.index=l.index,a.index<n?n=a.index:a.index>i&&(i=a.index),a.refName=this.getCellName(t.index,a.index),null!==l.rowSpan&&void 0!==l.rowSpan?a.rowSpan=l.rowSpan-1:a.rowSpan=0,null!==l.colSpan&&void 0!==l.colSpan?a.colSpan=l.colSpan-1:a.colSpan=0,null!==l.hyperlink&&void 0!==l.hyperlink){var m=new S;void 0!==l.hyperlink.target&&(m.target=l.hyperlink.target,void 0!==l.hyperlink.displayText?a.value=l.hyperlink.displayText:a.value=l.hyperlink.target,a.type=this.getCellValueType(a.value),m.ref=a.refName,m.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(m),a.cellStyle=new o,this.parserCellStyle(void 0!==l.style?this.mergeOptions(l.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==l.formula&&void 0!==l.formula&&(a.formula=l.formula,a.type="formula"),null!==l.value&&void 0!==l.value&&(void 0!==a.formula?a.value=0:(a.value=l.value,a.type=this.getCellValueType(a.value))),null!==l.style&&void 0!==l.style&&void 0===a.styleIndex?(a.cellStyle=new o,a.value instanceof Date?this.parserCellStyle(l.style,a.cellStyle,a.type,14):this.parserCellStyle(l.style,a.cellStyle,a.type),a.styleIndex=a.cellStyle.index):a.value instanceof Date&&(a.cellStyle=new o,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),t.cells.add(a)}t.spans=n+":"+i},e.prototype.GetColors=function(){var e;return(e=new Map).set("WHITE","FFFFFFFF"),e.set("SILVER","FFC0C0C0"),e.set("GRAY","FF808080"),e.set("BLACK","FF000000"),e.set("RED","FFFF0000"),e.set("MAROON","FF800000"),e.set("YELLOW","FFFFFF00"),e.set("OLIVE","FF808000"),e.set("LIME","FF00FF00"),e.set("GREEN","FF008000"),e.set("AQUA","FF00FFFF"),e.set("TEAL","FF008080"),e.set("BLUE","FF0000FF"),e.set("NAVY","FF000080"),e.set("FUCHSIA","FFFF00FF"),e.set("PURPLE","FF800080"),e},e.prototype.processColor=function(e){return e.startsWith("#")?e.replace("#","FF"):(e=e.toUpperCase(),this.rgbColors=this.GetColors(),e=this.rgbColors.has(e)?this.rgbColors.get(e):"FF000000")},e.prototype.processCellValue=function(e){var t=e,r="",o=e.indexOf("<",0);if(o>=0){0!==o&&(r+='<r><t xml:space="preserve">'+e.substring(0,o)+"</t></r>");for(var n=e.indexOf(">",o+1);o>=0&&n>=0;)if((n=e.indexOf(">",o+1))>=0){var i=e.substring(o+1,n).split(" ");if(i.length>0&&(r+="<r><rPr>"),i.length>1)for(var s=0,l=i;s<l.length;s++){var a=l[s];a.trim().startsWith("size=")?r+='<sz val="'+a.substring(6,a.length-1)+'"/>':a.trim().startsWith("face=")?r+='<rFont val="'+a.substring(6,a.length-1)+'"/>':a.trim().startsWith("color=")&&(r+='<color rgb="'+this.processColor(a.substring(7,a.length-1))+'"/>')}else 1===i.length&&("b"===i[0].trim()?r+="<b/>":"i"===i[0].trim()?r+="<i/>":"u"===i[0].trim()&&(r+="<u/>"));(o=e.indexOf("<",n+1))<0&&(o=t.length),r+='</rPr><t xml:space="preserve">'+t.substring(n+1,o)+"</t></r>"}return""===r?t:r}return t},e.prototype.applyGlobalStyle=function(e,t){this.cellStyles.has(e.name)&&(t.index=this.mStyles.filter(function(t){return t.name===e.name})[0].index,t.name=e.name)},e.prototype.parserCellStyle=function(e,t,r,o){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new d,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign.toLowerCase()),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign.toLowerCase()),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,r):void 0!==o?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var r=this.getNumberFormat(e,t);if(r!==e){var o=this.mNumFmt.get(e);if(void 0!==o&&(o.formatCode=r,this.mNumFmt.has(r))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var s=i[n];s.numFmtId===o.numFmtId&&(s.numFmtId=this.mNumFmt.get(r).numFmtId)}for(var l=0,a=this.mCellXfs;l<a.length;l++){var m=a[l];m.numFmtId===o.numFmtId&&(m.numFmtId=this.mNumFmt.get(r).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var r;switch(t){case"number":try{r=this.intl.getNumberPattern({format:e,currency:this.currency})}catch(t){r=e}break;case"datetime":try{r=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"dateTime"},!0)}catch(t){r=e}}break;case"date":try{r=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"date"},!0)}catch(t){r=e}}break;case"time":try{r=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"time"},!0)}catch(t){r=e}}break;default:r=e}return r},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){if(e.isGlobalStyle)return this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length;var t=this.compareStyle(e);return t.result?t.index:(this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length)},e.prototype.processNumFormatId=function(e){if("GENERAL"!==e.numberFormat&&!this.mNumFmt.has(e.numberFormat)){var t=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new m(t,e.numberFormat))}},e.prototype.isNewFont=function(e){for(var t=!1,r=0,o=0,n=this.mFonts;o<n.length;o++){var i=n[o];r++;var s=void 0;if(void 0!==e.fontColor&&(s="FF"+e.fontColor.replace("#","")),t=i.color===s&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return r-=1,{index:r,result:t}},e.prototype.isNewBorder=function(e){var t=new o;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new o;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,r=0,o=0,n=this.mStyles;o<n.length;o++){var i=n[o];if(t=!i.isGlobalStyle&&(i.backColor===e.backColor&&i.bold===e.bold&&i.numFmtId===e.numFmtId&&i.numberFormat===e.numberFormat&&i.type===e.type&&i.fontColor===e.fontColor&&i.fontName===e.fontName&&i.fontSize===e.fontSize&&i.hAlign===e.hAlign&&i.italic===e.italic&&i.underline===e.underline&&i.vAlign===e.vAlign&&i.indent===e.indent&&i.rotation===e.rotation&&i.wrapText===e.wrapText&&i.borders.all.color===e.borders.all.color&&i.borders.all.lineStyle===e.borders.all.lineStyle&&i.borders.left.color===e.borders.left.color&&i.borders.left.lineStyle===e.borders.left.lineStyle&&i.borders.right.color===e.borders.right.color&&i.borders.right.lineStyle===e.borders.right.lineStyle&&i.borders.top.color===e.borders.top.color&&i.borders.top.lineStyle===e.borders.top.lineStyle&&i.borders.bottom.color===e.borders.bottom.color&&i.borders.bottom.lineStyle===e.borders.bottom.lineStyle)){r=i.index;break}}return{index:r,result:t}},e.prototype.contains=function(e,t){var r=e.indexOf(t);return r>-1&&r<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,r=e.type,o=e.value;switch(r){case"datetime":if(o=this.toOADate(o),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":o=o?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var i=this.processCellValue(o);this.contains(this.sharedString,i)||this.sharedString.push(i),o=this.sharedString.indexOf(i)}e.saveType=t,e.value=o},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,r){var o={};o.blobData=t.csvHelper.saveAsBlob(),e(o)});default:return new Promise(function(e,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var r={};r.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(r)})})}},e.prototype.save=function(e,t){var r=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),n=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){r.mArchive.destroy()});else{if(null===n||n[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveInternal=function(){this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation()},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",r=this.worksheets.length,o=0;o<r;o++)t+='<sheet name="'+this.worksheets[o].name+'" sheetId="'+(o+1).toString()+'" r:id ="rId'+(o+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),e+=n+="</definedNames>"}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new P,n='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?n+="<sheetPr />":n+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',n+=this.saveSheetView(e),void 0!==e.columns){for(var i="<cols>",s=0,l=e.columns;s<l.length;s++){var a=l[s];void 0!==a.width?i+='<col min="'+a.index+'" max="'+a.index+'" width="'+this.pixelsToColumnWidth(a.width)+'" customWidth="1" />':i+='<col min="'+a.index+'" max="'+a.index+'" width="8.43" customWidth="1" />'}n+=i+"</cols>"}if(n+="<sheetData>",o.append(n),n="",void 0!==e.rows)for(var m=0,h=e.rows;m<h.length;m++){var d=h[m],p='<row r="'+d.index+'" ';r.isNullOrUndefined(d.spans)||(p+='spans="'+d.spans+'" '),void 0!==d.height&&(p+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(p+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(p+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(p+='collapsed="1" ')),p+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(p+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(p+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(p+='s="'+f.styleIndex+'" '),p+=" >",void 0!==f.formula&&(p+="<f>"+f.formula+"</f>"),void 0!==f.value?p+="<v>"+f.value+"</v></c>":p+="</c>")}p+="</row>",o.append(p)}if(n+="</sheetData>",e.mergeCells.length>0){n+='<mergeCells count="'+e.mergeCells.length+'">';for(var y=0,v=e.mergeCells;y<v.length;y++){n+='<mergeCell ref="'+v[y].ref+'" />'}n+="</mergeCells>"}if(e.hyperLinks.length>0){n+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];n+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}n+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}n+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(n),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=0,o=e.hyperLinks;r<o.length;r++){var n=o[r];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveSheetView=function(e){var t='<sheetViews><sheetView workbookViewId="0" ';return!1===e.showGridLines?t+='showGridLines="0" >':t+=">",void 0!==e.freezePanes&&(t+='<pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ',0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/>"),t+="</sheetView></sheetViews > "},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',r="",o=0;o<e;o++)this.sharedString[o].startsWith("<r>")?(r+="<si>",r+=this.sharedString[o],r+="</si>"):(r+="<si><t>",r+=this.processString(this.sharedString[o]),r+="</t></si>");r+="</sst>",this.addToArchive(t+r,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&amp;")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"&lt;")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,"&gt;")),e},e.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.updateCellXfsStyleXfs=function(){for(var e=0,t=this.mStyles;e<t.length;e++){var r=t[e],o=void 0;r.isGlobalStyle?(o=new l).xfId=r.index-1:(o=new i).xfId=0;var a=this.isNewFont(r);if(a.result)o.fontId=a.index;else{var h=new n;h.b=r.bold,h.i=r.italic,h.name=r.fontName,h.sz=r.fontSize,h.u=r.underline,h.color="FF"+r.fontColor.replace("#",""),this.mFonts.push(h),o.fontId=this.mFonts.length-1}if("none"!==r.backColor){var d="FF"+r.backColor.replace("#","");if(this.mFills.has(d)){var p=this.mFills.get(d);o.fillId=p}else{p=this.mFills.size+2;this.mFills.set(d,p),o.fillId=p}}else o.fillId=0;if(this.isNewBorder(r)?o.borderId=0:(this.mBorders.push(r.borders),o.borderId=this.mBorders.length),"GENERAL"!==r.numberFormat)if(this.mNumFmt.has(r.numberFormat)){var u=this.mNumFmt.get(r.numberFormat);o.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(r.numberFormat,new m(c,r.numberFormat)),o.numFmtId=c}else"GENERAL"===r.numberFormat&&14===r.numFmtId?o.numFmtId=14:o.numFmtId=0;r.isGlobalStyle||(o.applyAlignment=1),o.alignment=new s,o.alignment.indent=r.indent,o.alignment.horizontal=r.hAlign,o.alignment.vertical=r.vAlign,o.alignment.wrapText=r.wrapText?1:0,o.alignment.rotation=r.rotation,r.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellXfs.push(o)):this.mCellXfs.push(o)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,r){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,"&quot;")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,r=this.mFonts;t<r.length;t++){var o=r[t];e+="<font>",o.b&&(e+="<b />"),o.i&&(e+="<i />"),o.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(o.sz)+'" />',e+='<color rgb="'+o.color+'" />',e+='<name val="'+o.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,r){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+r+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,r=this.mBorders;t<r.length;t++){var o=r[t];if(this.isAllBorder(o)){var n=o.all.color.replace("#",""),i=o.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+o.left.lineStyle+'"><color rgb="FF'+o.left.color.replace("#","")+'" /></left><right style="'+o.right.lineStyle+'"><color rgb="FF'+o.right.color.replace("#","")+'" /></right><top style="'+o.top.lineStyle+'"><color rgb="FF'+o.top.color.replace("#","")+'" /></top><bottom style="'+o.bottom.lineStyle+'"><color rgb="FF'+o.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(r,o){t+='<cellStyle name="'+o+'" xfId="'+e.cellStyles.get(o).xfId+'"',"Normal"===o&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,r=this.mCellStyleXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" ',void 0!==o.alignment?e+=">"+this.saveAlignment(o)+"</xf>":e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,r=this.mCellXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" xfId="'+o.xfId+'" ',1===o.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(o)+"</xf>"}return e+"</cellXfs>"},e.prototype.saveAlignment=function(e){var t="<alignment ";return void 0!==e.alignment.horizontal&&(t+='horizontal="'+e.alignment.horizontal+'" '),void 0!==e.alignment.indent&&0!==e.alignment.indent?t+='indent="'+e.alignment.indent+'" ':void 0!==e.alignment.rotation&&0!==e.alignment.rotation&&(t+='textRotation="'+e.alignment.rotation+'" '),void 0!==e.alignment.vertical&&(t+='vertical="'+e.alignment.vertical+'" '),t+='wrapText="'+e.alignment.wrapText+'" />'},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(r+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(r+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(r+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(r+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(r+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(r+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(r+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),r+="</cp:coreProperties>",this.addToArchive(r,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,r=0,o=0;o<t;o++,r++)e+='<Relationship Id="rId'+(o+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(o+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",r=this.worksheets.length,o=0;o<r;o++)t+='<Override PartName="/xl/worksheets/sheet'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,r){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(o,r);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,r);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,r){if(0!==e.rowSpan||0!==e.colSpan){var o=new k;o.x=e.index,o.width=e.colSpan,o.y=t,o.height=e.rowSpan;var n=this.getCellName(o.y,o.x),i=this.getCellName(t+o.height,e.index+o.width);o.ref=n+":"+i;r.add(o);var s={x:o.x,y:o.y},l={x:e.index+o.width,y:t+o.height};this.updatedMergedCellStyles(s,l,e)}return r},e.prototype.updatedMergedCellStyles=function(e,t,r){for(var o=e.x;o<=t.x;o++)for(var n=e.y;n<=t.y;n++)this.mergedCellsStyle.set(this.getCellName(n,o),{x:o,y:n,styleIndex:r.styleIndex})},e.prototype.dateToTicks=function(e,t,r){if(e>=1&&e<=9999&&t>=1&&t<=12){var o=e-1;return 864e9*(365*o+(o/4|0)-(o/100|0)+(o/400|0)+(this.isLeapYear(e)?[0,31,60,91,121,152,182,213,244,274,305,335,366]:[0,31,59,90,120,151,181,212,243,273,304,334,365])[t-1]+r-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,r){if(e>=0&&e<24&&t>=0&&t<60&&r>=0&&r<60){return 1e4*(3600*e+60*t+r)*1e3}throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}(),B=function(){return function(){}}();e.CellStyle=o,e.Font=n,e.CellXfs=i,e.Alignment=s,e.CellStyleXfs=l,e.CellStyles=a,e.NumFmt=m,e.Border=h,e.Borders=d,e.Cell=u,e.Cells=c,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=R,e.BuiltInProperties=B,e.Worksheet=w,e.HyperLink=S,e.Grouping=C,e.FreezePane=I,e.MergeCell=k,e.MergeCells=T,e.Worksheets=x,e.CsvHelper=A,e.ValueFormatter=N,e.BlobHelper=P,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-compression","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Compression,e.ej2Base)}(this,function(e,t,r){"use strict";var o=function(){return function(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.indent=0,this.rotation=0,this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}}(),n=function(){return function(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}}(),i=function(){return function(){}}(),s=function(){return function(){}}(),l=function(){return function(){}}(),a=function(){return function(){this.name="Normal",this.xfId=0}}(),m=function(){return function(e,t){this.numFmtId=e,this.formatCode=t}}(),h=function(){return function(e,t){this.lineStyle=e,this.color=t}}(),d=function(){return function(){this.left=new h("none","#FFFFFF"),this.right=new h("none","#FFFFFF"),this.top=new h("none","#FFFFFF"),this.bottom=new h("none","#FFFFFF"),this.all=new h("none","#FFFFFF")}}(),p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){return function(){}}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[o]=e,r=!0),o++}r||t.push(e)},t}return p(t,e),t}(Array),f=function(){return function(){}}(),y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),v=function(){return function(){}}(),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[o]=e,r=!0),o++}r||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(){return function(){this.isSummaryRowBelow=!0,this.showGridLines=!0}}(),S=function(){return function(){}}(),C=function(){return function(){}}(),k=function(){return function(){}}(),I=function(){return function(){}}(),T=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.add=function(e){for(var o=!1,n=0,i=0,s=r;i<s.length;i++){var l=s[i];if(t.isIntersecting(l,e)){var a=new I;a.x=Math.min(l.x,e.x),a.y=Math.min(l.Y,e.y),a.width=Math.max(l.Width+l.X,e.width+e.x),a.height=Math.max(l.Height+l.Y,e.height+e.y),a.ref=r[n].ref.split(":")[0]+":"+e.ref.split(":")[1],r[n]=a,e=a,o=!0}n++}return o||r.push(e),e},r}return F(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array),N=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var o=e;return r.isNullOrUndefined(t)||r.isNullOrUndefined(e)||(o=t(e)),o},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}(),A=function(){function e(e){if(this.csvStr="",this.formatter=new N,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,r=0,o=e;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,r=0,o=e.cells;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;if(void 0!==e.value)if(e.value instanceof Date)if(void 0!==e.style&&void 0!==e.style.numberFormat)try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:e.style.numberFormat}))}else if(void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name))try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:this.globalStyles.get(e.style.name)}))}else t+=e.value;else"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value);this.csvStr=t},e.prototype.parseCellValue=function(e){for(var t="",r=e.length,o=0;o<r;o++)'"'===e[o]?t+=e[o].replace('"','""'):t+=e[o];return-1!==(e=t).indexOf(",")||-1!==e.indexOf("\n")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),r=document.createElementNS("http://www.w3.org/1999/xhtml","a");r.download=e,r.href=t;var o=document.createEvent("MouseEvent");o.initEvent("click",!0,!0),r.dispatchEvent(o),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},e}(),P=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}(),R=function(){function e(e,i,s,l){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==s?s:"en-US",this.currency=void 0!==l?l:"USD",this.intl=new r.Internationalization(this.culture),this.mSaveType=i,"xlsx"===i){if(this.mArchive=new t.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new o),this.mFonts.push(new n),this.cellStyles.set("Normal",new a),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var m=0;m<e.styles.length;m++)if(void 0!==e.styles[m].name){if(this.cellStyles.has(e.styles[m].name))throw Error("Style name "+e.styles[m].name+" is already existed");var h=new o;h.isGlobalStyle=!0,this.parserCellStyle(e.styles[m],h,"none");var d=new a;d.name=h.name,d.xfId=h.index-1,this.cellStyles.set(d.name,d);var p={};void 0!==e.styles[m].numberFormat&&(p.format=e.styles[m].numberFormat),void 0!==e.styles[m].type?p.type=e.styles[m].type:p.type="datetime",void 0!==p.format&&this.globalStyles.set(e.styles[m].name,p)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new B,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new A(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new x;for(var t=e.length,r=0;r<t;r++){var o=e[r],n=new w;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==o.name&&void 0!==o.name?n.name=o.name:n.name="Sheet"+(r+1).toString(),n.index=r+1,null!==o.columns&&void 0!==o.columns&&this.parserColumns(o.columns,n),null!==o.rows&&void 0!==o.rows&&this.parserRows(o.rows,n),null!==o.showGridLines&&void 0!==o.showGridLines&&(n.showGridLines=o.showGridLines),null!==o.freeze&&void 0!==o.freeze&&this.parserFreezePanes(o.freeze,n),null!==o.printTitle&&void 0!==o.printTitle&&this.parserPrintTitle(o.printTitle,n),void 0!==o.pageSetup&&void 0!==o.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=o.pageSetup.isSummaryRowBelow),n.index=r+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var r={};return this.applyProperties(e,r),this.applyProperties(t,r),r},e.prototype.applyProperties=function(e,t){for(var r=Object.keys(e),o=0;o<r.length;o++)"name"!==r[o]&&(t[r[o]]=e[r[o]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var r=e%26;e=e/26-1,t=String.fromCharCode(65+r)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var r,o="";if(null!==e.fromRow&&void 0!==e.fromRow){r="$"+e.fromRow+":$"+(null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow)}var n;if(null!==e.fromColumn&&void 0!==e.fromColumn){var i=e.fromColumn,s=void 0;s=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,n="$"+this.getColumnName(i)+":$"+this.getColumnName(s)}void 0!==r&&(o+=t.name+"!"+r),void 0!==n&&void 0!==r?o+=","+t.name+"!"+n:void 0!==n&&(o+=t.name+"!"+n),""!==o&&this.printTitles.set(t.index-1,o)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new k,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var r=e.length;t.columns=[];for(var o=0;o<r;o++){var n=new f;if(null===e[o].index||void 0===e[o].index)throw Error("Column index is missing.");n.index=e[o].index,null!==e[o].width&&void 0!==e[o].width&&(n.width=e[o].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var r=e.length;t.rows=new g;for(var o=0,n=0;n<r;n++){var i=this.parserRow(e[n],o);o=i.index,t.rows.add(i)}this.insertMergedCellsStyle(t)},e.prototype.insertMergedCellsStyle=function(e){var t=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(o,n){var i=e.rows.filter(function(e){return e.index===o.y})[0];if(r.isNullOrUndefined(i)){var s=e.rows.filter(function(e){return e.index<=o.y}),l=new v;l.index=o.y,l.cells=new c,l.cells.add(t.createCell(o,n));h=0;s.length>0&&(h=e.rows.indexOf(s[s.length-1])+1),e.rows.splice(h,0,l)}else{var a=i.cells.filter(function(e){return e.index===o.x})[0];if(r.isNullOrUndefined(a)){var m=i.cells.filter(function(e){return e.index<=o.x}),h=0;m.length>0&&(h=i.cells.indexOf(m[m.length-1])+1),i.cells.splice(h,0,t.createCell(o,n))}else a.styleIndex=o.styleIndex}})},e.prototype.createCell=function(e,t){var r=new u;return r.refName=t,r.index=e.x,r.cellStyle=new o,r.styleIndex=e.styleIndex,r},e.prototype.parserRow=function(e,t){var r=new v;if(null!==e.height&&void 0!==e.height&&(r.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return r.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,r),this.parseCells(e.cells,r),r},e.prototype.parseGrouping=function(e,t){t.grouping=new C,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new c;for(var r=void 0!==e?e.length:0,n=1,i=1,s=0;s<r;s++){var l=e[s],a=new u;if(null===l.index||void 0===l.index)throw Error("Cell index is missing.");if(a.index=l.index,a.index<n?n=a.index:a.index>i&&(i=a.index),a.refName=this.getCellName(t.index,a.index),null!==l.rowSpan&&void 0!==l.rowSpan?a.rowSpan=l.rowSpan-1:a.rowSpan=0,null!==l.colSpan&&void 0!==l.colSpan?a.colSpan=l.colSpan-1:a.colSpan=0,null!==l.hyperlink&&void 0!==l.hyperlink){var m=new S;void 0!==l.hyperlink.target&&(m.target=l.hyperlink.target,void 0!==l.hyperlink.displayText?a.value=l.hyperlink.displayText:a.value=l.hyperlink.target,a.type=this.getCellValueType(a.value),m.ref=a.refName,m.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(m),a.cellStyle=new o,this.parserCellStyle(void 0!==l.style?this.mergeOptions(l.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==l.formula&&void 0!==l.formula&&(a.formula=l.formula,a.type="formula"),null!==l.value&&void 0!==l.value&&(void 0!==a.formula?a.value=0:(a.value=l.value,a.type=this.getCellValueType(a.value))),null!==l.style&&void 0!==l.style&&void 0===a.styleIndex?(a.cellStyle=new o,a.value instanceof Date?this.parserCellStyle(l.style,a.cellStyle,a.type,14):this.parserCellStyle(l.style,a.cellStyle,a.type),a.styleIndex=a.cellStyle.index):a.value instanceof Date&&(a.cellStyle=new o,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),t.cells.add(a)}t.spans=n+":"+i},e.prototype.GetColors=function(){var e;return(e=new Map).set("WHITE","FFFFFFFF"),e.set("SILVER","FFC0C0C0"),e.set("GRAY","FF808080"),e.set("BLACK","FF000000"),e.set("RED","FFFF0000"),e.set("MAROON","FF800000"),e.set("YELLOW","FFFFFF00"),e.set("OLIVE","FF808000"),e.set("LIME","FF00FF00"),e.set("GREEN","FF008000"),e.set("AQUA","FF00FFFF"),e.set("TEAL","FF008080"),e.set("BLUE","FF0000FF"),e.set("NAVY","FF000080"),e.set("FUCHSIA","FFFF00FF"),e.set("PURPLE","FF800080"),e},e.prototype.processColor=function(e){return e.startsWith("#")?e.replace("#","FF"):(e=e.toUpperCase(),this.rgbColors=this.GetColors(),e=this.rgbColors.has(e)?this.rgbColors.get(e):"FF000000")},e.prototype.processCellValue=function(e,t){var r=e,o="",n=e.indexOf("<",0);if(n>=0){0!==n&&(o+='<r><t xml:space="preserve">'+e.substring(0,n)+"</t></r>");for(var i=e.indexOf(">",n+1);n>=0&&i>=0;)if((i=e.indexOf(">",n+1))>=0){var s=e.substring(n+1,i);(n=e.indexOf("<",i+1))<0&&(n=r.length);var l=r.substring(i+1,n);if(0!==l.length){var a=s.split(" ");if(a.length>0&&(o+="<r><rPr>"),a.length>1)for(var m=0,h=a;m<h.length;m++){var d=h[m];switch(d.trim().substring(0,5)){case"size=":o+='<sz val="'+d.substring(6,d.length-1)+'"/>';break;case"face=":o+='<rFont val="'+d.substring(6,d.length-1)+'"/>';break;case"color":o+='<color rgb="'+this.processColor(d.substring(7,d.length-1))+'"/>';break;case"href=":var p=new S;p.target=d.substring(6,d.length-1).trim(),p.ref=t.refName,p.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(p),o+='<color rgb="FF0000FF"/><u/><b/>'}}else if(1===a.length){switch(a[0].trim()){case"b":o+="<b/>";break;case"i":o+="<i/>";break;case"u":o+="<u/>"}}o+='</rPr><t xml:space="preserve">'+l+"</t></r>"}}return""===o?r:o}return r},e.prototype.applyGlobalStyle=function(e,t){this.cellStyles.has(e.name)&&(t.index=this.mStyles.filter(function(t){return t.name===e.name})[0].index,t.name=e.name)},e.prototype.parserCellStyle=function(e,t,r,o){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new d,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign.toLowerCase()),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign.toLowerCase()),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,r):void 0!==o?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var r=this.getNumberFormat(e,t);if(r!==e){var o=this.mNumFmt.get(e);if(void 0!==o&&(o.formatCode=r,this.mNumFmt.has(r))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var s=i[n];s.numFmtId===o.numFmtId&&(s.numFmtId=this.mNumFmt.get(r).numFmtId)}for(var l=0,a=this.mCellXfs;l<a.length;l++){var m=a[l];m.numFmtId===o.numFmtId&&(m.numFmtId=this.mNumFmt.get(r).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var r;switch(t){case"number":try{r=this.intl.getNumberPattern({format:e,currency:this.currency})}catch(t){r=e}break;case"datetime":try{r=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"dateTime"},!0)}catch(t){r=e}}break;case"date":try{r=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"date"},!0)}catch(t){r=e}}break;case"time":try{r=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"time"},!0)}catch(t){r=e}}break;default:r=e}return r},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){if(e.isGlobalStyle)return this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length;var t=this.compareStyle(e);return t.result?t.index:(this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length)},e.prototype.processNumFormatId=function(e){if("GENERAL"!==e.numberFormat&&!this.mNumFmt.has(e.numberFormat)){var t=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new m(t,e.numberFormat))}},e.prototype.isNewFont=function(e){for(var t=!1,r=0,o=0,n=this.mFonts;o<n.length;o++){var i=n[o];r++;var s=void 0;if(void 0!==e.fontColor&&(s="FF"+e.fontColor.replace("#","")),t=i.color===s&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return r-=1,{index:r,result:t}},e.prototype.isNewBorder=function(e){var t=new o;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new o;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,r=0,o=0,n=this.mStyles;o<n.length;o++){var i=n[o];if(t=!i.isGlobalStyle&&(i.backColor===e.backColor&&i.bold===e.bold&&i.numFmtId===e.numFmtId&&i.numberFormat===e.numberFormat&&i.type===e.type&&i.fontColor===e.fontColor&&i.fontName===e.fontName&&i.fontSize===e.fontSize&&i.hAlign===e.hAlign&&i.italic===e.italic&&i.underline===e.underline&&i.vAlign===e.vAlign&&i.indent===e.indent&&i.rotation===e.rotation&&i.wrapText===e.wrapText&&i.borders.all.color===e.borders.all.color&&i.borders.all.lineStyle===e.borders.all.lineStyle&&i.borders.left.color===e.borders.left.color&&i.borders.left.lineStyle===e.borders.left.lineStyle&&i.borders.right.color===e.borders.right.color&&i.borders.right.lineStyle===e.borders.right.lineStyle&&i.borders.top.color===e.borders.top.color&&i.borders.top.lineStyle===e.borders.top.lineStyle&&i.borders.bottom.color===e.borders.bottom.color&&i.borders.bottom.lineStyle===e.borders.bottom.lineStyle)){r=i.index;break}}return{index:r,result:t}},e.prototype.contains=function(e,t){var r=e.indexOf(t);return r>-1&&r<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,r=e.type,o=e.value;switch(r){case"datetime":if(o=this.toOADate(o),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":o=o?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var i=this.processCellValue(o,e);this.contains(this.sharedString,i)||this.sharedString.push(i),o=this.sharedString.indexOf(i)}e.saveType=t,e.value=o},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,r){var o={};o.blobData=t.csvHelper.saveAsBlob(),e(o)});default:return new Promise(function(e,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var r={};r.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(r)})})}},e.prototype.save=function(e,t){var r=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),n=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){r.mArchive.destroy()});else{if(null===n||n[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveInternal=function(){this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation()},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",r=this.worksheets.length,o=0;o<r;o++)t+='<sheet name="'+this.worksheets[o].name+'" sheetId="'+(o+1).toString()+'" r:id ="rId'+(o+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),e+=n+="</definedNames>"}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new P,n='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?n+="<sheetPr />":n+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',n+=this.saveSheetView(e),void 0!==e.columns){for(var i="<cols>",s=0,l=e.columns;s<l.length;s++){var a=l[s];void 0!==a.width?i+='<col min="'+a.index+'" max="'+a.index+'" width="'+this.pixelsToColumnWidth(a.width)+'" customWidth="1" />':i+='<col min="'+a.index+'" max="'+a.index+'" width="8.43" customWidth="1" />'}n+=i+"</cols>"}if(n+="<sheetData>",o.append(n),n="",void 0!==e.rows)for(var m=0,h=e.rows;m<h.length;m++){var d=h[m],p='<row r="'+d.index+'" ';r.isNullOrUndefined(d.spans)||(p+='spans="'+d.spans+'" '),void 0!==d.height&&(p+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(p+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(p+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(p+='collapsed="1" ')),p+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(p+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(p+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(p+='s="'+f.styleIndex+'" '),p+=" >",void 0!==f.formula&&(p+="<f>"+f.formula+"</f>"),void 0!==f.value?p+="<v>"+f.value+"</v></c>":p+="</c>")}p+="</row>",o.append(p)}if(n+="</sheetData>",e.mergeCells.length>0){n+='<mergeCells count="'+e.mergeCells.length+'">';for(var y=0,v=e.mergeCells;y<v.length;y++){n+='<mergeCell ref="'+v[y].ref+'" />'}n+="</mergeCells>"}if(e.hyperLinks.length>0){n+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];n+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}n+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}n+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(n),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=0,o=e.hyperLinks;r<o.length;r++){var n=o[r];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveSheetView=function(e){var t='<sheetViews><sheetView workbookViewId="0" ';return!1===e.showGridLines?t+='showGridLines="0" >':t+=">",void 0!==e.freezePanes&&(t+='<pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ',0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/>"),t+="</sheetView></sheetViews > "},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',r="",o=0;o<e;o++)this.sharedString[o].startsWith("<r>")?(r+="<si>",r+=this.sharedString[o],r+="</si>"):(r+="<si><t>",r+=this.processString(this.sharedString[o]),r+="</t></si>");r+="</sst>",this.addToArchive(t+r,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&amp;")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"&lt;")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,"&gt;")),e},e.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.updateCellXfsStyleXfs=function(){for(var e=0,t=this.mStyles;e<t.length;e++){var r=t[e],o=void 0;r.isGlobalStyle?(o=new l).xfId=r.index-1:(o=new i).xfId=0;var a=this.isNewFont(r);if(a.result)o.fontId=a.index;else{var h=new n;h.b=r.bold,h.i=r.italic,h.name=r.fontName,h.sz=r.fontSize,h.u=r.underline,h.color="FF"+r.fontColor.replace("#",""),this.mFonts.push(h),o.fontId=this.mFonts.length-1}if("none"!==r.backColor){var d="FF"+r.backColor.replace("#","");if(this.mFills.has(d)){var p=this.mFills.get(d);o.fillId=p}else{p=this.mFills.size+2;this.mFills.set(d,p),o.fillId=p}}else o.fillId=0;if(this.isNewBorder(r)?o.borderId=0:(this.mBorders.push(r.borders),o.borderId=this.mBorders.length),"GENERAL"!==r.numberFormat)if(this.mNumFmt.has(r.numberFormat)){var u=this.mNumFmt.get(r.numberFormat);o.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(r.numberFormat,new m(c,r.numberFormat)),o.numFmtId=c}else"GENERAL"===r.numberFormat&&14===r.numFmtId?o.numFmtId=14:o.numFmtId=0;r.isGlobalStyle||(o.applyAlignment=1),o.alignment=new s,o.alignment.indent=r.indent,o.alignment.horizontal=r.hAlign,o.alignment.vertical=r.vAlign,o.alignment.wrapText=r.wrapText?1:0,o.alignment.rotation=r.rotation,r.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellXfs.push(o)):this.mCellXfs.push(o)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,r){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,"&quot;")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,r=this.mFonts;t<r.length;t++){var o=r[t];e+="<font>",o.b&&(e+="<b />"),o.i&&(e+="<i />"),o.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(o.sz)+'" />',e+='<color rgb="'+o.color+'" />',e+='<name val="'+o.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,r){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+r+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,r=this.mBorders;t<r.length;t++){var o=r[t];if(this.isAllBorder(o)){var n=o.all.color.replace("#",""),i=o.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+o.left.lineStyle+'"><color rgb="FF'+o.left.color.replace("#","")+'" /></left><right style="'+o.right.lineStyle+'"><color rgb="FF'+o.right.color.replace("#","")+'" /></right><top style="'+o.top.lineStyle+'"><color rgb="FF'+o.top.color.replace("#","")+'" /></top><bottom style="'+o.bottom.lineStyle+'"><color rgb="FF'+o.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(r,o){t+='<cellStyle name="'+o+'" xfId="'+e.cellStyles.get(o).xfId+'"',"Normal"===o&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,r=this.mCellStyleXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" ',void 0!==o.alignment?e+=">"+this.saveAlignment(o)+"</xf>":e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,r=this.mCellXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" xfId="'+o.xfId+'" ',1===o.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(o)+"</xf>"}return e+"</cellXfs>"},e.prototype.saveAlignment=function(e){var t="<alignment ";return void 0!==e.alignment.horizontal&&(t+='horizontal="'+e.alignment.horizontal+'" '),void 0!==e.alignment.indent&&0!==e.alignment.indent?t+='indent="'+e.alignment.indent+'" ':void 0!==e.alignment.rotation&&0!==e.alignment.rotation&&(t+='textRotation="'+e.alignment.rotation+'" '),void 0!==e.alignment.vertical&&(t+='vertical="'+e.alignment.vertical+'" '),t+='wrapText="'+e.alignment.wrapText+'" />'},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(r+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(r+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(r+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(r+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(r+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(r+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(r+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),r+="</cp:coreProperties>",this.addToArchive(r,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,r=0,o=0;o<t;o++,r++)e+='<Relationship Id="rId'+(o+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(o+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",r=this.worksheets.length,o=0;o<r;o++)t+='<Override PartName="/xl/worksheets/sheet'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,r){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(o,r);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,r);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,r){if(0!==e.rowSpan||0!==e.colSpan){var o=new I;o.x=e.index,o.width=e.colSpan,o.y=t,o.height=e.rowSpan;var n=this.getCellName(o.y,o.x),i=this.getCellName(t+o.height,e.index+o.width);o.ref=n+":"+i;r.add(o);var s={x:o.x,y:o.y},l={x:e.index+o.width,y:t+o.height};this.updatedMergedCellStyles(s,l,e)}return r},e.prototype.updatedMergedCellStyles=function(e,t,r){for(var o=e.x;o<=t.x;o++)for(var n=e.y;n<=t.y;n++)this.mergedCellsStyle.set(this.getCellName(n,o),{x:o,y:n,styleIndex:r.styleIndex})},e.prototype.dateToTicks=function(e,t,r){if(e>=1&&e<=9999&&t>=1&&t<=12){var o=e-1;return 864e9*(365*o+(o/4|0)-(o/100|0)+(o/400|0)+(this.isLeapYear(e)?[0,31,60,91,121,152,182,213,244,274,305,335,366]:[0,31,59,90,120,151,181,212,243,273,304,334,365])[t-1]+r-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,r){if(e>=0&&e<24&&t>=0&&t<60&&r>=0&&r<60){return 1e4*(3600*e+60*t+r)*1e3}throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}(),B=function(){return function(){}}();e.CellStyle=o,e.Font=n,e.CellXfs=i,e.Alignment=s,e.CellStyleXfs=l,e.CellStyles=a,e.NumFmt=m,e.Border=h,e.Borders=d,e.Cell=u,e.Cells=c,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=R,e.BuiltInProperties=B,e.Worksheet=w,e.HyperLink=S,e.Grouping=C,e.FreezePane=k,e.MergeCell=I,e.MergeCells=T,e.Worksheets=x,e.CsvHelper=A,e.ValueFormatter=N,e.BlobHelper=P,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-excel-export.umd.min.js.map
/*!
* filename: ej2-excel-export.min.js
* version : 17.1.50
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.excelexport=function(e,t,r){"use strict";var o=function(){function e(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.indent=0,this.rotation=0,this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}return e}(),n=function(){function e(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}return e}(),i=function(){function e(){}return e}(),l=function(){function e(){}return e}(),s=function(){function e(){}return e}(),a=function(){function e(){this.name="Normal",this.xfId=0}return e}(),m=function(){function e(e,t){this.numFmtId=e,this.formatCode=t}return e}(),h=function(){function e(e,t){this.lineStyle=e,this.color=t}return e}(),d=function(){function e(){this.left=new h("none","#FFFFFF"),this.right=new h("none","#FFFFFF"),this.top=new h("none","#FFFFFF"),this.bottom=new h("none","#FFFFFF"),this.all=new h("none","#FFFFFF")}return e}(),p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){function e(){}return e}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++)i[n].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return p(t,e),t}(Array),f=function(){function e(){}return e}(),y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),v=function(){function e(){}return e}(),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++)i[n].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(){function e(){this.isSummaryRowBelow=!0,this.showGridLines=!0}return e}(),S=function(){function e(){}return e}(),C=function(){function e(){}return e}(),I=function(){function e(){}return e}(),k=function(){function e(){}return e}(),T=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.add=function(e){for(var o=!1,n=0,i=0,l=r;i<l.length;i++){var s=l[i];if(t.isIntersecting(s,e)){var a=new k;a.x=Math.min(s.x,e.x),a.y=Math.min(s.Y,e.y),a.width=Math.max(s.Width+s.X,e.width+e.x),a.height=Math.max(s.Height+s.Y,e.height+e.y),a.ref=r[n].ref.split(":")[0]+":"+e.ref.split(":")[1],r[n]=a,e=a,o=!0}n++}return o||r.push(e),e},r}return F(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array),N=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var o=e;return r.isNullOrUndefined(t)||r.isNullOrUndefined(e)||(o=t(e)),o},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}(),A=function(){function e(e){if(this.csvStr="",this.formatter=new N,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,r=0,o=e;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,r=0,o=e.cells;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;if(void 0!==e.value)if(e.value instanceof Date)if(void 0!==e.style&&void 0!==e.style.numberFormat)try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:e.style.numberFormat}))}else if(void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name))try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:this.globalStyles.get(e.style.name)}))}else t+=e.value;else"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value);this.csvStr=t},e.prototype.parseCellValue=function(e){return-1!==e.indexOf(",")||-1!==e.indexOf("\n")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),r=document.createElementNS("http://www.w3.org/1999/xhtml","a");r.download=e,r.href=t;var o=document.createEvent("MouseEvent");o.initEvent("click",!0,!0),r.dispatchEvent(o),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},e}(),P=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}(),R=function(){function e(e,i,l,s){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==l?l:"en-US",this.currency=void 0!==s?s:"USD",this.intl=new r.Internationalization(this.culture),this.mSaveType=i,"xlsx"===i){if(this.mArchive=new t.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new o),this.mFonts.push(new n),this.cellStyles.set("Normal",new a),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var m=0;m<e.styles.length;m++)if(void 0!==e.styles[m].name){if(this.cellStyles.has(e.styles[m].name))throw Error("Style name "+e.styles[m].name+" is already existed");var h=new o;h.isGlobalStyle=!0,this.parserCellStyle(e.styles[m],h,"none");var d=new a;d.name=h.name,d.xfId=h.index-1,this.cellStyles.set(d.name,d);var p={};void 0!==e.styles[m].numberFormat&&(p.format=e.styles[m].numberFormat),void 0!==e.styles[m].type?p.type=e.styles[m].type:p.type="datetime",void 0!==p.format&&this.globalStyles.set(e.styles[m].name,p)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new B,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new A(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new x;for(var t=e.length,r=0;r<t;r++){var o=e[r],n=new w;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==o.name&&void 0!==o.name?n.name=o.name:n.name="Sheet"+(r+1).toString(),n.index=r+1,null!==o.columns&&void 0!==o.columns&&this.parserColumns(o.columns,n),null!==o.rows&&void 0!==o.rows&&this.parserRows(o.rows,n),null!==o.showGridLines&&void 0!==o.showGridLines&&(n.showGridLines=o.showGridLines),null!==o.freeze&&void 0!==o.freeze&&this.parserFreezePanes(o.freeze,n),null!==o.printTitle&&void 0!==o.printTitle&&this.parserPrintTitle(o.printTitle,n),void 0!==o.pageSetup&&void 0!==o.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=o.pageSetup.isSummaryRowBelow),n.index=r+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var r={};return this.applyProperties(e,r),this.applyProperties(t,r),r},e.prototype.applyProperties=function(e,t){for(var r=Object.keys(e),o=0;o<r.length;o++)"name"!==r[o]&&(t[r[o]]=e[r[o]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var r=e%26;e=e/26-1,t=String.fromCharCode(65+r)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var r,o="";if(null!==e.fromRow&&void 0!==e.fromRow){r="$"+e.fromRow+":$"+(null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow)}var n;if(null!==e.fromColumn&&void 0!==e.fromColumn){var i=e.fromColumn,l=void 0;l=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,n="$"+this.getColumnName(i)+":$"+this.getColumnName(l)}void 0!==r&&(o+=t.name+"!"+r),void 0!==n&&void 0!==r?o+=","+t.name+"!"+n:void 0!==n&&(o+=t.name+"!"+n),""!==o&&this.printTitles.set(t.index-1,o)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new I,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var r=e.length;t.columns=[];for(var o=0;o<r;o++){var n=new f;if(null===e[o].index||void 0===e[o].index)throw Error("Column index is missing.");n.index=e[o].index,null!==e[o].width&&void 0!==e[o].width&&(n.width=e[o].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var r=e.length;t.rows=new g;for(var o=0,n=0;n<r;n++){var i=this.parserRow(e[n],o);o=i.index,t.rows.add(i)}this.insertMergedCellsStyle(t)},e.prototype.insertMergedCellsStyle=function(e){var t=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(o,n){var i=e.rows.filter(function(e){return e.index===o.y})[0];if(r.isNullOrUndefined(i)){var l=e.rows.filter(function(e){return e.index<=o.y}),s=new v;s.index=o.y,s.cells=new c,s.cells.add(t.createCell(o,n));h=0;l.length>0&&(h=e.rows.indexOf(l[l.length-1])+1),e.rows.splice(h,0,s)}else{var a=i.cells.filter(function(e){return e.index===o.x})[0];if(r.isNullOrUndefined(a)){var m=i.cells.filter(function(e){return e.index<=o.x}),h=0;m.length>0&&(h=i.cells.indexOf(m[m.length-1])+1),i.cells.splice(h,0,t.createCell(o,n))}else a.styleIndex=o.styleIndex}})},e.prototype.createCell=function(e,t){var r=new u;return r.refName=t,r.index=e.x,r.cellStyle=new o,r.styleIndex=e.styleIndex,r},e.prototype.parserRow=function(e,t){var r=new v;if(null!==e.height&&void 0!==e.height&&(r.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return r.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,r),this.parseCells(e.cells,r),r},e.prototype.parseGrouping=function(e,t){t.grouping=new C,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new c;for(var r=void 0!==e?e.length:0,n=1,i=1,l=0;l<r;l++){var s=e[l],a=new u;if(null===s.index||void 0===s.index)throw Error("Cell index is missing.");if(a.index=s.index,a.index<n?n=a.index:a.index>i&&(i=a.index),a.refName=this.getCellName(t.index,a.index),null!==s.rowSpan&&void 0!==s.rowSpan?a.rowSpan=s.rowSpan-1:a.rowSpan=0,null!==s.colSpan&&void 0!==s.colSpan?a.colSpan=s.colSpan-1:a.colSpan=0,null!==s.hyperlink&&void 0!==s.hyperlink){var m=new S;void 0!==s.hyperlink.target&&(m.target=s.hyperlink.target,void 0!==s.hyperlink.displayText?a.value=s.hyperlink.displayText:a.value=s.hyperlink.target,a.type=this.getCellValueType(a.value),m.ref=a.refName,m.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(m),a.cellStyle=new o,this.parserCellStyle(void 0!==s.style?this.mergeOptions(s.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==s.formula&&void 0!==s.formula&&(a.formula=s.formula,a.type="formula"),null!==s.value&&void 0!==s.value&&(void 0!==a.formula?a.value=0:(a.value=s.value,a.type=this.getCellValueType(a.value))),null!==s.style&&void 0!==s.style&&void 0===a.styleIndex?(a.cellStyle=new o,a.value instanceof Date?this.parserCellStyle(s.style,a.cellStyle,a.type,14):this.parserCellStyle(s.style,a.cellStyle,a.type),a.styleIndex=a.cellStyle.index):a.value instanceof Date&&(a.cellStyle=new o,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),t.cells.add(a)}t.spans=n+":"+i},e.prototype.GetColors=function(){var e;return(e=new Map).set("WHITE","FFFFFFFF"),e.set("SILVER","FFC0C0C0"),e.set("GRAY","FF808080"),e.set("BLACK","FF000000"),e.set("RED","FFFF0000"),e.set("MAROON","FF800000"),e.set("YELLOW","FFFFFF00"),e.set("OLIVE","FF808000"),e.set("LIME","FF00FF00"),e.set("GREEN","FF008000"),e.set("AQUA","FF00FFFF"),e.set("TEAL","FF008080"),e.set("BLUE","FF0000FF"),e.set("NAVY","FF000080"),e.set("FUCHSIA","FFFF00FF"),e.set("PURPLE","FF800080"),e},e.prototype.processColor=function(e){return e.startsWith("#")?e.replace("#","FF"):(e=e.toUpperCase(),this.rgbColors=this.GetColors(),e=this.rgbColors.has(e)?this.rgbColors.get(e):"FF000000")},e.prototype.processCellValue=function(e){var t=e,r="",o=e.indexOf("<",0);if(o>=0){0!==o&&(r+='<r><t xml:space="preserve">'+e.substring(0,o)+"</t></r>");for(var n=e.indexOf(">",o+1);o>=0&&n>=0;)if((n=e.indexOf(">",o+1))>=0){var i=e.substring(o+1,n).split(" ");if(i.length>0&&(r+="<r><rPr>"),i.length>1)for(var l=0,s=i;l<s.length;l++){var a=s[l];a.trim().startsWith("size=")?r+='<sz val="'+a.substring(6,a.length-1)+'"/>':a.trim().startsWith("face=")?r+='<rFont val="'+a.substring(6,a.length-1)+'"/>':a.trim().startsWith("color=")&&(r+='<color rgb="'+this.processColor(a.substring(7,a.length-1))+'"/>')}else 1===i.length&&("b"===i[0].trim()?r+="<b/>":"i"===i[0].trim()?r+="<i/>":"u"===i[0].trim()&&(r+="<u/>"));(o=e.indexOf("<",n+1))<0&&(o=t.length),r+='</rPr><t xml:space="preserve">'+t.substring(n+1,o)+"</t></r>"}return""===r?t:r}return t},e.prototype.applyGlobalStyle=function(e,t){this.cellStyles.has(e.name)&&(t.index=this.mStyles.filter(function(t){return t.name===e.name})[0].index,t.name=e.name)},e.prototype.parserCellStyle=function(e,t,r,o){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new d,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign.toLowerCase()),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign.toLowerCase()),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,r):void 0!==o?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var r=this.getNumberFormat(e,t);if(r!==e){var o=this.mNumFmt.get(e);if(void 0!==o&&(o.formatCode=r,this.mNumFmt.has(r))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var l=i[n];l.numFmtId===o.numFmtId&&(l.numFmtId=this.mNumFmt.get(r).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var m=a[s];m.numFmtId===o.numFmtId&&(m.numFmtId=this.mNumFmt.get(r).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var r;switch(t){case"number":try{r=this.intl.getNumberPattern({format:e,currency:this.currency})}catch(t){r=e}break;case"datetime":try{r=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"dateTime"},!0)}catch(t){r=e}}break;case"date":try{r=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"date"},!0)}catch(t){r=e}}break;case"time":try{r=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"time"},!0)}catch(t){r=e}}break;default:r=e}return r},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){if(e.isGlobalStyle)return this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length;var t=this.compareStyle(e);return t.result?t.index:(this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length)},e.prototype.processNumFormatId=function(e){if("GENERAL"!==e.numberFormat&&!this.mNumFmt.has(e.numberFormat)){var t=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new m(t,e.numberFormat))}},e.prototype.isNewFont=function(e){for(var t=!1,r=0,o=0,n=this.mFonts;o<n.length;o++){var i=n[o];r++;var l=void 0;if(void 0!==e.fontColor&&(l="FF"+e.fontColor.replace("#","")),t=i.color===l&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return r-=1,{index:r,result:t}},e.prototype.isNewBorder=function(e){var t=new o;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new o;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,r=0,o=0,n=this.mStyles;o<n.length;o++){var i=n[o];if(t=!i.isGlobalStyle&&(i.backColor===e.backColor&&i.bold===e.bold&&i.numFmtId===e.numFmtId&&i.numberFormat===e.numberFormat&&i.type===e.type&&i.fontColor===e.fontColor&&i.fontName===e.fontName&&i.fontSize===e.fontSize&&i.hAlign===e.hAlign&&i.italic===e.italic&&i.underline===e.underline&&i.vAlign===e.vAlign&&i.indent===e.indent&&i.rotation===e.rotation&&i.wrapText===e.wrapText&&i.borders.all.color===e.borders.all.color&&i.borders.all.lineStyle===e.borders.all.lineStyle&&i.borders.left.color===e.borders.left.color&&i.borders.left.lineStyle===e.borders.left.lineStyle&&i.borders.right.color===e.borders.right.color&&i.borders.right.lineStyle===e.borders.right.lineStyle&&i.borders.top.color===e.borders.top.color&&i.borders.top.lineStyle===e.borders.top.lineStyle&&i.borders.bottom.color===e.borders.bottom.color&&i.borders.bottom.lineStyle===e.borders.bottom.lineStyle)){r=i.index;break}}return{index:r,result:t}},e.prototype.contains=function(e,t){var r=e.indexOf(t);return r>-1&&r<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,r=e.type,o=e.value;switch(r){case"datetime":if(o=this.toOADate(o),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":o=o?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var i=this.processCellValue(o);this.contains(this.sharedString,i)||this.sharedString.push(i),o=this.sharedString.indexOf(i)}e.saveType=t,e.value=o},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,r){var o={};o.blobData=t.csvHelper.saveAsBlob(),e(o)});default:return new Promise(function(e,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var r={};r.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(r)})})}},e.prototype.save=function(e,t){var r=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),n=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){r.mArchive.destroy()});else{if(null===n||n[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveInternal=function(){this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation()},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",r=this.worksheets.length,o=0;o<r;o++)t+='<sheet name="'+this.worksheets[o].name+'" sheetId="'+(o+1).toString()+'" r:id ="rId'+(o+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),e+=n+="</definedNames>"}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new P,n='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?n+="<sheetPr />":n+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',n+=this.saveSheetView(e),void 0!==e.columns){for(var i="<cols>",l=0,s=e.columns;l<s.length;l++){var a=s[l];void 0!==a.width?i+='<col min="'+a.index+'" max="'+a.index+'" width="'+this.pixelsToColumnWidth(a.width)+'" customWidth="1" />':i+='<col min="'+a.index+'" max="'+a.index+'" width="8.43" customWidth="1" />'}n+=i+"</cols>"}if(n+="<sheetData>",o.append(n),n="",void 0!==e.rows)for(var m=0,h=e.rows;m<h.length;m++){var d=h[m],p='<row r="'+d.index+'" ';r.isNullOrUndefined(d.spans)||(p+='spans="'+d.spans+'" '),void 0!==d.height&&(p+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(p+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(p+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(p+='collapsed="1" ')),p+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(p+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(p+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(p+='s="'+f.styleIndex+'" '),p+=" >",void 0!==f.formula&&(p+="<f>"+f.formula+"</f>"),void 0!==f.value?p+="<v>"+f.value+"</v></c>":p+="</c>")}p+="</row>",o.append(p)}if(n+="</sheetData>",e.mergeCells.length>0){n+='<mergeCells count="'+e.mergeCells.length+'">';for(var y=0,v=e.mergeCells;y<v.length;y++)n+='<mergeCell ref="'+v[y].ref+'" />';n+="</mergeCells>"}if(e.hyperLinks.length>0){n+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];n+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}n+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}n+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(n),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=0,o=e.hyperLinks;r<o.length;r++){var n=o[r];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveSheetView=function(e){var t='<sheetViews><sheetView workbookViewId="0" ';return!1===e.showGridLines?t+='showGridLines="0" >':t+=">",void 0!==e.freezePanes&&(t+='<pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ',0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/>"),t+="</sheetView></sheetViews > "},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',r="",o=0;o<e;o++)this.sharedString[o].startsWith("<r>")?(r+="<si>",r+=this.sharedString[o],r+="</si>"):(r+="<si><t>",r+=this.processString(this.sharedString[o]),r+="</t></si>");r+="</sst>",this.addToArchive(t+r,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&amp;")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"&lt;")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,"&gt;")),e},e.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.updateCellXfsStyleXfs=function(){for(var e=0,t=this.mStyles;e<t.length;e++){var r=t[e],o=void 0;r.isGlobalStyle?(o=new s).xfId=r.index-1:(o=new i).xfId=0;var a=this.isNewFont(r);if(a.result)o.fontId=a.index;else{var h=new n;h.b=r.bold,h.i=r.italic,h.name=r.fontName,h.sz=r.fontSize,h.u=r.underline,h.color="FF"+r.fontColor.replace("#",""),this.mFonts.push(h),o.fontId=this.mFonts.length-1}if("none"!==r.backColor){var d="FF"+r.backColor.replace("#","");if(this.mFills.has(d)){p=this.mFills.get(d);o.fillId=p}else{var p=this.mFills.size+2;this.mFills.set(d,p),o.fillId=p}}else o.fillId=0;if(this.isNewBorder(r)?o.borderId=0:(this.mBorders.push(r.borders),o.borderId=this.mBorders.length),"GENERAL"!==r.numberFormat)if(this.mNumFmt.has(r.numberFormat)){var u=this.mNumFmt.get(r.numberFormat);o.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(r.numberFormat,new m(c,r.numberFormat)),o.numFmtId=c}else"GENERAL"===r.numberFormat&&14===r.numFmtId?o.numFmtId=14:o.numFmtId=0;r.isGlobalStyle||(o.applyAlignment=1),o.alignment=new l,o.alignment.indent=r.indent,o.alignment.horizontal=r.hAlign,o.alignment.vertical=r.vAlign,o.alignment.wrapText=r.wrapText?1:0,o.alignment.rotation=r.rotation,r.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellXfs.push(o)):this.mCellXfs.push(o)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,r){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,"&quot;")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,r=this.mFonts;t<r.length;t++){var o=r[t];e+="<font>",o.b&&(e+="<b />"),o.i&&(e+="<i />"),o.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(o.sz)+'" />',e+='<color rgb="'+o.color+'" />',e+='<name val="'+o.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,r){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+r+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,r=this.mBorders;t<r.length;t++){var o=r[t];if(this.isAllBorder(o)){var n=o.all.color.replace("#",""),i=o.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+o.left.lineStyle+'"><color rgb="FF'+o.left.color.replace("#","")+'" /></left><right style="'+o.right.lineStyle+'"><color rgb="FF'+o.right.color.replace("#","")+'" /></right><top style="'+o.top.lineStyle+'"><color rgb="FF'+o.top.color.replace("#","")+'" /></top><bottom style="'+o.bottom.lineStyle+'"><color rgb="FF'+o.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(r,o){t+='<cellStyle name="'+o+'" xfId="'+e.cellStyles.get(o).xfId+'"',"Normal"===o&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,r=this.mCellStyleXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" ',void 0!==o.alignment?e+=">"+this.saveAlignment(o)+"</xf>":e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,r=this.mCellXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" xfId="'+o.xfId+'" ',1===o.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(o)+"</xf>"}return e+"</cellXfs>"},e.prototype.saveAlignment=function(e){var t="<alignment ";return void 0!==e.alignment.horizontal&&(t+='horizontal="'+e.alignment.horizontal+'" '),void 0!==e.alignment.indent&&0!==e.alignment.indent?t+='indent="'+e.alignment.indent+'" ':void 0!==e.alignment.rotation&&0!==e.alignment.rotation&&(t+='textRotation="'+e.alignment.rotation+'" '),void 0!==e.alignment.vertical&&(t+='vertical="'+e.alignment.vertical+'" '),t+='wrapText="'+e.alignment.wrapText+'" />'},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(r+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(r+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(r+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(r+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(r+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(r+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(r+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),r+="</cp:coreProperties>",this.addToArchive(r,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,r=0,o=0;o<t;o++,r++)e+='<Relationship Id="rId'+(o+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(o+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",r=this.worksheets.length,o=0;o<r;o++)t+='<Override PartName="/xl/worksheets/sheet'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,r){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(o,r);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,r);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,r){if(0!==e.rowSpan||0!==e.colSpan){var o=new k;o.x=e.index,o.width=e.colSpan,o.y=t,o.height=e.rowSpan;var n=this.getCellName(o.y,o.x),i=this.getCellName(t+o.height,e.index+o.width);o.ref=n+":"+i;r.add(o);var l={x:o.x,y:o.y},s={x:e.index+o.width,y:t+o.height};this.updatedMergedCellStyles(l,s,e)}return r},e.prototype.updatedMergedCellStyles=function(e,t,r){for(var o=e.x;o<=t.x;o++)for(var n=e.y;n<=t.y;n++)this.mergedCellsStyle.set(this.getCellName(n,o),{x:o,y:n,styleIndex:r.styleIndex})},e.prototype.dateToTicks=function(e,t,r){var o=[0,31,59,90,120,151,181,212,243,273,304,334,365],n=[0,31,60,91,121,152,182,213,244,274,305,335,366];if(e>=1&&e<=9999&&t>=1&&t<=12){var i=e-1;return 864e9*(365*i+(i/4|0)-(i/100|0)+(i/400|0)+(this.isLeapYear(e)?n:o)[t-1]+r-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,r){if(e>=0&&e<24&&t>=0&&t<60&&r>=0&&r<60)return 1e4*(3600*e+60*t+r)*1e3;throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}(),B=function(){function e(){}return e}();return e.CellStyle=o,e.Font=n,e.CellXfs=i,e.Alignment=l,e.CellStyleXfs=s,e.CellStyles=a,e.NumFmt=m,e.Border=h,e.Borders=d,e.Cell=u,e.Cells=c,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=R,e.BuiltInProperties=B,e.Worksheet=w,e.HyperLink=S,e.Grouping=C,e.FreezePane=I,e.MergeCell=k,e.MergeCells=T,e.Worksheets=x,e.CsvHelper=A,e.ValueFormatter=N,e.BlobHelper=P,e}({},ej.compression,ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.excelexport=function(e,t,r){"use strict";var o=function(){function e(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.indent=0,this.rotation=0,this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}return e}(),n=function(){function e(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}return e}(),i=function(){function e(){}return e}(),s=function(){function e(){}return e}(),l=function(){function e(){}return e}(),a=function(){function e(){this.name="Normal",this.xfId=0}return e}(),h=function(){function e(e,t){this.numFmtId=e,this.formatCode=t}return e}(),m=function(){function e(e,t){this.lineStyle=e,this.color=t}return e}(),d=function(){function e(){this.left=new m("none","#FFFFFF"),this.right=new m("none","#FFFFFF"),this.top=new m("none","#FFFFFF"),this.bottom=new m("none","#FFFFFF"),this.all=new m("none","#FFFFFF")}return e}(),p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){function e(){}return e}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++)i[n].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return p(t,e),t}(Array),f=function(){function e(){}return e}(),y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),v=function(){function e(){}return e}(),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,n=0,i=t;n<i.length;n++)i[n].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(){function e(){this.isSummaryRowBelow=!0,this.showGridLines=!0}return e}(),S=function(){function e(){}return e}(),C=function(){function e(){}return e}(),k=function(){function e(){}return e}(),I=function(){function e(){}return e}(),T=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.add=function(e){for(var o=!1,n=0,i=0,s=r;i<s.length;i++){var l=s[i];if(t.isIntersecting(l,e)){var a=new I;a.x=Math.min(l.x,e.x),a.y=Math.min(l.Y,e.y),a.width=Math.max(l.Width+l.X,e.width+e.x),a.height=Math.max(l.Height+l.Y,e.height+e.y),a.ref=r[n].ref.split(":")[0]+":"+e.ref.split(":")[1],r[n]=a,e=a,o=!0}n++}return o||r.push(e),e},r}return F(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array),N=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var o=e;return r.isNullOrUndefined(t)||r.isNullOrUndefined(e)||(o=t(e)),o},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}(),A=function(){function e(e){if(this.csvStr="",this.formatter=new N,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,r=0,o=e;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,r=0,o=e.cells;r<o.length;r++){var n=o[r];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;if(void 0!==e.value)if(e.value instanceof Date)if(void 0!==e.style&&void 0!==e.style.numberFormat)try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:e.style.numberFormat}))}else if(void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name))try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)}))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:this.globalStyles.get(e.style.name)}))}else t+=e.value;else"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value);this.csvStr=t},e.prototype.parseCellValue=function(e){for(var t="",r=e.length,o=0;o<r;o++)'"'===e[o]?t+=e[o].replace('"','""'):t+=e[o];return e=t,-1!==e.indexOf(",")||-1!==e.indexOf("\n")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),r=document.createElementNS("http://www.w3.org/1999/xhtml","a");r.download=e,r.href=t;var o=document.createEvent("MouseEvent");o.initEvent("click",!0,!0),r.dispatchEvent(o),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},e}(),P=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}(),R=function(){function e(e,i,s,l){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==s?s:"en-US",this.currency=void 0!==l?l:"USD",this.intl=new r.Internationalization(this.culture),this.mSaveType=i,"xlsx"===i){if(this.mArchive=new t.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new o),this.mFonts.push(new n),this.cellStyles.set("Normal",new a),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var h=0;h<e.styles.length;h++)if(void 0!==e.styles[h].name){if(this.cellStyles.has(e.styles[h].name))throw Error("Style name "+e.styles[h].name+" is already existed");var m=new o;m.isGlobalStyle=!0,this.parserCellStyle(e.styles[h],m,"none");var d=new a;d.name=m.name,d.xfId=m.index-1,this.cellStyles.set(d.name,d);var p={};void 0!==e.styles[h].numberFormat&&(p.format=e.styles[h].numberFormat),void 0!==e.styles[h].type?p.type=e.styles[h].type:p.type="datetime",void 0!==p.format&&this.globalStyles.set(e.styles[h].name,p)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new B,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new A(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new x;for(var t=e.length,r=0;r<t;r++){var o=e[r],n=new w;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==o.name&&void 0!==o.name?n.name=o.name:n.name="Sheet"+(r+1).toString(),n.index=r+1,null!==o.columns&&void 0!==o.columns&&this.parserColumns(o.columns,n),null!==o.rows&&void 0!==o.rows&&this.parserRows(o.rows,n),null!==o.showGridLines&&void 0!==o.showGridLines&&(n.showGridLines=o.showGridLines),null!==o.freeze&&void 0!==o.freeze&&this.parserFreezePanes(o.freeze,n),null!==o.printTitle&&void 0!==o.printTitle&&this.parserPrintTitle(o.printTitle,n),void 0!==o.pageSetup&&void 0!==o.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=o.pageSetup.isSummaryRowBelow),n.index=r+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var r={};return this.applyProperties(e,r),this.applyProperties(t,r),r},e.prototype.applyProperties=function(e,t){for(var r=Object.keys(e),o=0;o<r.length;o++)"name"!==r[o]&&(t[r[o]]=e[r[o]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var r=e%26;e=e/26-1,t=String.fromCharCode(65+r)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var r,o="";if(null!==e.fromRow&&void 0!==e.fromRow){r="$"+e.fromRow+":$"+(null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow)}var n;if(null!==e.fromColumn&&void 0!==e.fromColumn){var i=e.fromColumn,s=void 0;s=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,n="$"+this.getColumnName(i)+":$"+this.getColumnName(s)}void 0!==r&&(o+=t.name+"!"+r),void 0!==n&&void 0!==r?o+=","+t.name+"!"+n:void 0!==n&&(o+=t.name+"!"+n),""!==o&&this.printTitles.set(t.index-1,o)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new k,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var r=e.length;t.columns=[];for(var o=0;o<r;o++){var n=new f;if(null===e[o].index||void 0===e[o].index)throw Error("Column index is missing.");n.index=e[o].index,null!==e[o].width&&void 0!==e[o].width&&(n.width=e[o].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var r=e.length;t.rows=new g;for(var o=0,n=0;n<r;n++){var i=this.parserRow(e[n],o);o=i.index,t.rows.add(i)}this.insertMergedCellsStyle(t)},e.prototype.insertMergedCellsStyle=function(e){var t=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(o,n){var i=e.rows.filter(function(e){return e.index===o.y})[0];if(r.isNullOrUndefined(i)){var s=e.rows.filter(function(e){return e.index<=o.y}),l=new v;l.index=o.y,l.cells=new c,l.cells.add(t.createCell(o,n));m=0;s.length>0&&(m=e.rows.indexOf(s[s.length-1])+1),e.rows.splice(m,0,l)}else{var a=i.cells.filter(function(e){return e.index===o.x})[0];if(r.isNullOrUndefined(a)){var h=i.cells.filter(function(e){return e.index<=o.x}),m=0;h.length>0&&(m=i.cells.indexOf(h[h.length-1])+1),i.cells.splice(m,0,t.createCell(o,n))}else a.styleIndex=o.styleIndex}})},e.prototype.createCell=function(e,t){var r=new u;return r.refName=t,r.index=e.x,r.cellStyle=new o,r.styleIndex=e.styleIndex,r},e.prototype.parserRow=function(e,t){var r=new v;if(null!==e.height&&void 0!==e.height&&(r.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return r.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,r),this.parseCells(e.cells,r),r},e.prototype.parseGrouping=function(e,t){t.grouping=new C,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new c;for(var r=void 0!==e?e.length:0,n=1,i=1,s=0;s<r;s++){var l=e[s],a=new u;if(null===l.index||void 0===l.index)throw Error("Cell index is missing.");if(a.index=l.index,a.index<n?n=a.index:a.index>i&&(i=a.index),a.refName=this.getCellName(t.index,a.index),null!==l.rowSpan&&void 0!==l.rowSpan?a.rowSpan=l.rowSpan-1:a.rowSpan=0,null!==l.colSpan&&void 0!==l.colSpan?a.colSpan=l.colSpan-1:a.colSpan=0,null!==l.hyperlink&&void 0!==l.hyperlink){var h=new S;void 0!==l.hyperlink.target&&(h.target=l.hyperlink.target,void 0!==l.hyperlink.displayText?a.value=l.hyperlink.displayText:a.value=l.hyperlink.target,a.type=this.getCellValueType(a.value),h.ref=a.refName,h.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(h),a.cellStyle=new o,this.parserCellStyle(void 0!==l.style?this.mergeOptions(l.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==l.formula&&void 0!==l.formula&&(a.formula=l.formula,a.type="formula"),null!==l.value&&void 0!==l.value&&(void 0!==a.formula?a.value=0:(a.value=l.value,a.type=this.getCellValueType(a.value))),null!==l.style&&void 0!==l.style&&void 0===a.styleIndex?(a.cellStyle=new o,a.value instanceof Date?this.parserCellStyle(l.style,a.cellStyle,a.type,14):this.parserCellStyle(l.style,a.cellStyle,a.type),a.styleIndex=a.cellStyle.index):a.value instanceof Date&&(a.cellStyle=new o,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),t.cells.add(a)}t.spans=n+":"+i},e.prototype.GetColors=function(){var e;return(e=new Map).set("WHITE","FFFFFFFF"),e.set("SILVER","FFC0C0C0"),e.set("GRAY","FF808080"),e.set("BLACK","FF000000"),e.set("RED","FFFF0000"),e.set("MAROON","FF800000"),e.set("YELLOW","FFFFFF00"),e.set("OLIVE","FF808000"),e.set("LIME","FF00FF00"),e.set("GREEN","FF008000"),e.set("AQUA","FF00FFFF"),e.set("TEAL","FF008080"),e.set("BLUE","FF0000FF"),e.set("NAVY","FF000080"),e.set("FUCHSIA","FFFF00FF"),e.set("PURPLE","FF800080"),e},e.prototype.processColor=function(e){return e.startsWith("#")?e.replace("#","FF"):(e=e.toUpperCase(),this.rgbColors=this.GetColors(),e=this.rgbColors.has(e)?this.rgbColors.get(e):"FF000000")},e.prototype.processCellValue=function(e,t){var r=e,o="",n=e.indexOf("<",0);if(n>=0){0!==n&&(o+='<r><t xml:space="preserve">'+e.substring(0,n)+"</t></r>");for(var i=e.indexOf(">",n+1);n>=0&&i>=0;)if((i=e.indexOf(">",n+1))>=0){var s=e.substring(n+1,i);(n=e.indexOf("<",i+1))<0&&(n=r.length);var l=r.substring(i+1,n);if(0!==l.length){var a=s.split(" ");if(a.length>0&&(o+="<r><rPr>"),a.length>1)for(var h=0,m=a;h<m.length;h++){var d=m[h];switch(d.trim().substring(0,5)){case"size=":o+='<sz val="'+d.substring(6,d.length-1)+'"/>';break;case"face=":o+='<rFont val="'+d.substring(6,d.length-1)+'"/>';break;case"color":o+='<color rgb="'+this.processColor(d.substring(7,d.length-1))+'"/>';break;case"href=":var p=new S;p.target=d.substring(6,d.length-1).trim(),p.ref=t.refName,p.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(p),o+='<color rgb="FF0000FF"/><u/><b/>'}}else if(1===a.length)switch(a[0].trim()){case"b":o+="<b/>";break;case"i":o+="<i/>";break;case"u":o+="<u/>"}o+='</rPr><t xml:space="preserve">'+l+"</t></r>"}}return""===o?r:o}return r},e.prototype.applyGlobalStyle=function(e,t){this.cellStyles.has(e.name)&&(t.index=this.mStyles.filter(function(t){return t.name===e.name})[0].index,t.name=e.name)},e.prototype.parserCellStyle=function(e,t,r,o){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new d,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign.toLowerCase()),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign.toLowerCase()),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,r):void 0!==o?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var r=this.getNumberFormat(e,t);if(r!==e){var o=this.mNumFmt.get(e);if(void 0!==o&&(o.formatCode=r,this.mNumFmt.has(r))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var s=i[n];s.numFmtId===o.numFmtId&&(s.numFmtId=this.mNumFmt.get(r).numFmtId)}for(var l=0,a=this.mCellXfs;l<a.length;l++){var h=a[l];h.numFmtId===o.numFmtId&&(h.numFmtId=this.mNumFmt.get(r).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var r;switch(t){case"number":try{r=this.intl.getNumberPattern({format:e,currency:this.currency})}catch(t){r=e}break;case"datetime":try{r=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"dateTime"},!0)}catch(t){r=e}}break;case"date":try{r=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"date"},!0)}catch(t){r=e}}break;case"time":try{r=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"time"},!0)}catch(t){r=e}}break;default:r=e}return r},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){if(e.isGlobalStyle)return this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length;var t=this.compareStyle(e);return t.result?t.index:(this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length)},e.prototype.processNumFormatId=function(e){if("GENERAL"!==e.numberFormat&&!this.mNumFmt.has(e.numberFormat)){var t=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new h(t,e.numberFormat))}},e.prototype.isNewFont=function(e){for(var t=!1,r=0,o=0,n=this.mFonts;o<n.length;o++){var i=n[o];r++;var s=void 0;if(void 0!==e.fontColor&&(s="FF"+e.fontColor.replace("#","")),t=i.color===s&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return r-=1,{index:r,result:t}},e.prototype.isNewBorder=function(e){var t=new o;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new o;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,r=0,o=0,n=this.mStyles;o<n.length;o++){var i=n[o];if(t=!i.isGlobalStyle&&(i.backColor===e.backColor&&i.bold===e.bold&&i.numFmtId===e.numFmtId&&i.numberFormat===e.numberFormat&&i.type===e.type&&i.fontColor===e.fontColor&&i.fontName===e.fontName&&i.fontSize===e.fontSize&&i.hAlign===e.hAlign&&i.italic===e.italic&&i.underline===e.underline&&i.vAlign===e.vAlign&&i.indent===e.indent&&i.rotation===e.rotation&&i.wrapText===e.wrapText&&i.borders.all.color===e.borders.all.color&&i.borders.all.lineStyle===e.borders.all.lineStyle&&i.borders.left.color===e.borders.left.color&&i.borders.left.lineStyle===e.borders.left.lineStyle&&i.borders.right.color===e.borders.right.color&&i.borders.right.lineStyle===e.borders.right.lineStyle&&i.borders.top.color===e.borders.top.color&&i.borders.top.lineStyle===e.borders.top.lineStyle&&i.borders.bottom.color===e.borders.bottom.color&&i.borders.bottom.lineStyle===e.borders.bottom.lineStyle)){r=i.index;break}}return{index:r,result:t}},e.prototype.contains=function(e,t){var r=e.indexOf(t);return r>-1&&r<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,r=e.type,o=e.value;switch(r){case"datetime":if(o=this.toOADate(o),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":o=o?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var i=this.processCellValue(o,e);this.contains(this.sharedString,i)||this.sharedString.push(i),o=this.sharedString.indexOf(i)}e.saveType=t,e.value=o},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,r){var o={};o.blobData=t.csvHelper.saveAsBlob(),e(o)});default:return new Promise(function(e,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var r={};r.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(r)})})}},e.prototype.save=function(e,t){var r=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),n=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){r.mArchive.destroy()});else{if(null===n||n[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveInternal=function(){this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation()},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",r=this.worksheets.length,o=0;o<r;o++)t+='<sheet name="'+this.worksheets[o].name+'" sheetId="'+(o+1).toString()+'" r:id ="rId'+(o+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),e+=n+="</definedNames>"}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new P,n='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?n+="<sheetPr />":n+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',n+=this.saveSheetView(e),void 0!==e.columns){for(var i="<cols>",s=0,l=e.columns;s<l.length;s++){var a=l[s];void 0!==a.width?i+='<col min="'+a.index+'" max="'+a.index+'" width="'+this.pixelsToColumnWidth(a.width)+'" customWidth="1" />':i+='<col min="'+a.index+'" max="'+a.index+'" width="8.43" customWidth="1" />'}n+=i+"</cols>"}if(n+="<sheetData>",o.append(n),n="",void 0!==e.rows)for(var h=0,m=e.rows;h<m.length;h++){var d=m[h],p='<row r="'+d.index+'" ';r.isNullOrUndefined(d.spans)||(p+='spans="'+d.spans+'" '),void 0!==d.height&&(p+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(p+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(p+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(p+='collapsed="1" ')),p+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(p+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(p+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(p+='s="'+f.styleIndex+'" '),p+=" >",void 0!==f.formula&&(p+="<f>"+f.formula+"</f>"),void 0!==f.value?p+="<v>"+f.value+"</v></c>":p+="</c>")}p+="</row>",o.append(p)}if(n+="</sheetData>",e.mergeCells.length>0){n+='<mergeCells count="'+e.mergeCells.length+'">';for(var y=0,v=e.mergeCells;y<v.length;y++)n+='<mergeCell ref="'+v[y].ref+'" />';n+="</mergeCells>"}if(e.hyperLinks.length>0){n+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];n+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}n+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}n+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(n),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=0,o=e.hyperLinks;r<o.length;r++){var n=o[r];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveSheetView=function(e){var t='<sheetViews><sheetView workbookViewId="0" ';return!1===e.showGridLines?t+='showGridLines="0" >':t+=">",void 0!==e.freezePanes&&(t+='<pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ',0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/>"),t+="</sheetView></sheetViews > "},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',r="",o=0;o<e;o++)this.sharedString[o].startsWith("<r>")?(r+="<si>",r+=this.sharedString[o],r+="</si>"):(r+="<si><t>",r+=this.processString(this.sharedString[o]),r+="</t></si>");r+="</sst>",this.addToArchive(t+r,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&amp;")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"&lt;")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,"&gt;")),e},e.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.updateCellXfsStyleXfs=function(){for(var e=0,t=this.mStyles;e<t.length;e++){var r=t[e],o=void 0;r.isGlobalStyle?(o=new l).xfId=r.index-1:(o=new i).xfId=0;var a=this.isNewFont(r);if(a.result)o.fontId=a.index;else{var m=new n;m.b=r.bold,m.i=r.italic,m.name=r.fontName,m.sz=r.fontSize,m.u=r.underline,m.color="FF"+r.fontColor.replace("#",""),this.mFonts.push(m),o.fontId=this.mFonts.length-1}if("none"!==r.backColor){var d="FF"+r.backColor.replace("#","");if(this.mFills.has(d)){p=this.mFills.get(d);o.fillId=p}else{var p=this.mFills.size+2;this.mFills.set(d,p),o.fillId=p}}else o.fillId=0;if(this.isNewBorder(r)?o.borderId=0:(this.mBorders.push(r.borders),o.borderId=this.mBorders.length),"GENERAL"!==r.numberFormat)if(this.mNumFmt.has(r.numberFormat)){var u=this.mNumFmt.get(r.numberFormat);o.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(r.numberFormat,new h(c,r.numberFormat)),o.numFmtId=c}else"GENERAL"===r.numberFormat&&14===r.numFmtId?o.numFmtId=14:o.numFmtId=0;r.isGlobalStyle||(o.applyAlignment=1),o.alignment=new s,o.alignment.indent=r.indent,o.alignment.horizontal=r.hAlign,o.alignment.vertical=r.vAlign,o.alignment.wrapText=r.wrapText?1:0,o.alignment.rotation=r.rotation,r.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellXfs.push(o)):this.mCellXfs.push(o)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,r){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,"&quot;")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,r=this.mFonts;t<r.length;t++){var o=r[t];e+="<font>",o.b&&(e+="<b />"),o.i&&(e+="<i />"),o.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(o.sz)+'" />',e+='<color rgb="'+o.color+'" />',e+='<name val="'+o.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,r){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+r+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,r=this.mBorders;t<r.length;t++){var o=r[t];if(this.isAllBorder(o)){var n=o.all.color.replace("#",""),i=o.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+o.left.lineStyle+'"><color rgb="FF'+o.left.color.replace("#","")+'" /></left><right style="'+o.right.lineStyle+'"><color rgb="FF'+o.right.color.replace("#","")+'" /></right><top style="'+o.top.lineStyle+'"><color rgb="FF'+o.top.color.replace("#","")+'" /></top><bottom style="'+o.bottom.lineStyle+'"><color rgb="FF'+o.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(r,o){t+='<cellStyle name="'+o+'" xfId="'+e.cellStyles.get(o).xfId+'"',"Normal"===o&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,r=this.mCellStyleXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" ',void 0!==o.alignment?e+=">"+this.saveAlignment(o)+"</xf>":e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,r=this.mCellXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" xfId="'+o.xfId+'" ',1===o.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(o)+"</xf>"}return e+"</cellXfs>"},e.prototype.saveAlignment=function(e){var t="<alignment ";return void 0!==e.alignment.horizontal&&(t+='horizontal="'+e.alignment.horizontal+'" '),void 0!==e.alignment.indent&&0!==e.alignment.indent?t+='indent="'+e.alignment.indent+'" ':void 0!==e.alignment.rotation&&0!==e.alignment.rotation&&(t+='textRotation="'+e.alignment.rotation+'" '),void 0!==e.alignment.vertical&&(t+='vertical="'+e.alignment.vertical+'" '),t+='wrapText="'+e.alignment.wrapText+'" />'},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(r+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(r+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(r+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(r+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(r+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(r+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(r+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),r+="</cp:coreProperties>",this.addToArchive(r,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,r=0,o=0;o<t;o++,r++)e+='<Relationship Id="rId'+(o+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(o+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",r=this.worksheets.length,o=0;o<r;o++)t+='<Override PartName="/xl/worksheets/sheet'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,r){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(o,r);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,r);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,r){if(0!==e.rowSpan||0!==e.colSpan){var o=new I;o.x=e.index,o.width=e.colSpan,o.y=t,o.height=e.rowSpan;var n=this.getCellName(o.y,o.x),i=this.getCellName(t+o.height,e.index+o.width);o.ref=n+":"+i;r.add(o);var s={x:o.x,y:o.y},l={x:e.index+o.width,y:t+o.height};this.updatedMergedCellStyles(s,l,e)}return r},e.prototype.updatedMergedCellStyles=function(e,t,r){for(var o=e.x;o<=t.x;o++)for(var n=e.y;n<=t.y;n++)this.mergedCellsStyle.set(this.getCellName(n,o),{x:o,y:n,styleIndex:r.styleIndex})},e.prototype.dateToTicks=function(e,t,r){var o=[0,31,59,90,120,151,181,212,243,273,304,334,365],n=[0,31,60,91,121,152,182,213,244,274,305,335,366];if(e>=1&&e<=9999&&t>=1&&t<=12){var i=e-1;return 864e9*(365*i+(i/4|0)-(i/100|0)+(i/400|0)+(this.isLeapYear(e)?n:o)[t-1]+r-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,r){if(e>=0&&e<24&&t>=0&&t<60&&r>=0&&r<60)return 1e4*(3600*e+60*t+r)*1e3;throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}(),B=function(){function e(){}return e}();return e.CellStyle=o,e.Font=n,e.CellXfs=i,e.Alignment=s,e.CellStyleXfs=l,e.CellStyles=a,e.NumFmt=h,e.Border=m,e.Borders=d,e.Cell=u,e.Cells=c,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=R,e.BuiltInProperties=B,e.Worksheet=w,e.HyperLink=S,e.Grouping=C,e.FreezePane=k,e.MergeCell=I,e.MergeCells=T,e.Worksheets=x,e.CsvHelper=A,e.ValueFormatter=N,e.BlobHelper=P,e}({},ej.compression,ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-excel-export.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.50
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-excel-export@*",
"_id": "@syncfusion/ej2-excel-export@17.1.47",
"_id": "@syncfusion/ej2-excel-export@17.1.1",
"_inBundle": false,
"_integrity": "sha512-dBviQAdq5Wg76kDC/tb/0RuKvEtIJpCJwZ3Ei5egMTazZsGDMIbWyvKU6SJhT5cZtD9PGXZCR7j/eLNrSIlygw==",
"_integrity": "sha512-bEGkLJRguTTkWG+U76Yqorup6C7S54R98UlCCXf9p8ZG1of9oDoJdcwjYxzrFnLeDQi7OLzaR8fQh40fAicUFA==",
"_location": "/@syncfusion/ej2-excel-export",

@@ -26,6 +26,6 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-excel-export/-/ej2-excel-export-17.1.47.tgz",
"_shasum": "9e5c74d6e2e7fcfaddbbfa2477dbfb9059676e39",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-excel-export/-/ej2-excel-export-17.1.1.tgz",
"_shasum": "c6224ee9da0cab36a40372c27c3591ca423422ef",
"_spec": "@syncfusion/ej2-excel-export@*",
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ@2/packages/included",
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",
"author": {

@@ -39,4 +39,4 @@ "name": "Syncfusion Inc."

"dependencies": {
"@syncfusion/ej2-base": "~17.1.49",
"@syncfusion/ej2-compression": "~17.1.47"
"@syncfusion/ej2-base": "~17.2.28-beta",
"@syncfusion/ej2-compression": "~17.2.28-beta"
},

@@ -61,4 +61,4 @@ "deprecated": false,

},
"version": "17.1.50",
"version": "17.2.28-beta",
"sideEffects": false
}

@@ -122,2 +122,13 @@ import { ValueFormatter } from './value-formatter';

CsvHelper.prototype.parseCellValue = function (value) {
var val = '';
var length = value.length;
for (var start = 0; start < length; start++) {
if (value[start] === '\"') {
val += value[start].replace('\"', '\"\"');
}
else {
val += value[start];
}
}
value = val;
if (value.indexOf(',') !== -1 || value.indexOf('\n') !== -1) {

@@ -124,0 +135,0 @@ return value = '\"' + value + '\"';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc