}returnres};exports.findCompression=function(compressionMethod){for(varmethodincompressions){if(!compressions.hasOwnProperty(method)){continue}if(compressions[method].magic===compressionMethod){returncompressions[method]}}returnnull};exports.isRegExp=function(object){returnObject.prototype.toString.call(object)==="[object RegExp]"}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(_dereq_,module,exports){"use strict";varStringReader=_dereq_("./stringReader");varNodeBufferReader=_dereq_("./nodeBufferReader");varUint8ArrayReader=_dereq_("./uint8ArrayReader");varutils=_dereq_("./utils");varsig=_dereq_("./signature");varZipEntry=_dereq_("./zipEntry");varsupport=_dereq_("./support");varjszipProto=_dereq_("./object");functionZipEntries(data,loadOptions){this.files=[];this.loadOptions=loadOptions;if(data){this.load(data)}}ZipEntries.prototype={checkSignature:function(expectedSignature){varsignature=this.reader.readString(4);if(signature!==expectedSignature){thrownewError("Corrupted zip or bug : unexpected signature "+"("+utils.pretty(signature)+", expected "+utils.pretty(expectedSignature)+")")}},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2);this.diskWithCentralDirStart=this.reader.readInt(2);this.centralDirRecordsOnThisDisk=this.reader.readInt(2);this.centralDirRecords=this.reader.readInt(2);this.centralDirSize=this.reader.readInt(4);this.centralDirOffset=this.reader.readInt(4);this.zipCommentLength=this.reader.readInt(2);this.zipComment=this.reader.readString(this.zipCommentLength);this.zipComment=jszipProto.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8);this.versionMadeBy=this.reader.readString(2);this.versionNeeded=this.reader.readInt(2);this.diskNumber=this.reader.readInt(4);this.diskWithCentralDirStart=this.reader.readInt(4);this.centralDirRecordsOnThisDisk=this.reader.readInt(8);this.centralDirRecords=this.reader.readInt(8);this.centralDirSize=this.reader.readInt(8);this.centralDirOffset=this.reader.readInt(8);this.zip64ExtensibleData={};varextraDataSize=this.zip64EndOfCentralSize-44,index=0,extraFieldId,extraFieldLength,extraFieldValue;while(index<extraDataSize){extraFieldId=this.reader.readInt(2);extraFieldLength=this.reader.readInt(4);extraFieldValue=this.reader.readString(extraFieldLength);this.zip64ExtensibleData[extraFieldId]={id:extraFieldId,length:extraFieldLength,value:extraFieldValue}}},readBlockZip64EndOfCentralLocator:function(){this.diskWithZip64CentralDirStart=this.reader.readInt(4);this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8);this.disksCount=this.reader.readInt(4);if(this.disksCount>1){thrownewError("Multi-volumes zip are not supported")}},readLocalFiles:function(){vari,file;for(i=0;i<this.files.length;i++){file=this.files[i];this.reader.setIndex(file.localHeaderOffset);this.checkSignature(sig.LOCAL_FILE_HEADER);file.readLocalPart(this.reader);file.handleUTF8()}},readCentralDir:function(){varfile;this.reader.setIndex(this.centralDirOffset);while(this.reader.readString(4)===sig.CENTRAL_FILE_HEADER){file=newZipEntry({zip64:this.zip64},this.loadOptions);file.readCentralPart(this.reader);this.files.push(file)}},readEndOfCentral:function(){varoffset=this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);if(offset===-1){thrownewError("Corrupted zip : can't find end of central directory")}this.reader.setIndex(offset);this.checkSignature(sig.CENTRAL_DIRECTORY_END);this.readBlockEndOfCentral();if(this.diskNumber===utils.MAX_VALUE_16BITS||this.diskWithCentralDirStart===utils.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===utils.MAX_VALUE_16BITS||this.centralDirRecords===utils.MAX_VALUE_16BITS||this.centralDirSize===utils.MAX_VALUE_32BITS||this.centralDirOffset===utils.MAX_VALUE_32BITS){this.zip64=true;offset=this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);if(offset===-1){thrownewError("Corrupted zip : can't find the ZIP64 end of central directory locator")}this.reader.setIndex(offset);this.checkSignature(sig.ZIP64_CENTRAL_D
RELS.EXT_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";functionparse_ext_props(data,p){varq={};if(!p)p={};EXT_PROPS.forEach(function(f){switch(f[2]){case"string":p[f[1]]=(data.match(matchtag(f[0]))||[])[1];break;case"bool":p[f[1]]=(data.match(matchtag(f[0]))||[])[1]==="true";break;case"raw":varcur=data.match(newRegExp("<"+f[0]+"[^>]*>(.*)</"+f[0]+">"));if(cur&&cur.length>0)q[f[1]]=cur[1];break}});if(q.HeadingPairs&&q.TitlesOfParts){varv=parseVector(q.HeadingPairs);varparts=parseVector(q.TitlesOfParts).map(function(x){returnx.v});varidx=0,len=0;for(vari=0;i!==v.length;i+=2){len=+v[i+1].v;switch(v[i].v){case"Worksheets":case"工作表":case"Листы":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Werkbladen":p.Worksheets=len;p.SheetNames=parts.slice(idx,idx+len);break;case"Named Ranges":case"Benannte Bereiche":p.NamedRanges=len;p.DefinedNames=parts.slice(idx,idx+len);break;case"Charts":case"Diagramme":p.Chartsheets=len;p.ChartNames=parts.slice(idx,idx+len);break}idx+=len}}returnp}varEXT_PROPS_XML_ROOT=writextag("Properties",null,{xmlns:XMLNS.EXT_PROPS,"xmlns:vt":XMLNS.vt});functionwrite_ext_props(cp,opts){varo=[],p={},W=writextag;if(!cp)cp={};cp.Application="SheetJS";o[o.length]=XML_HEADER;o[o.length]=EXT_PROPS_XML_ROOT;EXT_PROPS.forEach(function(f){if(cp[f[1]]===undefined)return;varv;switch(f[2]){case"string":v=cp[f[1]];break;case"bool":v=cp[f[1]]?"true":"false";break}if(v!==undefined)o[o.length]=W(f[0],v)});o[o.length]=W("HeadingPairs",W("vt:vector",W("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+W("vt:variant",W("vt:i4",String(cp.Worksheets))),{size:2,baseType:"variant"}));o[o.length]=W("TitlesOfParts",W("vt:vector",cp.SheetNames.map(function(s){return"<vt:lpstr>"+escapexml(s)+"</vt:lpstr>"}).join(""),{size:cp.Worksheets,baseType:"lpstr"}));if(o.length>2){o[o.length]="</Properties>";o[1]=o[1].replace("/>",">")}returno.join("")}XMLNS.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";RELS.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";varcustregex=/<[^>]+>[^<]*/g;functionparse_cust_props(data,opts){varp={},name="";varm=data.match(custregex);if(m)for(vari=0;i!=m.length;++i){varx=m[i],y=parsexmltag(x);switch(y[0]){case"<?xml":break;case"<Properties":break;case"<property":name=y.name;break;case"</property>":name=null;break;default:if(x.indexOf("<vt:")===0){vartoks=x.split(">");vartype=toks[0].substring(4),text=toks[1];switch(type){case"lpstr":case"bstr":case"lpwstr":p[name]=unescapexml(text);break;case"bool":p[name]=parsexmlbool(text,"<vt:bool>");break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":p[name]=parseInt(text,10);break;case"r4":case"r8":case"decimal":p[name]=parseFloat(text);break;case"filetime":case"date":p[name]=parseDate(text);break;case"cy":case"error":p[name]=unescapexml(text);break;default:if(opts.WTF&&typeofconsole!=="undefined")console.warn("Unexpected",x,type,toks)}}elseif(x.substr(0,2)==="</"){}elseif(opts.WTF)thrownewError(x)}}returnp}varCUST_PROPS_XML_ROOT=writextag("Properties",null,{xmlns:XMLNS.CUST_PROPS,"xmlns:vt":XMLNS.vt});functionwrite_cust_props(cp,opts){varo=[XML_HEADER,CUST_PROPS_XML_ROOT];if(!cp)returno.join("");varpid=1;keys(cp).forEach(functioncustprop(k){++pid;o[o.length]=writextag("property",write_vt(cp[k]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:pid,name:k})});if(o.length>2){o[o.length]="</Properties>";o[1]=o[1].replace("/>",">")}returno.join("")}functionxlml_set_prop(Props,tag,val){switch(tag){case"Description":tag="Comments";break;case"Created":tag="CreatedDate";break;case"LastSaved":tag="ModifiedDate";break}Props[tag]=val}varXLMLDocumentProperties=[["Title","Title"],["Subject","Subject"],["Author","Author"],["Keywords","Keywords"],["Comments","Description"],["LastAuthor","LastAuthor"],["CreatedDate","Created","date"],["ModifiedDate","L
border.diagonalDown=y.diagonalDown}styles.Borders.push(border);break;case"</border>":break;case"<left":case"<left/>":break;case"</left>":break;case"<right":case"<right/>":break;case"</right>":break;case"<top":case"<top/>":break;case"</top>":break;case"<bottom":case"<bottom/>":break;case"</bottom>":break;case"<diagonal":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start/>":break;case"</start>":break;case"<end":case"<end/>":break;case"</end>":break;case"<color":case"<color/>":break;case"</color>":break;default:if(opts&&opts.WTF)thrownewError("unrecognized "+y[0]+" in borders")}})}functionparse_fills(t,styles,themes,opts){styles.Fills=[];varfill={};t[0].match(tagregex).forEach(function(x){vary=parsexmltag(x);switch(y[0]){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":break;case"</fill>":styles.Fills.push(fill);fill={};break;case"<gradientFill>":break;case"</gradientFill>":styles.Fills.push(fill);fill={};break;case"<patternFill":case"<patternFill>":if(y.patternType)fill.patternType=y.patternType;break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":if(!fill.bgColor)fill.bgColor={};if(y.indexed)fill.bgColor.indexed=parseInt(y.indexed,10);if(y.theme)fill.bgColor.theme=parseInt(y.theme,10);if(y.tint)fill.bgColor.tint=parseFloat(y.tint);if(y.rgb)fill.bgColor.rgb=y.rgb.slice(-6);break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":if(!fill.fgColor)fill.fgColor={};if(y.theme)fill.fgColor.theme=parseInt(y.theme,10);if(y.tint)fill.fgColor.tint=parseFloat(y.tint);if(y.rgb)fill.fgColor.rgb=y.rgb.slice(-6);break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;default:if(opts&&opts.WTF)thrownewError("unrecognized "+y[0]+" in fills")}})}functionparse_fonts(t,styles,themes,opts){styles.Fonts=[];varfont={};t[0].match(tagregex).forEach(function(x){vary=parsexmltag(x);switch(y[0]){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":styles.Fonts.push(font);font={};break;case"<name":if(y.val)font.name=y.val;break;case"<name/>":case"</name>":break;case"<b":break;case"<b/>":font.bold=true;break;case"<i":break;case"<i/>":font.italic=true;break;case"<u":font.underline=true;break;case"<u/>":font.underline=true;break;case"<strike":break;case"<strike/>":font.strike=true;break;case"<outline/>":font.outline=true;break;case"<shadow/>":font.shadow=true;break;case"<sz":if(y.val)font.sz=y.val;break;case"<sz/>":case"</sz>":break;case"<vertAlign":if(y.val)font.vertAlign=y.val;break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":if(y.val)font.family=y.val;break;case"<family/>":case"</family>":break;case"<scheme":if(y.val)font.scheme=y.val;break;case"<scheme/>":case"</scheme>":break;case"<charset":if(y.val=="1")break;y.codepage=CS2CP[parseInt(y.val,10)];break;case"<color":if(!font.color)font.color={};if(y.theme)font.color.theme=y.theme;if(y.tint)font.color.tint=y.tint;if(y.theme&&themes.themeElements&&themes.themeElements.clrScheme){font.color.rgb=rgb_tint(themes.themeElements.clrScheme[font.color.theme].rgb,font.color.tint||0)}if(y.rgb)font.color.rgb=y.rgb;break;case"<color/>":case"</color>":break;default:if(opts&&opts.WTF)thrownewError("unrecognized "+y[0]+" in fonts")}})}functionparse_numFmts(t,styles,opts){styles.NumberFmt=[];vark=keys(SSF._table);for(vari=0;i<k.length;++i)styles.NumberFmt[k[i]]=SSF._table[k[i]];varm=t[0].match(tagregex);if(!m)return;for(i=0;i<m.length;++i){vary=parsexmltag(m[i]);switch(y[0]){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{varf=unescapexml(utf8read(y.formatCode)),j=parseInt(y.numFmtId,10);styles.NumberFmt[j]=f;if(j>0)SSF.load(f,j)}break;case"</numFmt>":break;default:if(opts.WTF)thrownewError("unrecognized "+y[0]+" in numFmts")}}}functionwrite_numFmts(NF,opts){varo=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].f
break;case"BrtCustomFilter":break;case"BrtEndCustomFilters":break;case"BrtBeginSmartTags":break;case"BrtBeginCellSmartTags":break;case"BrtBeginCellSmartTag":break;case"BrtCellSmartTagProperty":break;case"BrtEndCellSmartTag":break;case"BrtEndCellSmartTags":break;case"BrtEndSmartTags":break;case"BrtBeginCellWatches":break;case"BrtCellWatch":break;case"BrtEndCellWatches":break;case"BrtTable":break;case"BrtBeginCellIgnoreECs":break;case"BrtCellIgnoreEC":break;case"BrtEndCellIgnoreECs":break;default:if(!pass||opts.WTF)thrownewError("Unexpected record "+Record.n)}},opts);deleteopts.supbooks;deleteopts["!row"];if(!s["!ref"]&&(refguess.s.r<2e6||ref&&(ref.e.r>0||ref.e.c>0||ref.s.r>0||ref.s.c>0)))s["!ref"]=encode_range(ref||refguess);if(opts.sheetRows&&s["!ref"]){vartmpref=safe_decode_range(s["!ref"]);if(opts.sheetRows<+tmpref.e.r){tmpref.e.r=opts.sheetRows-1;if(tmpref.e.r>refguess.e.r)tmpref.e.r=refguess.e.r;if(tmpref.e.r<tmpref.s.r)tmpref.s.r=tmpref.e.r;if(tmpref.e.c>refguess.e.c)tmpref.e.c=refguess.e.c;if(tmpref.e.c<tmpref.s.c)tmpref.s.c=tmpref.e.c;s["!fullref"]=s["!ref"];s["!ref"]=encode_range(tmpref)}}if(mergecells.length>0)s["!merges"]=mergecells;if(colinfo.length>0)s["!cols"]=colinfo;if(rowinfo.length>0)s["!rows"]=rowinfo;returns}functionwrite_ws_bin_cell(ba,cell,R,C,opts,ws){if(cell.v===undefined)return"";varvv="";varolddate=null;switch(cell.t){case"b":vv=cell.v?"1":"0";break;case"d":cell.z=cell.z||SSF._table[14];olddate=cell.v;cell.v=datenum(cell.v);cell.t="n";break;case"n":case"e":vv=""+cell.v;break;default:vv=cell.v;break}varo={r:R,c:C};if(cell.l)ws["!links"].push([encode_cell(o),cell.l]);if(cell.c)ws["!comments"].push([encode_cell(o),cell.c]);switch(cell.t){case"s":case"str":if(opts.bookSST){vv=get_sst_id(opts.Strings,cell.v);o.t="s";o.v=vv;write_record(ba,"BrtCellIsst",write_BrtCellIsst(cell,o))}else{o.t="str";write_record(ba,"BrtCellSt",write_BrtCellSt(cell,o))}return;case"n":if(cell.v==(cell.v|0)&&cell.v>-1e3&&cell.v<1e3)write_record(ba,"BrtCellRk",write_BrtCellRk(cell,o));elsewrite_record(ba,"BrtCellReal",write_BrtCellReal(cell,o));if(olddate){cell.t="d";cell.v=olddate}return;case"b":o.t="b";write_record(ba,"BrtCellBool",write_BrtCellBool(cell,o));return;case"e":o.t="e";break}write_record(ba,"BrtCellBlank",write_BrtCellBlank(cell,o))}functionwrite_CELLTABLE(ba,ws,idx,opts,wb){varrange=safe_decode_range(ws["!ref"]||"A1"),ref,rr="",cols=[];write_record(ba,"BrtBeginSheetData");for(varR=range.s.r;R<=range.e.r;++R){rr=encode_row(R);write_row_header(ba,ws,range,R);for(varC=range.s.c;C<=range.e.c;++C){if(R===range.s.r)cols[C]=encode_col(C);ref=cols[C]+rr;if(!ws[ref])continue;write_ws_bin_cell(ba,ws[ref],R,C,opts,ws)}}write_record(ba,"BrtEndSheetData")}functionwrite_MERGECELLS(ba,ws){if(!ws||!ws["!merges"])return;write_record(ba,"BrtBeginMergeCells",write_BrtBeginMergeCells(ws["!merges"].length));ws["!merges"].forEach(function(m){write_record(ba,"BrtMergeCell",write_BrtMergeCell(m))});write_record(ba,"BrtEndMergeCells")}functionwrite_COLINFOS(ba,ws,idx,opts,wb){if(!ws||!ws["!cols"])return;write_record(ba,"BrtBeginColInfos");ws["!cols"].forEach(function(m,i){if(m)write_record(ba,"BrtColInfo",write_BrtColInfo(i,m))});write_record(ba,"BrtEndColInfos")}functionwrite_HLINKS(ba,ws,rels){ws["!links"].forEach(function(l){if(!l[1].Target)return;varrId=add_rels(rels,-1,l[1].Target.replace(/#.*$/,""),RELS.HLINK);write_record(ba,"BrtHLink",write_BrtHLink(l,rId))});deletews["!links"]}functionwrite_LEGACYDRAWING(ba,ws,idx,rels){if(ws["!comments"].length>0){varrId=add_rels(rels,-1,"../drawings/vmlDrawing"+(idx+1)+".vml",RELS.VML);write_record(ba,"BrtLegacyDrawing",write_RelID("rId"+rId));ws["!legacy"]=rId}}functionwrite_ws_bin(idx,opts,wb,rels){varba=buf_array();vars=wb.SheetNames[idx],ws=wb.Sheets[s]||{};varr=safe_decode_range(ws["!ref"]||"A1");ws["!links"]=[];ws["!comments"]=[];write_record(ba,"BrtBeginSheet");write_record(ba,"BrtWsProp",write_BrtWsProp(s));write_record(ba,"BrtWsDim",write_BrtWsDim(r));write_COLINFOS(ba,ws,idx,opts,wb);write_CELLTABLE(ba,ws,idx,opts,wb);write_MERGECELLS(ba,ws);write_HLINKS(ba
try{sheetRels[sheet]=parse_rels(getzipstr(zip,relsPath,true),path);vardata=getzipdata(zip,path);switch(stype){case"sheet":sheets[sheet]=parse_ws(data,path,opts,sheetRels[sheet],wb,themes,styles);break;case"chart":varcs=parse_cs(data,path,opts,sheetRels[sheet],wb,themes,styles);sheets[sheet]=cs;if(!cs||!cs["!chart"])break;vardfile=resolve_path(cs["!chart"].Target,path);vardrelsp=get_rels_path(dfile);vardraw=parse_drawing(getzipstr(zip,dfile,true),parse_rels(getzipstr(zip,drelsp,true),dfile));varchartp=resolve_path(draw,dfile);varcrelsp=get_rels_path(chartp);cs=parse_chart(getzipstr(zip,chartp,true),chartp,opts,parse_rels(getzipstr(zip,crelsp,true),chartp),wb,cs);break;case"macro":sheets[sheet]=parse_ms(data,path,opts,sheetRels[sheet],wb,themes,styles);break;case"dialog":sheets[sheet]=parse_ds(data,path,opts,sheetRels[sheet],wb,themes,styles);break}}catch(e){if(opts.WTF)throwe}}varnodirs=functionnodirs(x){returnx.slice(-1)!="/"};functionparse_zip(zip,opts){make_ssf(SSF);opts=opts||{};fix_read_opts(opts);reset_cp();if(safegetzipfile(zip,"META-INF/manifest.xml"))returnparse_ods(zip,opts);if(safegetzipfile(zip,"objectdata.xml"))returnparse_ods(zip,opts);varentries=keys(zip.files).filter(nodirs).sort();vardir=parse_ct(getzipstr(zip,"[Content_Types].xml"),opts);varxlsb=false;varsheets,binname;if(dir.workbooks.length===0){binname="xl/workbook.xml";if(getzipdata(zip,binname,true))dir.workbooks.push(binname)}if(dir.workbooks.length===0){binname="xl/workbook.bin";if(!getzipfile(zip,binname,true))thrownewError("Could not find workbook");dir.workbooks.push(binname);xlsb=true}if(dir.workbooks[0].slice(-3)=="bin")xlsb=true;if(xlsb)set_cp(1200);varthemes={};varstyles={};if(!opts.bookSheets&&!opts.bookProps){strs=[];if(dir.sst)strs=parse_sst(getzipdata(zip,dir.sst.replace(/^\//,"")),dir.sst,opts);if(opts.cellStyles&&dir.themes.length)themes=parse_theme(getzipstr(zip,dir.themes[0].replace(/^\//,""),true)||"",dir.themes[0],opts);if(dir.style)styles=parse_sty(getzipdata(zip,dir.style.replace(/^\//,"")),dir.style,themes,opts)}varwb=parse_wb(getzipdata(zip,dir.workbooks[0].replace(/^\//,"")),dir.workbooks[0],opts);varprops={},propdata="";if(dir.coreprops.length!==0){propdata=getzipstr(zip,dir.coreprops[0].replace(/^\//,""),true);if(propdata)props=parse_core_props(propdata);if(dir.extprops.length!==0){propdata=getzipstr(zip,dir.extprops[0].replace(/^\//,""),true);if(propdata)parse_ext_props(propdata,props)}}varcustprops={};if(!opts.bookSheets||opts.bookProps){if(dir.custprops.length!==0){propdata=getzipstr(zip,dir.custprops[0].replace(/^\//,""),true);if(propdata)custprops=parse_cust_props(propdata,opts)}}varout={};if(opts.bookSheets||opts.bookProps){if(wb.Sheets)sheets=wb.Sheets.map(functionpluck(x){returnx.name});elseif(props.Worksheets&&props.SheetNames.length>0)sheets=props.SheetNames;if(opts.bookProps){out.Props=props;out.Custprops=custprops}if(opts.bookSheets&&typeofsheets!=="undefined")out.SheetNames=sheets;if(opts.bookSheets?out.SheetNames:opts.bookProps)returnout}sheets={};vardeps={};if(opts.bookDeps&&dir.calcchain)deps=parse_cc(getzipdata(zip,dir.calcchain.replace(/^\//,"")),dir.calcchain,opts);vari=0;varsheetRels={};varpath,relsPath;varwbsheets=wb.Sheets;props.Worksheets=wbsheets.length;props.SheetNames=[];for(varj=0;j!=wbsheets.length;++j){props.SheetNames[j]=wbsheets[j].name}varwbext=xlsb?"bin":"xml";varwbrelsfile="xl/_rels/workbook."+wbext+".rels";varwbrels=parse_rels(getzipstr(zip,wbrelsfile,true),wbrelsfile);if(wbrels)wbrels=safe_parse_wbrels(wbrels,wb.Sheets);varnmode=getzipdata(zip,"xl/worksheets/sheet.xml",true)?1:0;for(i=0;i!=props.Worksheets;++i){varstype="sheet";if(wbrels&&wbrels[i]){path="xl/"+wbrels[i][1].replace(/[\/]?xl\//,"");stype=wbrels[i][2]}else{path="xl/worksheets/sheet"+(i+1-nmode)+"."+wbext;path=path.replace(/sheet0\./,"sheet.")}relsPath=path.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels");safe_parse_sheet(zip,path,relsPath,props.SheetNames[i],sheetRels,sheets,stype,opts,wb,themes,styles)}if(dir.comments)parse_comments(zip,dir.comments,sheets,sheetRels,opts);out={Dire