varODS={};(functionmake_ods(ODS){varget_utils=function(){if(typeofXLSX!=="undefined")returnXLSX.utils;if(typeofmodule!=="undefined"&&typeofrequire!=="undefined")try{returnrequire("../"+"xlsx").utils}catch(e){try{returnrequire("./"+"xlsx").utils}catch(ee){returnrequire("xl"+"sx").utils}}thrownewError("Cannot find XLSX utils")};varhas_buf=typeofBuffer!=="undefined";functioncc2str(arr){varo="";for(vari=0;i!=arr.length;++i)o+=String.fromCharCode(arr[i]);returno}functiondup(o){if(typeofJSON!="undefined")returnJSON.parse(JSON.stringify(o));if(typeofo!="object"||!o)returno;varout={};for(varkino)if(o.hasOwnProperty(k))out[k]=dup(o[k]);returnout}functiongetdata(data){if(!data)returnnull;if(data.data)returndata.data;if(data.asNodeBuffer&&has_buf)returndata.asNodeBuffer().toString("binary");if(data.asBinary)returndata.asBinary();if(data._data&&data._data.getContent)returncc2str(Array.prototype.slice.call(data._data.getContent(),0));returnnull}functionsafegetzipfile(zip,file){varf=file;if(zip.files[f])returnzip.files[f];f=file.toLowerCase();if(zip.files[f])returnzip.files[f];f=f.replace(/\//g,"\\");if(zip.files[f])returnzip.files[f];returnnull}functiongetzipfile(zip,file){varo=safegetzipfile(zip,file);if(o==null)thrownewError("Cannot find file "+file+" in zip");returno}functiongetzipdata(zip,file,safe){if(!safe)returngetdata(getzipfile(zip,file));if(!file)returnnull;try{returngetzipdata(zip,file)}catch(e){returnnull}}var_fs,jszip;if(typeofJSZip!=="undefined")jszip=JSZip;if(typeofexports!=="undefined"){if(typeofmodule!=="undefined"&&module.exports){if(typeofjszip==="undefined")jszip=require("./js"+"zip");_fs=require("f"+"s")}}varattregexg=/\b[\w:-]+=["'][^"]*['"]/g;vartagregex=/<[^>]*>/g;varnsregex=/<\w*:/,nsregex2=/<(\/?)\w+:/;functionparsexmltag(tag,skip_root){varz=[];vareq=0,c=0;for(;eq!==tag.length;++eq)if((c=tag.charCodeAt(eq))===32||c===10||c===13)break;if(!skip_root)z[0]=tag.substr(0,eq);if(eq===tag.length)returnz;varm=tag.match(attregexg),j=0,v="",i=0,q="",cc="";if(m)for(i=0;i!=m.length;++i){cc=m[i];for(c=0;c!=cc.length;++c)if(cc.charCodeAt(c)===61)break;q=cc.substr(0,c);v=cc.substring(c+2,cc.length-1);for(j=0;j!=q.length;++j)if(q.charCodeAt(j)===58)break;if(j===q.length)z[q]=v;elsez[(j===5&&q.substr(0,5)==="xmlns"?"xmlns":"")+q.substr(j+1)]=v}returnz}functionstrip_ns(x){returnx.replace(nsregex2,"<$1")}varencodings={""":'"',"'":"'",">":">","<":"<","&":"&"};varrencoding={'"':""","'":"'",">":">","<":"<","&":"&"};varrencstr="&<>'\"".split("");varencregex=/&[a-z]*;/g,coderegex=/_x([\da-fA-F]+)_/g;functionunescapexml(text){vars=text+"";returns.replace(encregex,function($$){returnencodings[$$]}).replace(coderegex,function(m,c){returnString.fromCharCode(parseInt(c,16))})}vardecregex=/[&<>'"]/g,charegex=/[\u0000-\u0008\u000b-\u001f]/g;functionescapexml(text){vars=text+"";returns.replace(decregex,function(y){returnrencoding[y]}).replace(charegex,function(s){return"_x"+("000"+s.charCodeAt(0).toString(16)).substr(-4)+"_"})}functionparsexmlbool(value){switch(value){case"1":case"true":case"TRUE":returntrue;default:returnfalse}}functiondatenum(v){varepoch=Date.parse(v);return(epoch+22091616e5)/(24*60*60*1e3)}functionparse_isodur(s){varsec=0,mt=0,time=false;varm=s.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!m)thrownewError("|"+s+"| is not an ISO8601 Duration");for(vari=1;i!=m.length;++i){if(!m[i])continue;mt=1;if(i>3)time=true;switch(m[i].substr(m[i].length-1)){case"Y":thrownewError("Unsupported ISO Duration Field: "+m[i].substr(m[i].length-1));case"D":mt*=24;case"H":mt*=60;case"M":if(!time)thrownewError("Unsupported ISO Duration Field: M");elsemt*=60;case"S":break}sec+=mt*parseInt(m[i],10)}returnsec}varXML_HEADER='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';functionxlml_normalize(d){if(has_buf&&Buffer.isBuffer(d))returnd.toString("utf8");if(typeofd==="string")returnd;throw"badf"}varxlmlregex=/<(\/?)([a-z0-9]*:|)([\w-]+)[^>]*>/gm;varCT_