}returnr}functionbr(e){varr=0,t=0,a=false;varn=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!n)thrownewError("|"+e+"| is not an ISO8601 Duration");for(vari=1;i!=n.length;++i){if(!n[i])continue;t=1;if(i>3)a=true;switch(n[i].slice(n[i].length-1)){case"Y":thrownewError("Unsupported ISO Duration Field: "+n[i].slice(n[i].length-1));case"D":t*=24;case"H":t*=60;case"M":if(!a)thrownewError("Unsupported ISO Duration Field: M");elset*=60;case"S":break;}r+=t*parseInt(n[i],10)}returnr}vargr=newDate("2017-02-19T19:06:09.000Z");varwr=isNaN(gr.getFullYear())?newDate("2/19/17"):gr;varkr=wr.getFullYear()==2017;functionTr(e,r){vart=newDate(e);if(kr){if(r>0)t.setTime(t.getTime()+t.getTimezoneOffset()*60*1e3);elseif(r<0)t.setTime(t.getTime()-t.getTimezoneOffset()*60*1e3);returnt}if(einstanceofDate)returne;if(wr.getFullYear()==1917&&!isNaN(t.getFullYear())){vara=t.getFullYear();if(e.indexOf(""+a)>-1)returnt;t.setFullYear(t.getFullYear()+100);returnt}varn=e.match(/\d+/g)||["2017","2","19","0","0","0"];vari=newDate(+n[0],+n[1]-1,+n[2],+n[3]||0,+n[4]||0,+n[5]||0);if(e.indexOf("Z")>-1)i=newDate(i.getTime()-i.getTimezoneOffset()*60*1e3);returni}functionEr(e,r){if(y&&Buffer.isBuffer(e)){if(r&&_){if(e[0]==255&&e[1]==254)returnbt(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)returnbt(h(e.slice(2).toString("binary")))}returne.toString("binary")}if(typeofTextDecoder!=="undefined")try{if(r){if(e[0]==255&&e[1]==254)returnbt(newTextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)returnbt(newTextDecoder("utf-16be").decode(e.slice(2)))}vart={"€":"","‚":"","ƒ":"","„":"","…":"","†":"","‡":"","ˆ":"","‰":"","Š":"","‹":"","Œ":"","Ž":"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"","š":"","›":"","œ":"","ž":"","Ÿ":""};if(Array.isArray(e))e=newUint8Array(e);returnnewTextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(e){returnt[e]||e})}catch(a){}varn=[];for(vari=0;i!=e.length;++i)n.push(String.fromCharCode(e[i]));returnn.join("")}functionyr(e){if(typeofJSON!="undefined"&&!Array.isArray(e))returnJSON.parse(JSON.stringify(e));if(typeofe!="object"||e==null)returne;if(einstanceofDate)returnnewDate(e.getTime());varr={};for(vartine)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=yr(e[t]);returnr}functionSr(e,r){vart="";while(t.length<r)t+=e;returnt}function_r(e){varr=Number(e);if(!isNaN(r))returnisFinite(r)?r:NaN;if(!/\d/.test(e))returnr;vart=1;vara=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){t*=100;return""});if(!isNaN(r=Number(a)))returnr/t;a=a.replace(/[(](.*)[)]/,function(e,r){t=-t;returnr});if(!isNaN(r=Number(a)))returnr/t;returnr}varAr=/^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/;functionxr(e){if(!e[2])returnnewDate(1899,11,30,+e[1]%12+(e[7]=="p"?12:0),0,0,0);if(e[3]){if(e[4])returnnewDate(1899,11,30,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[4],parseFloat(e[3])*1e3);elsereturnnewDate(1899,11,30,e[7]=="p"?12:0,+e[1],+e[2],parseFloat(e[3])*1e3)}elseif(e[5])returnnewDate(1899,11,30,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[5],e[6]?parseFloat(e[6])*1e3:0);elsereturnnewDate(1899,11,30,+e[1]%12+(e[7]=="p"?12:0),+e[2],0,0)}varCr=["january","february","march","april","may","june","july","august","september","october","november","december"];functionOr(e){varr=e.toLowerCase();vart=r.replace(/\s+/g," ").trim();vara=t.match(Ar);if(a)returnxr(a);varn=newDate(e),i=newDate(NaN);vars=n.getYear(),f=n.getMonth(),l=n.getDate();if(isNaN(l))returni;if(r.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){r=r.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"");if(r.length>3&&Cr.indexOf(r)==-1)returni}elseif(r.replace(/[ap]m?/,"").match(/[a-z]/))returni;if(s<0||s>8099||e.match(/[^-0-9:,\/\\]/))returni;returnn}varRr=function(){vare="aba
C=true;break;case"E":N=true;D=Lu(y[u].slice(1),{r:f,c:o});break;case"S":R=true;break;case"G":break;case"R":I=parseInt(y[u].slice(1),10)-1;break;case"C":F=parseInt(y[u].slice(1),10)-1;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+E);}if(C){if(!h[f][o])h[f][o]={t:P,v:_};else{h[f][o].t=P;h[f][o].v=_}if(v)h[f][o].z=v;if(i.cellText!==false&&v)h[f][o].w=ze(h[f][o].z,h[f][o].v,{date1904:T.Workbook.WBProps.date1904});v=null}if(R){if(N)thrownewError("SYLK shared formula cannot have own formula");varL=I>-1&&h[I][F];if(!L||!L[1])thrownewError("SYLK shared formula cannot find base");D=Bu(L[1],{r:f-I,c:o-F})}if(D){if(!h[f][o])h[f][o]={t:"n",f:D};elseh[f][o].f=D}break;case"F":varM=0;for(u=1;u<y.length;++u)switch(y[u].charAt(0)){case"X":o=parseInt(y[u].slice(1),10)-1;++M;break;case"Y":f=parseInt(y[u].slice(1),10)-1;for(k=h.length;k<=f;++k)h[k]=[];break;case"M":w=parseInt(y[u].slice(1),10)/20;break;case"F":break;case"G":break;case"P":v=d[parseInt(y[u].slice(1),10)];break;case"S":break;case"D":break;case"N":break;case"W":g=y[u].slice(1).split(" ");for(k=parseInt(g[0],10);k<=parseInt(g[1],10);++k){w=parseInt(g[2],10);b[k-1]=w===0?{hidden:true}:{wch:w}}break;case"C":o=parseInt(y[u].slice(1),10)-1;if(!b[o])b[o]={};break;case"R":f=parseInt(y[u].slice(1),10)-1;if(!m[f])m[f]={};if(w>0){m[f].hpt=w;m[f].hpx=$o(w)}elseif(w===0)m[f].hidden=true;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+E);}if(M<1)v=null;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+E);}}if(m.length>0)p["!rows"]=m;if(b.length>0)p["!cols"]=b;b.forEach(function(e){Ho(e)});if(i&&i.sheetRows)h=h.slice(0,i.sheetRows);return[h,p,T]}functionf(e,r){vart=i(e,r);vara=t[0],n=t[1],s=t[2];varf=yr(r);f.date1904=(((s||{}).Workbook||{}).WBProps||{}).date1904;varl=Xa(a,f);sr(n).forEach(function(e){l[e]=n[e]});varo=$a(l,r);sr(s).forEach(function(e){o[e]=s[e]});o.bookType="sylk";returno}functiono(e,r,t,a){varn="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":n+=e.v||0;if(e.f&&!e.F)n+=";E"+Uu(e.f,{r:t,c:a});break;case"b":n+=e.v?"TRUE":"FALSE";break;case"e":n+=e.w||e.v;break;case"d":n+='"'+(e.w||e.v)+'"';break;case"s":n+='"'+e.v.replace(/"/g,"").replace(/;/g,";;")+'"';break;}returnn}functionc(e,r){r.forEach(function(r,t){vara="F;W"+(t+1)+" "+(t+1)+" ";if(r.hidden)a+="0";else{if(typeofr.width=="number"&&!r.wpx)r.wpx=Lo(r.width);if(typeofr.wpx=="number"&&!r.wch)r.wch=Mo(r.wpx);if(typeofr.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}functionu(e,r){r.forEach(function(r,t){vara="F;";if(r.hidden)a+="M0;";elseif(r.hpt)a+="M"+20*r.hpt+";";elseif(r.hpx)a+="M"+20*Go(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}functionh(e,r,t){vara=["ID;PSheetJS;N;E"],n=[];vari=za(e["!ref"]),s;varf=Array.isArray(e);varl="\r\n";varh=(((t||{}).Workbook||{}).WBProps||{}).date1904;a.push("P;PGeneral");a.push("F;P0;DG0G8;M255");if(e["!cols"])c(a,e["!cols"]);if(e["!rows"])u(a,e["!rows"]);a.push("B;Y"+(i.e.r-i.s.r+1)+";X"+(i.e.c-i.s.c+1)+";D"+[i.s.c,i.s.r,i.e.c,i.e.r].join(" "));a.push("O;L;D;B"+(h?";V4":"")+";K47;G100 0.001");for(vard=i.s.r;d<=i.e.r;++d){varv=[];for(varp=i.s.c;p<=i.e.c;++p){varm=Ma({r:d,c:p});s=f?(e[d]||[])[p]:e[m];if(!s||s.v==null&&(!s.f||s.F))continue;v.push(o(s,e,d,p,r))}n.push(v.join(l))}returna.join(l)+l+n.join(l)+l+"E"+l}return{to_workbook:f,from_sheet:h}}();varRl=function(){functione(e,t){switch(t.type){case"base64":returnr(E(e),t);case"binary":returnr(e,t);case"buffer":returnr(y&&Buffer.isBuffer(e)?e.toString("binary"):R(e),t);case"array":returnr(Er(e),t);}thrownewError("Unrecognized type "+t.type)}functionr(e,r){vart=e.split("\n"),a=-1,n=-1,i=0,s=[];for(;i!==t.length;++i){if(t[i].trim()==="BOT"){s[++a]=[];n=0;continue}if(a<0)continue;varf=t[i].trim().split(",");varl=f[0],o=f[1];++i;varc=t[i]||"";while((c.match(/["]/g)||[]).length&1&&i<t.length-1)c+="\n"+t[++i];c=c.trim();switch(+l){case-1:if(c==="BOT"){s[++a]=[];n=0;continue}elseif(c!=="EOD")thrownewError("Unrecognized DIF special command "+c);break;case0:if(c==="TRUE")s[a][n]=true;elseif(c==="FALSE")s[a][n]=false;elseif(!
if(!T)T=0;T&=127;vary=T==0?[]:f.slice(-T);f.length-=T;if(E==="User")E=y.shift();f.push(E+"("+y.join(",")+")");break;case"PtgBool":f.push(w[1]?"TRUE":"FALSE");break;case"PtgInt":f.push(w[1]);break;case"PtgNum":f.push(String(w[1]));break;case"PtgStr":f.push('"'+w[1].replace(/"/g,'""')+'"');break;case"PtgErr":f.push(w[1]);break;case"PtgAreaN":d=Sa(w[1][1],t?{s:t}:s,n);f.push(Aa(d,n));break;case"PtgArea":d=Sa(w[1][1],s,n);f.push(Aa(d,n));break;case"PtgArea3d":u=w[1][1];d=w[1][2];v=md(a,u,n);f.push(v+"!"+Aa(d,n));break;case"PtgAttrSum":f.push("SUM("+f.pop()+")");break;case"PtgAttrBaxcel":;case"PtgAttrSemi":break;case"PtgName":h=w[1][2];varS=(a.names||[])[h-1]||(a[0]||[])[h];var_=S?S.Name:"SH33TJSNAME"+String(h);if(_&&_.slice(0,6)=="_xlfn."&&!n.xlfn)_=_.slice(6);f.push(_);break;case"PtgNameX":varA=w[1][1];h=w[1][2];varx;if(n.biff<=5){if(A<0)A=-A;if(a[A])x=a[A][h]}else{varC="";if(((a[A]||[])[0]||[])[0]==14849){}elseif(((a[A]||[])[0]||[])[0]==1025){if(a[A][h]&&a[A][h].itab>0){C=a.SheetNames[a[A][h].itab-1]+"!"}}elseC=a.SheetNames[h-1]+"!";if(a[A]&&a[A][h])C+=a[A][h].Name;elseif(a[0]&&a[0][h])C+=a[0][h].Name;else{varO=(pd(a,A,n)||"").split(";;");if(O[h-1])C=O[h-1];elseC+="SH33TJSERRX"}f.push(C);break}if(!x)x={Name:"SH33TJSERRY"};f.push(x.Name);break;case"PtgParen":varR="(",N=")";if(p>=0){m="";switch(e[0][p][1][0]){case2:R=Sr(" ",e[0][p][1][1])+R;break;case3:R=Sr("\r",e[0][p][1][1])+R;break;case4:N=Sr(" ",e[0][p][1][1])+N;break;case5:N=Sr("\r",e[0][p][1][1])+N;break;default:if(n.WTF)thrownewError("Unexpected PtgAttrSpaceType "+e[0][p][1][0]);}p=-1}f.push(R+f.pop()+N);break;case"PtgRefErr":f.push("#REF!");break;case"PtgRefErr3d":f.push("#REF!");break;case"PtgExp":c={c:w[1][1],r:w[1][0]};varI={c:t.c,r:t.r};if(a.sharedf[Ma(c)]){varF=a.sharedf[Ma(c)];f.push(bd(F,s,I,a,n))}else{varD=false;for(l=0;l!=a.arrayf.length;++l){o=a.arrayf[l];if(c.c<o[0].s.c||c.c>o[0].e.c)continue;if(c.r<o[0].s.r||c.r>o[0].e.r)continue;f.push(bd(o[1],s,I,a,n));D=true;break}if(!D)f.push(w[1])}break;case"PtgArray":f.push("{"+hd(w[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":;case"PtgAttrSpaceSemi":p=b;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":f.push("");break;case"PtgAreaErr":f.push("#REF!");break;case"PtgAreaErr3d":f.push("#REF!");break;case"PtgList":f.push("Table"+w[1].idx+"[#"+w[1].rt+"]");break;case"PtgMemAreaN":;case"PtgMemNoMemN":;case"PtgAttrNoop":;case"PtgSheet":;case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":;case"PtgElfColS":;case"PtgElfColSV":;case"PtgElfColV":;case"PtgElfLel":;case"PtgElfRadical":;case"PtgElfRadicalLel":;case"PtgElfRadicalS":;case"PtgElfRw":;case"PtgElfRwV":thrownewError("Unsupported ELFs");case"PtgSxName":thrownewError("Unrecognized Formula Token: "+String(w));default:thrownewError("Unrecognized Formula Token: "+String(w));}varP=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(n.biff!=3)if(p>=0&&P.indexOf(e[0][b][0])==-1){w=e[0][p];varL=true;switch(w[1][0]){case4:L=false;case0:m=Sr(" ",w[1][1]);break;case5:L=false;case1:m=Sr("\r",w[1][1]);break;default:m="";if(n.WTF)thrownewError("Unexpected PtgAttrSpaceType "+w[1][0]);}f.push((L?m:"")+f.pop()+(L?"":m));p=-1}}if(f.length>1&&n.WTF)thrownewError("bad formula stack");if(f[0]=="TRUE")returntrue;if(f[0]=="FALSE")returnfalse;returnf[0]}functiongd(e,r,t){vara=e.l+r,n=t.biff==2?1:2;vari,s=e._R(n);if(s==65535)return[[],ga(e,r-2)];varf=ud(e,s,t);if(r!==s+n)i=cd(e,r-s-n,f,t);e.l=a;return[f,i]}functionwd(e,r,t){vara=e.l+r,n=t.biff==2?1:2;vari,s=e._R(n);if(s==65535)return[[],ga(e,r-2)];varf=ud(e,s,t);if(r!==s+n)i=cd(e,r-s-n,f,t);e.l=a;return[f,i]}functionkd(e,r,t,a){varn=e.l+r;vari=ud(e,a,t);vars;if(n!==e.l)s=cd(e,n-e.l,i,t);return[i,s]}functionTd(e,r,t){vara=e.l+r;varn,i=e._R(2);vars=ud(e,i,t);if(i==65535)return[[],ga(e,r-2)];if(r!==i+2)n=cd(e,a-i-2,s,t);return[s,n]}functionEd(e){varr;if(sa(e,e.l+6)!==65535)return[En(e),"n"];switch(e[e.l]){case0:e.l+=8;return["String","s"];case1:r=e[e.l+2]===1;e.l+=8;return[r,"b"];case2:r=e[e.l+2];e.l+=8;return[r,"e"];case3
});Ev.forEach(function(t){if(e[t]!=null&&!e[t])r[t]="0"});if(e.password)r.password=mo(e.password).toString(16).toUpperCase();returnxt("sheetProtection",null,r)}functionSv(e,r,t){vara=Array.isArray(e);for(varn=0;n!=r.length;++n){vari=Jr(mt(r[n]),true);if(!i.ref)return;vars=((t||{})["!id"]||[])[i.id];if(s){i.Target=s.Target;if(i.location)i.Target+="#"+rt(i.location)}else{i.Target="#"+rt(i.location);s={Target:i.Target,TargetMode:"Internal"}}i.Rel=s;if(i.tooltip){i.Tooltip=i.tooltip;deletei.tooltip}varf=za(i.ref);for(varl=f.s.r;l<=f.e.r;++l)for(varo=f.s.c;o<=f.e.c;++o){varc=Ma({c:o,r:l});if(a){if(!e[l])e[l]=[];if(!e[l][o])e[l][o]={t:"z",v:undefined};e[l][o].l=i}else{if(!e[c])e[c]={t:"z",v:undefined};e[c].l=i}}}}function_v(e){varr={};["left","right","top","bottom","header","footer"].forEach(function(t){if(e[t])r[t]=parseFloat(e[t])});returnr}functionAv(e){rv(e);returnxt("pageMargins",null,e)}functionxv(e,r){vart=false;for(vara=0;a!=r.length;++a){varn=Jr(r[a],true);if(n.hidden)n.hidden=ut(n.hidden);vari=parseInt(n.min,10)-1,s=parseInt(n.max,10)-1;if(n.outlineLevel)n.level=+n.outlineLevel||0;deleten.min;deleten.max;n.width=+n.width;if(!t&&n.width){t=true;Wo(n.width)}Ho(n);while(i<=s)e[i++]=yr(n)}}functionCv(e,r){vart=["<cols>"],a;for(varn=0;n!=r.length;++n){if(!(a=r[n]))continue;t[t.length]=xt("col",null,ev(n,a))}t[t.length]="</cols>";returnt.join("")}functionOv(e){varr={ref:(e.match(/ref="([^"]*)"/)||[])[1]};returnr}functionRv(e,r,t,a){varn=typeofe.ref=="string"?e.ref:Ba(e.ref);if(!t.Workbook)t.Workbook={Sheets:[]};if(!t.Workbook.Names)t.Workbook.Names=[];vari=t.Workbook.Names;vars=Ua(n);if(s.s.r==s.e.r){s.e.r=Ua(r["!ref"]).e.r;n=Ba(s)}for(varf=0;f<i.length;++f){varl=i[f];if(l.Name!="_xlnm._FilterDatabase")continue;if(l.Sheet!=a)continue;l.Ref=Ha(t.SheetNames[a])+"!"+Wa(n);break}if(f==i.length)i.push({Name:"_xlnm._FilterDatabase",Sheet:a,Ref:"'"+t.SheetNames[a]+"'!"+n});returnxt("autoFilter",null,{ref:n})}varNv=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/g;functionIv(e,r){if(!r.Views)r.Views=[{}];(e.match(Nv)||[]).forEach(function(e,t){vara=Jr(e);if(!r.Views[t])r.Views[t]={};if(+a.zoomScale)r.Views[t].zoom=+a.zoomScale;if(a.rightToLeft&&ut(a.rightToLeft))r.Views[t].RTL=true})}functionFv(e,r,t,a){varn={workbookViewId:"0"};if((((a||{}).Workbook||{}).Views||[])[0])n.rightToLeft=a.Workbook.Views[0].RTL?"1":"0";returnxt("sheetViews",xt("sheetView",null,n),{})}functionDv(e,r,t,a){if(e.c)t["!comments"].push([r,e.c]);if((e.v===undefined||e.t==="z"&&!(a||{}).sheetStubs)&&typeofe.f!=="string"&&typeofe.z=="undefined")return"";varn="";vari=e.t,s=e.v;if(e.t!=="z")switch(e.t){case"b":n=e.v?"1":"0";break;case"n":n=""+e.v;break;case"e":n=Jn[e.v];break;case"d":if(a&&a.cellDates)n=Tr(e.v,-1).toISOString();else{e=yr(e);e.t="n";n=""+(e.v=hr(Tr(e.v)))}if(typeofe.z==="undefined")e.z=Z[14];break;default:n=e.v;break;}varf=e.t=="z"||e.v==null?"":_t("v",nt(n)),l={r:r};varo=tv(a.cellXfs,e,a);if(o!==0)l.s=o;switch(e.t){case"n":break;case"d":l.t="d";break;case"b":l.t="b";break;case"e":l.t="e";break;case"z":break;default:if(e.v==null){deletee.t;break}if(e.v.length>32767)thrownewError("Text length must not exceed 32767 characters");if(a&&a.bookSST){f=_t("v",""+Qd(a.Strings,e.v,a.revStrings));l.t="s";break}elsel.t="str";break;}if(e.t!=i){e.t=i;e.v=s}if(typeofe.f=="string"&&e.f){varc=e.F&&e.F.slice(0,r.length)==r?{t:"array",ref:e.F}:null;f=xt("f",nt(e.f),c)+(e.v!=null?f:"")}if(e.l)t["!links"].push([r,e.l]);if(e.D)l.cm=1;returnxt("c",f,l)}varPv=function(){vare=/<(?:\w+:)?c[ \/>]/,r=/<\/(?:\w+:)?row>/;vart=/r=["']([^"']*)["']/,a=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;varn=/ref=["']([^"']*)["']/;vari=gt("v"),s=gt("f");returnfunctionf(l,o,c,u,h,d){varv=0,p="",m=[],b=[],g=0,w=0,k=0,T="",E;vary,S=0,_=0;varA,x;varC=0,O=0;varR=Array.isArray(d.CellXf),N;varI=[];varF=[];varD=Array.isArray(o);varP=[],L={},M=false;varU=!!c.sheetStubs;for(varB=l.split(r),W=0,H=B.length;W!=H;++W){p=B[W].trim();varz=p.length;if(z===0)continue;varV=0;e:for(v=0;v<z;++v)switch(p[v]){case">":if(p[v-1]!="/"){++v;break
revssf:{General:0}})}vart=[];t.push(ob(e,r));t.push(cb(e,r));t.push("");t.push("");for(vara=0;a<e.SheetNames.length;++a)t.push(xt("Worksheet",kb(a,r,e),{"ss:Name":nt(e.SheetNames[a])}));t[2]=ub(e,r);t[3]=db(e,r);returnGr+xt("Workbook",t.join(""),{xmlns:Dt.ss,"xmlns:o":Dt.o,"xmlns:x":Dt.x,"xmlns:ss":Dt.ss,"xmlns:dt":Dt.dt,"xmlns:html":Dt.html})}functionEb(e){varr={};vart=e.content;t.l=28;r.AnsiUserType=t._R(0,"lpstr-ansi");r.AnsiClipboardFormat=On(t);if(t.length-t.l<=4)returnr;vara=t._R(4);if(a==0||a>40)returnr;t.l-=4;r.Reserved1=t._R(0,"lpstr-ansi");if(t.length-t.l<=4)returnr;a=t._R(4);if(a!==1907505652)returnr;r.UnicodeClipboardFormat=Rn(t);a=t._R(4);if(a==0||a>40)returnr;t.l-=4;r.Reserved2=t._R(0,"lpwstr")}varyb=[60,1084,2066,2165,2175];functionSb(e,r,t,a,n){vari=a;vars=[];varf=t.slice(t.l,t.l+i);if(n&&n.enc&&n.enc.insitu&&f.length>0)switch(e){case9:;case521:;case1033:;case2057:;case47:;case405:;case225:;case406:;case312:;case404:;case10:break;case133:break;default:n.enc.insitu(f);}s.push(f);t.l+=i;varl=sa(t,t.l),o=Db[l];varc=0;while(o!=null&&yb.indexOf(l)>-1){i=sa(t,t.l+2);c=t.l+4;if(l==2066)c+=4;elseif(l==2165||l==2175){c+=12}f=t.slice(c,t.l+4+i);s.push(f);t.l+=4+i;o=Db[l=sa(t,t.l)]}varu=F(s);ba(u,0);varh=0;u.lens=[];for(vard=0;d<s.length;++d){u.lens.push(h);h+=s[d].length}if(u.length<a)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+u.length+" < "+a;returnr.f(u,u.length,n)}function_b(e,r,t){if(e.t==="z")return;if(!e.XF)return;vara=0;try{a=e.z||e.XF.numFmtId||0;if(r.cellNF)e.z=Z[a]}catch(n){if(r.WTF)thrown}if(!r||r.cellText!==false)try{if(e.t==="e"){e.w=e.w||Jn[e.v]}elseif(a===0||a=="General"){if(e.t==="n"){if((e.v|0)===e.v)e.w=e.v.toString(10);elsee.w=oe(e.v)}elsee.w=ce(e.v)}elsee.w=ze(a,e.v,{date1904:!!t,dateNF:r&&r.dateNF})}catch(n){if(r.WTF)thrown}if(r.cellDates&&a&&e.t=="n"&&Me(Z[a]||String(a))){vari=ee(e.v);if(i){e.t="d";e.v=newDate(i.y,i.m-1,i.d,i.H,i.M,i.S,i.u)}}}functionAb(e,r,t){return{v:e,ixfe:r,t:t}}functionxb(e,r){vart={opts:{}};vara={};if(b!=null&&r.dense==null)r.dense=b;varn=r.dense?[]:{};vari={};vars={};varf=null;varo=[];varc="";varu={};varh,d="",v,p,m,g;varw={};vark=[];varT;varE;vary=[];varS=[];var_={Sheets:[],WBProps:{date1904:false},Views:[{}]},A={};varx=functionve(e){if(e<8)returnZn[e];if(e<64)returnS[e-8]||Zn[e];returnZn[e]};varC=functionpe(e,r,t){vara=r.XF.data;if(!a||!a.patternType||!t||!t.cellStyles)return;r.s={};r.s.patternType=a.patternType;varn;if(n=Co(x(a.icvFore))){r.s.fgColor={rgb:n}}if(n=Co(x(a.icvBack))){r.s.bgColor={rgb:n}}};varO=functionme(e,r,t){if(B>1)return;if(t.sheetRows&&e.r>=t.sheetRows)return;if(t.cellStyles&&r.XF&&r.XF.data)C(e,r,t);deleter.ixfe;deleter.XF;h=e;d=Ma(e);if(!s||!s.s||!s.e)s={s:{r:0,c:0},e:{r:0,c:0}};if(e.r<s.s.r)s.s.r=e.r;if(e.c<s.s.c)s.s.c=e.c;if(e.r+1>s.e.r)s.e.r=e.r+1;if(e.c+1>s.e.c)s.e.c=e.c+1;if(t.cellFormula&&r.f){for(vara=0;a<k.length;++a){if(k[a][0].s.c>e.c||k[a][0].s.r>e.r)continue;if(k[a][0].e.c<e.c||k[a][0].e.r<e.r)continue;r.F=Ba(k[a][0]);if(k[a][0].s.c!=e.c||k[a][0].s.r!=e.r)deleter.f;if(r.f)r.f=""+bd(k[a][1],s,e,M,R);break}}{if(t.dense){if(!n[e.r])n[e.r]=[];n[e.r][e.c]=r}elsen[d]=r}};varR={enc:false,sbcch:0,snames:[],sharedf:w,arrayf:k,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!r&&!!r.cellStyles,WTF:!!r&&!!r.wtf};if(r.password)R.password=r.password;varN;varI=[];varF=[];varD=[],P=[];varL=false;varM=[];M.SheetNames=R.snames;M.sharedf=R.sharedf;M.arrayf=R.arrayf;M.names=[];M.XTI=[];varU=0;varB=0;varW=0,H=[];varz=[];varV;R.codepage=1200;l(1200);varG=false;while(e.l<e.length-1){var$=e.l;varj=e._R(2);if(j===0&&U===10)break;varX=e.l===e.length?0:e._R(2);varY=Db[j];if(B==0&&[9,521,1033,2057].indexOf(j)==-1)break;if(Y&&Y.f){if(r.bookSheets){if(U===133&&j!==133)break}U=j;if(Y.r===2||Y.r==12){varK=e._R(2);X-=2;if(!R.enc&&K!==j&&((K&255)<<8|K>>8)!==j)thrownewError("rt mismatch: "+K+"!="+j);if(Y.r==12){e.l+=10;X-=10}}varJ={};if(j===10)J=Y.f(e,X,R);elseJ=Sb(j,Y,e,X,R);if(B==0&&[9,521,1033,2057].indexOf(U)===-1)continue;switch(j){case
}Pb(a,156,os(17));Pb(a,25,fs(false));Pb(a,18,fs(false));Pb(a,19,os(0));if(f)Pb(a,431,fs(false));if(f)Pb(a,444,os(0));Pb(a,61,cf(t));Pb(a,64,fs(false));Pb(a,141,os(0));Pb(a,34,fs(vm(e)=="true"));Pb(a,14,fs(true));if(f)Pb(a,439,fs(false));Pb(a,218,os(0));Vb(a,e,t);Gb(a,e.SSF,t);jb(a,t);if(f)Pb(a,352,fs(false));varc=a.end();varu=Ta();if(f)Pb(u,140,sl());if(f&&t.Strings)Lb(u,252,tf(t.Strings,t));Pb(u,10);varh=u.end();vard=Ta();varv=0,p=0;for(p=0;p<e.SheetNames.length;++p)v+=(f?12:11)+(f?2:1)*e.SheetNames[p].length;varm=c.length+v+h.length;for(p=0;p<e.SheetNames.length;++p){varb=i[p]||{};Pb(d,133,ef({pos:m,hs:b.Hidden||0,dt:0,name:e.SheetNames[p]},t));m+=r[p].length}varg=d.end();if(v!=g.length)thrownewError("BS8 "+v+" != "+g.length);varw=[];if(c.length)w.push(c);if(g.length)w.push(g);if(h.length)w.push(h);returnF(w)}functionqb(e,r){vart=r||{};vara=[];if(e&&!e.SSF){e.SSF=yr(Z)}if(e&&e.SSF){$e();Ge(e.SSF);t.revssf=or(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;uw(t);t.cellXfs=[];tv(t.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};for(varn=0;n<e.SheetNames.length;++n)a[a.length]=Zb(n,t,e);a.unshift(Jb(e,a,t));returnF(a)}functionQb(e,r){for(vart=0;t<=e.SheetNames.length;++t){vara=e.Sheets[e.SheetNames[t]];if(!a||!a["!ref"])continue;varn=Ua(a["!ref"]);if(n.e.c>255){if(typeofconsole!="undefined"&&console.error)console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}}vari=r||{};switch(i.biff||2){case8:;case5:returnqb(e,r);case4:;case3:;case2:returnzb(e,r);}thrownewError("invalid type "+i.bookType+" for BIFF")}functioneg(e,r){vart=r||{};if(b!=null&&t.dense==null)t.dense=b;vara=t.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");varn=e.match(/<table/i);if(!n)thrownewError("Invalid HTML: could not find <table>");vari=e.match(/<\/table/i);vars=n.index,f=i&&i.index||e.length;varl=Rr(e.slice(s,f),/(:?<tr[^>]*>)/i,"<tr>");varo=-1,c=0,u=0,h=0;vard={s:{r:1e7,c:1e7},e:{r:0,c:0}};varv=[];for(s=0;s<l.length;++s){varp=l[s].trim();varm=p.slice(0,3).toLowerCase();if(m=="<tr"){++o;if(t.sheetRows&&t.sheetRows<=o){--o;break}c=0;continue}if(m!="<td"&&m!="<th")continue;varg=p.split(/<\/t[dh]>/i);for(f=0;f<g.length;++f){varw=g[f].trim();if(!w.match(/<t[dh]/i))continue;vark=w,T=0;while(k.charAt(0)=="<"&&(T=k.indexOf(">"))>-1)k=k.slice(T+1);for(varE=0;E<v.length;++E){vary=v[E];if(y.s.c==c&&y.s.r<o&&o<=y.e.r){c=y.e.c+1;E=-1}}varS=Jr(w.slice(0,w.indexOf(">")));h=S.colspan?+S.colspan:1;if((u=+S.rowspan)>1||h>1)v.push({s:{r:o,c:c},e:{r:o+(u||1)-1,c:c+h-1}});var_=S.t||S["data-t"]||"";if(!k.length){c+=h;continue}k=wt(k);if(d.s.r>o)d.s.r=o;if(d.e.r<o)d.e.r=o;if(d.s.c>c)d.s.c=c;if(d.e.c<c)d.e.c=c;if(!k.length){c+=h;continue}varA={t:"s",v:k};if(t.raw||!k.trim().length||_=="s"){}elseif(k==="TRUE")A={t:"b",v:true};elseif(k==="FALSE")A={t:"b",v:false};elseif(!isNaN(_r(k)))A={t:"n",v:_r(k)};elseif(!isNaN(Or(k).getDate())){A={t:"d",v:Tr(k)};if(!t.cellDates)A={t:"n",v:hr(A.v)};A.z=t.dateNF||Z[14]}if(t.dense){if(!a[o])a[o]=[];a[o][c]=A}elsea[Ma({r:o,c:c})]=A;c+=h}}a["!ref"]=Ba(d);if(v.length)a["!merges"]=v;returna}functionrg(e,r,t,a){varn=e["!merges"]||[];vari=[];vars={};for(varf=r.s.c;f<=r.e.c;++f){varl=0,o=0;for(varc=0;c<n.length;++c){if(n[c].s.r>t||n[c].s.c>f)continue;if(n[c].e.r<t||n[c].e.c<f)continue;if(n[c].s.r<t||n[c].s.c<f){l=-1;break}l=n[c].e.r-n[c].s.r+1;o=n[c].e.c-n[c].s.c+1;break}if(l<0)continue;varu=Ma({r:t,c:f});varh=a.dense?(e[t]||[])[f]:e[u];vard=h&&h.v!=null&&(h.h||ft(h.w||(Ga(h),h.w)||""))||"";s={};if(l>1)s.rowspan=l;if(o>1)s.colspan=o;if(a.editable)d='<span contenteditable="true">'+d+"</span>";elseif(h){s["data-t"]=h&&h.t||"z";if(h.v!=null)s["data-v"]=h.v;if(h.z!=null)s["data-z"]=h.z;if(h.l&&(h.l.Target||"#").charAt(0)!="#")d='<a href="'+h.l.Target+'">'+d+"</a>"}s.id=(a.id||"sjs")+"-"+u;i.push(xt("td",d,s))}varv="<tr>";returnv+i.join("")+"</tr>"}vartg='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>';varag="</body></html>";functionng(e,r){vart=e.m