sheetjs/dist/xlsx.min.js

15 lines
374 KiB
JavaScript
Raw Normal View History

/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
var DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;var XLSX={};(function e(r){r.version="0.12.12";var t=1200,a=1252;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined"){if(typeof global!=="undefined")global.cptable=undefined;else if(typeof window!=="undefined")window.cptable=undefined}}var n=[874,932,936,949,950];for(var i=0;i<=8;++i)n.push(1250+i);var s={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 l=function(e){if(n.indexOf(e)==-1)return;a=s[0]=e};function f(){l(1252)}var c=function(e){t=e;l(e)};function o(){c(1200);f()}function u(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function h(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function d(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var v=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);if(r==255&&t==254)return h(e.slice(2));if(r==254&&t==255)return d(e.slice(2));if(r==65279)return e.slice(1);return e};var p=function Fm(e){return String.fromCharCode(e)};if(typeof cptable!=="undefined"){c=function(e){t=e};v=function(e){if(e.charCodeAt(0)===255&&e.charCodeAt(1)===254){return cptable.utils.decode(1200,u(e.slice(2)))}return e};p=function Dm(e){if(t===1200)return String.fromCharCode(e);return cptable.utils.decode(t,[e&255,e>>8])[0]}}var m=null;var b=true;var g=function Om(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(r){var t="";var a=0,n=0,i=0,s=0,l=0,f=0,c=0;for(var o=0;o<r.length;){a=r.charCodeAt(o++);s=a>>2;n=r.charCodeAt(o++);l=(a&3)<<4|n>>4;i=r.charCodeAt(o++);f=(n&15)<<2|i>>6;c=i&63;if(isNaN(n)){f=c=64}else if(isNaN(i)){c=64}t+=e.charAt(s)+e.charAt(l)+e.charAt(f)+e.charAt(c)}return t},decode:function r(t){var a="";var n=0,i=0,s=0,l=0,f=0,c=0,o=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<t.length;){l=e.indexOf(t.charAt(u++));f=e.indexOf(t.charAt(u++));n=l<<2|f>>4;a+=String.fromCharCode(n);c=e.indexOf(t.charAt(u++));i=(f&15)<<4|c>>2;if(c!==64){a+=String.fromCharCode(i)}o=e.indexOf(t.charAt(u++));s=(c&3)<<6|o;if(o!==64){a+=String.fromCharCode(s)}}return a}}}();var E=typeof Buffer!=="undefined"&&typeof process!=="undefined"&&typeof process.versions!=="undefined"&&process.versions.node;if(typeof Buffer!=="undefined"){if(!Buffer.from)Buffer.from=function(e,r){return r?new Buffer(e,r):new Buffer(e)};if(!Buffer.alloc)Buffer.alloc=function(e){return new Buffer(e)}}function S(e){return E?Buffer.alloc(e):new Array(e)}var k=function Pm(e){if(E)return Buffer.from(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function w(e){if(typeof ArrayBuffer==="undefined")return k(e);var r=new ArrayBuffer(e.length),t=new Uint8Array(r);for(var a=0;a!=e.length;++a)t[a]=e.charCodeAt(a)&255;return r}function B(e){if(Array.isArray(e))return e.map(Tv).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=Tv(e[t]);return r.join("")}function C(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function T(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return T(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var I=function(e){return[].concat.apply([],e)};var x=/\u0000/g,A=/[\u0001-\u0006]/g;var R={};var _=function Nm(e){e.version="0.10.2";function r(e){var r="",t=e.length-1;while(t>=0)r+=e.charAt(t--);return r}function t(e,r){var t="";while(t.length<r)t+=e;return t}function a(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}function n(e,r){var a=""+e;return a.length>=r?a:t(" ",r-a.length)+a}function i(e,r){var a=""+e;return a.length>=r?a:a+t(" ",r-a.length)}function s(e,r){var a=""+Math.round(e);return a.length>=r?a:t("0",r-a.length)+a}function l(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}var
var i=[];var s=a;while(t&&n>0&&s>=0){i.push(r.slice(s*R,s*R+R));n-=R;s=Fr(t,s*4)}if(i.length===0)return Vr(0);return I(i).slice(0,e.size)}function h(e,r,t,a,n){var i=_;if(e===_){if(r!==0)throw new Error("DIFAT chain shorter than expected")}else if(e!==-1){var s=t[e],l=(a>>>2)-1;if(!s)return;for(var f=0;f<l;++f){if((i=Fr(s,f*4))===_)break;n.push(i)}h(Fr(s,a-4),r-1,t,a,n)}}function d(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var l=a-1,f=0,c=0;for(f=r;f>=0;){n[f]=true;i[i.length]=f;s.push(e[f]);var o=t[Math.floor(f*4/a)];c=f*4&l;if(a<4+c)throw new Error("FAT boundary crossed: "+f+" 4 "+a);if(!e[o])break;f=Fr(e[o],c)}return{nodes:i,data:lr([s])}}function v(e,r,t,a){var n=e.length,i=[];var s=[],l=[],f=[];var c=a-1,o=0,u=0,h=0,d=0;for(o=0;o<n;++o){l=[];h=o+r;if(h>=n)h-=n;if(s[h])continue;f=[];for(u=h;u>=0;){s[u]=true;l[l.length]=u;f.push(e[u]);var v=t[Math.floor(u*4/a)];d=u*4&c;if(a<4+d)throw new Error("FAT boundary crossed: "+u+" 4 "+a);if(!e[v])break;u=Fr(e[v],d)}i[h]={nodes:l,data:lr([f])}}return i}function p(e,r,t,a,n,i,s,l){var f=0,c=a.length?2:0;var o=r[e].data;var h=0,v=0,p;for(;h<o.length;h+=128){var b=o.slice(h,h+128);Wr(b,64);v=b._R(2);p=cr(b,0,v-c);a.push(p);var g={name:p,type:b._R(1),color:b._R(1),L:b._R(4,"i"),R:b._R(4,"i"),C:b._R(4,"i"),clsid:b._R(16),state:b._R(4,"i"),start:0,size:0};var E=b._R(2)+b._R(2)+b._R(2)+b._R(2);if(E!==0)g.ct=m(b,b.l-8);var S=b._R(2)+b._R(2)+b._R(2)+b._R(2);if(S!==0)g.mt=m(b,b.l-8);g.start=b._R(4,"i");g.size=b._R(4,"i");if(g.size<0&&g.start<0){g.size=g.type=0;g.start=_;g.name=""}if(g.type===5){f=g.start;if(n>0&&f!==_)r[f].name="!StreamData"}else if(g.size>=4096){g.storage="fat";if(r[g.start]===undefined)r[g.start]=d(t,g.start,r.fat_addrs,r.ssz);r[g.start].name=g.name;g.content=r[g.start].data.slice(0,g.size)}else{g.storage="minifat";if(g.size<0)g.size=0;else if(f!==_&&g.start!==_&&r[f]){g.content=u(g,r[f].data,(r[l]||{}).data)}}if(g.content)Wr(g.content,0);i[p]=g;s.push(g)}}function m(e,r){return new Date((yr(e,r+4)/1e7*Math.pow(2,32)+yr(e,r)/1e7-11644473600)*1e3)}function b(e,r){i();return s(n.readFileSync(e),r)}function E(e,r){switch(r&&r.type||"base64"){case"file":return b(e,r);case"base64":return s(k(g.decode(e)),r);case"binary":return s(k(e),r);}return s(e,r)}function S(e,r){var t=r||{},a=t.root||"Root Entry";if(!e.FullPaths)e.FullPaths=[];if(!e.FileIndex)e.FileIndex=[];if(e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");if(e.FullPaths.length===0){e.FullPaths[0]=a+"/";e.FileIndex[0]={name:a,type:5}}if(t.CLSID)e.FileIndex[0].clsid=t.CLSID;w(e)}function w(e){var r="Sh33tJ5";if(M.find(e,"/"+r))return;var t=Vr(4);t[0]=55;t[1]=t[3]=50;t[2]=54;e.FileIndex.push({name:r,type:2,content:t,size:4,L:69,R:69,C:69});e.FullPaths.push(e.FullPaths[0]+r);B(e)}function B(e,n){S(e);var i=false,s=false;for(var l=e.FullPaths.length-1;l>=0;--l){var f=e.FileIndex[l];switch(f.type){case 0:if(s)i=true;else{e.FileIndex.pop();e.FullPaths.pop()}break;case 1:;case 2:;case 5:s=true;if(isNaN(f.R*f.L*f.C))i=true;if(f.R>-1&&f.L>-1&&f.R==f.L)i=true;break;default:i=true;break;}}if(!i&&!n)return;var c=new Date(1987,1,19),o=0;var u=[];for(l=0;l<e.FullPaths.length;++l){if(e.FileIndex[l].type===0)continue;u.push([e.FullPaths[l],e.FileIndex[l]])}for(l=0;l<u.length;++l){var h=t(u[l][0]);s=false;for(o=0;o<u.length;++o)if(u[o][0]===h)s=true;if(!s)u.push([h,{name:a(h).replace("/",""),type:1,clsid:D,ct:c,mt:c,content:null}])}u.sort(function(e,t){return r(e[0],t[0])});e.FullPaths=[];e.FileIndex=[];for(l=0;l<u.length;++l){e.FullPaths[l]=u[l][0];e.FileIndex[l]=u[l][1]}for(l=0;l<u.length;++l){var d=e.FileIndex[l];var v=e.FullPaths[l];d.name=a(v).replace("/","");d.L=d.R=d.C=-(d.color=1);d.size=d.content?d.content.length:0;d.start=0;d.clsid=d.clsid||D;if(l===0){d.C=u.length>1?1:-1;d.size=0;d.type=5}else if(v.slice(-1)=="/"){for(o=l+1;o<u.length;++o)if(t(e.FullPaths[o])==v)break;d.C=o>=u.length?-1:o;for(o=l+1;o<u.length;++o)if(t(e.FullPaths[o])==t(v))break;d.R=o>=u.length?-1:o;d.type=1}else{if(t(e.FullPaths[l+1]||"")==t(v))d.R=l+1;d.type=2}}}function C(e,r){var t=r||{};B(e);var a=function(e){var r=0,t
return(e.s.cRel?"":"$")+at(e.s.c)+":"+(e.e.cRel?"":"$")+at(e.e.c)}}if(e.s.c==0&&!e.s.cRel){if(e.e.c==(r.biff>=12?65535:255)&&!e.e.cRel){return(e.s.rRel?"":"$")+qr(e.s.r)+":"+(e.e.rRel?"":"$")+qr(e.e.r)}}return $r(e.s,r.biff)+":"+$r(e.e,r.biff)}var Qr={};var Jr=function(e,r){var t;if(typeof r!=="undefined")t=r;else if(typeof require!=="undefined"){try{t=undefined}catch(a){t=null}}e.rc4=function(e,r){var t=new Array(256);var a=0,n=0,i=0,s=0;for(n=0;n!=256;++n)t[n]=n;for(n=0;n!=256;++n){i=i+t[n]+e[n%e.length].charCodeAt(0)&255;s=t[n];t[n]=t[i];t[i]=s}n=i=0;var l=Buffer(r.length);for(a=0;a!=r.length;++a){n=n+1&255;i=(i+t[n])%256;s=t[n];t[n]=t[i];t[i]=s;l[a]=r[a]^t[t[n]+t[i]&255]}return l};e.md5=function(e){if(!t)throw new Error("Unsupported crypto");return t.createHash("md5").update(e).digest("hex")}};Jr(Qr,typeof crypto!=="undefined"?crypto:undefined);function Zr(e){return parseInt(rt(e),10)-1}function qr(e){return""+(e+1)}function et(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function rt(e){return e.replace(/\$(\d+)$/,"$1")}function tt(e){var r=it(e),t=0,a=0;for(;a!==r.length;++a)t=26*t+r.charCodeAt(a)-64;return t-1}function at(e){var r="";for(++e;e;e=Math.floor((e-1)/26))r=String.fromCharCode((e-1)%26+65)+r;return r}function nt(e){return e.replace(/^([A-Z])/,"$$$1")}function it(e){return e.replace(/^\$([A-Z])/,"$1")}function st(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function lt(e){var r=st(e);return{c:tt(r[0]),r:Zr(r[1])}}function ft(e){return at(e.c)+qr(e.r)}function ct(e){var r=e.split(":").map(lt);return{s:r[0],e:r[r.length-1]}}function ot(e,r){if(typeof r==="undefined"||typeof r==="number"){return ot(e.s,e.e)}if(typeof e!=="string")e=ft(e);if(typeof r!=="string")r=ft(r);return e==r?e:e+":"+r}function ut(e){var r={s:{c:0,r:0},e:{c:0,r:0}};var t=0,a=0,n=0;var i=e.length;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.s.c=--t;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.s.r=--t;if(a===i||e.charCodeAt(++a)===58){r.e.c=r.s.c;r.e.r=r.s.r;return r}for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.e.c=--t;for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.e.r=--t;return r}function ht(e,r){var t=e.t=="d"&&r instanceof Date;if(e.z!=null)try{return e.w=R.format(e.z,t?J(r):r)}catch(a){}try{return e.w=R.format((e.XF||{}).numFmtId||(t?14:0),t?J(r):r)}catch(a){return""+r}}function dt(e,r,t){if(e==null||e.t==null||e.t=="z")return"";if(e.w!==undefined)return e.w;if(e.t=="d"&&!e.z&&t&&t.dateNF)e.z=t.dateNF;if(r==undefined)return ht(e,e.v);return ht(e,r)}function vt(e,r){var t=r&&r.sheet?r.sheet:"Sheet1";var a={};a[t]=e;return{SheetNames:[t],Sheets:a}}function pt(e,r,t){var a=t||{};var n=e?Array.isArray(e):a.dense;if(m!=null&&n==null)n=m;var i=e||(n?[]:{});var s=0,l=0;if(i&&a.origin!=null){if(typeof a.origin=="number")s=a.origin;else{var f=typeof a.origin=="string"?lt(a.origin):a.origin;s=f.r;l=f.c}}var c={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var o=ut(i["!ref"]);c.s.c=o.s.c;c.s.r=o.s.r;c.e.c=Math.max(c.e.c,o.e.c);c.e.r=Math.max(c.e.r,o.e.r);if(s==-1)c.e.r=s=o.e.r+1}for(var u=0;u!=r.length;++u){for(var h=0;h!=r[u].length;++h){if(typeof r[u][h]==="undefined")continue;var d={v:r[u][h]};if(Array.isArray(d.v)){d.f=r[u][h][1];d.v=d.v[0]}var v=s+u,p=l+h;if(c.s.r>v)c.s.r=v;if(c.s.c>p)c.s.c=p;if(c.e.r<v)c.e.r=v;if(c.e.c<p)c.e.c=p;if(d.v===null){if(d.f)d.t="n";else if(!a.cellStubs)continue;else d.t="z"}else if(typeof d.v==="number")d.t="n";else if(typeof d.v==="boolean")d.t="b";else if(d.v instanceof Date){d.z=a.dateNF||R._table[14];if(a.cellDates){d.t="d";d.w=R.format(d.z,J(d.v))}else{d.t="n";d.v=J(d.v);d.w=R.format(d.z,d.v)}}else d.t="s";if(n){if(!i[v])i[v]=[];i[v][p]=d}else{var b=ft({c:p,r:v});i[b]=d}}}if(c.s.c<1e7)i["!ref"]=ot(c);return i}function mt(e,r){return pt(null,e,r)}function bt(e,r){if(!r)r=Vr(4);r._W(4,e);return r}function gt(e){var r=e._R(4);return r===0?"":e._R(r,"dbcs")}function Et(e,r){var t=false;if(r==null){t=true;r=Vr(4+2*e.length)}r._W(4,e.length);if(e.length>0)r._W(0,e,"dbcs");return t?r.slice(0,r.l):r}function S
return n;case 3:n=e._R(4,"i");return n;case 11:return e._R(4)!==0;case 19:n=e._R(4);return n;case 30:return un(e,a,4).replace(x,"");case 31:return hn(e);case 64:return cn(e);case 65:return wn(e);case 71:return Bn(e);case 80:return vn(e,a,!i.raw).replace(x,"");case 81:return pn(e,a).replace(x,"");case 4108:return Sn(e);case 4126:return bn(e);default:throw new Error("TypedPropertyValue unrecognized type "+r+" "+a);}}function Tn(e,r){var t=Vr(4),a=Vr(4);t._W(4,e==80?31:e);switch(e){case 3:a._W(-4,r);break;case 5:a=Vr(8);a._W(8,r,"f");break;case 11:a._W(4,r?1:0);break;case 64:a=on(r);break;case 31:;case 80:a=Vr(4+2*(r.length+1)+(r.length%2?0:2));a._W(4,r.length+1);a._W(0,r,"dbcs");while(a.l!=a.length)a._W(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+r);}return I([t,a])}function In(e,r){var t=e.l;var a=e._R(4);var n=e._R(4);var i=[],s=0;var l=0;var f=-1,o={};for(s=0;s!=n;++s){var u=e._R(4);var h=e._R(4);i[s]=[u,h+t]}i.sort(function(e,r){return e[1]-r[1]});var d={};for(s=0;s!=n;++s){if(e.l!==i[s][1]){var v=true;if(s>0&&r)switch(r[i[s-1][0]].t){case 2:if(e.l+2===i[s][1]){e.l+=2;v=false}break;case 80:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;case 4108:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;}if((!r||s==0)&&e.l<=i[s][1]){v=false;e.l=i[s][1]}if(v)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(r){var p=r[i[s][0]];d[p.n]=Cn(e,p.t,{raw:true});if(p.p==="version")d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(d[p.n]&65535)).slice(-4);if(p.n=="CodePage")switch(d[p.n]){case 0:d[p.n]=1252;case 874:;case 932:;case 936:;case 949:;case 950:;case 1250:;case 1251:;case 1253:;case 1254:;case 1255:;case 1256:;case 1257:;case 1258:;case 1e4:;case 1200:;case 1201:;case 1252:;case 65e3:;case-536:;case 65001:;case-535:c(l=d[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+d[p.n]);}}else{if(i[s][0]===1){l=d.CodePage=Cn(e,Zt);c(l);if(f!==-1){var m=e.l;e.l=i[f][1];o=kn(e,l);e.l=m}}else if(i[s][0]===0){if(l===0){f=s;e.l=i[s+1][1];continue}o=kn(e,l)}else{var b=o[i[s][0]];var g;switch(e[e.l]){case 65:e.l+=4;g=wn(e);break;case 30:e.l+=4;g=vn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4;g=vn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4;g=e._R(4,"i");break;case 19:e.l+=4;g=e._R(4);break;case 5:e.l+=4;g=e._R(8,"f");break;case 11:e.l+=4;g=Pn(e,4);break;case 64:e.l+=4;g=te(cn(e));break;default:throw new Error("unparsed value: "+e[e.l]);}d[b]=g}}}e.l=t+a;return d}var xn=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"].concat($a);function An(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break;}return-1}function Rn(e,r,t){var a=Vr(8),n=[],i=[];var s=8,l=0;var f=Vr(8),c=Vr(8);f._W(4,2);f._W(4,1200);c._W(4,1);i.push(f);n.push(c);s+=8+f.length;if(!r){c=Vr(8);c._W(4,0);n.unshift(c);var o=[Vr(4)];o[0]._W(4,e.length);for(l=0;l<e.length;++l){var u=e[l][0];f=Vr(4+4+2*(u.length+1)+(u.length%2?0:2));f._W(4,l+2);f._W(4,u.length+1);f._W(0,u,"dbcs");while(f.l!=f.length)f._W(1,0);o.push(f)}f=I(o);i.unshift(f);s+=8+f.length}for(l=0;l<e.length;++l){if(r&&!r[e[l][0]])continue;if(xn.indexOf(e[l][0])>-1)continue;if(e[l][1]==null)continue;var h=e[l][1],d=0;if(r){d=+r[e[l][0]];var v=t[d];if(v.p=="version"&&typeof h=="string")h=(+(h=h.split("."))[0]<<16)+(+h[1]||0);f=Tn(v.t,h)}else{var p=An(h);if(p==-1){p=31;h=String(h)}f=Tn(p,h)}i.push(f);c=Vr(8);c._W(4,!r?2+l:d);n.push(c);s+=8+f.length}var m=8*(i.length+1);for(l=0;l<i.length;++l){n[l]._W(4,m);m+=i[l].length}a._W(4,s);a._W(4,i.length);return I([a].concat(n).concat(i))}function _n(e,r,t){var a=e.content;if(!a)return{};Wr(a,0);var n,i,s,l,f=0;a.chk("feff","Byte Order: ");a._R(2);var c=a._R(4);var o=a._R(16);if(o!==M.utils.consts.HEADER_CLSID&&o!==t)throw new Error("Bad PropertySet CLSID "+o);n=a._R(4);if(n!==1&&n!==2)throw new Error("Unrecognized #Sets: "+n);i=a._R(16);l=a._R(4);if(n===1&&l!==a.l)throw new Error("Length mismatch: "+l+" !== "+a.l);else if(n===2){s=a._R(16);f=a._R(4)}var u=In(a,r);va
break;case"F":break;case"G":break;case"P":c=f[parseInt(b[s].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":d=b[s].slice(1).split(" ");for(p=parseInt(d[0],10);p<=parseInt(d[1],10);++p){v=parseInt(d[2],10);h[p-1]=v===0?{hidden:true}:{wch:v};af(h[p-1])}break;case"C":n=parseInt(b[s].slice(1))-1;if(!h[n])h[n]={};break;case"R":a=parseInt(b[s].slice(1))-1;if(!u[a])u[a]={};if(v>0){u[a].hpt=v;u[a].hpx=ff(v)}else if(v===0)u[a].hidden=true;break;default:if(r&&r.WTF)throw new Error("SYLK bad record "+m);}if(w<1)c=null;break;default:if(r&&r.WTF)throw new Error("SYLK bad record "+m);}}if(u.length>0)o["!rows"]=u;if(h.length>0)o["!cols"]=h;if(r&&r.sheetRows)l=l.slice(0,r.sheetRows);return[l,o]}function t(r,t){var a=e(r,t);var n=a[0],i=a[1];var s=mt(n,t);X(i).forEach(function(e){s[e]=i[e]});return s}function a(e,r){return vt(t(e,r),r)}function n(e,r,t,a){var n="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":n+=e.v||0;if(e.f&&!e.F)n+=";E"+Vc(e.f,{r:t,c:a});break;case"b":n+=e.v?"TRUE":"FALSE";break;case"e":n+=e.w||e.v;break;case"d":n+='"'+(e.w||e.v)+'"';break;case"s":n+='"'+e.v.replace(/"/g,"")+'"';break;}return n}function i(e,r){r.forEach(function(r,t){var a="F;W"+(t+1)+" "+(t+1)+" ";if(r.hidden)a+="0";else{if(typeof r.width=="number")r.wpx=Zl(r.width);if(typeof r.wpx=="number")r.wch=ql(r.wpx);if(typeof r.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}function s(e,r){r.forEach(function(r,t){var a="F;";if(r.hidden)a+="M0;";else if(r.hpt)a+="M"+20*r.hpt+";";else if(r.hpx)a+="M"+20*lf(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}function l(e,r){var t=["ID;PWXL;N;E"],a=[];var l=ut(e["!ref"]),f;var c=Array.isArray(e);var o="\r\n";t.push("P;PGeneral");t.push("F;P0;DG0G8;M255");if(e["!cols"])i(t,e["!cols"]);if(e["!rows"])s(t,e["!rows"]);t.push("B;Y"+(l.e.r-l.s.r+1)+";X"+(l.e.c-l.s.c+1)+";D"+[l.s.c,l.s.r,l.e.c,l.e.r].join(" "));for(var u=l.s.r;u<=l.e.r;++u){for(var h=l.s.c;h<=l.e.c;++h){var d=ft({r:u,c:h});f=c?(e[u]||[])[h]:e[d];if(!f||f.v==null&&(!f.f||f.F))continue;a.push(n(f,e,u,h,r))}}return t.join(o)+o+a.join(o)+o+"E"+o}return{to_workbook:a,to_sheet:t,from_sheet:l}}();var Zs=function(){function e(e,t){switch(t.type){case"base64":return r(g.decode(e),t);case"binary":return r(e,t);case"buffer":return r(e.toString("binary"),t);case"array":return r(ae(e),t);}throw new Error("Unrecognized type "+t.type)}function r(e,r){var t=e.split("\n"),a=-1,n=-1,i=0,s=[];for(;i!==t.length;++i){if(t[i].trim()==="BOT"){s[++a]=[];n=0;continue}if(a<0)continue;var l=t[i].trim().split(",");var f=l[0],c=l[1];++i;var o=t[i].trim();switch(+f){case-1:if(o==="BOT"){s[++a]=[];n=0;continue}else if(o!=="EOD")throw new Error("Unrecognized DIF special command "+o);break;case 0:if(o==="TRUE")s[a][n]=true;else if(o==="FALSE")s[a][n]=false;else if(!isNaN(se(c)))s[a][n]=se(c);else if(!isNaN(le(c).getDate()))s[a][n]=te(c);else s[a][n]=c;++n;break;case 1:o=o.slice(1,o.length-1);s[a][n++]=o!==""?o:null;break;}if(o==="EOD")break}if(r&&r.sheetRows)s=s.slice(0,r.sheetRows);return s}function t(r,t){return mt(e(r,t),t)}function a(e,r){return vt(t(e,r),r)}var n=function(){var e=function t(e,r,a,n,i){e.push(r);e.push(a+","+n);e.push('"'+i.replace(/"/g,'""')+'"')};var r=function a(e,r,t,n){e.push(r+","+t);e.push(r==1?'"'+n.replace(/"/g,'""')+'"':n)};return function n(t){var a=[];var n=ut(t["!ref"]),i;var s=Array.isArray(t);e(a,"TABLE",0,1,"sheetjs");e(a,"VECTORS",0,n.e.r-n.s.r+1,"");e(a,"TUPLES",0,n.e.c-n.s.c+1,"");e(a,"DATA",0,0,"");for(var l=n.s.r;l<=n.e.r;++l){r(a,-1,0,"BOT");for(var f=n.s.c;f<=n.e.c;++f){var c=ft({r:l,c:f});i=s?(t[l]||[])[f]:t[c];if(!i){r(a,1,0,"");continue}switch(i.t){case"n":var o=b?i.w:i.v;if(!o&&i.v!=null)o=i.v;if(o==null){if(b&&i.f&&!i.F)r(a,1,0,"="+i.f);else r(a,1,0,"")}else r(a,0,o,"V");break;case"b":r(a,0,i.v?1:0,i.v?"TRUE":"FALSE");break;case"s":r(a,1,0,!b||isNaN(i.v)?i.v:'="'+i.v+'"');break;case"d":if(!i.w)i.w=R.format(i.z||R._table[14],J(te(i.v)));if(b)r(a,0,i.w,"V");else r(a,1,0,i.w);break;default:r(a,1,0,"");}}}r(a,-1,0,"EOD");var u="\r\n";var h=a.join(u);return h}}();return{to_workbook:a,to_sheet:t,from_s
break;case"<color":if(!n.color)n.color={};if(l.auto)n.color.auto=Ue(l.auto);if(l.rgb)n.color.rgb=l.rgb.slice(-6);else if(l.indexed){n.color.index=parseInt(l.indexed,10);var f=Ea[n.color.index];if(n.color.index==81)f=Ea[1];if(!f)throw new Error(e);n.color.rgb=f[0].toString(16)+f[1].toString(16)+f[2].toString(16)}else if(l.theme){n.color.theme=parseInt(l.theme,10);if(l.tint)n.color.tint=parseFloat(l.tint);if(l.theme&&t.themeElements&&t.themeElements.clrScheme){n.color.rgb=Kl(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)throw new Error("unrecognized "+l[0]+" in fonts")};}})}function df(e,r,t){r.NumberFmt=[];var a=X(R._table);for(var n=0;n<a.length;++n)r.NumberFmt[a[n]]=R._table[a[n]];var i=e[0].match(we);if(!i)return;for(n=0;n<i.length;++n){var s=Te(i[n]);switch(s[0]){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{var l=Re(We(s.formatCode)),f=parseInt(s.numFmtId,10);r.NumberFmt[f]=l;if(f>0){if(f>392){for(f=392;f>60;--f)if(r.NumberFmt[f]==null)break;r.NumberFmt[f]=l}R.load(l,f)}}break;case"</numFmt>":break;default:if(t.WTF)throw new Error("unrecognized "+s[0]+" in numFmts");}}}function vf(e){var r=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var a=t[0];a<=t[1];++a)if(e[a]!=null)r[r.length]=er("numFmt",null,{numFmtId:a,formatCode:Fe(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=er("numFmts",null,{count:r.length-2}).replace("/>",">");return r.join("")}var pf=["numFmtId","fillId","fontId","borderId","xfId"];var mf=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function bf(e,r,t){r.CellXf=[];var a;var n=false;e[0].match(we).forEach(function(e){var i=Te(e),s=0;switch(i[0]){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":a=i;delete a[0];for(s=0;s<pf.length;++s)if(a[pf[s]])a[pf[s]]=parseInt(a[pf[s]],10);for(s=0;s<mf.length;++s)if(a[mf[s]])a[mf[s]]=Ue(a[mf[s]]);if(a.numFmtId>392){for(s=392;s>60;--s)if(r.NumberFmt[a.numFmtId]==r.NumberFmt[s]){a.numFmtId=s;break}}r.CellXf.push(a);break;case"</xf>":break;case"<alignment":;case"<alignment/>":var l={};if(i.vertical)l.vertical=i.vertical;if(i.horizontal)l.horizontal=i.horizontal;if(i.textRotation!=null)l.textRotation=i.textRotation;if(i.indent)l.indent=i.indent;if(i.wrapText)l.wrapText=i.wrapText;a.alignment=l;break;case"</alignment>":break;case"<protection":;case"</protection>":;case"<protection/>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(t&&t.WTF){if(!n)throw new Error("unrecognized "+i[0]+" in cellXfs")};}})}function gf(e){var r=[];r[r.length]=er("cellXfs",null);e.forEach(function(e){r[r.length]=er("xf",null,e)});r[r.length]="</cellXfs>";if(r.length===2)return"";r[0]=er("cellXfs",null,{count:r.length-2}).replace("/>",">");return r.join("")}var Ef=function Zm(){var e=/<numFmts([^>]*)>[\S\s]*?<\/numFmts>/;var r=/<cellXfs([^>]*)>[\S\s]*?<\/cellXfs>/;var t=/<fills([^>]*)>[\S\s]*?<\/fills>/;var a=/<fonts([^>]*)>[\S\s]*?<\/fonts>/;var n=/<borders([^>]*)>[\S\s]*?<\/borders>/;return function i(s,l,f){var c={};if(!s)return c;s=s.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var o;if(o=s.match(e))df(o,c,f);if(o=s.match(a))hf(o,c,l,f);if(o=s.match(t))uf(o,c,l,f);if(o=s.match(n))of(o,c,l,f);if(o=s.match(r))bf(o,c,f);return c}}();var Sf=er("styleSheet",null,{xmlns:ar.main[0],"xmlns:vt":ar.vt});Aa.STY="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";function kf(e,r){var t=[Se,Sf],a;if(e.SSF&&(a=vf(e.SSF))!=null)t[t.length]=a;t[t.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>';t[t.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patter
return{s:{r:a,c:i[0],cRel:i[1],rRel:i[2]},e:{r:n,c:s[0],cRel:s[1],rRel:s[2]}}}function Zc(e,r,t){if(t&&t.biff>=2&&t.biff<=5)return qc(e,r,t);var a=e._R(t&&t.biff==12?4:2);var n=$c(e,2);return{r:a,c:n[0],cRel:n[1],rRel:n[2]}}function qc(e){var r=$c(e,2);var t=e._R(1);return{r:r[0],c:t,cRel:r[1],rRel:r[2]}}function eo(e){var r=e._R(2);var t=e._R(2);return{r:r,c:t&255,fQuoted:!!(t&16384),cRel:t>>15,rRel:t>>15}}function ro(e,r,t){var a=t&&t.biff?t.biff:8;if(a>=2&&a<=5)return to(e,r,t);var n=e._R(a>=12?4:2);var i=e._R(2);var s=(i&16384)>>14,l=(i&32768)>>15;i&=16383;if(l==1)while(n>524287)n-=1048576;if(s==1)while(i>8191)i=i-16384;return{r:n,c:i,cRel:s,rRel:l}}function to(e){var r=e._R(2);var t=e._R(1);var a=(r&32768)>>15,n=(r&16384)>>14;r&=16383;if(a==1&&r>=8192)r=r-16384;if(n==1&&t>=128)t=t-256;return{r:r,c:t,cRel:n,rRel:a}}function ao(e,r,t){var a=(e[e.l++]&96)>>5;var n=Yc(e,t.biff>=2&&t.biff<=5?6:8,t);return[a,n]}function no(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2,"i");var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}var s=Yc(e,i,t);return[a,n,s]}function io(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t&&t.biff>8?12:t.biff<8?6:8;return[a]}function so(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2);var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}e.l+=i;return[a,n]}function lo(e,r,t){var a=(e[e.l++]&96)>>5;var n=Jc(e,r-1,t);return[a,n]}function fo(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t.biff==2?6:t.biff==12?14:7;return[a]}function co(e){var r=e[e.l+1]&1;var t=1;e.l+=4;return[r,t]}function oo(e,r,t){e.l+=2;var a=e._R(t&&t.biff==2?1:2);var n=[];for(var i=0;i<=a;++i)n.push(e._R(t&&t.biff==2?1:2));return n}function uo(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function ho(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function vo(e){var r=e[e.l+1]&255?1:0;e.l+=2;return[r,e._R(2)]}function po(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=t&&t.biff==2?3:4;return[a]}function mo(e){var r=e._R(1),t=e._R(1);return[r,t]}function bo(e){e._R(2);return mo(e,2)}function go(e){e._R(2);return mo(e,2)}function Eo(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=Zc(e,0,t);return[a,n]}function So(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=ro(e,0,t);return[a,n]}function ko(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(2);if(t&&t.biff==5)e.l+=12;var i=Zc(e,0,t);return[a,n,i]}function wo(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(t&&t.biff<=3?1:2);return[Nu[n],Pu[n],a]}function Bo(e,r,t){var a=e[e.l++];var n=e._R(1),i=t&&t.biff<=3?[a==88?-1:0,e._R(1)]:Co(e);return[n,(i[0]===0?Pu:Ou)[i[1]]]}function Co(e){return[e[e.l+1]>>7,e._R(2)&32767]}function To(e,r,t){e.l+=t&&t.biff==2?3:4;return}function Io(e,r,t){e.l++;if(t&&t.biff==12)return[e._R(4,"i"),0];var a=e._R(2);var n=e._R(t&&t.biff==2?1:2);return[a,n]}function xo(e){e.l++;return Xt[e._R(1)]}function Ao(e){e.l++;return e._R(2)}function Ro(e){e.l++;return e._R(1)!==0}function _o(e){e.l++;return Ht(e,8)}function yo(e,r,t){e.l++;return Vn(e,r-1,t)}function Fo(e,r){var t=[e._R(1)];if(r==12)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2;break;}switch(t[0]){case 4:t[1]=Pn(e,1)?"TRUE":"FALSE";if(r!=12)e.l+=7;break;case 37:;case 16:t[1]=Xt[e[e.l]];e.l+=r==12?4:8;break;case 0:e.l+=8;break;case 1:t[1]=Ht(e,8);break;case 2:t[1]=jn(e,0,{biff:r>0&&r<8?2:r});break;default:throw new Error("Bad SerAr: "+t[0]);}return t}function Do(e,r,t){var a=e._R(t.biff==12?4:2);var n=[];for(var i=0;i!=a;++i)n.push((t.biff==12?Ut:oi)(e,8));return n}function Oo(e,r,t){var a=0,n=0;if(t.biff==12){a=e._R(4);n=e._R(4)}else{n=1+e._R(1);a=1+e._R(2)}if(t.biff>=2&&t.biff<8){--a;if(--n==0)n=256}for(var i=0,s=[];i!=a&&(s[i]=[]);++i)for(var l=0;l!=n;++l)s[i][l]=Fo(e,t.biff);return s}function Po(e,r,t){var a=e._R(1)>>>5&3;var n=!t||t.biff>=8?4:2;var i=e._R(n);switch(t.biff){case 2:e.l+=5;break;case 3:;case 4:e.l+=8;break;case 5:e.l+=12;break;}return[a,0,i]}function No(e,r,t){if(t.biff==5)return Mo(e,r,t);var a=e._R(1)>>>5&3;var n=e._R(2);var i=e._R(4);return[a,n,i]}function Mo(e){var r=e._R(1)>>>5&3;var t=e._R(2,"i");e.l+=8;var a=e._R
"_xlfn.COVARIANCE.S":"COVARIANCE.S","_xlfn.CSC":"CSC","_xlfn.CSCH":"CSCH","_xlfn.DAYS":"DAYS","_xlfn.DECIMAL":"DECIMAL","_xlfn.ECMA.CEILING":"ECMA.CEILING","_xlfn.ERF.PRECISE":"ERF.PRECISE","_xlfn.ERFC.PRECISE":"ERFC.PRECISE","_xlfn.EXPON.DIST":"EXPON.DIST","_xlfn.F.DIST":"F.DIST","_xlfn.F.DIST.RT":"F.DIST.RT","_xlfn.F.INV":"F.INV","_xlfn.F.INV.RT":"F.INV.RT","_xlfn.F.TEST":"F.TEST","_xlfn.FILTERXML":"FILTERXML","_xlfn.FLOOR.MATH":"FLOOR.MATH","_xlfn.FLOOR.PRECISE":"FLOOR.PRECISE","_xlfn.FORECAST.ETS":"FORECAST.ETS","_xlfn.FORECAST.ETS.CONFINT":"FORECAST.ETS.CONFINT","_xlfn.FORECAST.ETS.SEASONALITY":"FORECAST.ETS.SEASONALITY","_xlfn.FORECAST.ETS.STAT":"FORECAST.ETS.STAT","_xlfn.FORECAST.LINEAR":"FORECAST.LINEAR","_xlfn.FORMULATEXT":"FORMULATEXT","_xlfn.GAMMA":"GAMMA","_xlfn.GAMMA.DIST":"GAMMA.DIST","_xlfn.GAMMA.INV":"GAMMA.INV","_xlfn.GAMMALN.PRECISE":"GAMMALN.PRECISE","_xlfn.GAUSS":"GAUSS","_xlfn.HYPGEOM.DIST":"HYPGEOM.DIST","_xlfn.IFERROR":"IFERROR","_xlfn.IFNA":"IFNA","_xlfn.IFS":"IFS","_xlfn.IMCOSH":"IMCOSH","_xlfn.IMCOT":"IMCOT","_xlfn.IMCSC":"IMCSC","_xlfn.IMCSCH":"IMCSCH","_xlfn.IMSEC":"IMSEC","_xlfn.IMSECH":"IMSECH","_xlfn.IMSINH":"IMSINH","_xlfn.IMTAN":"IMTAN","_xlfn.ISFORMULA":"ISFORMULA","_xlfn.ISO.CEILING":"ISO.CEILING","_xlfn.ISOWEEKNUM":"ISOWEEKNUM","_xlfn.LOGNORM.DIST":"LOGNORM.DIST","_xlfn.LOGNORM.INV":"LOGNORM.INV","_xlfn.MAXIFS":"MAXIFS","_xlfn.MINIFS":"MINIFS","_xlfn.MODE.MULT":"MODE.MULT","_xlfn.MODE.SNGL":"MODE.SNGL","_xlfn.MUNIT":"MUNIT","_xlfn.NEGBINOM.DIST":"NEGBINOM.DIST","_xlfn.NETWORKDAYS.INTL":"NETWORKDAYS.INTL","_xlfn.NIGBINOM":"NIGBINOM","_xlfn.NORM.DIST":"NORM.DIST","_xlfn.NORM.INV":"NORM.INV","_xlfn.NORM.S.DIST":"NORM.S.DIST","_xlfn.NORM.S.INV":"NORM.S.INV","_xlfn.NUMBERVALUE":"NUMBERVALUE","_xlfn.PDURATION":"PDURATION","_xlfn.PERCENTILE.EXC":"PERCENTILE.EXC","_xlfn.PERCENTILE.INC":"PERCENTILE.INC","_xlfn.PERCENTRANK.EXC":"PERCENTRANK.EXC","_xlfn.PERCENTRANK.INC":"PERCENTRANK.INC","_xlfn.PERMUTATIONA":"PERMUTATIONA","_xlfn.PHI":"PHI","_xlfn.POISSON.DIST":"POISSON.DIST","_xlfn.QUARTILE.EXC":"QUARTILE.EXC","_xlfn.QUARTILE.INC":"QUARTILE.INC","_xlfn.QUERYSTRING":"QUERYSTRING","_xlfn.RANK.AVG":"RANK.AVG","_xlfn.RANK.EQ":"RANK.EQ","_xlfn.RRI":"RRI","_xlfn.SEC":"SEC","_xlfn.SECH":"SECH","_xlfn.SHEET":"SHEET","_xlfn.SHEETS":"SHEETS","_xlfn.SKEW.P":"SKEW.P","_xlfn.STDEV.P":"STDEV.P","_xlfn.STDEV.S":"STDEV.S","_xlfn.SUMIFS":"SUMIFS","_xlfn.SWITCH":"SWITCH","_xlfn.T.DIST":"T.DIST","_xlfn.T.DIST.2T":"T.DIST.2T","_xlfn.T.DIST.RT":"T.DIST.RT","_xlfn.T.INV":"T.INV","_xlfn.T.INV.2T":"T.INV.2T","_xlfn.T.TEST":"T.TEST","_xlfn.TEXTJOIN":"TEXTJOIN","_xlfn.UNICHAR":"UNICHAR","_xlfn.UNICODE":"UNICODE","_xlfn.VAR.P":"VAR.P","_xlfn.VAR.S":"VAR.S","_xlfn.WEBSERVICE":"WEBSERVICE","_xlfn.WEIBULL.DIST":"WEIBULL.DIST","_xlfn.WORKDAY.INTL":"WORKDAY.INTL","_xlfn.XOR":"XOR","_xlfn.Z.TEST":"Z.TEST"};function Lu(e){if(e.slice(0,3)=="of:")e=e.slice(3);if(e.charCodeAt(0)==61){e=e.slice(1);if(e.charCodeAt(0)==61)e=e.slice(1)}e=e.replace(/COM\.MICROSOFT\./g,"");e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(e,r){return r.replace(/\./g,"")});e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1");return e.replace(/[;~]/g,",").replace(/\|/g,";")}function Uu(e){var r="of:="+e.replace(Hc,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return r.replace(/;/g,"|").replace(/,/g,";")}function Wu(e){var r=e.split(":");var t=r[0].split(".")[0];return[t,r[0].split(".")[1]+(r.length>1?":"+(r[1].split(".")[1]||r[1].split(".")[0]):"")]}function Hu(e){return e.replace(/\./,"!")}var Vu={};var Xu={};Aa.WS=["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"];function Gu(e,r){for(var t=0,a=e.length;t<a;++t)if(e[t].t===r){e.Count++;return t}e[a]={t:r};e.Count++;e.Unique++;return a}function zu(e,r){var t={min:e+1,max:e+1};var a=-1;if(r.MDW)Jl=r.MDW;if(r.width!=null)t.customWidth=1;else if(r.wpx!=null)a=ql(r.wpx);else if(r.wch!=null)a=r.wch;if(a>-1){t.width=ef(a);t.customWidth=1}else if(r.width!=null)t.width=r.width;if(r.hidden)t.hidden=true;return t}func
function Nd(e,r){for(var t=0;t!=e.length;++t){var a=e[t];for(var n=0;n!=r.length;++n){var i=r[n];if(a[i[0]]==null)a[i[0]]=i[1];else switch(i[2]){case"bool":if(typeof a[i[0]]=="string")a[i[0]]=Ue(a[i[0]]);break;case"int":if(typeof a[i[0]]=="string")a[i[0]]=parseInt(a[i[0]],10);break;}}}}function Md(e,r){for(var t=0;t!=r.length;++t){var a=r[t];if(e[a[0]]==null)e[a[0]]=a[1];else switch(a[2]){case"bool":if(typeof e[a[0]]=="string")e[a[0]]=Ue(e[a[0]]);break;case"int":if(typeof e[a[0]]=="string")e[a[0]]=parseInt(e[a[0]],10);break;}}}function Ld(e){Md(e.WBProps,Fd);Md(e.CalcPr,Pd);Nd(e.WBView,Dd);Nd(e.Sheets,Od);Xu.date1904=Ue(e.WBProps.date1904)}function Ud(e){if(!e.Workbook)return"false";if(!e.Workbook.WBProps)return"false";return Ue(e.Workbook.WBProps.date1904)?"true":"false"}var Wd="][*?/\\".split("");function Hd(e,r){if(e.length>31){if(r)return false;throw new Error("Sheet names cannot exceed 31 chars")}var t=true;Wd.forEach(function(a){if(e.indexOf(a)==-1)return;if(!r)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");t=false});return t}function Vd(e,r,t){e.forEach(function(a,n){Hd(a);for(var i=0;i<n;++i)if(a==e[i])throw new Error("Duplicate Sheet Name: "+a);if(t){var s=r&&r[n]&&r[n].CodeName||a;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}function Xd(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var r=e.Workbook&&e.Workbook.Sheets||[];Vd(e.SheetNames,r,!!e.vbaraw);for(var t=0;t<e.SheetNames.length;++t)Yu(e.Sheets[e.SheetNames[t]],e.SheetNames[t],t)}var Gd=/<\w+:workbook/;function zd(e,r){if(!e)throw new Error("Could not find file");var t={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""};var a=false,n="xmlns";var i={},s=0;e.replace(we,function l(f,c){var o=Te(f);switch(Ie(o[0])){case"<?xml":break;case"<workbook":if(f.match(Gd))n="xmlns"+f.match(/<(\w+):/)[1];t.xmlns=o[n];break;case"</workbook>":break;case"<fileVersion":delete o[0];t.AppVersion=o;break;case"<fileVersion/>":;case"</fileVersion>":break;case"<fileSharing":;case"<fileSharing/>":break;case"<workbookPr":;case"<workbookPr/>":Fd.forEach(function(e){if(o[e[0]]==null)return;switch(e[2]){case"bool":t.WBProps[e[0]]=Ue(o[e[0]]);break;case"int":t.WBProps[e[0]]=parseInt(o[e[0]],10);break;default:t.WBProps[e[0]]=o[e[0]];}});if(o.codeName)t.WBProps.CodeName=o.codeName;break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":;case"<bookViews>":;case"</bookViews>":break;case"<workbookView":;case"<workbookView/>":delete o[0];t.WBView.push(o);break;case"</workbookView>":break;case"<sheets":;case"<sheets>":;case"</sheets>":break;case"<sheet":switch(o.state){case"hidden":o.Hidden=1;break;case"veryHidden":o.Hidden=2;break;default:o.Hidden=0;}delete o.state;o.name=Re(We(o.name));delete o[0];t.Sheets.push(o);break;case"</sheet>":break;case"<functionGroups":;case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":;case"</externalReferences>":;case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":;case"<definedNames":a=true;break;case"</definedNames>":a=false;break;case"<definedName":{i={};i.Name=o.name;if(o.comment)i.Comment=o.comment;if(o.localSheetId)i.Sheet=+o.localSheetId;s=c+f.length}break;case"</definedName>":{i.Ref=e.slice(s,c);t.Names.push(i)}break;case"<definedName/>":break;case"<calcPr":delete o[0];t.CalcPr=o;break;case"<calcPr/>":delete o[0];t.CalcPr=o;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":;case"</customWorkbookViews>":;case"<customWorkbookViews":break;case"<customWorkbookView":;case"</customWorkbookView>":break;case"<pivotCaches>":;case"</pivotCaches>":;case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":;case"<smartTagPr/>":break;case"<smartTagTypes":;case"<smartTagTypes>":;case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":;case"<webPublishing/>":break;case"<fileRecoveryPr":;case"<fileRecover
if(c[o].s.c!=s.c||c[o].s.r!=s.r)continue;if(c[o].e.c>c[o].s.c)l["ss:MergeAcross"]=c[o].e.c-c[o].s.c;if(c[o].e.r>c[o].s.r)l["ss:MergeDown"]=c[o].e.r-c[o].s.r}}var u="",h="";switch(e.t){case"z":return"";case"n":u="Number";h=String(e.v);break;case"b":u="Boolean";h=e.v?"1":"0";break;case"e":u="Error";h=Xt[e.v];break;case"d":u="DateTime";h=new Date(e.v).toISOString();if(e.z==null)e.z=e.z||R._table[14];break;case"s":u="String";h=Ne(e.v||"");break;}var d=Ku(a.cellXfs,e,a);l["ss:StyleID"]="s"+(21+d);l["ss:Index"]=s.c+1;var v=e.v!=null?h:"";var p='<Data ss:Type="'+u+'">'+v+"</Data>";if((e.c||[]).length>0)p+=zv(e.c);return er("Cell",p,l)}function Kv(e,r){var t='<Row ss:Index="'+(e+1)+'"';if(r){if(r.hpt&&!r.hpx)r.hpx=ff(r.hpt);if(r.hpx)t+=' ss:AutoFitHeight="0" ss:Height="'+r.hpx+'"';if(r.hidden)t+=' ss:Hidden="1"'}return t+">"}function $v(e,r,t,a){if(!e["!ref"])return"";var n=ut(e["!ref"]);var i=e["!merges"]||[],s=0;var l=[];if(e["!cols"])e["!cols"].forEach(function(e,r){af(e);var t=!!e.width;var a=zu(r,e);var n={"ss:Index":r+1};if(t)n["ss:Width"]=Zl(a.width);if(e.hidden)n["ss:Hidden"]="1";l.push(er("Column",null,n))});var f=Array.isArray(e);for(var c=n.s.r;c<=n.e.r;++c){var o=[Kv(c,(e["!rows"]||[])[c])];for(var u=n.s.c;u<=n.e.c;++u){var h=false;for(s=0;s!=i.length;++s){if(i[s].s.c>u)continue;if(i[s].s.r>c)continue;if(i[s].e.c<u)continue;if(i[s].e.r<c)continue;if(i[s].s.c!=u||i[s].s.r!=c)h=true;break}if(h)continue;var d={r:c,c:u};var v=ft(d),p=f?(e[c]||[])[u]:e[v];o.push(jv(p,v,e,r,t,a,d))}o.push("</Row>");if(o.length>2)l.push(o.join(""))}return l.join("")}function Yv(e,r,t){var a=[];var n=t.SheetNames[e];var i=t.Sheets[n];var s=i?Xv(i,r,e,t):"";if(s.length>0)a.push("<Names>"+s+"</Names>");s=i?$v(i,r,e,t):"";if(s.length>0)a.push("<Table>"+s+"</Table>");a.push(Gv(i,r,e,t));return a.join("")}function Qv(e,r){if(!r)r={};if(!e.SSF)e.SSF=R.get_table();if(e.SSF){_(R);R.load_table(e.SSF);r.revssf=j(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF;r.cellXfs=[];Ku(r.cellXfs,{},{revssf:{General:0}})}var t=[];t.push(Lv(e,r));t.push(Uv(e,r));t.push("");t.push("");for(var a=0;a<e.SheetNames.length;++a)t.push(er("Worksheet",Yv(a,r,e),{"ss:Name":Fe(e.SheetNames[a])}));t[2]=Wv(e,r);t[3]=Vv(e,r);return Se+er("Workbook",t.join(""),{xmlns:nr.ss,"xmlns:o":nr.o,"xmlns:x":nr.x,"xmlns:ss":nr.ss,"xmlns:dt":nr.dt,"xmlns:html":nr.html})}function Jv(e){var r={};var t=e.content;t.l=28;r.AnsiUserType=t._R(0,"lpstr-ansi");r.AnsiClipboardFormat=Qt(t);if(t.length-t.l<=4)return r;var a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved1=t._R(0,"lpstr-ansi");if(t.length-t.l<=4)return r;a=t._R(4);if(a!==1907505652)return r;r.UnicodeClipboardFormat=Jt(t);a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved2=t._R(0,"lpwstr")}function Zv(e,r,t,a){var n=t;var i=[];var s=r.slice(r.l,r.l+n);if(a&&a.enc&&a.enc.insitu)switch(e.n){case"BOF":;case"FilePass":;case"FileLock":;case"InterfaceHdr":;case"RRDInfo":;case"RRDHead":;case"UsrExcl":break;default:if(s.length===0)break;a.enc.insitu(s);}i.push(s);r.l+=n;var l=cp[Rr(r,r.l)];var f=0;while(l!=null&&l.n.slice(0,8)==="Continue"){n=Rr(r,r.l+2);f=r.l+4;if(l.n=="ContinueFrt")f+=4;else if(l.n.slice(0,11)=="ContinueFrt")f+=12;i.push(r.slice(f,r.l+4+n));r.l+=4+n;l=cp[Rr(r,r.l)]}var c=I(i);Wr(c,0);var o=0;c.lens=[];for(var u=0;u<i.length;++u){c.lens.push(o);o+=i[u].length}return e.f(c,c.length,a)}function qv(e,r,t){if(e.t==="z")return;if(!e.XF)return;var a=0;try{a=e.z||e.XF.numFmtId||0;if(r.cellNF)e.z=R._table[a]}catch(n){if(r.WTF)throw n}if(!r||r.cellText!==false)try{if(e.t==="e"){e.w=e.w||Xt[e.v]}else if(a===0||a=="General"){if(e.t==="n"){if((e.v|0)===e.v)e.w=R._general_int(e.v);else e.w=R._general_num(e.v)}else e.w=R._general(e.v)}else e.w=R.format(a,e.v,{date1904:!!t})}catch(n){if(r.WTF)throw n}if(r.cellDates&&a&&e.t=="n"&&R.is_date(R._table[a]||String(a))){var i=R.parse_date_code(e.v);if(i){e.t="d";e.v=new Date(i.y,i.m-1,i.d,i.H,i.M,i.S,i.u)}}}function ep(e,r,t){return{v:e,ixfe:r,t:t}}function rp(e,r){var t={opts:{}};var a={};if(m!=null&&r.dense==null)r.dense=m;var n=r.dense?[]:{};var i={};var s={};var l=null;var f=[];var o="";var u={};v
},493:{n:"BrtEndMap"},494:{n:"BrtHLink",f:qh},495:{n:"BrtBeginDCon"},496:{n:"BrtEndDCon"},497:{n:"BrtBeginDRefs"},498:{n:"BrtEndDRefs"},499:{n:"BrtDRef"},500:{n:"BrtBeginScenMan"},501:{n:"BrtEndScenMan"},502:{n:"BrtBeginSct"},503:{n:"BrtEndSct"},504:{n:"BrtSlc"},505:{n:"BrtBeginDXFs"},506:{n:"BrtEndDXFs"},507:{n:"BrtDXF"},508:{n:"BrtBeginTableStyles"},509:{n:"BrtEndTableStyles"},510:{n:"BrtBeginTableStyle"},511:{n:"BrtEndTableStyle"},512:{n:"BrtTableStyleElement"},513:{n:"BrtTableStyleClient"},514:{n:"BrtBeginVolDeps"},515:{n:"BrtEndVolDeps"},516:{n:"BrtBeginVolType"},517:{n:"BrtEndVolType"},518:{n:"BrtBeginVolMain"},519:{n:"BrtEndVolMain"},520:{n:"BrtBeginVolTopic"},521:{n:"BrtEndVolTopic"},522:{n:"BrtVolSubtopic"},523:{n:"BrtVolRef"},524:{n:"BrtVolNum"},525:{n:"BrtVolErr"},526:{n:"BrtVolStr"},527:{n:"BrtVolBool"},528:{n:"BrtBeginCalcChain$"},529:{n:"BrtEndCalcChain$"},530:{n:"BrtBeginSortState"},531:{n:"BrtEndSortState"},532:{n:"BrtBeginSortCond"},533:{n:"BrtEndSortCond"},534:{n:"BrtBookProtection"},535:{n:"BrtSheetProtection"},536:{n:"BrtRangeProtection"},537:{n:"BrtPhoneticInfo"},538:{n:"BrtBeginECTxtWiz"},539:{n:"BrtEndECTxtWiz"},540:{n:"BrtBeginECTWFldInfoLst"},541:{n:"BrtEndECTWFldInfoLst"},542:{n:"BrtBeginECTwFldInfo"},548:{n:"BrtFileSharing"},549:{n:"BrtOleSize"},550:{n:"BrtDrawing",f:Dt},551:{n:"BrtLegacyDrawing"},552:{n:"BrtLegacyDrawingHF"},553:{n:"BrtWebOpt"},554:{n:"BrtBeginWebPubItems"},555:{n:"BrtEndWebPubItems"},556:{n:"BrtBeginWebPubItem"},557:{n:"BrtEndWebPubItem"},558:{n:"BrtBeginSXCondFmt"},559:{n:"BrtEndSXCondFmt"},560:{n:"BrtBeginSXCondFmts"},561:{n:"BrtEndSXCondFmts"},562:{n:"BrtBkHim"},564:{n:"BrtColor"},565:{n:"BrtBeginIndexedColors"},566:{n:"BrtEndIndexedColors"},569:{n:"BrtBeginMRUColors"},570:{n:"BrtEndMRUColors"},572:{n:"BrtMRUColor"},573:{n:"BrtBeginDVals"},574:{n:"BrtEndDVals"},577:{n:"BrtSupNameStart"},578:{n:"BrtSupNameValueStart"},579:{n:"BrtSupNameValueEnd"},580:{n:"BrtSupNameNum"},581:{n:"BrtSupNameErr"},582:{n:"BrtSupNameSt"},583:{n:"BrtSupNameNil"},584:{n:"BrtSupNameBool"},585:{n:"BrtSupNameFmla"},586:{n:"BrtSupNameBits"},587:{n:"BrtSupNameEnd"},588:{n:"BrtEndSupBook"},589:{n:"BrtCellSmartTagProperty"},590:{n:"BrtBeginCellSmartTag"},591:{n:"BrtEndCellSmartTag"},592:{n:"BrtBeginCellSmartTags"},593:{n:"BrtEndCellSmartTags"},594:{n:"BrtBeginSmartTags"},595:{n:"BrtEndSmartTags"},596:{n:"BrtSmartTagType"},597:{n:"BrtBeginSmartTagTypes"},598:{n:"BrtEndSmartTagTypes"},599:{n:"BrtBeginSXFilters"},600:{n:"BrtEndSXFilters"},601:{n:"BrtBeginSXFILTER"},602:{n:"BrtEndSXFilter"},603:{n:"BrtBeginFills"},604:{n:"BrtEndFills"},605:{n:"BrtBeginCellWatches"},606:{n:"BrtEndCellWatches"},607:{n:"BrtCellWatch"},608:{n:"BrtBeginCRErrs"},609:{n:"BrtEndCRErrs"},610:{n:"BrtCrashRecErr"},611:{n:"BrtBeginFonts"},612:{n:"BrtEndFonts"},613:{n:"BrtBeginBorders"},614:{n:"BrtEndBorders"},615:{n:"BrtBeginFmts"},616:{n:"BrtEndFmts"},617:{n:"BrtBeginCellXFs"},618:{n:"BrtEndCellXFs"},619:{n:"BrtBeginStyles"},620:{n:"BrtEndStyles"},625:{n:"BrtBigName"},626:{n:"BrtBeginCellStyleXFs"},627:{n:"BrtEndCellStyleXFs"},628:{n:"BrtBeginComments"},629:{n:"BrtEndComments"},630:{n:"BrtBeginCommentAuthors"},631:{n:"BrtEndCommentAuthors"},632:{n:"BrtCommentAuthor",f:Ac},633:{n:"BrtBeginCommentList"},634:{n:"BrtEndCommentList"},635:{n:"BrtBeginComment",f:Ic},636:{n:"BrtEndComment"},637:{n:"BrtCommentText",f:Ct},638:{n:"BrtBeginOleObjects"},639:{n:"BrtOleObject"},640:{n:"BrtEndOleObjects"},641:{n:"BrtBeginSxrules"},642:{n:"BrtEndSxRules"},643:{n:"BrtBeginActiveXControls"},644:{n:"BrtActiveX"},645:{n:"BrtEndActiveXControls"},646:{n:"BrtBeginPCDSDTCEMembersSortBy"},648:{n:"BrtBeginCellIgnoreECs"},649:{n:"BrtCellIgnoreEC"},650:{n:"BrtEndCellIgnoreECs"},651:{n:"BrtCsProp",f:Rd},652:{n:"BrtCsPageSetup"},653:{n:"BrtBeginUserCsViews"},654:{n:"BrtEndUserCsViews"},655:{n:"BrtBeginUserCsView"},656:{n:"BrtEndUserCsView"},657:{n:"BrtBeginPcdSFCIEntries"},658:{n:"BrtEndPCDSFCIEntries"},659:{n:"BrtPCDSFCIEntry"},660:{n:"BrtBeginListParts"},661:{n:"BrtListPart"},662:{n:"BrtEndListParts"},663:{n:"BrtSheetCalcProp"},664:{n:"BrtBeginFnGroup"},665:{n:"B
if(P<10)for(K=0;K<P;++K)if(A>0)O[T+K]={level:A};I=-1;break;case"covered-table-cell":++I;if(i.sheetStubs){if(i.dense){if(!g[T])g[T]=[];g[T][I]={t:"z"}}else g[ft({r:T,c:I})]={t:"z"}}break;case"table-cell":;case"数据":if(E[0].charAt(E[0].length-2)==="/"){++I;k=Te(E[0],false);N=parseInt(k["number-columns-repeated"]||"1",10);S={t:"z",v:null};if(k.formula&&i.cellFormula!=false)S.f=Lu(Re(k.formula));if((k["数据类型"]||k["value-type"])=="string"){S.t="s";S.v=Re(k["string-value"]||"");if(i.dense){if(!g[T])g[T]=[];g[T][I]=S}else{g[ft({r:T,c:I})]=S}}I+=N-1}else if(E[1]!=="/"){++I;N=1;var $=P?T+P-1:T;if(I>x.e.c)x.e.c=I;if(I<x.s.c)x.s.c=I;if(T<x.s.r)x.s.r=T;if($>x.e.r)x.e.r=$;k=Te(E[0],false);H=[];V={};S={t:k["数据类型"]||k["value-type"],v:null};if(i.cellFormula){if(k.formula)k.formula=Re(k.formula);if(k["number-matrix-columns-spanned"]&&k["number-matrix-rows-spanned"]){F=parseInt(k["number-matrix-rows-spanned"],10)||0;D=parseInt(k["number-matrix-columns-spanned"],10)||0;y={s:{r:T,c:I},e:{r:T+F-1,c:I+D-1}};S.F=ot(y);M.push([y,S.F])}if(k.formula)S.f=Lu(k.formula);else for(K=0;K<M.length;++K)if(T>=M[K][0].s.r&&T<=M[K][0].e.r)if(I>=M[K][0].s.c&&I<=M[K][0].e.c)S.F=M[K][1]}if(k["number-columns-spanned"]||k["number-rows-spanned"]){F=parseInt(k["number-rows-spanned"],10)||0;D=parseInt(k["number-columns-spanned"],10)||0;y={s:{r:T,c:I},e:{r:T+F-1,c:I+D-1}};_.push(y)}if(k["number-columns-repeated"])N=parseInt(k["number-columns-repeated"],10);switch(S.t){case"boolean":S.t="b";S.v=Ue(k["boolean-value"]);break;case"float":S.t="n";S.v=parseFloat(k.value);break;case"percentage":S.t="n";S.v=parseFloat(k.value);break;case"currency":S.t="n";S.v=parseFloat(k.value);break;case"date":S.t="d";S.v=te(k["date-value"]);if(!i.cellDates){S.t="n";S.v=J(S.v)}S.z="m/d/yy";break;case"time":S.t="n";S.v=q(k["time-value"])/86400;break;case"number":S.t="n";S.v=parseFloat(k["数据数值"]);break;default:if(S.t==="string"||S.t==="text"||!S.t){S.t="s";if(k["string-value"]!=null)w=Re(k["string-value"])}else throw new Error("Unsupported value type "+S.t);}}else{z=false;if(S.t==="s"){S.v=w||"";z=B==0}if(U.Target)S.l=U;if(H.length>0){S.c=H;H=[]}if(w&&i.cellText!==false)S.w=w;if(!z||i.sheetStubs){if(!(i.sheetRows&&i.sheetRows<=T)){for(var Y=0;Y<P;++Y){N=parseInt(k["number-columns-repeated"]||"1",10);if(i.dense){if(!g[T+Y])g[T+Y]=[];g[T+Y][I]=Y==0?S:ne(S);while(--N>0)g[T+Y][I+N]=ne(S)}else{g[ft({r:T+Y,c:I})]=S;while(--N>0)g[ft({r:T+Y,c:I+N})]=ne(S)}if(x.e.c<=I)x.e.c=I}}}N=parseInt(k["number-columns-repeated"]||"1",10);I+=N-1;N=0;S={};w=""}U={};break;case"document":;case"document-content":;case"电子表格文档":;case"spreadsheet":;case"主体":;case"scripts":;case"styles":;case"font-face-decls":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f}else if(E[0].charAt(E[0].length-2)!=="/")l.push([E[3],true]);break;case"annotation":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f;V.t=w;V.a=X;H.push(V)}else if(E[0].charAt(E[0].length-2)!=="/"){l.push([E[3],false])}X="";G=0;w="";B=0;break;case"creator":if(E[1]==="/"){X=s.slice(G,E.index)}else G=E.index+E[0].length;break;case"meta":;case"元数据":;case"settings":;case"config-item-set":;case"config-item-map-indexed":;case"config-item-map-entry":;case"config-item-map-named":;case"shapes":;case"frame":;case"text-box":;case"image":;case"data-pilot-tables":;case"list-style":;case"form":;case"dde-links":;case"event-listeners":;case"chart":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f}else if(E[0].charAt(E[0].length-2)!=="/")l.push([E[3],false]);w="";B=0;break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":;case"percentage-style":;case"date-style":;case"time-style":if(E[1]==="/"){R[o.name]=u;if((f=l.pop())[0]!==E[3])throw"Bad state: "+f}else if(E[0].charAt(E[0].length-2)!=="/"){u="";o=Te(E[0],false);l.push([E[3],true])}break;case"script":break;case"libraries":break;case"automatic-styles":break;case"master-styles":break;case"default-style":;case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-
var t=[];var a=r==null?{}:r;if(e==null||e["!ref"]==null)return"";var n=ut(e["!ref"]);var i=a.FS!==undefined?a.FS:",",s=i.charCodeAt(0);var l=a.RS!==undefined?a.RS:"\n",f=l.charCodeAt(0);var c=new RegExp((i=="|"?"\\|":i)+"+$");var o="",u=[];a.dense=Array.isArray(e);var h=a.skipHidden&&e["!cols"]||[];var d=a.skipHidden&&e["!rows"]||[];for(var v=n.s.c;v<=n.e.c;++v)if(!(h[v]||{}).hidden)u[v]=at(v);for(var p=n.s.r;p<=n.e.r;++p){if((d[p]||{}).hidden)continue;o=Tm(e,n,p,u,s,f,i,a);if(o==null){continue}if(a.strip)o=o.replace(c,"");t.push(o+l)}delete a.dense;return t.join("")}function xm(e,r){if(!r)r={};r.FS="\t";r.RS="\n";var t=Im(e,r);if(typeof cptable=="undefined"||r.type=="string")return t;var a=cptable.utils.encode(1200,t,"str");return String.fromCharCode(255)+String.fromCharCode(254)+a}function Am(e){var r="",t,a="";if(e==null||e["!ref"]==null)return[];var n=ut(e["!ref"]),i="",s=[],l;var f=[];var c=Array.isArray(e);for(l=n.s.c;l<=n.e.c;++l)s[l]=at(l);for(var o=n.s.r;o<=n.e.r;++o){i=qr(o);for(l=n.s.c;l<=n.e.c;++l){r=s[l]+i;t=c?(e[o]||[])[l]:e[r];a="";if(t===undefined)continue;else if(t.F!=null){r=t.F;if(!t.f)continue;a=t.f;if(r.indexOf(":")==-1)r=r+":"+r}if(t.f!=null)a=t.f;else if(t.t=="z")continue;else if(t.t=="n"&&t.v!=null)a=""+t.v;else if(t.t=="b")a=t.v?"TRUE":"FALSE";else if(t.w!==undefined)a="'"+t.w;else if(t.v===undefined)continue;else if(t.t=="s")a="'"+t.v;else a=""+t.v;f[f.length]=r+"="+a}}return f}function Rm(e,r,t){var a=t||{};var n=+!a.skipHeader;var i=e||{};var s=0,l=0;if(i&&a.origin!=null){if(typeof a.origin=="number")s=a.origin;else{var f=typeof a.origin=="string"?lt(a.origin):a.origin;s=f.r;l=f.c}}var c;var o={s:{c:0,r:0},e:{c:l,r:s+r.length-1+n}};if(i["!ref"]){var u=ut(i["!ref"]);o.e.c=Math.max(o.e.c,u.e.c);o.e.r=Math.max(o.e.r,u.e.r);if(s==-1){s=o.e.r+1;o.e.r=s+r.length-1+n}}var h=a.header||[],d=0;r.forEach(function(e,r){X(e).forEach(function(t){if((d=h.indexOf(t))==-1)h[d=h.length]=t;var f=e[t];var o="z";var u="";if(typeof f=="number")o="n";else if(typeof f=="boolean")o="b";else if(typeof f=="string")o="s";else if(f instanceof Date){o="d";if(!a.cellDates){o="n";f=J(f)}u=a.dateNF||R._table[14]}i[ft({c:l+d,r:s+r+n})]=c={t:o,v:f};if(u)c.z=u})});o.e.c=Math.max(o.e.c,l+h.length-1);var v=qr(s);if(n)for(d=0;d<h.length;++d)i[at(d+l)+v]={t:"s",v:h[d]};i["!ref"]=ot(o);return i}function _m(e,r){return Rm(null,e,r)}var ym={encode_col:at,encode_row:qr,encode_cell:ft,encode_range:ot,decode_col:tt,decode_row:Zr,split_cell:st,decode_cell:lt,decode_range:ct,format_cell:dt,get_formulae:Am,make_csv:Im,make_json:Bm,make_formulae:Am,sheet_add_aoa:pt,sheet_add_json:Rm,aoa_to_sheet:mt,json_to_sheet:_m,table_to_sheet:Rp,table_to_book:_p,sheet_to_csv:Im,sheet_to_txt:xm,sheet_to_json:Bm,sheet_to_html:Ap.from_sheet,sheet_to_dif:Zs.from_sheet,sheet_to_slk:Js.from_sheet,sheet_to_eth:qs.from_sheet,sheet_to_formulae:Am,sheet_to_row_object_array:Bm};(function(e){e.consts=e.consts||{};function r(r){r.forEach(function(r){e.consts[r[0]]=r[1]})}function t(e,r,t){return e[r]!=null?e[r]:e[r]=t}function a(e,r,t){if(typeof r=="string")return e[r]||(e[r]={t:"z"});if(typeof r!="number")return a(e,ft(r));return a(e,ft({r:r,c:t||0}))}function n(e,r){if(typeof r=="number"){if(r>=0&&e.SheetNames.length>r)return r;throw new Error("Cannot find sheet # "+r)}else if(typeof r=="string"){var t=e.SheetNames.indexOf(r);if(t>-1)return t;throw new Error("Cannot find sheet name |"+r+"|")}else throw new Error("Cannot find sheet |"+r+"|")}e.book_new=function(){return{SheetNames:[],Sheets:{}}};e.book_append_sheet=function(e,r,t){if(!t)for(var a=1;a<=65535;++a)if(e.SheetNames.indexOf(t="Sheet"+a)==-1)break;if(!t)throw new Error("Too many worksheets");Hd(t);if(e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");e.SheetNames.push(t);e.Sheets[t]=r};e.book_set_sheet_visibility=function(e,r,a){t(e,"Workbook",{});t(e.Workbook,"Sheets",[]);var i=n(e,r);t(e.Workbook.Sheets,i,{});switch(a){case 0:;case 1:;case 2:break;default:throw new Error("Bad sheet visibility setting "+a);}e.Workbook.Sheets[i].Hidden=a};r([["SHEET_VISIBLE",0],["SHEE