Lines Matching refs:function

37 var set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS…
38 function reset_ansi() { set_ansi(1252); }
40 var set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };
41 function reset_cp() { set_cp(1200); reset_ansi(); }
43 function char_codes(data/*:string*/)/*:Array<number>*/ { var o/*:Array<number>*/ = []; for(var i = …
45 function utf16leread(data/*:string*/)/*:string*/ {
50 function utf16beread(data/*:string*/)/*:string*/ {
56 var debom = function(data/*:string*/)/*:string*/ {
64 var _getchar = function _gc1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
65 var _getansi = function _ga1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
67 function set_cptable(cptable) {
69 set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };
70 debom = function(data/*:string*/) {
74 _getchar = function _gc2(x/*:number*/)/*:string*/ {
78 _getansi = function _ga2(x/*:number*/)/*:string*/ {
86 function Base64_encode(input) {
106 function Base64_encode_pass(input) {
132 function Base64_decode(input) {
154 var has_buf = /*#__PURE__*/(function() { return typeof Buffer !== 'undefined' && typeof process !==…
156 var Buffer_from = /*#__PURE__*/(function() {
160 …return nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buff…
162 return function() {};
164 var buf_utf16le = /*#__PURE__*/(function() {
173 function new_raw_buf(len/*:number*/) {
180 function new_unsafe_buf(len/*:number*/) {
187 var s2a = function s2a(s/*:string*/)/*:any*/ {
189 return s.split("").map(function(x/*:string*/)/*:number*/{ return x.charCodeAt(0) & 0xff; });
192 function s2ab(s/*:string*/)/*:any*/ {
199 function a2s(data/*:any*/)/*:string*/ {
200 if(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join("");
204 function a2u(data/*:Array<number>*/)/*:Uint8Array*/ {
209 function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {
218 …as_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf…
232 …return [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.cal…
235 function utf8decode(content/*:string*/) {
288 function _strrev(x/*:string*/)/*:string*/ { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i…
289 function pad0(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.leng…
290 function pad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v;return t.length>=d?t:fill(' ',d-t.lengt…
291 function rpad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:t+fill(' ',d-t.l…
292 function pad0r1(v/*:any*/,d/*:number*/)/*:string*/{var t=""+Math.round(v); return t.length>=d?t:fil…
293 function pad0r2(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.le…
295 function pad0r(v/*:any*/,d/*:number*/)/*:string*/{if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i =…
297 function SSF_isgeneral(s/*:string*/, i/*:?number*/)/*:boolean*/ { i = i || 0; return s.length >= 7 …
321 function SSF_init_table(t/*:any*/) {
441 function SSF_frac(x/*:number*/, D/*:number*/, mixed/*:?boolean*/)/*:Array<number>*/ {
461 function SSF_parse_date_code(v/*:number*/,opts/*:?any*/,b2/*:?boolean*/) {
494 function datenum_local(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
503 function SSF_strip_decimal(o/*:string*/)/*:string*/ {
508 function SSF_normalize_exp(o/*:string*/)/*:string*/ {
514 function SSF_small_exp(v/*:number*/)/*:string*/ {
522 function SSF_large_exp(v/*:number*/)/*:string*/ {
527 function SSF_general_num(v/*:number*/)/*:string*/ {
549 function SSF_general(v/*:any*/, opts/*:any*/) {
562 function SSF_fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) {
570 function SSF_write_date(type/*:number*/, fmt/*:string*/, val, ss0/*:?number*/)/*:string*/ {
638 function commaify(s/*:string*/)/*:string*/ {
646 function write_num_pct(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
651 function write_num_cm(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
657 function write_num_exp(fmt/*:string*/, val/*:number*/)/*:string*/{
677 …o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(per…
684 function write_num_f1(r/*:Array<string>*/, aval/*:number*/, sign/*:string*/)/*:string*/ {
689 function write_num_f2(r/*:Array<string>*/, aval/*:number*/, sign/*:string*/)/*:string*/ {
695 function hashq(str/*:string*/)/*:string*/ {
705 function rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return ""+(Math.ro…
706 function dec(val/*:number*/, d/*:number*/)/*:number*/ {
711 function carry(val/*:number*/, d/*:number*/)/*:number*/ {
717 function flr(val/*:number*/)/*:string*/ {
721 function write_num_flt(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {
741 …$/,"$1."+hashq(r[1])).replace(/\.$/,"."+hashq(r[1])).replace(/\.(\d*)$/,function($$, $1) { return …
756 …return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri<o.length?o.cha…
793 … -val) : commaify(flr(val)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function($$) { return "00,…
806 function write_num_cm2(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
811 function write_num_pct2(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
815 function write_num_exp2(fmt/*:string*/, val/*:number*/)/*:string*/{
831 …o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(per…
837 function write_num_int(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {
859 o = o.replace(/\.(\d*)$/,function($$, $1) {
876 …return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri<o.length?o.cha…
912 …t, -val) : commaify(""+val).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function($$) { return "00,…
923 function write_num(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {
926 function SSF_split_fmt(fmt/*:string*/)/*:Array<string>*/ {
944 function fmt_is_date(fmt/*:string*/)/*:boolean*/ {
986 function eval_fmt(fmt/*:string*/, v/*:any*/, opts/*:any*/, flen/*:number*/) {
1195 function chkcond(v, rr) {
1208 function choose_fmt(f/*:string*/, v/*:any*/) {
1229 function SSF_format(fmt/*:string|number*/,v/*:any*/,o/*:?any*/) {
1252 function SSF_load(fmt/*:string*/, idx/*:?number*/)/*:number*/ {
1268 function SSF_load_table(tbl/*:SSFTable*/)/*:void*/ {
1273 function make_ssf() {
1284 get_table: function get_table() { return SSF._table = table_fmt; }
1329 function dateNF_regex(dateNF/*:string|number*/)/*:RegExp*/ {
1334 function dateNF_fix(str/*:string*/, dateNF/*:string*/, match/*:Array<string>*/)/*:string*/ {
1336 (dateNF.match(dateNFregex)||[]).forEach(function(n, i) {
1359 function SSF__load(fmt, idx) {
1404 var CRC32 = /*#__PURE__*/(function() {
1409 function signed_crc_table()/*:any*/ {
1429 function slice_by_16_tables(T) {
1445 function crc32_bstr(bstr/*:string*/, seed/*:number*/)/*:number*/ {
1451 function crc32_buf(B/*:Uint8Array|Array<number>*/, seed/*:number*/)/*:number*/ {
1466 function crc32_str(str/*:string*/, seed/*:number*/)/*:number*/ {
1496 var CFB = /*#__PURE__*/(function _CFB(){
1500 function namecmp(l/*:string*/, r/*:string*/)/*:number*/ {
1508 function dirname(p/*:string*/)/*:string*/ {
1514 function filename(p/*:string*/)/*:string*/ {
1527 function write_dos_date(buf/*:CFBlob*/, date/*:Date|string*/) {
1540 function parse_dos_date(buf/*:CFBlob*/)/*:Date*/ {
1557 function parse_extra_field(blob/*:CFBlob*/)/*:any*/ {
1592 function get_fs() { return fs || (fs = _fs); }
1593 function parse(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
1695 function check_get_mver(blob/*:CFBlob*/)/*:[number, number]*/ {
1709 function check_shifts(blob/*:CFBlob*/, mver/*:number*/)/*:void*/ {
1731 function sectorify(file/*:RawBytes*/, ssz/*:number*/)/*:Array<RawBytes>*/ {
1740 function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Array<string>*/)/*:voi…
1778 function get_mfat_entry(entry/*:CFBEntry*/, payload/*:RawBytes*/, mini/*:?RawBytes*/)/*:CFBlob*/ {
1794 function sleuth_fat(idx/*:number*/, cnt/*:number*/, sectors/*:Array<RawBytes>*/, ssz/*:number*/, fa…
1810 function get_sector_list(sectors/*:Array<RawBytes>*/, start/*:number*/, fat_addrs/*:Array<number>*/…
1828 function make_sector_list(sectors/*:Array<RawBytes>*/, dir_start/*:number*/, fat_addrs/*:Array<numb…
1856 function read_directory(dir_start/*:number*/, sector_list/*:SectorList*/, sectors/*:Array<RawBytes>…
1907 function read_date(blob/*:RawBytes|CFBlob*/, offset/*:number*/)/*:Date*/ {
1911 function read_file(filename/*:string*/, options/*:CFBReadOpts*/) {
1916 function read(blob/*:RawBytes|string*/, options/*:CFBReadOpts*/) {
1929 function init_cfb(cfb/*:CFBContainer*/, opts/*:?any*/)/*:void*/ {
1941 function seed_cfb(cfb/*:CFBContainer*/)/*:void*/ {
1949 function rebuild_cfb(cfb/*:CFBContainer*/, f/*:?boolean*/)/*:void*/ {
2000 data.sort(function(x,y) { return namecmp(x[0], y[0]); });
2030 function _write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {
2039 var L = (function(cfb/*:CFBContainer*/)/*:Array<number>*/{
2090 var chainit = function(w/*:number*/)/*:void*/ {
2192 function find(cfb/*:CFBContainer*/, path/*:string*/)/*:?CFBEntry*/ {
2193 var UCFullPaths/*:Array<string>*/ = cfb.FullPaths.map(function(x) { return x.toUpperCase(); });
2194 …var UCPaths/*:Array<string>*/ = UCFullPaths.map(function(x) { var y = x.split("/"); return y[y.len…
2237 function write_file(cfb/*:CFBContainer*/, filename/*:string*/, options/*:CFBWriteOpts*/)/*:void*/ {
2244 function a2s(o/*:RawBytes*/)/*:string*/ {
2250 function write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {
2264 function use_zlib(zlib) { try {
2272 function _inflateRawSync(payload, usz) {
2281 function _deflateRawSync(payload) {
2292 function bit_swap_8(n) { var t = (((((n<<1)|(n<<11)) & 0x22110) | (((n<<5)|(n<<15)) & 0x88440))); r…
2299 function bit_swap_n(n, b) {
2309 function read_bits_2(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 6 ? 0 : buf[h+1…
2310 function read_bits_3(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 5 ? 0 : buf[h+1…
2311 function read_bits_4(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 4 ? 0 : buf[h+1…
2312 function read_bits_5(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 3 ? 0 : buf[h+1…
2313 function read_bits_7(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 1 ? 0 : buf[h+1…
2316 function read_bits_n(buf, bl, n) {
2329 function write_bits_3(buf, bl, v) { var w = bl & 7, h = bl >>> 3;
2338 function write_bits_1(buf, bl, v) {
2344 function write_bits_8(buf, bl, v) {
2351 function write_bits_16(buf, bl, v) {
2361 function realloc(b, sz/*:number*/) {
2381 function zero_fill_array(n) {
2388 function build_tree(clens, cmap, MAX/*:number*/)/*:number*/ {
2432 (function() {
2445 })();var _deflateRaw = /*#__PURE__*/(function _deflateRawIIFE() {
2458 function write_stored(data, out) {
2472 function write_huff_fixed(data, out) {
2551 return function _deflateRaw(data, out) {
2557 function _deflate(data) {
2562 /* modified inflate function also moves original read head */
2570 function dyn(data, boff/*:number*/) {
2643 function inflate(data, usz/*:number*/) {
2721 function _inflate(payload, usz) {
2728 function warn_or_throw(wrn, msg) {
2733 function parse_zip(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
2787 function parse_local_file(blob/*:CFBlob*/, csz/*:number*/, usz/*:number*/, o/*:CFBContainer*/, EF) {
2842 function write_zip(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes*/ {
2960 function get_content_type(fi/*:CFBEntry*/, fp/*:string*/)/*:string*/ {
2975 function write_base64_76(bstr/*:string*/)/*:string*/ {
2996 function write_quoted_printable(text/*:string*/)/*:string*/ {
2997 var encoded = text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g, function(c) {
3026 function parse_quoted_printable(data/*:Array<string>*/)/*:RawBytes*/ {
3037 …for(var oi = 0; oi < o.length; ++oi) o[oi] = o[oi].replace(/[=][0-9A-Fa-f]{2}/g, function($$) { re…
3042 function parse_mime(cfb/*:CFBContainer*/, data/*:Array<string>*/, root/*:string*/)/*:void*/ {
3065 function parse_mad(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
3106 function write_mad(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:string*/ {
3126 fp = fp.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(c) {
3128 }).replace(/[\u0080-\uFFFF]/g, function(u) {
3153 function cfb_new(opts/*:?any*/)/*:CFBContainer*/ {
3159 function cfb_add(cfb/*:CFBContainer*/, name/*:string*/, content/*:?RawBytes*/, opts/*:?any*/)/*:CFB…
3186 function cfb_del(cfb/*:CFBContainer*/, name/*:string*/)/*:boolean*/ {
3197 function cfb_mov(cfb/*:CFBContainer*/, old_name/*:string*/, new_name/*:string*/)/*:boolean*/ {
3208 function cfb_gc(cfb/*:CFBContainer*/)/*:void*/ { rebuild_cfb(cfb, true); }
3235 function set_fs(fs) { _fs = fs; }
3238 function blobify(data) {
3244 function write_dl(fname/*:string*/, payload/*:any*/, enc/*:?string*/) {
3269 if(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == "function") {
3270 …if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObj…
3278 …if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObj…
3294 function read_binary(path/*:string*/) {
3306 function keys(o/*:any*/)/*:Array<any>*/ {
3312 function evert_key(obj/*:any*/, key/*:string*/)/*:EvertType*/ {
3318 function evert(obj/*:any*/)/*:EvertType*/ {
3324 function evert_num(obj/*:any*/)/*:EvertNumType*/ {
3330 function evert_arr(obj/*:any*/)/*:EvertArrType*/ {
3340 function datenum(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
3349 function numdate(v/*:number*/)/*:Date*/ {
3359 function parse_isodur(s) {
3389 function parseDate(str/*:string|Date*/, fixdate/*:?number*/)/*:Date*/ {
3409 function cc2str(arr/*:Array<number>*/, debomit)/*:string*/ {
3434 …return new TextDecoder("latin1").decode(arr).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(c)…
3442 function dup(o/*:any*/)/*:any*/ {
3451 function fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = ""; while(o.length < l) o+=c; return …
3454 function fuzzynum(s/*:string*/)/*:number*/ {
3459 …var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= …
3461 ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});
3469 function fuzzytime1(M) /*:Date*/ {
3480 function fuzzydate(s/*:string*/)/*:Date*/ {
3497 var split_regex = /*#__PURE__*/(function() {
3499 return function split_regex(str/*:string*/, re, def/*:string*/)/*:Array<string>*/ {
3506 function getdatastr(data)/*:?string*/ {
3516 function getdatabin(data) {
3529 function getdata(data) { return (data && data.name.slice(-4) === ".bin") ? getdatabin(data) : getda…
3533 function safegetzipfile(zip, file/*:string*/) {
3543 function getzipfile(zip, file/*:string*/) {
3549 function getzipdata(zip, file/*:string*/, safe/*:?boolean*/)/*:any*/ {
3555 function getzipstr(zip, file/*:string*/, safe/*:?boolean*/)/*:?string*/ {
3561 function getzipbin(zip, file/*:string*/, safe/*:?boolean*/)/*:any*/ {
3567 function zipentries(zip) {
3573 function zip_add_file(zip, path, content) {
3588 function zip_new() { return CFB.utils.cfb_new(); }
3590 function zip_read(d, o) {
3599 function resolve_path(path/*:string*/, base/*:string*/)/*:string*/ {
3616 function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/, skip_LC/*:?boolean*/)/*:any*/ {
3645 function strip_ns(x/*:string*/)/*:string*/ { return x.replace(nsregex2, "<$1"); }
3658 var unescapexml/*:StringConv*/ = /*#__PURE__*/(function() {
3661 function raw_unescapexml(text/*:string*/)/*:string*/ {
3663 …ncregex, function($$, $1) { return encodings[$$]||String.fromCharCode(parseInt($1,$$.indexOf("x")>…
3667 return function unescapexml(text/*:string*/, xlsx/*:boolean*/) {
3674 function escapexml(text/*:string*/)/*:string*/{
3676 …return s.replace(decregex, function(y) { return rencoding[y]; }).replace(charegex,function(s) { re…
3678 function escapexmltag(text/*:string*/)/*:string*/{ return escapexml(text).replace(/ /g,"_x0020_"); }
3681 function escapehtml(text/*:string*/)/*:string*/{
3683 …return s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\n/g, "<br/>").replace(h…
3686 function escapexlml(text/*:string*/)/*:string*/{
3688 …return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) …
3692 var xlml_fixstr/*:StringConv*/ = /*#__PURE__*/(function() {
3694function entrepl($$/*:string*/,$1/*:string*/)/*:string*/ { return String.fromCharCode(parseInt($1,…
3695 return function xlml_fixstr(str/*:string*/)/*:string*/ { return str.replace(entregex,entrepl); };
3697 function xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\r\n|[\r\n])/g,"\&#10;"); }
3700 function parsexmlbool(value/*:any*/)/*:boolean*/ {
3709 function utf8reada(orig/*:string*/)/*:string*/ {
3726 function utf8readb(data) {
3743 function utf8readc(data) { return Buffer_from(data, 'binary').toString('utf8'); }
3748 …f8write/*:StringConv*/ = has_buf ? function(data) { return Buffer_from(data, 'utf8').toString("bin…
3775 var matchtag = /*#__PURE__*/(function() {
3777 return function matchtag(f/*:string*/,g/*:?string*/)/*:RegExp*/ {
3784 var htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() {
3788 ].map(function(x/*:[string, string]*/) { return [new RegExp('&' + x[0] + ';', "ig"), x[1]]; });
3789 return function htmldecode(str/*:string*/)/*:string*/ {
3808 var vtregex = /*#__PURE__*/(function(){ var vt_cache = {};
3809 return function vt_regex(bt) {
3814 function parseVector(data/*:string*/, opts)/*:Array<{v:string,t:string}>*/ {
3823 matches.forEach(function(x/*:string*/) {
3831 function writetag(f/*:string*/,g/*:string*/)/*:string*/ { return '<' + f + (g.match(wtregex)?' xml:…
3833 function wxt_helper(h)/*:string*/ { return keys(h).map(function(k) { return " " + k + '="' + h[k] +…
3834 function writextag(f/*:string*/,g/*:?string*/,h) { return '<' + f + ((h != null) ? wxt_helper(h) : …
3836 function write_w3cdtf(d/*:Date*/, t/*:?boolean*/)/*:string*/ { try { return d.toISOString().replace…
3838 function write_vt(s, xlsx/*:?boolean*/)/*:string*/ {
3851 function xlml_normalize(d)/*:string*/ {
3896 function read_double_le(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ {
3907 function write_double_le(b/*:RawBytes|CFBlob*/, v/*:number*/, idx/*:number*/) {
3923 var ___toBuffer = function(bufs/*:Array<Array<RawBytes> >*/)/*:RawBytes*/ { var x=[],w=10240; for(v…
3924 …oBuffer = has_buf ? function(bufs) { return (bufs[0].length > 0 && Buffer.isBuffer(bufs[0][0])) ? …
3926 var ___utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { var ss/*:Ar…
3927 var __utf16le = has_buf ? function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { if…
3929 var ___hexlify = function(b/*:RawBytes|CFBlob*/,s/*:number*/,l/*:number*/)/*:string*/ { var ss/*:Ar…
3930 var __hexlify = has_buf ? function(b/*:RawBytes|CFBlob*/,s/*:number*/,l/*:number*/)/*:string*/ { re…
3932 var ___utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { var ss=[]; for(var i=s; i…
3933 var __utf8 = has_buf ? function utf8_b(b/*:RawBytes|CFBlob*/, s/*:number*/, e/*:number*/) { return …
3935 var ___lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return…
3938 var ___cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return…
3941 var ___lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); ret…
3944 var ___lpp4 = function lpp4_(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); r…
3947 var ___8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return…
3950 var ___double = function(b/*:RawBytes|CFBlob*/, idx/*:number*/) { return read_double_le(b, idx);};
3953 var is_buf = function is_buf_a(a) { return Array.isArray(a) || (typeof Uint8Array !== "undefined" &…
3956 …__lpstr = function lpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(…
3957 …__cpstr = function cpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(…
3958 …__lpwstr = function lpwstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || …
3959 …__lpp4 = function lpp4_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b …
3960 …__8lpp4 = function lpp4_8b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(…
3961 …__double = function double_(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(Buffer.isBuffer(b)/*::&& b i…
3962 …is_buf = function is_buf_b(a) { return Buffer.isBuffer(a) || Array.isArray(a) || (typeof Uint8Arra…
3966 function cpdoit() {
3967 …__utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.deco…
3968 …__utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(…
3969 …__lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len…
3970 …__cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len…
3971 …__lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return …
3972 …__lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len …
3973 …__8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len…
3977 var __readUInt8 = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx]; };
3978 var __readUInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+1]*…
3979 var __readInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { var u = (b[idx+1]*…
3980 var __readUInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx+3]*(…
3981 var __readInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+3]<<…
3982 var __readInt32BE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx]<<24…
3984 function ReadShift(size/*:number*/, t/*:?string*/)/*:number|string*/ {
4069 var __writeUInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[…
4070 var __writeInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[…
4071 var __writeUInt16LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[…
4073 function WriteShift(t/*:number*/, val/*:string|number*/, f/*:?string*/)/*:any*/ {
4130 function CheckField(hexstr/*:string*/, fld/*:string*/)/*:void*/ {
4136 function prep_blob(blob, pos/*:number*/)/*:void*/ {
4143 function parsenoop(blob, length/*:: :number, opts?:any */) { blob.l += length; }
4145 function new_buf(sz/*:number*/)/*:Block*/ {
4152 function recordhopper(data, cb/*:RecordHopperCB*/, opts/*:?any*/) {
4172 function buf_array()/*:BufArray*/ {
4174 var newblk = function ba_newblk(sz/*:number*/)/*:Block*/ {
4182 var endbuf = function ba_endbuf() {
4192 var next = function ba_next(sz/*:number*/)/*:Block*/ {
4198 var end = function ba_end() {
4203 …var push = function ba_push(buf) { endbuf(); curbuf = buf; if(curbuf.l == null) curbuf.l = curbuf.…
4208 function write_record(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/) {
4227 function shift_cell_xls(cell/*:CellAddress*/, tgt/*:any*/, opts/*:?any*/)/*:CellAddress*/ {
4243 function shift_range_xls(cell, range, opts) {
4250 function encode_cell_xls(c/*:CellAddress*/, biff/*:number*/)/*:string*/ {
4259 function encode_range_xls(r, opts)/*:string*/ {
4272 function decode_row(rowstr/*:string*/)/*:number*/ { return parseInt(unfix_row(rowstr),10) - 1; }
4273 function encode_row(row/*:number*/)/*:string*/ { return "" + (row + 1); }
4274 function fix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/([A-Z]|^)(\d+)$/,"$1$$$2"); }
4275 function unfix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/\$(\d+)$/,"$1"); }
4277 function decode_col(colstr/*:string*/)/*:number*/ { var c = unfix_col(colstr), d = 0, i = 0; for(; …
4278 function encode_col(col/*:number*/)/*:string*/ { if(col < 0) throw new Error("invalid column " + co…
4279 function fix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^([A-Z])/,"$$$1"); }
4280 function unfix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^\$([A-Z])/,"$1"); }
4282 function split_cell(cstr/*:string*/)/*:Array<string>*/ { return cstr.replace(/(\$?[A-Z]*)(\$?\d*)/,…
4283 //function decode_cell(cstr/*:string*/)/*:CellAddress*/ { var splt = split_cell(cstr); return { c:d…
4284 function decode_cell(cstr/*:string*/)/*:CellAddress*/ {
4293 //function encode_cell(cell/*:CellAddress*/)/*:string*/ { return encode_col(cell.c) + encode_row(ce…
4294 function encode_cell(cell/*:CellAddress*/)/*:string*/ {
4300 function decode_range(range/*:string*/)/*:Range*/ {
4306 function encode_range(cs/*:CellAddrSpec|Range*/,ce/*:?CellAddrSpec*/)/*:string*/ {
4318 function fix_range(a1/*:string*/)/*:string*/ {
4324 function formula_quote_sheet_name(sname/*:string*/, opts)/*:string*/ {
4330 function safe_decode_range(range/*:string*/)/*:Range*/ {
4363 function safe_format_cell(cell/*:Cell*/, v/*:any*/) {
4369 function format_cell(cell/*:Cell*/, v/*:any*/, o/*:any*/) {
4378 function sheet_to_workbook(sheet/*:Worksheet*/, opts)/*:Workbook*/ {
4384 function sheet_add_aoa(_ws/*:?Worksheet*/, data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ {
4450 function aoa_to_sheet(data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ { return sheet_add_aoa(null, data,…
4452 function parse_Int32LE(data) {
4455 function write_UInt32LE(x/*:number*/, o) {
4462 function parse_XLWideString(data/*::, length*/)/*:string*/ {
4466 function write_XLWideString(data/*:string*/, o) {
4474 //function parse_LPWideString(data/*::, length*/)/*:string*/ {
4480 function parse_StrRun(data) {
4483 function write_StrRun(run, o) {
4491 function parse_RichStr(data, length/*:number*/)/*:XLString*/ {
4510 function write_RichStr(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {
4519 function write_BrtCommentText(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {
4530 function parse_XLSBCell(data)/*:any*/ {
4537 function write_XLSBCell(cell/*:any*/, o/*:?Block*/) {
4546 function parse_XLSBShortCell(data)/*:any*/ {
4552 function write_XLSBShortCell(cell/*:any*/, o/*:?Block*/) {
4564 function parse_XLNullableWideString(data/*::, length*/)/*:string*/ {
4568 function write_XLNullableWideString(data/*:string*/, o) {
4585 function parse_RkNumber(data)/*:number*/ {
4592 function write_RkNumber(data/*:number*/, o) {
4603 function parse_RfX(data /*::, length*/)/*:Range*/ {
4611 function write_RfX(r/*:Range*/, o) {
4625 //function parse_UncheckedSqRfX(data) {
4634 //function write_UncheckedSqRfX(sqrfx/*:string*/) {
4638 // parts.forEach(function(rng) {
4646 function parse_Xnum(data/*::, length*/) {
4650 function write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }
4653 function parse_BrtColor(data/*::, length*/) {
4685 function write_BrtColor(color, o) {
4718 function parse_FontFlags(data/*::, length, opts*/) {
4733 function write_FontFlags(font, o) {
4748 function parse_ClipboardFormatOrString(o, w/*:number*/)/*:string*/ {
4760 function parse_ClipboardFormatOrAnsiString(o) { return parse_ClipboardFormatOrString(o, 1); }
4761 function parse_ClipboardFormatOrUnicodeString(o) { return parse_ClipboardFormatOrString(o, 2); }
4946 function rgbify(arr/*:Array<number>*/)/*:Array<[number, number, number]>*/ { return arr.map(functio…
5306 function new_ct()/*:any*/ {
5315 function parse_ct(data/*:?string*/) {
5319 (data.match(tagregex)||[]).forEach(function(x) {
5339 function write_ct(ct, opts, raw)/*:string*/ {
5366 ].map(function(x) {
5372 var f1 = function(w) {
5383 var f2 = function(w) {
5384 (ct[w]||[]).forEach(function(v) {
5393 var f3 = function(t) {
5394 (ct[t]||[]).forEach(function(v) {
5454 function get_rels_path(file/*:string*/)/*:string*/ {
5459 function parse_rels(data/*:?string*/, currentFilePath/*:string*/) {
5467 (data.match(tagregex)||[]).forEach(function(x) {
5483 function write_rels(rels)/*:string*/ {
5488 keys(rels['!id']).forEach(function(rid) {
5495 function add_rels(rels, rId/*:number*/, f, type, relobj, targetmode/*:?string*/)/*:number*/ {
5514 function parse_manifest(d, opts) {
5533 function write_manifest(manifest/*:Array<Array<string> >*/)/*:string*/ {
5543 function write_rdf_type(file/*:string*/, res/*:string*/, tag/*:?string*/) {
5550 function write_rdf_has(base/*:string*/, file/*:string*/) {
5557 function write_rdf(rdf) {
5569 function write_meta_ods(/*:: wb: Workbook, opts: any*/)/*:string*/ {
5593 var CORE_PROPS_REGEX/*:Array<RegExp>*/ = /*#__PURE__*/(function() {
5603 function parse_core_props(data) {
5616 function cp_doit(f, g, h, o, p) {
5623 function write_core_props(cp, _opts) {
5672 function load_props_pairs(HP/*:string|Array<Array<any>>*/, TOP, props, opts) {
5675 else for(var j = 0; j < HP.length; ++j) v = v.concat(HP[j].map(function(hp) { return {v:hp}; }));
5676 …var parts = (typeof TOP == "string") ? parseVector(TOP, opts).map(function (x) { return x.v; }) : …
5719 function parse_ext_props(data, p, opts) {
5723 EXT_PROPS.forEach(function(f) {
5740 function write_ext_props(cp/*::, opts*/)/*:string*/ {
5750 EXT_PROPS.forEach(function(f) {
5762 …o[o.length] = (W('TitlesOfParts', W('vt:vector', cp.SheetNames.map(function(s) { return "<vt:lpstr…
5768 function parse_cust_props(data/*:string*/, opts) {
5812 function write_cust_props(cp/*::, opts*/)/*:string*/ {
5819 keys(cp).forEach(function custprop(k) { ++pid;
5864 function xlml_set_prop(Props, tag/*:string*/, val) {
5870 function xlml_write_docprops(Props, opts) {
5872 keys(XLMLDocPropsMap).map(function(m) {
5876 }).forEach(function(p) {
5889 function xlml_write_custprops(Props, Custprops/*::, opts*/) {
5893 if(Props) keys(Props).forEach(function(k) {
5907 if(Custprops) keys(Custprops).forEach(function(k) {
5924 function parse_FILETIME(blob) {
5928 function write_FILETIME(time/*:string|Date*/) {
5939 function parse_lpstr(blob, type, pad/*:?number*/) {
5947 function parse_lpwstr(blob, type, pad) {
5956 function parse_VtStringBase(blob, stringType, pad) {
5961 function parse_VtString(blob, t/*:number*/, pad/*:?boolean*/) { return parse_VtStringBase(blob, t, …
5962 function parse_VtUnalignedString(blob, t/*:number*/) { if(!t) throw new Error("VtUnalignedString mu…
5965 function parse_VtVecLpwstrValue(blob)/*:Array<string>*/ {
5977 function parse_VtVecUnalignedLpstrValue(blob)/*:Array<string>*/ {
5986 function parse_VtHeadingPair(blob) {
5995 function parse_VtVecHeadingPairValue(blob) {
6003 function parse_dictionary(blob,CodePage) {
6017 function parse_BLOB(blob) {
6026 function parse_ClipboardData(blob) {
6036 function parse_TypedPropertyValue(blob, type/*:number*/, _opts)/*:any*/ {
6060 function write_TypedPropertyValue(type/*:number*/, value) {
6082 function parse_PropertySet(blob, PIDSI) {
6094 Props.sort(function(x,y) { return x[1] - y[1]; });
6173 function guess_property_type(val/*:any*/)/*:number*/ {
6182 function write_PropertySet(entries, RE, PIDSI) {
6251 function parse_PropertySetStream(file, PIDSI, clsid) {
6285 function write_PropertySetStream(entries, clsid, RE, PIDSI/*:{[key:string|number]:any}*/, entries2/…
6307 function parsenoop2(blob, length) { blob.read_shift(length); return null; }
6308 function writezeroes(n, o) { if(!o) o=new_buf(n); for(var j=0; j<n; ++j) o.write_shift(1, 0); retur…
6310 function parslurp(blob, length, cb) {
6317 function parsebool(blob, length/*:number*/) { return blob.read_shift(length) === 0x1; }
6318 function writebool(v/*:any*/, o) { if(!o) o=new_buf(2); o.write_shift(2, +!!v); return o; }
6320 function parseuint16(blob/*::, length:?number, opts:?any*/) { return blob.read_shift(2, 'u'); }
6321 function writeuint16(v/*:number*/, o) { if(!o) o=new_buf(2); o.write_shift(2, v); return o; }
6322 function parseuint16a(blob, length/*:: :?number, opts:?any*/) { return parslurp(blob,length,parseui…
6327 function parse_Bes(blob/*::, length*/) {
6331 function write_Bes(v, t/*:string*/, o) {
6339 function parse_ShortXLUnicodeString(blob, length, opts) {
6357 function parse_XLUnicodeRichExtendedString(blob) {
6376 function write_XLUnicodeRichExtendedString(xlstr/*:: :XLString, opts*/) {
6393 function parse_XLUnicodeStringNoCch(blob, cch, opts) {
6406 function parse_XLUnicodeString(blob, length, opts) {
6412 function parse_XLUnicodeString2(blob, length, opts) {
6419 function write_XLUnicodeString(str, opts, o) {
6428 function parse_ControlInfo(blob/*::, length, opts*/) {
6437 function parse_URLMoniker(blob/*::, length, opts*/) {
6452 function parse_FileMoniker(blob/*::, length*/) {
6467 function parse_HyperlinkMoniker(blob, length) {
6477 function parse_HyperlinkString(blob/*::, length*/) {
6482 function write_HyperlinkString(str/*:string*/, o) {
6491 function parse_Hyperlink(blob, length)/*:Hyperlink*/ {
6516 function write_Hyperlink(hl) {
6553 function parse_LongRGBA(blob/*::, length*/) { var r = blob.read_shift(1), g = blob.read_shift(1), b…
6556 function parse_LongRGB(blob, length) { var x = parse_LongRGBA(blob, length); x[3] = 0; return x; }
6560 function parse_XLSCell(blob/*::, length*/)/*:Cell*/ {
6566 function write_XLSCell(R/*:number*/, C/*:number*/, ixfe/*:?number*/, o) {
6575 function parse_frtHeader(blob) {
6584 function parse_OptXLUnicodeString(blob, length, opts) { return length === 0 ? "" : parse_XLUnicodeS…
6587 function parse_XTI(blob, length, opts) {
6594 function parse_RkRec(blob) {
6601 function parse_AddinUdf(blob, length, opts) {
6613 function parse_Ref8U(blob/*::, length*/) {
6620 function write_Ref8U(r/*:Range*/, o) {
6630 function parse_RefU(blob/*::, length*/) {
6642 function parse_FtCmo(blob/*::, length*/) {
6652 function parse_FtNts(blob) {
6662 function parse_FtCf(blob) {
6670 function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }
6692 function parse_FtArray(blob, length/*::, ot*/) {
6709 function parse_BOF(blob, length) {
6727 function write_BOF(wb/*:Workbook*/, t/*:number*/, o) {
6754 function parse_InterfaceHdr(blob, length) {
6762 function parse_WriteAccess(blob, length, opts) {
6770 function write_WriteAccess(s/*:string*/, opts) {
6782 function parse_WsBool(blob, length, opts) {
6788 function parse_BoundSheet8(blob, length, opts) {
6802 function write_BoundSheet8(data, opts) {
6816 function parse_SST(blob, length)/*:SST*/ {
6827 function write_SST(sst, opts) {
6834 …/*::(*/o/*:: :any)*/.parts = [header.length].concat(strs.map(function(str) { return str.length; })…
6839 function parse_ExtSST(blob, length) {
6848 function parse_Row(blob) {
6866 function parse_ForceFullCalculation(blob) {
6878 function parse_RecalcId(blob) {
6884 function parse_DefaultRowHeight(blob, length, opts) {
6898 function parse_Window1(blob) {
6905 function write_Window1(/*::opts*/) {
6919 function parse_Window2(blob, length, opts) {
6924 function write_Window2(view) {
6936 function parse_Pane(/*blob, length, opts*/) {
6940 function parse_Font(blob, length, opts) {
6953 function write_Font(data, opts) {
6969 function parse_LabelSst(blob) {
6974 function write_LabelSst(R/*:number*/, C/*:number*/, v/*:number*/, os/*:number*/ /*::, opts*/) {
6982 function parse_Label(blob, length, opts) {
6991 function write_Label(R/*:number*/, C/*:number*/, v/*:string*/, os/*:number*/, opts) {
7003 function parse_Format(blob, length, opts) {
7008 function write_Format(i/*:number*/, f/*:string*/, opts, o) {
7022 function parse_Dimensions(blob, length, opts) {
7030 function write_Dimensions(range, opts) {
7042 function parse_RK(blob) {
7049 function parse_MulRk(blob, length) {
7060 function parse_MulBlank(blob, length) {
7072 function parse_CellStyleXF(blob, length, style, opts) {
7112 //function parse_CellXF(blob, length, opts) {return parse_CellStyleXF(blob,length,0, opts);}
7113 //function parse_StyleXF(blob, length, opts) {return parse_CellStyleXF(blob,length,1, opts);}
7116 function parse_XF(blob, length, opts) {
7124 function write_XF(data, ixfeP, opts, o) {
7145 function parse_Guts(blob) {
7153 function write_Guts(guts/*:Array<number>*/) {
7162 function parse_BoolErr(blob, length, opts) {
7170 function write_BoolErr(R/*:number*/, C/*:number*/, v, os/*:number*/, opts, t/*:string*/) {
7178 function parse_Number(blob, length, opts) {
7185 function write_Number(R/*:number*/, C/*:number*/, v, os/*:: :number, opts*/) {
7195 function parse_SupBook(blob, length, opts) {
7210 function parse_ExternName(blob, length, opts) {
7230 function parse_Lbl(blob, length, opts) {
7258 function parse_ExternSheet(blob, length, opts) {
7266 function parse_BIFF5ExternSheet(blob, length, opts) {
7273 function parse_NameCmt(blob, length, opts) {
7283 function parse_ShrFmla(blob, length, opts) {
7292 function parse_Array(blob, length, opts) {
7304 function parse_MTRSettings(blob) {
7312 function parse_NoteSh(blob, length, opts) {
7322 function parse_Note(blob, length, opts) {
7328 function parse_MergeCells(blob, length)/*:Array<Range>*/ {
7334 function write_MergeCells(merges/*:Array<Range>*/) {
7342 function parse_Obj(blob, length, opts) {
7350 0x08: function(blob, length) {
7366 function parse_BIFF5Obj(blob, length, opts) {
7388 function parse_TxO(blob, length, opts) {
7428 function parse_HLink(blob, length) {
7434 function write_HLink(hl) {
7446 function parse_HLinkTooltip(blob, length) {
7453 function write_HLinkTooltip(hl) {
7466 function parse_Country(blob)/*:[string|number, string|number]*/ {
7472 function write_Country(o) {
7480 function parse_ClrtClient(blob) {
7488 function parse_Palette(blob) {
7496 function parse_XFCRC(blob) {
7506 function parse_ColInfo(blob, length, opts) {
7519 function write_ColInfo(col, idx) {
7535 function parse_Setup(blob, length) {
7546 function parse_ShtProps(blob, length, opts) {
7555 function write_RRTabId(n/*:number*/) {
7566 function parse_ImData(blob) {
7576 function parse_BIFF2STR(blob, length, opts) {
7586 function parse_BIFF2NUM(blob/*::, length*/) {
7594 function write_BIFF2NUM(r/*:number*/, c/*:number*/, val/*:number*/) {
7601 function parse_BIFF2INT(blob) {
7609 function write_BIFF2INT(r/*:number*/, c/*:number*/, val/*:number*/) {
7616 function parse_BIFF2STRING(blob) {
7623 function parse_BIFF2FONTXTRA(blob, length) {
7633 function parse_RString(blob, length, opts) {
7644 var DBF = /*#__PURE__*/(function() {
7703 function dbf_to_aoa(buf, opts)/*:AOA*/ {
7866 function dbf_to_sheet(buf, opts)/*:Worksheet*/ {
7870 ws["!cols"] = o.DBF.map(function(field) { return {
7878 function dbf_to_workbook(buf, opts)/*:Workbook*/ {
7888 function sheet_to_dbf(ws/*:Worksheet*/, opts/*:WriteOpts*/) {
8023 var SYLK = /*#__PURE__*/(function() {
8046 …var sylk_char_fn = function(_, $1){ var o = sylk_escapes[$1]; return typeof o == "number" ? _getan…
8047 …var decode_sylk_char = function($$, $1, $2) { var newcc = (($1.charCodeAt(0) - 0x20)<<4) | ($2.cha…
8050 function sylk_to_aoa(d/*:RawData*/, opts)/*:[AOA, Worksheet]*/ {
8059 function sylk_to_aoa_str(str/*:string*/, opts)/*:[AOA, Worksheet]*/ {
8070 …var record=rstr.replace(/;;/g, "\u0000").split(";").map(function(x) { return x.replace(/\u0000/g, …
8197 colinfo.forEach(function(col) { process_col(col); });
8202 function sylk_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ {
8207 keys(ws).forEach(function(k) { o[k] = ws[k]; });
8209 keys(wb).forEach(function(k) { outwb[k] = wb[k]; });
8214function write_ws_cell_sylk(cell/*:Cell*/, ws/*:Worksheet*/, R/*:number*/, C/*:number*//*::, opts*…
8228 function write_ws_cols_sylk(out, cols) {
8229 cols.forEach(function(col, i) {
8241 function write_ws_rows_sylk(out/*:Array<string>*/, rows/*:Array<RowInfo>*/) {
8242 rows.forEach(function(row, i) {
8251 function sheet_to_sylk(ws/*:Worksheet*/, opts/*:?any*/, wb/*:?WorkBook*/)/*:string*/ {
8285 var DIF = /*#__PURE__*/(function() {
8286 function dif_to_aoa(d/*:RawData*/, opts)/*:AOA*/ {
8295 function dif_to_aoa_str(str/*:string*/, opts)/*:AOA*/ {
8331function dif_to_sheet(str/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(dif_to_aoa(str, op…
8332 function dif_to_workbook(str/*:string*/, opts)/*:Workbook*/ {
8338function make_value(v/*:number*/, s/*:string*/)/*:string*/ { return "0," + String(v) + "\r\n" + s;…
8339function make_value_str(s/*:string*/)/*:string*/ { return "1,0\r\n\"" + s.replace(/"/g,'""') + '"'…
8340 function sheet_to_dif(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {
8393 var ETH = /*#__PURE__*/(function() {
8394function decode(s/*:string*/)/*:string*/ { return s.replace(/\\b/g,"\\").replace(/\\c/g,":").repla…
8395function encode(s/*:string*/)/*:string*/ { return s.replace(/\\/g, "\\b").replace(/:/g, "\\c").rep…
8397 function eth_to_aoa(str/*:string*/, opts)/*:AOA*/ {
8422function eth_to_sheet(d/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(eth_to_aoa(d, opts),…
8423function eth_to_workbook(d/*:string*/, opts)/*:Workbook*/ { return sheet_to_workbook(eth_to_sheet(…
8444 function sheet_to_eth_data(ws/*:Worksheet*/)/*:string*/ {
8481 function sheet_to_eth(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {
8493 var PRN = /*#__PURE__*/(function() {
8494 function set_text_arr(data/*:string*/, arr/*:AOA*/, R/*:number*/, C/*:number*/, o/*:any*/) {
8504 function prn_to_aoa_str(f/*:string*/, opts)/*:AOA*/ {
8546 function guess_sep(str) {
8565 …cc.sort(function(a, b) { return a[0] - b[0] || guess_sep_weights[a[1]] - guess_sep_weights[b[1]]; …
8570 function dsv_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {
8593 function finish_cell() {
8642 function prn_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {
8650 function prn_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {
8671function prn_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(prn_to_sheet…
8673 function sheet_to_prn(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {
8700 function read_wb_ID(d, opts) {
8713 var WK_ = /*#__PURE__*/(function() {
8714 function lotushopper(data, cb/*:RecordHopperCB*/, opts/*:any*/) {
8729 function lotus_to_workbook(d/*:RawData*/, opts) {
8739 function lotus_to_workbook_buf(d, opts)/*:Workbook*/ {
8758 lotushopper(d, function(val, R, RT) { switch(RT) {
8813 lotushopper(d, function(val, R, RT) { switch(RT) {
8818 …val[1].v = val[1].v.replace(/\x0F./g, function($$) { return String.fromCharCode($$.charCodeAt(1) -…
8866 function sheet_to_wk1(ws/*:Worksheet*/, opts/*:WriteOpts*/) {
8900 function book_to_wk3(wb/*:Workbook*/, opts/*:WriteOpts*/) {
8943 function write_BOF_WK1(v/*:number*/) {
8949 function write_BOF_WK3(wb/*:Workbook*/) {
8977 function parse_RANGE(blob, length, opts) {
8997 function write_RANGE(range) {
9006 function parse_cell(blob, length, opts) {
9023 function parse_LABEL(blob, length, opts) {
9037 function write_LABEL(R, C, s) {
9051 function parse_STRING(blob, length, opts) {
9064 function parse_INTEGER(blob, length, opts) {
9069 function write_INTEGER(R, C, v) {
9078 function parse_NUMBER(blob, length, opts) {
9083 function write_NUMBER(R, C, v) {
9092 function parse_FORMULA(blob, length, opts) {
9106 function wk1_parse_rc(B, V, col) {
9208 function wk1_fmla_to_csf(blob, o) {
9262 else if(cc <= 0x73) return console.error("WK1 unsupported function opcode " + cc.toString(16));
9272 function parse_cell_3(blob/*::, length*/) {
9278 function parse_LABEL_16(blob, length) {
9284 function write_LABEL_16(R, C, wsidx, s) {
9299 function parse_NUMBER_18(blob, length) {
9319 function parse_NUMBER_17(blob, length) {
9334 function write_NUMBER_17(R, C, wsidx, v) {
9363 function parse_FORMULA_19(blob, length) {
9369 function parse_NUMBER_25(blob, length) {
9376 function parse_NUMBER_27(blob, length) {
9383 function parse_FORMULA_28(blob, length) {
9389 function parse_SHEETNAMECS(blob, length) {
9393 function parse_SHEETNAMELP(blob, length) {
9400 function parse_SHEETINFOQP(blob, length, opts) {
9410 function parse_XFORMAT(blob, length) {
9423 function write_XFORMAT_SHEETNAME(name, wsidx) {
9630 function qpw_to_workbook_buf(d, opts)/*:Workbook*/ {
9773 function parse_rpr(rpr) {
9880 var parse_rs = /*#__PURE__*/(function() {
9883 function parse_r(r) {
9894 return function parse_rs(rs) {
9895 return rs.replace(rregex,"").split(rend).map(parse_r).filter(function(r) { return r.v; });
9901 var rs_to_html = /*#__PURE__*/(function parse_rs_factory() {
9903 function parse_rpr2(font, intro, outro) {
9927 function r_to_html(r) {
9936 return function parse_rs(rs) {
9944 function parse_si(x, opts) {
9971 function parse_sst_xml(data/*:string*/, opts)/*:SST*/ {
9988 function write_sst_xml(sst/*:SST*/, opts)/*:string*/ {
10014 function parse_BrtBeginSst(data) {
10019 function parse_sst_bin(data, opts)/*:SST*/ {
10022 recordhopper(data, function hopper_sst(val, R, RT) {
10044 function write_BrtBeginSst(sst, o) {
10053 function write_sst_bin(sst/*::, opts*/) {
10061 function _JS2ANSI(str/*:string*/)/*:Array<number>*/ {
10069 function parse_CRYPTOVersion(blob, length/*:?number*/) {
10079 function parse_DataSpaceVersionInfo(blob) {
10089 function parse_DataSpaceMapEntry(blob) {
10104 function parse_DataSpaceMap(blob) {
10113 function parse_DataSpaceDefinition(blob)/*:Array<string>*/ {
10122 function parse_TransformInfoHeader(blob) {
10134 function parse_Primary(blob) {
10146 function parse_EncryptionHeader(blob, length/*:number*/) {
10170 function parse_EncryptionVerifier(blob, length/*:number*/) {
10181 function parse_EncryptionInfo(blob) {
10192 function parse_EncInfoStd(blob/*::, vers*/) {
10202 function parse_EncInfoExt(/*::blob, vers*/) { throw new Error("File is password-protected: ECMA-376…
10204 function parse_EncInfoAgl(blob/*::, vers*/) {
10209 xml.replace(tagregex, function xml_agile(x) {
10214 case '<keyData': KeyData.forEach(function(k) { o[k] = y[k]; }); break;
10229 function parse_RC4CryptoHeader(blob, length/*:number*/) {
10241 function parse_RC4Header(blob/*::, length*/) {
10252 function crypto_CreatePasswordVerifier_Method1(Password/*:string*/) {
10271 var crypto_CreateXorArray_Method1 = /*#__PURE__*/(function() {
10275 var Ror = function(Byte) { return ((Byte/2) | (Byte*128)) & 0xFF; };
10276 var XorRor = function(byte1, byte2) { return Ror(byte1 ^ byte2); };
10277 var CreateXorKey_Method1 = function(Password) {
10289 return function(password/*:string*/) {
10329 var crypto_DecryptData_Method1 = function(password/*:string*/, Data, XorArrayIndex, XorArray, O) {
10344 var crypto_MakeXorDecryptor = function(password/*:string*/) {
10346 return function(Data) {
10354 function parse_XORObfuscation(blob, length, opts, out) {
10363 function parse_FilePassHeader(blob, length/*:number*/, oo) {
10369 function parse_FilePass(blob, length/*:number*/, opts) {
10377 function rtf_to_sheet(d, opts) {
10390 function rtf_to_sheet_str(str, opts) {
10397 rows.forEach(function(rowtf, R) {
10444 function rtf_to_workbook(d, opts) {
10449 function sheet_to_rtf(ws, opts) {
10474 function hex2RGB(h) {
10478 function rgb2Hex(rgb) {
10483 function rgb2HSL(rgb) {
10498 function hsl2RGB(hsl){
10517 function rgb_tint(hex, tint) {
10528 function width2px(width) { return Math.floor(( width + (Math.round(128/MDW))/256 )* MDW ); }
10529 function px2char(px) { return (Math.floor((px - 5)/MDW * 100 + 0.5))/100; }
10530 function char2width(chr) { return (Math.round((chr * MDW + 5)/MDW*256))/256; }
10531 //function px2char_(px) { return (((px - 5)/MDW * 100 + 0.5))/100; }
10532 //function char2width_(chr) { return (((chr * MDW + 5)/MDW*256))/256; }
10533 function cycle_width(collw) { return char2width(px2char(width2px(collw))); }
10535 function find_mdw_colw(collw) {
10541 /*function find_mdw_wpx(wpx) {
10552 function process_col(coll/*:ColInfo*/) {
10570 function px2pt(px) { return px * 96 / PPI; }
10571 function pt2px(pt) { return pt * PPI / 96; }
10593 function parse_borders(t, styles, themes, opts) {
10597 (t[0].match(tagregex)||[]).forEach(function(x) {
10668 function parse_fills(t, styles, themes, opts) {
10672 (t[0].match(tagregex)||[]).forEach(function(x) {
10734 function parse_fonts(t, styles, themes, opts) {
10738 (t[0].match(tagregex)||[]).forEach(function(x) {
10854 function parse_numFmts(t, styles, opts) {
10881 function write_numFmts(NF/*:{[n:number|string]:string}*//*::, opts*/) {
10883 [[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {
10895 function parse_cellXfs(t, styles, opts) {
10899 (t[0].match(tagregex)||[]).forEach(function(x) {
10950 function write_cellXfs(cellXfs)/*:string*/ {
10953 cellXfs.forEach(function(c) {
10963 var parse_sty_xml= /*#__PURE__*/(function make_pstyx() {
10970 return function parse_sty_xml(data, themes, opts) {
11004 function write_sty_xml(wb/*:Workbook*/, opts)/*:string*/ {
11023 function parse_BrtFmt(data, length/*:number*/) {
11028 function write_BrtFmt(i/*:number*/, f/*:string*/, o) {
11038 function parse_BrtFont(data, length/*:number*/, opts) {
11082 function write_BrtFont(font/*:any*/, o) {
11129 function write_BrtFill(fill, o) {
11160 function parse_BrtXF(data, length/*:number*/) {
11167 function write_BrtXF(data, ixfeP, o) {
11185 function write_Blxf(data, o) {
11195 function write_BrtBorder(border, o) {
11207 function write_BrtStyle(style, o) {
11218 function write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) {
11227 function parse_sty_bin(data, themes, opts) {
11236 recordhopper(data, function hopper_sty(val, R, RT) {
11289 function write_FMTS_bin(ba, NF/*:?SSFTable*/) {
11292 [[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {
11299 [[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {
11306 function write_FONTS_bin(ba/*::, data*/) {
11322 function write_FILLS_bin(ba/*::, data*/) {
11333 function write_BORDERS_bin(ba/*::, data*/) {
11343 function write_CELLSTYLEXFS_bin(ba/*::, data*/) {
11356 function write_CELLXFS_bin(ba, data) {
11358 data.forEach(function(c) { write_record(ba, 0x002F /* BrtXF */, write_BrtXF(c,0)); });
11363 function write_STYLES_bin(ba/*::, data*/) {
11376 function write_DXFS_bin(ba/*::, data*/) {
11384 function write_TABLESTYLES_bin(ba/*::, data*/) {
11392 function write_COLORPALETTE_bin(/*::ba, data*/) {
11398 function write_sty_bin(wb, opts) {
11423 function parse_clrScheme(t, themes, opts) {
11426 (t[0].match(tagregex)||[]).forEach(function(x) {
11478 function parse_fontScheme(/*::t, themes, opts*/) { }
11481 function parse_fmtScheme(/*::t, themes, opts*/) { }
11488 function parse_themeElements(data, themes, opts) {
11500 ].forEach(function(m) {
11509 function parse_theme_xml(data/*:string*/, opts) {
11523 function write_theme(Themes, opts)/*:string*/ {
11695 function parse_Theme(blob, length, opts) {
11709 function parse_ColorTheme(blob/*::, length*/) { return blob.read_shift(4); }
11712 function parse_FullColorExt(blob/*::, length*/) {
11728 function parse_IcvXF(blob, length) {
11733 function parse_XFExtGradient(blob, length) {
11738 function parse_ExtProp(blob/*::, length*/)/*:Array<any>*/ {
11754 function parse_XFExt(blob, length) {
11766 function update_xfext(xf, xfext) {
11767 xfext.forEach(function(xfe) {
11785 function parse_BrtMdtinfo(data, length) {
11792 function write_BrtMdtinfo(data) {
11799 function parse_BrtMdb(data) {
11806 function write_BrtMdb(mdb) {
11815 function write_BrtBeginEsfmd(cnt, name) {
11821 function parse_BrtBeginEsmdb(data) {
11825 function write_BrtBeginEsmdb(cnt, cm) {
11831 function parse_xlmeta_bin(data, name, _opts) {
11837 recordhopper(data, function(val, R, RT) {
11843 val.forEach(function(r) {
11872 function write_xlmeta_bin() {
11896 function parse_xlmeta_xml(data, name, opts) {
11903 data.replace(tagregex, function(x) {
11976 function write_xlmeta_xml() {
11982 function parse_cc_xml(data/*::, name, opts*/)/*:Array<any>*/ {
11986 (data.match(tagregex)||[]).forEach(function(x) {
11999 //function write_cc_xml(data, opts) { }
12002 function parse_BrtCalcChainItem$(data) {
12016 function parse_cc_bin(data, name, opts) {
12019 recordhopper(data, function hopper_cc(val, R, RT) {
12032 //function write_cc_bin(data, opts) { }
12034 function parse_xlink_xml(/*::data, rel, name:string, _opts*/) {
12040 function parse_xlink_bin(data, rel, name/*:string*/, _opts) {
12046 recordhopper(data, function xlink_parse(val, R, RT) {
12085 function parse_drawing(data, rels/*:any*/) {
12104 function write_vml(rId/*:number*/, comments) {
12121 _comments.forEach(function(x) { ++_shapeid; o.push(write_vml_comment(x, _shapeid)); });
12126 function write_vml_comment(x, _shapeid)/*:string*/ {
12160 function sheet_insert_comments(sheet, comments/*:Array<RawComment>*/, threaded/*:boolean*/, people/…
12163 comments.forEach(function(comment) {
12199 function parse_comments_xml(data/*:string*/, opts)/*:Array<RawComment>*/ {
12205 if(authtag && authtag[1]) authtag[1].split(/<\/\w*:?author>/).forEach(function(x) {
12211 if(cmnttag && cmnttag[1]) cmnttag[1].split(/<\/\w*:?comment>/).forEach(function(x) {
12230 function write_comments_xml(data/*::, opts*/) {
12235 data.forEach(function(x) { x[1].forEach(function(w) { var a = escapexml(w.a);
12248 data.forEach(function(d) {
12252 d[1].forEach(function(c) {
12258 d[1].forEach(function(c) {
12278 function parse_tcmnt_xml(data/*:string*/, opts)/*:Array<RawComment>*/ {
12281 data.replace(tagregex, function xml_tcmnt(x, idx) {
12316 function write_tcmnt_xml(comments, people, opts) {
12318 comments.forEach(function(carr) {
12320 (carr[1] || []).forEach(function(c, idx) {
12339 function parse_people_xml(data/*:string*/, opts) {
12342 data.replace(tagregex, function xml_tcmnt(x) {
12367 function write_people_xml(people/*, opts*/) {
12372 people.forEach(function(person, idx) {
12384 function parse_BrtBeginComment(data) {
12393 function write_BrtBeginComment(data, o) {
12406 function write_BrtCommentAuthor(data) { return write_XLWideString(data.slice(0, 54)); }
12409 function parse_comments_bin(data, opts)/*:Array<RawComment>*/ {
12414 recordhopper(data, function hopper_cmnt(val, R, RT) {
12448 function write_comments_bin(data/*::, opts*/) {
12454 data.forEach(function(comment) {
12455 comment[1].forEach(function(c) {
12464 data.forEach(function(comment) {
12465 comment[1].forEach(function(c) {
12480 function make_vba_xls(cfb) {
12482 cfb.FullPaths.forEach(function(p, i) {
12490 function fill_vba_xls(cfb, vba) {
12491 vba.FullPaths.forEach(function(p, i) {
12501 function parse_ds_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { r…
12502 function parse_ds_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { r…
12503 function parse_ms_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { r…
12504 function parse_ms_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { r…
12505 /* TODO: it will be useful to parse the function str */
12506 var rc_to_a1 = /*#__PURE__*/(function(){
12509 function rcfunc($$,$1,$2,$3) {
12524 return function rc_to_a1(fstr/*:string*/, base/*:Cell*/)/*:string*/ {
12531 var a1_to_rc = /*#__PURE__*/(function(){
12532 return function a1_to_rc(fstr/*:string*/, base/*:CellAddress*/) {
12533 return fstr.replace(crefregex, function($0, $1, $2, $3, $4, $5) {
12544 function shift_formula_str(f/*:string*/, delta/*:Cell*/)/*:string*/ {
12545 return f.replace(crefregex, function($0, $1, $2, $3, $4, $5) {
12550 function shift_formula_xlsx(f/*:string*/, range/*:string*/, cell/*:string*/)/*:string*/ {
12557 function fuzzyfmla(f/*:string*/)/*:boolean*/ {
12562 function _xlfn(f/*:string*/)/*:string*/ {
12565 function parseread1(blob) { blob.l+=1; return; }
12568 function parse_ColRelU(blob, length) {
12574 function parse_RgceArea(blob, length, opts) {
12586 function parse_RgceArea_BIFF2(blob/*::, length, opts*/) {
12594 function parse_RgceAreaRel(blob, length, opts) {
12603 function parse_RgceLoc(blob, length, opts) {
12609 function parse_RgceLoc_BIFF2(blob/*::, length, opts*/) {
12616 function parse_RgceElfLoc(blob/*::, length, opts*/) {
12623 function parse_RgceLocRel(blob, length, opts) {
12634 function parse_RgceLocRel_BIFF2(blob/*::, length:number, opts*/) {
12645 function parse_PtgArea(blob, length, opts) {
12652 function parse_PtgArea3d(blob, length, opts) {
12665 function parse_PtgAreaErr(blob, length, opts) {
12671 function parse_PtgAreaErr3d(blob, length, opts) {
12684 function parse_PtgAreaN(blob, length, opts) {
12691 function parse_PtgArray(blob, length, opts) {
12698 function parse_PtgAttrBaxcel(blob) {
12706 function parse_PtgAttrChoose(blob, length, opts)/*:Array<number>*/ {
12716 function parse_PtgAttrGoto(blob, length, opts) {
12723 function parse_PtgAttrIf(blob, length, opts) {
12730 function parse_PtgAttrIfError(blob) {
12737 function parse_PtgAttrSemi(blob, length, opts) {
12744 function parse_PtgAttrSpaceType(blob/*::, length*/) {
12750 function parse_PtgAttrSpace(blob) {
12756 function parse_PtgAttrSpaceSemi(blob) {
12762 function parse_PtgRef(blob, length, opts) {
12771 function parse_PtgRefN(blob, length, opts) {
12779 function parse_PtgRef3d(blob, length, opts) {
12790 function parse_PtgFunc(blob, length, opts) {
12798 function parse_PtgFuncVar(blob, length, opts) {
12804 function parsetab(blob) {
12809 function parse_PtgAttrSum(blob, length, opts) {
12814 function parse_PtgExp(blob, length, opts) {
12823 function parse_PtgErr(blob) { blob.l++; return BErr[blob.read_shift(1)]; }
12826 function parse_PtgInt(blob) { blob.l++; return blob.read_shift(2); }
12829 function parse_PtgBool(blob) { blob.l++; return blob.read_shift(1)!==0;}
12832 function parse_PtgNum(blob) { blob.l++; return parse_Xnum(blob, 8); }
12835 function parse_PtgStr(blob, length, opts) { blob.l++; return parse_ShortXLUnicodeString(blob, lengt…
12839 function parse_SerAr(blob, biff/*:number*/) {
12867 function parse_PtgExtraMem(blob, cce, opts) {
12875 function parse_PtgExtraArray(blob, length, opts) {
12892 function parse_PtgName(blob, length, opts) {
12905 function parse_PtgNameX(blob, length, opts) {
12912 function parse_PtgNameX_BIFF5(blob/*::, length, opts*/) {
12922 function parse_PtgMemArea(blob, length, opts) {
12930 function parse_PtgMemFunc(blob, length, opts) {
12938 function parse_PtgRefErr(blob, length, opts) {
12947 function parse_PtgRefErr3d(blob, length, opts) {
12966 function parse_PtgElfLoc(blob, length, opts) {
12970 function parse_PtgElfNoop(blob/*::, length, opts*/) {
12983 function parse_PtgElfLel(blob/*::, length, opts*/) {
13018 function parse_PtgList(blob/*::, length, opts*/) {
13029 function parse_PtgSxName(blob/*::, length, opts*/) {
13035 function parse_PtgSheet(blob, length, opts) {
13041 function parse_PtgEndSheet(blob, length, opts) {
13045 function parse_PtgMemAreaN(blob/*::, length, opts*/) {
13050 function parse_PtgMemNoMemN(blob/*::, length, opts*/) {
13055 function parse_PtgAttrNoop(blob/*::, length, opts*/) {
13171 function parse_RgbExtra(blob, length, rgce, opts) {
13206 function parse_Rgce(blob, length, opts) {
13220 function stringify_array(f/*:Array<Array<string>>*/)/*:string*/ {
13256 function make_3d_range(start, end) {
13264 function get_ixti_raw(supbooks, ixti/*:number*/, opts)/*:string*/ {
13291 …case 0x3A01: return supbooks[XTI[0]].slice(1).map(function(name) { return name.Name; }).join(";;")…
13298 function get_ixti(supbooks, ixti/*:number*/, opts)/*:string*/ {
13302 function stringify_formula(formula/*Array<any>*/, range, cell/*:any*/, supbooks, opts)/*:string*/ {
13613 function parse_ArrayParsedFormula(blob, length, opts/*::, ref*/) {
13624 function parse_XLSCellParsedFormula(blob, length, opts) {
13635 function parse_NameParsedFormula(blob, length, opts, cce) {
13644 function parse_SharedParsedFormula(blob, length, opts) {
13654 function parse_FormulaValue(blob/*::, length*/) {
13665 function write_FormulaValue(value) {
13680 function parse_Formula(blob, length, opts) {
13695 function write_Formula(cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, os/*:number*/) {
13718 function parse_XLSBParsedFormula(data, length, opts) {
13740 function write_XLSBFormulaNum(val/*:number*/) {
13758 function write_XLSBFormulaErr(val/*:number*/) {
13767 function write_XLSBFormulaBool(val/*:boolean*/) {
13777 function write_XLSBFormulaStr(val/*:string*/) {
13793 function write_XLSBFormulaRef(str) {
13806 function write_XLSBFormulaRef3D(str, wb) {
13816 …out.write_shift(2, 2 + wb.SheetNames.map(function(n) { return n.toLowerCase(); }).indexOf(sname.to…
13825 function write_XLSBFormulaRefErr3D(str, wb) {
13834 …out.write_shift(2, 2 + wb.SheetNames.map(function(n) { return n.toLowerCase(); }).indexOf(sname.to…
13843 function write_XLSBFormulaRange(_str) {
13872 function write_XLSBFormulaRangeWS(_str, wb) {
13885 …out.write_shift(2, 2 + wb.SheetNames.map(function(n) { return n.toLowerCase(); }).indexOf(sname.to…
13892 …out.write_shift(2, 2 + wb.SheetNames.map(function(n) { return n.toLowerCase(); }).indexOf(sname.to…
13905 function write_XLSBFormulaArea3D(_str, wb) {
13916 …out.write_shift(2, 2 + wb.SheetNames.map(function(n) { return n.toLowerCase(); }).indexOf(sname.to…
13929 function write_XLSBFormula(val/*:string|number*/, wb) {
15078 function ods_to_csf_formula(f/*:string*/)/*:string*/ {
15087 …f = f.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g, function($$, $1) { return $1.replac…
15088 f = f.replace(/\$'([^']|'')+'/g, function($$) { return $$.slice(1); });
15089 …f = f.replace(/\$([^\]\. #$]+)/g, function($$, $1) { return ($1).match(/^([A-Z]{1,2}|[A-W][A-Z]{2}…
15095 function csf_to_ods_formula(f/*:string*/)/*:string*/ {
15101 function ods_to_csf_3D(r/*:string*/)/*:[string, string]*/ {
15102 r = r.replace(/\$'([^']|'')+'/g, function($$) { return $$.slice(1); });
15103 …r = r.replace(/\$([^\]\. #$]+)/g, function($$, $1) { return ($1).match(/^([A-Z]{1,2}|[A-W][A-Z]{2}…
15109 function csf_to_ods_3D(r/*:string*/)/*:string*/ {
15120 function get_sst_id(sst/*:SST*/, str/*:string*/, rev)/*:number*/ {
15145 function col_obj_w(C/*:number*/, col) {
15160 function default_margins(margins/*:Margins*/, mode/*:?string*/) {
15172 function get_cell_style(styles/*:Array<any>*/, cell/*:Cell*/, opts) {
15196 function safe_format(p/*:Cell*/, fmtid/*:number*/, fillid/*:?number*/, opts, themes, styles) {
15235 function check_ws(ws/*:Worksheet*/, sname/*:string*/, i/*:number*/) {
15241 function parse_ws_xml_dim(ws/*:Worksheet*/, s/*:string*/) {
15257 function parse_ws_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*:WBWBProps*/, themes, style…
15336 function write_ws_xml_merges(merges/*:Array<Range>*/)/*:string*/ {
15344 function parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {
15349 function parse_ws_xml_sheetpr2(sheetPr/*:string*/, body/*:string*/, s, wb/*:WBWBProps*/, idx/*:numb…
15352 function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
15381 function write_ws_xml_protection(sp)/*:string*/ {
15384 sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
15385 sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
15391 function parse_ws_xml_hlinks(s, data/*:Array<string>*/, rels) {
15421 function parse_ws_xml_margins(margin) {
15423 ["left", "right", "top", "bottom", "header", "footer"].forEach(function(k) {
15428 function write_ws_xml_margins(margin)/*:string*/ {
15433 function parse_ws_xml_cols(columns, cols) {
15446 function write_ws_xml_cols(ws, cols)/*:string*/ {
15456 function parse_ws_xml_autofilter(data/*:string*/) {
15460 function write_ws_xml_autofilter(data, ws, wb, idx)/*:string*/ {
15480 function parse_ws_xml_sheetviews(data, wb/*:WBWBProps*/) {
15482 (data.match(sviewregex)||[]).forEach(function(r/*:string*/, i/*:number*/) {
15492 function write_ws_xml_sheetviews(ws, opts, idx, wb)/*:string*/ {
15499 function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string*/ {
15550 var parse_ws_xml_data = /*#__PURE__*/(function() {
15556 return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, themes, styles) {
15737 function write_ws_xml_data(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*//*::, rels*/)/*:s…
15781 function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {
15846 /*::(*/ws['!links']/*::||[])*/.forEach(function(l) {
15902 function parse_BrtRowHdr(data, length) {
15916 function write_BrtRowHdr(R/*:number*/, range, ws) {
15964 function write_row_header(ba, ws, range, R) {
15974 function parse_BrtWsFmtInfo(/*::data, length*/) {
15976 //function write_BrtWsFmtInfo(ws, o) { }
15979 function parse_BrtWsProp(data, length) {
15989 function write_BrtWsProp(str, outl, o) {
16006 function parse_BrtCellBlank(data) {
16010 function write_BrtCellBlank(cell, ncell, o) {
16014 function parse_BrtShortBlank(data) {
16018 function write_BrtShortBlank(cell, ncell, o) {
16024 function parse_BrtCellBool(data) {
16029 function write_BrtCellBool(cell, ncell, o) {
16035 function parse_BrtShortBool(data) {
16040 function write_BrtShortBool(cell, ncell, o) {
16048 function parse_BrtCellError(data) {
16053 function write_BrtCellError(cell, ncell, o) {
16059 function parse_BrtShortError(data) {
16064 function write_BrtShortError(cell, ncell, o) {
16075 function parse_BrtCellIsst(data) {
16080 function write_BrtCellIsst(cell, ncell, o) {
16086 function parse_BrtShortIsst(data) {
16091 function write_BrtShortIsst(cell, ncell, o) {
16099 function parse_BrtCellReal(data) {
16104 function write_BrtCellReal(cell, ncell, o) {
16110 function parse_BrtShortReal(data) {
16115 function write_BrtShortReal(cell, ncell, o) {
16123 function parse_BrtCellRk(data) {
16128 function write_BrtCellRk(cell, ncell, o) {
16134 function parse_BrtShortRk(data) {
16139 function write_BrtShortRk(cell, ncell, o) {
16147 function parse_BrtCellRString(data) {
16154 function parse_BrtCellSt(data) {
16159 function write_BrtCellSt(cell, ncell, o) {
16166 function parse_BrtShortSt(data) {
16171 function write_BrtShortSt(cell, ncell, o) {
16180 function parse_BrtFmlaBool(data, length, opts) {
16196 function parse_BrtFmlaError(data, length, opts) {
16212 function parse_BrtFmlaNum(data, length, opts) {
16228 function parse_BrtFmlaString(data, length, opts) {
16247 function write_BrtBeginMergeCells(cnt, o) {
16254 function parse_BrtHLink(data, length/*::, opts*/) {
16266 function write_BrtHLink(l, rId) {
16279 function parse_BrtPane(/*data, length, opts*/) {
16283 function parse_BrtArrFmla(data, length, opts) {
16296 function parse_BrtShrFmla(data, length, opts) {
16310 function write_BrtColInfo(C/*:number*/, col, o) {
16327 function parse_BrtMargins(data/*::, length, opts*/)/*:Margins*/ {
16329 BrtMarginKeys.forEach(function(k) { margins[k] = parse_Xnum(data, 8); });
16332 function write_BrtMargins(margins/*:Margins*/, o) {
16335 BrtMarginKeys.forEach(function(k) { write_Xnum((margins/*:any*/)[k], o); });
16340 function parse_BrtBeginWsView(data/*::, length, opts*/) {
16345 function write_BrtBeginWsView(ws, Workbook, o) {
16365 function write_BrtCellIgnoreEC(ref) {
16374 function write_BrtSheetProtection(sp, o) {
16394 ].forEach(function(n) {
16402 function parse_BrtDVal(/*data, length, opts*/) {
16404 function parse_BrtDVal14(/*data, length, opts*/) {
16407 function parse_ws_bin(data, _opts, idx, rels, wb/*:WBWBProps*/, themes, styles)/*:Worksheet*/ {
16431 supbooks.SheetNames = wb.SheetNames || wb.Sheets.map(function(x) { return x.name; });
16444 recordhopper(data, function ws_parse(val, RR, RT) {
16706 function write_ws_bin_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, ws/*:W…
16763 function write_CELLTABLE(ba, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {
16788 function write_MERGECELLS(ba, ws/*:Worksheet*/) {
16791 …ws['!merges'].forEach(function(m) { write_record(ba, 0x00B0 /* BrtMergeCell */, write_BrtMergeCell…
16795 function write_COLINFOS(ba, ws/*:Worksheet*//*::, idx:number, opts, wb:Workbook*/) {
16798 …ws['!cols'].forEach(function(m, i) { if(m) write_record(ba, 0x003C /* 'BrtColInfo' */, write_BrtCo…
16802 function write_IGNOREECS(ba, ws/*:Worksheet*/) {
16809 function write_HLINKS(ba, ws/*:Worksheet*/, rels) {
16811 ws['!links'].forEach(function(l) {
16818 function write_LEGACYDRAWING(ba, ws/*:Worksheet*/, idx/*:number*/, rels) {
16827 function write_AUTOFILTER(ba, ws, wb, idx) {
16853 function write_WSVIEWS2(ba, ws, Workbook) {
16868 function write_WSFMTINFO(/*::ba, ws*/) {
16873 function write_SHEETPROTECT(ba, ws) {
16879 function write_ws_bin(idx/*:number*/, opts, wb/*:Workbook*/, rels) {
16934 function parse_Cache(data/*:string*/)/*:[Array<number|string>, string, ?string]*/ {
16940 (data.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(pt) {
16949 (data.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(F) { f = F.replace(/<.*?>/g,""); });
16955 function parse_chart(data/*:?string*/, name/*:string*/, opts, rels, wb, csheet) {
16964 (data.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(nc) {
16969 cache[0].forEach(function(n,i) {
16980 function parse_cs_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Wor…
16997 //function write_cs_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {
17009 function parse_BrtCsProp(data, length/*:number*/) {
17016 function parse_cs_bin(data, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {
17022 recordhopper(data, function cs_parse(val, R, RT) {
17062 //function write_cs_bin(/*::idx:number, opts, wb:Workbook, rels*/) {
17158 function push_defaults_array(target, defaults) {
17169 function push_defaults(target, defaults) {
17179 function parse_wb_defaults(wb) {
17189 function safe1904(wb/*:Workbook*/)/*:string*/ {
17197 function check_ws_name(n/*:string*/, safe/*:?boolean*/)/*:boolean*/ {
17200 badchars.forEach(function(c) {
17207 function check_wb_names(N, S, codes) {
17208 N.forEach(function(n,i) {
17217 function check_wb(wb) {
17223 wb.SheetNames.forEach(function(n, i) {
17229 …wb.Workbook.Names.forEach(function(dn) { if(dn.Name == "_xlnm._FilterDatabase" && dn.Sheet == i) D…
17238 function parse_wb_xml(data, opts)/*:WorkbookFile*/ {
17243 data.replace(tagregex, function xml_wb(x, idx) {
17267 WBPropsDef.forEach(function(w) {
17396 function write_wb_xml(wb/*:Workbook*//*::, opts:?WriteOpts*/)/*:string*/ {
17412 WBPropsDef.forEach(function(x) {
17458 if(wb.Workbook && wb.Workbook.Names) wb.Workbook.Names.forEach(function(n) {
17484 function parse_BrtBundleSh(data, length/*:number*/) {
17492 function write_BrtBundleSh(data, o) {
17502 function parse_BrtWbProp(data, length)/*:WBProps*/ {
17525 function write_BrtWbProp(data/*:?WBProps*/, o) {
17539 function parse_BrtFRTArchID$(data, length) {
17548 function parse_BrtName(data, length, opts) {
17569 function write_BrtName(name, wb) {
17600 function parse_wb_bin(data, opts)/*:WorkbookFile*/ {
17615 recordhopper(data, function hopper_wb(val, R, RT) {
17710 function write_BUNDLESHS(ba, wb/*::, opts*/) {
17721 function write_BrtFileVersion(data, o) {
17732 function write_BrtBookView(idx, o) {
17746 function write_BOOKVIEWS(ba, wb/*::, opts*/) {
17762 function write_BRTNAMES(ba, wb) {
17764 wb.Workbook.Names.forEach(function(name) { try {
17772 function write_SELF_EXTERNS_xlsb(wb) {
17783 function write_EXTERNALS_xlsb(ba, wb) {
17791 /*function write_BrtCalcProp(data, o) {
17804 /*function write_BrtFileRecover(data, o) {
17811 function write_wb_bin(wb, opts) {
17839 function parse_wb(data, name/*:string*/, opts)/*:WorkbookFile*/ {
17844 function parse_ws(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Workshee…
17849 function parse_cs(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Workshee…
17854 function parse_ms(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Workshee…
17859 function parse_ds(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Workshee…
17864 function parse_sty(data, name/*:string*/, themes, opts) {
17869 function parse_sst(data, name/*:string*/, opts)/*:SST*/ {
17874 function parse_cmnt(data, name/*:string*/, opts)/*:Array<RawComment>*/ {
17879 function parse_cc(data, name/*:string*/, opts) {
17884 function parse_xlink(data, rel, name/*:string*/, opts) {
17889 function parse_xlmeta(data, name/*:string*/, opts) {
17895 function xlml_parsexmltag(tag/*:string*/, skip_root/*:?boolean*/) {
17912 function xlml_parsexmltagobj(tag/*:string*/) {
17935 function xlml_format(format, value)/*:string*/ {
17941 function xlml_set_custprop(Custprops, key, cp, val/*:string*/) {
17954 function safe_format_xlml(cell/*:Cell*/, nf, o) {
17976 function process_style_xlml(styles, stag, opts) {
17987 function parse_xlml_data(xml, ss, data, cell/*:any*/, base, styles, csty, row, arrayf, o) {
18046 interiors.forEach(function(x) {
18054 function xlml_prefix_dname(dname) {
18058 function xlml_clean_comment(comment/*:any*/) {
18065 function parse_xlml_xml(d, _opts)/*:Workbook*/ {
18076 …-1) ["html", "table", "head", "meta", "script", "style", "div"].forEach(function(tag) { if(opening…
18633 case 'function' /*case 'Function'*/: break;
18818 function parse_xlml(data/*:RawBytes|string*/, opts)/*:Workbook*/ {
18829 function write_props_xlml(wb/*:Workbook*/, opts)/*:string*/ {
18838 function write_wb_xlml(wb/*::, opts*/)/*:string*/ {
18845 function write_sty_xlml(wb, opts)/*:string*/ {
18848 opts.cellXfs.forEach(function(xf, id) {
18857 function write_name_xlml(n) { return writextag("NamedRange", null, {"ss:Name": n.Name.slice(0,6) ==…
18858 function write_names_xlml(wb/*::, opts*/)/*:string*/ {
18871 function write_ws_xlml_names(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {
18889 function write_ws_xlml_wsopts(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {
18990 ].forEach(function(x) { if(ws['!protect'][x[0]]) o.push("<"+x[1]+"/>"); });
18996 function write_ws_xlml_comment(comments/*:Array<any>*/)/*:string*/ {
18997 return comments.map(function(c) {
19004 function write_ws_xlml_cell(cell, ref/*:string*/, ws, opts, idx/*:number*/, wb, addr)/*:string*/{
19048 function write_ws_xlml_row(R/*:number*/, row)/*:string*/ {
19058 function write_ws_xlml_table(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {
19063 if(ws['!cols']) ws['!cols'].forEach(function(n, i) {
19095 function write_ws_xlml(idx/*:number*/, opts, wb/*:Workbook*/)/*:string*/ {
19114 function write_xlml(wb, opts)/*:string*/ {
19144 function parse_compobj(obj/*:CFBEntry*/) {
19180 function slurp(RecordType, R, blob, length/*:number*/, opts)/*:any*/ {
19216 function safe_format_xf(p/*:any*/, opts/*:ParseOpts*/, date1904/*:?boolean*/) {
19240 function make_cell(val, ixfe, t)/*:Cell*/ {
19245 function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {
19264 var get_rgb = function getrgb(icv/*:number*/)/*:[number, number, number]*/ {
19269 var process_cell_style = function pcs(cell, line/*:any*/, options) {
19278 var addcell = function addcell(cell/*:any*/, line/*:any*/, options/*:any*/) {
19732 …wb.SheetNames=keys(Directory).sort(function(a,b) { return Number(a) - Number(b); }).map(function(x…
19740 …if(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] =…
19758 function parse_xls_props(cfb/*:CFBContainer*/, props, o) {
19778 function write_xls_props(wb/*:Workbook*/, cfb/*:CFBContainer*/) {
19803 function parse_xlscfb(cfb/*:any*/, options/*:?ParseOpts*/)/*:Workbook*/ {
19851 function write_xlscfb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:CFBContainer*/ {
21150 // 0xA2 FNPROTO: function prototypes (BIFF4)
21204 function write_biff_rec(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {
21214 function write_biff_continue(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*…
21237 function write_BIFF2Cell(out, r/*:number*/, c/*:number*/) {
21246 function write_BIFF2BERR(r/*:number*/, c/*:number*/, val, t/*:?string*/) {
21254 function write_BIFF2LABEL(r/*:number*/, c/*:number*/, val) {
21262 function write_ws_biff2_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*//*::, opts*/…
21280 function write_ws_biff2(ba/*:BufArray*/, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/)…
21303 function write_biff2_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {
21318 function write_FONTS_biff8(ba, data, opts) {
21329 function write_FMTS_biff8(ba, NF/*:?SSFTable*/, opts) {
21331 [[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {
21337 function write_FEAT(ba, ws) {
21353 function write_CELLXFS_biff8(ba, opts) {
21355 opts.cellXfs.forEach(function(c) {
21360 function write_ws_biff8_hlinks(ba/*:BufArray*/, ws) {
21369 function write_ws_cols_biff8(ba, cols) {
21372 cols.forEach(function(col, idx) {
21379 function write_ws_biff8_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*/, opts) {
21408 function write_ws_biff8(idx/*:number*/, opts, wb/*:Workbook*/) {
21464 …// if(b8) comments.forEach(function(comment) { write_biff_rec(ba, 0x001c /* Note */, write_NoteSh(…
21481 function write_biff8_global(wb/*:Workbook*/, bufs, opts/*:WriteOpts*/) {
21564 function write_biff8_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {
21591 function write_biff_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {
21609 function html_to_sheet(str/*:string*/, _opts)/*:Workbook*/ {
21667 function make_html_row(ws/*:Worksheet*/, r/*:Range*/, R/*:number*/, o/*:Sheet2HTMLOpts*/)/*:string*…
21704 function html_to_workbook(str/*:string*/, opts)/*:Workbook*/ {
21713 …mtch.forEach(function(s, idx) { book_append_sheet(wb, html_to_sheet(s, opts), "Sheet" + (idx+1)); …
21718 function make_html_preamble(ws/*:Worksheet*/, R/*:Range*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {
21723 function sheet_to_html(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*//*, wb:?Workbook*/)/*:string*/ {
21736 function sheet_add_dom(ws/*:Worksheet*/, table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {
21823 function parse_dom_table(table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {
21829 function table_to_book(table/*:HTMLElement*/, opts/*:?any*/)/*:Workbook*/ {
21835 function is_dom_element_hidden(element/*:HTMLElement*/)/*:boolean*/ {
21837 var get_computed_style/*:?function*/ = get_get_computed_style_function(element);
21844 function get_get_computed_style_function(element/*:HTMLElement*/)/*:?function*/ {
21846 …tView && typeof element.ownerDocument.defaultView.getComputedStyle === 'function') return element.…
21848 if(typeof getComputedStyle === 'function') return getComputedStyle;
21852 function parse_text_p(text/*:string*//*::, tag*/)/*:Array<any>*/ {
21857 ….replace(/<text:s text:c="(\d+)"\/>/g, function($$,$1) { return Array(parseInt($1,10)+1).join(" ")…
21866 function parse_ods_styles(d/*:string*/, _opts, _nfm) {
22088 function parse_content_xml(d/*:string*/, _opts, _nfm)/*:Workbook*/ {
22614 function parse_ods(zip/*:ZIPFile*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
22626 function parse_fods(data/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
22633 var write_styles_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {
22660 return function wso(/*::wb, opts*/) {
22666 function write_number_format_ods(nf/*:string*/, nfidx/*:string*/)/*:string*/ {
22815 function write_names_ods(Names, SheetNames, idx) {
22816 var scoped = Names.filter(function(name) { return name.Sheet == (idx == -1 ? null : idx); });
22818 return " <table:named-expressions>\n" + scoped.map(function(name) {
22827 var write_content_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {
22829 var write_text_p = function(text/*:string*/)/*:string*/ {
22831 .replace(/ +/g, function($$){return '<text:s text:c="'+$$.length+'"/>';})
22839 var write_ws = function(ws, wb/*:Workbook*/, i/*:number*/, opts, nfs)/*:string*/ {
22925 var write_automatic_styles_ods = function(o/*:Array<string>*/, wb) {
22930 wb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {
22949 wb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {
22979 wb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {
22992 keys(nfs).forEach(function(nf) {
23002 return function wcx(wb, opts) {
23070 function write_ods(wb/*:any*/, opts/*:any*/) {
23114 var subarray = function() {
23123 …if ((typeof Buffer.from == "function" ? Buffer.from([72, 62]) : new Buffer([72, 62])) instanceof U…
23132 function u8_to_dataview(array) {
23135 function u8str(u8) {
23138 function stru8(str) {
23141 function u8contains(body, search) {
23154 function u8concat(u8a) {
23155 var len = u8a.reduce(function(acc, x) {
23160 u8a.forEach(function(u8) {
23166 function popcnt(x) {
23171 function readDecimal128LE(buf, offset) {
23178 function writeDecimal128LE(buf, offset, value) {
23187 function parse_varint49(buf, ptr) {
23218 function write_varint49(v) {
23255 function parse_packed_varints(buf) {
23262 function write_packed_varints(nums) {
23263 return u8concat(nums.map(function(x) {
23267 function varint_to_i32(buf) {
23284 function varint_to_u64(buf) {
23317 function parse_shallow(buf) {
23365 function write_shallow(proto) {
23367 proto.forEach(function(field, idx) {
23370 field.forEach(function(item) {
23381 function mappa(data, cb) {
23382 return (data == null ? void 0 : data.map(function(d) {
23386 function parse_iwa_file(buf) {
23397 ai[2].forEach(function(b) {
23412 function write_iwa_file(ias) {
23414 ias.forEach(function(ia) {
23423 ia.messages.forEach(function(mi) {
23431 midata.forEach(function(mid) {
23437 function parse_snappy_chunk(type, buf) {
23514 if (chunks.reduce(function(acc, u8) {
23517 throw new Error("Unexpected length: ".concat(chunks.reduce(function(acc, u8) {
23522 function decompress_iwa_file(buf) {
23538 function compress_iwa_file(buf) {
23574 var numbers_lut_new = function() {
23577 function numbers_format_cell(cell, t, flags, ofmt, nfmt) {
23691 function parse_old_storage(buf, lut, v) {
23766 function parse_new_storage(buf, lut) {
23836 function write_new_storage(cell, sst) {
23868 function write_old_storage(cell, sst) {
23900 function parse_cell_storage(buf, lut) {
23914 function parse_TSP_Reference(buf) {
23918 function write_TSP_Reference(idx) {
23924 function numbers_add_oref(iwa, ref) {
23933 function numbers_del_oref(iwa, ref) {
23936 iwa.messages[0].meta[5] = [{ type: 2, data: write_packed_varints(orefs.filter(function(r) {
23940 function parse_TST_TableDataList(M, root) {
23945 (entries || []).forEach(function(entry) {
23963 data[key] = tswpsa[3].map(function(x) {
23977 function parse_TST_TileRowInfo(u8, type) {
24009 function parse_TST_Tile(M, root) {
24019 var ri = mappa(pb[5], function(u8) {
24024 data: ri.reduce(function(acc, x) {
24027 x.cells.forEach(function(cell, C) {
24036 function parse_TST_TableModelArchive(M, root, ws) {
24060 tile[1].forEach(function(t) {
24067 _tile.data.forEach(function(row, R) {
24068 row.forEach(function(buf, C) {
24089 ws["!merges"] = (_f = parse_shallow(ref.data)) == null ? void 0 : _f[1].map(function(pi) {
24102 function parse_TST_TableInfoArchive(M, root, opts) {
24117 function parse_TN_SheetArchive(M, root, opts) {
24125 shapeoffs.forEach(function(off) {
24126 M[off].forEach(function(m) {
24134 function parse_TN_DocumentArchive(M, root, opts) {
24141 sheetoffs.forEach(function(off) {
24142 M[off].forEach(function(m) {
24146 root2.sheets.forEach(function(sheet, idx) {
24157 function parse_numbers_iwa(cfb, opts) {
24160 cfb.FullPaths.forEach(function(p) {
24164 cfb.FileIndex.forEach(function(s) {
24181 packets.forEach(function(packet) {
24192 indices.forEach(function(idx) {
24193 M[idx].forEach(function(iwam) {
24207 function write_TST_TileRowInfo(data, SST, wide) {
24214 [{ type: 2, data: new Uint8Array(Array.from({ length: 510 }, function() {
24219 [{ type: 2, data: new Uint8Array(Array.from({ length: 510 }, function() {
24289 function write_iwam(type, payload) {
24298 function get_unique_msgid(dep, dependents) {
24308 function build_numbers_deps(cfb) {
24311 cfb.FileIndex.map(function(fi, idx) {
24313 }).forEach(function(row) {
24321 parse_iwa_file(decompress_iwa_file(fi.content)).forEach(function(packet) {
24326 indices.sort(function(x, y) {
24329 var indices_varint = indices.filter(function(x) {
24331 }).map(function(x) {
24334 cfb.FileIndex.forEach(function(fi) {
24339 parse_iwa_file(decompress_iwa_file(fi.content)).forEach(function(ia) {
24340 indices_varint.forEach(function(ivi) {
24341 if (ia.messages.some(function(mess) {
24351 function write_numbers_iwa(wb, opts) {
24362 wb.SheetNames.forEach(function(name, idx) {
24372 function numbers_iwa_doit(cfb, deps, id, cb) {
24377 var ainfo = x.find(function(packet) {
24384 function numbers_iwa_find(cfb, deps, id) {
24389 var ainfo = x.find(function(packet) {
24394 function numbers_add_ws(cfb, deps, wsidx) {
24397 numbers_iwa_doit(cfb, deps, 1, function(docroot, arch) {
24409 numbers_iwa_doit(cfb, deps, newsheetref, function(_, x) {
24415 numbers_iwa_doit(cfb, deps, newsheetref, function(sheetroot, arch) {
24420 drawables.forEach(function(n) {
24435 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24437 var parentidx = mlist[3].findIndex(function(m) {
24459 numbers_iwa_doit(cfb, deps, tiaref, function(_, x) {
24466 numbers_iwa_doit(cfb, deps, tiaref, function(tiaroot, arch) {
24485 numbers_iwa_doit(cfb, deps, tmaref, function(_, x) {
24493 numbers_iwa_doit(cfb, deps, tmaref, function(tmaroot, arch) {
24498 [12, 13, 29, 31, 32, 33, 39, 44, 47, 81, 82, 84].forEach(function(n) {
24509 (_a = hsoa[2]) == null ? void 0 : _a.forEach(function(item) {
24511 [2, 3].map(function(n) {
24513 }).forEach(function(hseadata) {
24547 ].forEach(function(n) {
24556 [2, 4, 5, 6, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22].forEach(function(n) {
24577 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24595 var parentidx = mlist[3].findIndex(function(m) {
24622 (_b = row_headers[2]) == null ? void 0 : _b.forEach(function(tspref) {
24640 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24658 var parentidx = mlist[3].findIndex(function(m) {
24687 tiles[1].forEach(function(t) {
24700 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24718 var parentidx = mlist[3].findIndex(function(m) {
24751 function write_numbers_ws(cfb, deps, ws, wsname, sheetidx, rootref) {
24753 numbers_iwa_doit(cfb, deps, rootref, function(docroot) {
24763 numbers_iwa_doit(cfb, deps, tmaref, function(docroot, x) {
24768 function write_numbers_tma(cfb, deps, ws, tmaroot, tmafile, tmaref) {
24795 numbers_iwa_doit(cfb, deps, row_header_ref, function(rowhead, _x) {
24808 numbers_iwa_doit(cfb, deps, col_header_ref, function(colhead, _x) {
24825 var save_token = function() {
24828 var mlst = mlist[3].filter(function(m) {
24835 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24837 mlist[3] = mlist[3].filter(function(m) {
24840 var parentidx = mlist[3].findIndex(function(m) {
24852 parent[6] = parent[6].filter(function(m) {
24896 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24914 var parentidx = mlist[3].findIndex(function(m) {
24957 ws["!merges"].map(function(m) {
24973 numbers_iwa_doit(cfb, deps, 2, function(ai) {
24975 var parentidx = mlist[3].findIndex(function(m) {
25001 numbers_iwa_doit(cfb, deps, sstref, function(sstroot) {
25005 SST.forEach(function(str, i) {
25023 function fix_opts_func(defaults/*:Array<Array<any> >*/)/*:{(o:any):void}*/ {
25024 return function fix_opts(opts) {
25033 function fix_read_opts(opts) {
25056 function fix_write_opts(opts) {
25069 function get_sheet_type(n/*:string*/)/*:string*/ {
25076 function safe_parse_wbrels(wbrels, sheets) {
25079 …wbrels = sheets.map(function pwbr(w) { if(!w.id) w.id = w.strRelID; return [w.name, wbrels['!id'][…
25084 function safe_parse_sheet(zip, path/*:string*/, relsPath/*:string*/, sheet, idx/*:number*/, sheetRe…
25108 if(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {
25125 function strip_front_slash(x/*:string*/)/*:string*/ { return x.charAt(0) == '/' ? x.slice(1) : x; }
25127 function parse_zip(zip/*:ZIP*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
25142 zipentries(zip).forEach(function(e) { zip_add_file(_zip, e, getzipbin(zip, e)); });
25189 /*var externbooks = */dir.links.map(function(link) {
25219 if(wb.Sheets) sheets = wb.Sheets.map(function pluck(x){ return x.name; });
25309 zip.FullPaths.forEach(function(p, idx) {
25326 function parse_xlsxcfb(cfb, _opts/*:?ParseOpts*/)/*:Workbook*/ {
25371 function write_zip_xlsb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {
25506 function write_zip_xlsx(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {
25582 comments.forEach(function(carr) {
25583 carr[1].forEach(function(c) { if(c.T == true) needtc = true; });
25661 function firstbyte(f/*:RawData*/,o/*:?TypeOpts*/)/*:Array<number>*/ {
25673 function read_cfb(cfb/*:CFBContainer*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
25678 function read_zip(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
25686 function read_plaintext(data/*:string*/, o/*:ParseOpts*/)/*:Workbook*/ {
25696 function read_plaintext_raw(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {
25710 function read_utf16(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {
25718 function bstrify(data/*:string*/)/*:string*/ {
25722 function read_prn(data, d, o, str) {
25727 function readSync(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
25781 function readFileSync(filename/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
25785 function write_cfb_ctr(cfb/*:CFBContainer*/, o/*:WriteOpts*/)/*:any*/ {
25796 function write_zip(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {
25806 function write_zip_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {
25811 function write_zip_typeXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {
25816 function write_zip_denouement(z/*:any*/, o/*:?WriteOpts*/)/*:any*/ {
25843 function write_cfb_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {
25849 function write_string_type(out/*:string*/, opts/*:WriteOpts*/, bom/*:?string*/)/*:any*/ {
25860 …else return write_string_type(o, {type:'binary'}).split("").map(function(c) { return c.charCodeAt(…
25866 function write_stxt_type(out/*:string*/, opts/*:WriteOpts*/)/*:any*/ {
25874 else return out.split("").map(function(c) { return c.charCodeAt(0); });
25881 function write_binary_type(out, opts/*:WriteOpts*/)/*:any*/ {
25896 function writeSyncXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/) {
25905 function writeSync(wb/*:Workbook*/, opts/*:?WriteOpts*/) {
25951 function resolve_book_type(o/*:WriteFileOpts*/) {
25965 function writeFileSync(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {
25972 function writeFileSyncXLSX(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {
25980 function writeFileAsync(filename/*:string*/, wb/*:Workbook*/, opts/*:?WriteFileOpts*/, cb/*:?(e?:Er…
25994 function make_json_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array<string>*/, head…
26033 function sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {
26089 function make_csv_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array<string>*/, fs/*:…
26112 function sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ {
26137 function sheet_to_txt(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {
26145 function sheet_to_formulae(sheet/*:Worksheet*/)/*:Array<string>*/ {
26179 function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet*/ {
26204 js.forEach(function (JS, R/*:number*/) {
26207 keys(JS).forEach(function(k) {
26248 function json_to_sheet(js/*:Array<any>*/, opts)/*:Worksheet*/ { return sheet_add_json(null, js, opt…
26251 function ws_get_cell_stub(ws/*:Worksheet*/, R, C/*:?number*/)/*:Cell*/ {
26269 function wb_sheet_idx(wb/*:Workbook*/, sh/*:number|string*/) {
26281 function book_new()/*:Workbook*/ {
26286 function book_append_sheet(wb/*:Workbook*/, ws/*:Worksheet*/, name/*:?string*/, roll/*:?boolean*/)/…
26305 function book_set_sheet_visibility(wb/*:Workbook*/, sh/*:number|string*/, vis/*:number*/) {
26322 function cell_set_number_format(cell/*:Cell*/, fmt/*:string|number*/) {
26328 function cell_set_hyperlink(cell/*:Cell*/, target/*:string*/, tooltip/*:?string*/) {
26337 function cell_set_internal_link(cell/*:Cell*/, range/*:string*/, tooltip/*:?string*/) { return cell…
26340 function cell_add_comment(cell/*:Cell*/, text/*:string*/, author/*:?string*/) {
26346 function sheet_set_array_formula(ws/*:Worksheet*/, range, formula/*:string*/, dynamic/*:boolean*/) {
26409 function set_readable(R) { _Readable = R; }
26411 function write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {
26426 stream._read = function() {
26442 function write_html_stream(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*/) {
26454 stream._read = function() {
26468 function write_json_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {
26515 stream._read = function() {