if(t.length<=r)returnt;t=e.toPrecision(10);if(t.length<=r)returnt;returne.toExponential(5)}functions(r){vart=r.toFixed(11).replace(e,".$1");if(t.length>(r<0?12:11))t=r.toPrecision(6);returnt}functionf(e){for(varr=0;r!=e.length;++r)if((e.charCodeAt(r)|32)===101)returne.replace(t,".$1").replace(a,"E").replace("e","E").replace(n,"$10$2");returne}functiono(t){returnt.indexOf(".")>-1?t.replace(r,"").replace(e,".$1"):t}returnfunctionl(e){varr=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),t;if(r>=-4&&r<=-1)t=e.toPrecision(10+r);elseif(Math.abs(r)<=9)t=i(e);elseif(r===10)t=e.toFixed(10).substr(0,12);elset=s(e);returno(f(t))}}();e._general_num=k;functionS(e,r){switch(typeofe){case"string":returne;case"boolean":returne?"TRUE":"FALSE";case"number":return(e|0)===e?E(e):k(e);case"undefined":return"";case"object":if(e==null)return"";if(einstanceofDate)returnN(14,C(e,r&&r.date1904),r);}thrownewError("unsupported value in General format: "+e)}e._general=S;functionA(){return0}function_(e,r,t,n){vari="",s=0,f=0,o=t.y,l,c=0;switch(e){case98:o=t.y+543;case121:switch(r.length){case1:;case2:l=o%100;c=2;break;default:l=o%1e4;c=4;break;}break;case109:switch(r.length){case1:;case2:l=t.m;c=r.length;break;case3:returnu[t.m-1][1];case5:returnu[t.m-1][0];default:returnu[t.m-1][2];}break;case100:switch(r.length){case1:;case2:l=t.d;c=r.length;break;case3:returnh[t.q][0];default:returnh[t.q][1];}break;case104:switch(r.length){case1:;case2:l=1+(t.H+11)%12;c=r.length;break;default:throw"bad hour format: "+r;}break;case72:switch(r.length){case1:;case2:l=t.H;c=r.length;break;default:throw"bad hour format: "+r;}break;case77:switch(r.length){case1:;case2:l=t.M;c=r.length;break;default:throw"bad minute format: "+r;}break;case115:if(r!="s"&&r!="ss"&&r!=".0"&&r!=".00"&&r!=".000")throw"bad second format: "+r;if(t.u===0&&(r=="s"||r=="ss"))returna(t.S,r.length);if(n>=2)f=n===3?1e3:100;elsef=n===1?10:1;s=Math.round(f*(t.S+t.u));if(s>=60*f)s=0;if(r==="s")returns===0?"0":""+s/f;i=a(s,2+n);if(r==="ss")returni.substr(0,2);return"."+i.substr(2,r.length-1);case90:switch(r){case"[h]":;case"[hh]":l=t.D*24+t.H;break;case"[m]":;case"[mm]":l=(t.D*24+t.H)*60+t.M;break;case"[s]":;case"[ss]":l=((t.D*24+t.H)*60+t.M)*60+Math.round(t.S+t.u);break;default:throw"bad abstime format: "+r;}c=r.length===3?1:2;break;case101:l=o;c=1;}if(c>0)returna(l,c);elsereturn""}functionB(e){varr=3;if(e.length<=r)returne;vart=e.length%r,a=e.substr(0,t);for(;t!=e.length;t+=r)a+=(a.length>0?",":"")+e.substr(t,r);returna}varT=functionU(){vare=/%/g;functions(r,a,n){vari=a.replace(e,""),s=a.length-i.length;returnT(r,i,n*Math.pow(10,2*s))+t("%",s)}functionf(e,r,t){vara=r.length-1;while(r.charCodeAt(a-1)===44)--a;returnT(e,r.substr(0,a),t/Math.pow(10,3*(r.length-a)))}functiono(e,r){vart;vara=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(r==0)return"0.0E+0";elseif(r<0)return"-"+o(e,-r);varn=e.indexOf(".");if(n===-1)n=e.indexOf("E");vari=Math.floor(Math.log(r)*Math.LOG10E)%n;if(i<0)i+=n;t=(r/Math.pow(10,i)).toPrecision(a+1+(n+i)%n);if(t.indexOf("e")===-1){vars=Math.floor(Math.log(r)*Math.LOG10E);if(t.indexOf(".")===-1)t=t.charAt(0)+"."+t.substr(1)+"E+"+(s-t.length+i);elset+="E+"+(s-i);while(t.substr(0,2)==="0."){t=t.charAt(0)+t.substr(2,n)+"."+t.substr(2+n);t=t.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.")}t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(e,r,t,a){returnr+t+a.substr(0,(n+i)%n)+"."+a.substr(i)+"E"})}elset=r.toExponential(a);if(e.match(/E\+00$/)&&t.match(/e[+-]\d$/))t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1);if(e.match(/E\-/)&&t.match(/e\+/))t=t.replace(/e\+/,"e");returnt.replace("e","E")}varc=/# (\?+)( ?)\/( ?)(\d+)/;functionh(e,r,i){vars=parseInt(e[4],10),f=Math.round(r*s),o=Math.floor(f/s);varl=f-o*s,c=s;returni+(o===0?"":""+o)+" "+(l===0?t(" ",e[1].length+1+e[4].length):n(l,e[1].length)+e[2]+"/"+e[3]+a(c,e[4].length))}functionu(e,r,a){returna+(r===0?"":""+r)+t(" ",e[1].length+2+e[4].length)}vard=/^#*0*\.([0#]+)/;varp=/\).*[0#]/;varg=/\(###\)##
d.R=c>=h.length?-1:c;d.type=1}else{if(t(e.FullPaths[f+1]||"")==t(p))d.R=f+1;d.type=2}}}functionF(e,r){vart=r||{};D(e);if(t.fileType=="zip")returnye(e,t);vara=function(e){varr=0,t=0;for(vara=0;a<e.FileIndex.length;++a){varn=e.FileIndex[a];if(!n.content)continue;vari=n.content.length;if(i>0){if(i<4096)r+=i+63>>6;elset+=i+511>>9}}vars=e.FullPaths.length+3>>2;varf=r+7>>3;varo=r+127>>7;varl=f+t+s+o;varc=l+127>>7;varh=c<=109?0:Math.ceil((c-109)/127);while(l+c+h+127>>7>c)h=++c<=109?0:Math.ceil((c-109)/127);varu=[1,h,c,o,s,t,r,0];e.FileIndex[0].size=r<<6;u[7]=(e.FileIndex[0].start=u[0]+u[1]+u[2]+u[3]+u[4]+u[5])+(u[6]+7>>3);returnu}(e);varn=Gr(a[7]<<9);vari=0,s=0;{for(i=0;i<8;++i)n._W(1,M[i]);for(i=0;i<8;++i)n._W(2,0);n._W(2,62);n._W(2,3);n._W(2,65534);n._W(2,9);n._W(2,6);for(i=0;i<3;++i)n._W(2,0);n._W(4,0);n._W(4,a[2]);n._W(4,a[0]+a[1]+a[2]+a[3]-1);n._W(4,0);n._W(4,1<<12);n._W(4,a[3]?a[0]+a[1]+a[2]-1:N);n._W(4,a[3]);n._W(-4,a[1]?a[0]-1:N);n._W(4,a[1]);for(i=0;i<109;++i)n._W(-4,i<a[2]?a[1]+i:-1)}if(a[1]){for(s=0;s<a[1];++s){for(;i<236+s*127;++i)n._W(-4,i<a[2]?a[1]+i:-1);n._W(-4,s===a[1]-1?N:s+1)}}varf=function(e){for(s+=e;i<s-1;++i)n._W(-4,i+1);if(e){++i;n._W(-4,N)}};s=i=0;for(s+=a[1];i<s;++i)n._W(-4,V.DIFSECT);for(s+=a[2];i<s;++i)n._W(-4,V.FATSECT);f(a[3]);f(a[4]);varo=0,l=0;varc=e.FileIndex[0];for(;o<e.FileIndex.length;++o){c=e.FileIndex[o];if(!c.content)continue;l=c.content.length;if(l<4096)continue;c.start=s;f(l+511>>9)}f(a[6]+7>>3);while(n.l&511)n._W(-4,V.ENDOFCHAIN);s=i=0;for(o=0;o<e.FileIndex.length;++o){c=e.FileIndex[o];if(!c.content)continue;l=c.content.length;if(!l||l>=4096)continue;c.start=s;f(l+63>>6)}while(n.l&511)n._W(-4,V.ENDOFCHAIN);for(i=0;i<a[4]<<2;++i){varh=e.FullPaths[i];if(!h||h.length===0){for(o=0;o<17;++o)n._W(4,0);for(o=0;o<3;++o)n._W(4,-1);for(o=0;o<12;++o)n._W(4,0);continue}c=e.FileIndex[i];if(i===0)c.start=c.size?c.start-1:N;varu=i===0&&t.root||c.name;l=2*(u.length+1);n._W(64,u,"utf16le");n._W(2,l);n._W(1,c.type);n._W(1,c.color);n._W(-4,c.L);n._W(-4,c.R);n._W(-4,c.C);if(!c.clsid)for(o=0;o<4;++o)n._W(4,0);elsen._W(16,c.clsid,"hex");n._W(4,c.state||0);n._W(4,0);n._W(4,0);n._W(4,0);n._W(4,0);n._W(4,c.start);n._W(4,c.size);n._W(4,0)}for(i=1;i<e.FileIndex.length;++i){c=e.FileIndex[i];if(c.size>=4096){n.l=c.start+1<<9;for(o=0;o<c.size;++o)n._W(1,c.content[o]);for(;o&511;++o)n._W(1,0)}}for(i=1;i<e.FileIndex.length;++i){c=e.FileIndex[i];if(c.size>0&&c.size<4096){for(o=0;o<c.size;++o)n._W(1,c.content[o]);for(;o&63;++o)n._W(1,0)}}while(n.l<n.length)n._W(1,0);returnn}functionO(e,r){vart=e.FullPaths.map(function(e){returne.toUpperCase()});vara=t.map(function(e){varr=e.split("/");returnr[r.length-(e.slice(-1)=="/"?2:1)]});varn=false;if(r.charCodeAt(0)===47){n=true;r=t[0].slice(0,-1)+r}elsen=r.indexOf("/")!==-1;vari=r.toUpperCase();vars=n===true?t.indexOf(i):a.indexOf(i);if(s!==-1)returne.FileIndex[s];varf=!i.match(R);i=i.replace(I,"");if(f)i=i.replace(R,"!");for(s=0;s<t.length;++s){if((f?t[s].replace(R,"!"):t[s]).replace(I,"")==i)returne.FileIndex[s];if((f?a[s].replace(R,"!"):a[s]).replace(I,"")==i)returne.FileIndex[s]}returnnull}varP=64;varN=-2;varL="d0cf11e0a1b11ae1";varM=[208,207,17,224,161,177,26,225];varU="00000000000000000000000000000000";varV={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:N,FREESECT:-1,HEADER_SIGNATURE:L,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:U,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};functionz(e,r,t){o();vara=F(e,t);f.writeFileSync(r,a)}functionX(e){varr=newArray(e.length);for(vart=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);returnr.join("")}functionG(e,r){vart=F(e,r);switch(r&&r.type){case"file":o();f.writeFileSync(r.filename,t);returnt;case"binary":returnX(t);case"base64":returnm.encode(X(t));}returnt}varj;functionK(e){try{varr=e.InflateRaw;vart=newr;t._processChunk(newUint8Array([3,0]),t._finishFlushFlag);if(t.bytesRead)j=e;elsethrownewError("zlib does not expose bytesRead")}catch(a){console.error("cannot use native zlib: "+(a.message||a))}}functionY(e,r){
t[a]=De(c);break;case"bool":t[a]=Ve(c);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(c,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(c);break;case"filetime":;case"date":t[a]=ie(c);break;case"cy":;case"error":t[a]=De(c);break;default:if(l.slice(-1)=="/")break;if(r.WTF&&typeofconsole!=="undefined")console.warn("Unexpected",s,l,o);}}elseif(s.slice(0,2)==="</"){}elseif(r.WTF)thrownewError(s);}}returnt}varnn=ar("Properties",null,{xmlns:sr.CUST_PROPS,"xmlns:vt":sr.vt});functionsn(e){varr=[Se,nn];if(!e)returnr.join("");vart=1;j(e).forEach(functiona(n){++t;r[r.length]=ar("property",ir(e[n]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:n})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}returnr.join("")}varfn={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};varon=Y(fn);functionln(e,r,t){r=on[r]||r;e[r]=t}functioncn(e,r){vart=[];j(fn).map(function(e){for(varr=0;r<Xa.length;++r)if(Xa[r][1]==e)returnXa[r];for(r=0;r<Za.length;++r)if(Za[r][1]==e)returnZa[r];throwe}).forEach(function(a){if(e[a[1]]==null)return;varn=r&&r.Props&&r.Props[a[1]]!=null?r.Props[a[1]]:e[a[1]];switch(a[2]){case"date":n=newDate(n).toISOString().replace(/\.\d*Z/,"Z");break;}if(typeofn=="number")n=String(n);elseif(n===true||n===false){n=n?"1":"0"}elseif(ninstanceofDate)n=newDate(n).toISOString().replace(/\.\d*Z/,"");t.push(rr(fn[a[1]]||a[1],n))});returnar("DocumentProperties",t.join(""),{xmlns:fr.o})}functionhn(e,r){vart=["Worksheets","SheetNames"];vara="CustomDocumentProperties";varn=[];if(e)j(e).forEach(function(r){if(!e.hasOwnProperty(r))return;for(vara=0;a<Xa.length;++a)if(r==Xa[a][1])return;for(a=0;a<Za.length;++a)if(r==Za[a][1])return;for(a=0;a<t.length;++a)if(r==t[a])return;vari=e[r];vars="string";if(typeofi=="number"){s="float";i=String(i)}elseif(i===true||i===false){s="boolean";i=i?"1":"0"}elsei=String(i);n.push(ar(Ne(r),i,{"dt:dt":s}))});if(r)j(r).forEach(function(t){if(!r.hasOwnProperty(t))return;if(e&&e.hasOwnProperty(t))return;vara=r[t];vari="string";if(typeofa=="number"){i="float";a=String(a)}elseif(a===true||a===false){i="boolean";a=a?"1":"0"}elseif(ainstanceofDate){i="dateTime.tz";a=a.toISOString()}elsea=String(a);n.push(ar(Ne(t),a,{"dt:dt":i}))});return"<"+a+' xmlns="'+fr.o+'">'+n.join("")+"</"+a+">"}functionun(e){varr=e._R(4),t=e._R(4);returnnewDate((t/1e7*Math.pow(2,32)+r/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}functiondn(e){varr=typeofe=="string"?newDate(Date.parse(e)):e;vart=r.getTime()/1e3+11644473600;vara=t%Math.pow(2,32),n=(t-a)/Math.pow(2,32);a*=1e7;n*=1e7;vari=a/Math.pow(2,32)|0;if(i>0){a=a%Math.pow(2,32);n+=i}vars=Gr(8);s._W(4,a);s._W(4,n);returns}functionpn(e,r,t){vara=e.l;varn=e._R(0,"lpstr-cp");if(t)while(e.l-a&3)++e.l;returnn}functionvn(e,r,t){vara=e._R(0,"lpwstr");if(t)e.l+=4-(a.length+1&3)&3;returna}functiongn(e,r,t){if(r===31)returnvn(e);returnpn(e,r,t)}functionmn(e,r,t){returngn(e,r,t===false?0:4)}functionbn(e,r){if(!r)thrownewError("VtUnalignedString must have positive length");returngn(e,r,0)}functionwn(e){varr=e._R(4);vart=[];for(vara=0;a!=r;++a)t[a]=e._R(0,"lpstr-cp").replace(I,"");returnt}functionCn(e){returnwn(e)}functionEn(e){varr=Tn(e,ua);vart=Tn(e,ta);return[r,t]}functionkn(e){varr=e._R(4);vart=[];for(vara=0;a!=r/2;++a)t.push(En(e));returnt}functionSn(e){returnkn(e)}functionAn(e,r){vart=e._R(4);vara={};for(varn=0;n!=t;++n){vari=e._R(4);vars=e._R(4);a[i]=e._R(s,r===1200?"utf16le":"utf8").replace(I,"").replace(R,"!");if(r===1200&&s%2)e.l+=2}if(e.l&3)e.l=e.l>>2+1<<2;returna}function_n(e){varr=e._R(4);vart=e.slice(e.l,e.l+r);e.l+=r;if((r&3)>0)e.l+=4-(r&3)&3;returnt}functionBn(e){varr={}
a[b][w]=newDate(C._R(-8,"f")-621356832e5);break;case"T":a[b][w]=newDate((C._R(4)-2440588)*864e5+C._R(4));break;case"Y":a[b][w]=C._R(4,"i")/1e4;break;case"O":a[b][w]=-C._R(-8,"f");break;case"B":if(f&&d[w].len==8){a[b][w]=C._R(8,"f");break};case"G":;case"P":C.l+=d[w].len;break;case"0":if(d[w].name==="_NullFlags")break;default:thrownewError("DBF Unsupported data type "+d[w].type);}}}if(i!=2)if(n.l<n.length&&n[n.l++]!=26)thrownewError("DBF EOF Marker missing "+(n.l-1)+" of "+n.length+" "+n[n.l-1].toString(16));if(t&&t.sheetRows)a=a.slice(0,t.sheetRows);returna}functiont(e,t){vara=t||{};if(!a.dateNF)a.dateNF="yyyymmdd";returnwt(r(e,a),a)}functiona(e,r){try{returnmt(t(e,r),r)}catch(a){if(r&&r.WTF)throwa}return{SheetNames:[],Sheets:{}}}varn={B:8,C:250,L:1,D:8,"?":0,"":0};functioni(e,r){vart=r||{};if(t.type=="string")thrownewError("Cannot write DBF to JS string");vara=Kr();vari=Rg(e,{header:1,cellDates:true});vars=i[0],f=i.slice(1);varo=0,l=0,c=0,h=1;for(o=0;o<s.length;++o){if(o==null)continue;++c;if(typeofs[o]==="number")s[o]=s[o].toString(10);if(typeofs[o]!=="string")thrownewError("DBF Invalid column name "+s[o]+" |"+typeofs[o]+"|");if(s.indexOf(s[o])!==o)for(l=0;l<1024;++l)if(s.indexOf(s[o]+"_"+l)==-1){s[o]+="_"+l;break}}varu=pt(e["!ref"]);vard=[];for(o=0;o<=u.e.c-u.s.c;++o){varp=[];for(l=0;l<f.length;++l){if(f[l][o]!=null)p.push(f[l][o])}if(p.length==0||s[o]==null){d[o]="?";continue}varv="",g="";for(l=0;l<p.length;++l){switch(typeofp[l]){case"number":g="B";break;case"string":g="C";break;case"boolean":g="L";break;case"object":g=p[l]instanceofDate?"D":"C";break;default:g="C";}v=v&&v!=g?"C":g;if(v=="C")break}h+=n[v]||0;d[o]=v}varm=a.next(32);m._W(4,318902576);m._W(4,f.length);m._W(2,296+32*c);m._W(2,h);for(o=0;o<4;++o)m._W(4,0);m._W(4,768);for(o=0,l=0;o<s.length;++o){if(s[o]==null)continue;varb=a.next(32);varw=(s[o].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);b._W(1,w,"sbcs");b._W(1,d[o]=="?"?"C":d[o],"sbcs");b._W(4,l);b._W(1,n[d[o]]||0);b._W(1,0);b._W(1,2);b._W(4,0);b._W(1,0);b._W(4,0);b._W(4,0);l+=n[d[o]]||0}varC=a.next(264);C._W(4,13);for(o=0;o<65;++o)C._W(4,0);for(o=0;o<f.length;++o){varE=a.next(h);E._W(1,0);for(l=0;l<s.length;++l){if(s[l]==null)continue;switch(d[l]){case"L":E._W(1,f[o][l]==null?63:f[o][l]?84:70);break;case"B":E._W(8,f[o][l]||0,"f");break;case"D":if(!f[o][l])E._W(8,"00000000","sbcs");else{E._W(4,("0000"+f[o][l].getFullYear()).slice(-4),"sbcs");E._W(2,("00"+(f[o][l].getMonth()+1)).slice(-2),"sbcs");E._W(2,("00"+f[o][l].getDate()).slice(-2),"sbcs")}break;case"C":vark=String(f[o][l]||"");E._W(1,k,"sbcs");for(c=0;c<250-k.length;++c)E._W(1,32);break;}}}a.next(1)._W(1,26);returna.end()}return{to_workbook:a,to_sheet:t,from_sheet:i}}();varef=function(){functione(e,t){switch(t.type){case"base64":returnr(m.decode(e),t);case"binary":returnr(e,t);case"buffer":returnr(e.toString("binary"),t);case"array":returnr(se(e),t);}thrownewError("Unrecognized type "+t.type)}functionr(e,r){vart=e.split(/[\n\r]+/),a=-1,n=-1,i=0,s=0,f=[];varo=[];varl=null;varc={},h=[],u=[],d=[];varp=0,v;for(;i!==t.length;++i){p=0;varg=t[i].trim();varm=g.replace(/;;/g,"").split(";").map(function(e){returne.replace(/\u0001/g,";")});varb=m[0],w;if(g.length>0)switch(b){case"ID":break;case"E":break;case"B":break;case"O":break;case"P":if(m[1].charAt(0)=="P")o.push(g.slice(3).replace(/;;/g,";"));break;case"C":varC=false,E=false;for(s=1;s<m.length;++s)switch(m[s].charAt(0)){case"X":n=parseInt(m[s].slice(1))-1;E=true;break;case"Y":a=parseInt(m[s].slice(1))-1;if(!E)n=0;for(v=f.length;v<=a;++v)f[v]=[];break;case"K":w=m[s].slice(1);if(w.charAt(0)==='"')w=w.slice(1,w.length-1);elseif(w==="TRUE")w=true;elseif(w==="FALSE")w=false;elseif(!isNaN(le(w))){w=le(w);if(l!==null&&D.is_date(l))w=re(w)}elseif(!isNaN(ce(w).getDate())){w=ie(w)}if(typeofcptable!=="undefined"&&typeofw=="string"&&(r||{}).type!="string"&&(r||{}).codepage)w=cptable.utils.decode(r.codepage,w);C=true;break;case"E":vark=Xl(m[s].slice(1),{r:a,c:n});f[a][n]=[f[a][n],k];break;default:if(r&&r.WTF)thrownewError("SYLK bad record "+g)
varr=Math.abs(e-io(e)),t=ro;if(r>.005)for(ro=eo;ro<qf;++ro)if(Math.abs(e-io(e))<=r){r=Math.abs(e-io(e));t=ro}ro=t}functionfo(e){if(e.width){e.wpx=to(e.width);e.wch=ao(e.wpx);e.MDW=ro}elseif(e.wpx){e.wch=ao(e.wpx);e.width=no(e.wch);e.MDW=ro}elseif(typeofe.wch=="number"){e.width=no(e.wch);e.wpx=to(e.width);e.MDW=ro}if(e.customWidth)deletee.customWidth}varoo=96,lo=oo;functionco(e){returne*96/lo}functionho(e){returne*lo/96}varuo={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};functionpo(e,r,t,a){r.Borders=[];varn={};vari=false;e[0].match(_e).forEach(function(e){vart=ye(e);switch(xe(t[0])){case"<borders":;case"<borders>":;case"</borders>":break;case"<border":;case"<border>":;case"<border/>":n={};if(t.diagonalUp){n.diagonalUp=t.diagonalUp}if(t.diagonalDown){n.diagonalDown=t.diagonalDown}r.Borders.push(n);break;case"</border>":break;case"<left/>":break;case"<left":;case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":;case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":;case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":;case"<bottom>":break;case"</bottom>":break;case"<diagonal":;case"<diagonal>":;case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":;case"<horizontal>":;case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":;case"<vertical>":;case"<vertical/>":break;case"</vertical>":break;case"<start":;case"<start>":;case"<start/>":break;case"</start>":break;case"<end":;case"<end>":;case"<end/>":break;case"</end>":break;case"<color":;case"<color>":break;case"<color/>":;case"</color>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)thrownewError("unrecognized "+t[0]+" in borders")};}})}functionvo(e,r,t,a){r.Fills=[];varn={};vari=false;e[0].match(_e).forEach(function(e){vart=ye(e);switch(xe(t[0])){case"<fills":;case"<fills>":;case"</fills>":break;case"<fill>":;case"<fill":;case"<fill/>":n={};r.Fills.push(n);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":;case"</gradientFill>":r.Fills.push(n);n={};break;case"<patternFill":;case"<patternFill>":if(t.patternType)n.patternType=t.patternType;break;case"<patternFill/>":;case"</patternFill>":break;case"<bgColor":if(!n.bgColor)n.bgColor={};if(t.indexed)n.bgColor.indexed=parseInt(t.indexed,10);if(t.theme)n.bgColor.theme=parseInt(t.theme,10);if(t.tint)n.bgColor.tint=parseFloat(t.tint);if(t.rgb)n.bgColor.rgb=t.rgb.slice(-6);break;case"<bgColor/>":;case"</bgColor>":break;case"<fgColor":if(!n.fgColor)n.fgColor={};if(t.theme)n.fgColor.theme=parseInt(t.theme,10);if(t.tint)n.fgColor.tint=parseFloat(t.tint);if(t.rgb)n.fgColor.rgb=t.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;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)thrownewError("unrecognized "+t[0]+" in fills")};}})}functiongo(e,r,t,a){r.Fonts=[];varn={};vars=false;e[0].match(_e).forEach(function(e){varf=ye(e);switch(xe(f[0])){case"<fonts":;case"<fonts>":;case"</fonts>":break;case"<font":;case"<font>":break;case"</font>":;case"<font/>":r.Fonts.push(n);n={};break;case"<name":if(f.val)n.name=f.val;break;case"<name/>":;case"</name>":break;case"<b":n.bold=f.val?Ve(f.val):1;break;case"<b/>":n.bold=1;break;case"<i":n.italic=f.val?Ve(f.val):1;break;case"<i/>":n.italic=1;break;case"<u":switch(f.val){case"none":n.underline=0;break;case"single":n.underline=1;break;case"double":n.underline=2;break;case"singleAccounting":n.underline=33;break;case"doubleAccounting":n.underline=34;break;}break;case"<u/>":n.underl
author:i.authorId&&t[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid};varf=ct(i.ref);if(r.sheetRows&&r.sheetRows<=f.r)return;varo=e.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/);varl=!!o&&!!o[1]&&hf(o[1])||{r:"",t:"",h:""};s.r=l.r;if(l.r=="<t></t>")l.t=l.h="";s.t=l.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(r.cellHTML)s.h=l.h;a.push(s)});returna}varyl=ar("comments",null,{xmlns:sr.main[0]});functionxl(e){varr=[Se,yl];vart=[];r.push("<authors>");e.forEach(function(e){e[1].forEach(function(e){vara=Pe(e.a);if(t.indexOf(a)>-1)return;t.push(a);r.push("<author>"+a+"</author>")})});r.push("</authors>");r.push("<commentList>");e.forEach(function(e){e[1].forEach(function(a){r.push('<comment ref="'+e[0]+'" authorId="'+t.indexOf(Pe(a.a))+'"><text>');r.push(rr("t",a.t==null?"":Pe(a.t)));r.push("</text></comment>")})});r.push("</commentList>");if(r.length>2){r[r.length]="</comments>";r[1]=r[1].replace("/>",">")}returnr.join("")}functionIl(e){varr={};r.iauthor=e._R(4);vart=Vt(e,16);r.rfx=t.s;r.ref=ht(t.s);e.l+=16;returnr}functionRl(e,r){if(r==null)r=Gr(36);r._W(4,e[1].iauthor);zt(e[0],r);r._W(4,0);r._W(4,0);r._W(4,0);r._W(4,0);returnr}varDl=Et;functionFl(e){returnkt(e.slice(0,54))}functionOl(e,r){vart=[];vara=[];varn={};vari=false;jr(e,functions(e,f,o){switch(o){case632:a.push(e);break;case635:n=e;break;case637:n.t=e.t;n.h=e.h;n.r=e.r;break;case636:n.author=a[n.iauthor];deleten.iauthor;if(r.sheetRows&&r.sheetRows<=n.rfx.r)break;if(!n.t)n.t="";deleten.rfx;t.push(n);break;case3072:break;case35:i=true;break;case36:i=false;break;case37:break;case38:break;default:if((f||"").indexOf("Begin")>0){}elseif((f||"").indexOf("End")>0){}elseif(!i||r.WTF)thrownewError("Unexpected record "+o+" "+f);}});returnt}functionPl(e){varr=Kr();vart=[];Yr(r,"BrtBeginComments");Yr(r,"BrtBeginCommentAuthors");e.forEach(function(e){e[1].forEach(function(e){if(t.indexOf(e.a)>-1)return;t.push(e.a.slice(0,54));Yr(r,"BrtCommentAuthor",Fl(e.a))})});Yr(r,"BrtEndCommentAuthors");Yr(r,"BrtBeginCommentList");e.forEach(function(e){e[1].forEach(function(a){a.iauthor=t.indexOf(a.a);varn={s:ct(e[0]),e:ct(e[0])};Yr(r,"BrtBeginComment",Rl([n,a]));if(a.t&&a.t.length>0)Yr(r,"BrtCommentText",yt(a));Yr(r,"BrtEndComment");deletea.iauthor})});Yr(r,"BrtEndCommentList");Yr(r,"BrtEndComments");returnr.end()}varNl="application/vnd.ms-office.vbaProject";functionLl(e){varr=W.utils.cfb_new({root:"R"});e.FullPaths.forEach(function(t,a){if(t.slice(-1)==="/"||!t.match(/_VBA_PROJECT_CUR/))return;varn=t.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");W.utils.cfb_add(r,n,e.FileIndex[a].content)});returnW.write(r)}functionMl(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;varn=t.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")W.utils.cfb_add(e,n,r.FileIndex[a].content)})}varUl=["xlsb","xlsm","xlam","biff8","xla"];Ra.DS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet";Ra.MS="http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet";functionHl(){return{"!type":"dialog"}}functionWl(){return{"!type":"dialog"}}functionVl(){return{"!type":"macro"}}functionzl(){return{"!type":"macro"}}varXl=function(){vare=/(^|[^A-Za-z])R(\[?)(-?\d+|)\]?C(\[?)(-?\d+|)\]?/g;varr={r:0,c:0};functiont(e,t,a,n,i,s){varf=n.length>0?parseInt(n,10)|0:0,o=s.length>0?parseInt(s,10)|0:0;if(o<0&&i.length===0)o=0;varl=false,c=false;if(i.length>0||s.length==0)l=true;if(l)o+=r.c;else--o;if(a.length>0||n.length==0)c=true;if(c)f+=r.r;else--f;returnt+(l?"":"$")+st(o)+(c?"":"$")+tt(f)}returnfunctiona(n,i){r=i;returnn.replace(e,t)}}();varGl=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)([1-9]\d{0,5}|10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6])(?![_.\(A-Za-z0-9])/g;varjl=function(){returnfunctione(r,t){returnr.replace(Gl,function(e,r,a,n,i,s){varf=it(n)-(a?0:t.c);varo=rt(s)-(i?0:t.r);varl=o==0?"":!i?"["+o+"]":o+1;varc=f==0?"":!a?"["+f+"]":f+1;returnr+"R"+l+"C"+c})}}();functionKl(e,r){returne.replace(Gl,function(e,t,a,n,i,s
varg=c.length+p+u.length;for(v=0;v<e.SheetNames.length;++v){varm=i[v]||{};vv(d,"BoundSheet8",Ii({pos:g,hs:m.Hidden||0,dt:0,name:e.SheetNames[v]},t));g+=r[v].length}varb=d.end();if(p!=b.length)thrownewError("BS8 "+p+" != "+b.length);varw=[];if(c.length)w.push(c);if(b.length)w.push(b);if(u.length)w.push(u);returncr([w])}functionIv(e,r){vart=r||{};vara=[];if(e&&!e.SSF){e.SSF=D.get_table()}if(e&&e.SSF){F(D);D.load_table(e.SSF);t.revssf=Z(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}t.cellXfs=[];t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;Qh(t.cellXfs,{},{revssf:{General:0}});for(varn=0;n<e.SheetNames.length;++n)a[a.length]=yv(n,t,e);a.unshift(xv(e,a,t));returncr([a])}functionRv(e,r){vart=r||{};switch(t.biff||2){case8:;case5:returnIv(e,r);case4:;case3:;case2:returnEv(e,r);}thrownewError("invalid type "+t.bookType+" for BIFF")}varDv=function(){functione(e,r){vart=r||{};if(v!=null&&t.dense==null)t.dense=v;vara=t.dense?[]:{};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;varo=ue(e.slice(s,f),/(:?<tr[^>]*>)/i,"<tr>");varl=-1,c=0,h=0,u=0;vard={s:{r:1e7,c:1e7},e:{r:0,c:0}};varp=[];for(s=0;s<o.length;++s){varg=o[s].trim();varm=g.slice(0,3).toLowerCase();if(m=="<tr"){++l;if(t.sheetRows&&t.sheetRows<=l){--l;break}c=0;continue}if(m!="<td"&&m!="<th")continue;varb=g.split(/<\/t[dh]>/i);for(f=0;f<b.length;++f){varw=b[f].trim();if(!w.match(/<t[dh]/i))continue;varC=w,E=0;while(C.charAt(0)=="<"&&(E=C.indexOf(">"))>-1)C=C.slice(E+1);vark=ye(w.slice(0,w.indexOf(">")));u=k.colspan?+k.colspan:1;if((h=+k.rowspan)>1||u>1)p.push({s:{r:l,c:c},e:{r:l+(h||1)-1,c:c+u-1}});varS=k.t||"";if(!C.length){c+=u;continue}C=$e(C);if(d.s.r>l)d.s.r=l;if(d.e.r<l)d.e.r=l;if(d.s.c>c)d.s.c=c;if(d.e.c<c)d.e.c=c;if(!C.length)continue;varA={t:"s",v:C};if(t.raw||!C.trim().length||S=="s"){}elseif(C==="TRUE")A={t:"b",v:true};elseif(C==="FALSE")A={t:"b",v:false};elseif(!isNaN(le(C)))A={t:"n",v:le(C)};elseif(!isNaN(ce(C).getDate())){A={t:"d",v:ie(C)};if(!t.cellDates)A={t:"n",v:ee(A.v)};A.z=t.dateNF||D._table[14]}if(t.dense){if(!a[l])a[l]=[];a[l][c]=A}elsea[ht({r:l,c:c})]=A;c+=u}}a["!ref"]=dt(d);returna}functionr(r,t){returnmt(e(r,t),t)}functiont(e,r,t,a){varn=e["!merges"]||[];vari=[];for(vars=r.s.c;s<=r.e.c;++s){varf=0,o=0;for(varl=0;l<n.length;++l){if(n[l].s.r>t||n[l].s.c>s)continue;if(n[l].e.r<t||n[l].e.c<s)continue;if(n[l].s.r<t||n[l].s.c<s){f=-1;break}f=n[l].e.r-n[l].s.r+1;o=n[l].e.c-n[l].s.c+1;break}if(f<0)continue;varc=ht({r:t,c:s});varh=a.dense?(e[t]||[])[s]:e[c];varu={};if(f>1)u.rowspan=f;if(o>1)u.colspan=o;vard=h&&h.v!=null&&(h.h||Me(h.w||(gt(h),h.w)||""))||"";u.t=h&&h.t||"z";if(a.editable)d='<span contenteditable="true">'+d+"</span>";u.id="sjs-"+c;i.push(ar("td",d,u))}varp="<tr>";returnp+i.join("")+"</tr>"}functiona(e,r,t){vara=[];returna.join("")+"<table"+(t&&t.id?' id="'+t.id+'"':"")+">"}varn='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>';vari="</body></html>";functions(e,r){vars=r||{};varf=s.header!=null?s.header:n;varo=s.footer!=null?s.footer:i;varl=[f];varc=ut(e["!ref"]);s.dense=Array.isArray(e);l.push(a(e,c,s));for(varh=c.s.r;h<=c.e.r;++h)l.push(t(e,c,h,s));l.push("</table>"+o);returnl.join("")}return{to_workbook:r,to_sheet:e,_row:t,BEGIN:n,END:i,_preamble:a,from_sheet:s}}();functionFv(e,r){vart=r||{};if(v!=null)t.dense=v;vara=t.dense?[]:{};varn=e.getElementsByTagName("tr");vari=t.sheetRows||1e7;vars={s:{r:0,c:0},e:{r:0,c:0}};varf=[],o=0;varl=[];varc=0,h=0,u,d,p,g;for(;c<n.length&&h<i;++c){varm=n[c];if(Pv(m)){if(t.display)continue;l[h]={hidden:true}}varb=m.children;for(u=d=0;u<b.length;++u){varw=b[u];if(t.display&&Pv(w))continue;varC=$e(w.innerHTML);for(o=0;o<f.length;++o){varE=f[o];if(E.s.c==d&&E.s.r<=h&&h<=E.e.r){d=E.e.c+1;o=-1}}g=+w.getAttribute("colspan")||1;if((p=+w.getAttribute("rowspan"))>0||g>1)f.push({s:{r:h,c:d},e:{r:h+(p||1)-1,c:d+g-1}});vark={t:"s",v:C};varS=w.getAttribute("t")||"";if(C!=null){if(C.length==0)k.t=S||
break;case"array":t=se(e);break;default:thrownewError("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=ze(t);returndg(t,r)}functionvg(e,r){vart=e;if(r.type=="base64")t=m.decode(t);t=cptable.utils.decode(1200,t.slice(2),"str");r.type="binary";returndg(t,r)}functiongg(e){return!e.match(/[^\x00-\x7F]/)?e:Xe(e)}functionmg(e,r,t,a){if(a){t.type="string";returnaf.to_workbook(e,t)}returnaf.to_workbook(r,t)}functionbg(e,r){l();if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)returnbg(newUint8Array(e),r);vart=e,a=[0,0,0,0],n=false;vari=r||{};jh={};if(i.dateNF)jh.dateNF=i.dateNF;if(!i.type)i.type=b&&Buffer.isBuffer(e)?"buffer":"base64";if(i.type=="file"){i.type=b?"buffer":"binary";t=G(e)}if(i.type=="string"){n=true;i.type="binary";i.codepage=65001;t=gg(e)}if(i.type=="array"&&typeofUint8Array!=="undefined"&&einstanceofUint8Array&&typeofArrayBuffer!=="undefined"){vars=newArrayBuffer(3),f=newUint8Array(s);f.foo="bar";if(!f.foo){i=fe(i);i.type="array";returnbg(y(t),i)}}switch((a=cg(t,i))[0]){case208:returnhg(W.read(t,i),i);case9:returnlv(t,i);case60:returnWp(t,i);case73:if(a[1]===68)returnnf(t,i);break;case84:if(a[1]===65&&a[2]===66&&a[3]===76)returnrf.to_workbook(t,i);break;case80:returna[1]===75&&a[2]<9&&a[3]<9?ug(t,i):mg(e,t,i,n);case239:returna[3]===60?Wp(t,i):mg(e,t,i,n);case255:if(a[1]===254){returnvg(t,i)}break;case0:if(a[1]===0&&a[2]>=2&&a[3]===0)returnsf.to_workbook(t,i);break;case3:;case131:;case139:;case140:returnqs.to_workbook(t,i);case123:if(a[1]===92&&a[2]===114&&a[3]===116)returnjf.to_workbook(t,i);break;case10:;case13:;case32:returnpg(t,i);}if(a[2]<=12&&a[3]<=31)returnqs.to_workbook(t,i);returnmg(e,t,i,n)}functionwg(e,r){vart=r||{};t.type="file";returnbg(e,t)}functionCg(e,r){switch(r.type){case"base64":;case"binary":break;case"buffer":;case"array":r.type="";break;case"file":returnX(r.file,W.write(e,{type:b?"buffer":""}));case"string":thrownewError("'string' output type invalid for '"+r.bookType+"' files");default:thrownewError("Unrecognized type "+r.type);}returnW.write(e,r)}functionEg(e,r){vart=r||{};vara=lg(e,t);varn={};if(t.compression)n.compression="DEFLATE";if(t.password)n.type=b?"nodebuffer":"string";elseswitch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":thrownewError("'string' output type invalid for '"+t.bookType+"' files");case"buffer":;case"file":n.type=b?"nodebuffer":"string";break;default:thrownewError("Unrecognized type "+t.type);}vari=a.generate(n);if(t.password&&typeofencrypt_agile!=="undefined")returnCg(encrypt_agile(i,t.password),t);if(t.type==="file")returnX(t.file,i);returnt.type=="string"?ze(i):i}functionkg(e,r){vart=r||{};vara=cv(e,t);returnCg(a,t)}functionSg(e,r,t){if(!t)t="";vara=t+e;switch(r.type){case"base64":returnm.encode(Xe(a));case"binary":returnXe(a);case"string":returne;case"file":returnX(r.file,a,"utf8");case"buffer":{if(b)returnw(a,"utf8");elsereturnSg(a,{type:"binary"}).split("").map(function(e){returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}functionAg(e,r){switch(r.type){case"base64":returnm.encode(e);case"binary":returne;case"string":returne;case"file":returnX(r.file,e,"binary");case"buffer":{if(b)returnw(e,"binary");elsereturne.split("").map(function(e){returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}function_g(e,r){switch(r.type){case"string":;case"base64":;case"binary":vart="";for(vara=0;a<e.length;++a)t+=String.fromCharCode(e[a]);returnr.type=="base64"?m.encode(t):r.type=="string"?ze(t):t;case"file":returnX(r.file,e);case"buffer":returne;default:thrownewError("Unrecognized type "+r.type);}}functionBg(e,r){Kd(e);vart=r||{};if(t.type=="array"){t.type="binary";vara=Bg(e,t);t.type="array";return_(a)}switch(t.bookType||"xlsb"){case"xml":;case"xlml":returnSg(ev(e,t),t);case"slk":;case"sylk":returnSg(Kv(e,t),t);case"htm":;case"html":returnSg(Gv(e,t),t);case"txt":returnAg(Qv(e,t),t);case"csv":returnSg(jv(e,t),t,"\ufeff");case"dif":returnSg(Yv(e,t)