@ -1,5 +1,5 @@
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* shim.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* ! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* ! shim.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* ES3/5 Compatibility shims and other utilities for older browsers. */
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
@ -148,9 +148,14 @@ var IE_LoadFile = (function() { try {
}
return function ( filename ) { return fix _data ( IE _LoadFile _Impl ( filename ) ) ; } ;
} catch ( e ) { return void 0 ; } } ) ( ) ;
// getComputedStyle polyfill from https://gist.github.com/8HNHoFtE/5891086
if ( typeof window !== 'undefined' && typeof window . getComputedStyle !== 'function' ) {
window . getComputedStyle = function ( e , t ) { return this . el = e , this . getPropertyValue = function ( t ) { var n = /(\-([a-z]){1})/g ; return t == "float" && ( t = "styleFloat" ) , n . test ( t ) && ( t = t . replace ( n , function ( ) { return arguments [ 2 ] . toUpperCase ( ) } ) ) , e . currentStyle [ t ] ? e . currentStyle [ t ] : null } , this }
}
var DO _NOT _EXPORT _CODEPAGE = true ;
var DO _NOT _EXPORT _JSZIP = true ;
/ * !
/ *
JSZip - A Javascript class for generating and reading zip files
< http : //stuartk.com/jszip>
@ -166,7 +171,7 @@ Note: since JSZip 3 removed critical functionality, this version assigns to the
* /
( function ( e ) {
if ( "object" == typeof exports && "undefined" != typeof module && "undefined" == typeof DO _NOT _EXPORT _JSZIP ) module . exports = e ( ) ;
else if ( "function" == typeof define && define . amd ) { JSZipSync = e ( ) ; define ( [ ] , e ) ; }
else if ( "function" == typeof define && define . amd && "undefined" == typeof DO _NOT _EXPORT _JSZIP ) { JSZipSync = e ( ) ; define ( [ ] , e ) ; }
else {
var f ;
"undefined" != typeof window ? f = window :
@ -9147,13 +9152,13 @@ module.exports = ZStream;
} , { } ] } , { } , [ 9 ] )
( 9 )
} ) ) ;
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* ! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported XLSX */
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
var XLSX = { } ;
( function make _xlsx ( XLSX ) {
XLSX . version = '0.1 2.13 ';
function make _xlsx _lib ( XLSX ) {
XLSX . version = '0.1 3.0 ';
var current _codepage = 1200 , current _ansi = 1252 ;
/*global cptable:true, window */
if ( typeof module !== "undefined" && typeof require !== 'undefined' ) {
@ -17007,7 +17012,7 @@ function parse_borders(t, styles, themes, opts) {
var pass = false ;
t [ 0 ] . match ( tagregex ) . forEach ( function ( x ) {
var y = parsexmltag ( x ) ;
switch ( y [ 0 ] ) {
switch ( strip _ns ( y [ 0 ] ) ) {
case '<borders' : case '<borders>' : case '</borders>' : break ;
/* 18.8.4 border CT_Border */
@ -17081,7 +17086,7 @@ function parse_fills(t, styles, themes, opts) {
var pass = false ;
t [ 0 ] . match ( tagregex ) . forEach ( function ( x ) {
var y = parsexmltag ( x ) ;
switch ( y[ 0 ] ) {
switch ( strip_ns ( y[ 0 ] ) ) {
case '<fills' : case '<fills>' : case '</fills>' : break ;
/* 18.8.20 fill CT_Fill */
@ -17147,7 +17152,7 @@ function parse_fonts(t, styles, themes, opts) {
var pass = false ;
t [ 0 ] . match ( tagregex ) . forEach ( function ( x ) {
var y = parsexmltag ( x ) ;
switch ( y [ 0 ] ) {
switch ( strip _ns ( y [ 0 ] ) ) {
case '<fonts' : case '<fonts>' : case '</fonts>' : break ;
/* 18.8.22 font CT_Font */
@ -17265,7 +17270,7 @@ function parse_numFmts(t, styles, opts) {
if ( ! m ) return ;
for ( i = 0 ; i < m . length ; ++ i ) {
var y = parsexmltag ( m [ i ] ) ;
switch ( y[ 0 ] ) {
switch ( strip_ns ( y[ 0 ] ) ) {
case '<numFmts' : case '</numFmts>' : case '<numFmts/>' : case '<numFmts>' : break ;
case '<numFmt' : {
var f = unescapexml ( utf8read ( y . formatCode ) ) , j = parseInt ( y . numFmtId , 10 ) ;
@ -17304,7 +17309,7 @@ function parse_cellXfs(t, styles, opts) {
var pass = false ;
t [ 0 ] . match ( tagregex ) . forEach ( function ( x ) {
var y = parsexmltag ( x ) , i = 0 ;
switch ( y[ 0 ] ) {
switch ( strip_ns ( y[ 0 ] ) ) {
case '<cellXfs' : case '<cellXfs>' : case '<cellXfs/>' : case '</cellXfs>' : break ;
/* 18.8.45 xf CT_Xf */
@ -17359,11 +17364,11 @@ function write_cellXfs(cellXfs) {
/* 18.8 Styles CT_Stylesheet*/
var parse _sty _xml = ( function make _pstyx ( ) {
var numFmtRegex = /< numFmts([^>]*)>[\S\s]*?<\/numFmts>/;
var cellXfRegex = /< cellXfs([^>]*)>[\S\s]*?<\/cellXfs>/;
var fillsRegex = /< fills([^>]*)>[\S\s]*?<\/fills>/;
var fontsRegex = /< fonts([^>]*)>[\S\s]*?<\/fonts>/;
var bordersRegex = /< borders([^>]*)>[\S\s]*?<\/borders>/;
var numFmtRegex = /< (?:\w+:)? numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)? numFmts>/;
var cellXfRegex = /< (?:\w+:)? cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)? cellXfs>/;
var fillsRegex = /< (?:\w+:)? fills([^>]*)>[\S\s]*?<\/(?:\w+:)? fills>/;
var fontsRegex = /< (?:\w+:)? fonts([^>]*)>[\S\s]*?<\/(?:\w+:)? fonts>/;
var bordersRegex = /< (?:\w+:)? borders([^>]*)>[\S\s]*?<\/(?:\w+:)? borders>/;
return function parse _sty _xml ( data , themes , opts ) {
var styles = { } ;
@ -18317,7 +18322,7 @@ function write_comments_vml(rId, comments) {
'<v:shape' + wxt _helper ( {
id : '_x0000_s' + ( ++ _shapeid ) ,
type : "#_x0000_t202" ,
style : "position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10 ;visibility:hidden",
style : "position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10 " + ( x [ 1 ] . hidden ? " ;visibility:hidden" : "" ) ,
fillcolor : "#ECFAD4" ,
strokecolor : "#edeaa1"
} ) + '>' ,
@ -18333,7 +18338,7 @@ function write_comments_vml(rId, comments) {
writetag ( 'x:AutoFill' , "False" ) ,
writetag ( 'x:Row' , String ( c . r ) ) ,
writetag ( 'x:Column' , String ( c . c ) ) ,
'<x:Visible/>' ,
x [ 1 ] . hidden ? '' : '<x:Visible/>' ,
'</x:ClientData>' ,
'</v:shape>'
] ) ; } ) ;
@ -27317,15 +27322,22 @@ function parse_dom_table(table, _opts) {
if ( DENSE != null ) opts . dense = DENSE ;
var ws = opts . dense ? ( [ ] ) : ( { } ) ;
var rows = table . getElementsByTagName ( 'tr' ) ;
var sheetRows = Math . min ( opts . sheetRows || 10000000 , rows . length ) ;
var range = { s : { r : 0 , c : 0 } , e : { r : sheetRows - 1 , c : 0 } } ;
var sheetRows = opts . sheetRows || 10000000 ;
var range = { s : { r : 0 , c : 0 } , e : { r : 0 , c : 0 } } ;
var merges = [ ] , midx = 0 ;
var R = 0 , _C = 0 , C = 0 , RS = 0 , CS = 0 ;
for ( ; R < sheetRows ; ++ R ) {
var row = rows [ R ] ;
var rowinfo = [ ] ;
var _R = 0 , R = 0 , _C , C , RS , CS ;
for ( ; _R < rows . length && R < sheetRows ; ++ _R ) {
var row = rows [ _R ] ;
if ( is _dom _element _hidden ( row ) ) {
if ( opts . display ) continue ;
rowinfo [ R ] = { hidden : true } ;
}
var elts = ( row . children ) ;
for ( _C = C = 0 ; _C < elts . length ; ++ _C ) {
var elt = elts [ _C ] , v = htmldecode ( elts [ _C ] . innerHTML ) ;
var elt = elts [ _C ] ;
if ( opts . display && is _dom _element _hidden ( elt ) ) continue ;
var v = htmldecode ( elt . innerHTML ) ;
for ( midx = 0 ; midx < merges . length ; ++ midx ) {
var m = merges [ midx ] ;
if ( m . s . c == C && m . s . r <= R && R <= m . e . r ) { C = m . e . c + 1 ; midx = - 1 ; }
@ -27352,16 +27364,36 @@ function parse_dom_table(table, _opts) {
if ( range . e . c < C ) range . e . c = C ;
C += CS ;
}
++ R ;
}
if ( merges . length ) ws [ '!merges' ] = merges ;
if ( rowinfo . length ) ws [ '!rows' ] = rowinfo ;
range . e . r = R - 1 ;
ws [ '!ref' ] = encode _range ( range ) ;
if ( sheetRows < rows . length ) ws [ '!fullref' ] = encode _range ( ( range . e . r = rows . length - 1 , range ) ) ;
if ( R >= sheetRows ) ws [ '!fullref' ] = encode _range ( ( range . e . r = rows . length - _R + R - 1 , range ) ) ; // We can count the real number of rows to parse but we don't to improve the performance
return ws ;
}
function table _to _book ( table , opts ) {
return sheet _to _workbook ( parse _dom _table ( table , opts ) , opts ) ;
}
function is _dom _element _hidden ( element ) {
var display = '' ;
var get _computed _style = get _get _computed _style _function ( element ) ;
if ( get _computed _style ) display = get _computed _style ( element ) . getPropertyValue ( 'display' ) ;
if ( ! display ) display = element . style . display ; // Fallback for cases when getComputedStyle is not available (e.g. an old browser or some Node.js environments) or doesn't work (e.g. if the element is not inserted to a document)
return display === 'none' ;
}
/* global getComputedStyle */
function get _get _computed _style _function ( element ) {
// The proper getComputedStyle implementation is the one defined in the element window
if ( element . ownerDocument . defaultView && typeof element . ownerDocument . defaultView . getComputedStyle === 'function' ) return element . ownerDocument . defaultView . getComputedStyle ;
// If it is not available, try to get one from the global namespace
if ( typeof getComputedStyle === 'function' ) return getComputedStyle ;
return null ;
}
/* OpenDocument */
var parse _content _xml = ( function ( ) {
@ -29247,6 +29279,11 @@ XLSX.writeFileAsync = writeFileAsync;
XLSX . utils = utils ;
XLSX . SSF = SSF ;
XLSX . CFB = CFB ;
} ) ( typeof exports !== 'undefined' ? exports : XLSX ) ;
}
/*global define */
if ( typeof exports !== 'undefined' ) make _xlsx _lib ( exports ) ;
else if ( typeof module !== 'undefined' && module . exports ) make _xlsx _lib ( module . exports ) ;
else if ( typeof define === 'function' && define . amd ) define ( 'xlsx' , function ( ) { if ( ! XLSX . version ) make _xlsx _lib ( XLSX ) ; return XLSX ; } ) ;
else make _xlsx _lib ( XLSX ) ;
/*exported XLS, ODS */
var XLS = XLSX , ODS = XLSX ;