sheetjs/dist/xlsx.mini.min.js

11 lines
258 KiB
JavaScript
Raw Permalink Normal View History

/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
2022-06-09 04:45:22 +00:00
var XLSX={};function make_xlsx_lib(e){e.version="0.18.9";var r=1200,t=1252;var a;var n=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4];var s={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var i=function(e){if(n.indexOf(e)==-1)return;t=s[0]=e};function l(){i(1252)}var o=function(e){r=e;i(e)};function c(){o(1200);l()}function f(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function u(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function h(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var d=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);if(r==255&&t==254)return u(e.slice(2));if(r==254&&t==255)return h(e.slice(2));if(r==65279)return e.slice(1);return e};var m=function Sc(e){return String.fromCharCode(e)};var p=function Cc(e){return String.fromCharCode(e)};function v(e){a=e;o=function(e){r=e;i(e)};d=function(e){if(e.charCodeAt(0)===255&&e.charCodeAt(1)===254){return a.utils.decode(1200,f(e.slice(2)))}return e};m=function n(e){if(r===1200)return String.fromCharCode(e);return a.utils.decode(r,[e&255,e>>8])[0]};p=function s(e){return a.utils.decode(t,[e])[0]};ta()}var g=null;var b=true;var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function k(e){var r="";var t=0,a=0,n=0,s=0,i=0,l=0,o=0;for(var c=0;c<e.length;){t=e.charCodeAt(c++);s=t>>2;a=e.charCodeAt(c++);i=(t&3)<<4|a>>4;n=e.charCodeAt(c++);l=(a&15)<<2|n>>6;o=n&63;if(isNaN(a)){l=o=64}else if(isNaN(n)){o=64}r+=w.charAt(s)+w.charAt(i)+w.charAt(l)+w.charAt(o)}return r}function y(e){var r="";var t=0,a=0,n=0,s=0,i=0,l=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;){s=w.indexOf(e.charAt(c++));i=w.indexOf(e.charAt(c++));t=s<<2|i>>4;r+=String.fromCharCode(t);l=w.indexOf(e.charAt(c++));a=(i&15)<<4|l>>2;if(l!==64){r+=String.fromCharCode(a)}o=w.indexOf(e.charAt(c++));n=(l&3)<<6|o;if(o!==64){r+=String.fromCharCode(n)}}return r}var x=function(){return typeof Buffer!=="undefined"&&typeof undefined!=="undefined"&&typeof{}!=="undefined"&&!!{}.node}();var S=function(){if(typeof Buffer!=="undefined"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(r){e=true}return e?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function C(e){if(x)return Buffer.alloc?Buffer.alloc(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}function _(e){if(x)return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}var A=function _c(e){if(x)return S(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function F(e){if(typeof ArrayBuffer==="undefined")return A(e);var r=new ArrayBuffer(e.length),t=new Uint8Array(r);for(var a=0;a!=e.length;++a)t[a]=e.charCodeAt(a)&255;return r}function E(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);return r.join("")}function T(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function D(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return D(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var O=x?function(e){return Buffer.concat(e.map(function(e){return Buffer.isBuffer(e)?e:S(e)}))}:function(e){if(typeof Uint8Array!=="undefined"){var r=0,t=0;for(r=0;r<e.length;++r)t+=e[r].length;var a=new Uint8Array(t);var n=0;for(r=0,t=0;r<e.length;t+=n,++r){n=e[r].length;if(e[r]instanceof Uint8Array)a.set(e[r],t);else if(typeof e[r]=="string"){throw"wtf"}else a.set(new Uint8Array(e[r]),t)}return a}return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}))};f
return~a}function y(e,r){var a=r^-1,n=e.length-15,k=0;for(;k<n;)a=w[e[k++]^a&255]^b[e[k++]^a>>8&255]^g[e[k++]^a>>16&255]^v[e[k++]^a>>>24]^p[e[k++]]^m[e[k++]]^d[e[k++]]^h[e[k++]]^u[e[k++]]^f[e[k++]]^c[e[k++]]^o[e[k++]]^l[e[k++]]^i[e[k++]]^s[e[k++]]^t[e[k++]];n+=15;while(k<n)a=a>>>8^t[(a^e[k++])&255];return~a}function x(e,r){var a=r^-1;for(var n=0,s=e.length,i=0,l=0;n<s;){i=e.charCodeAt(n++);if(i<128){a=a>>>8^t[(a^i)&255]}else if(i<2048){a=a>>>8^t[(a^(192|i>>6&31))&255];a=a>>>8^t[(a^(128|i&63))&255]}else if(i>=55296&&i<57344){i=(i&1023)+64;l=e.charCodeAt(n++)&1023;a=a>>>8^t[(a^(240|i>>8&7))&255];a=a>>>8^t[(a^(128|i>>2&63))&255];a=a>>>8^t[(a^(128|l>>6&15|(i&3)<<4))&255];a=a>>>8^t[(a^(128|l&63))&255]}else{a=a>>>8^t[(a^(224|i>>12&15))&255];a=a>>>8^t[(a^(128|i>>6&63))&255];a=a>>>8^t[(a^(128|i&63))&255]}}return~a}e.table=t;e.bstr=k;e.buf=y;e.str=x;return e}();var qe=function Fc(){var e={};e.version="1.2.2";function r(e,r){var t=e.split("/"),a=r.split("/");for(var n=0,s=0,i=Math.min(t.length,a.length);n<i;++n){if(s=t[n].length-a[n].length)return s;if(t[n]!=a[n])return t[n]<a[n]?-1:1}return t.length-a.length}function t(e){if(e.charAt(e.length-1)=="/")return e.slice(0,-1).indexOf("/")===-1?e:t(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(0,r+1)}function a(e){if(e.charAt(e.length-1)=="/")return a(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(r+1)}function n(e,r){if(typeof r==="string")r=new Date(r);var t=r.getHours();t=t<<6|r.getMinutes();t=t<<5|r.getSeconds()>>>1;e._W(2,t);var a=r.getFullYear()-1980;a=a<<4|r.getMonth()+1;a=a<<5|r.getDate();e._W(2,a)}function s(e){var r=e._R(2)&65535;var t=e._R(2)&65535;var a=new Date;var n=t&31;t>>>=5;var s=t&15;t>>>=4;a.setMilliseconds(0);a.setFullYear(t+1980);a.setMonth(s-1);a.setDate(n);var i=r&31;r>>>=5;var l=r&63;r>>>=6;a.setHours(r);a.setMinutes(l);a.setSeconds(i<<1);return a}function i(e){pa(e,0);var r={};var t=0;while(e.l<=e.length-4){var a=e._R(2);var n=e._R(2),s=e.l+n;var i={};switch(a){case 21589:{t=e._R(1);if(t&1)i.mtime=e._R(4);if(n>5){if(t&2)i.atime=e._R(4);if(t&4)i.ctime=e._R(4)}if(i.mtime)i.mt=new Date(i.mtime*1e3)}break;}e.l=s;r[a]=i}return r}var l;function o(){return l||(l=Qe)}function c(e,r){if(e[0]==80&&e[1]==75)return Oe(e,r);if((e[0]|32)==109&&(e[1]|32)==105)return $e(e,r);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var t=3;var a=512;var n=0;var s=0;var i=0;var l=0;var o=0;var c=[];var m=e.slice(0,512);pa(m,0);var v=f(m);t=v[0];switch(t){case 3:a=512;break;case 4:a=4096;break;case 0:if(v[1]==0)return Oe(e,r);default:throw new Error("Major Version: Expected 3 or 4 saw "+t);}if(a!==512){m=e.slice(0,a);pa(m,28)}var w=e.slice(0,a);u(m,t);var k=m._R(4,"i");if(t===3&&k!==0)throw new Error("# Directory Sectors: Expected 0 saw "+k);m.l+=4;i=m._R(4,"i");m.l+=4;m.chk("00100000","Mini Stream Cutoff Size: ");l=m._R(4,"i");n=m._R(4,"i");o=m._R(4,"i");s=m._R(4,"i");for(var y=-1,x=0;x<109;++x){y=m._R(4,"i");if(y<0)break;c[x]=y}var S=h(e,a);p(o,s,S,a,c);var C=g(S,i,c,a);C[i].name="!Directory";if(n>0&&l!==B)C[l].name="!MiniFAT";C[c[0]].name="!FAT";C.fat_addrs=c;C.ssz=a;var _={},A=[],F=[],E=[];b(i,C,S,A,n,_,F,l);d(F,E,A);A.shift();var T={FileIndex:F,FullPaths:E};if(r&&r.raw)T.raw={header:w,sectors:S};return T}function f(e){if(e[e.l]==80&&e[e.l+1]==75)return[0,0];e.chk(z,"Header Signature: ");e.l+=16;var r=e._R(2,"u");return[e._R(2,"u"),r]}function u(e,r){var t=9;e.l+=2;switch(t=e._R(2)){case 9:if(r!=3)throw new Error("Sector Shift: Expected 9 saw "+t);break;case 12:if(r!=4)throw new Error("Sector Shift: Expected 12 saw "+t);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+t);}e.chk("0600","Mini Sector Shift: ");e.chk("000000000000","Reserved: ")}function h(e,r){var t=Math.ceil(e.length/r)-1;var a=[];for(var n=1;n<t;++n)a[n-1]=e.slice(n*r,(n+1)*r);a[t-1]=e.slice(t*r);return a}function d(e,r,t){var a=0,n=0,s=0,i=0,l=0,o=t.length;var c=[],f=[];for(;a<o;++a){c[a]=f[a]=a;r[a]=t[a]}for(;l<f.length;++l){a=f[l];n=e[a].L;s=e[a].R;i=e[a].C;if(c[a]===a){if(n!==-1&&c[n]!==n)c[a]=c[n];if(s!==-1&&c[s]!==s)c[a]=c[s]}if(i!==-1)c[
var a=t.getFullYear();if(e.indexOf(""+a)>-1)return t;t.setFullYear(t.getFullYear()+100);return t}var n=e.match(/\d+/g)||["2017","2","19","0","0","0"];var s=new Date(+n[0],+n[1]-1,+n[2],+n[3]||0,+n[4]||0,+n[5]||0);if(e.indexOf("Z")>-1)s=new Date(s.getTime()-s.getTimezoneOffset()*60*1e3);return s}function kr(e,r){if(x&&Buffer.isBuffer(e)){if(r){if(e[0]==255&&e[1]==254)return pt(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return pt(h(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder!=="undefined")try{if(r){if(e[0]==255&&e[1]==254)return pt(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return pt(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"€":"€","":"‚","ƒ":"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰","Š":"Š","":"‹","Œ":"Œ","Ž":"Ž","":"‘","":"’","“":"“","”":"”","•":"•","":"–","—":"—","˜":"˜","™":"™","š":"š","":"›","œ":"œ","ž":"ž","Ÿ":"Ÿ"};if(Array.isArray(e))e=new Uint8Array(e);return new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(e){return t[e]||e})}catch(a){}var n=[];for(var s=0;s!=e.length;++s)n.push(String.fromCharCode(e[s]));return n.join("")}function yr(e){if(typeof JSON!="undefined"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var r={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=yr(e[t]);return r}function xr(e,r){var t="";while(t.length<r)t+=e;return t}function Sr(e){var r=Number(e);if(!isNaN(r))return isFinite(r)?r:NaN;if(!/\d/.test(e))return r;var t=1;var a=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){t*=100;return""});if(!isNaN(r=Number(a)))return r/t;a=a.replace(/[(](.*)[)]/,function(e,r){t=-t;return r});if(!isNaN(r=Number(a)))return r/t;return r}var Cr=/^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))([ap])m?/;function _r(e){if(!e[2])return new Date(1900,0,0,+e[1]%12+(e[7]=="p"?12:0),0,0,0);if(e[3]){if(e[4])return new Date(1900,0,0,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[4],parseFloat(e[3])*1e3);else return new Date(1900,0,0,e[7]=="p"?12:0,+e[1],+e[2],parseFloat(e[3])*1e3)}else if(e[5])return new Date(1900,0,0,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[5],e[6]?parseFloat(e[6])*1e3:0);else return new Date(1900,0,0,+e[1]%12+(e[7]=="p"?12:0),+e[2],0,0)}var Ar=["january","february","march","april","may","june","july","august","september","october","november","december"];function Fr(e){var r=e.toLowerCase();var t=r.replace(/\s+/g,"");var a=t.match(Cr);if(a)return _r(a);var n=new Date(e),s=new Date(NaN);var i=n.getYear(),l=n.getMonth(),o=n.getDate();if(isNaN(o))return s;if(r.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){r=r.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"");if(r.length>3&&Ar.indexOf(r)==-1)return s}else if(r.replace(/[ap]m?/,"").match(/[a-z]/))return s;if(i<0||i>8099)return s;if((l>0||o>1)&&i!=101)return n;if(e.match(/[^-0-9:,\/\\]/))return s;return n}var Er=function(){var e="abacaba".split(/(:?b)/i).length==5;return function r(t,a,n){if(e||typeof a=="string")return t.split(a);var s=t.split(a),i=[s[0]];for(var l=1;l<s.length;++l){i.push(n);i.push(s[l])}return i}}();function Tr(e){if(!e)return null;if(e.content&&e.type)return kr(e.content,true);if(e.data)return d(e.data);if(e.asNodeBuffer&&x)return d(e.asNodeBuffer().toString("binary"));if(e.asBinary)return d(e.asBinary());if(e._data&&e._data.getContent)return d(kr(Array.prototype.slice.call(e._data.getContent(),0)));return null}function Dr(e){if(!e)return null;if(e.data)return f(e.data);if(e.asNodeBuffer&&x)return e.asNodeBuffer();if(e._data&&e._data.getContent){var r=e._data.getContent();if(typeof r=="string")return f(r);return Array.prototype.slice.call(r)}if(e.content&&e.type)return e.content;return null}function Or(e){return e&&e.name.slice(-4)===".bin"?Dr(e):Tr(e)}function Mr(e,r){var t=e.FullPaths||nr(e.file
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};var gn={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"applic
case"base64":return r(y(e),t);case"binary":return r(e,t);case"buffer":return r(x&&Buffer.isBuffer(e)?e.toString("binary"):E(e),t);case"array":return r(kr(e),t);}throw new Error("Unrecognized type "+t.type)}function r(e,r){var t=e.split("\n"),a=-1,n=-1,s=0,i=[];for(;s!==t.length;++s){if(t[s].trim()==="BOT"){i[++a]=[];n=0;continue}if(a<0)continue;var l=t[s].trim().split(",");var o=l[0],c=l[1];++s;var f=t[s]||"";while((f.match(/["]/g)||[]).length&1&&s<t.length-1)f+="\n"+t[++s];f=f.trim();switch(+o){case-1:if(f==="BOT"){i[++a]=[];n=0;continue}else if(f!=="EOD")throw new Error("Unrecognized DIF special command "+f);break;case 0:if(f==="TRUE")i[a][n]=true;else if(f==="FALSE")i[a][n]=false;else if(!isNaN(Sr(c)))i[a][n]=Sr(c);else if(!isNaN(Fr(c).getDate()))i[a][n]=wr(c);else i[a][n]=c;++n;break;case 1:f=f.slice(1,f.length-1);f=f.replace(/""/g,'"');if(b&&f&&f.match(/^=".*"$/))f=f.slice(2,-1);i[a][n++]=f!==""?f:null;break;}if(f==="EOD")break}if(r&&r.sheetRows)i=i.slice(0,r.sheetRows);return i}function t(r,t){return Va(e(r,t),t)}function a(e,r){return ja(t(e,r),r)}var n=function(){var e=function t(e,r,a,n,s){e.push(r);e.push(a+","+n);e.push('"'+s.replace(/"/g,'""')+'"')};var r=function a(e,r,t,n){e.push(r+","+t);e.push(r==1?'"'+n.replace(/"/g,'""')+'"':n)};return function n(t){var a=[];var n=$a(t["!ref"]),s;var i=Array.isArray(t);e(a,"TABLE",0,1,"sheetjs");e(a,"VECTORS",0,n.e.r-n.s.r+1,"");e(a,"TUPLES",0,n.e.c-n.s.c+1,"");e(a,"DATA",0,0,"");for(var l=n.s.r;l<=n.e.r;++l){r(a,-1,0,"BOT");for(var o=n.s.c;o<=n.e.c;++o){var c=Ia({r:l,c:o});s=i?(t[l]||[])[o]:t[c];if(!s){r(a,1,0,"");continue}switch(s.t){case"n":var f=b?s.w:s.v;if(!f&&s.v!=null)f=s.v;if(f==null){if(b&&s.f&&!s.F)r(a,1,0,"="+s.f);else r(a,1,0,"")}else r(a,0,f,"V");break;case"b":r(a,0,s.v?1:0,s.v?"TRUE":"FALSE");break;case"s":r(a,1,0,!b||isNaN(s.v)?s.v:'="'+s.v+'"');break;case"d":if(!s.w)s.w=$e(s.z||Y[14],fr(wr(s.v)));if(b)r(a,0,s.w,"V");else r(a,1,0,s.w);break;default:r(a,1,0,"");}}}r(a,-1,0,"EOD");var u="\r\n";var h=a.join(u);return h}}();return{to_workbook:a,to_sheet:t,from_sheet:n}}();var Kn=function(){function e(e){return e.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n")}function r(e){return e.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function t(r,t){var a=r.split("\n"),n=-1,s=-1,i=0,l=[];for(;i!==a.length;++i){var o=a[i].trim().split(":");if(o[0]!=="cell")continue;var c=Pa(o[1]);if(l.length<=c.r)for(n=l.length;n<=c.r;++n)if(!l[n])l[n]=[];n=c.r;s=c.c;switch(o[2]){case"t":l[n][s]=e(o[3]);break;case"v":l[n][s]=+o[3];break;case"vtf":var f=o[o.length-1];case"vtc":switch(o[3]){case"nl":l[n][s]=+o[4]?true:false;break;default:l[n][s]=+o[4];break;}if(o[2]=="vtf")l[n][s]=[l[n][s],f];}}if(t&&t.sheetRows)l=l.slice(0,t.sheetRows);return l}function a(e,r){return Va(t(e,r),r)}function n(e,r){return ja(a(e,r),r)}var s=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n");var i=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n";var l=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n");var o="--SocialCalcSpreadsheetControlSave--";function c(e){if(!e||!e["!ref"])return"";var t=[],a=[],n,s="";var i=Ra(e["!ref"]);var l=Array.isArray(e);for(var o=i.s.r;o<=i.e.r;++o){for(var c=i.s.c;c<=i.e.c;++c){s=Ia({r:o,c:c});n=l?(e[o]||[])[c]:e[s];if(!n||n.v==null||n.t==="z")continue;a=["cell",s,"t"];switch(n.t){case"s":;case"str":a.push(r(n.v));break;case"n":if(!n.f){a[2]="v";a[3]=n.v}else{a[2]="vtf";a[3]="n";a[4]=n.v;a[5]=r(n.f)}break;case"b":a[2]="vt"+(n.f?"f":"c");a[3]="nl";a[4]=n.v?"1":"0";a[5]=r(n.f||(n.v?"TRUE":"FALSE"));break;case"d":var f=fr(wr(n.v));a[2]="vtc";a[3]="nd";a[4]=""+f;a[5]=n.w||$e(n.z||Y[14],f);break;case"e":continue;}t.push(a.join(":"))}}t.push("sheet:c:"+(i.e.c-i.s.c+1)+":r:"+(i.e.r-i.s.r+1)+":tvf:1");t.push("valueformat:1:text-wiki");return t.join("\n")}function f(e){return[s,i,l,i,c(e),o].join("\n")}return{to_workbook:n,to_sheet:a,from_sheet:f}}();var Zn=function(){function e(e,r,t,a,n){if(n.raw)r[t][a]=e;el
t[t.length]="</a:lnStyleLst>";t[t.length]="<a:effectStyleLst>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]="</a:effectStyle>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]="</a:effectStyle>";t[t.length]="<a:effectStyle>";t[t.length]="<a:effectLst>";t[t.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>';t[t.length]="</a:effectLst>";t[t.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>';t[t.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>';t[t.length]="</a:effectStyle>";t[t.length]="</a:effectStyleLst>";t[t.length]="<a:bgFillStyleLst>";t[t.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>';t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>';t[t.length]="</a:gradFill>";t[t.length]='<a:gradFill rotWithShape="1">';t[t.length]="<a:gsLst>";t[t.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>';t[t.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>';t[t.length]="</a:gsLst>";t[t.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>';t[t.length]="</a:gradFill>";t[t.length]="</a:bgFillStyleLst>";t[t.length]="</a:fmtScheme>";t[t.length]="</a:themeElements>";t[t.length]="<a:objectDefaults>";t[t.length]="<a:spDef>";t[t.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>';t[t.length]="</a:spDef>";t[t.length]="<a:lnDef>";t[t.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>';t[t.length]="</a:lnDef>";t[t.length]="</a:objectDefaults>";t[t.length]="<a:extraClrSchemeLst/>";t[t.length]="</a:theme>";return t.join("")}function ei(e,r,t){var a={Types:[],Cell:[],Value:[]};if(!e)return a;var n=false;var s=2;var i;e.replace(Xr,function(e){var r=Jr(e);switch(Kr(r[0])){case"<?xml":break;case"<metadata":;case"</metadata>":break;case"<metadataTypes":;case"</metadataTypes>":break;case"<metadataType":a.Types.push({name:r.name});break;case"</metadataType>":break;case"<futureMetadata":for(var l=0;l<a.Types.length;++l)if(a.Types[l].name==r.name)i=a.Types[l];break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":if(s==1)a.Cell.push({type:a.Types[r.t-1].name,index:+r.v});else if(s==0)a.Value.push({type:a.Types[r.t-1].name,index:+r.v});break;case"</rc>":break;case"<cellMetadata":s=1;break;case"</cellMetadata>":s=2;break;case"<valueMetadata":s=0;break;case"</valu
var _l=[["activeTab",0,"int"],["autoFilterDateGrouping",true,"bool"],["firstSheet",0,"int"],["minimized",false,"bool"],["showHorizontalScroll",true,"bool"],["showSheetTabs",true,"bool"],["showVerticalScroll",true,"bool"],["tabRatio",600,"int"],["visibility","visible"]];var Al=[];var Fl=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function El(e,r){for(var t=0;t!=e.length;++t){var a=e[t];for(var n=0;n!=r.length;++n){var s=r[n];if(a[s[0]]==null)a[s[0]]=s[1];else switch(s[2]){case"bool":if(typeof a[s[0]]=="string")a[s[0]]=ct(a[s[0]]);break;case"int":if(typeof a[s[0]]=="string")a[s[0]]=parseInt(a[s[0]],10);break;}}}}function Tl(e,r){for(var t=0;t!=r.length;++t){var a=r[t];if(e[a[0]]==null)e[a[0]]=a[1];else switch(a[2]){case"bool":if(typeof e[a[0]]=="string")e[a[0]]=ct(e[a[0]]);break;case"int":if(typeof e[a[0]]=="string")e[a[0]]=parseInt(e[a[0]],10);break;}}}function Dl(e){Tl(e.WBProps,Cl);Tl(e.CalcPr,Fl);El(e.WBView,_l);El(e.Sheets,Al);Pi.date1904=ct(e.WBProps.date1904)}function Ol(e){if(!e.Workbook)return"false";if(!e.Workbook.WBProps)return"false";return ct(e.Workbook.WBProps.date1904)?"true":"false"}var Ml="][*?/\\".split("");function Nl(e,r){if(e.length>31){if(r)return false;throw new Error("Sheet names cannot exceed 31 chars")}var t=true;Ml.forEach(function(a){if(e.indexOf(a)==-1)return;if(!r)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");t=false});return t}function Pl(e,r,t){e.forEach(function(a,n){Nl(a);for(var s=0;s<n;++s)if(a==e[s])throw new Error("Duplicate Sheet Name: "+a);if(t){var i=r&&r[n]&&r[n].CodeName||a;if(i.charCodeAt(0)==95&&i.length>22)throw new Error("Bad Code Name: Worksheet"+i)}})}function Il(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var r=e.Workbook&&e.Workbook.Sheets||[];Pl(e.SheetNames,r,!!e.vbaraw);for(var t=0;t<e.SheetNames.length;++t)Wi(e.Sheets[e.SheetNames[t]],e.SheetNames[t],t);e.SheetNames.forEach(function(r,t){var a=e.Sheets[r];if(!a||!a["!autofilter"])return;var n;if(!e.Workbook)e.Workbook={};if(!e.Workbook.Names)e.Workbook.Names=[];e.Workbook.Names.forEach(function(e){if(e.Name=="_xlnm._FilterDatabase"&&e.Sheet==t)n=e});var s=za(r)+"!"+Ba(a["!autofilter"].ref);if(n)n.Ref=s;else e.Workbook.Names.push({Name:"_xlnm._FilterDatabase",Sheet:t,Ref:s})})}var Rl=/<\w+:workbook/;function Ll(e,r){if(!e)throw new Error("Could not find file");var t={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""};var a=false,n="xmlns";var s={},i=0;e.replace(Xr,function l(o,c){var f=Jr(o);switch(Kr(f[0])){case"<?xml":break;case"<workbook":if(o.match(Rl))n="xmlns"+o.match(/<(\w+):/)[1];t.xmlns=f[n];break;case"</workbook>":break;case"<fileVersion":delete f[0];t.AppVersion=f;break;case"<fileVersion/>":;case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":;case"<workbookPr/>":Cl.forEach(function(e){if(f[e[0]]==null)return;switch(e[2]){case"bool":t.WBProps[e[0]]=ct(f[e[0]]);break;case"int":t.WBProps[e[0]]=parseInt(f[e[0]],10);break;default:t.WBProps[e[0]]=f[e[0]];}});if(f.codeName)t.WBProps.CodeName=mt(f.codeName);break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":;case"<bookViews>":;case"</bookViews>":break;case"<workbookView":;case"<workbookView/>":delete f[0];t.WBView.push(f);break;case"</workbookView>":break;case"<sheets":;case"<sheets>":;case"</sheets>":break;case"<sheet":switch(f.state){case"hidden":f.Hidden=1;break;case"veryHidden":f.Hidden=2;break;default:f.Hidden=0;}delete f.state;f.name=Qr(mt(f.name));delete f[0];t.Sheets.push(f);break;case"</sheet>":break;case"<functionGroups":;case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":;case"</externalReferences>":;case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames
break;case"ddd":;case"dddd":a+='<number:day-of-week number:style="'+(s.length%2?"short":"long")+'"/>';break;}break;case'"':while(e[++i]!='"'||e[++i]=='"')s+=e[i];--i;a+="<number:text>"+tt(s.slice(1).replace(/""/g,'"'))+"</number:text>";break;case"/":a+="<number:text>"+tt(s)+"</number:text>";break;default:console.error("unrecognized character "+s+" in ODF format "+e);}if(!o)break e;e=e.slice(i+1);i=0}if(e.match(/^\[?[hms]/)){if(t=="number")t="time";if(e.match(/\[/)){e=e.replace(/[\[\]]/g,"");n["number:truncate-on-overflow"]="false"}for(;i<e.length;++i)switch(s=e[i].toLowerCase()){case"h":;case"m":;case"s":while((e[++i]||"").toLowerCase()==s[0])s+=s[0];--i;switch(s){case"h":;case"hh":a+='<number:hours number:style="'+(s.length%2?"short":"long")+'"/>';break;case"m":;case"mm":a+='<number:minutes number:style="'+(s.length%2?"short":"long")+'"/>';break;case"s":;case"ss":if(e[i+1]==".")do{s+=e[i+1];++i}while(e[i+1]=="0");a+='<number:seconds number:style="'+(s.match("ss")?"long":"short")+'"'+(s.match(/\./)?' number:decimal-places="'+(s.match(/0+/)||[""])[0].length+'"':"")+"/>";break;}break;case'"':while(e[++i]!='"'||e[++i]=='"')s+=e[i];--i;a+="<number:text>"+tt(s.slice(1).replace(/""/g,'"'))+"</number:text>";break;case"/":a+="<number:text>"+tt(s)+"</number:text>";break;case"a":if(e.slice(i,i+3).toLowerCase()=="a/p"){a+="<number:am-pm/>";i+=2;break}if(e.slice(i,i+5).toLowerCase()=="am/pm"){a+="<number:am-pm/>";i+=4;break};default:console.error("unrecognized character "+s+" in ODF format "+e);}break e}if(e.indexOf(/\$/)>-1){t="currency"}if(e[0]=="$"){a+='<number:currency-symbol number:language="en" number:country="US">$</number:currency-symbol>';e=e.slice(1);i=0}i=0;if(e[i]=='"'){while(e[++i]!='"'||e[++i]=='"')s+=e[i];--i;if(e[i+1]=="*"){i++;a+="<number:fill-character>"+tt(s.replace(/""/g,'"'))+"</number:fill-character>"}else{a+="<number:text>"+tt(s.replace(/""/g,'"'))+"</number:text>"}e=e.slice(i+1);i=0}var f=e.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(!f||!f[0])console.error("Could not find numeric part of "+e);else{var u=f[1].replace(/,/g,"");a+="<number:"+(f[3]?"scientific-":"")+"number"+' number:min-integer-digits="'+(u.indexOf("0")==-1?"0":u.length-u.indexOf("0"))+'"'+(f[0].indexOf(",")>-1?' number:grouping="true"':"")+(f[2]&&' number:decimal-places="'+(f[2].length-1)+'"'||' number:decimal-places="0"')+(f[3]&&f[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(f[3]?' number:min-exponent-digits="'+f[3].match(/0+/)[0].length+'"':"")+">"+"</number:"+(f[3]?"scientific-":"")+"number>";i=f.index+f[0].length}if(e[i]=='"'){s="";while(e[++i]!='"'||e[++i]=='"')s+=e[i];--i;a+="<number:text>"+tt(s.replace(/""/g,'"'))+"</number:text>"}}if(!a){console.error("Could not generate ODS number format for |"+e+"|");return""}return _t("number:"+t+"-style",a,n)}function vo(e,r,t){var a=e.filter(function(e){return e.Sheet==(t==-1?null:t)});if(!a.length)return"";return" <table:named-expressions>\n"+a.map(function(e){var r=Mi(e.Ref);return" "+_t("table:named-range",null,{"table:name":e.Name,"table:cell-range-address":r,"table:base-cell-address":r.replace(/[\.]?[^\.]*$/,".$A$1")})}).join("\n")+"\n </table:named-expressions>\n"}var go=function(){var e=function(e){return tt(e).replace(/ +/g,function(e){return'<text:s text:c="'+e.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")};var r=" <table:table-cell />\n";var t=" <table:covered-table-cell/>\n";var a=function(a,n,s,i,l){var o=[];o.push(' <table:table table:name="'+tt(n.SheetNames[s])+'" table:style-name="ta1">\n');var c=0,f=0,u=Ra(a["!ref"]||"A1");var h=a["!merges"]||[],d=0;var m=Array.isArray(a);if(a["!cols"]){for(f=0;f<=u.e.c;++f)o.push(" <table:table-column"+(a["!cols"][f]?' table:style-name="co'+a["!cols"][f].ods+'"':"")+"></table:table-column>\n")}var p="",v=a["!rows"]||[];for(c=0;c<u.s.r;++c){p=v[c]?' table:style-name="ro'+v[c].ods+'"':"";o.push(" <table:table-row"+p+"></table:table-row>\n")}for(;c<=u.e.r;++c){p=v[c]?' table:style-name="ro'+v[
return Xo(bo(e,t),t);case"wk1":return Yo(WK_.sheet_to_wk1(e.Sheets[e.SheetNames[n]],t),t);case"wk3":return Yo(WK_.book_to_wk3(e,t),t);case"biff2":if(!t.biff)t.biff=2;case"biff3":if(!t.biff)t.biff=3;case"biff4":if(!t.biff)t.biff=4;return Yo(write_biff_buf(e,t),t);case"biff5":if(!t.biff)t.biff=5;case"biff8":;case"xla":;case"xls":if(!t.biff)t.biff=8;return Vo(e,t);case"xlsx":;case"xlsm":;case"xlam":;case"xlsb":;case"numbers":;case"ods":return Uo(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|");}}function Zo(e){if(e.bookType)return;var r={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"};var t=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();if(t.match(/^\.[a-z]+$/))e.bookType=t.slice(1);e.bookType=r[e.bookType]||e.bookType}function qo(e,r,t){var a=t||{};a.type="file";a.file=r;Zo(a);return Ko(e,a)}function Qo(e,r,t){var a=t||{};a.type="file";a.file=r;Zo(a);return Jo(e,a)}function ec(e,r,t,a){var n=t||{};n.type="file";n.file=e;Zo(n);n.type="buffer";var s=a;if(!(s instanceof Function))s=t;return Qe.writeFile(e,Ko(r,n),s)}function rc(e,r,t,a,n,s,i,l){var o=Aa(t);var c=l.defval,f=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw");var u=true;var h=n===1?[]:{};if(n!==1){if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:t,enumerable:false})}catch(d){h.__rowNum__=t}else h.__rowNum__=t}if(!i||e[t])for(var m=r.s.c;m<=r.e.c;++m){var p=i?e[t][m]:e[a[m]+o];if(p===undefined||p.t===undefined){if(c===undefined)continue;if(s[m]!=null){h[s[m]]=c}continue}var v=p.v;switch(p.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":;case"d":;case"b":;case"n":break;default:throw new Error("unrecognized type "+p.t);}if(s[m]!=null){if(v==null){if(p.t=="e"&&v===null)h[s[m]]=null;else if(c!==undefined)h[s[m]]=c;else if(f&&v===null)h[s[m]]=null;else continue}else{h[s[m]]=f&&(p.t!=="n"||p.t==="n"&&l.rawNumbers!==false)?v:Ua(p,v,l)}if(v!=null)u=false}}return{row:h,isempty:u}}function tc(e,r){if(e==null||e["!ref"]==null)return[];var t={t:"n",v:0},a=0,n=1,s=[],i=0,l="";var o={s:{r:0,c:0},e:{r:0,c:0}};var c=r||{};var f=c.range!=null?c.range:e["!ref"];if(c.header===1)a=1;else if(c.header==="A")a=2;else if(Array.isArray(c.header))a=3;else if(c.header==null)a=0;switch(typeof f){case"string":o=$a(f);break;case"number":o=$a(e["!ref"]);o.s.r=f;break;default:o=f;}if(a>0)n=0;var u=Aa(o.s.r);var h=[];var d=[];var m=0,p=0;var v=Array.isArray(e);var g=o.s.r,b=0;var w={};if(v&&!e[g])e[g]=[];var k=c.skipHidden&&e["!cols"]||[];var y=c.skipHidden&&e["!rows"]||[];for(b=o.s.c;b<=o.e.c;++b){if((k[b]||{}).hidden)continue;h[b]=Da(b);t=v?e[g][b]:e[h[b]+u];switch(a){case 1:s[b]=b-o.s.c;break;case 2:s[b]=h[b];break;case 3:s[b]=c.header[b-o.s.c];break;default:if(t==null)t={w:"__EMPTY",t:"s"};l=i=Ua(t,null,c);p=w[i]||0;if(!p)w[i]=1;else{do{l=i+"_"+p++}while(w[l]);w[i]=p;w[l]=1}s[b]=l;}}for(g=o.s.r+n;g<=o.e.r;++g){if((y[g]||{}).hidden)continue;var x=rc(e,o,g,h,a,s,v,c);if(x.isempty===false||(a===1?c.blankrows!==false:!!c.blankrows))d[m++]=x.row}d.length=m;return d}var ac=/"/g;function nc(e,r,t,a,n,s,i,l){var o=true;var c=[],f="",u=Aa(t);for(var h=r.s.c;h<=r.e.c;++h){if(!a[h])continue;var d=l.dense?(e[t]||[])[h]:e[a[h]+u];if(d==null)f="";else if(d.v!=null){o=false;f=""+(l.rawNumbers&&d.t=="n"?d.v:Ua(d,null,l));for(var m=0,p=0;m!==f.length;++m)if((p=f.charCodeAt(m))===n||p===s||p===34||l.forceQuotes){f='"'+f.replace(ac,'""')+'"';break}if(f=="ID")f='"ID"'}else if(d.f!=null&&!d.F){o=false;f="="+d.f;if(f.indexOf(",")>=0)f='"'+f.replace(ac,'""')+'"'}else f="";c.push(f)}if(l.blankrows===false&&o)return null;return c.join(i)}function sc(e,r){var t=[];var a=r==null?{}:r;if(e==null||e["!ref"]==null)return"";var n=$a(e["!ref"]);var s=a.FS!==undefined?a.FS:",",i=s.charCodeAt(0);var l=a.RS!==undefined?a.RS:"\n",o=l.charCodeAt(0);var c=new RegExp((s=="|"?"\\|":s)+"+$");var f="",u=[];a.dense=Array.isArray(e);var h=a.skipHidden&&e["!cols"]||[];var d=a.skipHidden&&e["!rows"]||[];for(var m=n.s.c;m<=n.e.c;++m)if(!(h[m]||{}).hidden)u[m]=Da(m);var p=0;for(var v=n.s.r;v<=n.e.r;++v){if((d[v]||{}).hidden)continue;f=nc