fe>>>=le&7;le-=le&7;while(le<32){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}if((fe&65535)!==(fe>>>16^65535)){e.msg="invalid stored block lengths";t.mode=Q;break}t.length=fe&65535;fe=0;le=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=D;break;caseM:while(le<14){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}t.nlen=(fe&31)+257;fe>>>=5;le-=5;t.ndist=(fe&31)+1;fe>>>=5;le-=5;t.ncode=(fe&15)+4;fe>>>=4;le-=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(le<3){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}t.lens[ye[t.have++]]=fe&7;fe>>>=3;le-=3}while(t.have<19){t.lens[ye[t.have++]]=0}t.lencode=t.lendyn;t.lenbits=7;Te={bits:t.lenbits};Ce=f(l,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[fe&(1<<t.lenbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=le){break}if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}if(Ee<16){fe>>>=be;le-=be;t.lens[t.have++]=Ee}else{if(Ee===16){xe=be+2;while(le<xe){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}fe>>>=be;le-=be;if(t.have===0){e.msg="invalid bit length repeat";t.mode=Q;break}_e=t.lens[t.have-1];ue=3+(fe&3);fe>>>=2;le-=2}elseif(Ee===17){xe=be+3;while(le<xe){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}fe>>>=be;le-=be;_e=0;ue=3+(fe&7);fe>>>=3;le-=3}else{xe=be+7;while(le<xe){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}fe>>>=be;le-=be;_e=0;ue=11+(fe&127);fe>>>=7;le-=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=f(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=f(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=fe;t.bits=le;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;fe=t.hold;le=t.bits;if(t.mode===D){t.back=-1}break}t.back=0;for(;;){me=t.lencode[fe&(1<<t.lenbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=le){break}if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}if(ge&&(ge&240)===0){we=be;ke=ge;Se=Ee;for(;;){me=t.lencode[Se+((fe&(1<<we+ke)-1)>>we)];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(we+be<=le){break}if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}fe>>>=we;le-=we;t.back+=we}fe>>>=be;le-=be;t.back+=be;t.length=Ee;if(ge===0){t.mode=K;break}if(ge&32){t.back=-1;t.mode=D;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(le<xe){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}t.length+=fe&(1<<t.extra)-1;fe>>>=t.extra;le-=t.extra;t.back+=t.extra}t.was=t.length;t.mode=X;caseX:for(;;){me=t.distcode[fe&(1<<t.distbits)-1];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(be<=le){break}if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}if((ge&240)===0){we=be;ke=ge;Se=Ee;for(;;){me=t.distcode[Se+((fe&(1<<we+ke)-1)>>we)];be=me>>>24;ge=me>>>16&255;Ee=me&65535;if(we+be<=le){break}if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}fe>>>=we;le-=we;t.back+=we}fe>>>=be;le-=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(le<xe){if(ie===0){breake}ie--;fe+=ee[te++]<<le;le+=8}t.offset+=fe&(1<<t.extra)-1;fe>>>=t.extra;le-=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(/^#,#*,/,""),f);if(u=s.match(/^([0#]+)(\\?-([0#]+))+$/)){o=r(y(e,s.replace(/[\\-]/g,""),f));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,"##########",f);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(w,Math.pow(10,g)-1,false);o=""+k;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(w,Math.pow(10,g)-1,true);returnk+(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=""+f;if(s.length<=o.length)returno;returnb(s.substr(0,s.length-o.length))+o}if(u=s.match(/^([#0]+)\.([#0]+)$/)){o=""+f.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)$/)){returnf<0?"-"+y(e,s,-f):T(""+f).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(""+w);returnR!=="0"?k+R:"";default:if(s.match(/\.[0#?]*$/))returny(e,s.slice(0,s.lastIndexOf(".")),f)+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,f="",l="t",o,u,h;vard="H";while(s<e.length){switch(f=e.charAt(s)){case"G":if(!c(e,s))thrownewError("unrecognized character "+f+" 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)};l=f;s+=2;break};case"M":;case"D":;case"Y":;case"H":;case"S":;case"E":f=f.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=f;while(++s<e.length&&e.charAt(s).toLowerCase(
u=(a=c.charCodeAt(n+1))==34||a==39?1:0;f=c.slice(n+1+u,c.length-u);for(s=0;s!=o.length;++s)if(o.charCodeAt(s)===58)break;if(s===o.length){if(o.indexOf("_")>0)o=o.slice(0,o.indexOf("_"));t[o]=f}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]=f}}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;functionFe(e){varr=e+"";returnr.replace(Ie,function(e){returnye[e]}).replace(Re,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}functionDe(e){returnFe(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=functionBm(e){varr="",t=0,a=0,n=0,i=0,s=0,f=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++);f=((a&7)<<18|(n&63)<<12|(i&63)<<6|s&63)-65536;r+=String.fromCharCode(55296+(f>>>10&1023));r+=String.fromCharCode(56320+(f&1023))}returnr};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=functionTm(e){varr=newBuffer(2*e.length),t,a,n=1,i=0,s=0,f;for(a=0;a<e.length;a+=n){n=1;if((f=e.charCodeAt(a))<128)t=f;elseif(f<224){t=(f&31)*64+(e.charCodeAt(a+1)&63);n=2}elseif(f<240){t=(f&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(f&7)*262144+(e.charCodeAt(a+1)&63)*4096+(e.charCodeAt(a+2)&63)*64+(e.charCodeAt(a+3)&63);t-=65536;s=55296+(t>>>10&1023);t=56320+(t&1023)}if(s!==0){r[i++]=s&255;r[i++]=s>>>8;s=0}r[i++]=t%256;r[i++]=t>>>8}returnr.slice(0,i).toString("ucs2")};varze="foo bar bazâð£";if(He(ze)==Ve(ze))He=Ve;varXe=functionxm(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," ").r
links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],TODO:[],xmlns:""}}functionSa(e){varr=ka();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",wa.rels[0]]].map(function(e){returner("Default",null,{Extension:e[0],ContentType:e[1]})});functionBa(e,r){vart=[],a;t[t.length]=we;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:wa[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=[we,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}varFa="application/vnd.oasis.opendocument.spreadsheet";functionDa(e,r){vart=Cv(e);vara;varn;while(a=Bv.exec(t))switch(a[3]){case"manifest":break;case"file-entry":n=Be(a[0],false);if(n.path=="/"&&n.type!==Fa)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=[we];r.push('<manifest:manifestxmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.
vari=e._R(1);vars=e._R(1);varf=e._R(t&&t.biff==2?1:2);varl=0;if(!t||t.biff>=5){if(t.biff!=5)e.l+=2;l=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||f===0?[]:pu(e,c,t,f);return{chKey:i,Name:o,itab:l,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=Fn(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]}functionfs(e,r,t){if(t.biff<8)return;vara=e._R(2),n=e._R(2);vari=e._R(2),s=e._R(2);varf=Nn(e,0,t);if(t.biff<8)e._R(1);return[{r:a,c:n},f,s,i]}functionls(e,r,t){returnfs(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);varf=e._R(2);e._R(2);xn(e,2);varl=e._R(2);e.l+=l;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?f:2*f))break}if(n.length!==f&&n.length!==f*2){thrownewError("cchText: "+f+" != "+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=ft(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=ft(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}functionws(e){if(!e)e=Vr(4);e._W(2,1);e._W(2,1);returne}functionks(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);varf=e._R(a);varl=e._R(2);if(a==2)e.l+=2;return{s:n,e:i,w:s,ixfe:f,flags:l}}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}functionFs(e,r,t){vara=Kn(e,6);++e.l;varn=Nn(e,r-7,t);a.t="str";a.val=n;returna}functionDs(e){varr=Kn(e,6);++e.l;vart=Wt(e,8);r.
varr=e._R(4);vart=e.l+r-4;vara={};varn=e._R(4);vari=[];while(n-->0)i.push({t:e._R(4),v:e._R(0,"lpp4")});a.name=e._R(0,"lpp4");a.comps=i;if(e.l!=t)thrownewError("Bad DataSpaceMapEntry: "+e.l+" != "+t);returna}functionvf(e){varr=[];e.l+=4;vart=e._R(4);while(t-->0)r.push(df(e));returnr}functionpf(e){varr=[];e.l+=4;vart=e._R(4);while(t-->0)r.push(e._R(0,"lpp4"));returnr}functionmf(e){varr={};e._R(4);e.l+=4;r.id=e._R(0,"lpp4");r.name=e._R(0,"lpp4");r.R=uf(e,4);r.U=uf(e,4);r.W=uf(e,4);returnr}functionbf(e){varr=mf(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}functiongf(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}functionEf(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}functionwf(e){varr=uf(e);switch(r.Minor){case2:return[r.Minor,kf(e,r)];case3:return[r.Minor,Sf(e,r)];case4:return[r.Minor,_f(e,r)];}thrownewError("ECMA-376 Encrypted file unrecognized Version: "+r.Minor)}functionkf(e){varr=e._R(4);if((r&63)!=36)thrownewError("EncryptionInfo mismatch");vart=e._R(4);vara=gf(e,t);varn=Ef(e,e.length-e.l);return{t:"Std",h:a,v:n}}functionSf(){thrownewError("File is password-protected: ECMA-376 Extensible")}function_f(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}functionCf(e,r){vart={};vara=t.EncryptionVersionInfo=uf(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=gf(e,n);r-=n;t.EncryptionVerifier=Ef(e,r);returnt}functionBf(e){varr={};vart=r.EncryptionVersionInfo=uf(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}functionTf(e){varr=0,t;vara=cf(e);varn=a.length+1,i,s;varf,l,o;t=w(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];f=(r&16384)===0?0:1;l=r<<1&32767;o=f|l;r=o^s}returnr^52811}varxf=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=functio
});varn="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":if(!t.bookType)t.bookType="xla";case"biff8":n="/Workbook";t.biff=8;break;case"biff5":n="/Book";t.biff=5;break;default:thrownewError("invalid type "+t.bookType+" for XLS CFB");}L.utils.cfb_add(a,n,pp(e,t));if(t.biff==8&&e.vbaraw)Bo(a,L.read(e.vbaraw,{type:typeofe.vbaraw=="string"?"binary":"buffer"}));returna}var$v={0:{n:"BrtRowHdr",f:ph},1:{n:"BrtCellBlank",f:_h},2:{n:"BrtCellRk",f:Fh},3:{n:"BrtCellError",f:xh},4:{n:"BrtCellBool",f:Bh},5:{n:"BrtCellReal",f:Ih},6:{n:"BrtCellSt",f:Oh},7:{n:"BrtCellIsst",f:yh},8:{n:"BrtFmlaString",f:Uh},9:{n:"BrtFmlaNum",f:Mh},10:{n:"BrtFmlaBool",f:Nh},11:{n:"BrtFmlaError",f:Lh},16:{n:"BrtFRTArchID$",f:Vd},19:{n:"BrtSSTItem",f:St},20:{n:"BrtPCDIMissing"},21:{n:"BrtPCDINumber"},22:{n:"BrtPCDIBoolean"},23:{n:"BrtPCDIError"},24:{n:"BrtPCDIString"},25:{n:"BrtPCDIDatetime"},26:{n:"BrtPCDIIndex"},27:{n:"BrtPCDIAMissing"},28:{n:"BrtPCDIANumber"},29:{n:"BrtPCDIABoolean"},30:{n:"BrtPCDIAError"},31:{n:"BrtPCDIAString"},32:{n:"BrtPCDIADatetime"},33:{n:"BrtPCRRecord"},34:{n:"BrtPCRRecordDt"},35:{n:"BrtFRTBegin"},36:{n:"BrtFRTEnd"},37:{n:"BrtACBegin"},38:{n:"BrtACEnd"},39:{n:"BrtName",f:zd},40:{n:"BrtIndexRowBlock"},42:{n:"BrtIndexBlock"},43:{n:"BrtFont",f:vl},44:{n:"BrtFmt",f:hl},45:{n:"BrtFill",f:gl},46:{n:"BrtBorder",f:_l},47:{n:"BrtXF",f:wl},48:{n:"BrtStyle"},49:{n:"BrtCellMeta"},50:{n:"BrtValueMeta"},51:{n:"BrtMdb"},52:{n:"BrtBeginFmd"},53:{n:"BrtEndFmd"},54:{n:"BrtBeginMdx"},55:{n:"BrtEndMdx"},56:{n:"BrtBeginMdxTuple"},57:{n:"BrtEndMdxTuple"},58:{n:"BrtMdxMbrIstr"},59:{n:"BrtStr"},60:{n:"BrtColInfo",f:Cs},62:{n:"BrtCellRString"},63:{n:"BrtCalcChainItem$",f:no},64:{n:"BrtDVal"},65:{n:"BrtSxvcellNum"},66:{n:"BrtSxvcellStr"},67:{n:"BrtSxvcellBool"},68:{n:"BrtSxvcellErr"},69:{n:"BrtSxvcellDate"},70:{n:"BrtSxvcellNil"},128:{n:"BrtFileVersion"},129:{n:"BrtBeginSheet"},130:{n:"BrtEndSheet"},131:{n:"BrtBeginBook",f:Wr,p:0},132:{n:"BrtEndBook"},133:{n:"BrtBeginWsViews"},134:{n:"BrtEndWsViews"},135:{n:"BrtBeginBookViews"},136:{n:"BrtEndBookViews"},137:{n:"BrtBeginWsView",f:Qh},138:{n:"BrtEndWsView"},139:{n:"BrtBeginCsViews"},140:{n:"BrtEndCsViews"},141:{n:"BrtBeginCsView"},142:{n:"BrtEndCsView"},143:{n:"BrtBeginBundleShs"},144:{n:"BrtEndBundleShs"},145:{n:"BrtBeginSheetData"},146:{n:"BrtEndSheetData"},147:{n:"BrtWsProp",f:kh},148:{n:"BrtWsDim",f:gh,p:16},151:{n:"BrtPane"},152:{n:"BrtSel"},153:{n:"BrtWbProp",f:Hd},154:{n:"BrtWbFactoid"},155:{n:"BrtFileRecover"},156:{n:"BrtBundleSh",f:Md},157:{n:"BrtCalcProp"},158:{n:"BrtBookView"},159:{n:"BrtBeginSst",f:nf},160:{n:"BrtEndSst"},161:{n:"BrtBeginAFilter",f:Ut},162:{n:"BrtEndAFilter"},163:{n:"BrtBeginFilterColumn"},164:{n:"BrtEndFilterColumn"},165:{n:"BrtBeginFilters"},166:{n:"BrtEndFilters"},167:{n:"BrtFilter"},168:{n:"BrtColorFilter"},169:{n:"BrtIconFilter"},170:{n:"BrtTop10Filter"},171:{n:"BrtDynamicFilter"},172:{n:"BrtBeginCustomFilters"},173:{n:"BrtEndCustomFilters"},174:{n:"BrtCustomFilter"},175:{n:"BrtAFilterDateGroupItem"},176:{n:"BrtMergeCell",f:Hh},177:{n:"BrtBeginMergeCells"},178:{n:"BrtEndMergeCells"},179:{n:"BrtBeginPivotCacheDef"},180:{n:"BrtEndPivotCacheDef"},181:{n:"BrtBeginPCDFields"},182:{n:"BrtEndPCDFields"},183:{n:"BrtBeginPCDField"},184:{n:"BrtEndPCDField"},185:{n:"BrtBeginPCDSource"},186:{n:"BrtEndPCDSource"},187:{n:"BrtBeginPCDSRange"},188:{n:"BrtEndPCDSRange"},189:{n:"BrtBeginPCDFAtbl"},190:{n:"BrtEndPCDFAtbl"},191:{n:"BrtBeginPCDIRun"},192:{n:"BrtEndPCDIRun"},193:{n:"BrtBeginPivotCacheRecords"},194:{n:"BrtEndPivotCacheRecords"},195:{n:"BrtBeginPCDHierarchies"},196:{n:"BrtEndPCDHierarchies"},197:{n:"BrtBeginPCDHierarchy"},198:{n:"BrtEndPCDHierarchy"},199:{n:"BrtBeginPCDHFieldsUsage"},200:{n:"BrtEndPCDHFieldsUsage"},201:{n:"BrtBeginExtConnection"},202:{n:"BrtEndExtConnection"},203:{n:"BrtBeginECDbProps"},204:{n:"BrtEndECDbProps"},205:{n:"BrtBeginECOlapProps"},206:{n:"BrtEndECOlapProps"},207:{n:"BrtBeginPCDSConsol"},208:{n:"BrtEndPCDSConsol"},209:{n:"BrtBeginPCDSCPages"},210:{n:"BrtEndPCDSCPages"},211:{n:"BrtBeginPCDSCPage"},212:{n:"BrtEndPCDSCPage"},
varn=Vr(9);ep(n,e,r);if(a=="e"){n._W(1,t);n._W(1,1)}else{n._W(1,t?1:0);n._W(1,0)}returnn}functiontp(e,r,t){vara=Vr(8+2*t.length);ep(a,e,r);a._W(1,t.length);a._W(t.length,t,"sbcs");returna.l<a.length?a.slice(0,a.l):a}functionap(e,r,t,a){if(r.v!=null)switch(r.t){case"d":;case"n":varn=r.t=="d"?Q(te(r.v)):r.v;if(n==(n|0)&&n>=0&&n<65536)qv(e,2,Ns(t,a,n));elseqv(e,3,Os(t,a,n));return;case"b":;case"e":qv(e,5,rp(t,a,r.v,r.t));return;case"s":;case"str":qv(e,4,tp(t,a,r.v));return;}qv(e,1,ep(null,t,a))}functionnp(e,r,t,a){varn=Array.isArray(r);vari=ut(r["!ref"]||"A1"),s,f="",l=[];if(i.e.c>255||i.e.r>16383){if(a.WTF)thrownewError("Range "+(r["!ref"]||"A1")+" exceeds format limit A1:IV16384");i.e.c=Math.min(i.e.c,255);i.e.r=Math.min(i.e.c,16383);s=ct(i)}for(varo=i.s.r;o<=i.e.r;++o){f=qr(o);for(varc=i.s.c;c<=i.e.c;++c){if(o===i.s.r)l[c]=at(c);s=l[c]+f;varu=n?(r[o]||[])[c]:r[s];if(!u)continue;ap(e,u,o,c,a)}}}functionip(e,r){vart=r||{};if(m!=null&&t.dense==null)t.dense=m;vara=Xr();varn=0;for(vari=0;i<e.SheetNames.length;++i)if(e.SheetNames[i]==t.sheet)n=i;if(n==0&&!!t.sheet&&e.SheetNames[0]!=t.sheet)thrownewError("Sheet not found: "+t.sheet);qv(a,9,ui(e,16,t));np(a,e.Sheets[e.SheetNames[n]],n,t,e);qv(a,10);returna.end()}functionsp(e,r,t){qv(e,"Font",Ai({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},t))}functionfp(e,r,t){if(!r)return;[[5,8],[23,26],[41,44],[50,392]].forEach(function(a){for(varn=a[0];n<=a[1];++n)if(r[n]!=null)qv(e,"Format",Oi(n,r[n],t))})}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);qv(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);qv(e,"Feat",t)}functionop(e,r){for(vart=0;t<16;++t)qv(e,"XF",zi({numFmtId:0,style:true},0,r));r.cellXfs.forEach(function(t){qv(e,"XF",zi(t,0,r))})}functioncp(e,r){for(vart=0;t<r["!links"].length;++t){vara=r["!links"][t];qv(e,"HLink",ms(a));if(a[1].Tooltip)qv(e,"HLinkTooltip",gs(a))}deleter["!links"]}functionup(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;qv(e,"Number",$i(t,a,s,i,n));return;case"b":;case"e":qv(e,517,Ki(t,a,r.v,i,n,r.t));return;case"s":;case"str":qv(e,"Label",Fi(t,a,r.v,i,n));return;}qv(e,"Blank",Yn(t,a,i))}functionhp(e,r,t){vara=Xr();varn=t.SheetNames[e],i=t.Sheets[n]||{};vars=(t||{}).Workbook||{};varf=(s.Sheets||[])[e]||{};varl=Array.isArray(i);varo=r.biff==8;varc,u="",h=[];vard=ut(i["!ref"]||"A1");varv=o?65536:16384;if(d.e.c>255||d.e.r>=v){if(r.WTF)thrownewError("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");d.e.c=Math.min(d.e.c,255);d.e.r=Math.min(d.e.c,v-1)}qv(a,2057,ui(t,16,r));qv(a,"CalcMode",yn(1));qv(a,"CalcCount",yn(100));qv(a,"CalcRefMode",Tn(true));qv(a,"CalcIter",Tn(false));qv(a,"CalcDelta",Vt(.001));qv(a,"CalcSaveRecalc",Tn(true));qv(a,"PrintRowCol",Tn(false));qv(a,"PrintGrid",Tn(false));qv(a,"GridSet",yn(1));qv(a,"Guts",Gi([0,0]));qv(a,"HCenter",Tn(false));qv(a,"VCenter",Tn(false));qv(a,"Dimensions",Li(d,r));if(o)i["!links"]=[];for(varp=d.s.r;p<=d.e.r;++p){u=qr(p);for(varm=d.s.c;m<=d.e.c;++m){if(p===d.s.r)h[m]=at(m);c=h[m]+u;varb=l?(i[p]||[])[m]:i[c];if(!b)continue;up(a,b,p,m,r);if(o&&b.l)i["!links"].push([c,b.l])}}varg=f.CodeName||f.name||n;if(o&&s.Views)qv(a,"Window2",xi(s.Views[0]));if(o&&(i["!merges"]||[]).length)qv(a,"MergeCells",cs(i["!merges"]));if(o)cp(a,i);qv(a,"CodeName",Ln(g,r));if(o)lp(a,i);qv(a,"EOF");returna.end()}functiondp(e,r,t){vara=Xr();varn=(e||{}).Workbook||{};vari=n.Sheets||[];vars=n.WBProps||{};varf=t.biff==8,l=t.biff==5;qv(a,2057,ui(e,5,t));if(t.bookType=="xla")qv(a,"Addin");qv(a,"InterfaceHdr",f?yn(1200):null);qv(a,"Mms",_n(2));if(l)qv(a,"ToolbarHdr");if(l)qv(a,"ToolbarEnd");qv(a,"InterfaceEnd");qv(a,"WriteAccess",vi("SheetJS",t));qv(a,"CodePage",yn(f?1200:1252));if(f)qv(a,"DSF",yn(0));if(f)qv(a,"Excel9File");qv(a,"RRTabId",xs(e.SheetNames.length));if(f&&e.vbaraw){qv(a,"ObProj");varo=s.CodeName||"ThisWorkbook";qv(a,"CodeName",Ln(o,t))}qv(a,"Bui
vars=pf(n.content);if(s.length!=1||s[0]!="StrongEncryptionTransform")thrownewError("ECMA-376 Encrypted file bad "+a);a="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary";n=L.find(e,a);if(!n||!n.content)thrownewError("ECMA-376 Encrypted file missing "+a);bf(n.content);a="/EncryptionInfo";n=L.find(e,a);if(!n||!n.content)thrownewError("ECMA-376 Encrypted file missing "+a);varf=wf(n.content);a="/EncryptedPackage";n=L.find(e,a);if(!n||!n.content)thrownewError("ECMA-376 Encrypted file missing "+a);if(f[0]==4&&typeofdecrypt_agile!=="undefined")returndecrypt_agile(f[1],n.content,t.password||"",t);if(f[0]==2&&typeofdecrypt_std76!=="undefined")returndecrypt_std76(f[1],n.content,t.password||"",t);thrownewError("File is password-protected")}functionGp(e,r){oo=1024;if(r.bookType=="ods")returnCp(e,r);if(e&&!e.SSF){e.SSF=A.get_table()}if(e&&e.SSF){I(A);A.load_table(e.SSF);r.revssf=j(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF}r.rels={};r.wbrels={};r.Strings=[];r.Strings.Count=0;r.Strings.Unique=0;vart=r.bookType=="xlsb"?"bin":"xml";vara=To.indexOf(r.bookType)>-1;varn=ka();Mp(r=r||{});vari=newge;vars="",f=0;r.cellXfs=[];Lu(r.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};s="docProps/core.xml";i.file(s,Xa(e.Props,r));n.coreprops.push(s);Ra(r.rels,2,s,Ta.CORE_PROPS);s="docProps/app.xml";if(e.Props&&e.Props.SheetNames){}elseif(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{varl=[];for(varo=0;o<e.SheetNames.length;++o)if((e.Workbook.Sheets[o]||{}).Hidden!=2)l.push(e.SheetNames[o]);e.Props.SheetNames=l}e.Props.Worksheets=e.Props.SheetNames.length;i.file(s,Ya(e.Props,r));n.extprops.push(s);Ra(r.rels,3,s,Ta.EXT_PROPS);if(e.Custprops!==e.Props&&z(e.Custprops||{}).length>0){s="docProps/custom.xml";i.file(s,Ja(e.Custprops,r));n.custprops.push(s);Ra(r.rels,4,s,Ta.CUST_PROPS)}s="xl/workbook."+t;i.file(s,fv(e,s,r));n.workbooks.push(s);Ra(r.rels,1,s,Ta.WB);for(f=1;f<=e.SheetNames.length;++f){varc={"!id":{}};varu=e.Sheets[e.SheetNames[f-1]];varh=(u||{})["!type"]||"sheet";switch(h){case"chart":;default:s="xl/worksheets/sheet"+f+"."+t;i.file(s,lv(f-1,s,r,e,c));n.sheets.push(s);Ra(r.wbrels,-1,"worksheets/sheet"+f+"."+t,Ta.WS[0]);}if(u){vard=u["!comments"];if(d&&d.length>0){varv="xl/comments"+f+"."+t;i.file(v,hv(d,v,r));n.comments.push(v);Ra(c,-1,"../comments"+f+"."+t,Ta.CMNT)}if(u["!legacy"]){i.file("xl/drawings/vmlDrawing"+f+".vml",co(f,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,uv(r.Strings,s,r));n.strs.push(s);Ra(r.wbrels,-1,"sharedStrings."+t,Ta.SST)}s="xl/theme/theme1.xml";i.file(s,Yl(e.Themes,r));n.themes.push(s);Ra(r.wbrels,-1,"theme/theme1.xml",Ta.THEME);s="xl/styles."+t;i.file(s,cv(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}functionjp(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)]}functionKp(e,r){if(L.find(e,"EncryptedPackage"))returnXp(e,r);returnKv(e,r)}functionYp(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);}returnzp(t,n)}function$p(e,r){vart=0;e:while(t<e.length)switch(e.charCodeAt(t)){case10:;case13:;case32:++t;break;case60:returnxv(e.slice(t),r);default:breake;}returnXs.to_workbook(e,r)}functionZp(e,r){vart="",a=jp(e