/*! 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 if(!Object.keys) Object.keys = (function() { var hasOwnProperty = Object.prototype.hasOwnProperty, hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ], dontEnumsLength = dontEnums.length; return function(obj) { if(typeof obj !== 'object' && typeof obj !== 'function' || obj === null) throw new TypeError('Object.keys called on non-object'); var result = []; for(var prop in obj) if(hasOwnProperty.call(obj, prop)) result.push(prop); if(hasDontEnumBug) for(var i=0; i < dontEnumsLength; ++i) if(hasOwnProperty.call(obj, dontEnums[i])) result.push(dontEnums[i]); return result; }; })(); if(!String.prototype.trim) String.prototype.trim = function() { var s = this.replace(/^\s+/, ''); for(var i = s.length - 1; i >=0 ; --i) if(!s.charAt(i).match(/^\s/)) return s.slice(0,i+1); return ""; }; if(!Array.prototype.forEach) Array.prototype.forEach = function(cb) { var len = (this.length>>>0), self = (arguments[1]||void 0); for(var i=0; i>>0), self = (arguments[1]||void 0), A = new Array(len); for(var i=0; i>>0), i = ((arguments[1]|0)||0); for(i<0 && (i+=len)<0 && (i=0); i>>0), i = len - 1; for(; i>=0; --i) if(this[i] === needle) return i; return -1; }; if(!Array.isArray) Array.isArray = function(obj) { return Object.prototype.toString.call(obj) === "[object Array]"; }; if(!Date.prototype.toISOString) Date.prototype.toISOString = (function() { function p(n,i) { return ('0000000' + n).slice(-(i||2)); } return function _toISOString() { var y = this.getUTCFullYear(), yr = ""; if(y>9999) yr = '+' + p( y, 6); else if(y<0) yr = '-' + p(-y, 6); else yr = p( y, 4); return [ yr, p(this.getUTCMonth()+1), p(this.getUTCDate()) ].join('-') + 'T' + [ p(this.getUTCHours()), p(this.getUTCMinutes()), p(this.getUTCSeconds()) ].join(':') + '.' + p(this.getUTCMilliseconds(),3) + 'Z'; }; }()); if(typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) ArrayBuffer.prototype.slice = function(start, end) { if(start == null) start = 0; if(start < 0) { start += this.byteLength; if(start < 0) start = 0; } if(start >= this.byteLength) return new Uint8Array(0); if(end == null) end = this.byteLength; if(end < 0) { end += this.byteLength; if(end < 0) end = 0; } if(end > this.byteLength) end = this.byteLength; if(start > end) return new Uint8Array(0); var out = new ArrayBuffer(end - start); var view = new Uint8Array(out); var data = new Uint8Array(this, start, end - start) /* IE10 should have Uint8Array#set */ if(view.set) view.set(data); else while(start <= --end) view[end - start] = data[end]; return out; }; if(typeof Uint8Array !== 'undefined' && !Uint8Array.prototype.slice) Uint8Array.prototype.slice = function(start, end) { if(start == null) start = 0; if(start < 0) { start += this.length; if(start < 0) start = 0; } if(start >= this.length) return new Uint8Array(0); if(end == null) end = this.length; if(end < 0) { end += this.length; if(end < 0) end = 0; } if(end > this.length) end = this.length; if(start > end) return new Uint8Array(0); var out = new Uint8Array(end - start); while(start <= --end) out[end - start] = this[end]; return out; }; // VBScript + ActiveX fallback for IE5+ var IE_SaveFile = (function() { try { if(typeof IE_SaveFile_Impl == "undefined") document.write([ '