le>>>=fe&7;fe-=fe&7;while(fe<32){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}if((le&65535)!==(le>>>16^65535)){e.msg="invalid stored block lengths";t.mode=Q;break}t.length=le&65535;le=0;fe=0;t.mode=N;if(r===d){breake};caseN:t.mode=L;caseL:ue=t.length;if(ue){if(ue>ie){ue=ie}if(ue>se){ue=se}if(ue===0){breake}a.arraySet(re,ee,te,ue,ae);ie-=ue;te+=ue;se-=ue;ae+=ue;t.length-=ue;break}t.mode=F;break;caseM:while(fe<14){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}t.nlen=(le&31)+257;le>>>=5;fe-=5;t.ndist=(le&31)+1;le>>>=5;fe-=5;t.ncode=(le&15)+4;le>>>=4;fe-=4;if(t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols";t.mode=Q;break}t.have=0;t.mode=U;caseU:while(t.have<t.ncode){while(fe<3){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}t.lens[ye[t.have++]]=le&7;le>>>=3;fe-=3}while(t.have<19){t.lens[ye[t.have++]]=0}t.lencode=t.lendyn;t.lenbits=7;Te={bits:t.lenbits};Ce=l(f,t.lens,0,19,t.lencode,0,t.work,Te);t.lenbits=Te.bits;if(Ce){e.msg="invalid code lengths set";t.mode=Q;break}t.have=0;t.mode=H;caseH:while(t.have<t.nlen+t.ndist){for(;;){me=t.lencode[le&(1<<t.lenbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=fe){break}if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}if(Ee<16){le>>>=be;fe-=be;t.lens[t.have++]=Ee}else{if(Ee===16){xe=be+2;while(fe<xe){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}le>>>=be;fe-=be;if(t.have===0){e.msg="invalid bit length repeat";t.mode=Q;break}_e=t.lens[t.have-1];ue=3+(le&3);le>>>=2;fe-=2}elseif(Ee===17){xe=be+3;while(fe<xe){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}le>>>=be;fe-=be;_e=0;ue=3+(le&7);le>>>=3;fe-=3}else{xe=be+7;while(fe<xe){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}le>>>=be;fe-=be;_e=0;ue=11+(le&127);le>>>=7;fe-=7}if(t.have+ue>t.nlen+t.ndist){e.msg="invalid bit length repeat";t.mode=Q;break}while(ue--){t.lens[t.have++]=_e}}}if(t.mode===Q){break}if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block";t.mode=Q;break}t.lenbits=9;Te={bits:t.lenbits};Ce=l(o,t.lens,0,t.nlen,t.lencode,0,t.work,Te);t.lenbits=Te.bits;if(Ce){e.msg="invalid literal/lengths set";t.mode=Q;break}t.distbits=6;t.distcode=t.distdyn;Te={bits:t.distbits};Ce=l(c,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,Te);t.distbits=Te.bits;if(Ce){e.msg="invalid distances set";t.mode=Q;break}t.mode=W;if(r===d){breake};caseW:t.mode=V;caseV:if(ie>=6&&se>=258){e.next_out=ae;e.avail_out=se;e.next_in=te;e.avail_in=ie;t.hold=le;t.bits=fe;s(e,ce);ae=e.next_out;re=e.output;se=e.avail_out;te=e.next_in;ee=e.input;ie=e.avail_in;le=t.hold;fe=t.bits;if(t.mode===F){t.back=-1}break}t.back=0;for(;;){me=t.lencode[le&(1<<t.lenbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=fe){break}if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}if(ge&&(ge&240)===0){ke=be;we=ge;Se=Ee;for(;;){me=t.lencode[Se+((le&(1<<ke+we)-1)>>ke)];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(ke+be<=fe){break}if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}le>>>=ke;fe-=ke;t.back+=ke}le>>>=be;fe-=be;t.back+=be;t.length=Ee;if(ge===0){t.mode=K;break}if(ge&32){t.back=-1;t.mode=F;break}if(ge&64){e.msg="invalid literal/length code";t.mode=Q;break}t.extra=ge&15;t.mode=z;casez:if(t.extra){xe=t.extra;while(fe<xe){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}t.length+=le&(1<<t.extra)-1;le>>>=t.extra;fe-=t.extra;t.back+=t.extra}t.was=t.length;t.mode=X;caseX:for(;;){me=t.distcode[le&(1<<t.distbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=fe){break}if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}if((ge&240)===0){ke=be;we=ge;Se=Ee;for(;;){me=t.distcode[Se+((le&(1<<ke+we)-1)>>ke)];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(ke+be<=fe){break}if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}le>>>=ke;fe-=ke;t.back+=ke}le>>>=be;fe-=be;t.back+=be;if(ge&64){e.msg="invalid distance code";t.mode=Q;break}t.offset=Ee;t.extra=ge&15;t.mode=G;caseG:if(t.extra){xe=t.extra;while(fe<xe){if(ie===0){breake}ie--;le+=ee[te++]<<fe;fe+=8}t.offset+=le&(1<<t.extra)-1;le>>>=t.extra;fe-=t.extra;t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back";t.mode=Q;break}t.mode=j;casej:if(se===0){breake}ue=ce-se;if(t.offset>ue){ue=t.offset-ue;if(ue>t.whave)
}if(u=s.match(/^#,#*,#0/))returny(e,s.replace(/^#,#*,/,""),l);if(u=s.match(/^([0#]+)(\\?-([0#]+))+$/)){o=r(y(e,s.replace(/[\\-]/g,""),l));g=0;returnr(r(s.replace(/\\/g,"")).replace(/[0#]/g,function(e){returng<o.length?o.charAt(g++):e==="0"?"0":""}))}if(s.match(m)){o=y(e,"##########",l);return"("+o.substr(0,3)+") "+o.substr(3,3)+"-"+o.substr(6)}varS="";if(u=s.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)){g=Math.min(u[4].length,7);E=p(k,Math.pow(10,g)-1,false);o=""+w;S=x("n",u[1],E[1]);if(S.charAt(S.length-1)==" ")S=S.substr(0,S.length-1)+"0";o+=S+u[2]+"/"+u[3];S=i(E[2],g);if(S.length<u[4].length)S=b(u[4].substr(u[4].length-S.length))+S;o+=S;returno}if(u=s.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)){g=Math.min(Math.max(u[1].length,u[4].length),7);E=p(k,Math.pow(10,g)-1,true);returnw+(E[0]||(E[1]?"":"0"))+" "+(E[1]?n(E[1],g)+u[2]+"/"+u[3]+i(E[2],g):t(" ",2*g+1+u[2].length+u[3].length))}if(u=s.match(/^[#0?]+$/)){o=""+l;if(s.length<=o.length)returno;returnb(s.substr(0,s.length-o.length))+o}if(u=s.match(/^([#0]+)\.([#0]+)$/)){o=""+l.toFixed(Math.min(u[2].length,10)).replace(/([^0])0+$/,"$1");g=o.indexOf(".");varA=s.indexOf(".")-g,I=s.length-o.length-A;returnb(s.substr(0,A)+o+s.substr(s.length-I))}if(u=s.match(/^00,000\.([#0]*0)$/)){returnl<0?"-"+y(e,s,-l):T(""+l).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(e){return"00,"+(e.length<3?a(0,3-e.length):"")+e})+"."+a(0,u[1].length)}switch(s){case"###,###":;case"##,###":;case"#,###":varR=T(""+k);returnR!=="0"?w+R:"";default:if(s.match(/\.[0#?]*$/))returny(e,s.slice(0,s.lastIndexOf(".")),l)+b(s.slice(s.lastIndexOf(".")));}thrownewError("unsupported format |"+s+"|")}returnfunctionA(e,r,t){return(t|0)===t?y(e,r,t):S(e,r,t)}}();functiony(e){varr=[];vart=false;for(vara=0,n=0;a<e.length;++a)switch(e.charCodeAt(a)){case34:t=!t;break;case95:;case42:;case92:++a;break;case59:r[r.length]=e.substr(n,a-n);n=a+1;}r[r.length]=e.substr(n);if(t===true)thrownewError("Format |"+e+"| unterminated string ");returnr}e._split=y;varA=/\[[HhMmSs]*\]/;functionI(e){varr=0,t="",a="";while(r<e.length){switch(t=e.charAt(r)){case"G":if(c(e,r))r+=6;r++;break;case'"':for(;e.charCodeAt(++r)!==34&&r<e.length;)++r;++r;break;case"\\":r+=2;break;case"_":r+=2;break;case"@":++r;break;case"B":;case"b":if(e.charAt(r+1)==="1"||e.charAt(r+1)==="2")returntrue;case"M":;case"D":;case"Y":;case"H":;case"S":;case"E":;case"m":;case"d":;case"y":;case"h":;case"s":;case"e":;case"g":returntrue;case"A":;case"a":if(e.substr(r,3).toUpperCase()==="A/P")returntrue;if(e.substr(r,5).toUpperCase()==="AM/PM")returntrue;++r;break;case"[":a=t;while(e.charAt(r++)!=="]"&&r<e.length)a+=e.charAt(r);if(a.match(A))returntrue;break;case".":;case"0":;case"#":while(r<e.length&&("0#?.,E+-%".indexOf(t=e.charAt(++r))>-1||t=="\\"&&e.charAt(r+1)=="-"&&"0#".indexOf(e.charAt(r+2))>-1)){}break;case"?":while(e.charAt(++r)===t){}break;case"*":++r;if(e.charAt(r)==" "||e.charAt(r)=="*")++r;break;case"(":;case")":++r;break;case"1":;case"2":;case"3":;case"4":;case"5":;case"6":;case"7":;case"8":;case"9":while(r<e.length&&"0123456789".indexOf(e.charAt(++r))>-1){}break;case" ":++r;break;default:++r;break;}}returnfalse}e.is_date=I;functionR(e,r,t,a){varn=[],i="",s=0,l="",f="t",o,u,h;vard="H";while(s<e.length){switch(l=e.charAt(s)){case"G":if(!c(e,s))thrownewError("unrecognized character "+l+" in "+e);n[n.length]={t:"G",v:"General"};s+=7;break;case'"':for(i="";(h=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(h);n[n.length]={t:"t",v:i};++s;break;case"\\":varv=e.charAt(++s),p=v==="("||v===")"?v:"t";n[n.length]={t:p,v:v};++s;break;case"_":n[n.length]={t:"t",v:" "};s+=2;break;case"@":n[n.length]={t:"T",v:r};++s;break;case"B":;case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(o==null){o=m(r,t,e.charAt(s+1)==="2");if(o==null)return""}n[n.length]={t:"X",v:e.substr(s,2)};f=l;s+=2;break};case"M":;case"D":;case"Y":;case"H":;case"S":;case"E":l=l.toLowerCase();case"m":;case"d":;case"y":;case"h":;case"s":;case"e":;case"g":if(r<0)return"";if(o==null){o=m(r,t);if(o==null)return""}i=l;while(++s<e.length&&e.charAt(s).toLowerCase(
if(s===o.length){if(o.indexOf("_")>0)o=o.slice(0,o.indexOf("_"));t[o]=l}else{varh=(s===5&&o.slice(0,5)==="xmlns"?"xmlns":"")+o.slice(s+1);if(t[h]&&o.slice(s-3,s)=="ext")continue;t[h]=l}}returnt}functionTe(e){returne.replace(Ce,"<$1")}varxe={""":'"',"'":"'",">":">","<":"<","&":"&"};varye=G(xe);varAe=function(){vare=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/g,r=/_x([\da-fA-F]{4})_/g;returnfunctiont(a){varn=a+"",i=n.indexOf("<![CDATA[");if(i==-1)returnn.replace(e,function(e,r){returnxe[e]||String.fromCharCode(parseInt(r,e.indexOf("x")>-1?16:10))||e}).replace(r,function(e,r){returnString.fromCharCode(parseInt(r,16))});vars=n.indexOf("]]>");returnt(n.slice(0,i))+n.slice(i+9,s)+t(n.slice(s+3))}}();varIe=/[&<>'"]/g,Re=/[\u0000-\u0008\u000b-\u001f]/g;functionDe(e){varr=e+"";returnr.replace(Ie,function(e){returnye[e]}).replace(Re,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}functionFe(e){returnDe(e).replace(/ /g,"_x0020_")}varOe=/[\u0000-\u001f]/g;functionPe(e){varr=e+"";returnr.replace(Ie,function(e){returnye[e]}).replace(Oe,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}functionNe(e){varr=e+"";returnr.replace(Ie,function(e){returnye[e]}).replace(Oe,function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"})}varLe=function(){vare=/&#(\d+);/g;functionr(e,r){returnString.fromCharCode(parseInt(r,10))}returnfunctiont(a){returna.replace(e,r)}}();varMe=function(){returnfunctione(r){returnr.replace(/(\r\n|[\r\n])/g," ")}}();functionUe(e){switch(e){case1:;casetrue:;case"1":;case"true":;case"TRUE":returntrue;default:returnfalse;}}varHe=functionCm(e){varr="",t=0,a=0,n=0,i=0,s=0,l=0;while(t<e.length){a=e.charCodeAt(t++);if(a<128){r+=String.fromCharCode(a);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++);l=((a&7)<<18|(n&63)<<12|(i&63)<<6|s&63)-65536;r+=String.fromCharCode(55296+(l>>>10&1023));r+=String.fromCharCode(56320+(l&1023))}returnr};varWe=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){varVe=functionBm(e){varr=newBuffer(2*e.length),t,a,n=1,i=0,s=0,l;for(a=0;a<e.length;a+=n){n=1;if((l=e.charCodeAt(a))<128)t=l;elseif(l<224){t=(l&31)*64+(e.charCodeAt(a+1)&63);n=2}elseif(l<240){t=(l&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(l&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")};varze="foo bar bazâð£";if(He(ze)==Ve(ze))He=Ve;varXe=functionTm(e){returnBuffer(e,"binary").toString("utf8")};if(He(ze)==Xe(ze))He=Xe;We=function(e){returnnewBuffer(e,"utf8").toString("binary")}}varGe=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||"")}}();varje=function(){vare=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[newRegExp("&"+e[0]+";","g"),e[1]]});returnfunctionr(t){vara=t.trim().replace(/\s+/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]);return
}}functionSa(e){varr=wa();if(!e||!e.match)returnr;vart={};(e.match(Se)||[]).forEach(function(e){vara=Be(e);switch(a[0].replace(_e,"<")){case"<?xml":break;case"<Types":r.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":t[a.Extension]=a.ContentType;break;case"<Override":if(r[ga[a.ContentType]]!==undefined)r[ga[a.ContentType]].push(a.PartName);break;}});if(r.xmlns!==ar.CT)thrownewError("Unknown Namespace: "+r.xmlns);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}var_a=er("Types",null,{xmlns:ar.CT,"xmlns:xsd":ar.xsd,"xmlns:xsi":ar.xsi});varCa=[["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["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",ka.rels[0]]].map(function(e){returner("Default",null,{Extension:e[0],ContentType:e[1]})});functionBa(e,r){vart=[],a;t[t.length]=ke;t[t.length]=_a;t=t.concat(Ca);varn=function(n){if(e[n]&&e[n].length>0){a=e[n][0];t[t.length]=er("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:Ea[n][r.bookType||"xlsx"]})}};vari=function(a){(e[a]||[]).forEach(function(e){t[t.length]=er("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:Ea[a][r.bookType||"xlsx"]})})};vars=function(r){(e[r]||[]).forEach(function(e){t[t.length]=er("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:ka[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("")}varTa={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",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};functionxa(e){varr=e.lastIndexOf("/");returne.slice(0,r+1)+"_rels/"+e.slice(r+1)+".rels"}functionya(e,r){if(!e)returne;if(r.charAt(0)!=="/"){r="/"+r}vart={};vara={};(e.match(Se)||[]).forEach(function(e){varn=Be(e);if(n[0]==="<Relationship"){vari={};i.Type=n.Type;i.Target=n.Target;i.Id=n.Id;i.TargetMode=n.TargetMode;vars=n.TargetMode==="External"?n.Target:Ee(n.Target,r);t[s]=i;a[n.Id]=i}});t["!id"]=a;returnt}ar.RELS="http://schemas.openxmlformats.org/package/2006/relationships";varAa=er("Relationships",null,{xmlns:ar.RELS});functionIa(e){varr=[ke,Aa];z(e["!id"]).forEach(function(t){r[r.length]=er("Relationship",null,e["!id"][t])});if(r.length>2){r[r.length]="</Relationships>";r[1]=r[1].replace("/>",">")}returnr.join("")}functionRa(e,r,t,a,n){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(n.Type==Ta.HLINK)n.TargetMode="External";if(e["!id"][n.Id])thrownewError("Cannot rewrite rId "+r);e["!id"][n.Id]=n;e[("/"+n.Target).replace("//","/")]=n;returnr}varDa="application/vnd.oasis.opendocument.spreadsheet";functionFa(e,r){vart=_v(e);vara;varn;while(a=Cv.exec(t))switch(a[3]){case"manifest":break;case"file-entry":n=Be(a[0],false);if(n.path=="/"&&n.type!==Da)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;}}functionOa(e){varr=[ke];r.push('<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">\n');r.push('<manifest:file-entrymanifest:full-path="/"manifest:version="1.2"manifest
f=e._R(2);if(t.biff==5)e.l+=2;e.l+=4}varo=On(e,s,t);if(n&32)o=qi[o.charCodeAt(0)];varc=a-e.l;if(t&&t.biff==2)--c;varu=a==e.l||l===0?[]:pu(e,c,t,l);return{chKey:i,Name:o,itab:f,rgce:u}}functionrs(e,r,t){if(t.biff<8)returnts(e,r,t);vara=[],n=e.l+r,i=e._R(t.biff>8?4:2);while(i--!==0)a.push(Qn(e,t.biff>8?12:6,t));if(e.l!=n)thrownewError("Bad ExternSheet: "+e.l+" != "+n);returna}functionts(e,r,t){if(e[e.l+1]==3)e[e.l]++;vara=Dn(e,r,t);returna.charCodeAt(0)==3?a.slice(1):a}functionas(e,r,t){if(t.biff<8){e.l+=r;return}vara=e._R(2);varn=e._R(2);vari=On(e,a,t);vars=On(e,n,t);return[i,s]}functionns(e,r,t){vara=ti(e,6);e.l++;varn=e._R(1);r-=8;return[mu(e,r,t),n,a]}functionis(e,r,t){vara=ai(e,6);switch(t.biff){case2:e.l++;r-=7;break;case3:;case4:e.l+=2;r-=8;break;default:e.l+=6;r-=12;}return[a,du(e,r,t,a)]}functionss(e){varr=e._R(4)!==0;vart=e._R(4)!==0;vara=e._R(4);return[r,t,a]}functionls(e,r,t){if(t.biff<8)return;vara=e._R(2),n=e._R(2);vari=e._R(2),s=e._R(2);varl=Nn(e,0,t);if(t.biff<8)e._R(1);return[{r:a,c:n},l,s,i]}functionfs(e,r,t){returnls(e,r,t)}functionos(e,r){vart=[];vara=e._R(2);while(a--)t.push(ei(e,r));returnt}functioncs(e){varr=Vr(2+e.length*8);r._W(2,e.length);for(vart=0;t<e.length;++t)ri(e[t],r);returnr}functionus(e,r,t){if(t&&t.biff<8)returnds(e,r,t);vara=ni(e,22);varn=oi(e,r-22,a[1]);return{cmo:a,ft:n}}varhs=[];hs[8]=function(e,r){vart=e.l+r;e.l+=10;vara=e._R(2);e.l+=4;e.l+=2;e.l+=2;e.l+=2;e.l+=4;varn=e._R(1);e.l+=n;e.l=t;return{fmt:a}};functionds(e,r,t){e.l+=4;vara=e._R(2);varn=e._R(2);vari=e._R(2);e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=2;e.l+=6;r-=36;vars=[];s.push((hs[a]||Wr)(e,r,t));return{cmo:[n,a,i],ft:s}}functionvs(e,r,t){vara=e.l;varn="";try{e.l+=4;vari=(t.lastobj||{cmo:[0,0]}).cmo[1];vars;if([0,5,7,11,12,14].indexOf(i)==-1)e.l+=6;elses=Mn(e,6,t);varl=e._R(2);e._R(2);xn(e,2);varf=e._R(2);e.l+=f;for(varo=1;o<e.lens.length-1;++o){if(e.l-a!=e.lens[o])thrownewError("TxO: bad continue record");varc=e[e.l];varu=On(e,e.lens[o+1]-e.lens[o]-1);n+=u;if(n.length>=(c?l:2*l))break}if(n.length!==l&&n.length!==l*2){thrownewError("cchText: "+l+" != "+n.length)}e.l=a+r;return{t:n}}catch(h){e.l=a+r;return{t:n}}}functionps(e,r){vart=ei(e,8);e.l+=16;vara=zn(e,r-24);return[t,a]}functionms(e){varr=Vr(24);vart=lt(e[0]);r._W(2,t.r);r._W(2,t.r);r._W(2,t.c);r._W(2,t.c);vara="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" ");for(varn=0;n<16;++n)r._W(1,parseInt(a[n],16));returnT([r,Xn(e[1])])}functionbs(e,r){e._R(2);vart=ei(e,8);vara=e._R((r-10)/2,"dbcs-cont");a=a.replace(x,"");return[t,a]}functiongs(e){varr=e[1].Tooltip;vart=Vr(10+2*(r.length+1));t._W(2,2048);vara=lt(e[0]);t._W(2,a.r);t._W(2,a.r);t._W(2,a.c);t._W(2,a.c);for(varn=0;n<r.length;++n)t._W(2,r.charCodeAt(n));t._W(2,0);returnt}functionEs(e){varr=[0,0],t;t=e._R(2);r[0]=va[t]||t;t=e._R(2);r[1]=va[t]||t;returnr}functionks(e){if(!e)e=Vr(4);e._W(2,1);e._W(2,1);returne}functionws(e){varr=e._R(2);vart=[];while(r-->0)t.push(jn(e,8));returnt}functionSs(e){varr=e._R(2);vart=[];while(r-->0)t.push(jn(e,8));returnt}function_s(e){e.l+=2;varr={cxfs:0,crc:0};r.cxfs=e._R(2);r.crc=e._R(4);returnr}functionCs(e,r,t){if(!t.cellStyles)returnWr(e,r);vara=t&&t.biff>=12?4:2;varn=e._R(a);vari=e._R(a);vars=e._R(a);varl=e._R(a);varf=e._R(2);if(a==2)e.l+=2;return{s:n,e:i,w:s,ixfe:l,flags:f}}functionBs(e,r){vart={};if(r<32)returnt;e.l+=16;t.header=Wt(e,8);t.footer=Wt(e,8);e.l+=2;returnt}functionTs(e,r,t){vara={area:false};if(t.biff!=5){e.l+=r;returna}varn=e._R(1);e.l+=3;if(n&16)a.area=true;returna}functionxs(e){varr=Vr(2*e);for(vart=0;t<e;++t)r._W(2,t+1);returnr}varys=Kn;varAs=An;varIs=Pn;functionRs(e){varr=e._R(2);vart=e._R(2);vara=e._R(4);varn={fmt:r,env:t,len:a,data:e.slice(e.l,e.l+a)};e.l+=a;returnn}functionDs(e,r,t){vara=Kn(e,6);++e.l;varn=Nn(e,r-7,t);a.t="str";a.val=n;returna}functionFs(e){varr=Kn(e,6);++e.l;vart=Wt(e,8);r.t="n";r.val=t;returnr}functionOs(e,r,t){vara=Vr(15);qv(a,e,r);a._W(8,t,"f");returna}functionPs(e){
r.name=e._R(0,"lpp4");r.R=cl(e,4);r.U=cl(e,4);r.W=cl(e,4);returnr}functionml(e){varr=pl(e);r.ename=e._R(0,"8lpp4");r.blksz=e._R(4);r.cmode=e._R(4);if(e._R(4)!=4)thrownewError("Bad !Primary record");returnr}functionbl(e,r){vart=e.l+r;vara={};a.Flags=e._R(4)&63;e.l+=4;a.AlgID=e._R(4);varn=false;switch(a.AlgID){case26126:;case26127:;case26128:n=a.Flags==36;break;case26625:n=a.Flags==4;break;case0:n=a.Flags==16||a.Flags==4||a.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+a.AlgID;}if(!n)thrownewError("Encryption Flags/AlgID mismatch");a.AlgIDHash=e._R(4);a.KeySize=e._R(4);a.ProviderType=e._R(4);e.l+=8;a.CSPName=e._R(t-e.l>>1,"utf16le");e.l=t;returna}functiongl(e,r){vart={},a=e.l+r;e.l+=4;t.Salt=e.slice(e.l,e.l+16);e.l+=16;t.Verifier=e.slice(e.l,e.l+16);e.l+=16;e._R(4);t.VerifierHash=e.slice(e.l,a);e.l=a;returnt}functionEl(e){varr=cl(e);switch(r.Minor){case2:return[r.Minor,kl(e,r)];case3:return[r.Minor,wl(e,r)];case4:return[r.Minor,Sl(e,r)];}thrownewError("ECMA-376 Encrypted file unrecognized Version: "+r.Minor)}functionkl(e){varr=e._R(4);if((r&63)!=36)thrownewError("EncryptionInfo mismatch");vart=e._R(4);vara=bl(e,t);varn=gl(e,e.length-e.l);return{t:"Std",h:a,v:n}}functionwl(){thrownewError("File is password-protected: ECMA-376 Extensible")}functionSl(e){varr=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;vart=e._R(e.length-e.l,"utf8");vara={};t.replace(Se,functionn(e){vart=Be(e);switch(Te(t[0])){case"<?xml":break;case"<encryption":;case"</encryption>":break;case"<keyData":r.forEach(function(e){a[e]=t[e]});break;case"<dataIntegrity":a.encryptedHmacKey=t.encryptedHmacKey;a.encryptedHmacValue=t.encryptedHmacValue;break;case"<keyEncryptors>":;case"<keyEncryptors":a.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":a.uri=t.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":a.encs.push(t);break;default:throwt[0];}});returna}function_l(e,r){vart={};vara=t.EncryptionVersionInfo=cl(e,4);r-=4;if(a.Minor!=2)thrownewError("unrecognized minor version code: "+a.Minor);if(a.Major>4||a.Major<2)thrownewError("unrecognized major version code: "+a.Major);t.Flags=e._R(4);r-=4;varn=e._R(4);r-=4;t.EncryptionHeader=bl(e,n);r-=n;t.EncryptionVerifier=gl(e,r);returnt}functionCl(e){varr={};vart=r.EncryptionVersionInfo=cl(e,4);if(t.Major!=1||t.Minor!=1)throw"unrecognized version code "+t.Major+" : "+t.Minor;r.Salt=e._R(16);r.EncryptedVerifier=e._R(16);r.EncryptedVerifierHash=e._R(16);returnr}functionBl(e){varr=0,t;vara=ol(e);varn=a.length+1,i,s;varl,f,o;t=k(n);t[0]=a.length;for(i=1;i!=n;++i)t[i]=a[i-1];for(i=n-1;i>=0;--i){s=t[i];l=(r&16384)===0?0:1;f=r<<1&32767;o=l|f;r=o^s}returnr^52811}varTl=function(){vare=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0];varr=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163];vart=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628];vara=function(e){return(e/2|e*128)&255};varn=function(e,r){returna(e^r)};vari=function(e){vara=r[e.length-1];varn=104;for(vari=e.length-1;i>=0;--i){vars=e[i];for(varl=0;l!=7;++l){if(s&64)a^=t[n];s*=2;--n}}returna};returnfunction(r){vart=ol(r);vara=i(t);vars=t.length;varl=k(16);for(varf=0;f!=16;++f)l[f]=0;varo,c,u;if((s&1)===1){o=a>>8;l[s]=n(e[0],o);--s;o=a&255;c=t[t.length-1];l[s]=n(c,o)}while(s>0){--s;o=a>>8;l[s]=n(t[s],o);--s;o=a&255;l[s]=n(t[s],o)}s=15;u=15-t.length;while(u>0){o=a>>8;l[s]=n(e[u],o);--s;--u;o=a&
})}functionlp(e,r){vart=Vr(19);t._W(4,2151);t._W(4,0);t._W(4,0);t._W(2,3);t._W(1,1);t._W(4,0);Jv(e,"FeatHdr",t);t=Vr(39);t._W(4,2152);t._W(4,0);t._W(4,0);t._W(2,3);t._W(1,0);t._W(4,0);t._W(2,1);t._W(4,4);t._W(2,0);ri(ut(r["!ref"]),t);t._W(4,4);Jv(e,"Feat",t)}functionfp(e,r){for(vart=0;t<16;++t)Jv(e,"XF",zi({numFmtId:0,style:true},0,r));r.cellXfs.forEach(function(t){Jv(e,"XF",zi(t,0,r))})}functionop(e,r){for(vart=0;t<r["!links"].length;++t){vara=r["!links"][t];Jv(e,"HLink",ms(a));if(a[1].Tooltip)Jv(e,"HLinkTooltip",gs(a))}deleter["!links"]}functioncp(e,r,t,a,n){vari=16+Lu(n.cellXfs,r,n);if(r.v!=null)switch(r.t){case"d":;case"n":vars=r.t=="d"?Q(te(r.v)):r.v;Jv(e,"Number",$i(t,a,s,i,n));return;case"b":;case"e":Jv(e,517,Ki(t,a,r.v,i,n,r.t));return;case"s":;case"str":Jv(e,"Label",Di(t,a,r.v,i,n));return;}Jv(e,"Blank",Yn(t,a,i))}functionup(e,r,t){vara=Xr();varn=t.SheetNames[e],i=t.Sheets[n]||{};vars=(t||{}).Workbook||{};varl=(s.Sheets||[])[e]||{};varf=Array.isArray(i);varo,c="",u=[];varh=ut(i["!ref"]||"A1");vard=r.biff==8;Jv(a,2057,ui(t,16,r));Jv(a,"CalcMode",yn(1));Jv(a,"CalcCount",yn(100));Jv(a,"CalcRefMode",Tn(true));Jv(a,"CalcIter",Tn(false));Jv(a,"CalcDelta",Vt(.001));Jv(a,"CalcSaveRecalc",Tn(true));Jv(a,"PrintRowCol",Tn(false));Jv(a,"PrintGrid",Tn(false));Jv(a,"GridSet",yn(1));Jv(a,"Guts",Gi([0,0]));Jv(a,"HCenter",Tn(false));Jv(a,"VCenter",Tn(false));Jv(a,"Dimensions",Li(h,r));if(d)i["!links"]=[];for(varv=h.s.r;v<=h.e.r;++v){c=qr(v);for(varp=h.s.c;p<=h.e.c;++p){if(v===h.s.r)u[p]=at(p);o=u[p]+c;varm=f?(i[v]||[])[p]:i[o];if(!m)continue;cp(a,m,v,p,r);if(d&&m.l)i["!links"].push([o,m.l])}}varb=l.CodeName||l.name||n;if(d&&s.Views)Jv(a,"Window2",xi(s.Views[0]));if(d&&(i["!merges"]||[]).length)Jv(a,"MergeCells",cs(i["!merges"]));if(d)op(a,i);Jv(a,"CodeName",Ln(b,r));if(d)lp(a,i);Jv(a,"EOF");returna.end()}functionhp(e,r,t){vara=Xr();varn=(e||{}).Workbook||{};vari=n.Sheets||[];vars=n.WBProps||{};varl=t.biff==8,f=t.biff==5;Jv(a,2057,ui(e,5,t));if(t.bookType=="xla")Jv(a,"Addin");Jv(a,"InterfaceHdr",l?yn(1200):null);Jv(a,"Mms",_n(2));if(f)Jv(a,"ToolbarHdr");if(f)Jv(a,"ToolbarEnd");Jv(a,"InterfaceEnd");Jv(a,"WriteAccess",vi("SheetJS",t));Jv(a,"CodePage",yn(l?1200:1252));if(l)Jv(a,"DSF",yn(0));if(l)Jv(a,"Excel9File");Jv(a,"RRTabId",xs(e.SheetNames.length));if(l&&e.vbaraw){Jv(a,"ObProj");varo=s.CodeName||"ThisWorkbook";Jv(a,"CodeName",Ln(o,t))}Jv(a,"BuiltInFnGroupCount",yn(17));Jv(a,"WinProtect",Tn(false));Jv(a,"Protect",Tn(false));Jv(a,"Password",yn(0));if(l)Jv(a,"Prot4Rev",Tn(false));if(l)Jv(a,"Prot4RevPass",yn(0));Jv(a,"Window1",Bi(t));Jv(a,"Backup",Tn(false));Jv(a,"HideObj",yn(0));Jv(a,"Date1904",Tn(yd(e)=="true"));Jv(a,"CalcPrecision",Tn(true));if(l)Jv(a,"RefreshAll",Tn(false));Jv(a,"BookBool",yn(0));ip(a,e,t);sp(a,e.SSF,t);fp(a,t);if(l)Jv(a,"UsesELFs",Tn(false));varc=a.end();varu=Xr();if(l)Jv(u,"Country",ks());Jv(u,"EOF");varh=u.end();vard=Xr();varv=0,p=0;for(p=0;p<e.SheetNames.length;++p)v+=(l?12:11)+(l?2:1)*e.SheetNames[p].length;varm=c.length+v+h.length;for(p=0;p<e.SheetNames.length;++p){varb=i[p]||{};Jv(d,"BoundSheet8",bi({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);varE=[];if(c.length)E.push(c);if(g.length)E.push(g);if(h.length)E.push(h);returnlr([E])}functiondp(e,r){vart=r||{};vara=[];if(e&&!e.SSF){e.SSF=A.get_table()}if(e&&e.SSF){I(A);A.load_table(e.SSF);t.revssf=j(e.SSF);t.revssf[e.SSF[65535]]=0;t.ssf=e.SSF}t.cellXfs=[];t.Strings=[];t.Strings.Count=0;t.Strings.Unique=0;Lu(t.cellXfs,{},{revssf:{General:0}});for(varn=0;n<e.SheetNames.length;++n)a[a.length]=up(n,t,e);a.unshift(hp(e,a,t));returnlr([a])}functionvp(e,r){vart=r||{};switch(t.biff||2){case8:;case5:returndp(e,r);case4:;case3:;case2:returnnp(e,r);}thrownewError("invalid type "+t.bookType+" for BIFF")}varpp=function(){functione(e,r){vart=r||{};if(m!=null&&t.dense==null)t.dense=m;vara=t.dense?[]:{};varn=e.match(/<table/i);if(!n)thrownewError("Invalid HTML: could not find <table>");vari=e.match(/<\/table/i);vars
;}if(u){vard=u["!comments"];if(d&&d.length>0){varv="xl/comments"+l+"."+t;i.file(v,uv(d,v,r));n.comments.push(v);Ra(c,-1,"../comments"+l+"."+t,Ta.CMNT)}if(u["!legacy"]){i.file("xl/drawings/vmlDrawing"+l+".vml",co(l,u["!comments"]))}deleteu["!comments"];deleteu["!legacy"]}if(c["!id"].rId1)i.file(xa(s),Ia(c))}if(r.Strings!=null&&r.Strings.length>0){s="xl/sharedStrings."+t;i.file(s,cv(r.Strings,s,r));n.strs.push(s);Ra(r.wbrels,-1,"sharedStrings."+t,Ta.SST)}s="xl/theme/theme1.xml";i.file(s,Yf(e.Themes,r));n.themes.push(s);Ra(r.wbrels,-1,"theme/theme1.xml",Ta.THEME);s="xl/styles."+t;i.file(s,ov(e,s,r));n.styles.push(s);Ra(r.wbrels,-1,"styles."+t,Ta.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";i.file(s,e.vbaraw);n.vba.push(s);Ra(r.wbrels,-1,"vbaProject.bin",Ta.VBA)}i.file("[Content_Types].xml",Ba(n,r));i.file("_rels/.rels",Ia(r.rels));i.file("xl/_rels/workbook."+t+".rels",Ia(r.wbrels));deleter.revssf;deleter.ssf;returni}functionGp(e,r){vart="";switch((r||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3]];case"base64":t=g.decode(e.slice(0,24));break;case"binary":t=e;break;case"array":return[e[0],e[1],e[2],e[3]];default:thrownewError("Unrecognized type "+(r&&r.type||"undefined"));}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]}functionjp(e,r){if(L.find(e,"EncryptedPackage"))returnzp(e,r);returnjv(e,r)}functionKp(e,r){vart,a=e;varn=r||{};if(!n.type)n.type=E&&Buffer.isBuffer(e)?"buffer":"base64";switch(n.type){case"base64":t=newge(a,{base64:true});break;case"binary":;case"array":t=newge(a,{base64:false});break;case"buffer":t=newge(a);break;default:thrownewError("Unrecognized type "+n.type);}returnVp(t,n)}functionYp(e,r){vart=0;e:while(t<e.length)switch(e.charCodeAt(t)){case10:;case13:;case32:++t;break;case60:returnTv(e.slice(t),r);default:breake;}returnXs.to_workbook(e,r)}function$p(e,r){vart="",a=Gp(e,r);switch(r.type){case"base64":t=g.decode(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=ae(e);break;default:thrownewError("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=He(t);returnYp(t,r)}functionZp(e,r){vart=e;if(r.type=="base64")t=g.decode(t);t=cptable.utils.decode(1200,t.slice(2),"str");r.type="binary";returnYp(t,r)}functionQp(e){return!e.match(/[^\x00-\x7F]/)?e:We(e)}functionJp(e,r,t,a){if(a){t.type="string";returnXs.to_workbook(e,t)}returnXs.to_workbook(r,t)}functionqp(e,r){c();if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)returnqp(newUint8Array(e),r);vart=e,a=[0,0,0,0],n=false;vari=r||{};Fu={};if(i.dateNF)Fu.dateNF=i.dateNF;if(!i.type)i.type=E&&Buffer.isBuffer(e)?"buffer":"base64";if(i.type=="file"){i.type=E?"buffer":"binary";t=V(e)}if(i.type=="string"){n=true;i.type="binary";t=Qp(e)}if(i.type=="array"&&typeofUint8Array!=="undefined"&&einstanceofUint8Array&&typeofArrayBuffer!=="undefined"){vars=newArrayBuffer(3),l=newUint8Array(s);l.foo="bar";if(!l.foo){i=ne(i);i.type="array";returnqp(B(t),i)}}switch((a=Gp(t,i))[0]){case208:returnjp(L.read(t,i),i);case9:returnjv(t,i);case60:returnTv(t,i);case73:if(a[1]===68)returnGs(t,i);break;case84:if(a[1]===65&&a[2]===66&&a[3]===76)returnVs.to_workbook(t,i);break;case80:returna[1]===75&&a[2]<9&&a[3]<9?Kp(t,i):Jp(e,t,i,n);case239:returna[3]===60?Tv(t,i):Jp(e,t,i,n);case255:if(a[1]===254){returnZp(t,i)}break;case0:if(a[1]===0&&a[2]>=2&&a[3]===0)returnjs.to_workbook(t,i);break;case3:;case131:;case139:;case140:returnHs.to_workbook(t,i);case123:if(a[1]===92&&a[2]===114&&a[3]===116)returnDl.to_workbook(t,i);break;case10:;case13:;case32:return$p(t,i);}if(a[2]<=12&&a[3]<=31)returnHs.to_workbook(t,i);returnJp(e,t,i,n)}functionem(e,r){vart=r||{};t.type="file";returnqp(e,t)}functionrm(e,r){vart=r||{};vara=Xp(e,t);varn={};if(t.compression)n.compression="DEFLATE";switch(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=E?"nodebuffer":"string";break;defaul