=A?(E[D++]=17,E[D++]=A-3,H[17]++):(E[D++]=18,E[D++]=A-11,H[18]++),s-=A;else if(E[D++]=F[r],H[F[r]]++,s--,3>s)for(;0s?s:6,A>s-3&&Ay;y++)ia[y]=ea[Ia[y]];for(P=19;4=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var d=[],c,f;for(c=3;258>=c;c++)f=e(c),d[c]=f[2]<<24|f[1]<<16|f[0];return d}(),Ga=C?new Uint32Array(Fa):Fa;function na(e,d){function c(a,c){var b=a.g,d=[],f=0,e;e=Ga[a.length];d[f++]=e&65535;d[f++]=e>>16&255;d[f++]=e>>24;var g;switch(u){case 1===b:g=[0,b-1,0];break;case 2===b:g=[1,b-2,0];break;case 3===b:g=[2,b-3,0];break;case 4===b:g=[3,b-4,0];break;case 6>=b:g=[4,b-5,1];break;case 8>=b:g=[5,b-7,1];break;case 12>=b:g=[6,b-9,2];break;case 16>=b:g=[7,b-13,2];break;case 24>=b:g=[8,b-17,3];break;case 32>=b:g=[9,b-25,3];break;case 48>=b:g=[10,b-33,4];break;case 64>=b:g=[11,b-49,4];break;case 96>=b:g=[12,b-65,5];break;case 128>=b:g=[13,b-97,5];break;case 192>=b:g=[14,b-129,6];break;case 256>=b:g=[15,b-193,6];break;case 384>=b:g=[16,b-257,7];break;case 512>=b:g=[17,b-385,7];break;case 768>=b:g=[18,b-513,8];break;case 1024>=b:g=[19,b-769,8];break;case 1536>=b:g=[20,b-1025,9];break;case 2048>=b:g=[21,b-1537,9];break;case 3072>=b:g=[22,b-2049,10];break;case 4096>=b:g=[23,b-3073,10];break;case 6144>=b:g=[24,b-4097,11];break;case 8192>=b:g=[25,b-6145,11];break;case 12288>=b:g=[26,b-8193,12];break;case 16384>=b:g=[27,b-12289,12];break;case 24576>=b:g=[28,b-16385,13];break;case 32768>=b:g=[29,b-24577,13];break;default:throw"invalid distance"}e=g;d[f++]=e[0];d[f++]=e[1];d[f++]=e[2];var k,m;k=0;for(m=d.length;k=b;)t[b++]=0;for(b=0;29>=b;)w[b++]=0}t[256]=1;f=0;for(a=d.length;f=a){x&&c(x,-1);b=0;for(k=a-f;bk&&d+kb&&(a=f,b=k);if(258===k)break}return new qa(b,d-a)}function oa(e,d){var c=e.length,f=new ja(572),a=new(C?Uint8Array:Array)(c),b,k,m,g,p;if(!C)for(g=0;g2*a[h-1]+b[h]&&(a[h]=2*a[h-1]+b[h]),m[h]=Array(a[h]),g[h]=Array(a[h]);for(l=0;le[l]?(m[h][q]=t,g[h][q]=d,w+=2):(m[h][q]=e[l],g[h][q]=l,++l);p[h]=0;1===b[h]&&f(h)}return k}function pa(e){var d=new(C?Uint16Array:Array)(e.length),c=[],f=[],a=0,b,k,m,g;b=0;for(k=e.length;b>>=1}return d}ba("Zlib.RawDeflate",ka);ba("Zlib.RawDeflate.prototype.compress",ka.prototype.h);var Ka={NONE:0,FIXED:1,DYNAMIC:ma},V,La,$,Ma;if(Object.keys)V=Object.keys(Ka);else for(La in V=[],$=0,Ka)V[$++]=La;$=0;for(Ma=V.length;$a&&(a=c[n]),c[n]>=1;for(t=m;t>>=1;switch(c){case 0:var d=this.input,a=this.d,b=this.b,e=this.a,f=l,g=l,h=l,k=b.length,m=l;this.c=this.f=0;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: LEN (first byte)");g=f;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: LEN (second byte)");g|=f<<8;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: NLEN (first byte)");h=f;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: NLEN (second byte)");h|=f<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>d.length)throw Error("input buffer is broken");switch(this.i){case x:for(;e+g>b.length;){m=k-e;g-=m;if(r)b.set(d.subarray(a,a+m),e),e+=m,a+=m;else for(;m--;)b[e++]=d[a++];this.a=e;b=this.e();e=this.a}break;case w:for(;e+g>b.length;)b=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(r)b.set(d.subarray(a,a+g),e),e+=g,a+=g;else for(;g--;)b[e++]=d[a++];this.d=a;this.a=e;this.b=b;break;case 1:this.j(z,A);break;case 2:B(this);break;default:throw Error("unknown BTYPE: "+c)}}return this.m()};var C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=r?new Uint16Array(C):C,E=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],F=r?new Uint16Array(E):E,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],H=r?new Uint8Array(G):G,I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],J=r?new Uint16Array(I):I,K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=r?new Uint8Array(K):K,M=new(r?Uint8Array:Array)(288),N,O;N=0;for(O=M.length;N=N?8:255>=N?9:279>=N?7:8;var z=u(M),P=new(r?Uint8Array:Array)(30),Q,R;Q=0;for(R=P.length;Q>>d;c.c=b-d;c.d=f;return g}function S(c,d){for(var a=c.f,b=c.c,e=c.input,f=c.d,g=d[0],h=d[1],k,m,s;b>>16;c.f=a>>s;c.c=b-s;c.d=f;return m&65535}function B(c){function d(a,c,b){var d,f,e,g;for(g=0;gf)b>=e&&(this.a=b,a=this.e(),b=this.a),a[b++]=f;else{g=f-257;k=F[g];0=e&&(this.a=b,a=this.e(),b=this.a);for(;k--;)a[b]=a[b++-h]}for(;8<=this.c;)this.c-=8,this.d--;this.a=b};v.prototype.s=function(c,d){var a=this.b,b=this.a;this.n=c;for(var e=a.length,f,g,h,k;256!==(f=S(this,c));)if(256>f)b>=e&&(a=this.e(),e=a.length),a[b++]=f;else{g=f-257;k=F[g];0e&&(a=this.e(),e=a.length);for(;k--;)a[b]=a[b++-h]}for(;8<=this.c;)this.c-=8,this.d--;this.a=b};v.prototype.e=function(){var c=new(r?Uint8Array:Array)(this.a-32768),d=this.a-32768,a,b,e=this.b;if(r)c.set(e.subarray(32768,c.length));else{a=0;for(b=c.length;aa;++a)e[a]=e[d+a];this.a=32768;return e};v.prototype.u=function(c){var d,a=this.input.length/this.d+1|0,b,e,f,g=this.input,h=this.b;c&&("number"===typeof c.o&&(a=c.o),"number"===typeof c.q&&(a+=c.q));2>a?(b=(g.length-this.d)/this.n[2],f=258*(b/2)|0,e=fd&&(this.b.length=d),c=this.b);return this.buffer=c};q("Zlib.RawInflate",v);q("Zlib.RawInflate.prototype.decompress",v.prototype.t);var T={ADAPTIVE:w,BLOCK:x},U,V,W,X;if(Object.keys)U=Object.keys(T);else for(V in U=[],W=0,T)U[W++]=V;W=0;for(X=U.length;W=this.index;i--){result=(result<<8)+this.byteAt(i)}this.index+=size;return result},readString:function(size){return JSZip.utils.transformTo("string",this.readData(size))},readData:function(size){},lastIndexOfSignature:function(sig){},readDate:function(){var dostime=this.readInt(4);return new Date((dostime>>25&127)+1980,(dostime>>21&15)-1,dostime>>16&31,dostime>>11&31,dostime>>5&63,(dostime&31)<<1)}};function StringReader(data,optimizedBinaryString){this.data=data;if(!optimizedBinaryString){this.data=JSZip.utils.string2binary(this.data)}this.length=this.data.length;this.index=0}StringReader.prototype=new DataReader;StringReader.prototype.byteAt=function(i){return this.data.charCodeAt(i)};StringReader.prototype.lastIndexOfSignature=function(sig){return this.data.lastIndexOf(sig)};StringReader.prototype.readData=function(size){this.checkOffset(size);var result=this.data.slice(this.index,this.index+size);this.index+=size;return result};function Uint8ArrayReader(data){if(data){this.data=data;this.length=this.data.length;this.index=0}}Uint8ArrayReader.prototype=new DataReader;Uint8ArrayReader.prototype.byteAt=function(i){return this.data[i]};Uint8ArrayReader.prototype.lastIndexOfSignature=function(sig){var sig0=sig.charCodeAt(0),sig1=sig.charCodeAt(1),sig2=sig.charCodeAt(2),sig3=sig.charCodeAt(3);for(var i=this.length-4;i>=0;--i){if(this.data[i]===sig0&&this.data[i+1]===sig1&&this.data[i+2]===sig2&&this.data[i+3]===sig3){return i}}return-1};Uint8ArrayReader.prototype.readData=function(size){this.checkOffset(size);var result=this.data.subarray(this.index,this.index+size);this.index+=size;return result};function NodeBufferReader(data){this.data=data;this.length=this.data.length;this.index=0}NodeBufferReader.prototype=new Uint8ArrayReader;NodeBufferReader.prototype.readData=function(size){this.checkOffset(size);var result=this.data.slice(this.index,this.index+size);this.index+=size;return result};function ZipEntry(options,loadOptions){this.options=options;this.loadOptions=loadOptions}ZipEntry.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},prepareCompressedContent:function(reader,from,length){return function(){var previousIndex=reader.index;reader.setIndex(from);var compressedFileData=reader.readData(length);reader.setIndex(previousIndex);return compressedFileData}},prepareContent:function(reader,from,length,compression,uncompressedSize){return function(){var compressedFileData=JSZip.utils.transformTo(compression.uncompressInputType,this.getCompressedContent());var uncompressedFileData=compression.uncompress(compressedFileData);if(uncompressedFileData.length!==uncompressedSize){throw new Error("Bug : uncompressed data size mismatch")}return uncompressedFileData}},readLocalPart:function(reader){var compression,localExtraFieldsLength;reader.skip(22);this.fileNameLength=reader.readInt(2);localExtraFieldsLength=reader.readInt(2);this.fileName=reader.readString(this.fileNameLength);reader.skip(localExtraFieldsLength);if(this.compressedSize==-1||this.uncompressedSize==-1){throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory "+"(compressedSize == -1 || uncompressedSize == -1)")}compression=findCompression(this.compressionMethod);if(compression===null){throw new Error("Corrupted zip : compression "+pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")")}this.decompressed=new JSZip.CompressedObject;this.decompressed.compressedSize=this.compressedSize;this.decompressed.uncompressedSize=this.uncompressedSize;this.decompressed.crc32=this.crc32;this.decompressed.compressionMethod=this.compressionMethod;this.decompressed.getCompressedContent=this.prepareCompressedContent(reader,reader.index,this.compressedSize,compression);this.decompressed.getContent=this.prepareContent(reader,reader.index,this.compressedSize,compression,this.uncompressedSize);if(this.loadOptions.checkCRC32){this.decompressed=JSZip.utils.transformTo("string",this.decompressed.getContent());if(JSZip.prototype.crc32(this.decompressed)!==this.crc32){throw new Error("Corrupted zip : CRC32 mismatch")}}},readCentralPart:function(reader){this.versionMadeBy=reader.readString(2);this.versionNeeded=reader.readInt(2);this.bitFlag=reader.readInt(2);this.compressionMethod=reader.readString(2);this.date=reader.readDate();this.crc32=reader.readInt(4);this.compressedSize=reader.readInt(4);this.uncompressedSize=reader.readInt(4);this.fileNameLength=reader.readInt(2);this.extraFieldsLength=reader.readInt(2);this.fileCommentLength=reader.readInt(2);this.diskNumberStart=reader.readInt(2);this.internalFileAttributes=reader.readInt(2);this.externalFileAttributes=reader.readInt(4);this.localHeaderOffset=reader.readInt(4);if(this.isEncrypted()){throw new Error("Encrypted zip are not supported")}this.fileName=reader.readString(this.fileNameLength);this.readExtraFields(reader);this.parseZIP64ExtraField(reader);this.fileComment=reader.readString(this.fileCommentLength);this.dir=this.externalFileAttributes&16?true:false},parseZIP64ExtraField:function(reader){if(!this.extraFields[1]){return}var extraReader=new StringReader(this.extraFields[1].value);if(this.uncompressedSize===MAX_VALUE_32BITS){this.uncompressedSize=extraReader.readInt(8)}if(this.compressedSize===MAX_VALUE_32BITS){this.compressedSize=extraReader.readInt(8)}if(this.localHeaderOffset===MAX_VALUE_32BITS){this.localHeaderOffset=extraReader.readInt(8)}if(this.diskNumberStart===MAX_VALUE_32BITS){this.diskNumberStart=extraReader.readInt(4)}},readExtraFields:function(reader){var start=reader.index,extraFieldId,extraFieldLength,extraFieldValue;this.extraFields=this.extraFields||{};while(reader.index1){throw new Error("Multi-volumes zip are not supported")}},readLocalFiles:function(){var i,file;for(i=0;i>8])[0]};var SSF={};var make_ssf=function(SSF){var _strrev=function(x){return String(x).split("").reverse().join("")};function fill(c,l){return new Array(l+1).join(c)}function pad(v,d,c){var t=String(v);return t.length>=d?t:fill(c||0,d-t.length)+t}function rpad(v,d,c){var t=String(v);return t.length>=d?t:t+fill(c||0,d-t.length)}SSF.version="0.6.5";var opts_fmt={date1904:0,output:"",WTF:false};function fixopts(o){for(var y in opts_fmt)if(o[y]===undefined)o[y]=opts_fmt[y]}SSF.opts=opts_fmt;var table_fmt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "',65535:"General"};var days=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]];var months=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];var frac=function frac(x,D,mixed){var sgn=x<0?-1:1;var B=x*sgn;var P_2=0,P_1=1,P=0;var Q_2=1,Q_1=0,Q=0;var A=Math.floor(B);while(Q_1D){Q=Q_1;P=P_1}if(Q>D){Q=Q_2;P=P_2}if(!mixed)return[0,sgn*P,Q];if(Q===0)throw"Unexpected state: "+P+" "+P_1+" "+P_2+" "+Q+" "+Q_1+" "+Q_2;var q=Math.floor(sgn*P/Q);return[q,sgn*P-q*Q,Q]};var general_fmt=function(v,opts){if(typeof v==="boolean")return v?"TRUE":"FALSE";if(typeof v==="number"){var o,V=v<0?-v:v;if(V>=.1&&V<1)o=v.toPrecision(9);else if(V>=.01&&V<.1)o=v.toPrecision(8);else if(V>=.001&&V<.01)o=v.toPrecision(7);else if(V>=1e-4&&V<.001)o=v.toPrecision(6);else if(V>=Math.pow(10,10)&&VMath.pow(10,-9)&&V(v<0?12:11))o=v.toPrecision(10);if(o.length>(v<0?12:11))o=v.toExponential(5)}else{o=v.toFixed(11).replace(/(\.[0-9]*[1-9])0*$/,"$1");if(o.length>(v<0?12:11))o=v.toPrecision(6)}o=o.replace(/(\.[0-9]*[1-9])0+e/,"$1e").replace(/\.0*e/,"e");return o.replace("e","E").replace(/\.0*$/,"").replace(/\.([0-9]*[^0])0*$/,".$1").replace(/(E[+-])([0-9])$/,"$1"+"0"+"$2")}if(typeof v==="string")return v;throw new Error("unsupported value in General format: "+v)};SSF._general=general_fmt;function fix_hijri(date,o){return 0}var parse_date_code=function parse_date_code(v,opts,b2){var date=Math.floor(v),time=Math.floor(86400*(v-date)+1e-6),dow=0;var dout=[];var out={D:date,T:time,u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};fixopts(opts=opts||{});if(opts.date1904)date+=1462;if(date>2958465)return null;if(out.u>.999){out.u=0;if(++time==86400){time=0;++date}}if(date===60){dout=b2?[1317,10,29]:[1900,2,29];dow=3}else if(date===0){dout=b2?[1317,8,29]:[1900,1,0];dow=6}else{if(date>60)--date;var d=new Date(1900,0,1);d.setDate(d.getDate()+date-1);dout=[d.getFullYear(),d.getMonth()+1,d.getDate()];dow=d.getDay();if(date<60)dow=(dow+6)%7;if(b2)dow=fix_hijri(d,dout)}out.y=dout[0];out.m=dout[1];out.d=dout[2];out.S=time%60;time=Math.floor(time/60);out.M=time%60;time=Math.floor(time/60);out.H=time;out.q=dow;return out};SSF.parse_date_code=parse_date_code;var write_date=function(type,fmt,val){var o,ss,y=val.y;switch(type){case"b":y=val.y+543;case"y":switch(fmt.length){case 1:case 2:return pad(y%100,2);default:return pad(y%1e4,4)}case"m":switch(fmt){case"m":return val.m;case"mm":return pad(val.m,2);case"mmm":return months[val.m-1][1];case"mmmmm":return months[val.m-1][0];default:return months[val.m-1][2]}case"d":switch(fmt){case"d":return val.d;case"dd":return pad(val.d,2);case"ddd":return days[val.q][0];default:return days[val.q][1]}case"h":switch(fmt){case"h":return 1+(val.H+11)%12;case"hh":return pad(1+(val.H+11)%12,2);default:throw"bad hour format: "+fmt}case"H":switch(fmt){case"h":return val.H;case"hh":return pad(val.H,2);default:throw"bad hour format: "+fmt}case"M":switch(fmt){case"m":return val.M;case"mm":return pad(val.M,2);default:throw"bad minute format: "+fmt}case"s":switch(fmt){case"s":ss=Math.round(val.S+val.u);return ss>=60?0:ss;case"ss":ss=Math.round(val.S+val.u);if(ss>=60)ss=0;return pad(ss,2);case"ss.0":ss=Math.round(10*(val.S+val.u));if(ss>=600)ss=0;o=pad(ss,3);return o.substr(0,2)+"."+o.substr(2);case"ss.00":ss=Math.round(100*(val.S+val.u));if(ss>=6e3)ss=0;o=pad(ss,4);return o.substr(0,2)+"."+o.substr(2);case"ss.000":ss=Math.round(1e3*(val.S+val.u));if(ss>=6e4)ss=0;o=pad(ss,5);return o.substr(0,2)+"."+o.substr(2);default:throw"bad second format: "+fmt}case"Z":switch(fmt){case"[h]":case"[hh]":o=val.D*24+val.H;break;case"[m]":case"[mm]":o=(val.D*24+val.H)*60+val.M;break;case"[s]":case"[ss]":o=((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u);break;default:throw"bad abstime format: "+fmt}return fmt.length===3?o:pad(o,2);case"e":{return val.y}break}};var commaify=function(s){return _strrev(_strrev(s).replace(/.../g,"$&,")).replace(/^,/,"")};var write_num=function(type,fmt,val){if(type==="("&&!fmt.match(/\).*[0#]/)){var ffmt=fmt.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");if(val>=0)return write_num("n",ffmt,val);return"("+write_num("n",ffmt,-val)+")"}var mul=0,o;fmt=fmt.replace(/%/g,function(){mul++;return""});if(mul!==0)return write_num(type,fmt,val*Math.pow(10,2*mul))+fill("%",mul);fmt=fmt.replace(/(\.0+)(,+)$/g,function($$,$1,$2){mul=$2.length;return $1});if(mul!==0)return write_num(type,fmt,val/Math.pow(10,3*mul));if(fmt.indexOf("E")>-1){var idx=fmt.indexOf("E")-fmt.indexOf(".")-1;if(fmt.match(/^#+0.0E\+0$/)){var period=fmt.indexOf(".");if(period===-1)period=fmt.indexOf("E");var ee=Number(val.toExponential(0).substr(2+(val<0?1:0)))%period;if(ee<0)ee+=period;o=(val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);if(!o.match(/[Ee]/)){var fakee=Number(val.toExponential(0).substr(2+(val<0?1:0)));if(o.indexOf(".")===-1)o=o[0]+"."+o.substr(1)+"E+"+(fakee-o.length+ee);else o+="E+"+(fakee-ee);while(o.substr(0,2)==="0."){o=o[0]+o.substr(2,period)+"."+o.substr(2+period);o=o.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.")}o=o.replace(/\+-/,"-")}o=o.replace(/^([+-]?)([0-9]*)\.([0-9]*)[Ee]/,function($$,$1,$2,$3){return $1+$2+$3.substr(0,(period+ee)%period)+"."+$3.substr(ee)+"E"})}else o=val.toExponential(idx);if(fmt.match(/E\+00$/)&&o.match(/e[+-][0-9]$/))o=o.substr(0,o.length-1)+"0"+o[o.length-1];if(fmt.match(/E\-/)&&o.match(/e\+/))o=o.replace(/e\+/,"e");return o.replace("e","E")}if(fmt[0]==="$")return"$"+write_num(type,fmt.substr(fmt[1]==" "?2:1),val);var r,rr,ff,aval=val<0?-val:val,sign=val<0?"-":"";if(r=fmt.match(/# (\?+)([ ]?)\/([ ]?)(\d+)/)){var den=Number(r[4]),rnd=Math.round(aval*den),base=Math.floor(rnd/den);var myn=rnd-base*den,myd=den;return sign+String(base||"")+" "+(myn===0?fill(" ",r[1].length+1+r[4].length):pad(myn,r[1].length," ")+r[2]+"/"+r[3]+pad(myd,r[4].length))}if(fmt.match(/^#+0+$/))fmt=fmt.replace(/#/g,"");if(fmt.match(/^00+$/))return(val<0?"-":"")+pad(Math.round(aval),fmt.length);if(fmt.match(/^[#?]+$/))return String(Math.round(val)).replace(/^0$/,"");if(r=fmt.match(/^#*0*\.(0+)/)){o=Math.round(val*Math.pow(10,r[1].length));rr=String(o/Math.pow(10,r[1].length)).replace(/^([^\.]+)$/,"$1."+r[1]).replace(/\.$/,"."+r[1]).replace(/\.([0-9]*)$/,function($$,$1){return"."+$1+fill("0",r[1].length-$1.length)});return fmt.match(/0\./)?rr:rr.replace(/^0\./,".")}fmt=fmt.replace(/^#+([0.])/,"$1");if(r=fmt.match(/^(0*)\.(#*)$/)){o=Math.round(aval*Math.pow(10,r[2].length));return sign+String(o/Math.pow(10,r[2].length)).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^([-]?\d*)$/,"$1.").replace(/^0\./,r[1].length?"0.":".")}if(r=fmt.match(/^#,##0([.]?)$/))return sign+commaify(String(Math.round(aval)));if(r=fmt.match(/^#,##0\.([#0]*0)$/)){rr=Math.round((val-Math.floor(val))*Math.pow(10,r[1].length));return val<0?"-"+write_num(type,fmt,-val):commaify(String(Math.floor(val)))+"."+pad(rr,r[1].length,0)}if(r=fmt.match(/^#,#*,#0/))return write_num(type,fmt.replace(/^#,#*,/,""),val);if(r=fmt.match(/^([0#]+)(\\?-([0#]+))+$/)){ff=_strrev(write_num(type,fmt.replace(/[\\-]/g,""),val));rr=0;return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return rr=12?"P":"A";q.t="T";hr="h";i+=3}else if(fmt.substr(i,5)==="AM/PM"){q.v=dt.H>=12?"PM":"AM";q.t="T";i+=5;hr="h"}else{q.t="t";i++}out.push(q);lst=c;break;case"[":o=c;while(fmt[i++]!=="]"&&i-1||c=="\\"&&fmt[i+1]=="-"&&"0#".indexOf(fmt[i+2])>-1)o+=c;out.push({t:"n",v:o});break;case"?":o=fmt[i];while(fmt[++i]===c)o+=c;q={t:c,v:o};out.push(q);lst=c;break;case"*":++i;if(fmt[i]==" "||fmt[i]=="*")++i;break;case"(":case")":out.push({t:flen===1?"t":c,v:c});++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=fmt[i];while("0123456789".indexOf(fmt[++i])>-1)o+=fmt[i];out.push({t:"D",v:o});break;case" ":out.push({t:c,v:c});++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxz".indexOf(c)===-1)throw"unrecognized character "+fmt[i]+" in "+fmt;out.push({t:"t",v:c});++i;break}}var bt=0;for(i=out.length-1,lst="t";i>=0;--i){switch(out[i].t){case"h":case"H":out[i].t=hr;lst="h";if(bt<1)bt=1;break;case"s":if(bt<3)bt=3;case"d":case"y":case"M":case"e":lst=out[i].t;break;case"m":if(lst==="s"){out[i].t="M";if(bt<2)bt=2}break;case"X":if(out[i].v==="B2");break;case"Z":if(bt<1&&out[i].v.match(/[Hh]/))bt=1;if(bt<2&&out[i].v.match(/[Mm]/))bt=2;if(bt<3&&out[i].v.match(/[Ss]/))bt=3}}switch(bt){case 0:break;case 1:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;
-++dt.M}if(dt.M>=60){dt.M=0;++dt.H}break;case 2:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;++dt.M}break}for(i=0;i-1||" t".indexOf(out[jj].t)>-1&&"?t".indexOf((out[jj+1]||{}).t)>-1&&(out[jj+1].t=="?"||out[jj+1].v=="/")||out[i].t=="("&&")n ".indexOf(out[jj].t)>-1||out[jj].t=="t"&&(out[jj].v=="/"||"$€".indexOf(out[jj].v)>-1||out[jj].v==" "&&(out[jj+1]||{}).t=="?"))){out[i].v+=out[jj].v;delete out[jj];++jj}out[i].v=write_num(out[i].t,out[i].v,flen>1&&v<0&&i>0&&out[i-1].v=="-"?-v:v);out[i].t="t";i=jj-1;break;case"G":out[i].t="t";out[i].v=general_fmt(v,opts);break}}return out.map(function(x){return x.v}).join("")}SSF._eval=eval_fmt;function choose_fmt(fmt,v,o){if(typeof fmt==="number")fmt=(o&&o.table?o.table:table_fmt)[fmt];if(typeof fmt==="string")fmt=split_fmt(fmt);var l=fmt.length;if(l<4&&fmt[l-1].indexOf("@")>-1)--l;switch(fmt.length){case 1:fmt=fmt[0].indexOf("@")>-1?["General","General","General",fmt[0]]:[fmt[0],fmt[0],fmt[0],"@"];break;case 2:fmt=fmt[1].indexOf("@")>-1?[fmt[0],fmt[0],fmt[0],fmt[1]]:[fmt[0],fmt[1],fmt[0],"@"];break;case 3:fmt=fmt[2].indexOf("@")>-1?[fmt[0],fmt[1],fmt[0],fmt[2]]:[fmt[0],fmt[1],fmt[2],"@"];break;case 4:break;default:throw"cannot find right format for |"+fmt+"|"}if(typeof v!=="number")return[fmt.length,fmt[3]];var ff=v>0?fmt[0]:v<0?fmt[1]:fmt[2];if(fmt[0].match(/\[[=<>]/)||fmt[1].match(/\[[=<>]/)){var chk=function(v,rr,out){if(!rr)return null;var found=false;var thresh=Number(rr[2]);switch(rr[1]){case"=":if(v==thresh)found=true;break;case">":if(v>thresh)found=true;break;case"<":if(v":if(v!=thresh)found=true;break;case">=":if(v>=thresh)found=true;break;case"<=":if(v<=thresh)found=true;break}return found?out:null};var m1=fmt[0].match(/\[([=<>]*)([-]?\d+)\]/);var m2=fmt[1].match(/\[([=<>]*)([-]?\d+)\]/);return chk(v,m1,[l,fmt[0]])||chk(v,m2,[l,fmt[1]])||[l,fmt[m1&&m2?2:1]]}return[l,ff]}var format=function format(fmt,v,o){fixopts(o=o||{});if(typeof fmt==="string"&&fmt.toLowerCase()==="general")return general_fmt(v,o);if(typeof fmt==="number")fmt=(o.table||table_fmt)[fmt];var f=choose_fmt(fmt,v,o);if(f[1].toLowerCase()==="general")return general_fmt(v,o);if(v===true)v="TRUE";if(v===false)v="FALSE";if(v===""||typeof v==="undefined")return"";return eval_fmt(f[1],v,o,f[0])};SSF._choose=choose_fmt;SSF._table=table_fmt;SSF.load=function(fmt,idx){table_fmt[idx]=fmt};SSF.format=format;SSF.get_table=function(){return table_fmt};SSF.load_table=function(tbl){for(var i=0;i!=392;++i)if(tbl[i])SSF.load(tbl[i],i)}};make_ssf(SSF);function getdata(data){if(!data)return null;if(data.data)return data.name.substr(-4)!==".bin"?data.data:data.data.split("").map(function(x){return x.charCodeAt(0)});if(data.asNodeBuffer&&typeof Buffer!=="undefined"&&data.name.substr(-4)===".bin")return data.asNodeBuffer();if(data.asBinary&&data.name.substr(-4)!==".bin")return data.asBinary();if(data._data&&data._data.getContent){if(data.name.substr(-4)===".bin")return Array.prototype.slice.call(data._data.getContent());return Array.prototype.slice.call(data._data.getContent(),0).map(function(x){return String.fromCharCode(x)}).join("")}return null}function getzipfile(zip,file){var f=file;if(zip.files[f])return zip.files[f];f=file.toLowerCase();if(zip.files[f])return zip.files[f];f=f.replace(/\//g,"\\");if(zip.files[f])return zip.files[f];throw new Error("Cannot find file "+file+" in zip")}function getzipdata(zip,file,safe){if(!safe)return getdata(getzipfile(zip,file));if(!file)return null;try{return getzipdata(zip,file)}catch(e){return null}}var _fs,jszip;if(typeof JSZip!=="undefined")jszip=JSZip;if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports){if(typeof Buffer!=="undefined"&&typeof jszip==="undefined")jszip=require("jszip");if(typeof jszip==="undefined")jszip=require("./jszip").JSZip;_fs=require("fs")}}var _chr=function(c){return String.fromCharCode(c)};var attregexg=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;var attregex=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function parsexmltag(tag){var words=tag.split(/\s+/);var z={0:words[0]};if(words.length===1)return z;(tag.match(attregexg)||[]).map(function(x){var y=x.match(attregex);y[1]=y[1].replace(/xmlns:/,"xmlns");z[y[1].replace(/^[a-zA-Z]*:/,"")]=y[2].substr(1,y[2].length-2)});return z}function evert(obj){var o={};Object.keys(obj).forEach(function(k){if(obj.hasOwnProperty(k))o[obj[k]]=k});return o}var encodings={""":'"',"'":"'",">":">","<":"<","&":"&"};var rencoding=evert(encodings);var rencstr="&<>'\"".split("");function unescapexml(text){var s=text+"";for(var y in encodings)s=s.replace(new RegExp(y,"g"),encodings[y]);return s.replace(/_x([0-9a-fA-F]*)_/g,function(m,c){return _chr(parseInt(c,16))})}function escapexml(text){var s=text+"";rencstr.forEach(function(y){s=s.replace(new RegExp(y,"g"),rencoding[y])});return s}function parsexmlbool(value,tag){switch(value){case"0":case 0:case"false":case"FALSE":return false;case"1":case 1:case"true":case"TRUE":return true;default:throw"bad boolean value "+value+" in "+(tag||"?")}}var utf8read=function(orig){var out=[],i=0,c=0,c1=0,c2=0,c3=0;while(i191&&c<224)out.push(_chr((c&31)<<6|c2&63));else{c3=orig.charCodeAt(i++);out.push(_chr((c&15)<<12|(c2&63)<<6|c3&63))}}}return out.join("")};function matchtag(f,g){return new RegExp("<(?:\\w+:)?"+f+'(?: xml:space="preserve")?(?:[^>]*)>([^☃]*)(?:\\w+:)?'+f+">",(g||"")+"m")}function parseVector(data){var h=parsexmltag(data);var matches=data.match(new RegExp("(.*?)","g"))||[];if(matches.length!=h.size)throw"unexpected vector length "+matches.length+" != "+h.size;var res=[];matches.forEach(function(x){var v=x.replace(/<[/]?vt:variant>/g,"").match(/]*)>(.*));res.push({v:v[2],t:v[1]})});return res}function isval(x){return typeof x!=="undefined"&&x!==null}function readIEEE754(buf,idx,isLE,nl,ml){if(isLE===undefined)isLE=true;if(!nl)nl=8;if(!ml&&nl===8)ml=52;var e,m,el=nl*8-ml-1,eMax=(1<>1;var bits=-7,d=isLE?-1:1,i=isLE?nl-1:0,s=buf[idx+i];i+=d;e=s&(1<<-bits)-1;s>>>=-bits;bits+=el;for(;bits>0;e=e*256+buf[idx+i],i+=d,bits-=8);m=e&(1<<-bits)-1;e>>>=-bits;bits+=ml;for(;bits>0;m=m*256+buf[idx+i],i+=d,bits-=8);if(e===eMax)return m?NaN:(s?-1:1)*Infinity;else if(e===0)e=1-eBias;else{m=m+Math.pow(2,ml);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-ml)}var __toBuffer;if(typeof Buffer!=="undefined"){Buffer.prototype.hexlify=function(){return this.toString("hex")};__toBuffer=function(bufs){return Buffer.concat(bufs[0])}}else{__toBuffer=function(bufs){var x=[];for(var i=0;i!=bufs[0].length;++i){x=x.concat(bufs[0][i])}return x}}var __readUInt8=function(b,idx){return b.readUInt8?b.readUInt8(idx):b[idx]};var __readUInt16LE=function(b,idx){return b.readUInt16LE?b.readUInt16LE(idx):b[idx+1]*(1<<8)+b[idx]};var __readInt16LE=function(b,idx){var u=__readUInt16LE(b,idx);if(!(u&32768))return u;return(65535-u+1)*-1};var __readUInt32LE=function(b,idx){return b.readUInt32LE?b.readUInt32LE(idx):b[idx+3]*(1<<24)+b[idx+2]*(1<<16)+b[idx+1]*(1<<8)+b[idx]};var __readInt32LE=function(b,idx){if(b.readInt32LE)return b.readInt32LE(idx);var u=__readUInt32LE(b,idx);if(!(u&2147483648))return u;return(4294967295-u+1)*-1};var __readDoubleLE=function(b,idx){return b.readDoubleLE?b.readDoubleLE(idx):readIEEE754(b,idx||0)};function ReadShift(size,t){var o="",oo=[],w,vv,i,loc;t=t||"u";if(size==="ieee754"){size=8;t="f"}switch(size){case 1:o=__readUInt8(this,this.l);break;case 2:o=(t==="u"?__readUInt16LE:__readInt16LE)(this,this.l);break;case 4:o=__readUInt32LE(this,this.l);break;case 8:if(t==="f"){o=__readDoubleLE(this,this.l);break}case 16:o=this.toString("hex",this.l,this.l+size);break;case"dbcs":size=2*t;loc=this.l;for(i=0;i!=t;++i){oo.push(_getchar(__readUInt16LE(this,loc)));loc+=2}o=oo.join("");break;case"sbcs":size=t;o="";loc=this.l;for(i=0;i!=t;++i){o+=_getchar(__readUInt8(this,loc));loc+=1}break}this.l+=size;return o}function prep_blob(blob,pos){blob.read_shift=ReadShift.bind(blob);blob.l=pos||0;var read=ReadShift.bind(blob);return[read]}function parsenoop(blob,length){blob.l+=length}var recordhopper=function(data,cb,opts){var tmpbyte,cntbyte,length;prep_blob(data,data.l||0);while(data.l"+escapexml(str)+"",h:str};if(fRichStr){var dwSizeStrRun=data.read_shift(4);for(var i=0;i!=dwSizeStrRun;++i)rgsStrRun.push(parse_StrRun(data));z.r=JSON.stringify(rgsStrRun)}if(fExtStr){}data.l=start+length;return z};function parse_Cell(data){var col=data.read_shift(4);var iStyleRef=data.read_shift(2);iStyleRef+=data.read_shift(1)<<16;var fPhShow=data.read_shift(1);return{c:col,iStyleRef:iStyleRef}}var parse_CodeName=function(data,length){return parse_XLWideString(data,length)};var parse_RelID=function(data,length){return parse_XLNullableWideString(data,length)};function parse_RkNumber(data){var b=data.slice(data.l,data.l+4);var fX100=b[0]&1,fInt=b[0]&2;data.l+=4;b[0]&=~3;var RK=fInt===0?__readDoubleLE([0,0,0,0,b[0],b[1],b[2],b[3]],0):__readInt32LE(b,0)>>2;return fX100?RK/100:RK}var parse_UncheckedRfX=function(data){var cell={s:{},e:{}};cell.s.r=data.read_shift(4);cell.e.r=data.read_shift(4);cell.s.c=data.read_shift(4);cell.e.c=data.read_shift(4);return cell};var parse_XLNullableWideString=function(data){var cchCharacters=data.read_shift(4);return cchCharacters===0||cchCharacters===4294967295?"":data.read_shift("dbcs",cchCharacters)};var parse_XLWideString=function(data){var cchCharacters=data.read_shift(4);return cchCharacters===0?"":data.read_shift("dbcs",cchCharacters)};function parse_Xnum(data,length){return data.read_shift("ieee754")}var BErr={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"};var RBErr=evert(BErr);function parse_BrtColor(data,length){var read=data.read_shift.bind(data);var out={};var d=read(1);out.fValidRGB=d&1;out.xColorType=d>>>1;out.index=read(1);out.nTintAndShade=read(2,"i");out.bRed=read(1);out.bGreen=read(1);out.bBlue=read(1);out.bAlpha=read(1)}function parse_FontFlags(data,length){var d=data.read_shift(1);data.l++;var out={fItalic:d&2,fStrikeout:d&8,fOutline:d&16,fShadow:d&32,fCondense:d&64,fExtend:d&128};return out}var CS2CP={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var parse_rs=function(){var tregex=matchtag("t"),rpregex=matchtag("rPr");var parse_rpr=function(rpr,intro,outro){var font={},cp=65001;(rpr.match(/<[^>]*>/g)||[]).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case"":break;case"":break;case"":font.strike=1;break;case"":break;case"":font.u=1;break;case"":break;case"":font.b=1;break;case"":break;case"":font.i=1;break;case"":break;case"');outro.push("");return cp};function parse_r(r){var terms=[[],"",[]];var t=r.match(tregex),cp=65001;if(!isval(t))return"";terms[1]=t[1];var rpr=r.match(rpregex);if(isval(rpr))cp=parse_rpr(rpr[1],terms[0],terms[2]);return terms[0].join("")+terms[1].replace(/\r\n/g,"
")+terms[2].join("")}return function(rs){return rs.replace(//g,"").split(/<\/r>/).map(parse_r).join("")}}();var parse_si=function(x,opts){var html=opts?opts.cellHTML:true;var z={};if(!x)return null;var y;if(x[1]==="t"){z.t=utf8read(unescapexml(x.substr(x.indexOf(">")+1).split(/<\/t>/)[0]));z.r=x;if(html)z.h=z.t}else if(y=x.match(//)){z.r=x;z.t=utf8read(unescapexml(x.replace(/<[^>]*>/gm,"")));if(html)z.h=parse_rs(x)}return z};var parse_sst_xml=function(data,opts){var s=[];var sst=data.match(new RegExp("]*)>([\\s\\S]*)","m"));if(isval(sst)){s=sst[2].replace(/<(?:si|sstItem)>/g,"").split(/<\/(?:si|sstItem)>/).map(function(x){return parse_si(x,opts)}).filter(function(x){return x});sst=parsexmltag(sst[1]);s.Count=sst.count;s.Unique=sst.uniqueCount}return s};var parse_BrtBeginSst=function(data,length){return[data.read_shift(4),data.read_shift(4)]};var parse_sst_bin=function(data,opts){var s=[];var pass=false;recordhopper(data,function(val,R,RT){switch(R.n){case"BrtBeginSst":s.Count=val[0];s.Unique=val[1];break;case"BrtSSTItem":s.push(val);break;case"BrtEndSst":return true;case"BrtFRTBegin":pass=true;break;case"BrtFRTEnd":pass=false;break;default:if(!pass||opts.WTF)throw new Error("Unexpected record "+RT+" "+R.n)}});return s};var styles={};function parseNumFmts(t,opts){styles.NumberFmt=[];for(var y in SSF._table)styles.NumberFmt[y]=SSF._table[y];t[0].match(/<[^>]*>/g).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case"":case"":break;case"0)SSF.load(f,i)}break;default:if(opts.WTF)throw"unrecognized "+y[0]+" in numFmts"}})}function parseCXfs(t,opts){styles.CellXf=[];t[0].match(/<[^>]*>/g).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case"":case"