continue}n=e.charCodeAt(t++);if(a>191&&a<224){s=(a&31)<<6;s|=n&63;r+=String.fromCharCode(s);continue}i=e.charCodeAt(t++);if(a<240){r+=String.fromCharCode((a&15)<<12|(n&63)<<6|i&63);continue}s=e.charCodeAt(t++);f=((a&7)<<18|(n&63)<<12|(i&63)<<6|s&63)-65536;r+=String.fromCharCode(55296+(f>>>10&1023));r+=String.fromCharCode(56320+(f&1023))}returnr};varQe=function(e){varr=[],t=0,a=0,n=0;while(t<e.length){a=e.charCodeAt(t++);switch(true){casea<128:r.push(String.fromCharCode(a));break;casea<2048:r.push(String.fromCharCode(192+(a>>6)));r.push(String.fromCharCode(128+(a&63)));break;casea>=55296&&a<57344:a-=55296;n=e.charCodeAt(t++)-56320+(a<<10);r.push(String.fromCharCode(240+(n>>18&7)));r.push(String.fromCharCode(144+(n>>12&63)));r.push(String.fromCharCode(128+(n>>6&63)));r.push(String.fromCharCode(128+(n&63)));break;default:r.push(String.fromCharCode(224+(a>>12)));r.push(String.fromCharCode(128+(a>>6&63)));r.push(String.fromCharCode(128+(a&63)));}}returnr.join("")};if(E){varJe=functionHm(e){varr=Buffer.alloc(2*e.length),t,a,n=1,i=0,s=0,f;for(a=0;a<e.length;a+=n){n=1;if((f=e.charCodeAt(a))<128)t=f;elseif(f<224){t=(f&31)*64+(e.charCodeAt(a+1)&63);n=2}elseif(f<240){t=(f&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(f&7)*262144+(e.charCodeAt(a+1)&63)*4096+(e.charCodeAt(a+2)&63)*64+(e.charCodeAt(a+3)&63);t-=65536;s=55296+(t>>>10&1023);t=56320+(t&1023)}if(s!==0){r[i++]=s&255;r[i++]=s>>>8;s=0}r[i++]=t%256;r[i++]=t>>>8}returnr.slice(0,i).toString("ucs2")};varqe="foo bar bazâð£";if(Ye(qe)==Je(qe))Ye=Je;varZe=functionWm(e){returnw(e,"binary").toString("utf8")};if(Ye(qe)==Ze(qe))Ye=Ze;Qe=function(e){returnw(e,"utf8").toString("binary")}}varer=function(){vare={};returnfunctionr(t,a){varn=t+"|"+(a||"");if(e[n])returne[n];returne[n]=newRegExp("<(?:\\w+:)?"+t+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+t+">",a||"")}}();varrr=function(){vare=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[newRegExp("&"+e[0]+";","ig"),e[1]]});returnfunctionr(t){vara=t.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,"");for(varn=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);returna}}();vartr=function(){vare={};returnfunctionr(t){if(e[t]!==undefined)returne[t];returne[t]=newRegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}();varar=/<\/?(?:vt:)?variant>/g,nr=/<(?:vt:)([^>]*)>([\s\S]*)</;functionir(e,r){vart=Oe(e);vara=e.match(tr(t.baseType))||[];varn=[];if(a.length!=t.size){if(r.WTF)thrownewError("unexpected vector length "+a.length+" != "+t.size);returnn}a.forEach(function(e){varr=e.replace(ar,"").match(nr);if(r)n.push({v:Ye(r[2]),t:r[1]})});returnn}varsr=/(^\s|\s$|\n)/;functionfr(e,r){return"<"+e+(r.match(sr)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}functionlr(e){returnK(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}functionor(e,r,t){return"<"+e+(t!=null?lr(t):"")+(r!=null?(r.match(sr)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}functioncr(e,r){try{returne.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throwt}return""}functionur(e,r){switch(typeofe){case"string":vart=or("vt:lpwstr",We(e));if(r)t=t.replace(/"/g,"_x0022_");returnt;case"number":returnor((e|0)==e?"vt:i4":"vt:r8",We(String(e)));case"boolean":returnor("vt:bool",e?"true":"false");}if(einstanceofDate)returnor("vt:filetime",cr(e));thrownewError("Unable to serialize "+e)}varhr={dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSche
r.calcchain=r.calcchains.length>0?r.calcchains[0]:"";r.sst=r.strs.length>0?r.strs[0]:"";r.style=r.styles.length>0?r.styles[0]:"";r.defaults=t;deleter.calcchains;returnr}varNa=or("Types",null,{xmlns:hr.CT,"xmlns:xsd":hr.xsd,"xmlns:xsi":hr.xsi});varMa=[["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels",Da.rels[0]]].map(function(e){returnor("Default",null,{Extension:e[0],ContentType:e[1]})});functionLa(e,r){vart=[],a;t[t.length]=ye;t[t.length]=Na;t=t.concat(Ma);varn=function(n){if(e[n]&&e[n].length>0){a=e[n][0];t[t.length]=or("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:Fa[n][r.bookType||"xlsx"]})}};vari=function(a){(e[a]||[]).forEach(function(e){t[t.length]=or("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:Fa[a][r.bookType||"xlsx"]})})};vars=function(r){(e[r]||[]).forEach(function(e){t[t.length]=or("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:Da[r][0]})})};n("workbooks");i("sheets");i("charts");s("themes");["strs","styles"].forEach(n);["coreprops","extprops","custprops"].forEach(s);s("vba");s("comments");s("drawings");if(t.length>2){t[t.length]="</Types>";t[1]=t[1].replace("/>",">")}returnt.join("")}varUa={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};functionHa(e){varr=e.lastIndexOf("/");returne.slice(0,r+1)+"_rels/"+e.slice(r+1)+".rels"}functionWa(e,r){vart={"!id":{}};if(!e)returnt;if(r.charAt(0)!=="/"){r="/"+r}vara={};(e.match(Re)||[]).forEach(function(e){varn=Oe(e);if(n[0]==="<Relationship"){vari={};i.Type=n.Type;i.Target=n.Target;i.Id=n.Id;if(n.TargetMode)i.TargetMode=n.TargetMode;vars=n.TargetMode==="External"?n.Target:Ae(n.Target,r);t[s]=i;a[n.Id]=i}});t["!id"]=a;returnt}hr.RELS="http://schemas.openxmlformats.org/package/2006/relationships";varVa=or("Relationships",null,{xmlns:hr.RELS});functionXa(e){varr=[ye,Va];K(e["!id"]).forEach(function(t){r[r.length]=or("Relationship",null,e["!id"][t])});if(r.length>2){r[r.length]="</Relationships>";r[1]=r[1].replace("/>",">")}returnr.join("")}varGa=[Ua.HLINK,Ua.XPATH,Ua.XMISS];functionza(e,r,t,a,n,i){if(!n)n={};if(!e["!id"])e["!id"]={};if(r<0)for(r=1;e["!id"]["rId"+r];++r){}n.Id="rId"+r;n.Type=a;n.Target=t;if(i)n.TargetMode=i;elseif(Ga.indexOf(n.Type)>-1)n.TargetMode="External";if(e["!id"][n.Id])thrownewError("Cannot rewrite rId "+r);e["!id"][n.Id]=n;e[("/"+n.Target).replace("//","/")]=n;returnr}varja="application/vnd.oasis.opendocument.spreadsheet";function$a(e,r){vart=Tp(e);vara;varn;while(a=_p.exec(t))switch(a[3]){case"manifest":break;case"file-entry":n=Oe(a[0],false);if(n.path=="/"&&n.type!==ja)thrownewError("This OpenDocument is not a spreadsheet");break;case"encryption-data":;case"algorithm":;case"start-key-generation":;case"key-derivation":thrownewError("Unsupported ODS Encryption");default:if(r&&r.WTF)throwa;}}functionKa(e){varr=[ye];r.push('<manifest:manifestxmlns:manifest="
}else{v.push(c[p]);d[c[p]]={"!ref":"A1"}}return{SheetNames:v,Sheets:d}}functiona(e,r){vart=r||{};if(+t.codepage>=0)l(+t.codepage);if(t.type=="string")thrownewError("Cannot write WK1 to JS string");vara=Zr();varn=wt(e["!ref"]);vars=Array.isArray(e);varf=[];tb(a,0,i(1030));tb(a,6,o(n));varc=Math.min(n.e.r,8191);for(varu=n.s.r;u<=c;++u){vard=lt(u);for(varp=n.s.c;p<=n.e.c;++p){if(u===n.s.r)f[p]=ht(p);varb=f[p]+d;varg=s?(e[u]||[])[p]:e[b];if(!g||g.t=="z")continue;if(g.t=="n"){if((g.v|0)==g.v&&g.v>=-32768&&g.v<=32767)tb(a,13,v(u,p,g.v));elsetb(a,14,m(u,p,g.v))}else{varE=St(g);tb(a,15,h(u,p,E.slice(0,239)))}}}tb(a,1);returna.end()}functionn(e,r){vart=r||{};if(+t.codepage>=0)l(+t.codepage);if(t.type=="string")thrownewError("Cannot write WK3 to JS string");vara=Zr();tb(a,0,s(e));for(varn=0,i=0;n<e.SheetNames.length;++n)if((e.Sheets[e.SheetNames[n]]||{})["!ref"])tb(a,27,W(e.SheetNames[n],i++));varf=0;for(n=0;n<e.SheetNames.length;++n){varo=e.Sheets[e.SheetNames[n]];if(!o||!o["!ref"])continue;varc=wt(o["!ref"]);varu=Array.isArray(o);varh=[];vard=Math.min(c.e.r,8191);for(varv=c.s.r;v<=d;++v){varp=lt(v);for(varb=c.s.c;b<=c.e.c;++b){if(v===c.s.r)h[b]=ht(b);varm=h[b]+p;varg=u?(o[v]||[])[b]:o[m];if(!g||g.t=="z")continue;if(g.t=="n"){tb(a,23,R(v,b,f,g.v))}else{varE=St(g);tb(a,22,A(v,b,f,E.slice(0,239)))}}}++f}tb(a,1);returna.end()}functioni(e){varr=Jr(2);r._W(2,e);returnr}functions(e){varr=Jr(26);r._W(2,4096);r._W(2,4);r._W(4,0);vart=0,a=0,n=0;for(vari=0;i<e.SheetNames.length;++i){vars=e.SheetNames[i];varf=e.Sheets[s];if(!f||!f["!ref"])continue;++n;varl=gt(f["!ref"]);if(t<l.e.r)t=l.e.r;if(a<l.e.c)a=l.e.c}if(t>8191)t=8191;r._W(2,t);r._W(1,n);r._W(1,a);r._W(2,0);r._W(2,0);r._W(1,1);r._W(1,2);r._W(4,0);r._W(4,0);returnr}functionf(e,r,t){vara={s:{c:0,r:0},e:{c:0,r:0}};if(r==8&&t.qpro){a.s.c=e._R(1);e.l++;a.s.r=e._R(2);a.e.c=e._R(1);e.l++;a.e.r=e._R(2);returna}a.s.c=e._R(2);a.s.r=e._R(2);if(r==12&&t.qpro)e.l+=2;a.e.c=e._R(2);a.e.r=e._R(2);if(r==12&&t.qpro)e.l+=2;if(a.s.c==65535)a.s.c=a.e.c=a.s.r=a.e.r=0;returna}functiono(e){varr=Jr(8);r._W(2,e.s.c);r._W(2,e.s.r);r._W(2,e.e.c);r._W(2,e.e.r);returnr}functionc(e,r,t){vara=[{c:0,r:0},{t:"n",v:0},0,0];if(t.qpro&&t.vers!=20768){a[0].c=e._R(1);a[3]=e._R(1);a[0].r=e._R(2);e.l+=2}else{a[2]=e._R(1);a[0].c=e._R(2);a[0].r=e._R(2)}returna}functionu(e,r,t){vara=e.l+r;varn=c(e,r,t);n[1].t="s";if(t.vers==20768){e.l++;vari=e._R(1);n[1].v=e._R(i,"utf8");returnn}if(t.qpro)e.l++;n[1].v=e._R(a-e.l,"cstr");returnn}functionh(e,r,t){vara=Jr(7+t.length);a._W(1,255);a._W(2,r);a._W(2,e);a._W(1,39);for(varn=0;n<a.length;++n){vari=t.charCodeAt(n);a._W(1,i>=128?95:i)}a._W(1,0);returna}functiond(e,r,t){vara=c(e,r,t);a[1].v=e._R(2,"i");returna}functionv(e,r,t){vara=Jr(7);a._W(1,255);a._W(2,r);a._W(2,e);a._W(2,t,"i");returna}functionp(e,r,t){vara=c(e,r,t);a[1].v=e._R(8,"f");returna}functionm(e,r,t){vara=Jr(13);a._W(1,255);a._W(2,r);a._W(2,e);a._W(8,t,"f");returna}functionE(e,r,t){vara=e.l+r;varn=c(e,r,t);n[1].v=e._R(8,"f");if(t.qpro)e.l=a;else{vari=e._R(2);C(e.slice(e.l,e.l+i),n);e.l+=i}returnn}functionw(e,r,t){vara=r&32768;r&=~32768;r=(a?e:0)+(r>=8192?r-16384:r);return(a?"":"$")+(t?ht(r):lt(r))}vark=[8,8,8,8,8,8,8,8,6,4,4,5,5,7,3,3,3,3,3,3,1,1,2,6,8,8,8,8,8,8,8,8];varS={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]};varB=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];functionC(e,r){Yr(e,0);vart=[],a=0,n="",i="",s="",f="";while(e.l<e.length){varl=e[e.l++];switch(l){case0:t.push(e._R(8,"f"));break;case1:{i=w(r[0].c,e._R(2),true);n=w(r[0].r,e._R(2),false);t.push(i+n)}break;case2:{varo=w(r[0].c,e._R(2),true);varc=w(r[0].r,e._R(2),false);i=w(r[0].c,e._R(2),true);n=w(r[0].r,e._R(2),false);t.push(o+c+":"+i+n)}break;case3:if(e.l<e.length){console.error("WK1 premature formula end");return}break;case4:t.push("("+t.pop()+")");break;case5:t.push(e._R(2));break;case6:{varu="";while(l
tb(a,"Protect",$n(false));tb(a,"Password",Yn(0));if(f)tb(a,"Prot4Rev",$n(false));if(f)tb(a,"Prot4RevPass",Yn(0));tb(a,"Window1",Yi(t));tb(a,"Backup",$n(false));tb(a,"HideObj",Yn(0));tb(a,"Date1904",$n(Rv(e)=="true"));tb(a,"CalcPrecision",$n(true));if(f)tb(a,"RefreshAll",$n(false));tb(a,"BookBool",Yn(0));cb(a,e,t);ub(a,e.SSF,t);db(a,t);if(f)tb(a,"UsesELFs",$n(false));varc=a.end();varu=Zr();if(f)tb(u,"Country",js());if(f&&t.Strings)ab(u,"SST",Vi(t.Strings,t));tb(u,"EOF");varh=u.end();vard=Zr();varv=0,p=0;for(p=0;p<e.SheetNames.length;++p)v+=(f?12:11)+(f?2:1)*e.SheetNames[p].length;varb=c.length+v+h.length;for(p=0;p<e.SheetNames.length;++p){varm=i[p]||{};tb(d,"BoundSheet8",Hi({pos:b,hs:m.Hidden||0,dt:0,name:e.SheetNames[p]},t));b+=r[p].length}varg=d.end();if(v!=g.length)thrownewError("BS8 "+v+" != "+g.length);varE=[];if(c.length)E.push(c);if(g.length)E.push(g);if(h.length)E.push(h);returnbr([E])}functionEb(e,r){vart=r||{};vara=[];if(e&&!e.SSF){e.SSF=D.get_table()}if(e&&e.SSF){O(D);D.load_table(e.SSF);t.revssf=J(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;$b(t);t.cellXfs=[];bh(t.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};for(varn=0;n<e.SheetNames.length;++n)a[a.length]=mb(n,t,e);a.unshift(gb(e,a,t));returnbr([a])}functionwb(e,r){for(vart=0;t<=e.SheetNames.length;++t){vara=e.Sheets[e.SheetNames[t]];if(!a||!a["!ref"])continue;varn=gt(a["!ref"]);if(n.e.c>255){console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}}vari=r||{};switch(i.biff||2){case8:;case5:returnEb(e,r);case4:;case3:;case2:returnob(e,r);}thrownewError("invalid type "+i.bookType+" for BIFF")}varkb=function(){functione(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=pe(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){varE=g[f].trim();if(!E.match(/<t[dh]/i))continue;varw=E,k=0;while(w.charAt(0)=="<"&&(k=w.indexOf(">"))>-1)w=w.slice(k+1);for(varS=0;S<v.length;++S){varB=v[S];if(B.s.c==c&&B.s.r<o&&o<=B.e.r){c=B.e.c+1;S=-1}}varC=Oe(E.slice(0,E.indexOf(">")));h=C.colspan?+C.colspan:1;if((u=+C.rowspan)>1||h>1)v.push({s:{r:o,c:c},e:{r:o+(u||1)-1,c:c+h-1}});varT=C.t||C["data-t"]||"";if(!w.length){c+=h;continue}w=rr(w);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(!w.length)continue;var_={t:"s",v:w};if(t.raw||!w.trim().length||T=="s"){}elseif(w==="TRUE")_={t:"b",v:true};elseif(w==="FALSE")_={t:"b",v:false};elseif(!isNaN(he(w)))_={t:"n",v:he(w)};elseif(!isNaN(de(w).getDate())){_={t:"d",v:le(w)};if(!t.cellDates)_={t:"n",v:ee(_.v)};_.z=t.dateNF||D._table[14]}if(t.dense){if(!a[o])a[o]=[];a[o][c]=_}elsea[mt({r:o,c:c})]=_;c+=h}}a["!ref"]=Et(d);if(v.length)a["!merges"]=v;returna}functionr(r,t){vara=r.match(/<table.*?>[\s\S]*?<\/table>/gi);if(!a||a.length==0)thrownewError("Invalid HTML: could not find <table>");if(a.length==1)returnBt(e(a[0],t),t);varn=Im.book_new();a.forEach(function(r,a){Im.book_append_sheet(n,e(r,t),"Sheet"+(a+1))});returnn}functiont(e,r,t,a){varn=e["!merges"]||[];vari=[];for(vars=r.s.c;s<=r.e.c;++s){varf=0,l=0;for(varo=0;o<n.length;++o){if(n[o].s.r>t||n[o].s.c>s)continue;if(n[o].e.r<t||n[o].e.c<s)continue;if(n[o].s.r<t||n[o].s.c<s){f=-1;break}f=n[o].e.r-n[o].s.r+1;l=n[o].e.c-n[o].s.c+1;break}if(f<0)continue;varc=mt({r:t,c:s});varu=a.dense?(e[t]||[])[s]:e[c];varh=u&&u.v!=null&&(u.h||Ge(u.w||(St(u),u.w)||""))||"";vard={};if(f>1)d.rowspan=f;if(l>1)d.colspan=l;if(a.editable)h='<span contenteditable="true">'+h+"</span>";elseif(u){d["data-t"]=u&&u.t||"z";if(u.v!=null)d["data-v"