<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var Te=Object.defineProperty;var $e=(_,i,o)=&gt;i in _?Te(_,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):_[i]=o;var ke=(_,i,o)=&gt;($e(_,typeof i!="symbol"?i+"":i,o),o);import{b as PUBLIC_MAX_UPLOAD_SIZE,a as PUBLIC_API_URL}from"./public.70d9f6e0.js";import{c as commonjsGlobal,g as getDefaultExportFromCjs}from"./_commonjsHelpers.de833af9.js";function commonjsRequire(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jszip_min={exports:{}};/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
&lt;http://stuartk.com/jszip&gt;

(c) 2009-2016 Stuart Knightley &lt;stuart [at] stuartk.com&gt;
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(_,i){(function(o){_.exports=o()})(function(){return function o(u,s,e){function t(a,d){if(!s[a]){if(!u[a]){var f=typeof commonjsRequire=="function"&amp;&amp;commonjsRequire;if(!d&amp;&amp;f)return f(a,!0);if(r)return r(a,!0);var m=new Error("Cannot find module '"+a+"'");throw m.code="MODULE_NOT_FOUND",m}var l=s[a]={exports:{}};u[a][0].call(l.exports,function(p){var c=u[a][1][p];return t(c||p)},l,l.exports,o,u,s,e)}return s[a].exports}for(var r=typeof commonjsRequire=="function"&amp;&amp;commonjsRequire,n=0;n&lt;e.length;n++)t(e[n]);return t}({1:[function(o,u,s){var e=o("./utils"),t=o("./support"),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(n){for(var a,d,f,m,l,p,c,b=[],v=0,y=n.length,w=y,S=e.getTypeOf(n)!=="string";v&lt;n.length;)w=y-v,f=S?(a=n[v++],d=v&lt;y?n[v++]:0,v&lt;y?n[v++]:0):(a=n.charCodeAt(v++),d=v&lt;y?n.charCodeAt(v++):0,v&lt;y?n.charCodeAt(v++):0),m=a&gt;&gt;2,l=(3&amp;a)&lt;&lt;4|d&gt;&gt;4,p=1&lt;w?(15&amp;d)&lt;&lt;2|f&gt;&gt;6:64,c=2&lt;w?63&amp;f:64,b.push(r.charAt(m)+r.charAt(l)+r.charAt(p)+r.charAt(c));return b.join("")},s.decode=function(n){var a,d,f,m,l,p,c=0,b=0,v="data:";if(n.substr(0,v.length)===v)throw new Error("Invalid base64 input, it looks like a data url.");var y,w=3*(n=n.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(n.charAt(n.length-1)===r.charAt(64)&amp;&amp;w--,n.charAt(n.length-2)===r.charAt(64)&amp;&amp;w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=t.uint8array?new Uint8Array(0|w):new Array(0|w);c&lt;n.length;)a=r.indexOf(n.charAt(c++))&lt;&lt;2|(m=r.indexOf(n.charAt(c++)))&gt;&gt;4,d=(15&amp;m)&lt;&lt;4|(l=r.indexOf(n.charAt(c++)))&gt;&gt;2,f=(3&amp;l)&lt;&lt;6|(p=r.indexOf(n.charAt(c++))),y[b++]=a,l!==64&amp;&amp;(y[b++]=d),p!==64&amp;&amp;(y[b++]=f);return y}},{"./support":30,"./utils":32}],2:[function(o,u,s){var e=o("./external"),t=o("./stream/DataWorker"),r=o("./stream/Crc32Probe"),n=o("./stream/DataLengthProbe");function a(d,f,m,l,p){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=l,this.compressedContent=p}a.prototype={getContentWorker:function(){var d=new t(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new n("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new t(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(d,f,m){return d.pipe(new r).pipe(new n("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new n("compressedSize")).withStreamInfo("compression",f)},u.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,u,s){var e=o("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new e("STORE compression")},uncompressWorker:function(){return new e("STORE decompression")}},s.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,u,s){var e=o("./utils"),t=function(){for(var r,n=[],a=0;a&lt;256;a++){r=a;for(var d=0;d&lt;8;d++)r=1&amp;r?3988292384^r&gt;&gt;&gt;1:r&gt;&gt;&gt;1;n[a]=r}return n}();u.exports=function(r,n){return r!==void 0&amp;&amp;r.length?e.getTypeOf(r)!=="string"?function(a,d,f,m){var l=t,p=m+f;a^=-1;for(var c=m;c&lt;p;c++)a=a&gt;&gt;&gt;8^l[255&amp;(a^d[c])];return-1^a}(0|n,r,r.length,0):function(a,d,f,m){var l=t,p=m+f;a^=-1;for(var c=m;c&lt;p;c++)a=a&gt;&gt;&gt;8^l[255&amp;(a^d.charCodeAt(c))];return-1^a}(0|n,r,r.length,0):0}},{"./utils":32}],5:[function(o,u,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(o,u,s){var e=null;e=typeof Promise&lt;"u"?Promise:o("lie"),u.exports={Promise:e}},{lie:37}],7:[function(o,u,s){var e=typeof Uint8Array&lt;"u"&amp;&amp;typeof Uint16Array&lt;"u"&amp;&amp;typeof Uint32Array&lt;"u",t=o("pako"),r=o("./utils"),n=o("./stream/GenericWorker"),a=e?"uint8array":"array";function d(f,m){n.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",r.inherits(d,n),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&amp;&amp;this._createPako(),this._pako.push(r.transformTo(a,f.data),!1)},d.prototype.flush=function(){n.prototype.flush.call(this),this._pako===null&amp;&amp;this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new t[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,u,s){function e(l,p){var c,b="";for(c=0;c&lt;p;c++)b+=String.fromCharCode(255&amp;l),l&gt;&gt;&gt;=8;return b}function t(l,p,c,b,v,y){var w,S,A=l.file,E=l.compression,C=y!==a.utf8encode,j=r.transformTo("string",y(A.name)),T=r.transformTo("string",a.utf8encode(A.name)),U=A.comment,X=r.transformTo("string",y(U)),x=r.transformTo("string",a.utf8encode(U)),z=T.length!==A.name.length,g=x.length!==U.length,q="",oe="",J="",se=A.dir,Z=A.date,te={crc32:0,compressedSize:0,uncompressedSize:0};p&amp;&amp;!c||(te.crc32=l.crc32,te.compressedSize=l.compressedSize,te.uncompressedSize=l.uncompressedSize);var I=0;p&amp;&amp;(I|=8),C||!z&amp;&amp;!g||(I|=2048);var P=0,re=0;se&amp;&amp;(P|=16),v==="UNIX"?(re=798,P|=function(G,le){var he=G;return G||(he=le?16893:33204),(65535&amp;he)&lt;&lt;16}(A.unixPermissions,se)):(re=20,P|=function(G){return 63&amp;(G||0)}(A.dosPermissions)),w=Z.getUTCHours(),w&lt;&lt;=6,w|=Z.getUTCMinutes(),w&lt;&lt;=5,w|=Z.getUTCSeconds()/2,S=Z.getUTCFullYear()-1980,S&lt;&lt;=4,S|=Z.getUTCMonth()+1,S&lt;&lt;=5,S|=Z.getUTCDate(),z&amp;&amp;(oe=e(1,1)+e(d(j),4)+T,q+="up"+e(oe.length,2)+oe),g&amp;&amp;(J=e(1,1)+e(d(X),4)+x,q+="uc"+e(J.length,2)+J);var Y="";return Y+=`
\0`,Y+=e(I,2),Y+=E.magic,Y+=e(w,2),Y+=e(S,2),Y+=e(te.crc32,4),Y+=e(te.compressedSize,4),Y+=e(te.uncompressedSize,4),Y+=e(j.length,2),Y+=e(q.length,2),{fileRecord:f.LOCAL_FILE_HEADER+Y+j+q,dirRecord:f.CENTRAL_FILE_HEADER+e(re,2)+Y+e(X.length,2)+"\0\0\0\0"+e(P,4)+e(b,4)+j+q+X}}var r=o("../utils"),n=o("../stream/GenericWorker"),a=o("../utf8"),d=o("../crc32"),f=o("../signature");function m(l,p,c,b){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=c,this.encodeFileName=b,this.streamFiles=l,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(m,n),m.prototype.push=function(l){var p=l.meta.percent||0,c=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(l):(this.bytesWritten+=l.data.length,n.prototype.push.call(this,{data:l.data,meta:{currentFile:this.currentFile,percent:c?(p+100*(c-b-1))/c:100}}))},m.prototype.openedSource=function(l){this.currentSourceOffset=this.bytesWritten,this.currentFile=l.file.name;var p=this.streamFiles&amp;&amp;!l.file.dir;if(p){var c=t(l,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(l){this.accumulate=!1;var p=this.streamFiles&amp;&amp;!l.file.dir,c=t(l,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),p)this.push({data:function(b){return f.DATA_DESCRIPTOR+e(b.crc32,4)+e(b.compressedSize,4)+e(b.uncompressedSize,4)}(l),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var l=this.bytesWritten,p=0;p&lt;this.dirRecords.length;p++)this.push({data:this.dirRecords[p],meta:{percent:100}});var c=this.bytesWritten-l,b=function(v,y,w,S,A){var E=r.transformTo("string",A(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+e(v,2)+e(v,2)+e(y,4)+e(w,4)+e(E.length,2)+E}(this.dirRecords.length,c,l,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(l){this._sources.push(l);var p=this;return l.on("data",function(c){p.processChunk(c)}),l.on("end",function(){p.closedSource(p.previous.streamInfo),p._sources.length?p.prepareNextSource():p.end()}),l.on("error",function(c){p.error(c)}),this},m.prototype.resume=function(){return!!n.prototype.resume.call(this)&amp;&amp;(!this.previous&amp;&amp;this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(l){var p=this._sources;if(!n.prototype.error.call(this,l))return!1;for(var c=0;c&lt;p.length;c++)try{p[c].error(l)}catch{}return!0},m.prototype.lock=function(){n.prototype.lock.call(this);for(var l=this._sources,p=0;p&lt;l.length;p++)l[p].lock()},u.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,u,s){var e=o("../compressions"),t=o("./ZipFileWorker");s.generateWorker=function(r,n,a){var d=new t(n.streamFiles,a,n.platform,n.encodeFileName),f=0;try{r.forEach(function(m,l){f++;var p=function(y,w){var S=y||w,A=e[S];if(!A)throw new Error(S+" is not a valid compression method !");return A}(l.options.compression,n.compression),c=l.options.compressionOptions||n.compressionOptions||{},b=l.dir,v=l.date;l._compressWorker(p,c).withStreamInfo("file",{name:m,dir:b,date:v,comment:l.comment||"",unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,u,s){function e(){if(!(this instanceof e))return new e;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new e;for(var r in this)typeof this[r]!="function"&amp;&amp;(t[r]=this[r]);return t}}(e.prototype=o("./object")).loadAsync=o("./load"),e.support=o("./support"),e.defaults=o("./defaults"),e.version="3.10.1",e.loadAsync=function(t,r){return new e().loadAsync(t,r)},e.external=o("./external"),u.exports=e},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,u,s){var e=o("./utils"),t=o("./external"),r=o("./utf8"),n=o("./zipEntries"),a=o("./stream/Crc32Probe"),d=o("./nodejsUtils");function f(m){return new t.Promise(function(l,p){var c=m.decompressed.getContentWorker().pipe(new a);c.on("error",function(b){p(b)}).on("end",function(){c.streamInfo.crc32!==m.decompressed.crc32?p(new Error("Corrupted zip : CRC32 mismatch")):l()}).resume()})}u.exports=function(m,l){var p=this;return l=e.extend(l||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:r.utf8decode}),d.isNode&amp;&amp;d.isStream(m)?t.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):e.prepareContent("the loaded zip file",m,!0,l.optimizedBinaryString,l.base64).then(function(c){var b=new n(l);return b.load(c),b}).then(function(c){var b=[t.Promise.resolve(c)],v=c.files;if(l.checkCRC32)for(var y=0;y&lt;v.length;y++)b.push(f(v[y]));return t.Promise.all(b)}).then(function(c){for(var b=c.shift(),v=b.files,y=0;y&lt;v.length;y++){var w=v[y],S=w.fileNameStr,A=e.resolve(w.fileNameStr);p.file(A,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:l.createFolders}),w.dir||(p.file(A).unsafeOriginalName=S)}return b.zipComment.length&amp;&amp;(p.comment=b.zipComment),p})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,u,s){var e=o("../utils"),t=o("../stream/GenericWorker");function r(n,a){t.call(this,"Nodejs stream input adapter for "+n),this._upstreamEnded=!1,this._bindStream(a)}e.inherits(r,t),r.prototype._bindStream=function(n){var a=this;(this._stream=n).pause(),n.on("data",function(d){a.push({data:d,meta:{percent:0}})}).on("error",function(d){a.isPaused?this.generatedError=d:a.error(d)}).on("end",function(){a.isPaused?a._upstreamEnded=!0:a.end()})},r.prototype.pause=function(){return!!t.prototype.pause.call(this)&amp;&amp;(this._stream.pause(),!0)},r.prototype.resume=function(){return!!t.prototype.resume.call(this)&amp;&amp;(this._upstreamEnded?this.end():this._stream.resume(),!0)},u.exports=r},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,u,s){var e=o("readable-stream").Readable;function t(r,n,a){e.call(this,n),this._helper=r;var d=this;r.on("data",function(f,m){d.push(f)||d._helper.pause(),a&amp;&amp;a(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}o("../utils").inherits(t,e),t.prototype._read=function(){this._helper.resume()},u.exports=t},{"../utils":32,"readable-stream":16}],14:[function(o,u,s){u.exports={isNode:typeof Buffer&lt;"u",newBufferFrom:function(e,t){if(Buffer.from&amp;&amp;Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&amp;&amp;typeof e.on=="function"&amp;&amp;typeof e.pause=="function"&amp;&amp;typeof e.resume=="function"}}},{}],15:[function(o,u,s){function e(A,E,C){var j,T=r.getTypeOf(E),U=r.extend(C||{},d);U.date=U.date||new Date,U.compression!==null&amp;&amp;(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&amp;&amp;(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&amp;&amp;16384&amp;U.unixPermissions&amp;&amp;(U.dir=!0),U.dosPermissions&amp;&amp;16&amp;U.dosPermissions&amp;&amp;(U.dir=!0),U.dir&amp;&amp;(A=v(A)),U.createFolders&amp;&amp;(j=b(A))&amp;&amp;y.call(this,j,!0);var X=T==="string"&amp;&amp;U.binary===!1&amp;&amp;U.base64===!1;C&amp;&amp;C.binary!==void 0||(U.binary=!X),(E instanceof f&amp;&amp;E.uncompressedSize===0||U.dir||!E||E.length===0)&amp;&amp;(U.base64=!1,U.binary=!0,E="",U.compression="STORE",T="string");var x=null;x=E instanceof f||E instanceof n?E:p.isNode&amp;&amp;p.isStream(E)?new c(A,E):r.prepareContent(A,E,U.binary,U.optimizedBinaryString,U.base64);var z=new m(A,x,U);this.files[A]=z}var t=o("./utf8"),r=o("./utils"),n=o("./stream/GenericWorker"),a=o("./stream/StreamHelper"),d=o("./defaults"),f=o("./compressedObject"),m=o("./zipObject"),l=o("./generate"),p=o("./nodejsUtils"),c=o("./nodejs/NodejsStreamInputAdapter"),b=function(A){A.slice(-1)==="/"&amp;&amp;(A=A.substring(0,A.length-1));var E=A.lastIndexOf("/");return 0&lt;E?A.substring(0,E):""},v=function(A){return A.slice(-1)!=="/"&amp;&amp;(A+="/"),A},y=function(A,E){return E=E!==void 0?E:d.createFolders,A=v(A),this.files[A]||e.call(this,A,null,{dir:!0,createFolders:E}),this.files[A]};function w(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var E,C,j;for(E in this.files)j=this.files[E],(C=E.slice(this.root.length,E.length))&amp;&amp;E.slice(0,this.root.length)===this.root&amp;&amp;A(C,j)},filter:function(A){var E=[];return this.forEach(function(C,j){A(C,j)&amp;&amp;E.push(j)}),E},file:function(A,E,C){if(arguments.length!==1)return A=this.root+A,e.call(this,A,E,C),this;if(w(A)){var j=A;return this.filter(function(U,X){return!X.dir&amp;&amp;j.test(U)})}var T=this.files[this.root+A];return T&amp;&amp;!T.dir?T:null},folder:function(A){if(!A)return this;if(w(A))return this.filter(function(T,U){return U.dir&amp;&amp;A.test(T)});var E=this.root+A,C=y.call(this,E),j=this.clone();return j.root=C.name,j},remove:function(A){A=this.root+A;var E=this.files[A];if(E||(A.slice(-1)!=="/"&amp;&amp;(A+="/"),E=this.files[A]),E&amp;&amp;!E.dir)delete this.files[A];else for(var C=this.filter(function(T,U){return U.name.slice(0,A.length)===A}),j=0;j&lt;C.length;j++)delete this.files[C[j].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var E,C={};try{if((C=r.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:t.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&amp;&amp;(C.type="string"),!C.type)throw new Error("No output type specified.");r.checkSupport(C.type),C.platform!=="darwin"&amp;&amp;C.platform!=="freebsd"&amp;&amp;C.platform!=="linux"&amp;&amp;C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&amp;&amp;(C.platform="DOS");var j=C.comment||this.comment||"";E=l.generateWorker(this,C,j)}catch(T){(E=new n("error")).error(T)}return new a(E,C.type||"string",C.mimeType)},generateAsync:function(A,E){return this.generateInternalStream(A).accumulate(E)},generateNodeStream:function(A,E){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(E)}};u.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,u,s){u.exports=o("stream")},{stream:void 0}],17:[function(o,u,s){var e=o("./DataReader");function t(r){e.call(this,r);for(var n=0;n&lt;this.data.length;n++)r[n]=255&amp;r[n]}o("../utils").inherits(t,e),t.prototype.byteAt=function(r){return this.data[this.zero+r]},t.prototype.lastIndexOfSignature=function(r){for(var n=r.charCodeAt(0),a=r.charCodeAt(1),d=r.charCodeAt(2),f=r.charCodeAt(3),m=this.length-4;0&lt;=m;--m)if(this.data[m]===n&amp;&amp;this.data[m+1]===a&amp;&amp;this.data[m+2]===d&amp;&amp;this.data[m+3]===f)return m-this.zero;return-1},t.prototype.readAndCheckSignature=function(r){var n=r.charCodeAt(0),a=r.charCodeAt(1),d=r.charCodeAt(2),f=r.charCodeAt(3),m=this.readData(4);return n===m[0]&amp;&amp;a===m[1]&amp;&amp;d===m[2]&amp;&amp;f===m[3]},t.prototype.readData=function(r){if(this.checkOffset(r),r===0)return[];var n=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,n},u.exports=t},{"../utils":32,"./DataReader":18}],18:[function(o,u,s){var e=o("../utils");function t(r){this.data=r,this.length=r.length,this.index=0,this.zero=0}t.prototype={checkOffset:function(r){this.checkIndex(this.index+r)},checkIndex:function(r){if(this.length&lt;this.zero+r||r&lt;0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+r+"). Corrupted zip ?")},setIndex:function(r){this.checkIndex(r),this.index=r},skip:function(r){this.setIndex(this.index+r)},byteAt:function(){},readInt:function(r){var n,a=0;for(this.checkOffset(r),n=this.index+r-1;n&gt;=this.index;n--)a=(a&lt;&lt;8)+this.byteAt(n);return this.index+=r,a},readString:function(r){return e.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r&gt;&gt;25&amp;127),(r&gt;&gt;21&amp;15)-1,r&gt;&gt;16&amp;31,r&gt;&gt;11&amp;31,r&gt;&gt;5&amp;63,(31&amp;r)&lt;&lt;1))}},u.exports=t},{"../utils":32}],19:[function(o,u,s){var e=o("./Uint8ArrayReader");function t(r){e.call(this,r)}o("../utils").inherits(t,e),t.prototype.readData=function(r){this.checkOffset(r);var n=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,n},u.exports=t},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,u,s){var e=o("./DataReader");function t(r){e.call(this,r)}o("../utils").inherits(t,e),t.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},t.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},t.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},t.prototype.readData=function(r){this.checkOffset(r);var n=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,n},u.exports=t},{"../utils":32,"./DataReader":18}],21:[function(o,u,s){var e=o("./ArrayReader");function t(r){e.call(this,r)}o("../utils").inherits(t,e),t.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var n=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,n},u.exports=t},{"../utils":32,"./ArrayReader":17}],22:[function(o,u,s){var e=o("../utils"),t=o("../support"),r=o("./ArrayReader"),n=o("./StringReader"),a=o("./NodeBufferReader"),d=o("./Uint8ArrayReader");u.exports=function(f){var m=e.getTypeOf(f);return e.checkSupport(m),m!=="string"||t.uint8array?m==="nodebuffer"?new a(f):t.uint8array?new d(e.transformTo("uint8array",f)):new r(e.transformTo("array",f)):new n(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,u,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,u,s){var e=o("./GenericWorker"),t=o("../utils");function r(n){e.call(this,"ConvertWorker to "+n),this.destType=n}t.inherits(r,e),r.prototype.processChunk=function(n){this.push({data:t.transformTo(this.destType,n.data),meta:n.meta})},u.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(o,u,s){var e=o("./GenericWorker"),t=o("../crc32");function r(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(r,e),r.prototype.processChunk=function(n){this.streamInfo.crc32=t(n.data,this.streamInfo.crc32||0),this.push(n)},u.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,u,s){var e=o("../utils"),t=o("./GenericWorker");function r(n){t.call(this,"DataLengthProbe for "+n),this.propName=n,this.withStreamInfo(n,0)}e.inherits(r,t),r.prototype.processChunk=function(n){if(n){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+n.data.length}t.prototype.processChunk.call(this,n)},u.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(o,u,s){var e=o("../utils"),t=o("./GenericWorker");function r(n){t.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,n.then(function(d){a.dataIsReady=!0,a.data=d,a.max=d&amp;&amp;d.length||0,a.type=e.getTypeOf(d),a.isPaused||a._tickAndRepeat()},function(d){a.error(d)})}e.inherits(r,t),r.prototype.cleanUp=function(){t.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!t.prototype.resume.call(this)&amp;&amp;(!this._tickScheduled&amp;&amp;this.dataIsReady&amp;&amp;(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var n=null,a=Math.min(this.max,this.index+16384);if(this.index&gt;=this.max)return this.end();switch(this.type){case"string":n=this.data.substring(this.index,a);break;case"uint8array":n=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":n=this.data.slice(this.index,a)}return this.index=a,this.push({data:n,meta:{percent:this.max?this.index/this.max*100:0}})},u.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(o,u,s){function e(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}e.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&amp;&amp;(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&amp;&amp;this.previous.error(t),this.cleanUp()),!0)},on:function(t,r){return this._listeners[t].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,r){if(this._listeners[t])for(var n=0;n&lt;this._listeners[t].length;n++)this._listeners[t][n].call(this,r)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var r=this;return t.on("data",function(n){r.processChunk(n)}),t.on("end",function(){r.end()}),t.on("error",function(n){r.error(n)}),this},pause:function(){return!this.isPaused&amp;&amp;!this.isFinished&amp;&amp;(this.isPaused=!0,this.previous&amp;&amp;this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&amp;&amp;(this.error(this.generatedError),t=!0),this.previous&amp;&amp;this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,r){return this.extraStreamInfo[t]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&amp;&amp;(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&amp;&amp;this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -&gt; "+t:t}},u.exports=e},{}],29:[function(o,u,s){var e=o("../utils"),t=o("./ConvertWorker"),r=o("./GenericWorker"),n=o("../base64"),a=o("../support"),d=o("../external"),f=null;if(a.nodestream)try{f=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(p,c){return new d.Promise(function(b,v){var y=[],w=p._internalType,S=p._outputType,A=p._mimeType;p.on("data",function(E,C){y.push(E),c&amp;&amp;c(C)}).on("error",function(E){y=[],v(E)}).on("end",function(){try{var E=function(C,j,T){switch(C){case"blob":return e.newBlob(e.transformTo("arraybuffer",j),T);case"base64":return n.encode(j);default:return e.transformTo(C,j)}}(S,function(C,j){var T,U=0,X=null,x=0;for(T=0;T&lt;j.length;T++)x+=j[T].length;switch(C){case"string":return j.join("");case"array":return Array.prototype.concat.apply([],j);case"uint8array":for(X=new Uint8Array(x),T=0;T&lt;j.length;T++)X.set(j[T],U),U+=j[T].length;return X;case"nodebuffer":return Buffer.concat(j);default:throw new Error("concat : unsupported type '"+C+"'")}}(w,y),A);b(E)}catch(C){v(C)}y=[]}).resume()})}function l(p,c,b){var v=c;switch(c){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=c,this._mimeType=b,e.checkSupport(v),this._worker=p.pipe(new t(v)),p.lock()}catch(y){this._worker=new r("error"),this._worker.error(y)}}l.prototype={accumulate:function(p){return m(this,p)},on:function(p,c){var b=this;return p==="data"?this._worker.on(p,function(v){c.call(b,v.data,v.meta)}):this._worker.on(p,function(){e.delay(c,arguments,b)}),this},resume:function(){return e.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(p){if(e.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},p)}},u.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,u,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer&lt;"u"&amp;&amp;typeof Uint8Array&lt;"u",s.nodebuffer=typeof Buffer&lt;"u",s.uint8array=typeof Uint8Array&lt;"u",typeof ArrayBuffer&gt;"u")s.blob=!1;else{var e=new ArrayBuffer(0);try{s.blob=new Blob([e],{type:"application/zip"}).size===0}catch{try{var t=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);t.append(e),s.blob=t.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!o("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(o,u,s){for(var e=o("./utils"),t=o("./support"),r=o("./nodejsUtils"),n=o("./stream/GenericWorker"),a=new Array(256),d=0;d&lt;256;d++)a[d]=252&lt;=d?6:248&lt;=d?5:240&lt;=d?4:224&lt;=d?3:192&lt;=d?2:1;a[254]=a[254]=1;function f(){n.call(this,"utf-8 decode"),this.leftOver=null}function m(){n.call(this,"utf-8 encode")}s.utf8encode=function(l){return t.nodebuffer?r.newBufferFrom(l,"utf-8"):function(p){var c,b,v,y,w,S=p.length,A=0;for(y=0;y&lt;S;y++)(64512&amp;(b=p.charCodeAt(y)))==55296&amp;&amp;y+1&lt;S&amp;&amp;(64512&amp;(v=p.charCodeAt(y+1)))==56320&amp;&amp;(b=65536+(b-55296&lt;&lt;10)+(v-56320),y++),A+=b&lt;128?1:b&lt;2048?2:b&lt;65536?3:4;for(c=t.uint8array?new Uint8Array(A):new Array(A),y=w=0;w&lt;A;y++)(64512&amp;(b=p.charCodeAt(y)))==55296&amp;&amp;y+1&lt;S&amp;&amp;(64512&amp;(v=p.charCodeAt(y+1)))==56320&amp;&amp;(b=65536+(b-55296&lt;&lt;10)+(v-56320),y++),b&lt;128?c[w++]=b:(b&lt;2048?c[w++]=192|b&gt;&gt;&gt;6:(b&lt;65536?c[w++]=224|b&gt;&gt;&gt;12:(c[w++]=240|b&gt;&gt;&gt;18,c[w++]=128|b&gt;&gt;&gt;12&amp;63),c[w++]=128|b&gt;&gt;&gt;6&amp;63),c[w++]=128|63&amp;b);return c}(l)},s.utf8decode=function(l){return t.nodebuffer?e.transformTo("nodebuffer",l).toString("utf-8"):function(p){var c,b,v,y,w=p.length,S=new Array(2*w);for(c=b=0;c&lt;w;)if((v=p[c++])&lt;128)S[b++]=v;else if(4&lt;(y=a[v]))S[b++]=65533,c+=y-1;else{for(v&amp;=y===2?31:y===3?15:7;1&lt;y&amp;&amp;c&lt;w;)v=v&lt;&lt;6|63&amp;p[c++],y--;1&lt;y?S[b++]=65533:v&lt;65536?S[b++]=v:(v-=65536,S[b++]=55296|v&gt;&gt;10&amp;1023,S[b++]=56320|1023&amp;v)}return S.length!==b&amp;&amp;(S.subarray?S=S.subarray(0,b):S.length=b),e.applyFromCharCode(S)}(l=e.transformTo(t.uint8array?"uint8array":"array",l))},e.inherits(f,n),f.prototype.processChunk=function(l){var p=e.transformTo(t.uint8array?"uint8array":"array",l.data);if(this.leftOver&amp;&amp;this.leftOver.length){if(t.uint8array){var c=p;(p=new Uint8Array(c.length+this.leftOver.length)).set(this.leftOver,0),p.set(c,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var b=function(y,w){var S;for((w=w||y.length)&gt;y.length&amp;&amp;(w=y.length),S=w-1;0&lt;=S&amp;&amp;(192&amp;y[S])==128;)S--;return S&lt;0||S===0?w:S+a[y[S]]&gt;w?S:w}(p),v=p;b!==p.length&amp;&amp;(t.uint8array?(v=p.subarray(0,b),this.leftOver=p.subarray(b,p.length)):(v=p.slice(0,b),this.leftOver=p.slice(b,p.length))),this.push({data:s.utf8decode(v),meta:l.meta})},f.prototype.flush=function(){this.leftOver&amp;&amp;this.leftOver.length&amp;&amp;(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,e.inherits(m,n),m.prototype.processChunk=function(l){this.push({data:s.utf8encode(l.data),meta:l.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,u,s){var e=o("./support"),t=o("./base64"),r=o("./nodejsUtils"),n=o("./external");function a(c){return c}function d(c,b){for(var v=0;v&lt;c.length;++v)b[v]=255&amp;c.charCodeAt(v);return b}o("setimmediate"),s.newBlob=function(c,b){s.checkSupport("blob");try{return new Blob([c],{type:b})}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(c),v.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(c,b,v){var y=[],w=0,S=c.length;if(S&lt;=v)return String.fromCharCode.apply(null,c);for(;w&lt;S;)b==="array"||b==="nodebuffer"?y.push(String.fromCharCode.apply(null,c.slice(w,Math.min(w+v,S)))):y.push(String.fromCharCode.apply(null,c.subarray(w,Math.min(w+v,S)))),w+=v;return y.join("")},stringifyByChar:function(c){for(var b="",v=0;v&lt;c.length;v++)b+=String.fromCharCode(c[v]);return b},applyCanBeUsed:{uint8array:function(){try{return e.uint8array&amp;&amp;String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return e.nodebuffer&amp;&amp;String.fromCharCode.apply(null,r.allocBuffer(1)).length===1}catch{return!1}}()}};function m(c){var b=65536,v=s.getTypeOf(c),y=!0;if(v==="uint8array"?y=f.applyCanBeUsed.uint8array:v==="nodebuffer"&amp;&amp;(y=f.applyCanBeUsed.nodebuffer),y)for(;1&lt;b;)try{return f.stringifyByChunk(c,v,b)}catch{b=Math.floor(b/2)}return f.stringifyByChar(c)}function l(c,b){for(var v=0;v&lt;c.length;v++)b[v]=c[v];return b}s.applyFromCharCode=m;var p={};p.string={string:a,array:function(c){return d(c,new Array(c.length))},arraybuffer:function(c){return p.string.uint8array(c).buffer},uint8array:function(c){return d(c,new Uint8Array(c.length))},nodebuffer:function(c){return d(c,r.allocBuffer(c.length))}},p.array={string:m,array:a,arraybuffer:function(c){return new Uint8Array(c).buffer},uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return r.newBufferFrom(c)}},p.arraybuffer={string:function(c){return m(new Uint8Array(c))},array:function(c){return l(new Uint8Array(c),new Array(c.byteLength))},arraybuffer:a,uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return r.newBufferFrom(new Uint8Array(c))}},p.uint8array={string:m,array:function(c){return l(c,new Array(c.length))},arraybuffer:function(c){return c.buffer},uint8array:a,nodebuffer:function(c){return r.newBufferFrom(c)}},p.nodebuffer={string:m,array:function(c){return l(c,new Array(c.length))},arraybuffer:function(c){return p.nodebuffer.uint8array(c).buffer},uint8array:function(c){return l(c,new Uint8Array(c.length))},nodebuffer:a},s.transformTo=function(c,b){if(b=b||"",!c)return b;s.checkSupport(c);var v=s.getTypeOf(b);return p[v][c](b)},s.resolve=function(c){for(var b=c.split("/"),v=[],y=0;y&lt;b.length;y++){var w=b[y];w==="."||w===""&amp;&amp;y!==0&amp;&amp;y!==b.length-1||(w===".."?v.pop():v.push(w))}return v.join("/")},s.getTypeOf=function(c){return typeof c=="string"?"string":Object.prototype.toString.call(c)==="[object Array]"?"array":e.nodebuffer&amp;&amp;r.isBuffer(c)?"nodebuffer":e.uint8array&amp;&amp;c instanceof Uint8Array?"uint8array":e.arraybuffer&amp;&amp;c instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(c){if(!e[c.toLowerCase()])throw new Error(c+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(c){var b,v,y="";for(v=0;v&lt;(c||"").length;v++)y+="\\x"+((b=c.charCodeAt(v))&lt;16?"0":"")+b.toString(16).toUpperCase();return y},s.delay=function(c,b,v){setImmediate(function(){c.apply(v||null,b||[])})},s.inherits=function(c,b){function v(){}v.prototype=b.prototype,c.prototype=new v},s.extend=function(){var c,b,v={};for(c=0;c&lt;arguments.length;c++)for(b in arguments[c])Object.prototype.hasOwnProperty.call(arguments[c],b)&amp;&amp;v[b]===void 0&amp;&amp;(v[b]=arguments[c][b]);return v},s.prepareContent=function(c,b,v,y,w){return n.Promise.resolve(b).then(function(S){return e.blob&amp;&amp;(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&amp;&amp;typeof FileReader&lt;"u"?new n.Promise(function(A,E){var C=new FileReader;C.onload=function(j){A(j.target.result)},C.onerror=function(j){E(j.target.error)},C.readAsArrayBuffer(S)}):S}).then(function(S){var A=s.getTypeOf(S);return A?(A==="arraybuffer"?S=s.transformTo("uint8array",S):A==="string"&amp;&amp;(w?S=t.decode(S):v&amp;&amp;y!==!0&amp;&amp;(S=function(E){return d(E,e.uint8array?new Uint8Array(E.length):new Array(E.length))}(S))),S):n.Promise.reject(new Error("Can't read the data of '"+c+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,u,s){var e=o("./reader/readerFor"),t=o("./utils"),r=o("./signature"),n=o("./zipEntry"),a=o("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+t.pretty(m)+", expected "+t.pretty(f)+")")}},isSignature:function(f,m){var l=this.reader.index;this.reader.setIndex(f);var p=this.reader.readString(4)===m;return this.reader.setIndex(l),p},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),m=a.uint8array?"uint8array":"array",l=t.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(l)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,m,l,p=this.zip64EndOfCentralSize-44;0&lt;p;)f=this.reader.readInt(2),m=this.reader.readInt(4),l=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:l}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1&lt;this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f&lt;this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(r.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER);)(f=new n({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&amp;&amp;this.centralDirRecords!==0&amp;&amp;this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);if(f&lt;0)throw this.isSignature(0,r.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(r.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===t.MAX_VALUE_16BITS||this.diskWithCentralDirStart===t.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===t.MAX_VALUE_16BITS||this.centralDirRecords===t.MAX_VALUE_16BITS||this.centralDirSize===t.MAX_VALUE_32BITS||this.centralDirOffset===t.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR))&lt;0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,r.ZIP64_CENTRAL_DIRECTORY_END)&amp;&amp;(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir&lt;0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var l=this.centralDirOffset+this.centralDirSize;this.zip64&amp;&amp;(l+=20,l+=12+this.zip64EndOfCentralSize);var p=m-l;if(0&lt;p)this.isSignature(m,r.CENTRAL_FILE_HEADER)||(this.reader.zero=p);else if(p&lt;0)throw new Error("Corrupted zip: missing "+Math.abs(p)+" bytes.")},prepareReader:function(f){this.reader=e(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},u.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,u,s){var e=o("./reader/readerFor"),t=o("./utils"),r=o("./compressedObject"),n=o("./crc32"),a=o("./utf8"),d=o("./compressions"),f=o("./support");function m(l,p){this.options=l,this.loadOptions=p}m.prototype={isEncrypted:function(){return(1&amp;this.bitFlag)==1},useUTF8:function(){return(2048&amp;this.bitFlag)==2048},readLocalPart:function(l){var p,c;if(l.skip(22),this.fileNameLength=l.readInt(2),c=l.readInt(2),this.fileName=l.readData(this.fileNameLength),l.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((p=function(b){for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)&amp;&amp;d[v].magic===b)return d[v];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+t.pretty(this.compressionMethod)+" unknown (inner file : "+t.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,p,l.readData(this.compressedSize))},readCentralPart:function(l){this.versionMadeBy=l.readInt(2),l.skip(2),this.bitFlag=l.readInt(2),this.compressionMethod=l.readString(2),this.date=l.readDate(),this.crc32=l.readInt(4),this.compressedSize=l.readInt(4),this.uncompressedSize=l.readInt(4);var p=l.readInt(2);if(this.extraFieldsLength=l.readInt(2),this.fileCommentLength=l.readInt(2),this.diskNumberStart=l.readInt(2),this.internalFileAttributes=l.readInt(2),this.externalFileAttributes=l.readInt(4),this.localHeaderOffset=l.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");l.skip(p),this.readExtraFields(l),this.parseZIP64ExtraField(l),this.fileComment=l.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var l=this.versionMadeBy&gt;&gt;8;this.dir=!!(16&amp;this.externalFileAttributes),l==0&amp;&amp;(this.dosPermissions=63&amp;this.externalFileAttributes),l==3&amp;&amp;(this.unixPermissions=this.externalFileAttributes&gt;&gt;16&amp;65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var l=e(this.extraFields[1].value);this.uncompressedSize===t.MAX_VALUE_32BITS&amp;&amp;(this.uncompressedSize=l.readInt(8)),this.compressedSize===t.MAX_VALUE_32BITS&amp;&amp;(this.compressedSize=l.readInt(8)),this.localHeaderOffset===t.MAX_VALUE_32BITS&amp;&amp;(this.localHeaderOffset=l.readInt(8)),this.diskNumberStart===t.MAX_VALUE_32BITS&amp;&amp;(this.diskNumberStart=l.readInt(4))}},readExtraFields:function(l){var p,c,b,v=l.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});l.index+4&lt;v;)p=l.readInt(2),c=l.readInt(2),b=l.readData(c),this.extraFields[p]={id:p,length:c,value:b};l.setIndex(v)},handleUTF8:function(){var l=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var p=this.findExtraFieldUnicodePath();if(p!==null)this.fileNameStr=p;else{var c=t.transformTo(l,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var v=t.transformTo(l,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var l=this.extraFields[28789];if(l){var p=e(l.value);return p.readInt(1)!==1||n(this.fileName)!==p.readInt(4)?null:a.utf8decode(p.readData(l.length-5))}return null},findExtraFieldUnicodeComment:function(){var l=this.extraFields[25461];if(l){var p=e(l.value);return p.readInt(1)!==1||n(this.fileComment)!==p.readInt(4)?null:a.utf8decode(p.readData(l.length-5))}return null}},u.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,u,s){function e(p,c,b){this.name=p,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=c,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var t=o("./stream/StreamHelper"),r=o("./stream/DataWorker"),n=o("./utf8"),a=o("./compressedObject"),d=o("./stream/GenericWorker");e.prototype={internalStream:function(p){var c=null,b="string";try{if(!p)throw new Error("No output type specified.");var v=(b=p.toLowerCase())==="string"||b==="text";b!=="binarystring"&amp;&amp;b!=="text"||(b="string"),c=this._decompressWorker();var y=!this._dataBinary;y&amp;&amp;!v&amp;&amp;(c=c.pipe(new n.Utf8EncodeWorker)),!y&amp;&amp;v&amp;&amp;(c=c.pipe(new n.Utf8DecodeWorker))}catch(w){(c=new d("error")).error(w)}return new t(c,b,"")},async:function(p,c){return this.internalStream(p).accumulate(c)},nodeStream:function(p,c){return this.internalStream(p||"nodebuffer").toNodejsStream(c)},_compressWorker:function(p,c){if(this._data instanceof a&amp;&amp;this._data.compression.magic===p.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new n.Utf8EncodeWorker)),a.createWorkerFrom(b,p,c)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof d?this._data:new r(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},l=0;l&lt;f.length;l++)e.prototype[f[l]]=m;u.exports=e},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,u,s){(function(e){var t,r,n=e.MutationObserver||e.WebKitMutationObserver;if(n){var a=0,d=new n(p),f=e.document.createTextNode("");d.observe(f,{characterData:!0}),t=function(){f.data=a=++a%2}}else if(e.setImmediate||e.MessageChannel===void 0)t="document"in e&amp;&amp;"onreadystatechange"in e.document.createElement("script")?function(){var c=e.document.createElement("script");c.onreadystatechange=function(){p(),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},e.document.documentElement.appendChild(c)}:function(){setTimeout(p,0)};else{var m=new e.MessageChannel;m.port1.onmessage=p,t=function(){m.port2.postMessage(0)}}var l=[];function p(){var c,b;r=!0;for(var v=l.length;v;){for(b=l,l=[],c=-1;++c&lt;v;)b[c]();v=l.length}r=!1}u.exports=function(c){l.push(c)!==1||r||t()}}).call(this,typeof commonjsGlobal&lt;"u"?commonjsGlobal:typeof self&lt;"u"?self:typeof window&lt;"u"?window:{})},{}],37:[function(o,u,s){var e=o("immediate");function t(){}var r={},n=["REJECTED"],a=["FULFILLED"],d=["PENDING"];function f(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,v!==t&amp;&amp;c(this,v)}function m(v,y,w){this.promise=v,typeof y=="function"&amp;&amp;(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&amp;&amp;(this.onRejected=w,this.callRejected=this.otherCallRejected)}function l(v,y,w){e(function(){var S;try{S=y(w)}catch(A){return r.reject(v,A)}S===v?r.reject(v,new TypeError("Cannot resolve promise with itself")):r.resolve(v,S)})}function p(v){var y=v&amp;&amp;v.then;if(v&amp;&amp;(typeof v=="object"||typeof v=="function")&amp;&amp;typeof y=="function")return function(){y.apply(v,arguments)}}function c(v,y){var w=!1;function S(C){w||(w=!0,r.reject(v,C))}function A(C){w||(w=!0,r.resolve(v,C))}var E=b(function(){y(A,S)});E.status==="error"&amp;&amp;S(E.value)}function b(v,y){var w={};try{w.value=v(y),w.status="success"}catch(S){w.status="error",w.value=S}return w}(u.exports=f).prototype.finally=function(v){if(typeof v!="function")return this;var y=this.constructor;return this.then(function(w){return y.resolve(v()).then(function(){return w})},function(w){return y.resolve(v()).then(function(){throw w})})},f.prototype.catch=function(v){return this.then(null,v)},f.prototype.then=function(v,y){if(typeof v!="function"&amp;&amp;this.state===a||typeof y!="function"&amp;&amp;this.state===n)return this;var w=new this.constructor(t);return this.state!==d?l(w,this.state===a?v:y,this.outcome):this.queue.push(new m(w,v,y)),w},m.prototype.callFulfilled=function(v){r.resolve(this.promise,v)},m.prototype.otherCallFulfilled=function(v){l(this.promise,this.onFulfilled,v)},m.prototype.callRejected=function(v){r.reject(this.promise,v)},m.prototype.otherCallRejected=function(v){l(this.promise,this.onRejected,v)},r.resolve=function(v,y){var w=b(p,y);if(w.status==="error")return r.reject(v,w.value);var S=w.value;if(S)c(v,S);else{v.state=a,v.outcome=y;for(var A=-1,E=v.queue.length;++A&lt;E;)v.queue[A].callFulfilled(y)}return v},r.reject=function(v,y){v.state=n,v.outcome=y;for(var w=-1,S=v.queue.length;++w&lt;S;)v.queue[w].callRejected(y);return v},f.resolve=function(v){return v instanceof this?v:r.resolve(new this(t),v)},f.reject=function(v){var y=new this(t);return r.reject(y,v)},f.all=function(v){var y=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=v.length,S=!1;if(!w)return this.resolve([]);for(var A=new Array(w),E=0,C=-1,j=new this(t);++C&lt;w;)T(v[C],C);return j;function T(U,X){y.resolve(U).then(function(x){A[X]=x,++E!==w||S||(S=!0,r.resolve(j,A))},function(x){S||(S=!0,r.reject(j,x))})}},f.race=function(v){var y=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=v.length,S=!1;if(!w)return this.resolve([]);for(var A=-1,E=new this(t);++A&lt;w;)C=v[A],y.resolve(C).then(function(j){S||(S=!0,r.resolve(E,j))},function(j){S||(S=!0,r.reject(E,j))});var C;return E}},{immediate:36}],38:[function(o,u,s){var e={};(0,o("./lib/utils/common").assign)(e,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),u.exports=e},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,u,s){var e=o("./zlib/deflate"),t=o("./utils/common"),r=o("./utils/strings"),n=o("./zlib/messages"),a=o("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,l=0,p=8;function c(v){if(!(this instanceof c))return new c(v);this.options=t.assign({level:m,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},v||{});var y=this.options;y.raw&amp;&amp;0&lt;y.windowBits?y.windowBits=-y.windowBits:y.gzip&amp;&amp;0&lt;y.windowBits&amp;&amp;y.windowBits&lt;16&amp;&amp;(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var w=e.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(w!==f)throw new Error(n[w]);if(y.header&amp;&amp;e.deflateSetHeader(this.strm,y.header),y.dictionary){var S;if(S=typeof y.dictionary=="string"?r.string2buf(y.dictionary):d.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(w=e.deflateSetDictionary(this.strm,S))!==f)throw new Error(n[w]);this._dict_set=!0}}function b(v,y){var w=new c(y);if(w.push(v,!0),w.err)throw w.msg||n[w.err];return w.result}c.prototype.push=function(v,y){var w,S,A=this.strm,E=this.options.chunkSize;if(this.ended)return!1;S=y===~~y?y:y===!0?4:0,typeof v=="string"?A.input=r.string2buf(v):d.call(v)==="[object ArrayBuffer]"?A.input=new Uint8Array(v):A.input=v,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&amp;&amp;(A.output=new t.Buf8(E),A.next_out=0,A.avail_out=E),(w=e.deflate(A,S))!==1&amp;&amp;w!==f)return this.onEnd(w),!(this.ended=!0);A.avail_out!==0&amp;&amp;(A.avail_in!==0||S!==4&amp;&amp;S!==2)||(this.options.to==="string"?this.onData(r.buf2binstring(t.shrinkBuf(A.output,A.next_out))):this.onData(t.shrinkBuf(A.output,A.next_out)))}while((0&lt;A.avail_in||A.avail_out===0)&amp;&amp;w!==1);return S===4?(w=e.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===f):S!==2||(this.onEnd(f),!(A.avail_out=0))},c.prototype.onData=function(v){this.chunks.push(v)},c.prototype.onEnd=function(v){v===f&amp;&amp;(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},s.Deflate=c,s.deflate=b,s.deflateRaw=function(v,y){return(y=y||{}).raw=!0,b(v,y)},s.gzip=function(v,y){return(y=y||{}).gzip=!0,b(v,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,u,s){var e=o("./zlib/inflate"),t=o("./utils/common"),r=o("./utils/strings"),n=o("./zlib/constants"),a=o("./zlib/messages"),d=o("./zlib/zstream"),f=o("./zlib/gzheader"),m=Object.prototype.toString;function l(c){if(!(this instanceof l))return new l(c);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},c||{});var b=this.options;b.raw&amp;&amp;0&lt;=b.windowBits&amp;&amp;b.windowBits&lt;16&amp;&amp;(b.windowBits=-b.windowBits,b.windowBits===0&amp;&amp;(b.windowBits=-15)),!(0&lt;=b.windowBits&amp;&amp;b.windowBits&lt;16)||c&amp;&amp;c.windowBits||(b.windowBits+=32),15&lt;b.windowBits&amp;&amp;b.windowBits&lt;48&amp;&amp;!(15&amp;b.windowBits)&amp;&amp;(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var v=e.inflateInit2(this.strm,b.windowBits);if(v!==n.Z_OK)throw new Error(a[v]);this.header=new f,e.inflateGetHeader(this.strm,this.header)}function p(c,b){var v=new l(b);if(v.push(c,!0),v.err)throw v.msg||a[v.err];return v.result}l.prototype.push=function(c,b){var v,y,w,S,A,E,C=this.strm,j=this.options.chunkSize,T=this.options.dictionary,U=!1;if(this.ended)return!1;y=b===~~b?b:b===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof c=="string"?C.input=r.binstring2buf(c):m.call(c)==="[object ArrayBuffer]"?C.input=new Uint8Array(c):C.input=c,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&amp;&amp;(C.output=new t.Buf8(j),C.next_out=0,C.avail_out=j),(v=e.inflate(C,n.Z_NO_FLUSH))===n.Z_NEED_DICT&amp;&amp;T&amp;&amp;(E=typeof T=="string"?r.string2buf(T):m.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,v=e.inflateSetDictionary(this.strm,E)),v===n.Z_BUF_ERROR&amp;&amp;U===!0&amp;&amp;(v=n.Z_OK,U=!1),v!==n.Z_STREAM_END&amp;&amp;v!==n.Z_OK)return this.onEnd(v),!(this.ended=!0);C.next_out&amp;&amp;(C.avail_out!==0&amp;&amp;v!==n.Z_STREAM_END&amp;&amp;(C.avail_in!==0||y!==n.Z_FINISH&amp;&amp;y!==n.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=r.utf8border(C.output,C.next_out),S=C.next_out-w,A=r.buf2string(C.output,w),C.next_out=S,C.avail_out=j-S,S&amp;&amp;t.arraySet(C.output,C.output,w,S,0),this.onData(A)):this.onData(t.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&amp;&amp;C.avail_out===0&amp;&amp;(U=!0)}while((0&lt;C.avail_in||C.avail_out===0)&amp;&amp;v!==n.Z_STREAM_END);return v===n.Z_STREAM_END&amp;&amp;(y=n.Z_FINISH),y===n.Z_FINISH?(v=e.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===n.Z_OK):y!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),!(C.avail_out=0))},l.prototype.onData=function(c){this.chunks.push(c)},l.prototype.onEnd=function(c){c===n.Z_OK&amp;&amp;(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=c,this.msg=this.strm.msg},s.Inflate=l,s.inflate=p,s.inflateRaw=function(c,b){return(b=b||{}).raw=!0,p(c,b)},s.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,u,s){var e=typeof Uint8Array&lt;"u"&amp;&amp;typeof Uint16Array&lt;"u"&amp;&amp;typeof Int32Array&lt;"u";s.assign=function(n){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var d=a.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&amp;&amp;(n[f]=d[f])}}return n},s.shrinkBuf=function(n,a){return n.length===a?n:n.subarray?n.subarray(0,a):(n.length=a,n)};var t={arraySet:function(n,a,d,f,m){if(a.subarray&amp;&amp;n.subarray)n.set(a.subarray(d,d+f),m);else for(var l=0;l&lt;f;l++)n[m+l]=a[d+l]},flattenChunks:function(n){var a,d,f,m,l,p;for(a=f=0,d=n.length;a&lt;d;a++)f+=n[a].length;for(p=new Uint8Array(f),a=m=0,d=n.length;a&lt;d;a++)l=n[a],p.set(l,m),m+=l.length;return p}},r={arraySet:function(n,a,d,f,m){for(var l=0;l&lt;f;l++)n[m+l]=a[d+l]},flattenChunks:function(n){return[].concat.apply([],n)}};s.setTyped=function(n){n?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,t)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,r))},s.setTyped(e)},{}],42:[function(o,u,s){var e=o("./common"),t=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var n=new e.Buf8(256),a=0;a&lt;256;a++)n[a]=252&lt;=a?6:248&lt;=a?5:240&lt;=a?4:224&lt;=a?3:192&lt;=a?2:1;function d(f,m){if(m&lt;65537&amp;&amp;(f.subarray&amp;&amp;r||!f.subarray&amp;&amp;t))return String.fromCharCode.apply(null,e.shrinkBuf(f,m));for(var l="",p=0;p&lt;m;p++)l+=String.fromCharCode(f[p]);return l}n[254]=n[254]=1,s.string2buf=function(f){var m,l,p,c,b,v=f.length,y=0;for(c=0;c&lt;v;c++)(64512&amp;(l=f.charCodeAt(c)))==55296&amp;&amp;c+1&lt;v&amp;&amp;(64512&amp;(p=f.charCodeAt(c+1)))==56320&amp;&amp;(l=65536+(l-55296&lt;&lt;10)+(p-56320),c++),y+=l&lt;128?1:l&lt;2048?2:l&lt;65536?3:4;for(m=new e.Buf8(y),c=b=0;b&lt;y;c++)(64512&amp;(l=f.charCodeAt(c)))==55296&amp;&amp;c+1&lt;v&amp;&amp;(64512&amp;(p=f.charCodeAt(c+1)))==56320&amp;&amp;(l=65536+(l-55296&lt;&lt;10)+(p-56320),c++),l&lt;128?m[b++]=l:(l&lt;2048?m[b++]=192|l&gt;&gt;&gt;6:(l&lt;65536?m[b++]=224|l&gt;&gt;&gt;12:(m[b++]=240|l&gt;&gt;&gt;18,m[b++]=128|l&gt;&gt;&gt;12&amp;63),m[b++]=128|l&gt;&gt;&gt;6&amp;63),m[b++]=128|63&amp;l);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new e.Buf8(f.length),l=0,p=m.length;l&lt;p;l++)m[l]=f.charCodeAt(l);return m},s.buf2string=function(f,m){var l,p,c,b,v=m||f.length,y=new Array(2*v);for(l=p=0;l&lt;v;)if((c=f[l++])&lt;128)y[p++]=c;else if(4&lt;(b=n[c]))y[p++]=65533,l+=b-1;else{for(c&amp;=b===2?31:b===3?15:7;1&lt;b&amp;&amp;l&lt;v;)c=c&lt;&lt;6|63&amp;f[l++],b--;1&lt;b?y[p++]=65533:c&lt;65536?y[p++]=c:(c-=65536,y[p++]=55296|c&gt;&gt;10&amp;1023,y[p++]=56320|1023&amp;c)}return d(y,p)},s.utf8border=function(f,m){var l;for((m=m||f.length)&gt;f.length&amp;&amp;(m=f.length),l=m-1;0&lt;=l&amp;&amp;(192&amp;f[l])==128;)l--;return l&lt;0||l===0?m:l+n[f[l]]&gt;m?l:m}},{"./common":41}],43:[function(o,u,s){u.exports=function(e,t,r,n){for(var a=65535&amp;e|0,d=e&gt;&gt;&gt;16&amp;65535|0,f=0;r!==0;){for(r-=f=2e3&lt;r?2e3:r;d=d+(a=a+t[n++]|0)|0,--f;);a%=65521,d%=65521}return a|d&lt;&lt;16|0}},{}],44:[function(o,u,s){u.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(o,u,s){var e=function(){for(var t,r=[],n=0;n&lt;256;n++){t=n;for(var a=0;a&lt;8;a++)t=1&amp;t?3988292384^t&gt;&gt;&gt;1:t&gt;&gt;&gt;1;r[n]=t}return r}();u.exports=function(t,r,n,a){var d=e,f=a+n;t^=-1;for(var m=a;m&lt;f;m++)t=t&gt;&gt;&gt;8^d[255&amp;(t^r[m])];return-1^t}},{}],46:[function(o,u,s){var e,t=o("../utils/common"),r=o("./trees"),n=o("./adler32"),a=o("./crc32"),d=o("./messages"),f=0,m=4,l=0,p=-2,c=-1,b=4,v=2,y=8,w=9,S=286,A=30,E=19,C=2*S+1,j=15,T=3,U=258,X=U+T+1,x=42,z=113,g=1,q=2,oe=3,J=4;function se(h,N){return h.msg=d[N],N}function Z(h){return(h&lt;&lt;1)-(4&lt;h?9:0)}function te(h){for(var N=h.length;0&lt;=--N;)h[N]=0}function I(h){var N=h.state,B=N.pending;B&gt;h.avail_out&amp;&amp;(B=h.avail_out),B!==0&amp;&amp;(t.arraySet(h.output,N.pending_buf,N.pending_out,B,h.next_out),h.next_out+=B,N.pending_out+=B,h.total_out+=B,h.avail_out-=B,N.pending-=B,N.pending===0&amp;&amp;(N.pending_out=0))}function P(h,N){r._tr_flush_block(h,0&lt;=h.block_start?h.block_start:-1,h.strstart-h.block_start,N),h.block_start=h.strstart,I(h.strm)}function re(h,N){h.pending_buf[h.pending++]=N}function Y(h,N){h.pending_buf[h.pending++]=N&gt;&gt;&gt;8&amp;255,h.pending_buf[h.pending++]=255&amp;N}function G(h,N){var B,O,k=h.max_chain_length,R=h.strstart,L=h.prev_length,W=h.nice_match,$=h.strstart&gt;h.w_size-X?h.strstart-(h.w_size-X):0,V=h.window,ee=h.w_mask,H=h.prev,ne=h.strstart+U,ue=V[R+L-1],ae=V[R+L];h.prev_length&gt;=h.good_match&amp;&amp;(k&gt;&gt;=2),W&gt;h.lookahead&amp;&amp;(W=h.lookahead);do if(V[(B=N)+L]===ae&amp;&amp;V[B+L-1]===ue&amp;&amp;V[B]===V[R]&amp;&amp;V[++B]===V[R+1]){R+=2,B++;do;while(V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;V[++R]===V[++B]&amp;&amp;R&lt;ne);if(O=U-(ne-R),R=ne-U,L&lt;O){if(h.match_start=N,W&lt;=(L=O))break;ue=V[R+L-1],ae=V[R+L]}}while((N=H[N&amp;ee])&gt;$&amp;&amp;--k!=0);return L&lt;=h.lookahead?L:h.lookahead}function le(h){var N,B,O,k,R,L,W,$,V,ee,H=h.w_size;do{if(k=h.window_size-h.lookahead-h.strstart,h.strstart&gt;=H+(H-X)){for(t.arraySet(h.window,h.window,H,H,0),h.match_start-=H,h.strstart-=H,h.block_start-=H,N=B=h.hash_size;O=h.head[--N],h.head[N]=H&lt;=O?O-H:0,--B;);for(N=B=H;O=h.prev[--N],h.prev[N]=H&lt;=O?O-H:0,--B;);k+=H}if(h.strm.avail_in===0)break;if(L=h.strm,W=h.window,$=h.strstart+h.lookahead,V=k,ee=void 0,ee=L.avail_in,V&lt;ee&amp;&amp;(ee=V),B=ee===0?0:(L.avail_in-=ee,t.arraySet(W,L.input,L.next_in,ee,$),L.state.wrap===1?L.adler=n(L.adler,W,ee,$):L.state.wrap===2&amp;&amp;(L.adler=a(L.adler,W,ee,$)),L.next_in+=ee,L.total_in+=ee,ee),h.lookahead+=B,h.lookahead+h.insert&gt;=T)for(R=h.strstart-h.insert,h.ins_h=h.window[R],h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[R+1])&amp;h.hash_mask;h.insert&amp;&amp;(h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[R+T-1])&amp;h.hash_mask,h.prev[R&amp;h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=R,R++,h.insert--,!(h.lookahead+h.insert&lt;T)););}while(h.lookahead&lt;X&amp;&amp;h.strm.avail_in!==0)}function he(h,N){for(var B,O;;){if(h.lookahead&lt;X){if(le(h),h.lookahead&lt;X&amp;&amp;N===f)return g;if(h.lookahead===0)break}if(B=0,h.lookahead&gt;=T&amp;&amp;(h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[h.strstart+T-1])&amp;h.hash_mask,B=h.prev[h.strstart&amp;h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),B!==0&amp;&amp;h.strstart-B&lt;=h.w_size-X&amp;&amp;(h.match_length=G(h,B)),h.match_length&gt;=T)if(O=r._tr_tally(h,h.strstart-h.match_start,h.match_length-T),h.lookahead-=h.match_length,h.match_length&lt;=h.max_lazy_match&amp;&amp;h.lookahead&gt;=T){for(h.match_length--;h.strstart++,h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[h.strstart+T-1])&amp;h.hash_mask,B=h.prev[h.strstart&amp;h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart,--h.match_length!=0;);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[h.strstart+1])&amp;h.hash_mask;else O=r._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(O&amp;&amp;(P(h,!1),h.strm.avail_out===0))return g}return h.insert=h.strstart&lt;T-1?h.strstart:T-1,N===m?(P(h,!0),h.strm.avail_out===0?oe:J):h.last_lit&amp;&amp;(P(h,!1),h.strm.avail_out===0)?g:q}function ie(h,N){for(var B,O,k;;){if(h.lookahead&lt;X){if(le(h),h.lookahead&lt;X&amp;&amp;N===f)return g;if(h.lookahead===0)break}if(B=0,h.lookahead&gt;=T&amp;&amp;(h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[h.strstart+T-1])&amp;h.hash_mask,B=h.prev[h.strstart&amp;h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=T-1,B!==0&amp;&amp;h.prev_length&lt;h.max_lazy_match&amp;&amp;h.strstart-B&lt;=h.w_size-X&amp;&amp;(h.match_length=G(h,B),h.match_length&lt;=5&amp;&amp;(h.strategy===1||h.match_length===T&amp;&amp;4096&lt;h.strstart-h.match_start)&amp;&amp;(h.match_length=T-1)),h.prev_length&gt;=T&amp;&amp;h.match_length&lt;=h.prev_length){for(k=h.strstart+h.lookahead-T,O=r._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-T),h.lookahead-=h.prev_length-1,h.prev_length-=2;++h.strstart&lt;=k&amp;&amp;(h.ins_h=(h.ins_h&lt;&lt;h.hash_shift^h.window[h.strstart+T-1])&amp;h.hash_mask,B=h.prev[h.strstart&amp;h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),--h.prev_length!=0;);if(h.match_available=0,h.match_length=T-1,h.strstart++,O&amp;&amp;(P(h,!1),h.strm.avail_out===0))return g}else if(h.match_available){if((O=r._tr_tally(h,0,h.window[h.strstart-1]))&amp;&amp;P(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return g}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&amp;&amp;(O=r._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart&lt;T-1?h.strstart:T-1,N===m?(P(h,!0),h.strm.avail_out===0?oe:J):h.last_lit&amp;&amp;(P(h,!1),h.strm.avail_out===0)?g:q}function D(h,N,B,O,k){this.good_length=h,this.max_lazy=N,this.nice_length=B,this.max_chain=O,this.func=k}function F(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(2*C),this.dyn_dtree=new t.Buf16(2*(2*A+1)),this.bl_tree=new t.Buf16(2*(2*E+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(j+1),this.heap=new t.Buf16(2*S+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*S+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function M(h){var N;return h&amp;&amp;h.state?(h.total_in=h.total_out=0,h.data_type=v,(N=h.state).pending=0,N.pending_out=0,N.wrap&lt;0&amp;&amp;(N.wrap=-N.wrap),N.status=N.wrap?x:z,h.adler=N.wrap===2?0:1,N.last_flush=f,r._tr_init(N),l):se(h,p)}function Q(h){var N=M(h);return N===l&amp;&amp;function(B){B.window_size=2*B.w_size,te(B.head),B.max_lazy_match=e[B.level].max_lazy,B.good_match=e[B.level].good_length,B.nice_match=e[B.level].nice_length,B.max_chain_length=e[B.level].max_chain,B.strstart=0,B.block_start=0,B.lookahead=0,B.insert=0,B.match_length=B.prev_length=T-1,B.match_available=0,B.ins_h=0}(h.state),N}function K(h,N,B,O,k,R){if(!h)return p;var L=1;if(N===c&amp;&amp;(N=6),O&lt;0?(L=0,O=-O):15&lt;O&amp;&amp;(L=2,O-=16),k&lt;1||w&lt;k||B!==y||O&lt;8||15&lt;O||N&lt;0||9&lt;N||R&lt;0||b&lt;R)return se(h,p);O===8&amp;&amp;(O=9);var W=new F;return(h.state=W).strm=h,W.wrap=L,W.gzhead=null,W.w_bits=O,W.w_size=1&lt;&lt;W.w_bits,W.w_mask=W.w_size-1,W.hash_bits=k+7,W.hash_size=1&lt;&lt;W.hash_bits,W.hash_mask=W.hash_size-1,W.hash_shift=~~((W.hash_bits+T-1)/T),W.window=new t.Buf8(2*W.w_size),W.head=new t.Buf16(W.hash_size),W.prev=new t.Buf16(W.w_size),W.lit_bufsize=1&lt;&lt;k+6,W.pending_buf_size=4*W.lit_bufsize,W.pending_buf=new t.Buf8(W.pending_buf_size),W.d_buf=1*W.lit_bufsize,W.l_buf=3*W.lit_bufsize,W.level=N,W.strategy=R,W.method=B,Q(h)}e=[new D(0,0,0,0,function(h,N){var B=65535;for(B&gt;h.pending_buf_size-5&amp;&amp;(B=h.pending_buf_size-5);;){if(h.lookahead&lt;=1){if(le(h),h.lookahead===0&amp;&amp;N===f)return g;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var O=h.block_start+B;if((h.strstart===0||h.strstart&gt;=O)&amp;&amp;(h.lookahead=h.strstart-O,h.strstart=O,P(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start&gt;=h.w_size-X&amp;&amp;(P(h,!1),h.strm.avail_out===0))return g}return h.insert=0,N===m?(P(h,!0),h.strm.avail_out===0?oe:J):(h.strstart&gt;h.block_start&amp;&amp;(P(h,!1),h.strm.avail_out),g)}),new D(4,4,8,4,he),new D(4,5,16,8,he),new D(4,6,32,32,he),new D(4,4,16,16,ie),new D(8,16,32,32,ie),new D(8,16,128,128,ie),new D(8,32,128,256,ie),new D(32,128,258,1024,ie),new D(32,258,258,4096,ie)],s.deflateInit=function(h,N){return K(h,N,y,15,8,0)},s.deflateInit2=K,s.deflateReset=Q,s.deflateResetKeep=M,s.deflateSetHeader=function(h,N){return h&amp;&amp;h.state?h.state.wrap!==2?p:(h.state.gzhead=N,l):p},s.deflate=function(h,N){var B,O,k,R;if(!h||!h.state||5&lt;N||N&lt;0)return h?se(h,p):p;if(O=h.state,!h.output||!h.input&amp;&amp;h.avail_in!==0||O.status===666&amp;&amp;N!==m)return se(h,h.avail_out===0?-5:p);if(O.strm=h,B=O.last_flush,O.last_flush=N,O.status===x)if(O.wrap===2)h.adler=0,re(O,31),re(O,139),re(O,8),O.gzhead?(re(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),re(O,255&amp;O.gzhead.time),re(O,O.gzhead.time&gt;&gt;8&amp;255),re(O,O.gzhead.time&gt;&gt;16&amp;255),re(O,O.gzhead.time&gt;&gt;24&amp;255),re(O,O.level===9?2:2&lt;=O.strategy||O.level&lt;2?4:0),re(O,255&amp;O.gzhead.os),O.gzhead.extra&amp;&amp;O.gzhead.extra.length&amp;&amp;(re(O,255&amp;O.gzhead.extra.length),re(O,O.gzhead.extra.length&gt;&gt;8&amp;255)),O.gzhead.hcrc&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(re(O,0),re(O,0),re(O,0),re(O,0),re(O,0),re(O,O.level===9?2:2&lt;=O.strategy||O.level&lt;2?4:0),re(O,3),O.status=z);else{var L=y+(O.w_bits-8&lt;&lt;4)&lt;&lt;8;L|=(2&lt;=O.strategy||O.level&lt;2?0:O.level&lt;6?1:O.level===6?2:3)&lt;&lt;6,O.strstart!==0&amp;&amp;(L|=32),L+=31-L%31,O.status=z,Y(O,L),O.strstart!==0&amp;&amp;(Y(O,h.adler&gt;&gt;&gt;16),Y(O,65535&amp;h.adler)),h.adler=1}if(O.status===69)if(O.gzhead.extra){for(k=O.pending;O.gzindex&lt;(65535&amp;O.gzhead.extra.length)&amp;&amp;(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),I(h),k=O.pending,O.pending!==O.pending_buf_size));)re(O,255&amp;O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),O.gzindex===O.gzhead.extra.length&amp;&amp;(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){k=O.pending;do{if(O.pending===O.pending_buf_size&amp;&amp;(O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),I(h),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindex&lt;O.gzhead.name.length?255&amp;O.gzhead.name.charCodeAt(O.gzindex++):0,re(O,R)}while(R!==0);O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),R===0&amp;&amp;(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){k=O.pending;do{if(O.pending===O.pending_buf_size&amp;&amp;(O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),I(h),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindex&lt;O.gzhead.comment.length?255&amp;O.gzhead.comment.charCodeAt(O.gzindex++):0,re(O,R)}while(R!==0);O.gzhead.hcrc&amp;&amp;O.pending&gt;k&amp;&amp;(h.adler=a(h.adler,O.pending_buf,O.pending-k,k)),R===0&amp;&amp;(O.status=103)}else O.status=103;if(O.status===103&amp;&amp;(O.gzhead.hcrc?(O.pending+2&gt;O.pending_buf_size&amp;&amp;I(h),O.pending+2&lt;=O.pending_buf_size&amp;&amp;(re(O,255&amp;h.adler),re(O,h.adler&gt;&gt;8&amp;255),h.adler=0,O.status=z)):O.status=z),O.pending!==0){if(I(h),h.avail_out===0)return O.last_flush=-1,l}else if(h.avail_in===0&amp;&amp;Z(N)&lt;=Z(B)&amp;&amp;N!==m)return se(h,-5);if(O.status===666&amp;&amp;h.avail_in!==0)return se(h,-5);if(h.avail_in!==0||O.lookahead!==0||N!==f&amp;&amp;O.status!==666){var W=O.strategy===2?function($,V){for(var ee;;){if($.lookahead===0&amp;&amp;(le($),$.lookahead===0)){if(V===f)return g;break}if($.match_length=0,ee=r._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,ee&amp;&amp;(P($,!1),$.strm.avail_out===0))return g}return $.insert=0,V===m?(P($,!0),$.strm.avail_out===0?oe:J):$.last_lit&amp;&amp;(P($,!1),$.strm.avail_out===0)?g:q}(O,N):O.strategy===3?function($,V){for(var ee,H,ne,ue,ae=$.window;;){if($.lookahead&lt;=U){if(le($),$.lookahead&lt;=U&amp;&amp;V===f)return g;if($.lookahead===0)break}if($.match_length=0,$.lookahead&gt;=T&amp;&amp;0&lt;$.strstart&amp;&amp;(H=ae[ne=$.strstart-1])===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]){ue=$.strstart+U;do;while(H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;H===ae[++ne]&amp;&amp;ne&lt;ue);$.match_length=U-(ue-ne),$.match_length&gt;$.lookahead&amp;&amp;($.match_length=$.lookahead)}if($.match_length&gt;=T?(ee=r._tr_tally($,1,$.match_length-T),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(ee=r._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),ee&amp;&amp;(P($,!1),$.strm.avail_out===0))return g}return $.insert=0,V===m?(P($,!0),$.strm.avail_out===0?oe:J):$.last_lit&amp;&amp;(P($,!1),$.strm.avail_out===0)?g:q}(O,N):e[O.level].func(O,N);if(W!==oe&amp;&amp;W!==J||(O.status=666),W===g||W===oe)return h.avail_out===0&amp;&amp;(O.last_flush=-1),l;if(W===q&amp;&amp;(N===1?r._tr_align(O):N!==5&amp;&amp;(r._tr_stored_block(O,0,0,!1),N===3&amp;&amp;(te(O.head),O.lookahead===0&amp;&amp;(O.strstart=0,O.block_start=0,O.insert=0))),I(h),h.avail_out===0))return O.last_flush=-1,l}return N!==m?l:O.wrap&lt;=0?1:(O.wrap===2?(re(O,255&amp;h.adler),re(O,h.adler&gt;&gt;8&amp;255),re(O,h.adler&gt;&gt;16&amp;255),re(O,h.adler&gt;&gt;24&amp;255),re(O,255&amp;h.total_in),re(O,h.total_in&gt;&gt;8&amp;255),re(O,h.total_in&gt;&gt;16&amp;255),re(O,h.total_in&gt;&gt;24&amp;255)):(Y(O,h.adler&gt;&gt;&gt;16),Y(O,65535&amp;h.adler)),I(h),0&lt;O.wrap&amp;&amp;(O.wrap=-O.wrap),O.pending!==0?l:1)},s.deflateEnd=function(h){var N;return h&amp;&amp;h.state?(N=h.state.status)!==x&amp;&amp;N!==69&amp;&amp;N!==73&amp;&amp;N!==91&amp;&amp;N!==103&amp;&amp;N!==z&amp;&amp;N!==666?se(h,p):(h.state=null,N===z?se(h,-3):l):p},s.deflateSetDictionary=function(h,N){var B,O,k,R,L,W,$,V,ee=N.length;if(!h||!h.state||(R=(B=h.state).wrap)===2||R===1&amp;&amp;B.status!==x||B.lookahead)return p;for(R===1&amp;&amp;(h.adler=n(h.adler,N,ee,0)),B.wrap=0,ee&gt;=B.w_size&amp;&amp;(R===0&amp;&amp;(te(B.head),B.strstart=0,B.block_start=0,B.insert=0),V=new t.Buf8(B.w_size),t.arraySet(V,N,ee-B.w_size,B.w_size,0),N=V,ee=B.w_size),L=h.avail_in,W=h.next_in,$=h.input,h.avail_in=ee,h.next_in=0,h.input=N,le(B);B.lookahead&gt;=T;){for(O=B.strstart,k=B.lookahead-(T-1);B.ins_h=(B.ins_h&lt;&lt;B.hash_shift^B.window[O+T-1])&amp;B.hash_mask,B.prev[O&amp;B.w_mask]=B.head[B.ins_h],B.head[B.ins_h]=O,O++,--k;);B.strstart=O,B.lookahead=T-1,le(B)}return B.strstart+=B.lookahead,B.block_start=B.strstart,B.insert=B.lookahead,B.lookahead=0,B.match_length=B.prev_length=T-1,B.match_available=0,h.next_in=W,h.input=$,h.avail_in=L,B.wrap=R,l},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,u,s){u.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(o,u,s){u.exports=function(e,t){var r,n,a,d,f,m,l,p,c,b,v,y,w,S,A,E,C,j,T,U,X,x,z,g,q;r=e.state,n=e.next_in,g=e.input,a=n+(e.avail_in-5),d=e.next_out,q=e.output,f=d-(t-e.avail_out),m=d+(e.avail_out-257),l=r.dmax,p=r.wsize,c=r.whave,b=r.wnext,v=r.window,y=r.hold,w=r.bits,S=r.lencode,A=r.distcode,E=(1&lt;&lt;r.lenbits)-1,C=(1&lt;&lt;r.distbits)-1;e:do{w&lt;15&amp;&amp;(y+=g[n++]&lt;&lt;w,w+=8,y+=g[n++]&lt;&lt;w,w+=8),j=S[y&amp;E];t:for(;;){if(y&gt;&gt;&gt;=T=j&gt;&gt;&gt;24,w-=T,(T=j&gt;&gt;&gt;16&amp;255)===0)q[d++]=65535&amp;j;else{if(!(16&amp;T)){if(!(64&amp;T)){j=S[(65535&amp;j)+(y&amp;(1&lt;&lt;T)-1)];continue t}if(32&amp;T){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}U=65535&amp;j,(T&amp;=15)&amp;&amp;(w&lt;T&amp;&amp;(y+=g[n++]&lt;&lt;w,w+=8),U+=y&amp;(1&lt;&lt;T)-1,y&gt;&gt;&gt;=T,w-=T),w&lt;15&amp;&amp;(y+=g[n++]&lt;&lt;w,w+=8,y+=g[n++]&lt;&lt;w,w+=8),j=A[y&amp;C];r:for(;;){if(y&gt;&gt;&gt;=T=j&gt;&gt;&gt;24,w-=T,!(16&amp;(T=j&gt;&gt;&gt;16&amp;255))){if(!(64&amp;T)){j=A[(65535&amp;j)+(y&amp;(1&lt;&lt;T)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(X=65535&amp;j,w&lt;(T&amp;=15)&amp;&amp;(y+=g[n++]&lt;&lt;w,(w+=8)&lt;T&amp;&amp;(y+=g[n++]&lt;&lt;w,w+=8)),l&lt;(X+=y&amp;(1&lt;&lt;T)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(y&gt;&gt;&gt;=T,w-=T,(T=d-f)&lt;X){if(c&lt;(T=X-T)&amp;&amp;r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(z=v,(x=0)===b){if(x+=p-T,T&lt;U){for(U-=T;q[d++]=v[x++],--T;);x=d-X,z=q}}else if(b&lt;T){if(x+=p+b-T,(T-=b)&lt;U){for(U-=T;q[d++]=v[x++],--T;);if(x=0,b&lt;U){for(U-=T=b;q[d++]=v[x++],--T;);x=d-X,z=q}}}else if(x+=b-T,T&lt;U){for(U-=T;q[d++]=v[x++],--T;);x=d-X,z=q}for(;2&lt;U;)q[d++]=z[x++],q[d++]=z[x++],q[d++]=z[x++],U-=3;U&amp;&amp;(q[d++]=z[x++],1&lt;U&amp;&amp;(q[d++]=z[x++]))}else{for(x=d-X;q[d++]=q[x++],q[d++]=q[x++],q[d++]=q[x++],2&lt;(U-=3););U&amp;&amp;(q[d++]=q[x++],1&lt;U&amp;&amp;(q[d++]=q[x++]))}break}}break}}while(n&lt;a&amp;&amp;d&lt;m);n-=U=w&gt;&gt;3,y&amp;=(1&lt;&lt;(w-=U&lt;&lt;3))-1,e.next_in=n,e.next_out=d,e.avail_in=n&lt;a?a-n+5:5-(n-a),e.avail_out=d&lt;m?m-d+257:257-(d-m),r.hold=y,r.bits=w}},{}],49:[function(o,u,s){var e=o("../utils/common"),t=o("./adler32"),r=o("./crc32"),n=o("./inffast"),a=o("./inftrees"),d=1,f=2,m=0,l=-2,p=1,c=852,b=592;function v(x){return(x&gt;&gt;&gt;24&amp;255)+(x&gt;&gt;&gt;8&amp;65280)+((65280&amp;x)&lt;&lt;8)+((255&amp;x)&lt;&lt;24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(x){var z;return x&amp;&amp;x.state?(z=x.state,x.total_in=x.total_out=z.total=0,x.msg="",z.wrap&amp;&amp;(x.adler=1&amp;z.wrap),z.mode=p,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new e.Buf32(c),z.distcode=z.distdyn=new e.Buf32(b),z.sane=1,z.back=-1,m):l}function S(x){var z;return x&amp;&amp;x.state?((z=x.state).wsize=0,z.whave=0,z.wnext=0,w(x)):l}function A(x,z){var g,q;return x&amp;&amp;x.state?(q=x.state,z&lt;0?(g=0,z=-z):(g=1+(z&gt;&gt;4),z&lt;48&amp;&amp;(z&amp;=15)),z&amp;&amp;(z&lt;8||15&lt;z)?l:(q.window!==null&amp;&amp;q.wbits!==z&amp;&amp;(q.window=null),q.wrap=g,q.wbits=z,S(x))):l}function E(x,z){var g,q;return x?(q=new y,(x.state=q).window=null,(g=A(x,z))!==m&amp;&amp;(x.state=null),g):l}var C,j,T=!0;function U(x){if(T){var z;for(C=new e.Buf32(512),j=new e.Buf32(32),z=0;z&lt;144;)x.lens[z++]=8;for(;z&lt;256;)x.lens[z++]=9;for(;z&lt;280;)x.lens[z++]=7;for(;z&lt;288;)x.lens[z++]=8;for(a(d,x.lens,0,288,C,0,x.work,{bits:9}),z=0;z&lt;32;)x.lens[z++]=5;a(f,x.lens,0,32,j,0,x.work,{bits:5}),T=!1}x.lencode=C,x.lenbits=9,x.distcode=j,x.distbits=5}function X(x,z,g,q){var oe,J=x.state;return J.window===null&amp;&amp;(J.wsize=1&lt;&lt;J.wbits,J.wnext=0,J.whave=0,J.window=new e.Buf8(J.wsize)),q&gt;=J.wsize?(e.arraySet(J.window,z,g-J.wsize,J.wsize,0),J.wnext=0,J.whave=J.wsize):(q&lt;(oe=J.wsize-J.wnext)&amp;&amp;(oe=q),e.arraySet(J.window,z,g-q,oe,J.wnext),(q-=oe)?(e.arraySet(J.window,z,g-q,q,0),J.wnext=q,J.whave=J.wsize):(J.wnext+=oe,J.wnext===J.wsize&amp;&amp;(J.wnext=0),J.whave&lt;J.wsize&amp;&amp;(J.whave+=oe))),0}s.inflateReset=S,s.inflateReset2=A,s.inflateResetKeep=w,s.inflateInit=function(x){return E(x,15)},s.inflateInit2=E,s.inflate=function(x,z){var g,q,oe,J,se,Z,te,I,P,re,Y,G,le,he,ie,D,F,M,Q,K,h,N,B,O,k=0,R=new e.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!x||!x.state||!x.output||!x.input&amp;&amp;x.avail_in!==0)return l;(g=x.state).mode===12&amp;&amp;(g.mode=13),se=x.next_out,oe=x.output,te=x.avail_out,J=x.next_in,q=x.input,Z=x.avail_in,I=g.hold,P=g.bits,re=Z,Y=te,N=m;e:for(;;)switch(g.mode){case p:if(g.wrap===0){g.mode=13;break}for(;P&lt;16;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(2&amp;g.wrap&amp;&amp;I===35615){R[g.check=0]=255&amp;I,R[1]=I&gt;&gt;&gt;8&amp;255,g.check=r(g.check,R,2,0),P=I=0,g.mode=2;break}if(g.flags=0,g.head&amp;&amp;(g.head.done=!1),!(1&amp;g.wrap)||(((255&amp;I)&lt;&lt;8)+(I&gt;&gt;8))%31){x.msg="incorrect header check",g.mode=30;break}if((15&amp;I)!=8){x.msg="unknown compression method",g.mode=30;break}if(P-=4,h=8+(15&amp;(I&gt;&gt;&gt;=4)),g.wbits===0)g.wbits=h;else if(h&gt;g.wbits){x.msg="invalid window size",g.mode=30;break}g.dmax=1&lt;&lt;h,x.adler=g.check=1,g.mode=512&amp;I?10:12,P=I=0;break;case 2:for(;P&lt;16;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(g.flags=I,(255&amp;g.flags)!=8){x.msg="unknown compression method",g.mode=30;break}if(57344&amp;g.flags){x.msg="unknown header flags set",g.mode=30;break}g.head&amp;&amp;(g.head.text=I&gt;&gt;8&amp;1),512&amp;g.flags&amp;&amp;(R[0]=255&amp;I,R[1]=I&gt;&gt;&gt;8&amp;255,g.check=r(g.check,R,2,0)),P=I=0,g.mode=3;case 3:for(;P&lt;32;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.head&amp;&amp;(g.head.time=I),512&amp;g.flags&amp;&amp;(R[0]=255&amp;I,R[1]=I&gt;&gt;&gt;8&amp;255,R[2]=I&gt;&gt;&gt;16&amp;255,R[3]=I&gt;&gt;&gt;24&amp;255,g.check=r(g.check,R,4,0)),P=I=0,g.mode=4;case 4:for(;P&lt;16;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.head&amp;&amp;(g.head.xflags=255&amp;I,g.head.os=I&gt;&gt;8),512&amp;g.flags&amp;&amp;(R[0]=255&amp;I,R[1]=I&gt;&gt;&gt;8&amp;255,g.check=r(g.check,R,2,0)),P=I=0,g.mode=5;case 5:if(1024&amp;g.flags){for(;P&lt;16;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.length=I,g.head&amp;&amp;(g.head.extra_len=I),512&amp;g.flags&amp;&amp;(R[0]=255&amp;I,R[1]=I&gt;&gt;&gt;8&amp;255,g.check=r(g.check,R,2,0)),P=I=0}else g.head&amp;&amp;(g.head.extra=null);g.mode=6;case 6:if(1024&amp;g.flags&amp;&amp;(Z&lt;(G=g.length)&amp;&amp;(G=Z),G&amp;&amp;(g.head&amp;&amp;(h=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Array(g.head.extra_len)),e.arraySet(g.head.extra,q,J,G,h)),512&amp;g.flags&amp;&amp;(g.check=r(g.check,q,G,J)),Z-=G,J+=G,g.length-=G),g.length))break e;g.length=0,g.mode=7;case 7:if(2048&amp;g.flags){if(Z===0)break e;for(G=0;h=q[J+G++],g.head&amp;&amp;h&amp;&amp;g.length&lt;65536&amp;&amp;(g.head.name+=String.fromCharCode(h)),h&amp;&amp;G&lt;Z;);if(512&amp;g.flags&amp;&amp;(g.check=r(g.check,q,G,J)),Z-=G,J+=G,h)break e}else g.head&amp;&amp;(g.head.name=null);g.length=0,g.mode=8;case 8:if(4096&amp;g.flags){if(Z===0)break e;for(G=0;h=q[J+G++],g.head&amp;&amp;h&amp;&amp;g.length&lt;65536&amp;&amp;(g.head.comment+=String.fromCharCode(h)),h&amp;&amp;G&lt;Z;);if(512&amp;g.flags&amp;&amp;(g.check=r(g.check,q,G,J)),Z-=G,J+=G,h)break e}else g.head&amp;&amp;(g.head.comment=null);g.mode=9;case 9:if(512&amp;g.flags){for(;P&lt;16;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(I!==(65535&amp;g.check)){x.msg="header crc mismatch",g.mode=30;break}P=I=0}g.head&amp;&amp;(g.head.hcrc=g.flags&gt;&gt;9&amp;1,g.head.done=!0),x.adler=g.check=0,g.mode=12;break;case 10:for(;P&lt;32;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}x.adler=g.check=v(I),P=I=0,g.mode=11;case 11:if(g.havedict===0)return x.next_out=se,x.avail_out=te,x.next_in=J,x.avail_in=Z,g.hold=I,g.bits=P,2;x.adler=g.check=1,g.mode=12;case 12:if(z===5||z===6)break e;case 13:if(g.last){I&gt;&gt;&gt;=7&amp;P,P-=7&amp;P,g.mode=27;break}for(;P&lt;3;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}switch(g.last=1&amp;I,P-=1,3&amp;(I&gt;&gt;&gt;=1)){case 0:g.mode=14;break;case 1:if(U(g),g.mode=20,z!==6)break;I&gt;&gt;&gt;=2,P-=2;break e;case 2:g.mode=17;break;case 3:x.msg="invalid block type",g.mode=30}I&gt;&gt;&gt;=2,P-=2;break;case 14:for(I&gt;&gt;&gt;=7&amp;P,P-=7&amp;P;P&lt;32;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if((65535&amp;I)!=(I&gt;&gt;&gt;16^65535)){x.msg="invalid stored block lengths",g.mode=30;break}if(g.length=65535&amp;I,P=I=0,g.mode=15,z===6)break e;case 15:g.mode=16;case 16:if(G=g.length){if(Z&lt;G&amp;&amp;(G=Z),te&lt;G&amp;&amp;(G=te),G===0)break e;e.arraySet(oe,q,J,G,se),Z-=G,J+=G,te-=G,se+=G,g.length-=G;break}g.mode=12;break;case 17:for(;P&lt;14;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(g.nlen=257+(31&amp;I),I&gt;&gt;&gt;=5,P-=5,g.ndist=1+(31&amp;I),I&gt;&gt;&gt;=5,P-=5,g.ncode=4+(15&amp;I),I&gt;&gt;&gt;=4,P-=4,286&lt;g.nlen||30&lt;g.ndist){x.msg="too many length or distance symbols",g.mode=30;break}g.have=0,g.mode=18;case 18:for(;g.have&lt;g.ncode;){for(;P&lt;3;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.lens[L[g.have++]]=7&amp;I,I&gt;&gt;&gt;=3,P-=3}for(;g.have&lt;19;)g.lens[L[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,B={bits:g.lenbits},N=a(0,g.lens,0,19,g.lencode,0,g.work,B),g.lenbits=B.bits,N){x.msg="invalid code lengths set",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have&lt;g.nlen+g.ndist;){for(;D=(k=g.lencode[I&amp;(1&lt;&lt;g.lenbits)-1])&gt;&gt;&gt;16&amp;255,F=65535&amp;k,!((ie=k&gt;&gt;&gt;24)&lt;=P);){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(F&lt;16)I&gt;&gt;&gt;=ie,P-=ie,g.lens[g.have++]=F;else{if(F===16){for(O=ie+2;P&lt;O;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(I&gt;&gt;&gt;=ie,P-=ie,g.have===0){x.msg="invalid bit length repeat",g.mode=30;break}h=g.lens[g.have-1],G=3+(3&amp;I),I&gt;&gt;&gt;=2,P-=2}else if(F===17){for(O=ie+3;P&lt;O;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}P-=ie,h=0,G=3+(7&amp;(I&gt;&gt;&gt;=ie)),I&gt;&gt;&gt;=3,P-=3}else{for(O=ie+7;P&lt;O;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}P-=ie,h=0,G=11+(127&amp;(I&gt;&gt;&gt;=ie)),I&gt;&gt;&gt;=7,P-=7}if(g.have+G&gt;g.nlen+g.ndist){x.msg="invalid bit length repeat",g.mode=30;break}for(;G--;)g.lens[g.have++]=h}}if(g.mode===30)break;if(g.lens[256]===0){x.msg="invalid code -- missing end-of-block",g.mode=30;break}if(g.lenbits=9,B={bits:g.lenbits},N=a(d,g.lens,0,g.nlen,g.lencode,0,g.work,B),g.lenbits=B.bits,N){x.msg="invalid literal/lengths set",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,B={bits:g.distbits},N=a(f,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,B),g.distbits=B.bits,N){x.msg="invalid distances set",g.mode=30;break}if(g.mode=20,z===6)break e;case 20:g.mode=21;case 21:if(6&lt;=Z&amp;&amp;258&lt;=te){x.next_out=se,x.avail_out=te,x.next_in=J,x.avail_in=Z,g.hold=I,g.bits=P,n(x,Y),se=x.next_out,oe=x.output,te=x.avail_out,J=x.next_in,q=x.input,Z=x.avail_in,I=g.hold,P=g.bits,g.mode===12&amp;&amp;(g.back=-1);break}for(g.back=0;D=(k=g.lencode[I&amp;(1&lt;&lt;g.lenbits)-1])&gt;&gt;&gt;16&amp;255,F=65535&amp;k,!((ie=k&gt;&gt;&gt;24)&lt;=P);){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(D&amp;&amp;!(240&amp;D)){for(M=ie,Q=D,K=F;D=(k=g.lencode[K+((I&amp;(1&lt;&lt;M+Q)-1)&gt;&gt;M)])&gt;&gt;&gt;16&amp;255,F=65535&amp;k,!(M+(ie=k&gt;&gt;&gt;24)&lt;=P);){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}I&gt;&gt;&gt;=M,P-=M,g.back+=M}if(I&gt;&gt;&gt;=ie,P-=ie,g.back+=ie,g.length=F,D===0){g.mode=26;break}if(32&amp;D){g.back=-1,g.mode=12;break}if(64&amp;D){x.msg="invalid literal/length code",g.mode=30;break}g.extra=15&amp;D,g.mode=22;case 22:if(g.extra){for(O=g.extra;P&lt;O;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.length+=I&amp;(1&lt;&lt;g.extra)-1,I&gt;&gt;&gt;=g.extra,P-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;D=(k=g.distcode[I&amp;(1&lt;&lt;g.distbits)-1])&gt;&gt;&gt;16&amp;255,F=65535&amp;k,!((ie=k&gt;&gt;&gt;24)&lt;=P);){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(!(240&amp;D)){for(M=ie,Q=D,K=F;D=(k=g.distcode[K+((I&amp;(1&lt;&lt;M+Q)-1)&gt;&gt;M)])&gt;&gt;&gt;16&amp;255,F=65535&amp;k,!(M+(ie=k&gt;&gt;&gt;24)&lt;=P);){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}I&gt;&gt;&gt;=M,P-=M,g.back+=M}if(I&gt;&gt;&gt;=ie,P-=ie,g.back+=ie,64&amp;D){x.msg="invalid distance code",g.mode=30;break}g.offset=F,g.extra=15&amp;D,g.mode=24;case 24:if(g.extra){for(O=g.extra;P&lt;O;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}g.offset+=I&amp;(1&lt;&lt;g.extra)-1,I&gt;&gt;&gt;=g.extra,P-=g.extra,g.back+=g.extra}if(g.offset&gt;g.dmax){x.msg="invalid distance too far back",g.mode=30;break}g.mode=25;case 25:if(te===0)break e;if(G=Y-te,g.offset&gt;G){if((G=g.offset-G)&gt;g.whave&amp;&amp;g.sane){x.msg="invalid distance too far back",g.mode=30;break}le=G&gt;g.wnext?(G-=g.wnext,g.wsize-G):g.wnext-G,G&gt;g.length&amp;&amp;(G=g.length),he=g.window}else he=oe,le=se-g.offset,G=g.length;for(te&lt;G&amp;&amp;(G=te),te-=G,g.length-=G;oe[se++]=he[le++],--G;);g.length===0&amp;&amp;(g.mode=21);break;case 26:if(te===0)break e;oe[se++]=g.length,te--,g.mode=21;break;case 27:if(g.wrap){for(;P&lt;32;){if(Z===0)break e;Z--,I|=q[J++]&lt;&lt;P,P+=8}if(Y-=te,x.total_out+=Y,g.total+=Y,Y&amp;&amp;(x.adler=g.check=g.flags?r(g.check,oe,Y,se-Y):t(g.check,oe,Y,se-Y)),Y=te,(g.flags?I:v(I))!==g.check){x.msg="incorrect data check",g.mode=30;break}P=I=0}g.mode=28;case 28:if(g.wrap&amp;&amp;g.flags){for(;P&lt;32;){if(Z===0)break e;Z--,I+=q[J++]&lt;&lt;P,P+=8}if(I!==(4294967295&amp;g.total)){x.msg="incorrect length check",g.mode=30;break}P=I=0}g.mode=29;case 29:N=1;break e;case 30:N=-3;break e;case 31:return-4;case 32:default:return l}return x.next_out=se,x.avail_out=te,x.next_in=J,x.avail_in=Z,g.hold=I,g.bits=P,(g.wsize||Y!==x.avail_out&amp;&amp;g.mode&lt;30&amp;&amp;(g.mode&lt;27||z!==4))&amp;&amp;X(x,x.output,x.next_out,Y-x.avail_out)?(g.mode=31,-4):(re-=x.avail_in,Y-=x.avail_out,x.total_in+=re,x.total_out+=Y,g.total+=Y,g.wrap&amp;&amp;Y&amp;&amp;(x.adler=g.check=g.flags?r(g.check,oe,Y,x.next_out-Y):t(g.check,oe,Y,x.next_out-Y)),x.data_type=g.bits+(g.last?64:0)+(g.mode===12?128:0)+(g.mode===20||g.mode===15?256:0),(re==0&amp;&amp;Y===0||z===4)&amp;&amp;N===m&amp;&amp;(N=-5),N)},s.inflateEnd=function(x){if(!x||!x.state)return l;var z=x.state;return z.window&amp;&amp;(z.window=null),x.state=null,m},s.inflateGetHeader=function(x,z){var g;return x&amp;&amp;x.state&amp;&amp;2&amp;(g=x.state).wrap?((g.head=z).done=!1,m):l},s.inflateSetDictionary=function(x,z){var g,q=z.length;return x&amp;&amp;x.state?(g=x.state).wrap!==0&amp;&amp;g.mode!==11?l:g.mode===11&amp;&amp;t(1,z,q,0)!==g.check?-3:X(x,z,q,q)?(g.mode=31,-4):(g.havedict=1,m):l},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,u,s){var e=o("../utils/common"),t=[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,0,0],r=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],n=[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,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];u.exports=function(d,f,m,l,p,c,b,v){var y,w,S,A,E,C,j,T,U,X=v.bits,x=0,z=0,g=0,q=0,oe=0,J=0,se=0,Z=0,te=0,I=0,P=null,re=0,Y=new e.Buf16(16),G=new e.Buf16(16),le=null,he=0;for(x=0;x&lt;=15;x++)Y[x]=0;for(z=0;z&lt;l;z++)Y[f[m+z]]++;for(oe=X,q=15;1&lt;=q&amp;&amp;Y[q]===0;q--);if(q&lt;oe&amp;&amp;(oe=q),q===0)return p[c++]=20971520,p[c++]=20971520,v.bits=1,0;for(g=1;g&lt;q&amp;&amp;Y[g]===0;g++);for(oe&lt;g&amp;&amp;(oe=g),x=Z=1;x&lt;=15;x++)if(Z&lt;&lt;=1,(Z-=Y[x])&lt;0)return-1;if(0&lt;Z&amp;&amp;(d===0||q!==1))return-1;for(G[1]=0,x=1;x&lt;15;x++)G[x+1]=G[x]+Y[x];for(z=0;z&lt;l;z++)f[m+z]!==0&amp;&amp;(b[G[f[m+z]]++]=z);if(C=d===0?(P=le=b,19):d===1?(P=t,re-=257,le=r,he-=257,256):(P=n,le=a,-1),x=g,E=c,se=z=I=0,S=-1,A=(te=1&lt;&lt;(J=oe))-1,d===1&amp;&amp;852&lt;te||d===2&amp;&amp;592&lt;te)return 1;for(;;){for(j=x-se,U=b[z]&lt;C?(T=0,b[z]):b[z]&gt;C?(T=le[he+b[z]],P[re+b[z]]):(T=96,0),y=1&lt;&lt;x-se,g=w=1&lt;&lt;J;p[E+(I&gt;&gt;se)+(w-=y)]=j&lt;&lt;24|T&lt;&lt;16|U|0,w!==0;);for(y=1&lt;&lt;x-1;I&amp;y;)y&gt;&gt;=1;if(y!==0?(I&amp;=y-1,I+=y):I=0,z++,--Y[x]==0){if(x===q)break;x=f[m+b[z]]}if(oe&lt;x&amp;&amp;(I&amp;A)!==S){for(se===0&amp;&amp;(se=oe),E+=g,Z=1&lt;&lt;(J=x-se);J+se&lt;q&amp;&amp;!((Z-=Y[J+se])&lt;=0);)J++,Z&lt;&lt;=1;if(te+=1&lt;&lt;J,d===1&amp;&amp;852&lt;te||d===2&amp;&amp;592&lt;te)return 1;p[S=I&amp;A]=oe&lt;&lt;24|J&lt;&lt;16|E-c|0}}return I!==0&amp;&amp;(p[E+I]=x-se&lt;&lt;24|64&lt;&lt;16|0),v.bits=oe,0}},{"../utils/common":41}],51:[function(o,u,s){u.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(o,u,s){var e=o("../utils/common"),t=0,r=1;function n(k){for(var R=k.length;0&lt;=--R;)k[R]=0}var a=0,d=29,f=256,m=f+1+d,l=30,p=19,c=2*m+1,b=15,v=16,y=7,w=256,S=16,A=17,E=18,C=[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],j=[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],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=new Array(2*(m+2));n(X);var x=new Array(2*l);n(x);var z=new Array(512);n(z);var g=new Array(256);n(g);var q=new Array(d);n(q);var oe,J,se,Z=new Array(l);function te(k,R,L,W,$){this.static_tree=k,this.extra_bits=R,this.extra_base=L,this.elems=W,this.max_length=$,this.has_stree=k&amp;&amp;k.length}function I(k,R){this.dyn_tree=k,this.max_code=0,this.stat_desc=R}function P(k){return k&lt;256?z[k]:z[256+(k&gt;&gt;&gt;7)]}function re(k,R){k.pending_buf[k.pending++]=255&amp;R,k.pending_buf[k.pending++]=R&gt;&gt;&gt;8&amp;255}function Y(k,R,L){k.bi_valid&gt;v-L?(k.bi_buf|=R&lt;&lt;k.bi_valid&amp;65535,re(k,k.bi_buf),k.bi_buf=R&gt;&gt;v-k.bi_valid,k.bi_valid+=L-v):(k.bi_buf|=R&lt;&lt;k.bi_valid&amp;65535,k.bi_valid+=L)}function G(k,R,L){Y(k,L[2*R],L[2*R+1])}function le(k,R){for(var L=0;L|=1&amp;k,k&gt;&gt;&gt;=1,L&lt;&lt;=1,0&lt;--R;);return L&gt;&gt;&gt;1}function he(k,R,L){var W,$,V=new Array(b+1),ee=0;for(W=1;W&lt;=b;W++)V[W]=ee=ee+L[W-1]&lt;&lt;1;for($=0;$&lt;=R;$++){var H=k[2*$+1];H!==0&amp;&amp;(k[2*$]=le(V[H]++,H))}}function ie(k){var R;for(R=0;R&lt;m;R++)k.dyn_ltree[2*R]=0;for(R=0;R&lt;l;R++)k.dyn_dtree[2*R]=0;for(R=0;R&lt;p;R++)k.bl_tree[2*R]=0;k.dyn_ltree[2*w]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function D(k){8&lt;k.bi_valid?re(k,k.bi_buf):0&lt;k.bi_valid&amp;&amp;(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function F(k,R,L,W){var $=2*R,V=2*L;return k[$]&lt;k[V]||k[$]===k[V]&amp;&amp;W[R]&lt;=W[L]}function M(k,R,L){for(var W=k.heap[L],$=L&lt;&lt;1;$&lt;=k.heap_len&amp;&amp;($&lt;k.heap_len&amp;&amp;F(R,k.heap[$+1],k.heap[$],k.depth)&amp;&amp;$++,!F(R,W,k.heap[$],k.depth));)k.heap[L]=k.heap[$],L=$,$&lt;&lt;=1;k.heap[L]=W}function Q(k,R,L){var W,$,V,ee,H=0;if(k.last_lit!==0)for(;W=k.pending_buf[k.d_buf+2*H]&lt;&lt;8|k.pending_buf[k.d_buf+2*H+1],$=k.pending_buf[k.l_buf+H],H++,W===0?G(k,$,R):(G(k,(V=g[$])+f+1,R),(ee=C[V])!==0&amp;&amp;Y(k,$-=q[V],ee),G(k,V=P(--W),L),(ee=j[V])!==0&amp;&amp;Y(k,W-=Z[V],ee)),H&lt;k.last_lit;);G(k,w,R)}function K(k,R){var L,W,$,V=R.dyn_tree,ee=R.stat_desc.static_tree,H=R.stat_desc.has_stree,ne=R.stat_desc.elems,ue=-1;for(k.heap_len=0,k.heap_max=c,L=0;L&lt;ne;L++)V[2*L]!==0?(k.heap[++k.heap_len]=ue=L,k.depth[L]=0):V[2*L+1]=0;for(;k.heap_len&lt;2;)V[2*($=k.heap[++k.heap_len]=ue&lt;2?++ue:0)]=1,k.depth[$]=0,k.opt_len--,H&amp;&amp;(k.static_len-=ee[2*$+1]);for(R.max_code=ue,L=k.heap_len&gt;&gt;1;1&lt;=L;L--)M(k,V,L);for($=ne;L=k.heap[1],k.heap[1]=k.heap[k.heap_len--],M(k,V,1),W=k.heap[1],k.heap[--k.heap_max]=L,k.heap[--k.heap_max]=W,V[2*$]=V[2*L]+V[2*W],k.depth[$]=(k.depth[L]&gt;=k.depth[W]?k.depth[L]:k.depth[W])+1,V[2*L+1]=V[2*W+1]=$,k.heap[1]=$++,M(k,V,1),2&lt;=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(ae,ce){var ge,de,ve,fe,be,Oe,pe=ce.dyn_tree,xe=ce.max_code,Ae=ce.stat_desc.static_tree,Re=ce.stat_desc.has_stree,Ee=ce.stat_desc.extra_bits,Se=ce.stat_desc.extra_base,_e=ce.stat_desc.max_length,we=0;for(fe=0;fe&lt;=b;fe++)ae.bl_count[fe]=0;for(pe[2*ae.heap[ae.heap_max]+1]=0,ge=ae.heap_max+1;ge&lt;c;ge++)_e&lt;(fe=pe[2*pe[2*(de=ae.heap[ge])+1]+1]+1)&amp;&amp;(fe=_e,we++),pe[2*de+1]=fe,xe&lt;de||(ae.bl_count[fe]++,be=0,Se&lt;=de&amp;&amp;(be=Ee[de-Se]),Oe=pe[2*de],ae.opt_len+=Oe*(fe+be),Re&amp;&amp;(ae.static_len+=Oe*(Ae[2*de+1]+be)));if(we!==0){do{for(fe=_e-1;ae.bl_count[fe]===0;)fe--;ae.bl_count[fe]--,ae.bl_count[fe+1]+=2,ae.bl_count[_e]--,we-=2}while(0&lt;we);for(fe=_e;fe!==0;fe--)for(de=ae.bl_count[fe];de!==0;)xe&lt;(ve=ae.heap[--ge])||(pe[2*ve+1]!==fe&amp;&amp;(ae.opt_len+=(fe-pe[2*ve+1])*pe[2*ve],pe[2*ve+1]=fe),de--)}}(k,R),he(V,ue,k.bl_count)}function h(k,R,L){var W,$,V=-1,ee=R[1],H=0,ne=7,ue=4;for(ee===0&amp;&amp;(ne=138,ue=3),R[2*(L+1)+1]=65535,W=0;W&lt;=L;W++)$=ee,ee=R[2*(W+1)+1],++H&lt;ne&amp;&amp;$===ee||(H&lt;ue?k.bl_tree[2*$]+=H:$!==0?($!==V&amp;&amp;k.bl_tree[2*$]++,k.bl_tree[2*S]++):H&lt;=10?k.bl_tree[2*A]++:k.bl_tree[2*E]++,V=$,ue=(H=0)===ee?(ne=138,3):$===ee?(ne=6,3):(ne=7,4))}function N(k,R,L){var W,$,V=-1,ee=R[1],H=0,ne=7,ue=4;for(ee===0&amp;&amp;(ne=138,ue=3),W=0;W&lt;=L;W++)if($=ee,ee=R[2*(W+1)+1],!(++H&lt;ne&amp;&amp;$===ee)){if(H&lt;ue)for(;G(k,$,k.bl_tree),--H!=0;);else $!==0?($!==V&amp;&amp;(G(k,$,k.bl_tree),H--),G(k,S,k.bl_tree),Y(k,H-3,2)):H&lt;=10?(G(k,A,k.bl_tree),Y(k,H-3,3)):(G(k,E,k.bl_tree),Y(k,H-11,7));V=$,ue=(H=0)===ee?(ne=138,3):$===ee?(ne=6,3):(ne=7,4)}}n(Z);var B=!1;function O(k,R,L,W){Y(k,(a&lt;&lt;1)+(W?1:0),3),function($,V,ee,H){D($),H&amp;&amp;(re($,ee),re($,~ee)),e.arraySet($.pending_buf,$.window,V,ee,$.pending),$.pending+=ee}(k,R,L,!0)}s._tr_init=function(k){B||(function(){var R,L,W,$,V,ee=new Array(b+1);for($=W=0;$&lt;d-1;$++)for(q[$]=W,R=0;R&lt;1&lt;&lt;C[$];R++)g[W++]=$;for(g[W-1]=$,$=V=0;$&lt;16;$++)for(Z[$]=V,R=0;R&lt;1&lt;&lt;j[$];R++)z[V++]=$;for(V&gt;&gt;=7;$&lt;l;$++)for(Z[$]=V&lt;&lt;7,R=0;R&lt;1&lt;&lt;j[$]-7;R++)z[256+V++]=$;for(L=0;L&lt;=b;L++)ee[L]=0;for(R=0;R&lt;=143;)X[2*R+1]=8,R++,ee[8]++;for(;R&lt;=255;)X[2*R+1]=9,R++,ee[9]++;for(;R&lt;=279;)X[2*R+1]=7,R++,ee[7]++;for(;R&lt;=287;)X[2*R+1]=8,R++,ee[8]++;for(he(X,m+1,ee),R=0;R&lt;l;R++)x[2*R+1]=5,x[2*R]=le(R,5);oe=new te(X,C,f+1,m,b),J=new te(x,j,0,l,b),se=new te(new Array(0),T,0,p,y)}(),B=!0),k.l_desc=new I(k.dyn_ltree,oe),k.d_desc=new I(k.dyn_dtree,J),k.bl_desc=new I(k.bl_tree,se),k.bi_buf=0,k.bi_valid=0,ie(k)},s._tr_stored_block=O,s._tr_flush_block=function(k,R,L,W){var $,V,ee=0;0&lt;k.level?(k.strm.data_type===2&amp;&amp;(k.strm.data_type=function(H){var ne,ue=4093624447;for(ne=0;ne&lt;=31;ne++,ue&gt;&gt;&gt;=1)if(1&amp;ue&amp;&amp;H.dyn_ltree[2*ne]!==0)return t;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return r;for(ne=32;ne&lt;f;ne++)if(H.dyn_ltree[2*ne]!==0)return r;return t}(k)),K(k,k.l_desc),K(k,k.d_desc),ee=function(H){var ne;for(h(H,H.dyn_ltree,H.l_desc.max_code),h(H,H.dyn_dtree,H.d_desc.max_code),K(H,H.bl_desc),ne=p-1;3&lt;=ne&amp;&amp;H.bl_tree[2*U[ne]+1]===0;ne--);return H.opt_len+=3*(ne+1)+5+5+4,ne}(k),$=k.opt_len+3+7&gt;&gt;&gt;3,(V=k.static_len+3+7&gt;&gt;&gt;3)&lt;=$&amp;&amp;($=V)):$=V=L+5,L+4&lt;=$&amp;&amp;R!==-1?O(k,R,L,W):k.strategy===4||V===$?(Y(k,2+(W?1:0),3),Q(k,X,x)):(Y(k,4+(W?1:0),3),function(H,ne,ue,ae){var ce;for(Y(H,ne-257,5),Y(H,ue-1,5),Y(H,ae-4,4),ce=0;ce&lt;ae;ce++)Y(H,H.bl_tree[2*U[ce]+1],3);N(H,H.dyn_ltree,ne-1),N(H,H.dyn_dtree,ue-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,ee+1),Q(k,k.dyn_ltree,k.dyn_dtree)),ie(k),W&amp;&amp;D(k)},s._tr_tally=function(k,R,L){return k.pending_buf[k.d_buf+2*k.last_lit]=R&gt;&gt;&gt;8&amp;255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&amp;R,k.pending_buf[k.l_buf+k.last_lit]=255&amp;L,k.last_lit++,R===0?k.dyn_ltree[2*L]++:(k.matches++,R--,k.dyn_ltree[2*(g[L]+f+1)]++,k.dyn_dtree[2*P(R)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){Y(k,2,3),G(k,w,X),function(R){R.bi_valid===16?(re(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8&lt;=R.bi_valid&amp;&amp;(R.pending_buf[R.pending++]=255&amp;R.bi_buf,R.bi_buf&gt;&gt;=8,R.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(o,u,s){u.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,u,s){(function(e){(function(t,r){if(!t.setImmediate){var n,a,d,f,m=1,l={},p=!1,c=t.document,b=Object.getPrototypeOf&amp;&amp;Object.getPrototypeOf(t);b=b&amp;&amp;b.setTimeout?b:t,n={}.toString.call(t.process)==="[object process]"?function(S){process.nextTick(function(){y(S)})}:function(){if(t.postMessage&amp;&amp;!t.importScripts){var S=!0,A=t.onmessage;return t.onmessage=function(){S=!1},t.postMessage("","*"),t.onmessage=A,S}}()?(f="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",w,!1):t.attachEvent("onmessage",w),function(S){t.postMessage(f+S,"*")}):t.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){y(S.data)},function(S){d.port2.postMessage(S)}):c&amp;&amp;"onreadystatechange"in c.createElement("script")?(a=c.documentElement,function(S){var A=c.createElement("script");A.onreadystatechange=function(){y(S),A.onreadystatechange=null,a.removeChild(A),A=null},a.appendChild(A)}):function(S){setTimeout(y,0,S)},b.setImmediate=function(S){typeof S!="function"&amp;&amp;(S=new Function(""+S));for(var A=new Array(arguments.length-1),E=0;E&lt;A.length;E++)A[E]=arguments[E+1];var C={callback:S,args:A};return l[m]=C,n(m),m++},b.clearImmediate=v}function v(S){delete l[S]}function y(S){if(p)setTimeout(y,0,S);else{var A=l[S];if(A){p=!0;try{(function(E){var C=E.callback,j=E.args;switch(j.length){case 0:C();break;case 1:C(j[0]);break;case 2:C(j[0],j[1]);break;case 3:C(j[0],j[1],j[2]);break;default:C.apply(r,j)}})(A)}finally{v(S),p=!1}}}}function w(S){S.source===t&amp;&amp;typeof S.data=="string"&amp;&amp;S.data.indexOf(f)===0&amp;&amp;y(+S.data.slice(f.length))}})(typeof self&gt;"u"?e===void 0?this:e:self)}).call(this,typeof commonjsGlobal&lt;"u"?commonjsGlobal:typeof self&lt;"u"?self:typeof window&lt;"u"?window:{})},{}]},{},[10])(10)})})(jszip_min);var jszip_minExports=jszip_min.exports;const JSZip=getDefaultExportFromCjs(jszip_minExports);var src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=_;function _(i,o){for(var u=new Array(arguments.length-1),s=0,e=2,t=!0;e&lt;arguments.length;)u[s++]=arguments[e++];return new Promise(function(n,a){u[s]=function(f){if(t)if(t=!1,f)a(f);else{for(var m=new Array(arguments.length-1),l=0;l&lt;m.length;)m[l++]=arguments[l];n.apply(null,m)}};try{i.apply(o||null,u)}catch(d){t&amp;&amp;(t=!1,a(d))}})}return aspromise}var base64$1={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(_){var i=_;i.length=function(r){var n=r.length;if(!n)return 0;for(var a=0;--n%4&gt;1&amp;&amp;r.charAt(n)==="=";)++a;return Math.ceil(r.length*3)/4-a};for(var o=new Array(64),u=new Array(123),s=0;s&lt;64;)u[o[s]=s&lt;26?s+65:s&lt;52?s+71:s&lt;62?s-4:s-59|43]=s++;i.encode=function(r,n,a){for(var d=null,f=[],m=0,l=0,p;n&lt;a;){var c=r[n++];switch(l){case 0:f[m++]=o[c&gt;&gt;2],p=(c&amp;3)&lt;&lt;4,l=1;break;case 1:f[m++]=o[p|c&gt;&gt;4],p=(c&amp;15)&lt;&lt;2,l=2;break;case 2:f[m++]=o[p|c&gt;&gt;6],f[m++]=o[c&amp;63],l=0;break}m&gt;8191&amp;&amp;((d||(d=[])).push(String.fromCharCode.apply(String,f)),m=0)}return l&amp;&amp;(f[m++]=o[p],f[m++]=61,l===1&amp;&amp;(f[m++]=61)),d?(m&amp;&amp;d.push(String.fromCharCode.apply(String,f.slice(0,m))),d.join("")):String.fromCharCode.apply(String,f.slice(0,m))};var e="invalid encoding";i.decode=function(r,n,a){for(var d=a,f=0,m,l=0;l&lt;r.length;){var p=r.charCodeAt(l++);if(p===61&amp;&amp;f&gt;1)break;if((p=u[p])===void 0)throw Error(e);switch(f){case 0:m=p,f=1;break;case 1:n[a++]=m&lt;&lt;2|(p&amp;48)&gt;&gt;4,m=p,f=2;break;case 2:n[a++]=(m&amp;15)&lt;&lt;4|(p&amp;60)&gt;&gt;2,m=p,f=3;break;case 3:n[a++]=(m&amp;3)&lt;&lt;6|p,f=0;break}}if(f===1)throw Error(e);return a-d},i.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}}(base64$1)),base64$1}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=_;function _(){this._listeners={}}return _.prototype.on=function(o,u,s){return(this._listeners[o]||(this._listeners[o]=[])).push({fn:u,ctx:s||this}),this},_.prototype.off=function(o,u){if(o===void 0)this._listeners={};else if(u===void 0)this._listeners[o]=[];else for(var s=this._listeners[o],e=0;e&lt;s.length;)s[e].fn===u?s.splice(e,1):++e;return this},_.prototype.emit=function(o){var u=this._listeners[o];if(u){for(var s=[],e=1;e&lt;arguments.length;)s.push(arguments[e++]);for(e=0;e&lt;u.length;)u[e].fn.apply(u[e++].ctx,s)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=_(_);function _(e){return typeof Float32Array&lt;"u"?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function a(l,p,c){t[0]=l,p[c]=r[0],p[c+1]=r[1],p[c+2]=r[2],p[c+3]=r[3]}function d(l,p,c){t[0]=l,p[c]=r[3],p[c+1]=r[2],p[c+2]=r[1],p[c+3]=r[0]}e.writeFloatLE=n?a:d,e.writeFloatBE=n?d:a;function f(l,p){return r[0]=l[p],r[1]=l[p+1],r[2]=l[p+2],r[3]=l[p+3],t[0]}function m(l,p){return r[3]=l[p],r[2]=l[p+1],r[1]=l[p+2],r[0]=l[p+3],t[0]}e.readFloatLE=n?f:m,e.readFloatBE=n?m:f}():function(){function t(n,a,d,f){var m=a&lt;0?1:0;if(m&amp;&amp;(a=-a),a===0)n(1/a&gt;0?0:2147483648,d,f);else if(isNaN(a))n(2143289344,d,f);else if(a&gt;34028234663852886e22)n((m&lt;&lt;31|2139095040)&gt;&gt;&gt;0,d,f);else if(a&lt;11754943508222875e-54)n((m&lt;&lt;31|Math.round(a/1401298464324817e-60))&gt;&gt;&gt;0,d,f);else{var l=Math.floor(Math.log(a)/Math.LN2),p=Math.round(a*Math.pow(2,-l)*8388608)&amp;8388607;n((m&lt;&lt;31|l+127&lt;&lt;23|p)&gt;&gt;&gt;0,d,f)}}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o);function r(n,a,d){var f=n(a,d),m=(f&gt;&gt;31)*2+1,l=f&gt;&gt;&gt;23&amp;255,p=f&amp;8388607;return l===255?p?NaN:m*(1/0):l===0?m*1401298464324817e-60*p:m*Math.pow(2,l-150)*(p+8388608)}e.readFloatLE=r.bind(null,u),e.readFloatBE=r.bind(null,s)}(),typeof Float64Array&lt;"u"?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function a(l,p,c){t[0]=l,p[c]=r[0],p[c+1]=r[1],p[c+2]=r[2],p[c+3]=r[3],p[c+4]=r[4],p[c+5]=r[5],p[c+6]=r[6],p[c+7]=r[7]}function d(l,p,c){t[0]=l,p[c]=r[7],p[c+1]=r[6],p[c+2]=r[5],p[c+3]=r[4],p[c+4]=r[3],p[c+5]=r[2],p[c+6]=r[1],p[c+7]=r[0]}e.writeDoubleLE=n?a:d,e.writeDoubleBE=n?d:a;function f(l,p){return r[0]=l[p],r[1]=l[p+1],r[2]=l[p+2],r[3]=l[p+3],r[4]=l[p+4],r[5]=l[p+5],r[6]=l[p+6],r[7]=l[p+7],t[0]}function m(l,p){return r[7]=l[p],r[6]=l[p+1],r[5]=l[p+2],r[4]=l[p+3],r[3]=l[p+4],r[2]=l[p+5],r[1]=l[p+6],r[0]=l[p+7],t[0]}e.readDoubleLE=n?f:m,e.readDoubleBE=n?m:f}():function(){function t(n,a,d,f,m,l){var p=f&lt;0?1:0;if(p&amp;&amp;(f=-f),f===0)n(0,m,l+a),n(1/f&gt;0?0:2147483648,m,l+d);else if(isNaN(f))n(0,m,l+a),n(2146959360,m,l+d);else if(f&gt;17976931348623157e292)n(0,m,l+a),n((p&lt;&lt;31|2146435072)&gt;&gt;&gt;0,m,l+d);else{var c;if(f&lt;22250738585072014e-324)c=f/5e-324,n(c&gt;&gt;&gt;0,m,l+a),n((p&lt;&lt;31|c/4294967296)&gt;&gt;&gt;0,m,l+d);else{var b=Math.floor(Math.log(f)/Math.LN2);b===1024&amp;&amp;(b=1023),c=f*Math.pow(2,-b),n(c*4503599627370496&gt;&gt;&gt;0,m,l+a),n((p&lt;&lt;31|b+1023&lt;&lt;20|c*1048576&amp;1048575)&gt;&gt;&gt;0,m,l+d)}}}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0);function r(n,a,d,f,m){var l=n(f,m+a),p=n(f,m+d),c=(p&gt;&gt;31)*2+1,b=p&gt;&gt;&gt;20&amp;2047,v=4294967296*(p&amp;1048575)+l;return b===2047?v?NaN:c*(1/0):b===0?c*5e-324*v:c*Math.pow(2,b-1075)*(v+4503599627370496)}e.readDoubleLE=r.bind(null,u,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function i(e,t,r){t[r]=e&amp;255,t[r+1]=e&gt;&gt;&gt;8&amp;255,t[r+2]=e&gt;&gt;&gt;16&amp;255,t[r+3]=e&gt;&gt;&gt;24}function o(e,t,r){t[r]=e&gt;&gt;&gt;24,t[r+1]=e&gt;&gt;&gt;16&amp;255,t[r+2]=e&gt;&gt;&gt;8&amp;255,t[r+3]=e&amp;255}function u(e,t){return(e[t]|e[t+1]&lt;&lt;8|e[t+2]&lt;&lt;16|e[t+3]&lt;&lt;24)&gt;&gt;&gt;0}function s(e,t){return(e[t]&lt;&lt;24|e[t+1]&lt;&lt;16|e[t+2]&lt;&lt;8|e[t+3])&gt;&gt;&gt;0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&amp;&amp;(mod.length||Object.keys(mod).length))return mod}catch(_){}return null}return inquire_1}var utf8$2={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(_){var i=_;i.length=function(u){for(var s=0,e=0,t=0;t&lt;u.length;++t)e=u.charCodeAt(t),e&lt;128?s+=1:e&lt;2048?s+=2:(e&amp;64512)===55296&amp;&amp;(u.charCodeAt(t+1)&amp;64512)===56320?(++t,s+=4):s+=3;return s},i.read=function(u,s,e){var t=e-s;if(t&lt;1)return"";for(var r=null,n=[],a=0,d;s&lt;e;)d=u[s++],d&lt;128?n[a++]=d:d&gt;191&amp;&amp;d&lt;224?n[a++]=(d&amp;31)&lt;&lt;6|u[s++]&amp;63:d&gt;239&amp;&amp;d&lt;365?(d=((d&amp;7)&lt;&lt;18|(u[s++]&amp;63)&lt;&lt;12|(u[s++]&amp;63)&lt;&lt;6|u[s++]&amp;63)-65536,n[a++]=55296+(d&gt;&gt;10),n[a++]=56320+(d&amp;1023)):n[a++]=(d&amp;15)&lt;&lt;12|(u[s++]&amp;63)&lt;&lt;6|u[s++]&amp;63,a&gt;8191&amp;&amp;((r||(r=[])).push(String.fromCharCode.apply(String,n)),a=0);return r?(a&amp;&amp;r.push(String.fromCharCode.apply(String,n.slice(0,a))),r.join("")):String.fromCharCode.apply(String,n.slice(0,a))},i.write=function(u,s,e){for(var t=e,r,n,a=0;a&lt;u.length;++a)r=u.charCodeAt(a),r&lt;128?s[e++]=r:r&lt;2048?(s[e++]=r&gt;&gt;6|192,s[e++]=r&amp;63|128):(r&amp;64512)===55296&amp;&amp;((n=u.charCodeAt(a+1))&amp;64512)===56320?(r=65536+((r&amp;1023)&lt;&lt;10)+(n&amp;1023),++a,s[e++]=r&gt;&gt;18|240,s[e++]=r&gt;&gt;12&amp;63|128,s[e++]=r&gt;&gt;6&amp;63|128,s[e++]=r&amp;63|128):(s[e++]=r&gt;&gt;12|224,s[e++]=r&gt;&gt;6&amp;63|128,s[e++]=r&amp;63|128);return e-t}}(utf8$2)),utf8$2}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=_;function _(i,o,u){var s=u||8192,e=s&gt;&gt;&gt;1,t=null,r=s;return function(a){if(a&lt;1||a&gt;e)return i(a);r+a&gt;s&amp;&amp;(t=i(s),r=0);var d=o.call(t,r,r+=a);return r&amp;7&amp;&amp;(r=(r|7)+1),d}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=i;var _=requireMinimal();function i(e,t){this.lo=e&gt;&gt;&gt;0,this.hi=t&gt;&gt;&gt;0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var u=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(t===0)return o;var r=t&lt;0;r&amp;&amp;(t=-t);var n=t&gt;&gt;&gt;0,a=(t-n)/4294967296&gt;&gt;&gt;0;return r&amp;&amp;(a=~a&gt;&gt;&gt;0,n=~n&gt;&gt;&gt;0,++n&gt;4294967295&amp;&amp;(n=0,++a&gt;4294967295&amp;&amp;(a=0))),new i(n,a)},i.from=function(t){if(typeof t=="number")return i.fromNumber(t);if(_.isString(t))if(_.Long)t=_.Long.fromString(t);else return i.fromNumber(parseInt(t,10));return t.low||t.high?new i(t.low&gt;&gt;&gt;0,t.high&gt;&gt;&gt;0):o},i.prototype.toNumber=function(t){if(!t&amp;&amp;this.hi&gt;&gt;&gt;31){var r=~this.lo+1&gt;&gt;&gt;0,n=~this.hi&gt;&gt;&gt;0;return r||(n=n+1&gt;&gt;&gt;0),-(r+n*4294967296)}return this.lo+this.hi*4294967296},i.prototype.toLong=function(t){return _.Long?new _.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var s=String.prototype.charCodeAt;return i.fromHash=function(t){return t===u?o:new i((s.call(t,0)|s.call(t,1)&lt;&lt;8|s.call(t,2)&lt;&lt;16|s.call(t,3)&lt;&lt;24)&gt;&gt;&gt;0,(s.call(t,4)|s.call(t,5)&lt;&lt;8|s.call(t,6)&lt;&lt;16|s.call(t,7)&lt;&lt;24)&gt;&gt;&gt;0)},i.prototype.toHash=function(){return String.fromCharCode(this.lo&amp;255,this.lo&gt;&gt;&gt;8&amp;255,this.lo&gt;&gt;&gt;16&amp;255,this.lo&gt;&gt;&gt;24,this.hi&amp;255,this.hi&gt;&gt;&gt;8&amp;255,this.hi&gt;&gt;&gt;16&amp;255,this.hi&gt;&gt;&gt;24)},i.prototype.zzEncode=function(){var t=this.hi&gt;&gt;31;return this.hi=((this.hi&lt;&lt;1|this.lo&gt;&gt;&gt;31)^t)&gt;&gt;&gt;0,this.lo=(this.lo&lt;&lt;1^t)&gt;&gt;&gt;0,this},i.prototype.zzDecode=function(){var t=-(this.lo&amp;1);return this.lo=((this.lo&gt;&gt;&gt;1|this.hi&lt;&lt;31)^t)&gt;&gt;&gt;0,this.hi=(this.hi&gt;&gt;&gt;1^t)&gt;&gt;&gt;0,this},i.prototype.length=function(){var t=this.lo,r=(this.lo&gt;&gt;&gt;28|this.hi&lt;&lt;4)&gt;&gt;&gt;0,n=this.hi&gt;&gt;&gt;24;return n===0?r===0?t&lt;16384?t&lt;128?1:2:t&lt;2097152?3:4:r&lt;16384?r&lt;128?5:6:r&lt;2097152?7:8:n&lt;128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(_){var i=_;i.asPromise=requireAspromise(),i.base64=requireBase64(),i.EventEmitter=requireEventemitter(),i.float=requireFloat(),i.inquire=requireInquire(),i.utf8=requireUtf8(),i.pool=requirePool(),i.LongBits=requireLongbits(),i.isNode=!!(typeof commonjsGlobal&lt;"u"&amp;&amp;commonjsGlobal&amp;&amp;commonjsGlobal.process&amp;&amp;commonjsGlobal.process.versions&amp;&amp;commonjsGlobal.process.versions.node),i.global=i.isNode&amp;&amp;commonjsGlobal||typeof window&lt;"u"&amp;&amp;window||typeof self&lt;"u"&amp;&amp;self||commonjsGlobal,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(e){return typeof e=="number"&amp;&amp;isFinite(e)&amp;&amp;Math.floor(e)===e},i.isString=function(e){return typeof e=="string"||e instanceof String},i.isObject=function(e){return e&amp;&amp;typeof e=="object"},i.isset=i.isSet=function(e,t){var r=e[t];return r!=null&amp;&amp;e.hasOwnProperty(t)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)&gt;0:!1},i.Buffer=function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(e){return typeof e=="number"?i.Buffer?i._Buffer_allocUnsafe(e):new i.Array(e):i.Buffer?i._Buffer_from(e):typeof Uint8Array&gt;"u"?e:new Uint8Array(e)},i.Array=typeof Uint8Array&lt;"u"?Uint8Array:Array,i.Long=i.global.dcodeIO&amp;&amp;i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(e){return e?i.LongBits.from(e).toHash():i.LongBits.zeroHash},i.longFromHash=function(e,t){var r=i.LongBits.fromHash(e);return i.Long?i.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)};function o(s,e,t){for(var r=Object.keys(e),n=0;n&lt;r.length;++n)(s[r[n]]===void 0||!t)&amp;&amp;(s[r[n]]=e[r[n]]);return s}i.merge=o,i.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function u(s){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&amp;&amp;o(this,r)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return s},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}i.newError=u,i.ProtocolError=u("ProtocolError"),i.oneOfGetter=function(e){for(var t={},r=0;r&lt;e.length;++r)t[e[r]]=1;return function(){for(var n=Object.keys(this),a=n.length-1;a&gt;-1;--a)if(t[n[a]]===1&amp;&amp;this[n[a]]!==void 0&amp;&amp;this[n[a]]!==null)return n[a]}},i.oneOfSetter=function(e){return function(t){for(var r=0;r&lt;e.length;++r)e[r]!==t&amp;&amp;delete this[e[r]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var s=i.Buffer;if(!s){i._Buffer_from=i._Buffer_allocUnsafe=null;return}i._Buffer_from=s.from!==Uint8Array.from&amp;&amp;s.from||function(t,r){return new s(t,r)},i._Buffer_allocUnsafe=s.allocUnsafe||function(t){return new s(t)}}}(minimal)),minimal}var writer=Writer$1,util$7=requireMinimal(),BufferWriter$1,LongBits$1=util$7.LongBits,base64=util$7.base64,utf8$1=util$7.utf8;function Op(_,i,o){this.fn=_,this.len=i,this.next=void 0,this.val=o}function noop(){}function State(_){this.head=_.head,this.tail=_.tail,this.len=_.len,this.next=_.states}function Writer$1(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create$1=function _(){return util$7.Buffer?function(){return(Writer$1.create=function(){return new BufferWriter$1})()}:function(){return new Writer$1}};Writer$1.create=create$1();Writer$1.alloc=function _(i){return new util$7.Array(i)};util$7.Array!==Array&amp;&amp;(Writer$1.alloc=util$7.pool(Writer$1.alloc,util$7.Array.prototype.subarray));Writer$1.prototype._push=function _(i,o,u){return this.tail=this.tail.next=new Op(i,o,u),this.len+=o,this};function writeByte(_,i,o){i[o]=_&amp;255}function writeVarint32(_,i,o){for(;_&gt;127;)i[o++]=_&amp;127|128,_&gt;&gt;&gt;=7;i[o]=_}function VarintOp(_,i){this.len=_,this.next=void 0,this.val=i}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer$1.prototype.uint32=function _(i){return this.len+=(this.tail=this.tail.next=new VarintOp((i=i&gt;&gt;&gt;0)&lt;128?1:i&lt;16384?2:i&lt;2097152?3:i&lt;268435456?4:5,i)).len,this};Writer$1.prototype.int32=function _(i){return i&lt;0?this._push(writeVarint64,10,LongBits$1.fromNumber(i)):this.uint32(i)};Writer$1.prototype.sint32=function _(i){return this.uint32((i&lt;&lt;1^i&gt;&gt;31)&gt;&gt;&gt;0)};function writeVarint64(_,i,o){for(;_.hi;)i[o++]=_.lo&amp;127|128,_.lo=(_.lo&gt;&gt;&gt;7|_.hi&lt;&lt;25)&gt;&gt;&gt;0,_.hi&gt;&gt;&gt;=7;for(;_.lo&gt;127;)i[o++]=_.lo&amp;127|128,_.lo=_.lo&gt;&gt;&gt;7;i[o++]=_.lo}Writer$1.prototype.uint64=function _(i){var o=LongBits$1.from(i);return this._push(writeVarint64,o.length(),o)};Writer$1.prototype.int64=Writer$1.prototype.uint64;Writer$1.prototype.sint64=function _(i){var o=LongBits$1.from(i).zzEncode();return this._push(writeVarint64,o.length(),o)};Writer$1.prototype.bool=function _(i){return this._push(writeByte,1,i?1:0)};function writeFixed32(_,i,o){i[o]=_&amp;255,i[o+1]=_&gt;&gt;&gt;8&amp;255,i[o+2]=_&gt;&gt;&gt;16&amp;255,i[o+3]=_&gt;&gt;&gt;24}Writer$1.prototype.fixed32=function _(i){return this._push(writeFixed32,4,i&gt;&gt;&gt;0)};Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32;Writer$1.prototype.fixed64=function _(i){var o=LongBits$1.from(i);return this._push(writeFixed32,4,o.lo)._push(writeFixed32,4,o.hi)};Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64;Writer$1.prototype.float=function _(i){return this._push(util$7.float.writeFloatLE,4,i)};Writer$1.prototype.double=function _(i){return this._push(util$7.float.writeDoubleLE,8,i)};var writeBytes=util$7.Array.prototype.set?function _(i,o,u){o.set(i,u)}:function _(i,o,u){for(var s=0;s&lt;i.length;++s)o[u+s]=i[s]};Writer$1.prototype.bytes=function _(i){var o=i.length&gt;&gt;&gt;0;if(!o)return this._push(writeByte,1,0);if(util$7.isString(i)){var u=Writer$1.alloc(o=base64.length(i));base64.decode(i,u,0),i=u}return this.uint32(o)._push(writeBytes,o,i)};Writer$1.prototype.string=function _(i){var o=utf8$1.length(i);return o?this.uint32(o)._push(utf8$1.write,o,i):this._push(writeByte,1,0)};Writer$1.prototype.fork=function _(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this};Writer$1.prototype.reset=function _(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this};Writer$1.prototype.ldelim=function _(){var i=this.head,o=this.tail,u=this.len;return this.reset().uint32(u),u&amp;&amp;(this.tail.next=i.next,this.tail=o,this.len+=u),this};Writer$1.prototype.finish=function _(){for(var i=this.head.next,o=this.constructor.alloc(this.len),u=0;i;)i.fn(i.val,o,u),u+=i.len,i=i.next;return o};Writer$1._configure=function(_){BufferWriter$1=_,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$6=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$6._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$6.Buffer&amp;&amp;util$6.Buffer.prototype instanceof Uint8Array&amp;&amp;util$6.Buffer.prototype.set.name==="set"?function(i,o,u){o.set(i,u)}:function(i,o,u){if(i.copy)i.copy(o,u,0,i.length);else for(var s=0;s&lt;i.length;)o[u++]=i[s++]}};BufferWriter.prototype.bytes=function _(i){util$6.isString(i)&amp;&amp;(i=util$6._Buffer_from(i,"base64"));var o=i.length&gt;&gt;&gt;0;return this.uint32(o),o&amp;&amp;this._push(BufferWriter.writeBytesBuffer,o,i),this};function writeStringBuffer(_,i,o){_.length&lt;40?util$6.utf8.write(_,i,o):i.utf8Write?i.utf8Write(_,o):i.write(_,o)}BufferWriter.prototype.string=function _(i){var o=util$6.Buffer.byteLength(i);return this.uint32(o),o&amp;&amp;this._push(writeStringBuffer,o,i),this};BufferWriter._configure();var reader=Reader$1,util$5=requireMinimal(),BufferReader$1,LongBits=util$5.LongBits,utf8=util$5.utf8;function indexOutOfRange(_,i){return RangeError("index out of range: "+_.pos+" + "+(i||1)+" &gt; "+_.len)}function Reader$1(_){this.buf=_,this.pos=0,this.len=_.length}var create_array=typeof Uint8Array&lt;"u"?function _(i){if(i instanceof Uint8Array||Array.isArray(i))return new Reader$1(i);throw Error("illegal buffer")}:function _(i){if(Array.isArray(i))return new Reader$1(i);throw Error("illegal buffer")},create=function _(){return util$5.Buffer?function(o){return(Reader$1.create=function(s){return util$5.Buffer.isBuffer(s)?new BufferReader$1(s):create_array(s)})(o)}:create_array};Reader$1.create=create();Reader$1.prototype._slice=util$5.Array.prototype.subarray||util$5.Array.prototype.slice;Reader$1.prototype.uint32=function _(){var i=4294967295;return function(){if(i=(this.buf[this.pos]&amp;127)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128||(i=(i|(this.buf[this.pos]&amp;127)&lt;&lt;7)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)||(i=(i|(this.buf[this.pos]&amp;127)&lt;&lt;14)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)||(i=(i|(this.buf[this.pos]&amp;127)&lt;&lt;21)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)||(i=(i|(this.buf[this.pos]&amp;15)&lt;&lt;28)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128))return i;if((this.pos+=5)&gt;this.len)throw this.pos=this.len,indexOutOfRange(this,10);return i}}();Reader$1.prototype.int32=function _(){return this.uint32()|0};Reader$1.prototype.sint32=function _(){var i=this.uint32();return i&gt;&gt;&gt;1^-(i&amp;1)|0};function readLongVarint(){var _=new LongBits(0,0),i=0;if(this.len-this.pos&gt;4){for(;i&lt;4;++i)if(_.lo=(_.lo|(this.buf[this.pos]&amp;127)&lt;&lt;i*7)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)return _;if(_.lo=(_.lo|(this.buf[this.pos]&amp;127)&lt;&lt;28)&gt;&gt;&gt;0,_.hi=(_.hi|(this.buf[this.pos]&amp;127)&gt;&gt;4)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)return _;i=0}else{for(;i&lt;3;++i){if(this.pos&gt;=this.len)throw indexOutOfRange(this);if(_.lo=(_.lo|(this.buf[this.pos]&amp;127)&lt;&lt;i*7)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)return _}return _.lo=(_.lo|(this.buf[this.pos++]&amp;127)&lt;&lt;i*7)&gt;&gt;&gt;0,_}if(this.len-this.pos&gt;4){for(;i&lt;5;++i)if(_.hi=(_.hi|(this.buf[this.pos]&amp;127)&lt;&lt;i*7+3)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)return _}else for(;i&lt;5;++i){if(this.pos&gt;=this.len)throw indexOutOfRange(this);if(_.hi=(_.hi|(this.buf[this.pos]&amp;127)&lt;&lt;i*7+3)&gt;&gt;&gt;0,this.buf[this.pos++]&lt;128)return _}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function _(){return this.uint32()!==0};function readFixed32_end(_,i){return(_[i-4]|_[i-3]&lt;&lt;8|_[i-2]&lt;&lt;16|_[i-1]&lt;&lt;24)&gt;&gt;&gt;0}Reader$1.prototype.fixed32=function _(){if(this.pos+4&gt;this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)};Reader$1.prototype.sfixed32=function _(){if(this.pos+4&gt;this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8&gt;this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function _(){if(this.pos+4&gt;this.len)throw indexOutOfRange(this,4);var i=util$5.float.readFloatLE(this.buf,this.pos);return this.pos+=4,i};Reader$1.prototype.double=function _(){if(this.pos+8&gt;this.len)throw indexOutOfRange(this,4);var i=util$5.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,i};Reader$1.prototype.bytes=function _(){var i=this.uint32(),o=this.pos,u=this.pos+i;if(u&gt;this.len)throw indexOutOfRange(this,i);if(this.pos+=i,Array.isArray(this.buf))return this.buf.slice(o,u);if(o===u){var s=util$5.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,u)};Reader$1.prototype.string=function _(){var i=this.bytes();return utf8.read(i,0,i.length)};Reader$1.prototype.skip=function _(i){if(typeof i=="number"){if(this.pos+i&gt;this.len)throw indexOutOfRange(this,i);this.pos+=i}else do if(this.pos&gt;=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&amp;128);return this};Reader$1.prototype.skipType=function(_){switch(_){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(_=this.uint32()&amp;7)!==4;)this.skipType(_);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+_+" at offset "+this.pos)}return this};Reader$1._configure=function(_){BufferReader$1=_,Reader$1.create=create(),BufferReader$1._configure();var i=util$5.Long?"toLong":"toNumber";util$5.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[i](!1)},uint64:function(){return readLongVarint.call(this)[i](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[i](!1)},fixed64:function(){return readFixed64.call(this)[i](!0)},sfixed64:function(){return readFixed64.call(this)[i](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$4=requireMinimal();function BufferReader(_){Reader.call(this,_)}BufferReader._configure=function(){util$4.Buffer&amp;&amp;(BufferReader.prototype._slice=util$4.Buffer.prototype.slice)};BufferReader.prototype.string=function _(){var i=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+i,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+i,this.len))};BufferReader._configure();var rpc={},service$1=Service$1,util$3=requireMinimal();(Service$1.prototype=Object.create(util$3.EventEmitter.prototype)).constructor=Service$1;function Service$1(_,i,o){if(typeof _!="function")throw TypeError("rpcImpl must be a function");util$3.EventEmitter.call(this),this.rpcImpl=_,this.requestDelimited=!!i,this.responseDelimited=!!o}Service$1.prototype.rpcCall=function _(i,o,u,s,e){if(!s)throw TypeError("request must be specified");var t=this;if(!e)return util$3.asPromise(_,t,i,o,u,s);if(!t.rpcImpl){setTimeout(function(){e(Error("already ended"))},0);return}try{return t.rpcImpl(i,o[t.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(n,a){if(n)return t.emit("error",n,i),e(n);if(a===null){t.end(!0);return}if(!(a instanceof u))try{a=u[t.responseDelimited?"decodeDelimited":"decode"](a)}catch(d){return t.emit("error",d,i),e(d)}return t.emit("data",a,i),e(null,a)})}catch(r){t.emit("error",r,i),setTimeout(function(){e(r)},0);return}};Service$1.prototype.end=function _(i){return this.rpcImpl&amp;&amp;(i||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};(function(_){var i=_;i.Service=service$1})(rpc);var roots={};(function(_){var i=_;i.build="minimal",i.Writer=writer,i.BufferWriter=writer_buffer,i.Reader=reader,i.BufferReader=reader_buffer,i.util=requireMinimal(),i.rpc=rpc,i.roots=roots,i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()})(indexMinimal);var util$2={exports:{}},codegen_1=codegen;function codegen(_,i){typeof _=="string"&amp;&amp;(i=_,_=void 0);var o=[];function u(e){if(typeof e!="string"){var t=s();if(codegen.verbose&amp;&amp;console.log("codegen: "+t),t="return "+t,e){for(var r=Object.keys(e),n=new Array(r.length+1),a=new Array(r.length),d=0;d&lt;r.length;)n[d]=r[d],a[d]=e[r[d++]];return n[d]=t,Function.apply(null,n).apply(null,a)}return Function(t)()}for(var f=new Array(arguments.length-1),m=0;m&lt;f.length;)f[m]=arguments[++m];if(m=0,e=e.replace(/%([%dfijs])/g,function(p,c){var b=f[m++];switch(c){case"d":case"f":return String(Number(b));case"i":return String(Math.floor(b));case"j":return JSON.stringify(b);case"s":return String(b)}return"%"}),m!==f.length)throw Error("parameter count mismatch");return o.push(e),u}function s(e){return"function "+(e||i||"")+"("+(_&amp;&amp;_.join(",")||"")+`){
  `+o.join(`
  `)+`
}`}return u.toString=s,u}codegen.verbose=!1;var fetch_1=fetch$1,asPromise=requireAspromise(),inquire=requireInquire(),fs=inquire("fs");function fetch$1(_,i,o){return typeof i=="function"?(o=i,i={}):i||(i={}),o?!i.xhr&amp;&amp;fs&amp;&amp;fs.readFile?fs.readFile(_,function(s,e){return s&amp;&amp;typeof XMLHttpRequest&lt;"u"?fetch$1.xhr(_,i,o):s?o(s):o(null,i.binary?e:e.toString("utf8"))}):fetch$1.xhr(_,i,o):asPromise(fetch$1,this,_,i)}fetch$1.xhr=function _(i,o,u){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===4){if(s.status!==0&amp;&amp;s.status!==200)return u(Error("status "+s.status));if(o.binary){var t=s.response;if(!t){t=[];for(var r=0;r&lt;s.responseText.length;++r)t.push(s.responseText.charCodeAt(r)&amp;255)}return u(null,typeof Uint8Array&lt;"u"?new Uint8Array(t):t)}return u(null,s.responseText)}},o.binary&amp;&amp;("overrideMimeType"in s&amp;&amp;s.overrideMimeType("text/plain; charset=x-user-defined"),s.responseType="arraybuffer"),s.open("GET",i),s.send()};var path={};(function(_){var i=_,o=i.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},u=i.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=o(e),n="";r&amp;&amp;(n=t.shift()+"/");for(var a=0;a&lt;t.length;)t[a]===".."?a&gt;0&amp;&amp;t[a-1]!==".."?t.splice(--a,2):r?t.splice(a,1):++a:t[a]==="."?t.splice(a,1):++a;return n+t.join("/")};i.resolve=function(e,t,r){return r||(t=u(t)),o(t)?t:(r||(e=u(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?u(e+"/"+t):t)}})(path);var types$1={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(_){var i=_,o=requireUtil(),u=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r&lt;e.length;)n[u[r+t]]=e[r++];return n}i.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),i.long=s([0,0,0,1,1],7),i.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types$1)),types$1}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=t;var _=requireObject();((t.prototype=Object.create(_.prototype)).constructor=t).className="Field";var i=require_enum(),o=requireTypes(),u=requireUtil(),s,e=/^required|optional|repeated$/;t.fromJSON=function(n,a){return new t(n,a.id,a.type,a.rule,a.extend,a.options,a.comment)};function t(r,n,a,d,f,m,l){if(u.isObject(d)?(l=f,m=d,d=f=void 0):u.isObject(f)&amp;&amp;(l=m,m=f,f=void 0),_.call(this,r,m),!u.isInteger(n)||n&lt;0)throw TypeError("id must be a non-negative integer");if(!u.isString(a))throw TypeError("type must be a string");if(d!==void 0&amp;&amp;!e.test(d=d.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(f!==void 0&amp;&amp;!u.isString(f))throw TypeError("extend must be a string");d==="proto3_optional"&amp;&amp;(d="optional"),this.rule=d&amp;&amp;d!=="optional"?d:void 0,this.type=a,this.id=n,this.extend=f||void 0,this.required=d==="required",this.optional=!this.required,this.repeated=d==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=u.Long?o.long[a]!==void 0:!1,this.bytes=a==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}return Object.defineProperty(t.prototype,"packed",{get:function(){return this._packed===null&amp;&amp;(this._packed=this.getOption("packed")!==!1),this._packed}}),t.prototype.setOption=function(n,a,d){return n==="packed"&amp;&amp;(this._packed=null),_.prototype.setOption.call(this,n,a,d)},t.prototype.toJSON=function(n){var a=n?!!n.keepComments:!1;return u.toObject(["rule",this.rule!=="optional"&amp;&amp;this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",a?this.comment:void 0])},t.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=o.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof s?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&amp;&amp;this.options.proto3_optional&amp;&amp;(this.typeDefault=null),this.options&amp;&amp;this.options.default!=null&amp;&amp;(this.typeDefault=this.options.default,this.resolvedType instanceof i&amp;&amp;typeof this.typeDefault=="string"&amp;&amp;(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&amp;&amp;((this.options.packed===!0||this.options.packed!==void 0&amp;&amp;this.resolvedType&amp;&amp;!(this.resolvedType instanceof i))&amp;&amp;delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&amp;&amp;Object.freeze(this.typeDefault);else if(this.bytes&amp;&amp;typeof this.typeDefault=="string"){var n;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,n=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,n=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=n}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof s&amp;&amp;(this.parent.ctor.prototype[this.name]=this.defaultValue),_.prototype.resolve.call(this)},t.d=function(n,a,d,f){return typeof a=="function"?a=u.decorateType(a).name:a&amp;&amp;typeof a=="object"&amp;&amp;(a=u.decorateEnum(a).name),function(l,p){u.decorateType(l.constructor).add(new t(p,n,a,d,{default:f}))}},t._configure=function(n){s=n},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=u;var _=requireObject();((u.prototype=Object.create(_.prototype)).constructor=u).className="OneOf";var i=requireField(),o=requireUtil();function u(e,t,r,n){if(Array.isArray(t)||(r=t,t=void 0),_.call(this,e,r),!(t===void 0||Array.isArray(t)))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}u.fromJSON=function(t,r){return new u(t,r.oneof,r.options,r.comment)},u.prototype.toJSON=function(t){var r=t?!!t.keepComments:!1;return o.toObject(["options",this.options,"oneof",this.oneof,"comment",r?this.comment:void 0])};function s(e){if(e.parent)for(var t=0;t&lt;e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}return u.prototype.add=function(t){if(!(t instanceof i))throw TypeError("field must be a Field");return t.parent&amp;&amp;t.parent!==this.parent&amp;&amp;t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,s(this),this},u.prototype.remove=function(t){if(!(t instanceof i))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(t);if(r&lt;0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(r,1),r=this.oneof.indexOf(t.name),r&gt;-1&amp;&amp;this.oneof.splice(r,1),t.partOf=null,this},u.prototype.onAdd=function(t){_.prototype.onAdd.call(this,t);for(var r=this,n=0;n&lt;this.oneof.length;++n){var a=t.get(this.oneof[n]);a&amp;&amp;!a.partOf&amp;&amp;(a.partOf=r,r.fieldsArray.push(a))}s(this)},u.prototype.onRemove=function(t){for(var r=0,n;r&lt;this.fieldsArray.length;++r)(n=this.fieldsArray[r]).parent&amp;&amp;n.parent.remove(n);_.prototype.onRemove.call(this,t)},u.d=function(){for(var t=new Array(arguments.length),r=0;r&lt;arguments.length;)t[r]=arguments[r++];return function(a,d){o.decorateType(a.constructor).add(new u(d,t)),Object.defineProperty(a,d,{get:o.oneOfGetter(t),set:o.oneOfSetter(t)})}},oneof}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=n;var _=requireObject();((n.prototype=Object.create(_.prototype)).constructor=n).className="Namespace";var i=requireField(),o=requireUtil(),u=requireOneof(),s,e,t;n.fromJSON=function(f,m){return new n(f,m.options).addJSON(m.nested)};function r(d,f){if(d&amp;&amp;d.length){for(var m={},l=0;l&lt;d.length;++l)m[d[l].name]=d[l].toJSON(f);return m}}n.arrayToJSON=r,n.isReservedId=function(f,m){if(f){for(var l=0;l&lt;f.length;++l)if(typeof f[l]!="string"&amp;&amp;f[l][0]&lt;=m&amp;&amp;f[l][1]&gt;m)return!0}return!1},n.isReservedName=function(f,m){if(f){for(var l=0;l&lt;f.length;++l)if(f[l]===m)return!0}return!1};function n(d,f){_.call(this,d,f),this.nested=void 0,this._nestedArray=null}function a(d){return d._nestedArray=null,d}return Object.defineProperty(n.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),n.prototype.toJSON=function(f){return o.toObject(["options",this.options,"nested",r(this.nestedArray,f)])},n.prototype.addJSON=function(f){var m=this;if(f)for(var l=Object.keys(f),p=0,c;p&lt;l.length;++p)c=f[l[p]],m.add((c.fields!==void 0?s.fromJSON:c.values!==void 0?t.fromJSON:c.methods!==void 0?e.fromJSON:c.id!==void 0?i.fromJSON:n.fromJSON)(l[p],c));return this},n.prototype.get=function(f){return this.nested&amp;&amp;this.nested[f]||null},n.prototype.getEnum=function(f){if(this.nested&amp;&amp;this.nested[f]instanceof t)return this.nested[f].values;throw Error("no such enum: "+f)},n.prototype.add=function(f){if(!(f instanceof i&amp;&amp;f.extend!==void 0||f instanceof s||f instanceof u||f instanceof t||f instanceof e||f instanceof n))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var m=this.get(f.name);if(m)if(m instanceof n&amp;&amp;f instanceof n&amp;&amp;!(m instanceof s||m instanceof e)){for(var l=m.nestedArray,p=0;p&lt;l.length;++p)f.add(l[p]);this.remove(m),this.nested||(this.nested={}),f.setOptions(m.options,!0)}else throw Error("duplicate name '"+f.name+"' in "+this)}return this.nested[f.name]=f,f.onAdd(this),a(this)},n.prototype.remove=function(f){if(!(f instanceof _))throw TypeError("object must be a ReflectionObject");if(f.parent!==this)throw Error(f+" is not a member of "+this);return delete this.nested[f.name],Object.keys(this.nested).length||(this.nested=void 0),f.onRemove(this),a(this)},n.prototype.define=function(f,m){if(o.isString(f))f=f.split(".");else if(!Array.isArray(f))throw TypeError("illegal path");if(f&amp;&amp;f.length&amp;&amp;f[0]==="")throw Error("path must be relative");for(var l=this;f.length&gt;0;){var p=f.shift();if(l.nested&amp;&amp;l.nested[p]){if(l=l.nested[p],!(l instanceof n))throw Error("path conflicts with non-namespace objects")}else l.add(l=new n(p))}return m&amp;&amp;l.addJSON(m),l},n.prototype.resolveAll=function(){for(var f=this.nestedArray,m=0;m&lt;f.length;)f[m]instanceof n?f[m++].resolveAll():f[m++].resolve();return this.resolve()},n.prototype.lookup=function(f,m,l){if(typeof m=="boolean"?(l=m,m=void 0):m&amp;&amp;!Array.isArray(m)&amp;&amp;(m=[m]),o.isString(f)&amp;&amp;f.length){if(f===".")return this.root;f=f.split(".")}else if(!f.length)return this;if(f[0]==="")return this.root.lookup(f.slice(1),m);var p=this.get(f[0]);if(p){if(f.length===1){if(!m||m.indexOf(p.constructor)&gt;-1)return p}else if(p instanceof n&amp;&amp;(p=p.lookup(f.slice(1),m,!0)))return p}else for(var c=0;c&lt;this.nestedArray.length;++c)if(this._nestedArray[c]instanceof n&amp;&amp;(p=this._nestedArray[c].lookup(f,m,!0)))return p;return this.parent===null||l?null:this.parent.lookup(f,m)},n.prototype.lookupType=function(f){var m=this.lookup(f,[s]);if(!m)throw Error("no such type: "+f);return m},n.prototype.lookupEnum=function(f){var m=this.lookup(f,[t]);if(!m)throw Error("no such Enum '"+f+"' in "+this);return m},n.prototype.lookupTypeOrEnum=function(f){var m=this.lookup(f,[s,t]);if(!m)throw Error("no such Type or Enum '"+f+"' in "+this);return m},n.prototype.lookupService=function(f){var m=this.lookup(f,[e]);if(!m)throw Error("no such Service '"+f+"' in "+this);return m},n._configure=function(d,f,m){s=d,e=f,t=m},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=u;var _=requireField();((u.prototype=Object.create(_.prototype)).constructor=u).className="MapField";var i=requireTypes(),o=requireUtil();function u(s,e,t,r,n,a){if(_.call(this,s,e,r,void 0,void 0,n,a),!o.isString(t))throw TypeError("keyType must be a string");this.keyType=t,this.resolvedKeyType=null,this.map=!0}return u.fromJSON=function(e,t){return new u(e,t.id,t.keyType,t.type,t.options,t.comment)},u.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(i.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return _.prototype.resolve.call(this)},u.d=function(e,t,r){return typeof r=="function"?r=o.decorateType(r).name:r&amp;&amp;typeof r=="object"&amp;&amp;(r=o.decorateEnum(r).name),function(a,d){o.decorateType(a.constructor).add(new u(d,e,t,r))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=o;var _=requireObject();((o.prototype=Object.create(_.prototype)).constructor=o).className="Method";var i=requireUtil();function o(u,s,e,t,r,n,a,d,f){if(i.isObject(r)?(a=r,r=n=void 0):i.isObject(n)&amp;&amp;(a=n,n=void 0),!(s===void 0||i.isString(s)))throw TypeError("type must be a string");if(!i.isString(e))throw TypeError("requestType must be a string");if(!i.isString(t))throw TypeError("responseType must be a string");_.call(this,u,a),this.type=s||"rpc",this.requestType=e,this.requestStream=r?!0:void 0,this.responseType=t,this.responseStream=n?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=d,this.parsedOptions=f}return o.fromJSON=function(s,e){return new o(s,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)},o.prototype.toJSON=function(s){var e=s?!!s.keepComments:!1;return i.toObject(["type",this.type!=="rpc"&amp;&amp;this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),_.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=s;var _=requireNamespace();((s.prototype=Object.create(_.prototype)).constructor=s).className="Service";var i=requireMethod(),o=requireUtil(),u=rpc;function s(t,r){_.call(this,t,r),this.methods={},this._methodsArray=null}s.fromJSON=function(r,n){var a=new s(r,n.options);if(n.methods)for(var d=Object.keys(n.methods),f=0;f&lt;d.length;++f)a.add(i.fromJSON(d[f],n.methods[d[f]]));return n.nested&amp;&amp;a.addJSON(n.nested),a.comment=n.comment,a},s.prototype.toJSON=function(r){var n=_.prototype.toJSON.call(this,r),a=r?!!r.keepComments:!1;return o.toObject(["options",n&amp;&amp;n.options||void 0,"methods",_.arrayToJSON(this.methodsArray,r)||{},"nested",n&amp;&amp;n.nested||void 0,"comment",a?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}});function e(t){return t._methodsArray=null,t}return s.prototype.get=function(r){return this.methods[r]||_.prototype.get.call(this,r)},s.prototype.resolveAll=function(){for(var r=this.methodsArray,n=0;n&lt;r.length;++n)r[n].resolve();return _.prototype.resolve.call(this)},s.prototype.add=function(r){if(this.get(r.name))throw Error("duplicate name '"+r.name+"' in "+this);return r instanceof i?(this.methods[r.name]=r,r.parent=this,e(this)):_.prototype.add.call(this,r)},s.prototype.remove=function(r){if(r instanceof i){if(this.methods[r.name]!==r)throw Error(r+" is not a member of "+this);return delete this.methods[r.name],r.parent=null,e(this)}return _.prototype.remove.call(this,r)},s.prototype.create=function(r,n,a){for(var d=new u.Service(r,n,a),f=0,m;f&lt;this.methodsArray.length;++f){var l=o.lcFirst((m=this._methodsArray[f]).resolve().name).replace(/[^$\w_]/g,"");d[l]=o.codegen(["r","c"],o.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m,q:m.resolvedRequestType.ctor,s:m.resolvedResponseType.ctor})}return d},service}var message=Message,util$1=requireMinimal();function Message(_){if(_)for(var i=Object.keys(_),o=0;o&lt;i.length;++o)this[i[o]]=_[i[o]]}Message.create=function _(i){return this.$type.create(i)};Message.encode=function _(i,o){return this.$type.encode(i,o)};Message.encodeDelimited=function _(i,o){return this.$type.encodeDelimited(i,o)};Message.decode=function _(i){return this.$type.decode(i)};Message.decodeDelimited=function _(i){return this.$type.decodeDelimited(i)};Message.verify=function _(i){return this.$type.verify(i)};Message.fromObject=function _(i){return this.$type.fromObject(i)};Message.toObject=function _(i,o){return this.$type.toObject(i,o)};Message.prototype.toJSON=function _(){return this.$type.toObject(this,util$1.toJSONOptions)};var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=s;var _=require_enum(),i=requireTypes(),o=requireUtil();function u(e){return"missing required '"+e.name+"'"}function s(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(m){return m.map}).length?",k,value":""))("while(r.pos&lt;c){")("var t=r.uint32()");e.group&amp;&amp;t("if((t&amp;7)===4)")("break"),t("switch(t&gt;&gt;&gt;3){");for(var r=0;r&lt;e.fieldsArray.length;++r){var n=e._fieldsArray[r].resolve(),a=n.resolvedType instanceof _?"int32":n.type,d="m"+o.safeProp(n.name);t("case %i: {",n.id),n.map?(t("if(%s===util.emptyObject)",d)("%s={}",d)("var c2 = r.uint32()+r.pos"),i.defaults[n.keyType]!==void 0?t("k=%j",i.defaults[n.keyType]):t("k=null"),i.defaults[a]!==void 0?t("value=%j",i.defaults[a]):t("value=null"),t("while(r.pos&lt;c2){")("var tag2=r.uint32()")("switch(tag2&gt;&gt;&gt;3){")("case 1: k=r.%s(); break",n.keyType)("case 2:"),i.basic[a]===void 0?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",a),t("break")("default:")("r.skipType(tag2&amp;7)")("break")("}")("}"),i.long[n.keyType]!==void 0?t('%s[typeof k==="object"?util.longToHash(k):k]=value',d):t("%s[k]=value",d)):n.repeated?(t("if(!(%s&amp;&amp;%s.length))",d,d)("%s=[]",d),i.packed[a]!==void 0&amp;&amp;t("if((t&amp;7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos&lt;c2)")("%s.push(r.%s())",d,a)("}else"),i.basic[a]===void 0?t(n.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",d,r):t("%s.push(r.%s())",d,a)):i.basic[a]===void 0?t(n.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",d,r):t("%s=r.%s()",d,a),t("break")("}")}for(t("default:")("r.skipType(t&amp;7)")("break")("}")("}"),r=0;r&lt;e._fieldsArray.length;++r){var f=e._fieldsArray[r];f.required&amp;&amp;t("if(!m.hasOwnProperty(%j))",f.name)("throw util.ProtocolError(%j,{instance:m})",u(f))}return t("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=e;var _=require_enum(),i=requireUtil();function o(t,r){return t.name+": "+r+(t.repeated&amp;&amp;r!=="array"?"[]":t.map&amp;&amp;r!=="object"?"{k:"+t.keyType+"}":"")+" expected"}function u(t,r,n,a){if(r.resolvedType)if(r.resolvedType instanceof _){t("switch(%s){",a)("default:")("return%j",o(r,"enum value"));for(var d=Object.keys(r.resolvedType.values),f=0;f&lt;d.length;++f)t("case %i:",r.resolvedType.values[d[f]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,a)("if(e)")("return%j+e",r.name+".")("}");else switch(r.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",a)("return%j",o(r,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&amp;&amp;!(%s&amp;&amp;util.isInteger(%s.low)&amp;&amp;util.isInteger(%s.high)))",a,a,a,a)("return%j",o(r,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',a)("return%j",o(r,"number"));break;case"bool":t('if(typeof %s!=="boolean")',a)("return%j",o(r,"boolean"));break;case"string":t("if(!util.isString(%s))",a)("return%j",o(r,"string"));break;case"bytes":t('if(!(%s&amp;&amp;typeof %s.length==="number"||util.isString(%s)))',a,a,a)("return%j",o(r,"buffer"));break}return t}function s(t,r,n){switch(r.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",n)("return%j",o(r,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",n)("return%j",o(r,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",n)("return%j",o(r,"boolean key"));break}return t}function e(t){var r=i.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=t.oneofsArray,a={};n.length&amp;&amp;r("var p={}");for(var d=0;d&lt;t.fieldsArray.length;++d){var f=t._fieldsArray[d].resolve(),m="m"+i.safeProp(f.name);if(f.optional&amp;&amp;r("if(%s!=null&amp;&amp;m.hasOwnProperty(%j)){",m,f.name),f.map)r("if(!util.isObject(%s))",m)("return%j",o(f,"object"))("var k=Object.keys(%s)",m)("for(var i=0;i&lt;k.length;++i){"),s(r,f,"k[i]"),u(r,f,d,m+"[k[i]]")("}");else if(f.repeated)r("if(!Array.isArray(%s))",m)("return%j",o(f,"array"))("for(var i=0;i&lt;%s.length;++i){",m),u(r,f,d,m+"[i]")("}");else{if(f.partOf){var l=i.safeProp(f.partOf.name);a[f.partOf.name]===1&amp;&amp;r("if(p%s===1)",l)("return%j",f.partOf.name+": multiple values"),a[f.partOf.name]=1,r("p%s=1",l)}u(r,f,d,m)}f.optional&amp;&amp;r("}")}return r("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,function(_){var i=_,o=require_enum(),u=requireUtil();function s(t,r,n,a){var d=!1;if(r.resolvedType)if(r.resolvedType instanceof o){t("switch(d%s){",a);for(var f=r.resolvedType.values,m=Object.keys(f),l=0;l&lt;m.length;++l)f[m[l]]===r.typeDefault&amp;&amp;!d&amp;&amp;(t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',a,a,a),r.repeated||t("break"),d=!0),t("case%j:",m[l])("case %i:",f[m[l]])("m%s=%j",a,f[m[l]])("break");t("}")}else t('if(typeof d%s!=="object")',a)("throw TypeError(%j)",r.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",a,n,a);else{var p=!1;switch(r.type){case"double":case"float":t("m%s=Number(d%s)",a,a);break;case"uint32":case"fixed32":t("m%s=d%s&gt;&gt;&gt;0",a,a);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",a,a);break;case"uint64":p=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",a,a,p)('else if(typeof d%s==="string")',a)("m%s=parseInt(d%s,10)",a,a)('else if(typeof d%s==="number")',a)("m%s=d%s",a,a)('else if(typeof d%s==="object")',a)("m%s=new util.LongBits(d%s.low&gt;&gt;&gt;0,d%s.high&gt;&gt;&gt;0).toNumber(%s)",a,a,a,p?"true":"");break;case"bytes":t('if(typeof d%s==="string")',a)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",a,a,a)("else if(d%s.length &gt;= 0)",a)("m%s=d%s",a,a);break;case"string":t("m%s=String(d%s)",a,a);break;case"bool":t("m%s=Boolean(d%s)",a,a);break}}return t}i.fromObject=function(r){var n=r.fieldsArray,a=u.codegen(["d"],r.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return a("return new this.ctor");a("var m=new this.ctor");for(var d=0;d&lt;n.length;++d){var f=n[d].resolve(),m=u.safeProp(f.name);f.map?(a("if(d%s){",m)('if(typeof d%s!=="object")',m)("throw TypeError(%j)",f.fullName+": object expected")("m%s={}",m)("for(var ks=Object.keys(d%s),i=0;i&lt;ks.length;++i){",m),s(a,f,d,m+"[ks[i]]")("}")("}")):f.repeated?(a("if(d%s){",m)("if(!Array.isArray(d%s))",m)("throw TypeError(%j)",f.fullName+": array expected")("m%s=[]",m)("for(var i=0;i&lt;d%s.length;++i){",m),s(a,f,d,m+"[i]")("}")("}")):(f.resolvedType instanceof o||a("if(d%s!=null){",m),s(a,f,d,m),f.resolvedType instanceof o||a("}"))}return a("return m")};function e(t,r,n,a){if(r.resolvedType)r.resolvedType instanceof o?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",a,n,a,a,n,a,a):t("d%s=types[%i].toObject(m%s,o)",a,n,a);else{var d=!1;switch(r.type){case"double":case"float":t("d%s=o.json&amp;&amp;!isFinite(m%s)?String(m%s):m%s",a,a,a,a);break;case"uint64":d=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',a)("d%s=o.longs===String?String(m%s):m%s",a,a,a)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low&gt;&gt;&gt;0,m%s.high&gt;&gt;&gt;0).toNumber(%s):m%s",a,a,a,a,d?"true":"",a);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",a,a,a,a,a);break;default:t("d%s=m%s",a,a);break}}return t}i.toObject=function(r){var n=r.fieldsArray.slice().sort(u.compareFieldsById);if(!n.length)return u.codegen()("return {}");for(var a=u.codegen(["m","o"],r.name+"$toObject")("if(!o)")("o={}")("var d={}"),d=[],f=[],m=[],l=0;l&lt;n.length;++l)n[l].partOf||(n[l].resolve().repeated?d:n[l].map?f:m).push(n[l]);if(d.length){for(a("if(o.arrays||o.defaults){"),l=0;l&lt;d.length;++l)a("d%s=[]",u.safeProp(d[l].name));a("}")}if(f.length){for(a("if(o.objects||o.defaults){"),l=0;l&lt;f.length;++l)a("d%s={}",u.safeProp(f[l].name));a("}")}if(m.length){for(a("if(o.defaults){"),l=0;l&lt;m.length;++l){var p=m[l],c=u.safeProp(p.name);if(p.resolvedType instanceof o)a("d%s=o.enums===String?%j:%j",c,p.resolvedType.valuesById[p.typeDefault],p.typeDefault);else if(p.long)a("if(util.Long){")("var n=new util.Long(%i,%i,%j)",p.typeDefault.low,p.typeDefault.high,p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",c)("}else")("d%s=o.longs===String?%j:%i",c,p.typeDefault.toString(),p.typeDefault.toNumber());else if(p.bytes){var b="["+Array.prototype.slice.call(p.typeDefault).join(",")+"]";a("if(o.bytes===String)d%s=%j",c,String.fromCharCode.apply(String,p.typeDefault))("else{")("d%s=%s",c,b)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",c,c)("}")}else a("d%s=%j",c,p.typeDefault)}a("}")}var v=!1;for(l=0;l&lt;n.length;++l){var p=n[l],y=r._fieldsArray.indexOf(p),c=u.safeProp(p.name);p.map?(v||(v=!0,a("var ks2")),a("if(m%s&amp;&amp;(ks2=Object.keys(m%s)).length){",c,c)("d%s={}",c)("for(var j=0;j&lt;ks2.length;++j){"),e(a,p,y,c+"[ks2[j]]")("}")):p.repeated?(a("if(m%s&amp;&amp;m%s.length){",c,c)("d%s=[]",c)("for(var j=0;j&lt;m%s.length;++j){",c),e(a,p,y,c+"[j]")("}")):(a("if(m%s!=null&amp;&amp;m.hasOwnProperty(%j)){",c,p.name),e(a,p,y,c),p.partOf&amp;&amp;a("if(o.oneofs)")("d%s=%j",u.safeProp(p.partOf.name),p.name)),a("}")}return a("return d")}}(converter)),converter}var wrappers={};(function(_){var i=_,o=message;i[".google.protobuf.Any"]={fromObject:function(u){if(u&amp;&amp;u["@type"]){var s=u["@type"].substring(u["@type"].lastIndexOf("/")+1),e=this.lookup(s);if(e){var t=u["@type"].charAt(0)==="."?u["@type"].slice(1):u["@type"];return t.indexOf("/")===-1&amp;&amp;(t="/"+t),this.create({type_url:t,value:e.encode(e.fromObject(u)).finish()})}}return this.fromObject(u)},toObject:function(u,s){var e="type.googleapis.com/",t="",r="";if(s&amp;&amp;s.json&amp;&amp;u.type_url&amp;&amp;u.value){r=u.type_url.substring(u.type_url.lastIndexOf("/")+1),t=u.type_url.substring(0,u.type_url.lastIndexOf("/")+1);var n=this.lookup(r);n&amp;&amp;(u=n.decode(u.value))}if(!(u instanceof this.ctor)&amp;&amp;u instanceof o){var a=u.$type.toObject(u,s),d=u.$type.fullName[0]==="."?u.$type.fullName.slice(1):u.$type.fullName;return t===""&amp;&amp;(t=e),r=t+d,a["@type"]=r,a}return this.toObject(u,s)}}})(wrappers);var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=c;var _=requireNamespace();((c.prototype=Object.create(_.prototype)).constructor=c).className="Type";var i=require_enum(),o=requireOneof(),u=requireField(),s=requireMapfield(),e=requireService(),t=message,r=reader,n=writer,a=requireUtil(),d=requireEncoder(),f=requireDecoder(),m=requireVerifier(),l=requireConverter(),p=wrappers;function c(v,y){_.call(this,v,y),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(c.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var v=Object.keys(this.fields),y=0;y&lt;v.length;++y){var w=this.fields[v[y]],S=w.id;if(this._fieldsById[S])throw Error("duplicate id "+S+" in "+this);this._fieldsById[S]=w}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=a.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=a.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=c.generateConstructor(this)())},set:function(v){var y=v.prototype;y instanceof t||((v.prototype=new t).constructor=v,a.merge(v.prototype,y)),v.$type=v.prototype.$type=this,a.merge(v,t,!0),this._ctor=v;for(var w=0;w&lt;this.fieldsArray.length;++w)this._fieldsArray[w].resolve();var S={};for(w=0;w&lt;this.oneofsArray.length;++w)S[this._oneofsArray[w].resolve().name]={get:a.oneOfGetter(this._oneofsArray[w].oneof),set:a.oneOfSetter(this._oneofsArray[w].oneof)};w&amp;&amp;Object.defineProperties(v.prototype,S)}}}),c.generateConstructor=function(y){for(var w=a.codegen(["p"],y.name),S=0,A;S&lt;y.fieldsArray.length;++S)(A=y._fieldsArray[S]).map?w("this%s={}",a.safeProp(A.name)):A.repeated&amp;&amp;w("this%s=[]",a.safeProp(A.name));return w("if(p)for(var ks=Object.keys(p),i=0;i&lt;ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function b(v){return v._fieldsById=v._fieldsArray=v._oneofsArray=null,delete v.encode,delete v.decode,delete v.verify,v}return c.fromJSON=function(y,w){var S=new c(y,w.options);S.extensions=w.extensions,S.reserved=w.reserved;for(var A=Object.keys(w.fields),E=0;E&lt;A.length;++E)S.add((typeof w.fields[A[E]].keyType&lt;"u"?s.fromJSON:u.fromJSON)(A[E],w.fields[A[E]]));if(w.oneofs)for(A=Object.keys(w.oneofs),E=0;E&lt;A.length;++E)S.add(o.fromJSON(A[E],w.oneofs[A[E]]));if(w.nested)for(A=Object.keys(w.nested),E=0;E&lt;A.length;++E){var C=w.nested[A[E]];S.add((C.id!==void 0?u.fromJSON:C.fields!==void 0?c.fromJSON:C.values!==void 0?i.fromJSON:C.methods!==void 0?e.fromJSON:_.fromJSON)(A[E],C))}return w.extensions&amp;&amp;w.extensions.length&amp;&amp;(S.extensions=w.extensions),w.reserved&amp;&amp;w.reserved.length&amp;&amp;(S.reserved=w.reserved),w.group&amp;&amp;(S.group=!0),w.comment&amp;&amp;(S.comment=w.comment),S},c.prototype.toJSON=function(y){var w=_.prototype.toJSON.call(this,y),S=y?!!y.keepComments:!1;return a.toObject(["options",w&amp;&amp;w.options||void 0,"oneofs",_.arrayToJSON(this.oneofsArray,y),"fields",_.arrayToJSON(this.fieldsArray.filter(function(A){return!A.declaringField}),y)||{},"extensions",this.extensions&amp;&amp;this.extensions.length?this.extensions:void 0,"reserved",this.reserved&amp;&amp;this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",w&amp;&amp;w.nested||void 0,"comment",S?this.comment:void 0])},c.prototype.resolveAll=function(){for(var y=this.fieldsArray,w=0;w&lt;y.length;)y[w++].resolve();var S=this.oneofsArray;for(w=0;w&lt;S.length;)S[w++].resolve();return _.prototype.resolveAll.call(this)},c.prototype.get=function(y){return this.fields[y]||this.oneofs&amp;&amp;this.oneofs[y]||this.nested&amp;&amp;this.nested[y]||null},c.prototype.add=function(y){if(this.get(y.name))throw Error("duplicate name '"+y.name+"' in "+this);if(y instanceof u&amp;&amp;y.extend===void 0){if(this._fieldsById?this._fieldsById[y.id]:this.fieldsById[y.id])throw Error("duplicate id "+y.id+" in "+this);if(this.isReservedId(y.id))throw Error("id "+y.id+" is reserved in "+this);if(this.isReservedName(y.name))throw Error("name '"+y.name+"' is reserved in "+this);return y.parent&amp;&amp;y.parent.remove(y),this.fields[y.name]=y,y.message=this,y.onAdd(this),b(this)}return y instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[y.name]=y,y.onAdd(this),b(this)):_.prototype.add.call(this,y)},c.prototype.remove=function(y){if(y instanceof u&amp;&amp;y.extend===void 0){if(!this.fields||this.fields[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.fields[y.name],y.parent=null,y.onRemove(this),b(this)}if(y instanceof o){if(!this.oneofs||this.oneofs[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.oneofs[y.name],y.parent=null,y.onRemove(this),b(this)}return _.prototype.remove.call(this,y)},c.prototype.isReservedId=function(y){return _.isReservedId(this.reserved,y)},c.prototype.isReservedName=function(y){return _.isReservedName(this.reserved,y)},c.prototype.create=function(y){return new this.ctor(y)},c.prototype.setup=function(){for(var y=this.fullName,w=[],S=0;S&lt;this.fieldsArray.length;++S)w.push(this._fieldsArray[S].resolve().resolvedType);this.encode=d(this)({Writer:n,types:w,util:a}),this.decode=f(this)({Reader:r,types:w,util:a}),this.verify=m(this)({types:w,util:a}),this.fromObject=l.fromObject(this)({types:w,util:a}),this.toObject=l.toObject(this)({types:w,util:a});var A=p[y];if(A){var E=Object.create(this);E.fromObject=this.fromObject,this.fromObject=A.fromObject.bind(E),E.toObject=this.toObject,this.toObject=A.toObject.bind(E)}return this},c.prototype.encode=function(y,w){return this.setup().encode(y,w)},c.prototype.encodeDelimited=function(y,w){return this.encode(y,w&amp;&amp;w.len?w.fork():w).ldelim()},c.prototype.decode=function(y,w){return this.setup().decode(y,w)},c.prototype.decodeDelimited=function(y){return y instanceof r||(y=r.create(y)),this.decode(y,y.uint32())},c.prototype.verify=function(y){return this.setup().verify(y)},c.prototype.fromObject=function(y){return this.setup().fromObject(y)},c.prototype.toObject=function(y,w){return this.setup().toObject(y,w)},c.d=function(y){return function(S){a.decorateType(S,y)}},type}var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1,root=n;var _=requireNamespace();((n.prototype=Object.create(_.prototype)).constructor=n).className="Root";var i=requireField(),o=require_enum(),u=requireOneof(),s=requireUtil(),e,t,r;function n(m){_.call(this,"",m),this.deferred=[],this.files=[]}n.fromJSON=function(l,p){return p||(p=new n),l.options&amp;&amp;p.setOptions(l.options),p.addJSON(l.nested)},n.prototype.resolvePath=s.path.resolve,n.prototype.fetch=s.fetch;function a(){}n.prototype.load=function m(l,p,c){typeof p=="function"&amp;&amp;(c=p,p=void 0);var b=this;if(!c)return s.asPromise(m,b,l,p);var v=c===a;function y(T,U){if(c){if(v)throw T;var X=c;c=null,X(T,U)}}function w(T){var U=T.lastIndexOf("google/protobuf/");if(U&gt;-1){var X=T.substring(U);if(X in r)return X}return null}function S(T,U){try{if(s.isString(U)&amp;&amp;U.charAt(0)==="{"&amp;&amp;(U=JSON.parse(U)),!s.isString(U))b.setOptions(U.options).addJSON(U.nested);else{t.filename=T;var X=t(U,b,p),x,z=0;if(X.imports)for(;z&lt;X.imports.length;++z)(x=w(X.imports[z])||b.resolvePath(T,X.imports[z]))&amp;&amp;A(x);if(X.weakImports)for(z=0;z&lt;X.weakImports.length;++z)(x=w(X.weakImports[z])||b.resolvePath(T,X.weakImports[z]))&amp;&amp;A(x,!0)}}catch(g){y(g)}!v&amp;&amp;!E&amp;&amp;y(null,b)}function A(T,U){if(T=w(T)||T,!(b.files.indexOf(T)&gt;-1)){if(b.files.push(T),T in r){v?S(T,r[T]):(++E,setTimeout(function(){--E,S(T,r[T])}));return}if(v){var X;try{X=s.fs.readFileSync(T).toString("utf8")}catch(x){U||y(x);return}S(T,X)}else++E,b.fetch(T,function(x,z){if(--E,!!c){if(x){U?E||y(null,b):y(x);return}S(T,z)}})}}var E=0;s.isString(l)&amp;&amp;(l=[l]);for(var C=0,j;C&lt;l.length;++C)(j=b.resolvePath("",l[C]))&amp;&amp;A(j);if(v)return b;E||y(null,b)},n.prototype.loadSync=function(l,p){if(!s.isNode)throw Error("not supported");return this.load(l,p,a)},n.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(l){return"'extend "+l.extend+"' in "+l.parent.fullName}).join(", "));return _.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function f(m,l){var p=l.parent.lookup(l.extend);if(p){var c=new i(l.fullName,l.id,l.type,l.rule,void 0,l.options);return p.get(c.name)||(c.declaringField=l,l.extensionField=c,p.add(c)),!0}return!1}return n.prototype._handleAdd=function(l){if(l instanceof i)l.extend!==void 0&amp;&amp;!l.extensionField&amp;&amp;(f(this,l)||this.deferred.push(l));else if(l instanceof o)d.test(l.name)&amp;&amp;(l.parent[l.name]=l.values);else if(!(l instanceof u)){if(l instanceof e)for(var p=0;p&lt;this.deferred.length;)f(this,this.deferred[p])?this.deferred.splice(p,1):++p;for(var c=0;c&lt;l.nestedArray.length;++c)this._handleAdd(l._nestedArray[c]);d.test(l.name)&amp;&amp;(l.parent[l.name]=l)}},n.prototype._handleRemove=function(l){if(l instanceof i){if(l.extend!==void 0)if(l.extensionField)l.extensionField.parent.remove(l.extensionField),l.extensionField=null;else{var p=this.deferred.indexOf(l);p&gt;-1&amp;&amp;this.deferred.splice(p,1)}}else if(l instanceof o)d.test(l.name)&amp;&amp;delete l.parent[l.name];else if(l instanceof _){for(var c=0;c&lt;l.nestedArray.length;++c)this._handleRemove(l._nestedArray[c]);d.test(l.name)&amp;&amp;delete l.parent[l.name]}},n._configure=function(m,l,p){e=m,t=l,r=p},root}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$2.exports;hasRequiredUtil=1;var _=util$2.exports=requireMinimal(),i=roots,o,u;_.codegen=codegen_1,_.fetch=fetch_1,_.path=path,_.fs=_.inquire("fs"),_.toArray=function(a){if(a){for(var d=Object.keys(a),f=new Array(d.length),m=0;m&lt;d.length;)f[m]=a[d[m++]];return f}return[]},_.toObject=function(a){for(var d={},f=0;f&lt;a.length;){var m=a[f++],l=a[f++];l!==void 0&amp;&amp;(d[m]=l)}return d};var s=/\\/g,e=/"/g;_.isReserved=function(a){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(a)},_.safeProp=function(a){return!/^[$\w_]+$/.test(a)||_.isReserved(a)?'["'+a.replace(s,"\\\\").replace(e,'\\"')+'"]':"."+a},_.ucFirst=function(a){return a.charAt(0).toUpperCase()+a.substring(1)};var t=/_([a-z])/g;_.camelCase=function(a){return a.substring(0,1)+a.substring(1).replace(t,function(d,f){return f.toUpperCase()})},_.compareFieldsById=function(a,d){return a.id-d.id},_.decorateType=function(a,d){if(a.$type)return d&amp;&amp;a.$type.name!==d&amp;&amp;(_.decorateRoot.remove(a.$type),a.$type.name=d,_.decorateRoot.add(a.$type)),a.$type;o||(o=requireType());var f=new o(d||a.name);return _.decorateRoot.add(f),f.ctor=a,Object.defineProperty(a,"$type",{value:f,enumerable:!1}),Object.defineProperty(a.prototype,"$type",{value:f,enumerable:!1}),f};var r=0;return _.decorateEnum=function(a){if(a.$type)return a.$type;u||(u=require_enum());var d=new u("Enum"+r++,a);return _.decorateRoot.add(d),Object.defineProperty(a,"$type",{value:d,enumerable:!1}),d},_.setProperty=function(a,d,f){function m(l,p,c){var b=p.shift();if(b==="__proto__"||b==="prototype")return l;if(p.length&gt;0)l[b]=m(l[b]||{},p,c);else{var v=l[b];v&amp;&amp;(c=[].concat(v).concat(c)),l[b]=c}return l}if(typeof a!="object")throw TypeError("dst must be an object");if(!d)throw TypeError("path must be specified");return d=d.split("."),m(a,d,f)},Object.defineProperty(_,"decorateRoot",{get:function(){return i.decorated||(i.decorated=new(requireRoot()))}}),util$2.exports}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=o,o.className="ReflectionObject";var _=requireUtil(),i;function o(u,s){if(!_.isString(u))throw TypeError("name must be a string");if(s&amp;&amp;!_.isObject(s))throw TypeError("options must be an object");this.options=s,this.parsedOptions=null,this.name=u,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(o.prototype,{root:{get:function(){for(var u=this;u.parent!==null;)u=u.parent;return u}},fullName:{get:function(){for(var u=[this.name],s=this.parent;s;)u.unshift(s.name),s=s.parent;return u.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(s){this.parent&amp;&amp;this.parent!==s&amp;&amp;this.parent.remove(this),this.parent=s,this.resolved=!1;var e=s.root;e instanceof i&amp;&amp;e._handleAdd(this)},o.prototype.onRemove=function(s){var e=s.root;e instanceof i&amp;&amp;e._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved?this:(this.root instanceof i&amp;&amp;(this.resolved=!0),this)},o.prototype.getOption=function(s){if(this.options)return this.options[s]},o.prototype.setOption=function(s,e,t){return(!t||!this.options||this.options[s]===void 0)&amp;&amp;((this.options||(this.options={}))[s]=e),this},o.prototype.setParsedOption=function(s,e,t){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(t){var n=r.find(function(f){return Object.prototype.hasOwnProperty.call(f,s)});if(n){var a=n[s];_.setProperty(a,t,e)}else n={},n[s]=_.setProperty({},t,e),r.push(n)}else{var d={};d[s]=e,r.push(d)}return this},o.prototype.setOptions=function(s,e){if(s)for(var t=Object.keys(s),r=0;r&lt;t.length;++r)this.setOption(t[r],s[t[r]],e);return this},o.prototype.toString=function(){var s=this.constructor.className,e=this.fullName;return e.length?s+" "+e:s},o._configure=function(u){i=u},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=u;var _=requireObject();((u.prototype=Object.create(_.prototype)).constructor=u).className="Enum";var i=requireNamespace(),o=requireUtil();function u(s,e,t,r,n,a){if(_.call(this,s,t),e&amp;&amp;typeof e!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=n||{},this.valuesOptions=a,this.reserved=void 0,e)for(var d=Object.keys(e),f=0;f&lt;d.length;++f)typeof e[d[f]]=="number"&amp;&amp;(this.valuesById[this.values[d[f]]=e[d[f]]]=d[f])}return u.fromJSON=function(e,t){var r=new u(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},u.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return o.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&amp;&amp;this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},u.prototype.add=function(e,t,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(this.values[e]!==void 0)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[t]!==void 0){if(!(this.options&amp;&amp;this.options.allow_alias))throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&amp;&amp;(this.valuesOptions===void 0&amp;&amp;(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},u.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(t==null)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&amp;&amp;delete this.valuesOptions[e],this},u.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},u.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=s;var _=require_enum(),i=requireTypes(),o=requireUtil();function u(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id&lt;&lt;3|3)&gt;&gt;&gt;0,(t.id&lt;&lt;3|4)&gt;&gt;&gt;0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id&lt;&lt;3|2)&gt;&gt;&gt;0)}function s(e){for(var t=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),r,n,a=e.fieldsArray.slice().sort(o.compareFieldsById),r=0;r&lt;a.length;++r){var d=a[r].resolve(),f=e._fieldsArray.indexOf(d),m=d.resolvedType instanceof _?"int32":d.type,l=i.basic[m];n="m"+o.safeProp(d.name),d.map?(t("if(%s!=null&amp;&amp;Object.hasOwnProperty.call(m,%j)){",n,d.name)("for(var ks=Object.keys(%s),i=0;i&lt;ks.length;++i){",n)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(d.id&lt;&lt;3|2)&gt;&gt;&gt;0,8|i.mapKey[d.keyType],d.keyType),l===void 0?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",f,n):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,m,n),t("}")("}")):d.repeated?(t("if(%s!=null&amp;&amp;%s.length){",n,n),d.packed&amp;&amp;i.packed[m]!==void 0?t("w.uint32(%i).fork()",(d.id&lt;&lt;3|2)&gt;&gt;&gt;0)("for(var i=0;i&lt;%s.length;++i)",n)("w.%s(%s[i])",m,n)("w.ldelim()"):(t("for(var i=0;i&lt;%s.length;++i)",n),l===void 0?u(t,d,f,n+"[i]"):t("w.uint32(%i).%s(%s[i])",(d.id&lt;&lt;3|l)&gt;&gt;&gt;0,m,n)),t("}")):(d.optional&amp;&amp;t("if(%s!=null&amp;&amp;Object.hasOwnProperty.call(m,%j))",n,d.name),l===void 0?u(t,d,f,n):t("w.uint32(%i).%s(%s)",(d.id&lt;&lt;3|l)&gt;&gt;&gt;0,m,n))}return t("return w")}return encoder_1}var protobuf$2=indexLight.exports=indexMinimal;protobuf$2.build="light";function load(_,i,o){return typeof i=="function"?(o=i,i=new protobuf$2.Root):i||(i=new protobuf$2.Root),i.load(_,o)}protobuf$2.load=load;function loadSync(_,i){return i||(i=new protobuf$2.Root),i.loadSync(_)}protobuf$2.loadSync=loadSync;protobuf$2.encoder=requireEncoder();protobuf$2.decoder=requireDecoder();protobuf$2.verifier=requireVerifier();protobuf$2.converter=requireConverter();protobuf$2.ReflectionObject=requireObject();protobuf$2.Namespace=requireNamespace();protobuf$2.Root=requireRoot();protobuf$2.Enum=require_enum();protobuf$2.Type=requireType();protobuf$2.Field=requireField();protobuf$2.OneOf=requireOneof();protobuf$2.MapField=requireMapfield();protobuf$2.Service=requireService();protobuf$2.Method=requireMethod();protobuf$2.Message=message;protobuf$2.wrappers=wrappers;protobuf$2.types=requireTypes();protobuf$2.util=requireUtil();protobuf$2.ReflectionObject._configure(protobuf$2.Root);protobuf$2.Namespace._configure(protobuf$2.Type,protobuf$2.Service,protobuf$2.Enum);protobuf$2.Root._configure(protobuf$2.Type);protobuf$2.Field._configure(protobuf$2.Type);var indexLightExports=indexLight.exports,tokenize_1=tokenize$1,delimRe=/[\s{}=;:[\],'"()&lt;&gt;]/g,stringDoubleRe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,stringSingleRe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,setCommentRe=/^ *[*/]+ */,setCommentAltRe=/^\s*\*?\/*/,setCommentSplitRe=/\n/g,whitespaceRe=/\s/,unescapeRe=/\\(.?)/g,unescapeMap={0:"\0",r:"\r",n:`
`,t:"	"};function unescape(_){return _.replace(unescapeRe,function(i,o){switch(o){case"\\":case"":return o;default:return unescapeMap[o]||""}})}tokenize$1.unescape=unescape;function tokenize$1(_,i){_=_.toString();var o=0,u=_.length,s=1,e=0,t={},r=[],n=null;function a(S){return Error("illegal "+S+" (line "+s+")")}function d(){var S=n==="'"?stringSingleRe:stringDoubleRe;S.lastIndex=o-1;var A=S.exec(_);if(!A)throw a("string");return o=S.lastIndex,b(n),n=null,unescape(A[1])}function f(S){return _.charAt(S)}function m(S,A,E){var C={type:_.charAt(S++),lineEmpty:!1,leading:E},j;i?j=2:j=3;var T=S-j,U;do if(--T&lt;0||(U=_.charAt(T))===`
`){C.lineEmpty=!0;break}while(U===" "||U==="	");for(var X=_.substring(S,A).split(setCommentSplitRe),x=0;x&lt;X.length;++x)X[x]=X[x].replace(i?setCommentAltRe:setCommentRe,"").trim();C.text=X.join(`
`).trim(),t[s]=C,e=s}function l(S){var A=p(S),E=_.substring(S,A),C=/^\s*\/\//.test(E);return C}function p(S){for(var A=S;A&lt;u&amp;&amp;f(A)!==`
`;)A++;return A}function c(){if(r.length&gt;0)return r.shift();if(n)return d();var S,A,E,C,j,T=o===0;do{if(o===u)return null;for(S=!1;whitespaceRe.test(E=f(o));)if(E===`
`&amp;&amp;(T=!0,++s),++o===u)return null;if(f(o)==="/"){if(++o===u)throw a("comment");if(f(o)==="/")if(i){if(C=o,j=!1,l(o-1)){j=!0;do if(o=p(o),o===u||(o++,!T))break;while(l(o))}else o=Math.min(u,p(o)+1);j&amp;&amp;(m(C,o,T),T=!0),s++,S=!0}else{for(j=f(C=o+1)==="/";f(++o)!==`
`;)if(o===u)return null;++o,j&amp;&amp;(m(C,o-1,T),T=!0),++s,S=!0}else if((E=f(o))==="*"){C=o+1,j=i||f(C)==="*";do{if(E===`
`&amp;&amp;++s,++o===u)throw a("comment");A=E,E=f(o)}while(A!=="*"||E!=="/");++o,j&amp;&amp;(m(C,o-2,T),T=!0),S=!0}else return"/"}}while(S);var U=o;delimRe.lastIndex=0;var X=delimRe.test(f(U++));if(!X)for(;U&lt;u&amp;&amp;!delimRe.test(f(U));)++U;var x=_.substring(o,o=U);return(x==='"'||x==="'")&amp;&amp;(n=x),x}function b(S){r.push(S)}function v(){if(!r.length){var S=c();if(S===null)return null;b(S)}return r[0]}function y(S,A){var E=v(),C=E===S;if(C)return c(),!0;if(!A)throw a("token '"+E+"', '"+S+"' expected");return!1}function w(S){var A=null,E;return S===void 0?(E=t[s-1],delete t[s-1],E&amp;&amp;(i||E.type==="*"||E.lineEmpty)&amp;&amp;(A=E.leading?E.text:null)):(e&lt;S&amp;&amp;v(),E=t[S],delete t[S],E&amp;&amp;!E.lineEmpty&amp;&amp;(i||E.type==="/")&amp;&amp;(A=E.leading?null:E.text)),A}return Object.defineProperty({next:c,peek:v,push:b,skip:y,cmnt:w},"line",{get:function(){return s}})}var parse_1=parse;parse.filename=null;parse.defaults={keepCase:!1};var tokenize=tokenize_1,Root=requireRoot(),Type=requireType(),Field=requireField(),MapField=requireMapfield(),OneOf=requireOneof(),Enum=require_enum(),Service=requireService(),Method=requireMethod(),types=requireTypes(),util=requireUtil(),base10Re=/^[1-9][0-9]*$/,base10NegRe=/^-?[1-9][0-9]*$/,base16Re=/^0[x][0-9a-fA-F]+$/,base16NegRe=/^-?0[x][0-9a-fA-F]+$/,base8Re=/^0[0-7]+$/,base8NegRe=/^-?0[0-7]+$/,numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,nameRe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,fqTypeRefRe=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function parse(_,i,o){i instanceof Root||(o=i,i=new Root),o||(o=parse.defaults);var u=o.preferTrailingComment||!1,s=tokenize(_,o.alternateCommentMode||!1),e=s.next,t=s.push,r=s.peek,n=s.skip,a=s.cmnt,d=!0,f,m,l,p,c=!1,b=i,v=o.keepCase?function(D){return D}:util.camelCase;function y(D,F,M){var Q=parse.filename;return M||(parse.filename=null),Error("illegal "+(F||"token")+" '"+D+"' ("+(Q?Q+", ":"")+"line "+s.line+")")}function w(){var D=[],F;do{if((F=e())!=='"'&amp;&amp;F!=="'")throw y(F);D.push(e()),n(F),F=r()}while(F==='"'||F==="'");return D.join("")}function S(D){var F=e();switch(F){case"'":case'"':return t(F),w();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return E(F,!0)}catch{if(D&amp;&amp;typeRefRe.test(F))return F;throw y(F,"value")}}function A(D,F){var M,Q;do F&amp;&amp;((M=r())==='"'||M==="'")?D.push(w()):D.push([Q=C(e()),n("to",!0)?C(e()):Q]);while(n(",",!0));var K={options:void 0};K.setOption=function(h,N){this.options===void 0&amp;&amp;(this.options={}),this.options[h]=N},x(K,function(N){if(N==="option")te(K,N),n(";");else throw y(N)},function(){Y(K)})}function E(D,F){var M=1;switch(D.charAt(0)==="-"&amp;&amp;(M=-1,D=D.substring(1)),D){case"inf":case"INF":case"Inf":return M*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(base10Re.test(D))return M*parseInt(D,10);if(base16Re.test(D))return M*parseInt(D,16);if(base8Re.test(D))return M*parseInt(D,8);if(numberRe.test(D))return M*parseFloat(D);throw y(D,"number",F)}function C(D,F){switch(D){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!F&amp;&amp;D.charAt(0)==="-")throw y(D,"id");if(base10NegRe.test(D))return parseInt(D,10);if(base16NegRe.test(D))return parseInt(D,16);if(base8NegRe.test(D))return parseInt(D,8);throw y(D,"id")}function j(){if(f!==void 0)throw y("package");if(f=e(),!typeRefRe.test(f))throw y(f,"name");b=b.define(f),n(";")}function T(){var D=r(),F;switch(D){case"weak":F=l||(l=[]),e();break;case"public":e();default:F=m||(m=[]);break}D=w(),n(";"),F.push(D)}function U(){if(n("="),p=w(),c=p==="proto3",!c&amp;&amp;p!=="proto2")throw y(p,"syntax");i.setOption("syntax",p),n(";")}function X(D,F){switch(F){case"option":return te(D,F),n(";"),!0;case"message":return z(D,F),!0;case"enum":return se(D,F),!0;case"service":return G(D,F),!0;case"extend":return he(D,F),!0}return!1}function x(D,F,M){var Q=s.line;if(D&amp;&amp;(typeof D.comment!="string"&amp;&amp;(D.comment=a()),D.filename=parse.filename),n("{",!0)){for(var K;(K=e())!=="}";)F(K);n(";",!0)}else M&amp;&amp;M(),n(";"),D&amp;&amp;(typeof D.comment!="string"||u)&amp;&amp;(D.comment=a(Q)||D.comment)}function z(D,F){if(!nameRe.test(F=e()))throw y(F,"type name");var M=new Type(F);x(M,function(K){if(!X(M,K))switch(K){case"map":oe(M);break;case"required":case"repeated":g(M,K);break;case"optional":c?g(M,"proto3_optional"):g(M,"optional");break;case"oneof":J(M,K);break;case"extensions":A(M.extensions||(M.extensions=[]));break;case"reserved":A(M.reserved||(M.reserved=[]),!0);break;default:if(!c||!typeRefRe.test(K))throw y(K);t(K),g(M,"optional");break}}),D.add(M)}function g(D,F,M){var Q=e();if(Q==="group"){q(D,F);return}for(;Q.endsWith(".")||r().startsWith(".");)Q+=e();if(!typeRefRe.test(Q))throw y(Q,"type");var K=e();if(!nameRe.test(K))throw y(K,"name");K=v(K),n("=");var h=new Field(K,C(e()),Q,F,M);if(x(h,function(O){if(O==="option")te(h,O),n(";");else throw y(O)},function(){Y(h)}),F==="proto3_optional"){var N=new OneOf("_"+K);h.setOption("proto3_optional",!0),N.add(h),D.add(N)}else D.add(h);!c&amp;&amp;h.repeated&amp;&amp;(types.packed[Q]!==void 0||types.basic[Q]===void 0)&amp;&amp;h.setOption("packed",!1,!0)}function q(D,F){var M=e();if(!nameRe.test(M))throw y(M,"name");var Q=util.lcFirst(M);M===Q&amp;&amp;(M=util.ucFirst(M)),n("=");var K=C(e()),h=new Type(M);h.group=!0;var N=new Field(Q,K,M,F);N.filename=parse.filename,x(h,function(O){switch(O){case"option":te(h,O),n(";");break;case"required":case"repeated":g(h,O);break;case"optional":c?g(h,"proto3_optional"):g(h,"optional");break;case"message":z(h,O);break;case"enum":se(h,O);break;default:throw y(O)}}),D.add(h).add(N)}function oe(D){n("&lt;");var F=e();if(types.mapKey[F]===void 0)throw y(F,"type");n(",");var M=e();if(!typeRefRe.test(M))throw y(M,"type");n("&gt;");var Q=e();if(!nameRe.test(Q))throw y(Q,"name");n("=");var K=new MapField(v(Q),C(e()),F,M);x(K,function(N){if(N==="option")te(K,N),n(";");else throw y(N)},function(){Y(K)}),D.add(K)}function J(D,F){if(!nameRe.test(F=e()))throw y(F,"name");var M=new OneOf(v(F));x(M,function(K){K==="option"?(te(M,K),n(";")):(t(K),g(M,"optional"))}),D.add(M)}function se(D,F){if(!nameRe.test(F=e()))throw y(F,"name");var M=new Enum(F);x(M,function(K){switch(K){case"option":te(M,K),n(";");break;case"reserved":A(M.reserved||(M.reserved=[]),!0);break;default:Z(M,K)}}),D.add(M)}function Z(D,F){if(!nameRe.test(F))throw y(F,"name");n("=");var M=C(e(),!0),Q={options:void 0};Q.setOption=function(K,h){this.options===void 0&amp;&amp;(this.options={}),this.options[K]=h},x(Q,function(h){if(h==="option")te(Q,h),n(";");else throw y(h)},function(){Y(Q)}),D.add(F,M,Q.comment,Q.options)}function te(D,F){var M=n("(",!0);if(!typeRefRe.test(F=e()))throw y(F,"name");var Q=F,K=Q,h;M&amp;&amp;(n(")"),Q="("+Q+")",K=Q,F=r(),fqTypeRefRe.test(F)&amp;&amp;(h=F.slice(1),Q+=F,e())),n("=");var N=I(D,Q);re(D,K,N,h)}function I(D,F){if(n("{",!0)){for(var M={};!n("}",!0);){if(!nameRe.test(ie=e()))throw y(ie,"name");if(ie===null)throw y(ie,"end of input");var Q,K=ie;if(n(":",!0),r()==="{")Q=I(D,F+"."+ie);else if(r()==="["){Q=[];var h;if(n("[",!0)){do h=S(!0),Q.push(h);while(n(",",!0));n("]"),typeof h&lt;"u"&amp;&amp;P(D,F+"."+ie,h)}}else Q=S(!0),P(D,F+"."+ie,Q);var N=M[K];N&amp;&amp;(Q=[].concat(N).concat(Q)),M[K]=Q,n(",",!0),n(";",!0)}return M}var B=S(!0);return P(D,F,B),B}function P(D,F,M){D.setOption&amp;&amp;D.setOption(F,M)}function re(D,F,M,Q){D.setParsedOption&amp;&amp;D.setParsedOption(F,M,Q)}function Y(D){if(n("[",!0)){do te(D,"option");while(n(",",!0));n("]")}return D}function G(D,F){if(!nameRe.test(F=e()))throw y(F,"service name");var M=new Service(F);x(M,function(K){if(!X(M,K))if(K==="rpc")le(M,K);else throw y(K)}),D.add(M)}function le(D,F){var M=a(),Q=F;if(!nameRe.test(F=e()))throw y(F,"name");var K=F,h,N,B,O;if(n("("),n("stream",!0)&amp;&amp;(N=!0),!typeRefRe.test(F=e())||(h=F,n(")"),n("returns"),n("("),n("stream",!0)&amp;&amp;(O=!0),!typeRefRe.test(F=e())))throw y(F);B=F,n(")");var k=new Method(K,Q,h,B,N,O);k.comment=M,x(k,function(L){if(L==="option")te(k,L),n(";");else throw y(L)}),D.add(k)}function he(D,F){if(!typeRefRe.test(F=e()))throw y(F,"reference");var M=F;x(null,function(K){switch(K){case"required":case"repeated":g(D,K,M);break;case"optional":c?g(D,"proto3_optional",M):g(D,"optional",M);break;default:if(!c||!typeRefRe.test(K))throw y(K);t(K),g(D,"optional",M);break}})}for(var ie;(ie=e())!==null;)switch(ie){case"package":if(!d)throw y(ie);j();break;case"import":if(!d)throw y(ie);T();break;case"syntax":if(!d)throw y(ie);U();break;case"option":te(b,ie),n(";");break;default:if(X(b,ie)){d=!1;continue}throw y(ie)}return parse.filename=null,{package:f,imports:m,weakImports:l,syntax:p,root:i}}var common_1=common,commonRe=/\/|\./;function common(_,i){commonRe.test(_)||(_="google/protobuf/"+_+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),common[_]=i}common("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var timeType;common("duration",{Duration:timeType={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});common("timestamp",{Timestamp:timeType});common("empty",{Empty:{fields:{}}});common("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});common("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});common("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});common.get=function _(i){return common[i]||null};var protobuf$1=src.exports=indexLightExports;protobuf$1.build="full";protobuf$1.tokenize=tokenize_1;protobuf$1.parse=parse_1;protobuf$1.common=common_1;protobuf$1.Root._configure(protobuf$1.Type,protobuf$1.parse,protobuf$1.common);var srcExports=src.exports,protobufjs=srcExports;const protobuf=getDefaultExportFromCjs(protobufjs),nested={project:{nested:{monitor:{oneofs:{_id:{oneof:["id"]},_mode:{oneof:["mode"]},_opcode:{oneof:["opcode"]},_spriteName:{oneof:["spriteName"]},_value:{oneof:["value"]},_width:{oneof:["width"]},_height:{oneof:["height"]},_x:{oneof:["x"]},_y:{oneof:["y"]},_visible:{oneof:["visible"]},_sliderMin:{oneof:["sliderMin"]},_sliderMax:{oneof:["sliderMax"]},_isDiscrete:{oneof:["isDiscrete"]}},fields:{id:{type:"string",id:1,options:{proto3_optional:!0}},mode:{type:"string",id:2,options:{proto3_optional:!0}},opcode:{type:"string",id:3,options:{proto3_optional:!0}},params:{keyType:"string",type:"string",id:4},spriteName:{type:"string",id:5,options:{proto3_optional:!0}},value:{type:"string",id:6,options:{proto3_optional:!0}},width:{type:"int32",id:7,options:{proto3_optional:!0}},height:{type:"int32",id:8,options:{proto3_optional:!0}},x:{type:"int32",id:9,options:{proto3_optional:!0}},y:{type:"int32",id:10,options:{proto3_optional:!0}},visible:{type:"bool",id:11,options:{proto3_optional:!0}},sliderMin:{type:"int32",id:12,options:{proto3_optional:!0}},sliderMax:{type:"int32",id:13,options:{proto3_optional:!0}},isDiscrete:{type:"bool",id:14,options:{proto3_optional:!0}}}},font:{oneofs:{_system:{oneof:["system"]},_family:{oneof:["family"]},_fallback:{oneof:["fallback"]},_md5ext:{oneof:["md5ext"]}},fields:{system:{type:"bool",id:1,options:{proto3_optional:!0}},family:{type:"string",id:2,options:{proto3_optional:!0}},fallback:{type:"string",id:3,options:{proto3_optional:!0}},md5ext:{type:"string",id:4,options:{proto3_optional:!0}}}},extensionData:{oneofs:{_data:{oneof:["data"]},_parse:{oneof:["parse"]}},fields:{data:{type:"string",id:1,options:{proto3_optional:!0}},parse:{type:"bool",id:2,options:{proto3_optional:!0}}}},Project:{oneofs:{_metaSemver:{oneof:["metaSemver"]},_metaVm:{oneof:["metaVm"]},_agent:{oneof:["agent"]}},fields:{metaSemver:{type:"string",id:1,options:{proto3_optional:!0}},metaVm:{type:"string",id:2,options:{proto3_optional:!0}},agent:{type:"string",id:3,options:{proto3_optional:!0}},targets:{rule:"repeated",type:"Sprite.Sprite",id:4},monitors:{rule:"repeated",type:"monitor",id:5},antiSigmaExtensionData:{keyType:"string",type:"string",id:6},extensionData:{keyType:"string",type:"extensionData",id:10},extensions:{rule:"repeated",type:"string",id:7},extensionURLs:{keyType:"string",type:"string",id:8},fonts:{rule:"repeated",type:"font",id:9}}}}},Sprite:{nested:{_varValue:{oneofs:{_name:{oneof:["name"]},_value:{oneof:["value"]}},fields:{name:{type:"string",id:1,options:{proto3_optional:!0}},value:{type:"string",id:2,options:{proto3_optional:!0}}}},_listValue:{oneofs:{_name:{oneof:["name"]}},fields:{name:{type:"string",id:1,options:{proto3_optional:!0}},value:{rule:"repeated",type:"string",id:2}}},_mutation:{oneofs:{_tagName:{oneof:["tagName"]},_proccode:{oneof:["proccode"]},_argumentids:{oneof:["argumentids"]},_argumentnames:{oneof:["argumentnames"]},_argumentdefaults:{oneof:["argumentdefaults"]},_warp:{oneof:["warp"]},__returns:{oneof:["_returns"]},_edited:{oneof:["edited"]},_optype:{oneof:["optype"]},_color:{oneof:["color"]}},fields:{tagName:{type:"string",id:1,options:{proto3_optional:!0}},proccode:{type:"string",id:3,options:{proto3_optional:!0}},argumentids:{type:"string",id:4,options:{proto3_optional:!0}},argumentnames:{type:"string",id:5,options:{proto3_optional:!0}},argumentdefaults:{type:"string",id:6,options:{proto3_optional:!0}},warp:{type:"bool",id:7,options:{proto3_optional:!0}},_returns:{type:"string",id:8,options:{proto3_optional:!0}},edited:{type:"bool",id:9,options:{proto3_optional:!0}},optype:{type:"string",id:10,options:{proto3_optional:!0}},color:{type:"string",id:11,options:{proto3_optional:!0}}}},var_reporter_block:{oneofs:{_first_num:{oneof:["first_num"]},_name:{oneof:["name"]},_id:{oneof:["id"]},_second_num:{oneof:["second_num"]},_third_num:{oneof:["third_num"]}},fields:{first_num:{type:"int32",id:1,options:{proto3_optional:!0}},name:{type:"string",id:2,options:{proto3_optional:!0}},id:{type:"string",id:3,options:{proto3_optional:!0}},second_num:{type:"int32",id:4,options:{proto3_optional:!0}},third_num:{type:"int32",id:5,options:{proto3_optional:!0}}}},block:{oneofs:{_opcode:{oneof:["opcode"]},_next:{oneof:["next"]},_parent:{oneof:["parent"]},_shadow:{oneof:["shadow"]},_topLevel:{oneof:["topLevel"]},_x:{oneof:["x"]},_y:{oneof:["y"]},_mutation:{oneof:["mutation"]},_is_variable_reporter:{oneof:["is_variable_reporter"]},_varReporterBlock:{oneof:["varReporterBlock"]}},fields:{opcode:{type:"string",id:1,options:{proto3_optional:!0}},next:{type:"string",id:2,options:{proto3_optional:!0}},parent:{type:"string",id:3,options:{proto3_optional:!0}},inputs:{keyType:"string",type:"string",id:4},fields:{keyType:"string",type:"string",id:5},shadow:{type:"bool",id:6,options:{proto3_optional:!0}},topLevel:{type:"bool",id:7,options:{proto3_optional:!0}},x:{type:"int32",id:8,options:{proto3_optional:!0}},y:{type:"int32",id:9,options:{proto3_optional:!0}},mutation:{type:"_mutation",id:10,options:{proto3_optional:!0}},is_variable_reporter:{type:"bool",id:11,options:{proto3_optional:!0}},varReporterBlock:{type:"var_reporter_block",id:12,options:{proto3_optional:!0}}}},comment:{oneofs:{_blockId:{oneof:["blockId"]},_x:{oneof:["x"]},_y:{oneof:["y"]},_width:{oneof:["width"]},_height:{oneof:["height"]},_minimized:{oneof:["minimized"]},_text:{oneof:["text"]}},fields:{blockId:{type:"string",id:1,options:{proto3_optional:!0}},x:{type:"float",id:2,options:{proto3_optional:!0}},y:{type:"float",id:3,options:{proto3_optional:!0}},width:{type:"int32",id:4,options:{proto3_optional:!0}},height:{type:"int32",id:5,options:{proto3_optional:!0}},minimized:{type:"bool",id:6,options:{proto3_optional:!0}},text:{type:"string",id:7,options:{proto3_optional:!0}}}},costume:{oneofs:{_name:{oneof:["name"]},_bitmapResolution:{oneof:["bitmapResolution"]},_dataFormat:{oneof:["dataFormat"]},_assetId:{oneof:["assetId"]},_md5ext:{oneof:["md5ext"]},_rotationCenterX:{oneof:["rotationCenterX"]},_rotationCenterY:{oneof:["rotationCenterY"]}},fields:{name:{type:"string",id:1,options:{proto3_optional:!0}},bitmapResolution:{type:"int32",id:2,options:{proto3_optional:!0}},dataFormat:{type:"string",id:3,options:{proto3_optional:!0}},assetId:{type:"string",id:4,options:{proto3_optional:!0}},md5ext:{type:"string",id:5,options:{proto3_optional:!0}},rotationCenterX:{type:"double",id:6,options:{proto3_optional:!0}},rotationCenterY:{type:"double",id:7,options:{proto3_optional:!0}}}},sound:{oneofs:{_name:{oneof:["name"]},_assetId:{oneof:["assetId"]},_dataFormat:{oneof:["dataFormat"]},_rate:{oneof:["rate"]},_sampleCount:{oneof:["sampleCount"]},_md5ext:{oneof:["md5ext"]}},fields:{name:{type:"string",id:1,options:{proto3_optional:!0}},assetId:{type:"string",id:2,options:{proto3_optional:!0}},dataFormat:{type:"string",id:3,options:{proto3_optional:!0}},rate:{type:"int32",id:4,options:{proto3_optional:!0}},sampleCount:{type:"int32",id:5,options:{proto3_optional:!0}},md5ext:{type:"string",id:6,options:{proto3_optional:!0}}}},customVar:{oneofs:{_type:{oneof:["type"]},_id:{oneof:["id"]},_name:{oneof:["name"]},_value:{oneof:["value"]}},fields:{type:{type:"string",id:1,options:{proto3_optional:!0}},id:{type:"string",id:2,options:{proto3_optional:!0}},name:{type:"string",id:3,options:{proto3_optional:!0}},value:{type:"string",id:4,options:{proto3_optional:!0}}}},Sprite:{oneofs:{_id:{oneof:["id"]},_isStage:{oneof:["isStage"]},_name:{oneof:["name"]},_currentCostume:{oneof:["currentCostume"]},_volume:{oneof:["volume"]},_layerOrder:{oneof:["layerOrder"]},_x:{oneof:["x"]},_y:{oneof:["y"]},_size:{oneof:["size"]},_direction:{oneof:["direction"]},_draggable:{oneof:["draggable"]},_rotationStyle:{oneof:["rotationStyle"]},_tempo:{oneof:["tempo"]},_videoTransparency:{oneof:["videoTransparency"]},_videoState:{oneof:["videoState"]},_textToSpeechLanguage:{oneof:["textToSpeechLanguage"]},_visible:{oneof:["visible"]}},fields:{id:{type:"string",id:1,options:{proto3_optional:!0}},isStage:{type:"bool",id:2,options:{proto3_optional:!0}},name:{type:"string",id:3,options:{proto3_optional:!0}},variables:{keyType:"string",type:"_varValue",id:4},lists:{keyType:"string",type:"_listValue",id:5},broadcasts:{keyType:"string",type:"string",id:6},customVars:{rule:"repeated",type:"customVar",id:7},blocks:{keyType:"string",type:"block",id:8},comments:{keyType:"string",type:"comment",id:9},currentCostume:{type:"int32",id:10,options:{proto3_optional:!0}},costumes:{rule:"repeated",type:"costume",id:11},sounds:{rule:"repeated",type:"sound",id:12},volume:{type:"int32",id:13,options:{proto3_optional:!0}},layerOrder:{type:"int32",id:14,options:{proto3_optional:!0}},x:{type:"int32",id:15,options:{proto3_optional:!0}},y:{type:"int32",id:16,options:{proto3_optional:!0}},size:{type:"int32",id:17,options:{proto3_optional:!0}},direction:{type:"int32",id:18,options:{proto3_optional:!0}},draggable:{type:"bool",id:19,options:{proto3_optional:!0}},rotationStyle:{type:"string",id:20,options:{proto3_optional:!0}},tempo:{type:"int32",id:21,options:{proto3_optional:!0}},videoTransparency:{type:"int32",id:22,options:{proto3_optional:!0}},videoState:{type:"string",id:23,options:{proto3_optional:!0}},textToSpeechLanguage:{type:"string",id:24,options:{proto3_optional:!0}},visible:{type:"bool",id:25,options:{proto3_optional:!0}}}}}}},jsonDescriptor={nested};let OriginApiUrl=PUBLIC_API_URL,protobufRoot=protobuf.Root.fromJSON(jsonDescriptor),project=protobufRoot.lookupType("project.Project");function MB(_){const i=_&gt;&gt;10&amp;1023,o=_&gt;&gt;20&amp;1023;return _&gt;&gt;30&amp;1023?`${(_/1024/1024/1024).toFixed(2)}GB`:o?`${(_/1024/1024).toFixed(2)}MB`:i?`${(_/1024).toFixed(2)}KB`:`${_}B`}const me=class me{constructor(i,o){this.token=i,this.username=o}static getServerInfo(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/misc/getStats`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{o(t)})}).catch(e=&gt;{u(e)})})}static getUsernameById(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/getusername?ID=${i}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{o(t.username)})}).catch(e=&gt;{u(e)})})}static getUserBadges(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/getBadges?username=${i}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{o(t.badges)})}).catch(e=&gt;{u(e)})})}static getFollowerCount(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/meta/getfollowercount?username=${i}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.text().then(t=&gt;{o(Number(t))})}).catch(e=&gt;{u(e)})})}static getProfile(i,o){return new Promise((u,s)=&gt;{const e=`${OriginApiUrl}/api/v1/users/profile?target=${i}${o?"&amp;bio=true":""}&amp;username=${localStorage.getItem("username")}&amp;token=${localStorage.getItem("token")}`;fetch(e).then(t=&gt;{if(!t.ok){t.text().then(s);return}t.json().then(r=&gt;{u(r)})}).catch(t=&gt;{s(t)})})}static async isDonator(i){if(i in me.CachedDonators)return me.CachedDonators[i];const o=await me.getUserBadges(i);return me.CachedDonators[i]=o.includes("donator"),o.includes("donator")}static getProjects(i,o){return new Promise((u,s)=&gt;{const t=`${OriginApiUrl}/api/v1/projects/getprojects?page=${i}${o?"&amp;reverse=true":""}`;fetch(t).then(r=&gt;{if(!r.ok){r.text().then(s);return}r.json().then(n=&gt;{u(n)})}).catch(r=&gt;{s(r)})})}getRemovedProjects(){throw new Error("Unapproved Projects can only be viewed in a client")}static getUserProjects(i,o){return new Promise((u,s)=&gt;{const e=`${OriginApiUrl}/api/v1/projects/getprojectsbyauthor?page=${o}&amp;authorUsername=${i}`;fetch(e).then(t=&gt;{if(!t.ok){t.text().then(s);return}t.json().then(r=&gt;{u(r)})}).catch(t=&gt;{s(t)})})}static getMyProjects(i){const o=localStorage.getItem("username"),u=localStorage.getItem("token");return new Promise((s,e)=&gt;{const t=`${OriginApiUrl}/api/v1/projects/getmyprojects?page=${i}&amp;username=${o}&amp;token=${u}`;fetch(t).then(r=&gt;{if(!r.ok){r.text().then(e);return}r.json().then(n=&gt;{s(n)})}).catch(r=&gt;{e(r)})})}async getFrontPage(){return new Promise((i,o)=&gt;{const u=`${OriginApiUrl}/api/v1/projects/frontpage?username=${this.username}&amp;token=${this.token}`;fetch(u).then(s=&gt;{if(!s.ok){s.text().then(o);return}s.json().then(e=&gt;{i(e)})}).catch(s=&gt;{o(s)})})}static getProjectMeta(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/projects/getproject?projectID=${i}&amp;requestType=metadata`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{o(t)})}).catch(e=&gt;{u(e)})})}static getProjectThumbnail(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/projects/getproject?projectID=${i}&amp;requestType=thumbnail`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.blob().then(o)}).catch(e=&gt;{u(e)})})}static getProjectRemixes(i,o=0){return new Promise((u,s)=&gt;{const e=`${OriginApiUrl}/api/v1/projects/getremixes?id=${i}&amp;page=${o}`;fetch(e).then(t=&gt;{if(!t.ok){t.text().then(s);return}t.json().then(r=&gt;{u(r.projects)})}).catch(t=&gt;{s(t)})})}static getProjectFile(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/projects/getprojectwrapper?projectId=${i}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}return e.json()}).then(e=&gt;{const t=new Uint8Array(e.project.data),r=this.prototype.protobufToJson(t);let n=new JSZip;n.file("project.json",JSON.stringify(r));for(const d of e.assets)n.file(d.id,new Uint8Array(d.buffer.data).buffer);return n.generateAsync({type:"arraybuffer"})}).then(e=&gt;{o(e)}).catch(e=&gt;{u(e)})})}async downloadHardRejectedProject(i){return new Promise(((o,u)=&gt;{const s=`project=${i}&amp;username=${this.username}&amp;token=${this.token}`,e=`${OriginApiUrl}/api/v1/projects/downloadHardReject?${s}`;fetch(e).then(t=&gt;{if(!t.ok){t.text().then(u);return}return t.json()}).then((t=&gt;{const r=new Uint8Array(t.project.data),n=this.protobufToJson(r);let a=new JSZip;a.file("project.json",JSON.stringify(n));for(const f of t.assets)a.file(f.id,new Uint8Array(f.buffer.data).buffer);return a.generateAsync({type:"arraybuffer"})}).bind(this)).then(t=&gt;{o(t)}).catch(t=&gt;{u(t)})}).bind(this))}setToken(i){this.token=i}setUsername(i){this.username=i}setAdmin(i){this.admin=i}getAllPermitedUsers(){return new Promise((i,o)=&gt;{const u=`${OriginApiUrl}/api/v1/users/getmods?username=${this.username}&amp;token=${this.token}`;fetch(u).then(s=&gt;{if(!s.ok){s.text().then(o);return}s.json().then(e=&gt;{const t=e.mods,r=`${OriginApiUrl}/api/v1/users/getadmins?username=${this.username}&amp;token=${this.token}`;fetch(r).then(n=&gt;{if(!n.ok){n.text().then(o);return}n.json().then(a=&gt;{const d=a.admins;i({mods:t,admins:d})})}).catch(n=&gt;{o(n)})})}).catch(s=&gt;{o(s)})})}isAdmin(){return this.admin}isDonator(){return me.isDonator(this.username)}getMyProjects(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/projects/getmyprojects?page=${i}&amp;username=${this.username}&amp;token=${this.token}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(o)}).catch(e=&gt;{u(e)})})}getMyFeed(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/getMyFeed?page=${i}&amp;username=${this.username}&amp;token=${this.token}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{const r=t.feed;o(r)})}).catch(e=&gt;{u(e)})})}getMyMessages(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/getmessages?page=${i}&amp;username=${this.username}&amp;token=${this.token}`;fetch(s).then(e=&gt;{if(!e.ok){e.text().then(u);return}e.json().then(t=&gt;{o(t.messages)})}).catch(e=&gt;{u(e)})})}getMessageCount(){return new Promise((i,o)=&gt;{const u=`${OriginApiUrl}/api/v1/users/getmessagecount?username=${this.username}&amp;token=${this.token}`;fetch(u).then(s=&gt;{if(!s.ok){s.text().then(o);return}s.json().then(e=&gt;{i(e.count)})}).catch(s=&gt;{o(s)})})}getUnreadMessageCount(){return new Promise((i,o)=&gt;{const u=`${OriginApiUrl}/api/v1/users/getunreadmessagecount?username=${this.username}&amp;token=${this.token}`;fetch(u).then(s=&gt;{if(!s.ok){s.text().then(o);return}s.json().then(e=&gt;{i(e.count)})}).catch(s=&gt;{o(s)})})}isFollowing(i,o,u){return new Promise((s,e)=&gt;{const t=`${OriginApiUrl}/api/v1/users/isfollowing?username=${i}&amp;target=${o}`;fetch(t).then(r=&gt;{if(!r.ok){r.text().then(e);return}r.json().then(n=&gt;{if(u)return s(n);s(n.following)})}).catch(r=&gt;{e(r)})})}isFollowingUser(i,o){return this.isFollowing(this.username,i,o)}toggleFollowingUser(i,o){return new Promise((u,s)=&gt;{const e={username:this.username,token:this.token,target:i,toggle:o},t=`${OriginApiUrl}/api/v1/users/follow`;fetch(t,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),method:"POST"}).then(r=&gt;{if(!r.ok){r.text().then(s);return}r.json().then(()=&gt;{u()})}).catch(r=&gt;{s(r)})})}readMessage(i){return new Promise((o,u)=&gt;{const s={username:this.username,token:this.token,messageID:i};if(typeof i!="string"){u();return}const e=`${OriginApiUrl}/api/v1/users/markMessageAsRead`;fetch(e,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(t=&gt;{if(!t.ok){t.text().then(u);return}t.json().then(()=&gt;{o()})}).catch(t=&gt;{u(t)})})}markAllMessagesAsRead(){return new Promise((i,o)=&gt;{const u={username:this.username,token:this.token},s=`${OriginApiUrl}/api/v1/users/markAllMessagesAsRead`;fetch(s,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(e=&gt;{if(!e.ok){e.text().then(o);return}e.json().then(()=&gt;{i()})}).catch(e=&gt;{o(e)})})}disputeMessage(i,o){return new Promise((u,s)=&gt;{const e={username:this.username,token:this.token,messageID:i,dispute:o},t=`${OriginApiUrl}/api/v1/projects/dispute`;fetch(t,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),method:"POST"}).then(r=&gt;{if(!r.ok){r.text().then(s);return}r.json().then(()=&gt;{u()})}).catch(r=&gt;{s(r)})})}getReports(i,o,u=0){if(i!=="project"&amp;&amp;i!=="user")throw new Error("Invalid reporting type");return new Promise((s,e)=&gt;{const t=`${OriginApiUrl}/api/v1/reports/getReportsByTarget?target=${o}&amp;username=${this.username}&amp;token=${this.token}&amp;page=${u}`;fetch(t).then(r=&gt;{if(!r.ok){r.text().then(e);return}r.json().then(n=&gt;{s(n.reports)})}).catch(r=&gt;{e(r)})})}getTypeWithReports(i,o){if(i!=="project"&amp;&amp;i!=="user")throw new Error("Invalid reporting type");return new Promise((u,s)=&gt;{const e=`${OriginApiUrl}/api/v1/reports/getReports?username=${this.username}&amp;token=${this.token}&amp;type=${i}&amp;page=${o}`;fetch(e).then(t=&gt;{if(!t.ok){t.text().then(s);return}t.json().then(r=&gt;{u(r.reports)})}).catch(t=&gt;{s(t)})})}closeReport(i){return new Promise((o,u)=&gt;{const s={username:this.username,token:this.token,reportID:i},e=`${OriginApiUrl}/api/v1/reports/deleteReport`;fetch(e,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(t=&gt;{if(!t.ok){t.text().then(u);return}o()}).catch(t=&gt;{u(t)})})}restoreRejectedProject(i){return new Promise((o,u)=&gt;{const s={username:this.username,token:this.token,project:i},e=`${OriginApiUrl}/api/v1/projects/restore`;fetch(e,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(t=&gt;{if(!t.ok){t.text().then(u);return}o()}).catch(t=&gt;{u(t)})})}deleteRejectedProject(i){return new Promise((o,u)=&gt;{const s={username:this.username,token:this.token,projectID:i},e=`${OriginApiUrl}/api/v1/projects/hardDeleteProject`;fetch(e,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(t=&gt;{if(!t.ok){t.text().then(u);return}o()}).catch(t=&gt;{u(t)})})}getProfanityFilter(){return new Promise((i,o)=&gt;{const u=`${OriginApiUrl}/api/v1/misc/getProfanityList?username=${this.username}&amp;token=${this.token}`;fetch(u).then(s=&gt;{s.json().then(e=&gt;{if(!s.ok){o(e.error);return}i(e)}).catch(e=&gt;{o(e)})}).catch(s=&gt;{o(s)})})}setProfanityFilter(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/misc/setProfanityList`,e={username:this.username,token:this.token,json:i};fetch(s,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){u(r.error);return}o()}).catch(r=&gt;{u(r)})}).catch(t=&gt;{u(t)})})}setUserBadges(i,o){return new Promise((u,s)=&gt;{const e={username:this.username,token:this.token,badges:o,target:i};fetch(`${OriginApiUrl}/api/v1/users/setBadges`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){s(r.error);return}u()}).catch(r=&gt;{s(r)})}).catch(t=&gt;{s(t)})})}banUser(i,o,u,s){return new Promise((e,t)=&gt;{const r={username:this.username,token:this.token,target:i,reason:o,toggle:s,time:u};fetch(`${OriginApiUrl}/api/v1/users/ban`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(r),method:"POST"}).then(n=&gt;{n.json().then(a=&gt;{if(!n.ok){t(a.error);return}e()}).catch(a=&gt;{t(a)})}).catch(n=&gt;{t(n)})})}reportContent(i,o,u){const s={username:this.username,token:this.token,report:u,target:o,type:i};if(i!=="project"&amp;&amp;i!=="user")throw new Error("Invalid reporting type");return new Promise((e,t)=&gt;{fetch(`${OriginApiUrl}/api/v1/reports/sendReport`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}assingUsersPermisions(i,o,u){return new Promise((s,e)=&gt;{const t={username:this.username,token:this.token,target:i,admin:o,approver:u};fetch(`${OriginApiUrl}/api/v1/users/assignPossition`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){e(n.error);return}s()}).catch(n=&gt;{e(n)})}).catch(r=&gt;{e(r)})})}setErrorAllGetProjects(i){return new Promise((o,u)=&gt;{const s=JSON.stringify({username:this.username,token:this.token,toggle:i});fetch(`${OriginApiUrl}/api/v1/projects/toggleviewing`,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(e=&gt;{e.json().then(t=&gt;{if(!e.ok){u(t.error);return}o()}).catch(t=&gt;{u(t)})}).catch(e=&gt;{u(e)})})}setErrorAllUploadProjects(i){return new Promise((o,u)=&gt;{const s=JSON.stringify({username:this.username,token:this.token,toggle:i});fetch(`${OriginApiUrl}/api/v1/projects/toggleuploading`,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(e=&gt;{e.json().then(t=&gt;{if(!e.ok){u(t.error);return}o()}).catch(t=&gt;{u(t)})}).catch(e=&gt;{u(e)})})}deleteProject(i,o){const u=JSON.stringify({projectID:i,username:this.username,token:this.token,reason:o});return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/projects/hardDeleteProject`,{method:"POST",headers:{"Content-Type":"application/json"},body:u}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}rejectProject(i,o){const u={token:this.token,username:this.username,project:i,message:o};return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/projects/softreject`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}hardRejectProject(i,o){const u={token:this.token,username:this.username,project:i,message:o};return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/projects/hardreject`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}attemptRankUp(){const i={token:this.token,username:this.username};return new Promise((o,u)=&gt;{fetch(`${OriginApiUrl}/api/v1/users/requestrankup`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(i),method:"POST"}).then(s=&gt;{s.json().then(e=&gt;{if(!s.ok){u(e.error);return}o()}).catch(e=&gt;{u(e)})}).catch(s=&gt;{u(s)})})}setBio(i,o,u){const s={username:this.username,token:this.token,bio:i,target:u};return new Promise((e,t)=&gt;{fetch(`${OriginApiUrl}/api/v1/users/${o?"setBioAdmin":"setBio"}`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}setMyFeaturedProject(i,o){const u={username:this.username,token:this.token,project:i,title:o};return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/users/setmyfeaturedproject`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}filloutSafetyDetails(i,o){const u={username:this.username,token:this.token,birthday:i,country:o};return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/users/filloutSafetyDetails`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}respondToDispute(i,o){const u={token:this.token,username:this.username,disputeID:i,message:o};return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/projects/modresponse`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),method:"POST"}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}addMessage(i,o,u){const s={token:this.token,username:this.username,target:o,message:{...u,type:i}};return new Promise((e,t)=&gt;{fetch(`${OriginApiUrl}/api/users/addMessage`,{headers:{"Content-Type":"application/json"},body:JSON.stringify(s),method:"POST"}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}updateProject(i,o){const u=this.username,s=this.token,e=o.newMeta.title,t=o.newMeta.instructions,r=o.newMeta.notes;return new Promise(async(n,a)=&gt;{if(!o.project){const d=`${OriginApiUrl}/api/v1/projects/updateProject`,f=new XMLHttpRequest,m=new FormData;f.open("POST",d,!0),f.onload=()=&gt;{const l=JSON.parse(f.response);if(l.error){a(l.error);return}n(l.id)},m.append("username",u),m.append("token",s),m.append("title",e),m.append("instructions",t),m.append("notes",r),m.append("projectID",i),o.image&amp;&amp;m.append("thumbnail",o.image),f.send(m);return}JSZip.loadAsync(o.project).then(async d=&gt;{const f=JSON.parse(await d.file("project.json").async("text")),m=this.jsonToProtobuf(f),l=[];d.forEach((v,y)=&gt;{y.dir||v!=="project.json"&amp;&amp;l.push(y)});const p=`${OriginApiUrl}/api/v1/projects/updateProject`,c=new XMLHttpRequest,b=new FormData;c.open("POST",p,!0),c.onload=()=&gt;{const v=JSON.parse(c.response);if(v.error){a(v.error);return}n(v.id)},b.append("username",u),b.append("token",s),b.append("title",e),b.append("instructions",t),b.append("notes",r),b.append("projectID",i);for(let v=0;v&lt;l.length;v++)b.append("assets",await l[v].async("blob"),l[v].name);b.append("jsonFile",new Blob([m])),b.append("thumbnail",o.image),c.send(b)})})}jsonToProtobuf(i){function o(e){return typeof e!="object"?String(e):JSON.stringify(e)}let u={targets:[],monitors:[],extensionData:{},extensions:i.extensions,extensionURLs:{},metaSemver:"",metaVm:"",metaAgent:"",fonts:i.customFonts};u.metaSemver=i.meta.semver,u.metaVm=i.meta.vm,u.metaAgent=i.meta.agent;for(const e in i.targets){let t={id:i.targets[e].id,isStage:i.targets[e].isStage,name:i.targets[e].name,variables:{},lists:{},broadcasts:{},customVars:[],blocks:{},comments:{},currentCostume:i.targets[e].currentCostume,costumes:[],sounds:[],volume:Math.round(i.targets[e].volume||0),layerOrder:i.targets[e].layerOrder,x:Math.round(i.targets[e].x||0),y:Math.round(i.targets[e].y||0),size:Math.round(i.targets[e].size||0),direction:Math.round(i.targets[e].direction||0),draggable:i.targets[e].draggable,rotationStyle:i.targets[e].rotationStyle,tempo:i.targets[e].tempo,videoTransparency:i.targets[e].videoTransparency,videoState:i.targets[e].videoState,textToSpeechLanguage:i.targets[e].textToSpeechLanguage,visible:i.targets[e].visible};for(const n in i.targets[e].variables)t.variables[n]={name:i.targets[e].variables[n][0],value:o(i.targets[e].variables[n][1])};for(const n in i.targets[e].lists)t.lists[n]={name:i.targets[e].lists[n][0],value:i.targets[e].lists[n][1].map(a=&gt;o(a))};for(const n in i.targets[e].broadcasts)t.broadcasts[n]=i.targets[e].broadcasts[n];for(const n in i.targets[e].customVars)t.customVars.push(i.targets[e].customVars[n]);const r=i.targets[e].blocks;for(const n in r){if(Array.isArray(r[n])){t.blocks[n]={is_variable_reporter:!0,varReporterBlock:{first_num:r[n][0],name:r[n][1],id:r[n][2],second_num:r[n][3],third_num:r[n][4]}};continue}t.blocks[n]={opcode:r[n].opcode,next:r[n].next,parent:r[n].parent,inputs:{},fields:{},shadow:r[n].shadow,topLevel:r[n].topLevel,x:r[n].x,y:r[n].y},r[n].mutation&amp;&amp;(t.blocks[n].mutation={tagName:r[n].mutation.tagName,proccode:r[n].mutation.proccode,argumentids:r[n].mutation.argumentids,argumentnames:r[n].mutation.argumentnames,argumentdefaults:r[n].mutation.argumentdefaults,warp:r[n].mutation.warp=="true",_returns:r[n].mutation.returns,edited:!!r[n].mutation.edited,optype:r[n].mutation.optype,color:r[n].mutation.color});for(const a in r[n].inputs)t.blocks[n].inputs[a]=JSON.stringify(r[n].inputs[a]);for(const a in r[n].fields)t.blocks[n].fields[a]=JSON.stringify(r[n].fields[a])}for(const n in i.targets[e].comments)t.comments[n]={blockId:i.targets[e].comments[n].blockId,x:Math.round(i.targets[e].comments[n].x||0),y:Math.round(i.targets[e].comments[n].y||0),width:Math.round(i.targets[e].comments[n].width||0),height:Math.round(i.targets[e].comments[n].height||0),minimized:i.targets[e].comments[n].minimized,text:i.targets[e].comments[n].text};for(const n in i.targets[e].costumes)t.costumes[n]={assetId:i.targets[e].costumes[n].assetId,name:i.targets[e].costumes[n].name,bitmapResolution:i.targets[e].costumes[n].bitmapResolution,rotationCenterX:i.targets[e].costumes[n].rotationCenterX,rotationCenterY:i.targets[e].costumes[n].rotationCenterY,md5ext:i.targets[e].costumes[n].md5ext,dataFormat:i.targets[e].costumes[n].dataFormat};for(const n in i.targets[e].sounds)t.sounds[n]={assetId:i.targets[e].sounds[n].assetId,name:i.targets[e].sounds[n].name,dataFormat:i.targets[e].sounds[n].dataFormat,rate:i.targets[e].sounds[n].rate,sampleCount:i.targets[e].sounds[n].sampleCount,md5ext:i.targets[e].sounds[n].md5ext};u.targets.push(t)}for(const e in i.monitors)u.monitors.push({id:i.monitors[e].id,mode:i.monitors[e].mode,opcode:i.monitors[e].opcode,params:i.monitors[e].params,spriteName:i.monitors[e].spriteName||"",value:String(i.monitors[e].value),width:i.monitors[e].width,height:i.monitors[e].height,x:Math.round(i.monitors[e].x||0),y:Math.round(i.monitors[e].y||0),visible:i.monitors[e].visible,sliderMin:i.monitors[e].sliderMin,sliderMax:i.monitors[e].sliderMax,isDiscrete:i.monitors[e].isDiscrete});for(const e in i.extensionData)u.extensionData[e]={data:o(i.extensionData[e]),parse:typeof i.extensionData[e]!="string"};for(const e in i.extensionURLs)u.extensionURLs[e]=i.extensionURLs[e];const s=project.verify(u);if(s)throw alert(s),new Error(s);return project.encode(project.create(u)).finish()}resolveProjectSizes(i,o=0){return JSZip.loadAsync(i).then(async u=&gt;{const s=JSON.parse(await u.file("project.json").async("text")),e=this.jsonToProtobuf(s).length,t=s.targets;s.targets=[];const r=this.jsonToProtobuf(s).length,n=(await Promise.all(u.filter((f,m)=&gt;!m.dir&amp;&amp;f!=="project.json").map(async f=&gt;[await f.async("blob"),f.name]))).reduce((f,m)=&gt;(f[m[1]]=m[0],f),{}),a=[];for(const f of t){s.targets[0]=f;const m=f.costumes.map(y=&gt;[y.name,n[y.md5ext]]),l=f.sounds.map(y=&gt;[y.name,n[y.md5ext]]),p=this.jsonToProtobuf(s).length-r,c=m.reduce((y,w)=&gt;y+w[1].size,0),b=l.reduce((y,w)=&gt;y+w[1].size,0),v=p+c+b;a.push({name:`${f.name}: ${MB(v)}`,value:[`code: ${MB(p)}`,{name:`costumes: ${MB(c)}`,value:m.map(([y,w])=&gt;`${y}: ${MB(w.size)}`)},{name:`sounds: ${MB(b)}`,value:l.map(([y,w])=&gt;`${y}: ${MB(w.size)}`)}]})}const d=Object.values(n).reduce((f,m)=&gt;f+m.size,e+o);return[{name:`${MB(d)}/${PUBLIC_MAX_UPLOAD_SIZE}MB`,value:[`thumbnail: ${MB(o)}`,{name:`project: ${MB(d)}`,value:a}]},d&gt;Number(PUBLIC_MAX_UPLOAD_SIZE)*1024*1024]})}handleProjectFile(i,o=0){return JSZip.loadAsync(i).then(async u=&gt;{const s=JSON.parse(await u.file("project.json").async("text")),e=new Blob([this.jsonToProtobuf(s)]),t=await Promise.all(u.filter((n,a)=&gt;!a.dir&amp;&amp;n!=="project.json").map(async n=&gt;[await n.async("blob"),n.name]));if(t.reduce((n,a)=&gt;n+a[0].size,e.size+o)&gt;Number(PUBLIC_MAX_UPLOAD_SIZE)*1024*1024)throw"ProjectToLarge";return{protobuf:e,assets:t}})}protobufToJson(i){const o=project.decode(i),u=project.toObject(o),s={targets:[],monitors:[],extensionData:{},extensions:u.extensions,extensionURLs:{},meta:{semver:u.metaSemver,vm:u.metaVm,agent:u.metaAgent||""},customFonts:u.fonts};for(const e of u.targets){let t={isStage:e.isStage,name:e.name,variables:{},lists:{},broadcasts:{},customVars:[],blocks:{},comments:{},currentCostume:e.currentCostume,costumes:[],sounds:[],id:e.id,volume:e.volume,layerOrder:e.layerOrder,tempo:e.tempo,videoTransparency:e.videoTransparency,videoState:e.videoState,textToSpeechLanguage:e.textToSpeechLanguage||null,visible:e.visible,x:e.x,y:e.y,size:e.size,direction:e.direction,draggable:e.draggable,rotationStyle:e.rotationStyle};for(const r in e.variables)t.variables[r]=[e.variables[r].name,e.variables[r].value];for(const r in e.lists)t.lists[r]=[e.lists[r].name,e.lists[r].value];for(const r in e.broadcasts)t.broadcasts[r]=e.broadcasts[r];for(const r in e.customVars)t.customVars.push(e.customVars[r]);for(const r in e.blocks){if(e.blocks[r].is_variable_reporter){t.blocks[r]=[e.blocks[r].varReporterBlock.first_num,e.blocks[r].varReporterBlock.name,e.blocks[r].varReporterBlock.id,e.blocks[r].varReporterBlock.second_num,e.blocks[r].varReporterBlock.third_num];continue}t.blocks[r]={opcode:e.blocks[r].opcode,next:e.blocks[r].next||null,parent:e.blocks[r].parent||null,inputs:{},fields:{},shadow:e.blocks[r].shadow,topLevel:e.blocks[r].topLevel,x:e.blocks[r].x,y:e.blocks[r].y},e.blocks[r].mutation&amp;&amp;(t.blocks[r].mutation={tagName:e.blocks[r].mutation.tagName,proccode:e.blocks[r].mutation.proccode,argumentids:e.blocks[r].mutation.argumentids,argumentnames:e.blocks[r].mutation.argumentnames,argumentdefaults:e.blocks[r].mutation.argumentdefaults,warp:e.blocks[r].mutation.warp,returns:e.blocks[r].mutation._returns,edited:e.blocks[r].mutation.edited,optype:e.blocks[r].mutation.optype,color:e.blocks[r].mutation.color,children:[]});for(const n in e.blocks[r].inputs)t.blocks[r].inputs[n]=JSON.parse(e.blocks[r].inputs[n]);for(const n in e.blocks[r].fields)t.blocks[r].fields[n]=JSON.parse(e.blocks[r].fields[n])}for(const r in e.comments)t.comments[r]=e.comments[r];for(const r in e.costumes)t.costumes[r]=e.costumes[r];for(const r in e.sounds)t.sounds[r]=e.sounds[r];s.targets.push(t)}for(const e in u.monitors){let t={id:u.monitors[e].id,mode:u.monitors[e].mode,opcode:u.monitors[e].opcode,params:{},spriteName:u.monitors[e].spriteName||"",value:u.monitors[e].value,width:u.monitors[e].width,height:u.monitors[e].height,x:u.monitors[e].x,y:u.monitors[e].y,visible:u.monitors[e].visible,sliderMin:u.monitors[e].sliderMin,sliderMax:u.monitors[e].sliderMax,isDiscrete:u.monitors[e].isDiscrete};for(const r in u.monitors[e].params)t.params[r]=JSON.parse(u.monitors[e].params[r]);s.monitors.push(t)}for(const e in u.antiSigmaExtensionData)s.extensionData[e]=u.extensionData[e].data;for(const e in u.extensionData)u.extensionData[e].parse?s.extensionData[e]=JSON.parse(u.extensionData[e].data):s.extensionData[e]=u.extensionData[e].data;for(const e in u.extensionURLs)s.extensionURLs[e]=u.extensionURLs[e];return s}uploadProject(i){const o=this.username,u=this.token,s=i.title,e=i.instructions,t=i.notes,r=i.remix||0;return new Promise(async(n,a)=&gt;{const{protobuf:d,assets:f}=await this.handleProjectFile(i.project,i.image.size).catch(c=&gt;(a(c),{protobuf:null,assets:[]}));if(!d)return;const m=`${OriginApiUrl}/api/v1/projects/uploadProject`,l=new XMLHttpRequest,p=new FormData;l.open("POST",m,!0),l.onload=()=&gt;{const c=JSON.parse(l.response);if(c.error){a(c.error);return}n(c.id)},p.append("username",o),p.append("token",u),p.append("title",s),p.append("instructions",e),p.append("notes",t),p.append("remix",r),f.forEach(c=&gt;p.append("assets",...c)),p.append("jsonFile",d),p.append("thumbnail",i.image),l.send(p)})}approveProject(i,o){const u=`${OriginApiUrl}/api/projects/approve?token=${this.token}&amp;approver=${this.username}&amp;webhook=${o}&amp;id=${i}`;return new Promise((s,e)=&gt;{fetch(u).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s(r.id)}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}featureProject(i,o){const u=JSON.stringify({username:this.username,token:this.token,projectID:i,toggle:o});return new Promise((s,e)=&gt;{fetch(`${OriginApiUrl}/api/v1/projects/manualfeature`,{method:"POST",headers:{"Content-Type":"application/json"},body:u}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}toggleVoteProject(i,o,u){switch(o=String(o).toLowerCase().trim(),o){case"feature":case"features":case"featured":case"vote":case"voted":o="vote";break;case"love":case"loved":case"like":case"liked":case"likes":o="love";break;default:o="vote"}const s=`${OriginApiUrl}/api/v1/projects/interactions/${o}Toggle`;return new Promise((e,t)=&gt;{fetch(s,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({projectId:i,username:this.username,token:this.token,toggle:u})}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}getVoteStates(i){const o=`${OriginApiUrl}/api/v1/projects/getuserstatewrapper?username=${this.username}&amp;token=${this.token}&amp;projectId=${i}`;return new Promise((u,s)=&gt;{fetch(o).then(e=&gt;{e.json().then(t=&gt;{if(!e.ok){s(t.error);return}u({loved:t.hasLoved,voted:t.hasVoted})}).catch(t=&gt;{s(t)})}).catch(e=&gt;{s(e)})})}setLastPolicyUpdate(i){const o=JSON.stringify({username:this.username,token:this.token,types:i});return new Promise((u,s)=&gt;{fetch(`${OriginApiUrl}/api/v1/misc/setLastPolicyUpdate`,{method:"POST",headers:{"Content-Type":"application/json"},body:o}).then(e=&gt;{e.json().then(t=&gt;{if(!e.ok){s(t.error);return}u()}).catch(t=&gt;{s(t)})}).catch(e=&gt;{s(e)})})}getLastPolicyUpdate(){const i=`${OriginApiUrl}/api/v1/misc/getLastPolicyUpdate`;return new Promise((o,u)=&gt;{fetch(i).then(s=&gt;{s.json().then(e=&gt;{if(!s.ok){u(e.error);return}o(e)}).catch(e=&gt;{u(e)})}).catch(s=&gt;{u(s)})})}markPolicyAsRead(i){let o;switch(i){case"TOS":o=`${OriginApiUrl}/api/v1/misc/markTOSAsRead`;break;case"privacyPolicy":o=`${OriginApiUrl}/api/v1/misc/markPrivacyPolicyAsRead`;break;case"guidelines":o=`${OriginApiUrl}/api/v1/misc/markGuidelinesAsRead`;break;default:throw new Error("Invalid policy type")}return new Promise((u,s)=&gt;{fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:this.username,token:this.token})}).then(e=&gt;{e.json().then(t=&gt;{if(!e.ok){s(t.error);return}u()}).catch(t=&gt;{s(t)})}).catch(e=&gt;{s(e)})})}updatePrivateProfile(i,o){const u=`${OriginApiUrl}/api/v1/users/privateProfile`,s=JSON.stringify({username:this.username,token:this.token,privateProfile:i,privateToFollowing:o});return new Promise((e,t)=&gt;{fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}ipBanUser(i,o){const u=`${OriginApiUrl}/api/v1/users/banuserip`,s=JSON.stringify({username:this.username,token:this.token,target:i,toggle:o});return new Promise((e,t)=&gt;{fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}deleteUserAccount(i,o){const u=`${OriginApiUrl}/api/v1/users/deleteaccount`,s=JSON.stringify({username:this.username,token:this.token,target:i,reason:o});return new Promise((e,t)=&gt;{fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}getConnectedIPs(i){const o=`${OriginApiUrl}/api/v1/users/getAllIPs`,u=`?username=${this.username}&amp;token=${this.token}&amp;target=${i}`;return new Promise((s,e)=&gt;{fetch(o+u).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s(r.ips)}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}getConnectedUsers(i){const o=`${OriginApiUrl}/api/v1/users/getAllAccountsWithIP`,u=`?username=${this.username}&amp;token=${this.token}&amp;target=${i}`;return new Promise((s,e)=&gt;{fetch(o+u).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s(r.users)}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}banIP(i,o){const u=`${OriginApiUrl}/api/v1/users/banip`,s=JSON.stringify({username:this.username,token:this.token,targetIP:i,toggle:o});return new Promise((e,t)=&gt;{fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}setNewUsername(i){const o=`${OriginApiUrl}/api/v1/users/changeUsername`,u=JSON.stringify({username:this.username,token:this.token,newUsername:i});return new Promise((s,e)=&gt;{fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:u}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}setUsernameOfUser(i,o){const u=`${OriginApiUrl}/api/v1/users/changeusernameadmin`,s=JSON.stringify({username:this.username,token:this.token,target:i,newUsername:o});return new Promise((e,t)=&gt;{fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(r=&gt;{r.json().then(n=&gt;{if(!r.ok){t(n.error);return}e()}).catch(n=&gt;{t(n)})}).catch(r=&gt;{t(r)})})}setPFP(i){return new Promise((o,u)=&gt;{const s=`${OriginApiUrl}/api/v1/users/setpfp?username=${this.username}&amp;token=${this.token}`,e=new XMLHttpRequest,t=new FormData;e.open("POST",s,!0),e.onload=()=&gt;{const r=JSON.parse(e.response);if(r.error){u(r.error);return}o()},t.append("picture",new Blob([i])),e.send(t)})}setPFPOfUser(i,o){return new Promise((u,s)=&gt;{const e=`${OriginApiUrl}/api/v1/users/setpfpadmin`,t=new XMLHttpRequest,r=new FormData;t.open("POST",e,!0),t.onload=()=&gt;{const n=JSON.parse(t.response);if(n.error){s(n.error);return}u()},r.append("username",this.username),r.append("token",this.token),r.append("target",i),r.append("picture",new Blob([o])),t.send(r)})}updateEmail(i){const o=`${OriginApiUrl}/api/v1/users/setEmail`,u=JSON.stringify({username:this.username,token:this.token,email:i});return new Promise((s,e)=&gt;{fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:u}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}removeOAuthMethod(i){const o=`${OriginApiUrl}/api/v1/users/removeoauthmethod`,u=JSON.stringify({username:this.username,token:this.token,method:i});return new Promise((s,e)=&gt;{fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:u}).then(t=&gt;{t.json().then(r=&gt;{if(!t.ok){e(r.error);return}s()}).catch(r=&gt;{e(r)})}).catch(t=&gt;{e(t)})})}};ke(me,"OriginApiUrl",OriginApiUrl),ke(me,"CachedDonators",{});let ProjectApi=me;const ye=class ye{static createAccount(i,o,u="",s,e,t){return new Promise((r,n)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/createAccount`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,password:o,email:u,birthday:s,country:e,captcha_token:t})}).then(a=&gt;a.json().then(d=&gt;{if(d.error)return n(d.error);this.fireAuthenticated(i,d.token),r(d.token)}).catch(n)).catch(n)})}static verifyPassword(i,o,u){const s=`${ProjectApi.OriginApiUrl}/api/v1/users/passwordlogin`,e={username:i,password:o,captcha_token:u};return new Promise((t,r)=&gt;{fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(n=&gt;n.json().then(a=&gt;{if(a.error==="InvalidCaptcha")return r("InvalidCaptcha");if(a.error)return t(!1);this.fireAuthenticated(i,a.token),t(a.token)}).catch(r)).catch(r)})}static authenticate(){const i=`${window.location.origin}/signin?redirect=${window.location.pathname}&amp;embed=true`;return new Promise((o,u)=&gt;{let s;const e=t=&gt;{t.origin===location.origin&amp;&amp;(console.log(t.data),this.fireAuthenticated(localStorage.getItem("username"),localStorage.getItem("token")),o())};window.addEventListener("message",e),s=window.open(i,"Login","scrollbars=yes,resizable=yes,status=no,location=yes,toolbar=no,menubar=no,width=1024,height=512,left=200,top=200"),s||(window.removeEventListener("message",e),u("PopupBlocked"))})}static verifyToken(i,o){return new Promise((u,s)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/tokenlogin?username=${i}&amp;token=${o}`).then(e=&gt;e.json().then(t=&gt;{if(t.error)return s(t.error);u()}).catch(s)).catch(s)})}static onAuthentication(i){ye.eventListeners.push({callback:i,type:"LOGIN"})}static onLogout(i){ye.eventListeners.push({callback:i,type:"LOGOUT"})}static fireAuthenticated(i,o){ye.eventListeners.forEach(u=&gt;{u.type==="LOGIN"&amp;&amp;u.callback(i,o)})}static logout(){return new Promise((i,o)=&gt;{const u=localStorage.getItem("username"),s=localStorage.getItem("token");fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/logout`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:u,token:s})}).then(e=&gt;{if(!e.ok)return o("Not OK");localStorage.removeItem("username"),localStorage.removeItem("token"),ye.fireLogout(),i()}).catch(o)})}static fireLogout(){ye.eventListeners.forEach(i=&gt;{i.type==="LOGOUT"&amp;&amp;i.callback()})}static usernameFromCode(i,o){return new Promise((u,s)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/userfromcode?username=${i}&amp;token=${o}`).then(e=&gt;e.json().then(t=&gt;{if(t.error)return s(t.error);u({username:i,isAdmin:t.admin,isApprover:t.approver,...t})}).catch(s)).catch(s)})}static changePassword(i,o,u){return new Promise((s,e)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/changePassword`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,old_password:o,new_password:u})}).then(t=&gt;t.json().then(r=&gt;{if(r.error)return e(r.error);s(r.token)}).catch(e)).catch(e)})}static resetPassword(i,o,u){return new Promise((s,e)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/resetpassword/reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,state:o,password:u})}).then(t=&gt;t.json().then(r=&gt;{if(r.error)return e(r.error);s(r.token)}).catch(e)).catch(e)})}static sendResetPasswordEmail(i,o){return new Promise((u,s)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/resetpassword/sendEmail`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,captcha_token:o})}).then(e=&gt;e.json().then(t=&gt;{if(t.error)return s(t.error);u(t.token)}).catch(s)).catch(s)})}static verifyEmail(i,o){return new Promise((u,s)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/resetpassword/sendVerifyEmail`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,token:o})}).then(e=&gt;e.json().then(t=&gt;{if(t.error)return s(t.error);u()}).catch(s)).catch(s)})}static changeUsername(i,o,u){return new Promise((s,e)=&gt;{fetch(`${ProjectApi.OriginApiUrl}/api/v1/users/changeUsername`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:i,token:o,newUsername:u})}).then(t=&gt;t.json().then(r=&gt;{if(r.error)return e(r.error);s(r.token)}).catch(e)).catch(e)})}};ke(ye,"eventListeners",[]);let Authentication=ye;export{Authentication as A,JSZip as J,ProjectApi as P};
</pre></body></html>