Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-excel-export

Package Overview
Dependencies
Maintainers
2
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 16.1.37 to 16.2.41

6

CHANGELOG.md

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

### Excel Export
#### Bug Fixes
- Currency number format issue is fixed.
## 15.4.30-preview (2018-02-14)

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

21

dist/ej2-excel-export.umd.min.js

@@ -1,21 +0,2 @@

/*!
* filename: ej2-excel-export.umd.min.js
* version : 16.1.37
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
/*!
* filename: ej2-excel-export.umd.min.js
* version : 16.1.32
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!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,o){"use strict";var r=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.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(){}}(),l=function(){return function(){}}(),s=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}}(),p=function(){return function(e,t){this.lineStyle=e,this.color=t}}(),d=function(){return function(){this.left=new p("none","#FFFFFF"),this.right=new p("none","#FFFFFF"),this.top=new p("none","#FFFFFF"),this.bottom=new p("none","#FFFFFF"),this.all=new p("none","#FFFFFF")}}(),h=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),c=function(){return function(){}}(),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return h(t,e),t}(Array),f=function(){return function(){}}(),y=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),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 o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),w=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),S=function(){return function(){this.isSummaryRowBelow=!0}}(),F=function(){return function(){}}(),C=function(){return function(){}}(),I=function(){return function(){}}(),k=function(){return function(){}}(),T=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.add=function(e){for(var r=!1,n=0,i=0,l=o;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=o[n].ref.split(":")[0]+":"+e.ref.split(":")[1],o[n]=a,r=!0}n++}r||o.push(e)},o}return w(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),A=function(){function e(e){this.intl=new o.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 r=e;return o.isNullOrUndefined(t)||o.isNullOrUndefined(e)||(r=t(e)),r},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}(),P=function(){function e(e){if(this.csvStr="",this.formatter=new A,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,o=0,r=e;o<r.length;o++){var n=r[o];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,o=0,r=e.cells;o<r.length;o++){var n=r[o];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;void 0!==e.value&&(e.value instanceof Date?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton: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,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)})):t+=e.value:"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(",")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob([this.csvStr],{type:"text/plain"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.download=e,o.href=t;var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),o.dispatchEvent(r),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob([this.csvStr],{type:"text/csv"})},e}(),N=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}(),B=function(){function e(e,i,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!==l?l:"en-US",this.intl=new o.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 r),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 s=0;s<e.styles.length;s++)if(void 0!==e.styles[s].name){if(this.cellStyles.has(e.styles[s].name))throw Error("Style name "+e.styles[s].name+" is already existed");var m=new r;m.isGlobalStyle=!0,this.parserCellStyle(e.styles[s],m,"none");var p=new a;p.name=m.name,p.xfId=m.index,this.cellStyles.set(p.name,p);var d={};void 0!==e.styles[s].numberFormat&&(d.format=e.styles[s].numberFormat),void 0!==e.styles[s].type?d.type=e.styles[s].type:d.type="datetime",void 0!==d.format&&this.globalStyles.set(e.styles[s].name,d)}}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 R,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new P(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,o=0;o<t;o++){var r=e[o],n=new S;this.mergeCells=new T,this.mHyperLinks=[],null!==r.name&&void 0!==r.name?n.name=r.name:n.name="Sheet"+(o+1).toString(),n.index=o+1,null!==r.columns&&void 0!==r.columns&&this.parserColumns(r.columns,n),null!==r.rows&&void 0!==r.rows&&this.parserRows(r.rows,n),null!==r.freeze&&void 0!==r.freeze&&this.parserFreezePanes(r.freeze,n),null!==r.printTitle&&void 0!==r.printTitle&&this.parserPrintTitle(r.printTitle,n),void 0!==r.pageSetup&&void 0!==r.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=r.pageSetup.isSummaryRowBelow),n.index=o+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var o={};return this.applyProperties(e,o),this.applyProperties(t,o),o},e.prototype.applyProperties=function(e,t){for(var o=Object.keys(e),r=0;r<o.length;r++)"name"!==o[r]&&(t[o[r]]=e[o[r]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var o=e%26;e=e/26-1,t=String.fromCharCode(65+o)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var o,r="";if(null!==e.fromRow&&void 0!==e.fromRow){o="$"+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!==o&&(r+=t.name+"!"+o),void 0!==n&&void 0!==o?r+=","+t.name+"!"+n:void 0!==n&&(r+=t.name+"!"+n),""!==r&&this.printTitles.set(t.index-1,r)},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 o=e.length;t.columns=[];for(var r=0;r<o;r++){var n=new f;if(null===e[r].index||void 0===e[r].index)throw Error("Column index is missing.");n.index=e[r].index,null!==e[r].width&&void 0!==e[r].width&&(n.width=e[r].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var o=e.length;t.rows=new g;for(var r=0,n=0;n<o;n++){var i=this.parserRow(e[n],r);r=i.index,t.rows.add(i)}},e.prototype.parserRow=function(e,t){var o=new v;if(null!==e.height&&void 0!==e.height&&(o.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return o.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,o),this.parseCells(e.cells,o),o},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 u;for(var o=void 0!==e?e.length:0,n=1,i=1,l=0;l<o;l++){var s=e[l],a=new c;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,this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),null!==s.hyperlink&&void 0!==s.hyperlink){var m=new F;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 r,this.parserCellStyle(void 0!==s.style?this.mergeOptions(s.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==s.value&&void 0!==s.value&&(a.value=s.value,a.type=this.getCellValueType(a.value)),null!==s.style&&void 0!==s.style&&void 0===a.styleIndex?(a.cellStyle=new r,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 r,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),t.cells.add(a)}t.spans=n+":"+i},e.prototype.applyGlobalStyle=function(e,t){var o=0;if(this.cellStyles.has(e.name)){o=this.cellStyles.get(e.name).xfId;var r=this.mCellStyleXfs[o-1];t.name=e.name;var n=this.compareStyleXfs(r);if(n.result)t.index=n.index;else{var l=new i;l.alignment=r.alignment,l.applyAlignment=r.applyAlignment,l.borderId=r.borderId,l.fillId=r.fillId,l.fontId=r.fontId,l.numFmtId=r.numFmtId,l.xfId=o,this.mCellXfs.push(l),this.mStyles.push(t),t.index=this.mCellXfs.length}}},e.prototype.compareStyleXfs=function(e){for(var t=!1,o=1,r=0,n=this.mCellXfs;r<n.length;r++){var i=n[r];if(t=i.alignment===e.alignment&&i.borderId===e.borderId&&i.numFmtId===e.numFmtId&&i.fillId===e.fillId&&i.fontId===e.fontId)break;o++}return{index:o,result:t}},e.prototype.parserCellStyle=function(e,t,o,r){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),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign),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,o):void 0!==r?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var o=this.getNumberFormat(e,t);if(o!==e){var r=this.mNumFmt.get(e);if(void 0!==r&&(r.formatCode=o,this.mNumFmt.has(o))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var l=i[n];l.numFmtId===r.numFmtId&&(l.numFmtId=this.mNumFmt.get(o).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var m=a[s];m.numFmtId===r.numFmtId&&(m.numFmtId=this.mNumFmt.get(o).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var o;switch(t){case"number":try{o=this.intl.getNumberPattern({format:e})}catch(t){o=e}break;case"datetime":try{o=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){o=e}break;case"date":try{o=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){o=e}break;case"time":try{o=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){o=e}break;default:o=e}return o},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){var t=this.compareStyle(e);if(t.result)return t.index;this.mStyles.push(e);var o=void 0;o=e.isGlobalStyle?new s:new i;var r=this.isNewFont(e);if(r.result)o.fontId=r.index;else{var a=new n;a.b=e.bold,a.i=e.italic,a.name=e.fontName,a.sz=e.fontSize,a.u=e.underline,a.color="FF"+e.fontColor.replace("#",""),this.mFonts.push(a),o.fontId=this.mFonts.length-1}if("none"!==e.backColor){var p="FF"+e.backColor.replace("#","");if(this.mFills.has(p)){var d=this.mFills.get(p);o.fillId=d}else{d=this.mFills.size+2;this.mFills.set(p,d),o.fillId=d}}else o.fillId=0;if(this.isNewBorder(e)?o.borderId=0:(this.mBorders.push(e.borders),o.borderId=this.mBorders.length),o.xfId=0,"GENERAL"!==e.numberFormat)if(this.mNumFmt.has(e.numberFormat)){var h=this.mNumFmt.get(e.numberFormat);o.numFmtId=h.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new m(c,e.numberFormat)),o.numFmtId=c}else"GENERAL"===e.numberFormat&&14===e.numFmtId?o.numFmtId=14:o.numFmtId=0;return("left"!==e.hAlign||"bottom"!==e.vAlign||e.wrapText)&&(o.applyAlignment=1,o.alignment=new l,o.alignment.horizontal=e.hAlign,o.alignment.vertical=e.vAlign,o.alignment.wrapText=e.wrapText?1:0),e.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellStyleXfs.length):(this.mCellXfs.push(o),this.mCellXfs.length)},e.prototype.isNewFont=function(e){for(var t=!1,o=0,r=0,n=this.mFonts;r<n.length;r++){var i=n[r];o++;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 o-=1,{index:o,result:t}},e.prototype.isNewBorder=function(e){var t=new r;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 r;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,o=0,r=0,n=0,i=this.mStyles;n<i.length;n++){var l=i[n];if(t=l.backColor===e.backColor&&l.bold===e.bold&&l.numFmtId===e.numFmtId&&l.numberFormat===e.numberFormat&&l.type===e.type&&l.fontColor===e.fontColor&&l.fontName===e.fontName&&l.fontSize===e.fontSize&&l.hAlign===e.hAlign&&l.italic===e.italic&&l.underline===e.underline&&l.vAlign===e.vAlign&&l.wrapText===e.wrapText&&l.borders.all.color===e.borders.all.color&&l.borders.all.lineStyle===e.borders.all.lineStyle&&l.borders.left.color===e.borders.left.color&&l.borders.left.lineStyle===e.borders.left.lineStyle&&l.borders.right.color===e.borders.right.color&&l.borders.right.lineStyle===e.borders.right.lineStyle&&l.borders.top.color===e.borders.top.color&&l.borders.top.lineStyle===e.borders.top.lineStyle&&l.borders.bottom.color===e.borders.bottom.color&&l.borders.bottom.lineStyle===e.borders.bottom.lineStyle)break;l.isGlobalStyle?r++:o++}return e.isGlobalStyle&&(o=r+1),{index:o,result:t}},e.prototype.contains=function(e,t){var o=e.indexOf(t);return o>-1&&o<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,o=e.type,r=e.value;switch(o){case"datetime":if(r=this.toOADate(r),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":r=r?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",this.contains(this.sharedString,r)||this.sharedString.push(r),r=this.sharedString.indexOf(r)}e.saveType=t,e.value=r},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,o){var r={};r.blobData=t.csvHelper.saveAsBlob(),e(r)});default:return new Promise(function(e,o){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var o={};o.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(o)})})}},e.prototype.save=function(e,t){var o=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var r=e.match(".xlsx$"),n=e.match(".csv$");if(null!==r&&r[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){o.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>",o=this.worksheets.length,r=0;r<o;r++)t+='<sheet name="'+this.worksheets[r].name+'" sheetId="'+(r+1).toString()+'" r:id ="rId'+(r+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 N,r='<?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?r+="<sheetPr />":r+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',void 0!==e.freezePanes&&(r+=this.saveFreezePanes(e)),void 0!==e.columns){for(var n="<cols>",i=0,l=e.columns;i<l.length;i++){var s=l[i];void 0!==s.width?n+='<col min="'+s.index+'" max="'+s.index+'" width="'+this.pixelsToColumnWidth(s.width)+'" customWidth="1" />':n+='<col min="'+s.index+'" max="'+s.index+'" width="8.43" customWidth="1" />'}r+=n+"</cols>"}if(r+="<sheetData>",o.append(r),r="",void 0!==e.rows)for(var a=0,m=e.rows;a<m.length;a++){var p=m[a],d='<row r="'+p.index+'" spans="'+p.spans+'" ';void 0!==p.height&&(d+='ht="'+this.pixelsToRowHeight(p.height)+'" customHeight="1" '),void 0!==p.grouping&&(p.grouping.isHidden&&(d+='hidden="1" '),void 0!==p.grouping.outlineLevel&&(d+='outlineLevel="'+p.grouping.outlineLevel+'" '),p.grouping.isCollapsed&&(d+='collapsed="1" ')),d+=">";for(var h=0,c=p.cells;h<c.length;h++){var u=c[h];void 0===u||void 0===u.value&&void 0===u.cellStyle||(d+='<c r="'+u.refName+'" ',void 0!==u.saveType&&(d+='t="'+u.saveType+'" '),void 0!==u.styleIndex&&(d+='s="'+u.styleIndex+'" '),d+=" >",void 0!==u.value?d+="<v>"+u.value+"</v></c>":d+="</c>")}d+="</row>",o.append(d)}if(r+="</sheetData>",e.mergeCells.length>0){r+='<mergeCells count="'+e.mergeCells.length+'">';for(var f=0,y=e.mergeCells;f<y.length;f++){r+='<mergeCell ref="'+y[f].ref+'" />'}r+="</mergeCells>"}if(e.hyperLinks.length>0){r+="<hyperlinks>";for(var v=0,g=e.hyperLinks;v<g.length;v++){var b=g[v];r+='<hyperlink ref="'+b.ref+'" r:id="rId'+b.rId+'" />'}r+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}r+='<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(r),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">',o=0,r=e.hyperLinks;o<r.length;o++){var n=r[o];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.saveFreezePanes=function(e){var t='<sheetViews><sheetView workbookViewId="0" ><pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ';return 0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),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">',o="",r=0;r<e;r++)o+="<si><t>",o+=this.processString(this.sharedString[r]),o+="</t></si>";o+="</sst>",this.addToArchive(t+o,"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(){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.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,o){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,o=this.mFonts;t<o.length;t++){var r=o[t];e+="<font>",r.b&&(e+="<b />"),r.i&&(e+="<i />"),r.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(r.sz)+'" />',e+='<color rgb="'+r.color+'" />',e+='<name val="'+r.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,o){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+o+'" /><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,o=this.mBorders;t<o.length;t++){var r=o[t];if(this.isAllBorder(r)){var n=r.all.color.replace("#",""),i=r.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="'+r.left.lineStyle+'"><color rgb="FF'+r.left.color.replace("#","")+'" /></left><right style="'+r.right.lineStyle+'"><color rgb="FF'+r.right.color.replace("#","")+'" /></right><top style="'+r.top.lineStyle+'"><color rgb="FF'+r.top.color.replace("#","")+'" /></top><bottom style="'+r.bottom.lineStyle+'"><color rgb="FF'+r.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(o,r){t+='<cellStyle name="'+r+'" xfId="'+e.cellStyles.get(r).xfId+'"',"Normal"===r&&(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,o=this.mCellStyleXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></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,o=this.mCellXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" xfId="'+r.xfId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></xf>'):e+=" />"}return e+"</cellXfs>"},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,o='<?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&&(o+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(o+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(o+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(o+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(o+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(o+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(o+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),o+="</cp:coreProperties>",this.addToArchive(o,"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,o=0,r=0;r<t;r++,o++)e+='<Relationship Id="rId'+(r+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(r+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++o).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="",o=this.worksheets.length,r=0;r<o;r++)t+='<Override PartName="/xl/worksheets/sheet'+(r+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,o){if("string"==typeof e){var r=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(r,o);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,o);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,o){if(0!==e.rowSpan||0!==e.colSpan){var r=new k;r.x=e.index,r.width=e.colSpan,r.y=t,r.height=e.rowSpan;var n=this.getCellName(r.y,r.x),i=this.getCellName(t+r.height,e.index+r.width);r.ref=n+":"+i,o.add(r)}return o},e.prototype.dateToTicks=function(e,t,o){if(e>=1&&e<=9999&&t>=1&&t<=12){var r=e-1;return 864e9*(365*r+(r/4|0)-(r/100|0)+(r/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]+o-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,o){if(e>=0&&e<24&&t>=0&&t<60&&o>=0&&o<60){return 1e4*(3600*e+60*t+o)*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}(),R=function(){return function(){}}();e.CellStyle=r,e.Font=n,e.CellXfs=i,e.Alignment=l,e.CellStyleXfs=s,e.CellStyles=a,e.NumFmt=m,e.Border=p,e.Borders=d,e.Cell=c,e.Cells=u,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=B,e.BuiltInProperties=R,e.Worksheet=S,e.HyperLink=F,e.Grouping=C,e.FreezePane=I,e.MergeCell=k,e.MergeCells=T,e.Worksheets=x,e.CsvHelper=P,e.ValueFormatter=A,e.BlobHelper=N,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,o){"use strict";var r=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.numberFormat="GENERAL",this.type="datetime",this.borders=new p,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(){}}(),l=function(){return function(){}}(),s=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}}(),d=function(){return function(e,t){this.lineStyle=e,this.color=t}}(),p=function(){return function(){this.left=new d("none","#FFFFFF"),this.right=new d("none","#FFFFFF"),this.top=new d("none","#FFFFFF"),this.bottom=new d("none","#FFFFFF"),this.all=new d("none","#FFFFFF")}}(),h=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),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 o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return h(t,e),t}(Array),f=function(){return function(){}}(),y=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),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 o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return y(t,e),t}(Array),b=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(Array),w=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),S=function(){return function(){this.isSummaryRowBelow=!0}}(),F=function(){return function(){}}(),C=function(){return function(){}}(),k=function(){return function(){}}(),I=function(){return function(){}}(),T=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.add=function(e){for(var r=!1,n=0,i=0,l=o;i<l.length;i++){var s=l[i];if(t.isIntersecting(s,e)){var a=new I;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=o[n].ref.split(":")[0]+":"+e.ref.split(":")[1],o[n]=a,e=a,r=!0}n++}return r||o.push(e),e},o}return w(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 o.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 r=e;return o.isNullOrUndefined(t)||o.isNullOrUndefined(e)||(r=t(e)),r},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,o=0,r=e;o<r.length;o++){var n=r[o];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,o=0,r=e.cells;o<r.length;o++){var n=r[o];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;void 0!==e.value&&(e.value instanceof Date?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton: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,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)})):t+=e.value:"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(",")?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),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.download=e,o.href=t;var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),o.dispatchEvent(r),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}(),B=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 o.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 r),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 d=new r;d.isGlobalStyle=!0,this.parserCellStyle(e.styles[m],d,"none");var p=new a;p.name=d.name,p.xfId=d.index-1,this.cellStyles.set(p.name,p);var h={};void 0!==e.styles[m].numberFormat&&(h.format=e.styles[m].numberFormat),void 0!==e.styles[m].type?h.type=e.styles[m].type:h.type="datetime",void 0!==h.format&&this.globalStyles.set(e.styles[m].name,h)}}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 R,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,o=0;o<t;o++){var r=e[o],n=new S;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==r.name&&void 0!==r.name?n.name=r.name:n.name="Sheet"+(o+1).toString(),n.index=o+1,null!==r.columns&&void 0!==r.columns&&this.parserColumns(r.columns,n),null!==r.rows&&void 0!==r.rows&&this.parserRows(r.rows,n),null!==r.freeze&&void 0!==r.freeze&&this.parserFreezePanes(r.freeze,n),null!==r.printTitle&&void 0!==r.printTitle&&this.parserPrintTitle(r.printTitle,n),void 0!==r.pageSetup&&void 0!==r.pageSetup.isSummaryRowBelow&&(n.isSummaryRowBelow=r.pageSetup.isSummaryRowBelow),n.index=o+1,n.mergeCells=this.mergeCells,n.hyperLinks=this.mHyperLinks,this.worksheets.push(n)}},e.prototype.mergeOptions=function(e,t){var o={};return this.applyProperties(e,o),this.applyProperties(t,o),o},e.prototype.applyProperties=function(e,t){for(var o=Object.keys(e),r=0;r<o.length;r++)"name"!==o[r]&&(t[o[r]]=e[o[r]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var o=e%26;e=e/26-1,t=String.fromCharCode(65+o)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var o,r="";if(null!==e.fromRow&&void 0!==e.fromRow){o="$"+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!==o&&(r+=t.name+"!"+o),void 0!==n&&void 0!==o?r+=","+t.name+"!"+n:void 0!==n&&(r+=t.name+"!"+n),""!==r&&this.printTitles.set(t.index-1,r)},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 o=e.length;t.columns=[];for(var r=0;r<o;r++){var n=new f;if(null===e[r].index||void 0===e[r].index)throw Error("Column index is missing.");n.index=e[r].index,null!==e[r].width&&void 0!==e[r].width&&(n.width=e[r].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var o=e.length;t.rows=new g;for(var r=0,n=0;n<o;n++){var i=this.parserRow(e[n],r);r=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(r,n){var i=e.rows.filter(function(e){return e.index===r.y})[0];if(o.isNullOrUndefined(i)){var l=e.rows.filter(function(e){return e.index<=r.y}),s=new v;s.index=r.y,s.cells=new c,s.cells.add(t.createCell(r,n));d=0;l.length>0&&(d=e.rows.indexOf(l[l.length-1])+1),e.rows.splice(d,0,s)}else{var a=i.cells.filter(function(e){return e.index===r.x})[0];if(o.isNullOrUndefined(a)){var m=i.cells.filter(function(e){return e.index<=r.x}),d=0;m.length>0&&(d=i.cells.indexOf(m[m.length-1])+1),i.cells.splice(d,0,t.createCell(r,n))}else a.styleIndex=r.styleIndex}})},e.prototype.createCell=function(e,t){var o=new u;return o.refName=t,o.index=e.x,o.cellStyle=new r,o.styleIndex=e.styleIndex,o},e.prototype.parserRow=function(e,t){var o=new v;if(null!==e.height&&void 0!==e.height&&(o.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return o.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,o),this.parseCells(e.cells,o),o},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 o=void 0!==e?e.length:0,n=1,i=1,l=0;l<o;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 F;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 r,this.parserCellStyle(void 0!==s.style?this.mergeOptions(s.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==s.value&&void 0!==s.value&&(a.value=s.value,a.type=this.getCellValueType(a.value)),null!==s.style&&void 0!==s.style&&void 0===a.styleIndex?(a.cellStyle=new r,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 r,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.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,o,r){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 p,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),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign),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,o):void 0!==r?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var o=this.getNumberFormat(e,t);if(o!==e){var r=this.mNumFmt.get(e);if(void 0!==r&&(r.formatCode=o,this.mNumFmt.has(o))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var l=i[n];l.numFmtId===r.numFmtId&&(l.numFmtId=this.mNumFmt.get(o).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var m=a[s];m.numFmtId===r.numFmtId&&(m.numFmtId=this.mNumFmt.get(o).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var o;switch(t){case"number":try{o=this.intl.getNumberPattern({format:e,currency:this.currency})}catch(t){o=e}break;case"datetime":try{o=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){o=e}break;case"date":try{o=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){o=e}break;case"time":try{o=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){o=e}break;default:o=e}return o},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,o=0,r=0,n=this.mFonts;r<n.length;r++){var i=n[r];o++;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 o-=1,{index:o,result:t}},e.prototype.isNewBorder=function(e){var t=new r;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 r;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,o=0,r=0,n=this.mStyles;r<n.length;r++){var i=n[r];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.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)){o=i.index;break}}return{index:o,result:t}},e.prototype.contains=function(e,t){var o=e.indexOf(t);return o>-1&&o<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,o=e.type,r=e.value;switch(o){case"datetime":if(r=this.toOADate(r),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":r=r?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",this.contains(this.sharedString,r)||this.sharedString.push(r),r=this.sharedString.indexOf(r)}e.saveType=t,e.value=r},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,o){var r={};r.blobData=t.csvHelper.saveAsBlob(),e(r)});default:return new Promise(function(e,o){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var o={};o.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(o)})})}},e.prototype.save=function(e,t){var o=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var r=e.match(".xlsx$"),n=e.match(".csv$");if(null!==r&&r[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){o.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>",o=this.worksheets.length,r=0;r<o;r++)t+='<sheet name="'+this.worksheets[r].name+'" sheetId="'+(r+1).toString()+'" r:id ="rId'+(r+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 r=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>',void 0!==e.freezePanes&&(n+=this.saveFreezePanes(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>",r.append(n),n="",void 0!==e.rows)for(var m=0,d=e.rows;m<d.length;m++){var p=d[m],h='<row r="'+p.index+'" ';o.isNullOrUndefined(p.spans)||(h+='spans="'+p.spans+'" '),void 0!==p.height&&(h+='ht="'+this.pixelsToRowHeight(p.height)+'" customHeight="1" '),void 0!==p.grouping&&(p.grouping.isHidden&&(h+='hidden="1" '),void 0!==p.grouping.outlineLevel&&(h+='outlineLevel="'+p.grouping.outlineLevel+'" '),p.grouping.isCollapsed&&(h+='collapsed="1" ')),h+=">";for(var u=0,c=p.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(h+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(h+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(h+='s="'+f.styleIndex+'" '),h+=" >",void 0!==f.value?h+="<v>"+f.value+"</v></c>":h+="</c>")}h+="</row>",r.append(h)}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>',r.append(n),this.addToArchive(r.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">',o=0,r=e.hyperLinks;o<r.length;o++){var n=r[o];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.saveFreezePanes=function(e){var t='<sheetViews><sheetView workbookViewId="0" ><pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ';return 0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),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">',o="",r=0;r<e;r++)o+="<si><t>",o+=this.processString(this.sharedString[r]),o+="</t></si>";o+="</sst>",this.addToArchive(t+o,"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 o=t[e],r=void 0;o.isGlobalStyle?(r=new s).xfId=o.index-1:(r=new i).xfId=0;var a=this.isNewFont(o);if(a.result)r.fontId=a.index;else{var d=new n;d.b=o.bold,d.i=o.italic,d.name=o.fontName,d.sz=o.fontSize,d.u=o.underline,d.color="FF"+o.fontColor.replace("#",""),this.mFonts.push(d),r.fontId=this.mFonts.length-1}if("none"!==o.backColor){var p="FF"+o.backColor.replace("#","");if(this.mFills.has(p)){var h=this.mFills.get(p);r.fillId=h}else{h=this.mFills.size+2;this.mFills.set(p,h),r.fillId=h}}else r.fillId=0;if(this.isNewBorder(o)?r.borderId=0:(this.mBorders.push(o.borders),r.borderId=this.mBorders.length),"GENERAL"!==o.numberFormat)if(this.mNumFmt.has(o.numberFormat)){var u=this.mNumFmt.get(o.numberFormat);r.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(o.numberFormat,new m(c,o.numberFormat)),r.numFmtId=c}else"GENERAL"===o.numberFormat&&14===o.numFmtId?r.numFmtId=14:r.numFmtId=0;o.isGlobalStyle||(r.applyAlignment=1),r.alignment=new l,r.alignment.indent=o.indent,r.alignment.horizontal=o.hAlign,r.alignment.vertical=o.vAlign,r.alignment.wrapText=o.wrapText?1:0,o.isGlobalStyle?(this.mCellStyleXfs.push(r),this.mCellXfs.push(r)):this.mCellXfs.push(r)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,o){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,o=this.mFonts;t<o.length;t++){var r=o[t];e+="<font>",r.b&&(e+="<b />"),r.i&&(e+="<i />"),r.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(r.sz)+'" />',e+='<color rgb="'+r.color+'" />',e+='<name val="'+r.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,o){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+o+'" /><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,o=this.mBorders;t<o.length;t++){var r=o[t];if(this.isAllBorder(r)){var n=r.all.color.replace("#",""),i=r.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="'+r.left.lineStyle+'"><color rgb="FF'+r.left.color.replace("#","")+'" /></left><right style="'+r.right.lineStyle+'"><color rgb="FF'+r.right.color.replace("#","")+'" /></right><top style="'+r.top.lineStyle+'"><color rgb="FF'+r.top.color.replace("#","")+'" /></top><bottom style="'+r.bottom.lineStyle+'"><color rgb="FF'+r.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(o,r){t+='<cellStyle name="'+r+'" xfId="'+e.cellStyles.get(r).xfId+'"',"Normal"===r&&(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,o=this.mCellStyleXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" ',void 0!==r.alignment?e+=">"+this.saveAlignment(r)+"</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,o=this.mCellXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" xfId="'+r.xfId+'" ',1===r.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(r)+"</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&&(t+='indent="'+e.alignment.indent+'" '),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,o='<?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&&(o+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(o+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(o+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(o+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(o+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(o+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(o+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),o+="</cp:coreProperties>",this.addToArchive(o,"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,o=0,r=0;r<t;r++,o++)e+='<Relationship Id="rId'+(r+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(r+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++o).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="",o=this.worksheets.length,r=0;r<o;r++)t+='<Override PartName="/xl/worksheets/sheet'+(r+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,o){if("string"==typeof e){var r=new Blob([e],{type:"text/plain"}),n=new t.ZipArchiveItem(r,o);this.mArchive.addItem(n)}else{n=new t.ZipArchiveItem(e,o);this.mArchive.addItem(n)}},e.prototype.processMergeCells=function(e,t,o){if(0!==e.rowSpan||0!==e.colSpan){var r=new I;r.x=e.index,r.width=e.colSpan,r.y=t,r.height=e.rowSpan;var n=this.getCellName(r.y,r.x),i=this.getCellName(t+r.height,e.index+r.width);r.ref=n+":"+i;o.add(r);var l={x:r.x,y:r.y},s={x:e.index+r.width,y:t+r.height};this.updatedMergedCellStyles(l,s,e)}return o},e.prototype.updatedMergedCellStyles=function(e,t,o){for(var r=e.x;r<=t.x;r++)for(var n=e.y;n<=t.y;n++)this.mergedCellsStyle.set(this.getCellName(n,r),{x:r,y:n,styleIndex:o.styleIndex})},e.prototype.dateToTicks=function(e,t,o){if(e>=1&&e<=9999&&t>=1&&t<=12){var r=e-1;return 864e9*(365*r+(r/4|0)-(r/100|0)+(r/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]+o-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,o){if(e>=0&&e<24&&t>=0&&t<60&&o>=0&&o<60){return 1e4*(3600*e+60*t+o)*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}(),R=function(){return function(){}}();e.CellStyle=r,e.Font=n,e.CellXfs=i,e.Alignment=l,e.CellStyleXfs=s,e.CellStyles=a,e.NumFmt=m,e.Border=d,e.Borders=p,e.Cell=u,e.Cells=c,e.Column=f,e.Row=v,e.Rows=g,e.Workbook=B,e.BuiltInProperties=R,e.Worksheet=S,e.HyperLink=F,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

@@ -1,20 +0,1 @@

/*!
* filename: index.d.ts
* version : 16.1.37
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
/*!
* filename: index.d.ts
* version : 16.1.32
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
import * as _excelexport from '@syncfusion/ej2-excel-export';

@@ -21,0 +2,0 @@ import * as _compression from '@syncfusion/ej2-compression';

{
"name": "@syncfusion/ej2-excel-export",
"version": "16.1.37",
"version": "16.2.41",
"description": "Essential JS 2 Excel Export Library",

@@ -11,4 +11,4 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-compression": "~16.1.37",
"@syncfusion/ej2-base": "~16.1.37"
"@syncfusion/ej2-compression": "~16.2.41",
"@syncfusion/ej2-base": "~16.2.41"
},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -17,2 +17,3 @@ import { HAlignType, VAlignType, LineStyle } from './enum';

hAlign: HAlignType;
indent: number;
vAlign: VAlignType;

@@ -48,2 +49,3 @@ underline: boolean;

wrapText: number;
indent: number;
}

@@ -55,3 +57,2 @@ export declare class CellStyleXfs {

borderId: number;
applyAlignment: number;
alignment: Alignment;

@@ -58,0 +59,0 @@ }

@@ -17,2 +17,3 @@ define(["require", "exports"], function (require, exports) {

this.vAlign = 'bottom';
this.indent = 0;
this.numberFormat = 'GENERAL';

@@ -19,0 +20,0 @@ this.type = 'datetime';

@@ -103,3 +103,3 @@ define(["require", "exports", "./value-formatter"], function (require, exports, value_formatter_1) {

CsvHelper.prototype.save = function (fileName) {
this.buffer = new Blob([this.csvStr], { type: 'text/plain' });
this.buffer = new Blob(['\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });
if (this.isMicrosoftBrowser) {

@@ -122,3 +122,3 @@ navigator.msSaveBlob(this.buffer, fileName);

CsvHelper.prototype.saveAsBlob = function () {
return new Blob([this.csvStr], { type: 'text/csv' });
return new Blob(['\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });
};

@@ -125,0 +125,0 @@ return CsvHelper;

@@ -11,2 +11,7 @@ import { CellStyles } from './cell-style';

cellStyles: Map<string, CellStyles>;
mergedCellsStyle: Map<string, {
x: number;
y: number;
styleIndex: number;
}>;
private worksheets;

@@ -29,5 +34,6 @@ private builtInProperties;

private culture;
private currency;
private intl;
private globalStyles;
constructor(json: any, saveType: SaveType, culture?: string);
constructor(json: any, saveType: SaveType, culture?: string, currencyString?: string);
private parserBuiltInProperties(jsonBuiltInProperties, builtInProperties);

@@ -43,2 +49,4 @@ private parserWorksheets(json);

private parserRows(json, sheet);
private insertMergedCellsStyle(sheet);
private createCell(value, key);
private parserRow(json, rowIndex);

@@ -48,3 +56,2 @@ private parseGrouping(json, row);

private applyGlobalStyle(json, cellStyle);
private compareStyleXfs(toCompareStyle);
private parserCellStyle(json, cellStyle, cellType);

@@ -56,2 +63,3 @@ private parserCellStyle(json, cellStyle, cellType, defStyleIndex);

private processCellStyle(style);
private processNumFormatId(style);
private isNewFont(toCompareStyle);

@@ -80,2 +88,3 @@ private isNewBorder(toCompareStyle);

private saveStyles();
private updateCellXfsStyleXfs();
private saveNumberFormats();

@@ -88,2 +97,3 @@ private saveFonts();

private saveCellXfs();
private saveAlignment(cellXf);
private saveApp(builtInProperties);

@@ -96,2 +106,3 @@ private saveCore(builtInProperties);

private processMergeCells(cell, rowIndex, mergeCells);
private updatedMergedCellStyles(sCell, eCell, cell);
/**

@@ -98,0 +109,0 @@ * Returns the tick count corresponding to the given year, month, and day.

@@ -47,4 +47,4 @@ import { Column } from './column';

export declare class MergeCells extends Array {
add: (mergeCell: MergeCell) => void;
add: (mergeCell: MergeCell) => MergeCell;
static isIntersecting(base: MergeCell, compare: MergeCell): boolean;
}

@@ -62,2 +62,3 @@ var __extends = (this && this.__extends) || (function () {

_this[count] = intersectingCell;
mergeCell = intersectingCell;
inserted = true;

@@ -70,2 +71,3 @@ }

}
return mergeCell;
};

@@ -72,0 +74,0 @@ return _this;

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 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

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