functioni(e){varr=e<0?12:11;vart=o(e.toFixed(12));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)}var
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}}}functionO(e,r){vart=r||{};x(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=jr(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,H.DIFSECT);for(s+=a[2];i<s;++i)n._W(-4,H.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,H.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,H.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}functionF(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(D);i=i.replace(R,"");if(f)i=i.replace(D,"!");for(s=0;s<t.length;++s){if((f?t[s].replace(D,"!"):t[s]).replace(R,"")==i)returne.FileIndex[s];if((f?a[s].replace(D,"!"):a[s]).replace(R,"")==i)returne.FileIndex[s]}returnnull}varP=64;varN=-2;varL="d0cf11e0a1b11ae1";varM=[208,207,17,224,161,177,26,225];varU="00000000000000000000000000000000";varH={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=O(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=O(e,r);switch(r&&r.type){case"file":o();f.writeFileSync(r.filename,t);returnt;case"binary":returnX(t);case"base64":returnb.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]=Oe(c);break;case"bool":t[a]=ze(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]=se(c);break;case"cy":;case"error":t[a]=Oe(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}varsn=nr("Properties",null,{xmlns:fr.CUST_PROPS,"xmlns:vt":fr.vt});functionfn(e){varr=[Ae,sn];if(!e)returnr.join("");vart=1;K(e).forEach(functiona(n){++t;r[r.length]=nr("property",sr(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("")}varon={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"};varln=Z(on);functioncn(e,r,t){r=ln[r]||r;e[r]=t}functionhn(e,r){vart=[];K(on).map(function(e){for(varr=0;r<Ga.length;++r)if(Ga[r][1]==e)returnGa[r];for(r=0;r<Qa.length;++r)if(Qa[r][1]==e)returnQa[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(tr(on[a[1]]||a[1],n))});returnnr("DocumentProperties",t.join(""),{xmlns:or.o})}functionun(e,r){vart=["Worksheets","SheetNames"];vara="CustomDocumentProperties";varn=[];if(e)K(e).forEach(function(r){if(!e.hasOwnProperty(r))return;for(vara=0;a<Ga.length;++a)if(r==Ga[a][1])return;for(a=0;a<Qa.length;++a)if(r==Qa[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(nr(Le(r),i,{"dt:dt":s}))});if(r)K(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(nr(Le(t),a,{"dt:dt":i}))});return"<"+a+' xmlns="'+or.o+'">'+n.join("")+"</"+a+">"}functiondn(e){varr=e._R(4),t=e._R(4);returnnewDate((t/1e7*Math.pow(2,32)+r/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}functionpn(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=jr(8);s._W(4,a);s._W(4,n);returns}functionvn(e,r,t){vara=e.l;varn=e._R(0,"lpstr-cp");if(t)while(e.l-a&3)++e.l;returnn}functiongn(e,r,t){vara=e._R(0,"lpwstr");if(t)e.l+=4-(a.length+1&3)&3;returna}functionmn(e,r,t){if(r===31)returngn(e);returnvn(e,r,t)}functionbn(e,r,t){returnmn(e,r,t===false?0:4)}functionwn(e,r){if(!r)thrownewError("VtUnalignedString must have positive length");returnmn(e,r,0)}functionCn(e){varr=e._R(4);vart=[];for(vara=0;a!=r;++a)t[a]=e._R(0,"lpstr-cp").replace(R,"");returnt}functionEn(e){returnCn(e)}functionkn(e){varr=yn(e,da);vart=yn(e,aa);return[r,t]}functionSn(e){varr=e._R(4);vart=[];for(vara=0;a!=r/2;++a)t.push(kn(e));returnt}functionAn(e){returnSn(e)}function_n(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(R,"").replace(D,"!");if(r===1200&&s%2)e.l+=2}if(e.l&3)e.l=e.l>>2+1<<2;returna}functionBn(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}functionTn(e){varr={}
;}break;case"M":if(!s)thrownewError("DBF Unexpected MEMO for type "+i.toString(16));a[m][w]="##MEMO##"+(o?parseInt(E.trim(),10):C._R(4));break;case"N":a[m][w]=+E.replace(/\u0000/g,"").trim();break;case"@":a[m][w]=newDate(C._R(-8,"f")-621356832e5);break;case"T":a[m][w]=newDate((C._R(4)-2440588)*864e5+C._R(4));break;case"Y":a[m][w]=C._R(4,"i")/1e4;break;case"O":a[m][w]=-C._R(-8,"f");break;case"B":if(f&&d[w].len==8){a[m][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}functionn(e,r){vart=r||{};if(!t.dateNF)t.dateNF="yyyymmdd";returnCt(a(e,t),t)}functioni(e,r){try{returnbt(n(e,r),r)}catch(t){if(r&&r.WTF)throwt}return{SheetNames:[],Sheets:{}}}vars={B:8,C:250,L:1,D:8,"?":0,"":0};functionf(e,a){varn=a||{};if(+n.codepage>=0)o(+n.codepage);if(n.type=="string")thrownewError("Cannot write DBF to JS string");vari=Yr();varf=Dg(e,{header:1,raw:true,cellDates:true});varl=f[0],c=f.slice(1);varh=0,u=0,d=0,p=1;for(h=0;h<l.length;++h){if(h==null)continue;++d;if(typeofl[h]==="number")l[h]=l[h].toString(10);if(typeofl[h]!=="string")thrownewError("DBF Invalid column name "+l[h]+" |"+typeofl[h]+"|");if(l.indexOf(l[h])!==h)for(u=0;u<1024;++u)if(l.indexOf(l[h]+"_"+u)==-1){l[h]+="_"+u;break}}varv=vt(e["!ref"]);varg=[];for(h=0;h<=v.e.c-v.s.c;++h){varm=[];for(u=0;u<c.length;++u){if(c[u][h]!=null)m.push(c[u][h])}if(m.length==0||l[h]==null){g[h]="?";continue}varb="",w="";for(u=0;u<m.length;++u){switch(typeofm[u]){case"number":w="B";break;case"string":w="C";break;case"boolean":w="L";break;case"object":w=m[u]instanceofDate?"D":"C";break;default:w="C";}b=b&&b!=w?"C":w;if(b=="C")break}p+=s[b]||0;g[h]=b}varC=i.next(32);C._W(4,318902576);C._W(4,c.length);C._W(2,296+32*d);C._W(2,p);for(h=0;h<4;++h)C._W(4,0);C._W(4,0|(+r[t]||3)<<8);for(h=0,u=0;h<l.length;++h){if(l[h]==null)continue;varE=i.next(32);vark=(l[h].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);E._W(1,k,"sbcs");E._W(1,g[h]=="?"?"C":g[h],"sbcs");E._W(4,u);E._W(1,s[g[h]]||0);E._W(1,0);E._W(1,2);E._W(4,0);E._W(1,0);E._W(4,0);E._W(4,0);u+=s[g[h]]||0}varS=i.next(264);S._W(4,13);for(h=0;h<65;++h)S._W(4,0);for(h=0;h<c.length;++h){varA=i.next(p);A._W(1,0);for(u=0;u<l.length;++u){if(l[u]==null)continue;switch(g[u]){case"L":A._W(1,c[h][u]==null?63:c[h][u]?84:70);break;case"B":A._W(8,c[h][u]||0,"f");break;case"D":if(!c[h][u])A._W(8,"00000000","sbcs");else{A._W(4,("0000"+c[h][u].getFullYear()).slice(-4),"sbcs");A._W(2,("00"+(c[h][u].getMonth()+1)).slice(-2),"sbcs");A._W(2,("00"+c[h][u].getDate()).slice(-2),"sbcs")}break;case"C":var_=String(c[h][u]||"");A._W(1,_,"sbcs");for(d=0;d<250-_.length;++d)A._W(1,32);break;}}}i.next(1)._W(1,26);returni.end()}return{to_workbook:i,to_sheet:n,from_sheet:f}}();varrf=function(){vare={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,0:176,1:177,2:178,3:179,B:180,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223};varr=newRegExp("N("+K(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm");e["|"]=254;functiont(e,r){switch(r.type){case"base64":returna(b.decode(e),r);case"binary":returna(e,r);case"buffer":returna(e.toString("binary"),r);case"array":returna(fe(e),r);}thrownewError("Unrecognized type "+r.type)}functiona(t,a){varn=t.split(/[\n\r]+/),i=-1,s=-1,f=0,l=0,c=[];varh=[];varu=null;vard={
}function$f(e){for(varr=0,t=1;r!=3;++r)t=t*256+(e[r]>255?255:e[r]<0?0:e[r]);returnt.toString(16).toUpperCase().slice(1)}functionZf(e){varr=e[0]/255,t=e[1]/255,a=e[2]/255;varn=Math.max(r,t,a),i=Math.min(r,t,a),s=n-i;if(s===0)return[0,0,r];varf=0,o=0,l=n+i;o=s/(l>1?2-l:l);switch(n){caser:f=((t-a)/s+6)%6;break;caset:f=(a-r)/s+2;break;casea:f=(r-t)/s+4;break;}return[f/6,o,l/2]}functionQf(e){varr=e[0],t=e[1],a=e[2];varn=t*2*(a<.5?a:1-a),i=a-n/2;vars=[i,i,i],f=6*r;varo;if(t!==0)switch(f|0){case0:;case6:o=n*f;s[0]+=n;s[1]+=o;break;case1:o=n*(2-f);s[0]+=o;s[1]+=n;break;case2:o=n*(f-2);s[1]+=n;s[2]+=o;break;case3:o=n*(4-f);s[1]+=o;s[2]+=n;break;case4:o=n*(f-4);s[2]+=n;s[0]+=o;break;case5:o=n*(6-f);s[2]+=o;s[0]+=n;break;}for(varl=0;l!=3;++l)s[l]=Math.round(s[l]*255);returns}functionJf(e,r){if(r===0)returne;vart=Zf(Yf(e));if(r<0)t[2]=t[2]*(1+r);elset[2]=1-(1-t[2])*(1-r);return$f(Qf(t))}varqf=6,eo=15,ro=1,to=qf;functionao(e){returnMath.floor((e+Math.round(128/to)/256)*to)}functionno(e){returnMath.floor((e-5)/to*100+.5)/100}functionio(e){returnMath.round((e*to+5)/to*256)/256}functionso(e){returnio(no(ao(e)))}functionfo(e){varr=Math.abs(e-so(e)),t=to;if(r>.005)for(to=ro;to<eo;++to)if(Math.abs(e-so(e))<=r){r=Math.abs(e-so(e));t=to}to=t}functionoo(e){if(e.width){e.wpx=ao(e.width);e.wch=no(e.wpx);e.MDW=to}elseif(e.wpx){e.wch=no(e.wpx);e.width=io(e.wch);e.MDW=to}elseif(typeofe.wch=="number"){e.width=io(e.wch);e.wpx=ao(e.width);e.MDW=to}if(e.customWidth)deletee.customWidth}varlo=96,co=lo;functionho(e){returne*96/co}functionuo(e){returne*co/96}varpo={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"};functionvo(e,r,t,a){r.Borders=[];varn={};vari=false;e[0].match(Be).forEach(function(e){vart=xe(e);switch(Ie(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")};}})}functiongo(e,r,t,a){r.Fills=[];varn={};vari=false;e[0].match(Be).forEach(function(e){vart=xe(e);switch(Ie(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.th
vars=r[i];varf=wp(we(e,s.replace(/^\//,""),true),s,n);if(!f||!f.length)continue;varo=K(t);for(varl=0;l!=o.length;++l){varc=o[l];varh=a[c];if(h){varu=h[s];if(u)Tl(c,t[c],f)}}}}functionTl(e,r,t){vara=Array.isArray(r);varn;t.forEach(function(e){vart=ht(e.ref);if(a){if(!r[t.r])r[t.r]=[];n=r[t.r][t.c]}elsen=r[e.ref];if(!n){n={};if(a)r[t.r][t.c]=n;elser[e.ref]=n;vari=vt(r["!ref"]||"BDWGO1000001:A1");if(i.s.r>t.r)i.s.r=t.r;if(i.e.r<t.r)i.e.r=t.r;if(i.s.c>t.c)i.s.c=t.c;if(i.e.c<t.c)i.e.c=t.c;vars=pt(i);if(s!==r["!ref"])r["!ref"]=s}if(!n.c)n.c=[];varf={a:e.author,t:e.t,r:e.r};if(e.h)f.h=e.h;n.c.push(f)})}functionyl(e,r){if(e.match(/<(?:\w+:)?comments *\/>/))return[];vart=[];vara=[];varn=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);if(n&&n[1])n[1].split(/<\/\w*:?author>/).forEach(function(e){if(e===""||e.trim()==="")return;varr=e.match(/<(?:\w+:)?author[^>]*>(.*)/);if(r)t.push(r[1])});vari=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);if(i&&i[1])i[1].split(/<\/\w*:?comment>/).forEach(function(e){if(e===""||e.trim()==="")return;varn=e.match(/<(?:\w+:)?comment[^>]*>/);if(!n)return;vari=xe(n[0]);vars={author:i.authorId&&t[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid};varf=ht(i.ref);if(r.sheetRows&&r.sheetRows<=f.r)return;varo=e.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/);varl=!!o&&!!o[1]&&uf(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}varxl=nr("comments",null,{xmlns:fr.main[0]});functionIl(e){varr=[Ae,xl];vart=[];r.push("<authors>");e.forEach(function(e){e[1].forEach(function(e){vara=Ne(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(Ne(a.a))+'"><text>');r.push(tr("t",a.t==null?"":Ne(a.t)));r.push("</text></comment>")})});r.push("</commentList>");if(r.length>2){r[r.length]="</comments>";r[1]=r[1].replace("/>",">")}returnr.join("")}functionRl(e){varr={};r.iauthor=e._R(4);vart=zt(e,16);r.rfx=t.s;r.ref=ut(t.s);e.l+=16;returnr}functionDl(e,r){if(r==null)r=jr(36);r._W(4,e[1].iauthor);Xt(e[0],r);r._W(4,0);r._W(4,0);r._W(4,0);r._W(4,0);returnr}varOl=kt;functionFl(e){returnSt(e.slice(0,54))}functionPl(e,r){vart=[];vara=[];varn={};vari=false;Kr(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}functionNl(e){varr=Yr();vart=[];$r(r,"BrtBeginComments");$r(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));$r(r,"BrtCommentAuthor",Fl(e.a))})});$r(r,"BrtEndCommentAuthors");$r(r,"BrtBeginCommentList");e.forEach(function(e){e[1].forEach(function(a){a.iauthor=t.indexOf(a.a);varn={s:ht(e[0]),e:ht(e[0])};$r(r,"BrtBeginComment",Dl([n,a]));if(a.t&&a.t.length>0)$r(r,"BrtCommentText",xt(a));$r(r,"BrtEndComment");deletea.iauthor})});$r(r,"BrtEndCommentList");$r(r,"BrtEndComments");returnr.end()}varLl="application/vnd.ms-office.vbaProject";functionMl(e){varr=V.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*/,"");V.utils.cfb_add(r,n,e.FileIndex[a].content)});returnV.write(r)}functionUl(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;varn=t.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")V.utils.cfb_add(e,n,r.FileIndex[a].content)})}varHl=["xlsb","xlsm","xlam","biff8","xla"];Da.DS="http://schemas.openxmlformats.org/
gv(a,"InterfaceEnd");gv(a,"WriteAccess",yi("SheetJS",t));gv(a,"CodePage",Vn(f?1200:1252));if(f)gv(a,"DSF",Vn(0));if(f)gv(a,"Excel9File");gv(a,"RRTabId",Ws(e.SheetNames.length));if(f&&e.vbaraw){gv(a,"ObProj");varl=s.CodeName||"ThisWorkbook";gv(a,"CodeName",Qn(l,t))}gv(a,"BuiltInFnGroupCount",Vn(17));gv(a,"WinProtect",Hn(false));gv(a,"Protect",Hn(false));gv(a,"Password",Vn(0));if(f)gv(a,"Prot4Rev",Hn(false));if(f)gv(a,"Prot4RevPass",Vn(0));gv(a,"Window1",Ui(t));gv(a,"Backup",Hn(false));gv(a,"HideObj",Vn(0));gv(a,"Date1904",Hn(Xd(e)=="true"));gv(a,"CalcPrecision",Hn(true));if(f)gv(a,"RefreshAll",Hn(false));gv(a,"BookBool",Vn(0));Sv(a,e,t);Av(a,e.SSF,t);Bv(a,t);if(f)gv(a,"UsesELFs",Hn(false));varc=a.end();varh=Yr();if(f)gv(h,"Country",Fs());gv(h,"EOF");varu=h.end();vard=Yr();varp=0,v=0;for(v=0;v<e.SheetNames.length;++v)p+=(f?12:11)+(f?2:1)*e.SheetNames[v].length;varg=c.length+p+u.length;for(v=0;v<e.SheetNames.length;++v){varm=i[v]||{};gv(d,"BoundSheet8",Ri({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);returnhr([w])}functionRv(e,r){vart=r||{};vara=[];if(e&&!e.SSF){e.SSF=O.get_table()}if(e&&e.SSF){F(O);O.load_table(e.SSF);t.revssf=Q(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}t.cellXfs=[];t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;Jh(t.cellXfs,{},{revssf:{General:0}});for(varn=0;n<e.SheetNames.length;++n)a[a.length]=xv(n,t,e);a.unshift(Iv(e,a,t));returnhr([a])}functionDv(e,r){vart=r||{};switch(t.biff||2){case8:;case5:returnRv(e,r);case4:;case3:;case2:returnkv(e,r);}thrownewError("invalid type "+t.bookType+" for BIFF")}varOv=function(){functione(e,r){vart=r||{};if(g!=null&&t.dense==null)t.dense=g;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=de(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){varv=o[s].trim();varm=v.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=v.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=xe(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=Ze(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(ce(C)))A={t:"n",v:ce(C)};elseif(!isNaN(he(C).getDate())){A={t:"d",v:se(C)};if(!t.cellDates)A={t:"n",v:re(A.v)};A.z=t.dateNF||O._table[14]}if(t.dense){if(!a[l])a[l]=[];a[l][c]=A}elsea[ut({r:l,c:c})]=A;c+=u}}a["!ref"]=pt(d);returna}functionr(r,t){returnbt(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=ut({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||Ue(h.w||(mt(h),h.w)||""))||"";u.t=h&&h.t||"z";if(a.editable)d='<span contenteditable="true">'+d+"</span>";u.id="sjs-"+c;i.push(nr("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=dt(e["!ref"]);s.dense=Array.i
;default:thrownewError("Unrecognized type "+(r&&r.type||"undefined"));}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]}functionug(e,r){if(V.find(e,"EncryptedPackage"))returnlg(e,r);returncv(e,r)}functiondg(e,r){vart,a=e;varn=r||{};if(!n.type)n.type=w&&Buffer.isBuffer(e)?"buffer":"base64";switch(n.type){case"base64":t=newke(a,{base64:true});break;case"binary":;case"array":t=newke(a,{base64:false});break;case"buffer":t=newke(a);break;default:thrownewError("Unrecognized type "+n.type);}returnog(t,n)}functionpg(e,r){vart=0;e:while(t<e.length)switch(e.charCodeAt(t)){case10:;case13:;case32:++t;break;case60:returnVp(e.slice(t),r);default:breake;}returnnf.to_workbook(e,r)}functionvg(e,r){vart="",a=hg(e,r);switch(r.type){case"base64":t=b.decode(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=fe(e);break;default:thrownewError("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=Xe(t);returnpg(t,r)}functiongg(e,r){vart=e;if(r.type=="base64")t=b.decode(t);t=cptable.utils.decode(1200,t.slice(2),"str");r.type="binary";returnpg(t,r)}functionmg(e){return!e.match(/[^\x00-\x7F]/)?e:Ge(e)}functionbg(e,r,t,a){if(a){t.type="string";returnnf.to_workbook(e,t)}returnnf.to_workbook(r,t)}functionwg(e,r){l();if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)returnwg(newUint8Array(e),r);vart=e,a=[0,0,0,0],n=false;vari=r||{};Kh={};if(i.dateNF)Kh.dateNF=i.dateNF;if(!i.type)i.type=w&&Buffer.isBuffer(e)?"buffer":"base64";if(i.type=="file"){i.type=w?"buffer":"binary";t=j(e)}if(i.type=="string"){n=true;i.type="binary";i.codepage=65001;t=mg(e)}if(i.type=="array"&&typeofUint8Array!=="undefined"&&einstanceofUint8Array&&typeofArrayBuffer!=="undefined"){vars=newArrayBuffer(3),f=newUint8Array(s);f.foo="bar";if(!f.foo){i=oe(i);i.type="array";returnwg(x(t),i)}}switch((a=hg(t,i))[0]){case208:returnug(V.read(t,i),i);case9:returncv(t,i);case60:returnVp(t,i);case73:if(a[1]===68)returnsf(t,i);break;case84:if(a[1]===65&&a[2]===66&&a[3]===76)returntf.to_workbook(t,i);break;case80:returna[1]===75&&a[2]<9&&a[3]<9?dg(t,i):bg(e,t,i,n);case239:returna[3]===60?Vp(t,i):bg(e,t,i,n);case255:if(a[1]===254){returngg(t,i)}break;case0:if(a[1]===0&&a[2]>=2&&a[3]===0)returnff.to_workbook(t,i);break;case3:;case131:;case139:;case140:returnef.to_workbook(t,i);case123:if(a[1]===92&&a[2]===114&&a[3]===116)returnKf.to_workbook(t,i);break;case10:;case13:;case32:returnvg(t,i);}if(a[2]<=12&&a[3]<=31)returnef.to_workbook(t,i);returnbg(e,t,i,n)}functionCg(e,r){vart=r||{};t.type="file";returnwg(e,t)}functionEg(e,r){switch(r.type){case"base64":;case"binary":break;case"buffer":;case"array":r.type="";break;case"file":returnG(r.file,V.write(e,{type:w?"buffer":""}));case"string":thrownewError("'string' output type invalid for '"+r.bookType+"' files");default:thrownewError("Unrecognized type "+r.type);}returnV.write(e,r)}functionkg(e,r){vart=r||{};vara=cg(e,t);varn={};if(t.compression)n.compression="DEFLATE";if(t.password)n.type=w?"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=w?"nodebuffer":"string";break;default:thrownewError("Unrecognized type "+t.type);}vari=a.generate(n);if(t.password&&typeofencrypt_agile!=="undefined")returnEg(encrypt_agile(i,t.password),t);if(t.type==="file")returnG(t.file,i);returnt.type=="string"?Xe(i):i}functionSg(e,r){vart=r||{};vara=hv(e,t);returnEg(a,t)}functionAg(e,r,t){if(!t)t="";vara=t+e;switch(r.type){case"base64":returnb.encode(Ge(a));case"binary":returnGe(a);case"string":returne;case"file":returnG(r.file,a,"utf8");case"buffer":{if(w)returnC(a,"utf8");elsereturnAg(a,{type:"binary"}).split("").map(function(e){returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}function_g(e,r){switch(r.type){case"base64":returnb.encode(e);case"binary":returne;case"string":returne;