import{c as Tt,g as xe}from"./index-be50c070.js";import{c as Ft}from"./_commonjs-dynamic-modules-302442b1.js";var oe={exports:{}};/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
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(c,e){(function(t){c.exports=t()})(function(){return function t(r,n,a){function i(k,w){if(!n[k]){if(!r[k]){var y=typeof Ft=="function"&&Ft;if(!w&&y)return y(k,!0);if(l)return l(k,!0);var _=new Error("Cannot find module '"+k+"'");throw _.code="MODULE_NOT_FOUND",_}var d=n[k]={exports:{}};r[k][0].call(d.exports,function(v){var u=r[k][1][v];return i(u||v)},d,d.exports,t,r,n,a)}return n[k].exports}for(var l=typeof Ft=="function"&&Ft,h=0;h<a.length;h++)i(a[h]);return i}({1:[function(t,r,n){var a=t("./utils"),i=t("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(h){for(var k,w,y,_,d,v,u,m=[],f=0,b=h.length,x=b,A=a.getTypeOf(h)!=="string";f<h.length;)x=b-f,y=A?(k=h[f++],w=f<b?h[f++]:0,f<b?h[f++]:0):(k=h.charCodeAt(f++),w=f<b?h.charCodeAt(f++):0,f<b?h.charCodeAt(f++):0),_=k>>2,d=(3&k)<<4|w>>4,v=1<x?(15&w)<<2|y>>6:64,u=2<x?63&y:64,m.push(l.charAt(_)+l.charAt(d)+l.charAt(v)+l.charAt(u));return m.join("")},n.decode=function(h){var k,w,y,_,d,v,u=0,m=0,f="data:";if(h.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var b,x=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===l.charAt(64)&&x--,h.charAt(h.length-2)===l.charAt(64)&&x--,x%1!=0)throw new Error("Invalid base64 input, bad content length.");for(b=i.uint8array?new Uint8Array(0|x):new Array(0|x);u<h.length;)k=l.indexOf(h.charAt(u++))<<2|(_=l.indexOf(h.charAt(u++)))>>4,w=(15&_)<<4|(d=l.indexOf(h.charAt(u++)))>>2,y=(3&d)<<6|(v=l.indexOf(h.charAt(u++))),b[m++]=k,d!==64&&(b[m++]=w),v!==64&&(b[m++]=y);return b}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),i=t("./stream/DataWorker"),l=t("./stream/Crc32Probe"),h=t("./stream/DataLengthProbe");function k(w,y,_,d,v){this.compressedSize=w,this.uncompressedSize=y,this.crc32=_,this.compression=d,this.compressedContent=v}k.prototype={getContentWorker:function(){var w=new i(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),y=this;return w.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),w},getCompressedWorker:function(){return new i(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},k.createWorkerFrom=function(w,y,_){return w.pipe(new l).pipe(new h("uncompressedSize")).pipe(y.compressWorker(_)).pipe(new h("compressedSize")).withStreamInfo("compression",y)},r.exports=k},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,n){var a=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,n){var a=t("./utils"),i=function(){for(var l,h=[],k=0;k<256;k++){l=k;for(var w=0;w<8;w++)l=1&l?3988292384^l>>>1:l>>>1;h[k]=l}return h}();r.exports=function(l,h){return l!==void 0&&l.length?a.getTypeOf(l)!=="string"?function(k,w,y,_){var d=i,v=_+y;k^=-1;for(var u=_;u<v;u++)k=k>>>8^d[255&(k^w[u])];return-1^k}(0|h,l,l.length,0):function(k,w,y,_){var d=i,v=_+y;k^=-1;for(var u=_;u<v;u++)k=k>>>8^d[255&(k^w.charCodeAt(u))];return-1^k}(0|h,l,l.length,0):0}},{"./utils":32}],5:[function(t,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,r,n){var a=null;a=typeof Promise<"u"?Promise:t("lie"),r.exports={Promise:a}},{lie:37}],7:[function(t,r,n){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=t("pako"),l=t("./utils"),h=t("./stream/GenericWorker"),k=a?"uint8array":"array";function w(y,_){h.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=_,this.meta={}}n.magic="\b\0",l.inherits(w,h),w.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(k,y.data),!1)},w.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},w.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},w.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(_){y.push({data:_,meta:y.meta})}},n.compressWorker=function(y){return new w("Deflate",y)},n.uncompressWorker=function(){return new w("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,n){function a(d,v){var u,m="";for(u=0;u<v;u++)m+=String.fromCharCode(255&d),d>>>=8;return m}function i(d,v,u,m,f,b){var x,A,P=d.file,D=d.compression,F=b!==k.utf8encode,H=l.transformTo("string",b(P.name)),T=l.transformTo("string",k.utf8encode(P.name)),X=P.comment,Q=l.transformTo("string",b(X)),S=l.transformTo("string",k.utf8encode(X)),I=T.length!==P.name.length,o=S.length!==X.length,L="",et="",W="",rt=P.dir,$=P.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};v&&!u||(tt.crc32=d.crc32,tt.compressedSize=d.compressedSize,tt.uncompressedSize=d.uncompressedSize);var B=0;v&&(B|=8),F||!I&&!o||(B|=2048);var z=0,J=0;rt&&(z|=16),f==="UNIX"?(J=798,z|=function(G,ut){var bt=G;return G||(bt=ut?16893:33204),(65535&bt)<<16}(P.unixPermissions,rt)):(J=20,z|=function(G){return 63&(G||0)}(P.dosPermissions)),x=$.getUTCHours(),x<<=6,x|=$.getUTCMinutes(),x<<=5,x|=$.getUTCSeconds()/2,A=$.getUTCFullYear()-1980,A<<=4,A|=$.getUTCMonth()+1,A<<=5,A|=$.getUTCDate(),I&&(et=a(1,1)+a(w(H),4)+T,L+="up"+a(et.length,2)+et),o&&(W=a(1,1)+a(w(Q),4)+S,L+="uc"+a(W.length,2)+W);var K="";return K+=`
\0`,K+=a(B,2),K+=D.magic,K+=a(x,2),K+=a(A,2),K+=a(tt.crc32,4),K+=a(tt.compressedSize,4),K+=a(tt.uncompressedSize,4),K+=a(H.length,2),K+=a(L.length,2),{fileRecord:y.LOCAL_FILE_HEADER+K+H+L,dirRecord:y.CENTRAL_FILE_HEADER+a(J,2)+K+a(Q.length,2)+"\0\0\0\0"+a(z,4)+a(m,4)+H+L+Q}}var l=t("../utils"),h=t("../stream/GenericWorker"),k=t("../utf8"),w=t("../crc32"),y=t("../signature");function _(d,v,u,m){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=u,this.encodeFileName=m,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(_,h),_.prototype.push=function(d){var v=d.meta.percent||0,u=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,h.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:u?(v+100*(u-m-1))/u:100}}))},_.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var v=this.streamFiles&&!d.file.dir;if(v){var u=i(d,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},_.prototype.closedSource=function(d){this.accumulate=!1;var v=this.streamFiles&&!d.file.dir,u=i(d,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),v)this.push({data:function(m){return y.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},_.prototype.flush=function(){for(var d=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var u=this.bytesWritten-d,m=function(f,b,x,A,P){var D=l.transformTo("string",P(A));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(b,4)+a(x,4)+a(D.length,2)+D}(this.dirRecords.length,u,d,this.zipComment,this.encodeFileName);this.push({data:m,meta:{percent:100}})},_.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},_.prototype.registerPrevious=function(d){this._sources.push(d);var v=this;return d.on("data",function(u){v.processChunk(u)}),d.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),d.on("error",function(u){v.error(u)}),this},_.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},_.prototype.error=function(d){var v=this._sources;if(!h.prototype.error.call(this,d))return!1;for(var u=0;u<v.length;u++)try{v[u].error(d)}catch{}return!0},_.prototype.lock=function(){h.prototype.lock.call(this);for(var d=this._sources,v=0;v<d.length;v++)d[v].lock()},r.exports=_},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,n){var a=t("../compressions"),i=t("./ZipFileWorker");n.generateWorker=function(l,h,k){var w=new i(h.streamFiles,k,h.platform,h.encodeFileName),y=0;try{l.forEach(function(_,d){y++;var v=function(b,x){var A=b||x,P=a[A];if(!P)throw new Error(A+" is not a valid compression method !");return P}(d.options.compression,h.compression),u=d.options.compressionOptions||h.compressionOptions||{},m=d.dir,f=d.date;d._compressWorker(v,u).withStreamInfo("file",{name:_,dir:m,date:f,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(w)}),w.entriesCount=y}catch(_){w.error(_)}return w}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r,n){function a(){if(!(this instanceof a))return new a;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 i=new a;for(var l in this)typeof this[l]!="function"&&(i[l]=this[l]);return i}}(a.prototype=t("./object")).loadAsync=t("./load"),a.support=t("./support"),a.defaults=t("./defaults"),a.version="3.10.1",a.loadAsync=function(i,l){return new a().loadAsync(i,l)},a.external=t("./external"),r.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,r,n){var a=t("./utils"),i=t("./external"),l=t("./utf8"),h=t("./zipEntries"),k=t("./stream/Crc32Probe"),w=t("./nodejsUtils");function y(_){return new i.Promise(function(d,v){var u=_.decompressed.getContentWorker().pipe(new k);u.on("error",function(m){v(m)}).on("end",function(){u.streamInfo.crc32!==_.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}r.exports=function(_,d){var v=this;return d=a.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),w.isNode&&w.isStream(_)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",_,!0,d.optimizedBinaryString,d.base64).then(function(u){var m=new h(d);return m.load(u),m}).then(function(u){var m=[i.Promise.resolve(u)],f=u.files;if(d.checkCRC32)for(var b=0;b<f.length;b++)m.push(y(f[b]));return i.Promise.all(m)}).then(function(u){for(var m=u.shift(),f=m.files,b=0;b<f.length;b++){var x=f[b],A=x.fileNameStr,P=a.resolve(x.fileNameStr);v.file(P,x.decompressed,{binary:!0,optimizedBinaryString:!0,date:x.date,dir:x.dir,comment:x.fileCommentStr.length?x.fileCommentStr:null,unixPermissions:x.unixPermissions,dosPermissions:x.dosPermissions,createFolders:d.createFolders}),x.dir||(v.file(P).unsafeOriginalName=A)}return m.zipComment.length&&(v.comment=m.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r,n){var a=t("../utils"),i=t("../stream/GenericWorker");function l(h,k){i.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(k)}a.inherits(l,i),l.prototype._bindStream=function(h){var k=this;(this._stream=h).pause(),h.on("data",function(w){k.push({data:w,meta:{percent:0}})}).on("error",function(w){k.isPaused?this.generatedError=w:k.error(w)}).on("end",function(){k.isPaused?k._upstreamEnded=!0:k.end()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r,n){var a=t("readable-stream").Readable;function i(l,h,k){a.call(this,h),this._helper=l;var w=this;l.on("data",function(y,_){w.push(y)||w._helper.pause(),k&&k(_)}).on("error",function(y){w.emit("error",y)}).on("end",function(){w.push(null)})}t("../utils").inherits(i,a),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,r,n){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,i);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,i)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var i=new Buffer(a);return i.fill(0),i},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(t,r,n){function a(P,D,F){var H,T=l.getTypeOf(D),X=l.extend(F||{},w);X.date=X.date||new Date,X.compression!==null&&(X.compression=X.compression.toUpperCase()),typeof X.unixPermissions=="string"&&(X.unixPermissions=parseInt(X.unixPermissions,8)),X.unixPermissions&&16384&X.unixPermissions&&(X.dir=!0),X.dosPermissions&&16&X.dosPermissions&&(X.dir=!0),X.dir&&(P=f(P)),X.createFolders&&(H=m(P))&&b.call(this,H,!0);var Q=T==="string"&&X.binary===!1&&X.base64===!1;F&&F.binary!==void 0||(X.binary=!Q),(D instanceof y&&D.uncompressedSize===0||X.dir||!D||D.length===0)&&(X.base64=!1,X.binary=!0,D="",X.compression="STORE",T="string");var S=null;S=D instanceof y||D instanceof h?D:v.isNode&&v.isStream(D)?new u(P,D):l.prepareContent(P,D,X.binary,X.optimizedBinaryString,X.base64);var I=new _(P,S,X);this.files[P]=I}var i=t("./utf8"),l=t("./utils"),h=t("./stream/GenericWorker"),k=t("./stream/StreamHelper"),w=t("./defaults"),y=t("./compressedObject"),_=t("./zipObject"),d=t("./generate"),v=t("./nodejsUtils"),u=t("./nodejs/NodejsStreamInputAdapter"),m=function(P){P.slice(-1)==="/"&&(P=P.substring(0,P.length-1));var D=P.lastIndexOf("/");return 0<D?P.substring(0,D):""},f=function(P){return P.slice(-1)!=="/"&&(P+="/"),P},b=function(P,D){return D=D!==void 0?D:w.createFolders,P=f(P),this.files[P]||a.call(this,P,null,{dir:!0,createFolders:D}),this.files[P]};function x(P){return Object.prototype.toString.call(P)==="[object RegExp]"}var A={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(P){var D,F,H;for(D in this.files)H=this.files[D],(F=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&P(F,H)},filter:function(P){var D=[];return this.forEach(function(F,H){P(F,H)&&D.push(H)}),D},file:function(P,D,F){if(arguments.length!==1)return P=this.root+P,a.call(this,P,D,F),this;if(x(P)){var H=P;return this.filter(function(X,Q){return!Q.dir&&H.test(X)})}var T=this.files[this.root+P];return T&&!T.dir?T:null},folder:function(P){if(!P)return this;if(x(P))return this.filter(function(T,X){return X.dir&&P.test(T)});var D=this.root+P,F=b.call(this,D),H=this.clone();return H.root=F.name,H},remove:function(P){P=this.root+P;var D=this.files[P];if(D||(P.slice(-1)!=="/"&&(P+="/"),D=this.files[P]),D&&!D.dir)delete this.files[P];else for(var F=this.filter(function(T,X){return X.name.slice(0,P.length)===P}),H=0;H<F.length;H++)delete this.files[F[H].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(P){var D,F={};try{if((F=l.extend(P||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=F.type.toLowerCase(),F.compression=F.compression.toUpperCase(),F.type==="binarystring"&&(F.type="string"),!F.type)throw new Error("No output type specified.");l.checkSupport(F.type),F.platform!=="darwin"&&F.platform!=="freebsd"&&F.platform!=="linux"&&F.platform!=="sunos"||(F.platform="UNIX"),F.platform==="win32"&&(F.platform="DOS");var H=F.comment||this.comment||"";D=d.generateWorker(this,F,H)}catch(T){(D=new h("error")).error(T)}return new k(D,F.type||"string",F.mimeType)},generateAsync:function(P,D){return this.generateInternalStream(P).accumulate(D)},generateNodeStream:function(P,D){return(P=P||{}).type||(P.type="nodebuffer"),this.generateInternalStream(P).toNodejsStream(D)}};r.exports=A},{"./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(t,r,n){r.exports=t("stream")},{stream:void 0}],17:[function(t,r,n){var a=t("./DataReader");function i(l){a.call(this,l);for(var h=0;h<this.data.length;h++)l[h]=255&l[h]}t("../utils").inherits(i,a),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var h=l.charCodeAt(0),k=l.charCodeAt(1),w=l.charCodeAt(2),y=l.charCodeAt(3),_=this.length-4;0<=_;--_)if(this.data[_]===h&&this.data[_+1]===k&&this.data[_+2]===w&&this.data[_+3]===y)return _-this.zero;return-1},i.prototype.readAndCheckSignature=function(l){var h=l.charCodeAt(0),k=l.charCodeAt(1),w=l.charCodeAt(2),y=l.charCodeAt(3),_=this.readData(4);return h===_[0]&&k===_[1]&&w===_[2]&&y===_[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,r,n){var a=t("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var h,k=0;for(this.checkOffset(l),h=this.index+l-1;h>=this.index;h--)k=(k<<8)+this.byteAt(h);return this.index+=l,k},readString:function(l){return a.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(t,r,n){var a=t("./Uint8ArrayReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.readData=function(l){this.checkOffset(l);var h=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,n){var a=t("./DataReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var h=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,r,n){var a=t("./ArrayReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),i=t("../support"),l=t("./ArrayReader"),h=t("./StringReader"),k=t("./NodeBufferReader"),w=t("./Uint8ArrayReader");r.exports=function(y){var _=a.getTypeOf(y);return a.checkSupport(_),_!=="string"||i.uint8array?_==="nodebuffer"?new k(y):i.uint8array?new w(a.transformTo("uint8array",y)):new l(a.transformTo("array",y)):new h(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,r,n){var a=t("./GenericWorker"),i=t("../utils");function l(h){a.call(this,"ConvertWorker to "+h),this.destType=h}i.inherits(l,a),l.prototype.processChunk=function(h){this.push({data:i.transformTo(this.destType,h.data),meta:h.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,n){var a=t("./GenericWorker"),i=t("../crc32");function l(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(l,a),l.prototype.processChunk=function(h){this.streamInfo.crc32=i(h.data,this.streamInfo.crc32||0),this.push(h)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function l(h){i.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}a.inherits(l,i),l.prototype.processChunk=function(h){if(h){var k=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=k+h.data.length}i.prototype.processChunk.call(this,h)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function l(h){i.call(this,"DataWorker");var k=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(w){k.dataIsReady=!0,k.data=w,k.max=w&&w.length||0,k.type=a.getTypeOf(w),k.isPaused||k._tickAndRepeat()},function(w){k.error(w)})}a.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,k=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,k);break;case"uint8array":h=this.data.subarray(this.index,k);break;case"array":case"nodebuffer":h=this.data.slice(this.index,k)}return this.index=k,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,n){function a(i){this.name=i||"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}a.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var h=0;h<this._listeners[i].length;h++)this._listeners[i][h].call(this,l)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var l=this;return i.on("data",function(h){l.processChunk(h)}),i.on("end",function(){l.end()}),i.on("error",function(h){l.error(h)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,l){return this.extraStreamInfo[i]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=a},{}],29:[function(t,r,n){var a=t("../utils"),i=t("./ConvertWorker"),l=t("./GenericWorker"),h=t("../base64"),k=t("../support"),w=t("../external"),y=null;if(k.nodestream)try{y=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function _(v,u){return new w.Promise(function(m,f){var b=[],x=v._internalType,A=v._outputType,P=v._mimeType;v.on("data",function(D,F){b.push(D),u&&u(F)}).on("error",function(D){b=[],f(D)}).on("end",function(){try{var D=function(F,H,T){switch(F){case"blob":return a.newBlob(a.transformTo("arraybuffer",H),T);case"base64":return h.encode(H);default:return a.transformTo(F,H)}}(A,function(F,H){var T,X=0,Q=null,S=0;for(T=0;T<H.length;T++)S+=H[T].length;switch(F){case"string":return H.join("");case"array":return Array.prototype.concat.apply([],H);case"uint8array":for(Q=new Uint8Array(S),T=0;T<H.length;T++)Q.set(H[T],X),X+=H[T].length;return Q;case"nodebuffer":return Buffer.concat(H);default:throw new Error("concat : unsupported type '"+F+"'")}}(x,b),P);m(D)}catch(F){f(F)}b=[]}).resume()})}function d(v,u,m){var f=u;switch(u){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=u,this._mimeType=m,a.checkSupport(f),this._worker=v.pipe(new i(f)),v.lock()}catch(b){this._worker=new l("error"),this._worker.error(b)}}d.prototype={accumulate:function(v){return _(this,v)},on:function(v,u){var m=this;return v==="data"?this._worker.on(v,function(f){u.call(m,f.data,f.meta)}):this._worker.on(v,function(){a.delay(u,arguments,m)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},v)}},r.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(a),n.blob=i.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,n){for(var a=t("./utils"),i=t("./support"),l=t("./nodejsUtils"),h=t("./stream/GenericWorker"),k=new Array(256),w=0;w<256;w++)k[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;k[254]=k[254]=1;function y(){h.call(this,"utf-8 decode"),this.leftOver=null}function _(){h.call(this,"utf-8 encode")}n.utf8encode=function(d){return i.nodebuffer?l.newBufferFrom(d,"utf-8"):function(v){var u,m,f,b,x,A=v.length,P=0;for(b=0;b<A;b++)(64512&(m=v.charCodeAt(b)))==55296&&b+1<A&&(64512&(f=v.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),b++),P+=m<128?1:m<2048?2:m<65536?3:4;for(u=i.uint8array?new Uint8Array(P):new Array(P),b=x=0;x<P;b++)(64512&(m=v.charCodeAt(b)))==55296&&b+1<A&&(64512&(f=v.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),b++),m<128?u[x++]=m:(m<2048?u[x++]=192|m>>>6:(m<65536?u[x++]=224|m>>>12:(u[x++]=240|m>>>18,u[x++]=128|m>>>12&63),u[x++]=128|m>>>6&63),u[x++]=128|63&m);return u}(d)},n.utf8decode=function(d){return i.nodebuffer?a.transformTo("nodebuffer",d).toString("utf-8"):function(v){var u,m,f,b,x=v.length,A=new Array(2*x);for(u=m=0;u<x;)if((f=v[u++])<128)A[m++]=f;else if(4<(b=k[f]))A[m++]=65533,u+=b-1;else{for(f&=b===2?31:b===3?15:7;1<b&&u<x;)f=f<<6|63&v[u++],b--;1<b?A[m++]=65533:f<65536?A[m++]=f:(f-=65536,A[m++]=55296|f>>10&1023,A[m++]=56320|1023&f)}return A.length!==m&&(A.subarray?A=A.subarray(0,m):A.length=m),a.applyFromCharCode(A)}(d=a.transformTo(i.uint8array?"uint8array":"array",d))},a.inherits(y,h),y.prototype.processChunk=function(d){var v=a.transformTo(i.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var u=v;(v=new Uint8Array(u.length+this.leftOver.length)).set(this.leftOver,0),v.set(u,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var m=function(b,x){var A;for((x=x||b.length)>b.length&&(x=b.length),A=x-1;0<=A&&(192&b[A])==128;)A--;return A<0||A===0?x:A+k[b[A]]>x?A:x}(v),f=v;m!==v.length&&(i.uint8array?(f=v.subarray(0,m),this.leftOver=v.subarray(m,v.length)):(f=v.slice(0,m),this.leftOver=v.slice(m,v.length))),this.push({data:n.utf8decode(f),meta:d.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=y,a.inherits(_,h),_.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=_},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,n){var a=t("./support"),i=t("./base64"),l=t("./nodejsUtils"),h=t("./external");function k(u){return u}function w(u,m){for(var f=0;f<u.length;++f)m[f]=255&u.charCodeAt(f);return m}t("setimmediate"),n.newBlob=function(u,m){n.checkSupport("blob");try{return new Blob([u],{type:m})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(u),f.getBlob(m)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(u,m,f){var b=[],x=0,A=u.length;if(A<=f)return String.fromCharCode.apply(null,u);for(;x<A;)m==="array"||m==="nodebuffer"?b.push(String.fromCharCode.apply(null,u.slice(x,Math.min(x+f,A)))):b.push(String.fromCharCode.apply(null,u.subarray(x,Math.min(x+f,A)))),x+=f;return b.join("")},stringifyByChar:function(u){for(var m="",f=0;f<u.length;f++)m+=String.fromCharCode(u[f]);return m},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}}()}};function _(u){var m=65536,f=n.getTypeOf(u),b=!0;if(f==="uint8array"?b=y.applyCanBeUsed.uint8array:f==="nodebuffer"&&(b=y.applyCanBeUsed.nodebuffer),b)for(;1<m;)try{return y.stringifyByChunk(u,f,m)}catch{m=Math.floor(m/2)}return y.stringifyByChar(u)}function d(u,m){for(var f=0;f<u.length;f++)m[f]=u[f];return m}n.applyFromCharCode=_;var v={};v.string={string:k,array:function(u){return w(u,new Array(u.length))},arraybuffer:function(u){return v.string.uint8array(u).buffer},uint8array:function(u){return w(u,new Uint8Array(u.length))},nodebuffer:function(u){return w(u,l.allocBuffer(u.length))}},v.array={string:_,array:k,arraybuffer:function(u){return new Uint8Array(u).buffer},uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return l.newBufferFrom(u)}},v.arraybuffer={string:function(u){return _(new Uint8Array(u))},array:function(u){return d(new Uint8Array(u),new Array(u.byteLength))},arraybuffer:k,uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return l.newBufferFrom(new Uint8Array(u))}},v.uint8array={string:_,array:function(u){return d(u,new Array(u.length))},arraybuffer:function(u){return u.buffer},uint8array:k,nodebuffer:function(u){return l.newBufferFrom(u)}},v.nodebuffer={string:_,array:function(u){return d(u,new Array(u.length))},arraybuffer:function(u){return v.nodebuffer.uint8array(u).buffer},uint8array:function(u){return d(u,new Uint8Array(u.length))},nodebuffer:k},n.transformTo=function(u,m){if(m=m||"",!u)return m;n.checkSupport(u);var f=n.getTypeOf(m);return v[f][u](m)},n.resolve=function(u){for(var m=u.split("/"),f=[],b=0;b<m.length;b++){var x=m[b];x==="."||x===""&&b!==0&&b!==m.length-1||(x===".."?f.pop():f.push(x))}return f.join("/")},n.getTypeOf=function(u){return typeof u=="string"?"string":Object.prototype.toString.call(u)==="[object Array]"?"array":a.nodebuffer&&l.isBuffer(u)?"nodebuffer":a.uint8array&&u instanceof Uint8Array?"uint8array":a.arraybuffer&&u instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(u){if(!a[u.toLowerCase()])throw new Error(u+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(u){var m,f,b="";for(f=0;f<(u||"").length;f++)b+="\\x"+((m=u.charCodeAt(f))<16?"0":"")+m.toString(16).toUpperCase();return b},n.delay=function(u,m,f){setImmediate(function(){u.apply(f||null,m||[])})},n.inherits=function(u,m){function f(){}f.prototype=m.prototype,u.prototype=new f},n.extend=function(){var u,m,f={};for(u=0;u<arguments.length;u++)for(m in arguments[u])Object.prototype.hasOwnProperty.call(arguments[u],m)&&f[m]===void 0&&(f[m]=arguments[u][m]);return f},n.prepareContent=function(u,m,f,b,x){return h.Promise.resolve(m).then(function(A){return a.blob&&(A instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(A))!==-1)&&typeof FileReader<"u"?new h.Promise(function(P,D){var F=new FileReader;F.onload=function(H){P(H.target.result)},F.onerror=function(H){D(H.target.error)},F.readAsArrayBuffer(A)}):A}).then(function(A){var P=n.getTypeOf(A);return P?(P==="arraybuffer"?A=n.transformTo("uint8array",A):P==="string"&&(x?A=i.decode(A):f&&b!==!0&&(A=function(D){return w(D,a.uint8array?new Uint8Array(D.length):new Array(D.length))}(A))),A):h.Promise.reject(new Error("Can't read the data of '"+u+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,r,n){var a=t("./reader/readerFor"),i=t("./utils"),l=t("./signature"),h=t("./zipEntry"),k=t("./support");function w(y){this.files=[],this.loadOptions=y}w.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var _=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(_)+", expected "+i.pretty(y)+")")}},isSignature:function(y,_){var d=this.reader.index;this.reader.setIndex(y);var v=this.reader.readString(4)===_;return this.reader.setIndex(d),v},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 y=this.reader.readData(this.zipCommentLength),_=k.uint8array?"uint8array":"array",d=i.transformTo(_,y);this.zipComment=this.loadOptions.decodeFileName(d)},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 y,_,d,v=this.zip64EndOfCentralSize-44;0<v;)y=this.reader.readInt(2),_=this.reader.readInt(4),d=this.reader.readData(_),this.zip64ExtensibleData[y]={id:y,length:_,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,_;for(y=0;y<this.files.length;y++)_=this.files[y],this.reader.setIndex(_.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),_.readLocalPart(this.reader),_.handleUTF8(),_.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(y=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&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 y=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,l.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(y);var _=y;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var v=_-d;if(0<v)this.isSignature(_,l.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(y){this.reader=a(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=w},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r,n){var a=t("./reader/readerFor"),i=t("./utils"),l=t("./compressedObject"),h=t("./crc32"),k=t("./utf8"),w=t("./compressions"),y=t("./support");function _(d,v){this.options=d,this.loadOptions=v}_.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var v,u;if(d.skip(22),this.fileNameLength=d.readInt(2),u=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(u),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((v=function(m){for(var f in w)if(Object.prototype.hasOwnProperty.call(w,f)&&w[f].magic===m)return w[f];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,v,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var v=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(v),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=a(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var v,u,m,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<f;)v=d.readInt(2),u=d.readInt(2),m=d.readData(u),this.extraFields[v]={id:v,length:u,value:m};d.setIndex(f)},handleUTF8:function(){var d=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=k.utf8decode(this.fileName),this.fileCommentStr=k.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var u=i.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(u)}var m=this.findExtraFieldUnicodeComment();if(m!==null)this.fileCommentStr=m;else{var f=i.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var v=a(d.value);return v.readInt(1)!==1||h(this.fileName)!==v.readInt(4)?null:k.utf8decode(v.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var v=a(d.value);return v.readInt(1)!==1||h(this.fileComment)!==v.readInt(4)?null:k.utf8decode(v.readData(d.length-5))}return null}},r.exports=_},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,n){function a(v,u,m){this.name=v,this.dir=m.dir,this.date=m.date,this.comment=m.comment,this.unixPermissions=m.unixPermissions,this.dosPermissions=m.dosPermissions,this._data=u,this._dataBinary=m.binary,this.options={compression:m.compression,compressionOptions:m.compressionOptions}}var i=t("./stream/StreamHelper"),l=t("./stream/DataWorker"),h=t("./utf8"),k=t("./compressedObject"),w=t("./stream/GenericWorker");a.prototype={internalStream:function(v){var u=null,m="string";try{if(!v)throw new Error("No output type specified.");var f=(m=v.toLowerCase())==="string"||m==="text";m!=="binarystring"&&m!=="text"||(m="string"),u=this._decompressWorker();var b=!this._dataBinary;b&&!f&&(u=u.pipe(new h.Utf8EncodeWorker)),!b&&f&&(u=u.pipe(new h.Utf8DecodeWorker))}catch(x){(u=new w("error")).error(x)}return new i(u,m,"")},async:function(v,u){return this.internalStream(v).accumulate(u)},nodeStream:function(v,u){return this.internalStream(v||"nodebuffer").toNodejsStream(u)},_compressWorker:function(v,u){if(this._data instanceof k&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new h.Utf8EncodeWorker)),k.createWorkerFrom(m,v,u)},_decompressWorker:function(){return this._data instanceof k?this._data.getContentWorker():this._data instanceof w?this._data:new l(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],_=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<y.length;d++)a.prototype[y[d]]=_;r.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,n){(function(a){var i,l,h=a.MutationObserver||a.WebKitMutationObserver;if(h){var k=0,w=new h(v),y=a.document.createTextNode("");w.observe(y,{characterData:!0}),i=function(){y.data=k=++k%2}}else if(a.setImmediate||a.MessageChannel===void 0)i="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var u=a.document.createElement("script");u.onreadystatechange=function(){v(),u.onreadystatechange=null,u.parentNode.removeChild(u),u=null},a.document.documentElement.appendChild(u)}:function(){setTimeout(v,0)};else{var _=new a.MessageChannel;_.port1.onmessage=v,i=function(){_.port2.postMessage(0)}}var d=[];function v(){var u,m;l=!0;for(var f=d.length;f;){for(m=d,d=[],u=-1;++u<f;)m[u]();f=d.length}l=!1}r.exports=function(u){d.push(u)!==1||l||i()}}).call(this,typeof Tt<"u"?Tt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,r,n){var a=t("immediate");function i(){}var l={},h=["REJECTED"],k=["FULFILLED"],w=["PENDING"];function y(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,f!==i&&u(this,f)}function _(f,b,x){this.promise=f,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function d(f,b,x){a(function(){var A;try{A=b(x)}catch(P){return l.reject(f,P)}A===f?l.reject(f,new TypeError("Cannot resolve promise with itself")):l.resolve(f,A)})}function v(f){var b=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof b=="function")return function(){b.apply(f,arguments)}}function u(f,b){var x=!1;function A(F){x||(x=!0,l.reject(f,F))}function P(F){x||(x=!0,l.resolve(f,F))}var D=m(function(){b(P,A)});D.status==="error"&&A(D.value)}function m(f,b){var x={};try{x.value=f(b),x.status="success"}catch(A){x.status="error",x.value=A}return x}(r.exports=y).prototype.finally=function(f){if(typeof f!="function")return this;var b=this.constructor;return this.then(function(x){return b.resolve(f()).then(function(){return x})},function(x){return b.resolve(f()).then(function(){throw x})})},y.prototype.catch=function(f){return this.then(null,f)},y.prototype.then=function(f,b){if(typeof f!="function"&&this.state===k||typeof b!="function"&&this.state===h)return this;var x=new this.constructor(i);return this.state!==w?d(x,this.state===k?f:b,this.outcome):this.queue.push(new _(x,f,b)),x},_.prototype.callFulfilled=function(f){l.resolve(this.promise,f)},_.prototype.otherCallFulfilled=function(f){d(this.promise,this.onFulfilled,f)},_.prototype.callRejected=function(f){l.reject(this.promise,f)},_.prototype.otherCallRejected=function(f){d(this.promise,this.onRejected,f)},l.resolve=function(f,b){var x=m(v,b);if(x.status==="error")return l.reject(f,x.value);var A=x.value;if(A)u(f,A);else{f.state=k,f.outcome=b;for(var P=-1,D=f.queue.length;++P<D;)f.queue[P].callFulfilled(b)}return f},l.reject=function(f,b){f.state=h,f.outcome=b;for(var x=-1,A=f.queue.length;++x<A;)f.queue[x].callRejected(b);return f},y.resolve=function(f){return f instanceof this?f:l.resolve(new this(i),f)},y.reject=function(f){var b=new this(i);return l.reject(b,f)},y.all=function(f){var b=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,A=!1;if(!x)return this.resolve([]);for(var P=new Array(x),D=0,F=-1,H=new this(i);++F<x;)T(f[F],F);return H;function T(X,Q){b.resolve(X).then(function(S){P[Q]=S,++D!==x||A||(A=!0,l.resolve(H,P))},function(S){A||(A=!0,l.reject(H,S))})}},y.race=function(f){var b=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,A=!1;if(!x)return this.resolve([]);for(var P=-1,D=new this(i);++P<x;)F=f[P],b.resolve(F).then(function(H){A||(A=!0,l.resolve(D,H))},function(H){A||(A=!0,l.reject(D,H))});var F;return D}},{immediate:36}],38:[function(t,r,n){var a={};(0,t("./lib/utils/common").assign)(a,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),r.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,r,n){var a=t("./zlib/deflate"),i=t("./utils/common"),l=t("./utils/strings"),h=t("./zlib/messages"),k=t("./zlib/zstream"),w=Object.prototype.toString,y=0,_=-1,d=0,v=8;function u(f){if(!(this instanceof u))return new u(f);this.options=i.assign({level:_,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},f||{});var b=this.options;b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var x=a.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(x!==y)throw new Error(h[x]);if(b.header&&a.deflateSetHeader(this.strm,b.header),b.dictionary){var A;if(A=typeof b.dictionary=="string"?l.string2buf(b.dictionary):w.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(x=a.deflateSetDictionary(this.strm,A))!==y)throw new Error(h[x]);this._dict_set=!0}}function m(f,b){var x=new u(b);if(x.push(f,!0),x.err)throw x.msg||h[x.err];return x.result}u.prototype.push=function(f,b){var x,A,P=this.strm,D=this.options.chunkSize;if(this.ended)return!1;A=b===~~b?b:b===!0?4:0,typeof f=="string"?P.input=l.string2buf(f):w.call(f)==="[object ArrayBuffer]"?P.input=new Uint8Array(f):P.input=f,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new i.Buf8(D),P.next_out=0,P.avail_out=D),(x=a.deflate(P,A))!==1&&x!==y)return this.onEnd(x),!(this.ended=!0);P.avail_out!==0&&(P.avail_in!==0||A!==4&&A!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(P.output,P.next_out))):this.onData(i.shrinkBuf(P.output,P.next_out)))}while((0<P.avail_in||P.avail_out===0)&&x!==1);return A===4?(x=a.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===y):A!==2||(this.onEnd(y),!(P.avail_out=0))},u.prototype.onData=function(f){this.chunks.push(f)},u.prototype.onEnd=function(f){f===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Deflate=u,n.deflate=m,n.deflateRaw=function(f,b){return(b=b||{}).raw=!0,m(f,b)},n.gzip=function(f,b){return(b=b||{}).gzip=!0,m(f,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,n){var a=t("./zlib/inflate"),i=t("./utils/common"),l=t("./utils/strings"),h=t("./zlib/constants"),k=t("./zlib/messages"),w=t("./zlib/zstream"),y=t("./zlib/gzheader"),_=Object.prototype.toString;function d(u){if(!(this instanceof d))return new d(u);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},u||{});var m=this.options;m.raw&&0<=m.windowBits&&m.windowBits<16&&(m.windowBits=-m.windowBits,m.windowBits===0&&(m.windowBits=-15)),!(0<=m.windowBits&&m.windowBits<16)||u&&u.windowBits||(m.windowBits+=32),15<m.windowBits&&m.windowBits<48&&!(15&m.windowBits)&&(m.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var f=a.inflateInit2(this.strm,m.windowBits);if(f!==h.Z_OK)throw new Error(k[f]);this.header=new y,a.inflateGetHeader(this.strm,this.header)}function v(u,m){var f=new d(m);if(f.push(u,!0),f.err)throw f.msg||k[f.err];return f.result}d.prototype.push=function(u,m){var f,b,x,A,P,D,F=this.strm,H=this.options.chunkSize,T=this.options.dictionary,X=!1;if(this.ended)return!1;b=m===~~m?m:m===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof u=="string"?F.input=l.binstring2buf(u):_.call(u)==="[object ArrayBuffer]"?F.input=new Uint8Array(u):F.input=u,F.next_in=0,F.avail_in=F.input.length;do{if(F.avail_out===0&&(F.output=new i.Buf8(H),F.next_out=0,F.avail_out=H),(f=a.inflate(F,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&T&&(D=typeof T=="string"?l.string2buf(T):_.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,f=a.inflateSetDictionary(this.strm,D)),f===h.Z_BUF_ERROR&&X===!0&&(f=h.Z_OK,X=!1),f!==h.Z_STREAM_END&&f!==h.Z_OK)return this.onEnd(f),!(this.ended=!0);F.next_out&&(F.avail_out!==0&&f!==h.Z_STREAM_END&&(F.avail_in!==0||b!==h.Z_FINISH&&b!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=l.utf8border(F.output,F.next_out),A=F.next_out-x,P=l.buf2string(F.output,x),F.next_out=A,F.avail_out=H-A,A&&i.arraySet(F.output,F.output,x,A,0),this.onData(P)):this.onData(i.shrinkBuf(F.output,F.next_out)))),F.avail_in===0&&F.avail_out===0&&(X=!0)}while((0<F.avail_in||F.avail_out===0)&&f!==h.Z_STREAM_END);return f===h.Z_STREAM_END&&(b=h.Z_FINISH),b===h.Z_FINISH?(f=a.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h.Z_OK):b!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(F.avail_out=0))},d.prototype.onData=function(u){this.chunks.push(u)},d.prototype.onEnd=function(u){u===h.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg},n.Inflate=d,n.inflate=v,n.inflateRaw=function(u,m){return(m=m||{}).raw=!0,v(u,m)},n.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,r,n){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(h){for(var k=Array.prototype.slice.call(arguments,1);k.length;){var w=k.shift();if(w){if(typeof w!="object")throw new TypeError(w+"must be non-object");for(var y in w)w.hasOwnProperty(y)&&(h[y]=w[y])}}return h},n.shrinkBuf=function(h,k){return h.length===k?h:h.subarray?h.subarray(0,k):(h.length=k,h)};var i={arraySet:function(h,k,w,y,_){if(k.subarray&&h.subarray)h.set(k.subarray(w,w+y),_);else for(var d=0;d<y;d++)h[_+d]=k[w+d]},flattenChunks:function(h){var k,w,y,_,d,v;for(k=y=0,w=h.length;k<w;k++)y+=h[k].length;for(v=new Uint8Array(y),k=_=0,w=h.length;k<w;k++)d=h[k],v.set(d,_),_+=d.length;return v}},l={arraySet:function(h,k,w,y,_){for(var d=0;d<y;d++)h[_+d]=k[w+d]},flattenChunks:function(h){return[].concat.apply([],h)}};n.setTyped=function(h){h?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,l))},n.setTyped(a)},{}],42:[function(t,r,n){var a=t("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var h=new a.Buf8(256),k=0;k<256;k++)h[k]=252<=k?6:248<=k?5:240<=k?4:224<=k?3:192<=k?2:1;function w(y,_){if(_<65537&&(y.subarray&&l||!y.subarray&&i))return String.fromCharCode.apply(null,a.shrinkBuf(y,_));for(var d="",v=0;v<_;v++)d+=String.fromCharCode(y[v]);return d}h[254]=h[254]=1,n.string2buf=function(y){var _,d,v,u,m,f=y.length,b=0;for(u=0;u<f;u++)(64512&(d=y.charCodeAt(u)))==55296&&u+1<f&&(64512&(v=y.charCodeAt(u+1)))==56320&&(d=65536+(d-55296<<10)+(v-56320),u++),b+=d<128?1:d<2048?2:d<65536?3:4;for(_=new a.Buf8(b),u=m=0;m<b;u++)(64512&(d=y.charCodeAt(u)))==55296&&u+1<f&&(64512&(v=y.charCodeAt(u+1)))==56320&&(d=65536+(d-55296<<10)+(v-56320),u++),d<128?_[m++]=d:(d<2048?_[m++]=192|d>>>6:(d<65536?_[m++]=224|d>>>12:(_[m++]=240|d>>>18,_[m++]=128|d>>>12&63),_[m++]=128|d>>>6&63),_[m++]=128|63&d);return _},n.buf2binstring=function(y){return w(y,y.length)},n.binstring2buf=function(y){for(var _=new a.Buf8(y.length),d=0,v=_.length;d<v;d++)_[d]=y.charCodeAt(d);return _},n.buf2string=function(y,_){var d,v,u,m,f=_||y.length,b=new Array(2*f);for(d=v=0;d<f;)if((u=y[d++])<128)b[v++]=u;else if(4<(m=h[u]))b[v++]=65533,d+=m-1;else{for(u&=m===2?31:m===3?15:7;1<m&&d<f;)u=u<<6|63&y[d++],m--;1<m?b[v++]=65533:u<65536?b[v++]=u:(u-=65536,b[v++]=55296|u>>10&1023,b[v++]=56320|1023&u)}return w(b,v)},n.utf8border=function(y,_){var d;for((_=_||y.length)>y.length&&(_=y.length),d=_-1;0<=d&&(192&y[d])==128;)d--;return d<0||d===0?_:d+h[y[d]]>_?d:_}},{"./common":41}],43:[function(t,r,n){r.exports=function(a,i,l,h){for(var k=65535&a|0,w=a>>>16&65535|0,y=0;l!==0;){for(l-=y=2e3<l?2e3:l;w=w+(k=k+i[h++]|0)|0,--y;);k%=65521,w%=65521}return k|w<<16|0}},{}],44:[function(t,r,n){r.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(t,r,n){var a=function(){for(var i,l=[],h=0;h<256;h++){i=h;for(var k=0;k<8;k++)i=1&i?3988292384^i>>>1:i>>>1;l[h]=i}return l}();r.exports=function(i,l,h,k){var w=a,y=k+h;i^=-1;for(var _=k;_<y;_++)i=i>>>8^w[255&(i^l[_])];return-1^i}},{}],46:[function(t,r,n){var a,i=t("../utils/common"),l=t("./trees"),h=t("./adler32"),k=t("./crc32"),w=t("./messages"),y=0,_=4,d=0,v=-2,u=-1,m=4,f=2,b=8,x=9,A=286,P=30,D=19,F=2*A+1,H=15,T=3,X=258,Q=X+T+1,S=42,I=113,o=1,L=2,et=3,W=4;function rt(s,O){return s.msg=w[O],O}function $(s){return(s<<1)-(4<s?9:0)}function tt(s){for(var O=s.length;0<=--O;)s[O]=0}function B(s){var O=s.state,M=O.pending;M>s.avail_out&&(M=s.avail_out),M!==0&&(i.arraySet(s.output,O.pending_buf,O.pending_out,M,s.next_out),s.next_out+=M,O.pending_out+=M,s.total_out+=M,s.avail_out-=M,O.pending-=M,O.pending===0&&(O.pending_out=0))}function z(s,O){l._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,O),s.block_start=s.strstart,B(s.strm)}function J(s,O){s.pending_buf[s.pending++]=O}function K(s,O){s.pending_buf[s.pending++]=O>>>8&255,s.pending_buf[s.pending++]=255&O}function G(s,O){var M,g,p=s.max_chain_length,C=s.strstart,j=s.prev_length,U=s.nice_match,N=s.strstart>s.w_size-Q?s.strstart-(s.w_size-Q):0,Z=s.window,Y=s.w_mask,V=s.prev,q=s.strstart+X,ot=Z[C+j-1],st=Z[C+j];s.prev_length>=s.good_match&&(p>>=2),U>s.lookahead&&(U=s.lookahead);do if(Z[(M=O)+j]===st&&Z[M+j-1]===ot&&Z[M]===Z[C]&&Z[++M]===Z[C+1]){C+=2,M++;do;while(Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&C<q);if(g=X-(q-C),C=q-X,j<g){if(s.match_start=O,U<=(j=g))break;ot=Z[C+j-1],st=Z[C+j]}}while((O=V[O&Y])>N&&--p!=0);return j<=s.lookahead?j:s.lookahead}function ut(s){var O,M,g,p,C,j,U,N,Z,Y,V=s.w_size;do{if(p=s.window_size-s.lookahead-s.strstart,s.strstart>=V+(V-Q)){for(i.arraySet(s.window,s.window,V,V,0),s.match_start-=V,s.strstart-=V,s.block_start-=V,O=M=s.hash_size;g=s.head[--O],s.head[O]=V<=g?g-V:0,--M;);for(O=M=V;g=s.prev[--O],s.prev[O]=V<=g?g-V:0,--M;);p+=V}if(s.strm.avail_in===0)break;if(j=s.strm,U=s.window,N=s.strstart+s.lookahead,Z=p,Y=void 0,Y=j.avail_in,Z<Y&&(Y=Z),M=Y===0?0:(j.avail_in-=Y,i.arraySet(U,j.input,j.next_in,Y,N),j.state.wrap===1?j.adler=h(j.adler,U,Y,N):j.state.wrap===2&&(j.adler=k(j.adler,U,Y,N)),j.next_in+=Y,j.total_in+=Y,Y),s.lookahead+=M,s.lookahead+s.insert>=T)for(C=s.strstart-s.insert,s.ins_h=s.window[C],s.ins_h=(s.ins_h<<s.hash_shift^s.window[C+1])&s.hash_mask;s.insert&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[C+T-1])&s.hash_mask,s.prev[C&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=C,C++,s.insert--,!(s.lookahead+s.insert<T)););}while(s.lookahead<Q&&s.strm.avail_in!==0)}function bt(s,O){for(var M,g;;){if(s.lookahead<Q){if(ut(s),s.lookahead<Q&&O===y)return o;if(s.lookahead===0)break}if(M=0,s.lookahead>=T&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+T-1])&s.hash_mask,M=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),M!==0&&s.strstart-M<=s.w_size-Q&&(s.match_length=G(s,M)),s.match_length>=T)if(g=l._tr_tally(s,s.strstart-s.match_start,s.match_length-T),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=T){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+T-1])&s.hash_mask,M=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart,--s.match_length!=0;);s.strstart++}else s.strstart+=s.match_length,s.match_length=0,s.ins_h=s.window[s.strstart],s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask;else g=l._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++;if(g&&(z(s,!1),s.strm.avail_out===0))return o}return s.insert=s.strstart<T-1?s.strstart:T-1,O===_?(z(s,!0),s.strm.avail_out===0?et:W):s.last_lit&&(z(s,!1),s.strm.avail_out===0)?o:L}function nt(s,O){for(var M,g,p;;){if(s.lookahead<Q){if(ut(s),s.lookahead<Q&&O===y)return o;if(s.lookahead===0)break}if(M=0,s.lookahead>=T&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+T-1])&s.hash_mask,M=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),s.prev_length=s.match_length,s.prev_match=s.match_start,s.match_length=T-1,M!==0&&s.prev_length<s.max_lazy_match&&s.strstart-M<=s.w_size-Q&&(s.match_length=G(s,M),s.match_length<=5&&(s.strategy===1||s.match_length===T&&4096<s.strstart-s.match_start)&&(s.match_length=T-1)),s.prev_length>=T&&s.match_length<=s.prev_length){for(p=s.strstart+s.lookahead-T,g=l._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-T),s.lookahead-=s.prev_length-1,s.prev_length-=2;++s.strstart<=p&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+T-1])&s.hash_mask,M=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),--s.prev_length!=0;);if(s.match_available=0,s.match_length=T-1,s.strstart++,g&&(z(s,!1),s.strm.avail_out===0))return o}else if(s.match_available){if((g=l._tr_tally(s,0,s.window[s.strstart-1]))&&z(s,!1),s.strstart++,s.lookahead--,s.strm.avail_out===0)return o}else s.match_available=1,s.strstart++,s.lookahead--}return s.match_available&&(g=l._tr_tally(s,0,s.window[s.strstart-1]),s.match_available=0),s.insert=s.strstart<T-1?s.strstart:T-1,O===_?(z(s,!0),s.strm.avail_out===0?et:W):s.last_lit&&(z(s,!1),s.strm.avail_out===0)?o:L}function it(s,O,M,g,p){this.good_length=s,this.max_lazy=O,this.nice_length=M,this.max_chain=g,this.func=p}function gt(){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=b,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 i.Buf16(2*F),this.dyn_dtree=new i.Buf16(2*(2*P+1)),this.bl_tree=new i.Buf16(2*(2*D+1)),tt(this.dyn_ltree),tt(this.dyn_dtree),tt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(H+1),this.heap=new i.Buf16(2*A+1),tt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*A+1),tt(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 dt(s){var O;return s&&s.state?(s.total_in=s.total_out=0,s.data_type=f,(O=s.state).pending=0,O.pending_out=0,O.wrap<0&&(O.wrap=-O.wrap),O.status=O.wrap?S:I,s.adler=O.wrap===2?0:1,O.last_flush=y,l._tr_init(O),d):rt(s,v)}function _t(s){var O=dt(s);return O===d&&function(M){M.window_size=2*M.w_size,tt(M.head),M.max_lazy_match=a[M.level].max_lazy,M.good_match=a[M.level].good_length,M.nice_match=a[M.level].nice_length,M.max_chain_length=a[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=T-1,M.match_available=0,M.ins_h=0}(s.state),O}function kt(s,O,M,g,p,C){if(!s)return v;var j=1;if(O===u&&(O=6),g<0?(j=0,g=-g):15<g&&(j=2,g-=16),p<1||x<p||M!==b||g<8||15<g||O<0||9<O||C<0||m<C)return rt(s,v);g===8&&(g=9);var U=new gt;return(s.state=U).strm=s,U.wrap=j,U.gzhead=null,U.w_bits=g,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=p+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+T-1)/T),U.window=new i.Buf8(2*U.w_size),U.head=new i.Buf16(U.hash_size),U.prev=new i.Buf16(U.w_size),U.lit_bufsize=1<<p+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new i.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=O,U.strategy=C,U.method=M,_t(s)}a=[new it(0,0,0,0,function(s,O){var M=65535;for(M>s.pending_buf_size-5&&(M=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ut(s),s.lookahead===0&&O===y)return o;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var g=s.block_start+M;if((s.strstart===0||s.strstart>=g)&&(s.lookahead=s.strstart-g,s.strstart=g,z(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-Q&&(z(s,!1),s.strm.avail_out===0))return o}return s.insert=0,O===_?(z(s,!0),s.strm.avail_out===0?et:W):(s.strstart>s.block_start&&(z(s,!1),s.strm.avail_out),o)}),new it(4,4,8,4,bt),new it(4,5,16,8,bt),new it(4,6,32,32,bt),new it(4,4,16,16,nt),new it(8,16,32,32,nt),new it(8,16,128,128,nt),new it(8,32,128,256,nt),new it(32,128,258,1024,nt),new it(32,258,258,4096,nt)],n.deflateInit=function(s,O){return kt(s,O,b,15,8,0)},n.deflateInit2=kt,n.deflateReset=_t,n.deflateResetKeep=dt,n.deflateSetHeader=function(s,O){return s&&s.state?s.state.wrap!==2?v:(s.state.gzhead=O,d):v},n.deflate=function(s,O){var M,g,p,C;if(!s||!s.state||5<O||O<0)return s?rt(s,v):v;if(g=s.state,!s.output||!s.input&&s.avail_in!==0||g.status===666&&O!==_)return rt(s,s.avail_out===0?-5:v);if(g.strm=s,M=g.last_flush,g.last_flush=O,g.status===S)if(g.wrap===2)s.adler=0,J(g,31),J(g,139),J(g,8),g.gzhead?(J(g,(g.gzhead.text?1:0)+(g.gzhead.hcrc?2:0)+(g.gzhead.extra?4:0)+(g.gzhead.name?8:0)+(g.gzhead.comment?16:0)),J(g,255&g.gzhead.time),J(g,g.gzhead.time>>8&255),J(g,g.gzhead.time>>16&255),J(g,g.gzhead.time>>24&255),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,255&g.gzhead.os),g.gzhead.extra&&g.gzhead.extra.length&&(J(g,255&g.gzhead.extra.length),J(g,g.gzhead.extra.length>>8&255)),g.gzhead.hcrc&&(s.adler=k(s.adler,g.pending_buf,g.pending,0)),g.gzindex=0,g.status=69):(J(g,0),J(g,0),J(g,0),J(g,0),J(g,0),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,3),g.status=I);else{var j=b+(g.w_bits-8<<4)<<8;j|=(2<=g.strategy||g.level<2?0:g.level<6?1:g.level===6?2:3)<<6,g.strstart!==0&&(j|=32),j+=31-j%31,g.status=I,K(g,j),g.strstart!==0&&(K(g,s.adler>>>16),K(g,65535&s.adler)),s.adler=1}if(g.status===69)if(g.gzhead.extra){for(p=g.pending;g.gzindex<(65535&g.gzhead.extra.length)&&(g.pending!==g.pending_buf_size||(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending!==g.pending_buf_size));)J(g,255&g.gzhead.extra[g.gzindex]),g.gzindex++;g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),g.gzindex===g.gzhead.extra.length&&(g.gzindex=0,g.status=73)}else g.status=73;if(g.status===73)if(g.gzhead.name){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindex<g.gzhead.name.length?255&g.gzhead.name.charCodeAt(g.gzindex++):0,J(g,C)}while(C!==0);g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.gzindex=0,g.status=91)}else g.status=91;if(g.status===91)if(g.gzhead.comment){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindex<g.gzhead.comment.length?255&g.gzhead.comment.charCodeAt(g.gzindex++):0,J(g,C)}while(C!==0);g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.status=103)}else g.status=103;if(g.status===103&&(g.gzhead.hcrc?(g.pending+2>g.pending_buf_size&&B(s),g.pending+2<=g.pending_buf_size&&(J(g,255&s.adler),J(g,s.adler>>8&255),s.adler=0,g.status=I)):g.status=I),g.pending!==0){if(B(s),s.avail_out===0)return g.last_flush=-1,d}else if(s.avail_in===0&&$(O)<=$(M)&&O!==_)return rt(s,-5);if(g.status===666&&s.avail_in!==0)return rt(s,-5);if(s.avail_in!==0||g.lookahead!==0||O!==y&&g.status!==666){var U=g.strategy===2?function(N,Z){for(var Y;;){if(N.lookahead===0&&(ut(N),N.lookahead===0)){if(Z===y)return o;break}if(N.match_length=0,Y=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,Y&&(z(N,!1),N.strm.avail_out===0))return o}return N.insert=0,Z===_?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?o:L}(g,O):g.strategy===3?function(N,Z){for(var Y,V,q,ot,st=N.window;;){if(N.lookahead<=X){if(ut(N),N.lookahead<=X&&Z===y)return o;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=T&&0<N.strstart&&(V=st[q=N.strstart-1])===st[++q]&&V===st[++q]&&V===st[++q]){ot=N.strstart+X;do;while(V===st[++q]&&V===st[++q]&&V===st[++q]&&V===st[++q]&&V===st[++q]&&V===st[++q]&&V===st[++q]&&V===st[++q]&&q<ot);N.match_length=X-(ot-q),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=T?(Y=l._tr_tally(N,1,N.match_length-T),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(Y=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),Y&&(z(N,!1),N.strm.avail_out===0))return o}return N.insert=0,Z===_?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?o:L}(g,O):a[g.level].func(g,O);if(U!==et&&U!==W||(g.status=666),U===o||U===et)return s.avail_out===0&&(g.last_flush=-1),d;if(U===L&&(O===1?l._tr_align(g):O!==5&&(l._tr_stored_block(g,0,0,!1),O===3&&(tt(g.head),g.lookahead===0&&(g.strstart=0,g.block_start=0,g.insert=0))),B(s),s.avail_out===0))return g.last_flush=-1,d}return O!==_?d:g.wrap<=0?1:(g.wrap===2?(J(g,255&s.adler),J(g,s.adler>>8&255),J(g,s.adler>>16&255),J(g,s.adler>>24&255),J(g,255&s.total_in),J(g,s.total_in>>8&255),J(g,s.total_in>>16&255),J(g,s.total_in>>24&255)):(K(g,s.adler>>>16),K(g,65535&s.adler)),B(s),0<g.wrap&&(g.wrap=-g.wrap),g.pending!==0?d:1)},n.deflateEnd=function(s){var O;return s&&s.state?(O=s.state.status)!==S&&O!==69&&O!==73&&O!==91&&O!==103&&O!==I&&O!==666?rt(s,v):(s.state=null,O===I?rt(s,-3):d):v},n.deflateSetDictionary=function(s,O){var M,g,p,C,j,U,N,Z,Y=O.length;if(!s||!s.state||(C=(M=s.state).wrap)===2||C===1&&M.status!==S||M.lookahead)return v;for(C===1&&(s.adler=h(s.adler,O,Y,0)),M.wrap=0,Y>=M.w_size&&(C===0&&(tt(M.head),M.strstart=0,M.block_start=0,M.insert=0),Z=new i.Buf8(M.w_size),i.arraySet(Z,O,Y-M.w_size,M.w_size,0),O=Z,Y=M.w_size),j=s.avail_in,U=s.next_in,N=s.input,s.avail_in=Y,s.next_in=0,s.input=O,ut(M);M.lookahead>=T;){for(g=M.strstart,p=M.lookahead-(T-1);M.ins_h=(M.ins_h<<M.hash_shift^M.window[g+T-1])&M.hash_mask,M.prev[g&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=g,g++,--p;);M.strstart=g,M.lookahead=T-1,ut(M)}return M.strstart+=M.lookahead,M.block_start=M.strstart,M.insert=M.lookahead,M.lookahead=0,M.match_length=M.prev_length=T-1,M.match_available=0,s.next_in=U,s.input=N,s.avail_in=j,M.wrap=C,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r,n){r.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(t,r,n){r.exports=function(a,i){var l,h,k,w,y,_,d,v,u,m,f,b,x,A,P,D,F,H,T,X,Q,S,I,o,L;l=a.state,h=a.next_in,o=a.input,k=h+(a.avail_in-5),w=a.next_out,L=a.output,y=w-(i-a.avail_out),_=w+(a.avail_out-257),d=l.dmax,v=l.wsize,u=l.whave,m=l.wnext,f=l.window,b=l.hold,x=l.bits,A=l.lencode,P=l.distcode,D=(1<<l.lenbits)-1,F=(1<<l.distbits)-1;t:do{x<15&&(b+=o[h++]<<x,x+=8,b+=o[h++]<<x,x+=8),H=A[b&D];e:for(;;){if(b>>>=T=H>>>24,x-=T,(T=H>>>16&255)===0)L[w++]=65535&H;else{if(!(16&T)){if(!(64&T)){H=A[(65535&H)+(b&(1<<T)-1)];continue e}if(32&T){l.mode=12;break t}a.msg="invalid literal/length code",l.mode=30;break t}X=65535&H,(T&=15)&&(x<T&&(b+=o[h++]<<x,x+=8),X+=b&(1<<T)-1,b>>>=T,x-=T),x<15&&(b+=o[h++]<<x,x+=8,b+=o[h++]<<x,x+=8),H=P[b&F];r:for(;;){if(b>>>=T=H>>>24,x-=T,!(16&(T=H>>>16&255))){if(!(64&T)){H=P[(65535&H)+(b&(1<<T)-1)];continue r}a.msg="invalid distance code",l.mode=30;break t}if(Q=65535&H,x<(T&=15)&&(b+=o[h++]<<x,(x+=8)<T&&(b+=o[h++]<<x,x+=8)),d<(Q+=b&(1<<T)-1)){a.msg="invalid distance too far back",l.mode=30;break t}if(b>>>=T,x-=T,(T=w-y)<Q){if(u<(T=Q-T)&&l.sane){a.msg="invalid distance too far back",l.mode=30;break t}if(I=f,(S=0)===m){if(S+=v-T,T<X){for(X-=T;L[w++]=f[S++],--T;);S=w-Q,I=L}}else if(m<T){if(S+=v+m-T,(T-=m)<X){for(X-=T;L[w++]=f[S++],--T;);if(S=0,m<X){for(X-=T=m;L[w++]=f[S++],--T;);S=w-Q,I=L}}}else if(S+=m-T,T<X){for(X-=T;L[w++]=f[S++],--T;);S=w-Q,I=L}for(;2<X;)L[w++]=I[S++],L[w++]=I[S++],L[w++]=I[S++],X-=3;X&&(L[w++]=I[S++],1<X&&(L[w++]=I[S++]))}else{for(S=w-Q;L[w++]=L[S++],L[w++]=L[S++],L[w++]=L[S++],2<(X-=3););X&&(L[w++]=L[S++],1<X&&(L[w++]=L[S++]))}break}}break}}while(h<k&&w<_);h-=X=x>>3,b&=(1<<(x-=X<<3))-1,a.next_in=h,a.next_out=w,a.avail_in=h<k?k-h+5:5-(h-k),a.avail_out=w<_?_-w+257:257-(w-_),l.hold=b,l.bits=x}},{}],49:[function(t,r,n){var a=t("../utils/common"),i=t("./adler32"),l=t("./crc32"),h=t("./inffast"),k=t("./inftrees"),w=1,y=2,_=0,d=-2,v=1,u=852,m=592;function f(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function b(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(S){var I;return S&&S.state?(I=S.state,S.total_in=S.total_out=I.total=0,S.msg="",I.wrap&&(S.adler=1&I.wrap),I.mode=v,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new a.Buf32(u),I.distcode=I.distdyn=new a.Buf32(m),I.sane=1,I.back=-1,_):d}function A(S){var I;return S&&S.state?((I=S.state).wsize=0,I.whave=0,I.wnext=0,x(S)):d}function P(S,I){var o,L;return S&&S.state?(L=S.state,I<0?(o=0,I=-I):(o=1+(I>>4),I<48&&(I&=15)),I&&(I<8||15<I)?d:(L.window!==null&&L.wbits!==I&&(L.window=null),L.wrap=o,L.wbits=I,A(S))):d}function D(S,I){var o,L;return S?(L=new b,(S.state=L).window=null,(o=P(S,I))!==_&&(S.state=null),o):d}var F,H,T=!0;function X(S){if(T){var I;for(F=new a.Buf32(512),H=new a.Buf32(32),I=0;I<144;)S.lens[I++]=8;for(;I<256;)S.lens[I++]=9;for(;I<280;)S.lens[I++]=7;for(;I<288;)S.lens[I++]=8;for(k(w,S.lens,0,288,F,0,S.work,{bits:9}),I=0;I<32;)S.lens[I++]=5;k(y,S.lens,0,32,H,0,S.work,{bits:5}),T=!1}S.lencode=F,S.lenbits=9,S.distcode=H,S.distbits=5}function Q(S,I,o,L){var et,W=S.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new a.Buf8(W.wsize)),L>=W.wsize?(a.arraySet(W.window,I,o-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(L<(et=W.wsize-W.wnext)&&(et=L),a.arraySet(W.window,I,o-L,et,W.wnext),(L-=et)?(a.arraySet(W.window,I,o-L,L,0),W.wnext=L,W.whave=W.wsize):(W.wnext+=et,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=et))),0}n.inflateReset=A,n.inflateReset2=P,n.inflateResetKeep=x,n.inflateInit=function(S){return D(S,15)},n.inflateInit2=D,n.inflate=function(S,I){var o,L,et,W,rt,$,tt,B,z,J,K,G,ut,bt,nt,it,gt,dt,_t,kt,s,O,M,g,p=0,C=new a.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return d;(o=S.state).mode===12&&(o.mode=13),rt=S.next_out,et=S.output,tt=S.avail_out,W=S.next_in,L=S.input,$=S.avail_in,B=o.hold,z=o.bits,J=$,K=tt,O=_;t:for(;;)switch(o.mode){case v:if(o.wrap===0){o.mode=13;break}for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(2&o.wrap&&B===35615){C[o.check=0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0),z=B=0,o.mode=2;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&B)<<8)+(B>>8))%31){S.msg="incorrect header check",o.mode=30;break}if((15&B)!=8){S.msg="unknown compression method",o.mode=30;break}if(z-=4,s=8+(15&(B>>>=4)),o.wbits===0)o.wbits=s;else if(s>o.wbits){S.msg="invalid window size",o.mode=30;break}o.dmax=1<<s,S.adler=o.check=1,o.mode=512&B?10:12,z=B=0;break;case 2:for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(o.flags=B,(255&o.flags)!=8){S.msg="unknown compression method",o.mode=30;break}if(57344&o.flags){S.msg="unknown header flags set",o.mode=30;break}o.head&&(o.head.text=B>>8&1),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0)),z=B=0,o.mode=3;case 3:for(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.head&&(o.head.time=B),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,C[2]=B>>>16&255,C[3]=B>>>24&255,o.check=l(o.check,C,4,0)),z=B=0,o.mode=4;case 4:for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.head&&(o.head.xflags=255&B,o.head.os=B>>8),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0)),z=B=0,o.mode=5;case 5:if(1024&o.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.length=B,o.head&&(o.head.extra_len=B),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0)),z=B=0}else o.head&&(o.head.extra=null);o.mode=6;case 6:if(1024&o.flags&&($<(G=o.length)&&(G=$),G&&(o.head&&(s=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),a.arraySet(o.head.extra,L,W,G,s)),512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,o.length-=G),o.length))break t;o.length=0,o.mode=7;case 7:if(2048&o.flags){if($===0)break t;for(G=0;s=L[W+G++],o.head&&s&&o.length<65536&&(o.head.name+=String.fromCharCode(s)),s&&G<$;);if(512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,s)break t}else o.head&&(o.head.name=null);o.length=0,o.mode=8;case 8:if(4096&o.flags){if($===0)break t;for(G=0;s=L[W+G++],o.head&&s&&o.length<65536&&(o.head.comment+=String.fromCharCode(s)),s&&G<$;);if(512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,s)break t}else o.head&&(o.head.comment=null);o.mode=9;case 9:if(512&o.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B!==(65535&o.check)){S.msg="header crc mismatch",o.mode=30;break}z=B=0}o.head&&(o.head.hcrc=o.flags>>9&1,o.head.done=!0),S.adler=o.check=0,o.mode=12;break;case 10:for(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}S.adler=o.check=f(B),z=B=0,o.mode=11;case 11:if(o.havedict===0)return S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,o.hold=B,o.bits=z,2;S.adler=o.check=1,o.mode=12;case 12:if(I===5||I===6)break t;case 13:if(o.last){B>>>=7&z,z-=7&z,o.mode=27;break}for(;z<3;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}switch(o.last=1&B,z-=1,3&(B>>>=1)){case 0:o.mode=14;break;case 1:if(X(o),o.mode=20,I!==6)break;B>>>=2,z-=2;break t;case 2:o.mode=17;break;case 3:S.msg="invalid block type",o.mode=30}B>>>=2,z-=2;break;case 14:for(B>>>=7&z,z-=7&z;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if((65535&B)!=(B>>>16^65535)){S.msg="invalid stored block lengths",o.mode=30;break}if(o.length=65535&B,z=B=0,o.mode=15,I===6)break t;case 15:o.mode=16;case 16:if(G=o.length){if($<G&&(G=$),tt<G&&(G=tt),G===0)break t;a.arraySet(et,L,W,G,rt),$-=G,W+=G,tt-=G,rt+=G,o.length-=G;break}o.mode=12;break;case 17:for(;z<14;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(o.nlen=257+(31&B),B>>>=5,z-=5,o.ndist=1+(31&B),B>>>=5,z-=5,o.ncode=4+(15&B),B>>>=4,z-=4,286<o.nlen||30<o.ndist){S.msg="too many length or distance symbols",o.mode=30;break}o.have=0,o.mode=18;case 18:for(;o.have<o.ncode;){for(;z<3;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.lens[j[o.have++]]=7&B,B>>>=3,z-=3}for(;o.have<19;)o.lens[j[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,M={bits:o.lenbits},O=k(0,o.lens,0,19,o.lencode,0,o.work,M),o.lenbits=M.bits,O){S.msg="invalid code lengths set",o.mode=30;break}o.have=0,o.mode=19;case 19:for(;o.have<o.nlen+o.ndist;){for(;it=(p=o.lencode[B&(1<<o.lenbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(gt<16)B>>>=nt,z-=nt,o.lens[o.have++]=gt;else{if(gt===16){for(g=nt+2;z<g;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B>>>=nt,z-=nt,o.have===0){S.msg="invalid bit length repeat",o.mode=30;break}s=o.lens[o.have-1],G=3+(3&B),B>>>=2,z-=2}else if(gt===17){for(g=nt+3;z<g;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}z-=nt,s=0,G=3+(7&(B>>>=nt)),B>>>=3,z-=3}else{for(g=nt+7;z<g;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}z-=nt,s=0,G=11+(127&(B>>>=nt)),B>>>=7,z-=7}if(o.have+G>o.nlen+o.ndist){S.msg="invalid bit length repeat",o.mode=30;break}for(;G--;)o.lens[o.have++]=s}}if(o.mode===30)break;if(o.lens[256]===0){S.msg="invalid code -- missing end-of-block",o.mode=30;break}if(o.lenbits=9,M={bits:o.lenbits},O=k(w,o.lens,0,o.nlen,o.lencode,0,o.work,M),o.lenbits=M.bits,O){S.msg="invalid literal/lengths set",o.mode=30;break}if(o.distbits=6,o.distcode=o.distdyn,M={bits:o.distbits},O=k(y,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,M),o.distbits=M.bits,O){S.msg="invalid distances set",o.mode=30;break}if(o.mode=20,I===6)break t;case 20:o.mode=21;case 21:if(6<=$&&258<=tt){S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,o.hold=B,o.bits=z,h(S,K),rt=S.next_out,et=S.output,tt=S.avail_out,W=S.next_in,L=S.input,$=S.avail_in,B=o.hold,z=o.bits,o.mode===12&&(o.back=-1);break}for(o.back=0;it=(p=o.lencode[B&(1<<o.lenbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(it&&!(240&it)){for(dt=nt,_t=it,kt=gt;it=(p=o.lencode[kt+((B&(1<<dt+_t)-1)>>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}B>>>=dt,z-=dt,o.back+=dt}if(B>>>=nt,z-=nt,o.back+=nt,o.length=gt,it===0){o.mode=26;break}if(32&it){o.back=-1,o.mode=12;break}if(64&it){S.msg="invalid literal/length code",o.mode=30;break}o.extra=15&it,o.mode=22;case 22:if(o.extra){for(g=o.extra;z<g;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.length+=B&(1<<o.extra)-1,B>>>=o.extra,z-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=23;case 23:for(;it=(p=o.distcode[B&(1<<o.distbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(!(240&it)){for(dt=nt,_t=it,kt=gt;it=(p=o.distcode[kt+((B&(1<<dt+_t)-1)>>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}B>>>=dt,z-=dt,o.back+=dt}if(B>>>=nt,z-=nt,o.back+=nt,64&it){S.msg="invalid distance code",o.mode=30;break}o.offset=gt,o.extra=15&it,o.mode=24;case 24:if(o.extra){for(g=o.extra;z<g;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}o.offset+=B&(1<<o.extra)-1,B>>>=o.extra,z-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){S.msg="invalid distance too far back",o.mode=30;break}o.mode=25;case 25:if(tt===0)break t;if(G=K-tt,o.offset>G){if((G=o.offset-G)>o.whave&&o.sane){S.msg="invalid distance too far back",o.mode=30;break}ut=G>o.wnext?(G-=o.wnext,o.wsize-G):o.wnext-G,G>o.length&&(G=o.length),bt=o.window}else bt=et,ut=rt-o.offset,G=o.length;for(tt<G&&(G=tt),tt-=G,o.length-=G;et[rt++]=bt[ut++],--G;);o.length===0&&(o.mode=21);break;case 26:if(tt===0)break t;et[rt++]=o.length,tt--,o.mode=21;break;case 27:if(o.wrap){for(;z<32;){if($===0)break t;$--,B|=L[W++]<<z,z+=8}if(K-=tt,S.total_out+=K,o.total+=K,K&&(S.adler=o.check=o.flags?l(o.check,et,K,rt-K):i(o.check,et,K,rt-K)),K=tt,(o.flags?B:f(B))!==o.check){S.msg="incorrect data check",o.mode=30;break}z=B=0}o.mode=28;case 28:if(o.wrap&&o.flags){for(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B!==(4294967295&o.total)){S.msg="incorrect length check",o.mode=30;break}z=B=0}o.mode=29;case 29:O=1;break t;case 30:O=-3;break t;case 31:return-4;case 32:default:return d}return S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,o.hold=B,o.bits=z,(o.wsize||K!==S.avail_out&&o.mode<30&&(o.mode<27||I!==4))&&Q(S,S.output,S.next_out,K-S.avail_out)?(o.mode=31,-4):(J-=S.avail_in,K-=S.avail_out,S.total_in+=J,S.total_out+=K,o.total+=K,o.wrap&&K&&(S.adler=o.check=o.flags?l(o.check,et,K,S.next_out-K):i(o.check,et,K,S.next_out-K)),S.data_type=o.bits+(o.last?64:0)+(o.mode===12?128:0)+(o.mode===20||o.mode===15?256:0),(J==0&&K===0||I===4)&&O===_&&(O=-5),O)},n.inflateEnd=function(S){if(!S||!S.state)return d;var I=S.state;return I.window&&(I.window=null),S.state=null,_},n.inflateGetHeader=function(S,I){var o;return S&&S.state&&2&(o=S.state).wrap?((o.head=I).done=!1,_):d},n.inflateSetDictionary=function(S,I){var o,L=I.length;return S&&S.state?(o=S.state).wrap!==0&&o.mode!==11?d:o.mode===11&&i(1,I,L,0)!==o.check?-3:Q(S,I,L,L)?(o.mode=31,-4):(o.havedict=1,_):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r,n){var a=t("../utils/common"),i=[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],l=[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],h=[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],k=[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];r.exports=function(w,y,_,d,v,u,m,f){var b,x,A,P,D,F,H,T,X,Q=f.bits,S=0,I=0,o=0,L=0,et=0,W=0,rt=0,$=0,tt=0,B=0,z=null,J=0,K=new a.Buf16(16),G=new a.Buf16(16),ut=null,bt=0;for(S=0;S<=15;S++)K[S]=0;for(I=0;I<d;I++)K[y[_+I]]++;for(et=Q,L=15;1<=L&&K[L]===0;L--);if(L<et&&(et=L),L===0)return v[u++]=20971520,v[u++]=20971520,f.bits=1,0;for(o=1;o<L&&K[o]===0;o++);for(et<o&&(et=o),S=$=1;S<=15;S++)if($<<=1,($-=K[S])<0)return-1;if(0<$&&(w===0||L!==1))return-1;for(G[1]=0,S=1;S<15;S++)G[S+1]=G[S]+K[S];for(I=0;I<d;I++)y[_+I]!==0&&(m[G[y[_+I]]++]=I);if(F=w===0?(z=ut=m,19):w===1?(z=i,J-=257,ut=l,bt-=257,256):(z=h,ut=k,-1),S=o,D=u,rt=I=B=0,A=-1,P=(tt=1<<(W=et))-1,w===1&&852<tt||w===2&&592<tt)return 1;for(;;){for(H=S-rt,X=m[I]<F?(T=0,m[I]):m[I]>F?(T=ut[bt+m[I]],z[J+m[I]]):(T=96,0),b=1<<S-rt,o=x=1<<W;v[D+(B>>rt)+(x-=b)]=H<<24|T<<16|X|0,x!==0;);for(b=1<<S-1;B&b;)b>>=1;if(b!==0?(B&=b-1,B+=b):B=0,I++,--K[S]==0){if(S===L)break;S=y[_+m[I]]}if(et<S&&(B&P)!==A){for(rt===0&&(rt=et),D+=o,$=1<<(W=S-rt);W+rt<L&&!(($-=K[W+rt])<=0);)W++,$<<=1;if(tt+=1<<W,w===1&&852<tt||w===2&&592<tt)return 1;v[A=B&P]=et<<24|W<<16|D-u|0}}return B!==0&&(v[D+B]=S-rt<<24|64<<16|0),f.bits=et,0}},{"../utils/common":41}],51:[function(t,r,n){r.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(t,r,n){var a=t("../utils/common"),i=0,l=1;function h(p){for(var C=p.length;0<=--C;)p[C]=0}var k=0,w=29,y=256,_=y+1+w,d=30,v=19,u=2*_+1,m=15,f=16,b=7,x=256,A=16,P=17,D=18,F=[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],H=[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],X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(_+2));h(Q);var S=new Array(2*d);h(S);var I=new Array(512);h(I);var o=new Array(256);h(o);var L=new Array(w);h(L);var et,W,rt,$=new Array(d);function tt(p,C,j,U,N){this.static_tree=p,this.extra_bits=C,this.extra_base=j,this.elems=U,this.max_length=N,this.has_stree=p&&p.length}function B(p,C){this.dyn_tree=p,this.max_code=0,this.stat_desc=C}function z(p){return p<256?I[p]:I[256+(p>>>7)]}function J(p,C){p.pending_buf[p.pending++]=255&C,p.pending_buf[p.pending++]=C>>>8&255}function K(p,C,j){p.bi_valid>f-j?(p.bi_buf|=C<<p.bi_valid&65535,J(p,p.bi_buf),p.bi_buf=C>>f-p.bi_valid,p.bi_valid+=j-f):(p.bi_buf|=C<<p.bi_valid&65535,p.bi_valid+=j)}function G(p,C,j){K(p,j[2*C],j[2*C+1])}function ut(p,C){for(var j=0;j|=1&p,p>>>=1,j<<=1,0<--C;);return j>>>1}function bt(p,C,j){var U,N,Z=new Array(m+1),Y=0;for(U=1;U<=m;U++)Z[U]=Y=Y+j[U-1]<<1;for(N=0;N<=C;N++){var V=p[2*N+1];V!==0&&(p[2*N]=ut(Z[V]++,V))}}function nt(p){var C;for(C=0;C<_;C++)p.dyn_ltree[2*C]=0;for(C=0;C<d;C++)p.dyn_dtree[2*C]=0;for(C=0;C<v;C++)p.bl_tree[2*C]=0;p.dyn_ltree[2*x]=1,p.opt_len=p.static_len=0,p.last_lit=p.matches=0}function it(p){8<p.bi_valid?J(p,p.bi_buf):0<p.bi_valid&&(p.pending_buf[p.pending++]=p.bi_buf),p.bi_buf=0,p.bi_valid=0}function gt(p,C,j,U){var N=2*C,Z=2*j;return p[N]<p[Z]||p[N]===p[Z]&&U[C]<=U[j]}function dt(p,C,j){for(var U=p.heap[j],N=j<<1;N<=p.heap_len&&(N<p.heap_len&&gt(C,p.heap[N+1],p.heap[N],p.depth)&&N++,!gt(C,U,p.heap[N],p.depth));)p.heap[j]=p.heap[N],j=N,N<<=1;p.heap[j]=U}function _t(p,C,j){var U,N,Z,Y,V=0;if(p.last_lit!==0)for(;U=p.pending_buf[p.d_buf+2*V]<<8|p.pending_buf[p.d_buf+2*V+1],N=p.pending_buf[p.l_buf+V],V++,U===0?G(p,N,C):(G(p,(Z=o[N])+y+1,C),(Y=F[Z])!==0&&K(p,N-=L[Z],Y),G(p,Z=z(--U),j),(Y=H[Z])!==0&&K(p,U-=$[Z],Y)),V<p.last_lit;);G(p,x,C)}function kt(p,C){var j,U,N,Z=C.dyn_tree,Y=C.stat_desc.static_tree,V=C.stat_desc.has_stree,q=C.stat_desc.elems,ot=-1;for(p.heap_len=0,p.heap_max=u,j=0;j<q;j++)Z[2*j]!==0?(p.heap[++p.heap_len]=ot=j,p.depth[j]=0):Z[2*j+1]=0;for(;p.heap_len<2;)Z[2*(N=p.heap[++p.heap_len]=ot<2?++ot:0)]=1,p.depth[N]=0,p.opt_len--,V&&(p.static_len-=Y[2*N+1]);for(C.max_code=ot,j=p.heap_len>>1;1<=j;j--)dt(p,Z,j);for(N=q;j=p.heap[1],p.heap[1]=p.heap[p.heap_len--],dt(p,Z,1),U=p.heap[1],p.heap[--p.heap_max]=j,p.heap[--p.heap_max]=U,Z[2*N]=Z[2*j]+Z[2*U],p.depth[N]=(p.depth[j]>=p.depth[U]?p.depth[j]:p.depth[U])+1,Z[2*j+1]=Z[2*U+1]=N,p.heap[1]=N++,dt(p,Z,1),2<=p.heap_len;);p.heap[--p.heap_max]=p.heap[1],function(st,vt){var Pt,wt,At,ft,Mt,jt,St=vt.dyn_tree,Kt=vt.max_code,_e=vt.stat_desc.static_tree,we=vt.stat_desc.has_stree,Se=vt.stat_desc.extra_bits,Yt=vt.stat_desc.extra_base,Et=vt.stat_desc.max_length,Rt=0;for(ft=0;ft<=m;ft++)st.bl_count[ft]=0;for(St[2*st.heap[st.heap_max]+1]=0,Pt=st.heap_max+1;Pt<u;Pt++)Et<(ft=St[2*St[2*(wt=st.heap[Pt])+1]+1]+1)&&(ft=Et,Rt++),St[2*wt+1]=ft,Kt<wt||(st.bl_count[ft]++,Mt=0,Yt<=wt&&(Mt=Se[wt-Yt]),jt=St[2*wt],st.opt_len+=jt*(ft+Mt),we&&(st.static_len+=jt*(_e[2*wt+1]+Mt)));if(Rt!==0){do{for(ft=Et-1;st.bl_count[ft]===0;)ft--;st.bl_count[ft]--,st.bl_count[ft+1]+=2,st.bl_count[Et]--,Rt-=2}while(0<Rt);for(ft=Et;ft!==0;ft--)for(wt=st.bl_count[ft];wt!==0;)Kt<(At=st.heap[--Pt])||(St[2*At+1]!==ft&&(st.opt_len+=(ft-St[2*At+1])*St[2*At],St[2*At+1]=ft),wt--)}}(p,C),bt(Z,ot,p.bl_count)}function s(p,C,j){var U,N,Z=-1,Y=C[1],V=0,q=7,ot=4;for(Y===0&&(q=138,ot=3),C[2*(j+1)+1]=65535,U=0;U<=j;U++)N=Y,Y=C[2*(U+1)+1],++V<q&&N===Y||(V<ot?p.bl_tree[2*N]+=V:N!==0?(N!==Z&&p.bl_tree[2*N]++,p.bl_tree[2*A]++):V<=10?p.bl_tree[2*P]++:p.bl_tree[2*D]++,Z=N,ot=(V=0)===Y?(q=138,3):N===Y?(q=6,3):(q=7,4))}function O(p,C,j){var U,N,Z=-1,Y=C[1],V=0,q=7,ot=4;for(Y===0&&(q=138,ot=3),U=0;U<=j;U++)if(N=Y,Y=C[2*(U+1)+1],!(++V<q&&N===Y)){if(V<ot)for(;G(p,N,p.bl_tree),--V!=0;);else N!==0?(N!==Z&&(G(p,N,p.bl_tree),V--),G(p,A,p.bl_tree),K(p,V-3,2)):V<=10?(G(p,P,p.bl_tree),K(p,V-3,3)):(G(p,D,p.bl_tree),K(p,V-11,7));Z=N,ot=(V=0)===Y?(q=138,3):N===Y?(q=6,3):(q=7,4)}}h($);var M=!1;function g(p,C,j,U){K(p,(k<<1)+(U?1:0),3),function(N,Z,Y,V){it(N),V&&(J(N,Y),J(N,~Y)),a.arraySet(N.pending_buf,N.window,Z,Y,N.pending),N.pending+=Y}(p,C,j,!0)}n._tr_init=function(p){M||(function(){var C,j,U,N,Z,Y=new Array(m+1);for(N=U=0;N<w-1;N++)for(L[N]=U,C=0;C<1<<F[N];C++)o[U++]=N;for(o[U-1]=N,N=Z=0;N<16;N++)for($[N]=Z,C=0;C<1<<H[N];C++)I[Z++]=N;for(Z>>=7;N<d;N++)for($[N]=Z<<7,C=0;C<1<<H[N]-7;C++)I[256+Z++]=N;for(j=0;j<=m;j++)Y[j]=0;for(C=0;C<=143;)Q[2*C+1]=8,C++,Y[8]++;for(;C<=255;)Q[2*C+1]=9,C++,Y[9]++;for(;C<=279;)Q[2*C+1]=7,C++,Y[7]++;for(;C<=287;)Q[2*C+1]=8,C++,Y[8]++;for(bt(Q,_+1,Y),C=0;C<d;C++)S[2*C+1]=5,S[2*C]=ut(C,5);et=new tt(Q,F,y+1,_,m),W=new tt(S,H,0,d,m),rt=new tt(new Array(0),T,0,v,b)}(),M=!0),p.l_desc=new B(p.dyn_ltree,et),p.d_desc=new B(p.dyn_dtree,W),p.bl_desc=new B(p.bl_tree,rt),p.bi_buf=0,p.bi_valid=0,nt(p)},n._tr_stored_block=g,n._tr_flush_block=function(p,C,j,U){var N,Z,Y=0;0<p.level?(p.strm.data_type===2&&(p.strm.data_type=function(V){var q,ot=4093624447;for(q=0;q<=31;q++,ot>>>=1)if(1&ot&&V.dyn_ltree[2*q]!==0)return i;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return l;for(q=32;q<y;q++)if(V.dyn_ltree[2*q]!==0)return l;return i}(p)),kt(p,p.l_desc),kt(p,p.d_desc),Y=function(V){var q;for(s(V,V.dyn_ltree,V.l_desc.max_code),s(V,V.dyn_dtree,V.d_desc.max_code),kt(V,V.bl_desc),q=v-1;3<=q&&V.bl_tree[2*X[q]+1]===0;q--);return V.opt_len+=3*(q+1)+5+5+4,q}(p),N=p.opt_len+3+7>>>3,(Z=p.static_len+3+7>>>3)<=N&&(N=Z)):N=Z=j+5,j+4<=N&&C!==-1?g(p,C,j,U):p.strategy===4||Z===N?(K(p,2+(U?1:0),3),_t(p,Q,S)):(K(p,4+(U?1:0),3),function(V,q,ot,st){var vt;for(K(V,q-257,5),K(V,ot-1,5),K(V,st-4,4),vt=0;vt<st;vt++)K(V,V.bl_tree[2*X[vt]+1],3);O(V,V.dyn_ltree,q-1),O(V,V.dyn_dtree,ot-1)}(p,p.l_desc.max_code+1,p.d_desc.max_code+1,Y+1),_t(p,p.dyn_ltree,p.dyn_dtree)),nt(p),U&&it(p)},n._tr_tally=function(p,C,j){return p.pending_buf[p.d_buf+2*p.last_lit]=C>>>8&255,p.pending_buf[p.d_buf+2*p.last_lit+1]=255&C,p.pending_buf[p.l_buf+p.last_lit]=255&j,p.last_lit++,C===0?p.dyn_ltree[2*j]++:(p.matches++,C--,p.dyn_ltree[2*(o[j]+y+1)]++,p.dyn_dtree[2*z(C)]++),p.last_lit===p.lit_bufsize-1},n._tr_align=function(p){K(p,2,3),G(p,x,Q),function(C){C.bi_valid===16?(J(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):8<=C.bi_valid&&(C.pending_buf[C.pending++]=255&C.bi_buf,C.bi_buf>>=8,C.bi_valid-=8)}(p)}},{"../utils/common":41}],53:[function(t,r,n){r.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(t,r,n){(function(a){(function(i,l){if(!i.setImmediate){var h,k,w,y,_=1,d={},v=!1,u=i.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(i);m=m&&m.setTimeout?m:i,h={}.toString.call(i.process)==="[object process]"?function(A){process.nextTick(function(){b(A)})}:function(){if(i.postMessage&&!i.importScripts){var A=!0,P=i.onmessage;return i.onmessage=function(){A=!1},i.postMessage("","*"),i.onmessage=P,A}}()?(y="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",x,!1):i.attachEvent("onmessage",x),function(A){i.postMessage(y+A,"*")}):i.MessageChannel?((w=new MessageChannel).port1.onmessage=function(A){b(A.data)},function(A){w.port2.postMessage(A)}):u&&"onreadystatechange"in u.createElement("script")?(k=u.documentElement,function(A){var P=u.createElement("script");P.onreadystatechange=function(){b(A),P.onreadystatechange=null,k.removeChild(P),P=null},k.appendChild(P)}):function(A){setTimeout(b,0,A)},m.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var P=new Array(arguments.length-1),D=0;D<P.length;D++)P[D]=arguments[D+1];var F={callback:A,args:P};return d[_]=F,h(_),_++},m.clearImmediate=f}function f(A){delete d[A]}function b(A){if(v)setTimeout(b,0,A);else{var P=d[A];if(P){v=!0;try{(function(D){var F=D.callback,H=D.args;switch(H.length){case 0:F();break;case 1:F(H[0]);break;case 2:F(H[0],H[1]);break;case 3:F(H[0],H[1],H[2]);break;default:F.apply(l,H)}})(P)}finally{f(A),v=!1}}}}function x(A){A.source===i&&typeof A.data=="string"&&A.data.indexOf(y)===0&&b(+A.data.slice(y.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Tt<"u"?Tt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(oe);var Ce=oe.exports;const Pe=xe(Ce);var mt;(function(c){c.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",c.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",c.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",c.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",c.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",c.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",c.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",c.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",c.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",c.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",c.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",c.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",c.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",c.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",c.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",c.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",c.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties"})(mt||(mt={}));function Ae(c,e){return e.elements(c).map(t=>({id:e.attr(t,"Id"),type:e.attr(t,"Type"),target:e.attr(t,"Target"),targetMode:e.attr(t,"TargetMode")}))}const le={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",drawingml:"http://schemas.openxmlformats.org/drawingml/2006/main",picture:"http://schemas.openxmlformats.org/drawingml/2006/picture",compatibility:"http://schemas.openxmlformats.org/markup-compatibility/2006",math:"http://schemas.openxmlformats.org/officeDocument/2006/math"},pt={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:""},VmlEmu:{mul:1/12700,unit:""}};function ce(c,e=pt.Dxa){return c==null||/.+(p[xt]|[%])$/.test(c)?c:`${(parseInt(c)*e.mul).toFixed(2)}${e.unit}`}function Ee(c,e=!1){switch(c){case"1":return!0;case"0":return!1;case"on":return!0;case"off":return!1;case"true":return!0;case"false":return!1;default:return e}}function he(c,e,t){if(c.namespaceURI!=le.wordml)return!1;switch(c.localName){case"color":e.color=t.attr(c,"val");break;case"sz":e.fontSize=t.lengthAttr(c,"val",pt.FontSize);break;default:return!1}return!0}function Ne(c,e=!1){e&&(c=c.replace(/<[?].*[?]>/,"")),c=Be(c);const t=new DOMParser().parseFromString(c,"application/xml"),r=ze(t);if(r)throw new Error(r);return t}function ze(c){var e;return(e=c.getElementsByTagName("parsererror")[0])==null?void 0:e.textContent}function Be(c){return c.charCodeAt(0)===65279?c.substring(1):c}function Me(c){return new XMLSerializer().serializeToString(c)}class ue{elements(e,t=null){const r=[];for(let n=0,a=e.childNodes.length;n<a;n++){let i=e.childNodes.item(n);i.nodeType==1&&(t==null||i.localName==t)&&r.push(i)}return r}element(e,t){for(let r=0,n=e.childNodes.length;r<n;r++){let a=e.childNodes.item(r);if(a.nodeType==1&&a.localName==t)return a}return null}elementAttr(e,t,r){var n=this.element(e,t);return n?this.attr(n,r):void 0}attrs(e){return Array.from(e.attributes)}attr(e,t){for(let r=0,n=e.attributes.length;r<n;r++){let a=e.attributes.item(r);if(a.localName==t)return a.value}return null}intAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n):r}hexAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n,16):r}floatAttr(e,t,r=null){var n=this.attr(e,t);return n?parseFloat(n):r}boolAttr(e,t,r=null){return Ee(this.attr(e,t),r)}lengthAttr(e,t,r=pt.Dxa){return ce(this.attr(e,t),r)}}const E=new ue;class yt{constructor(e,t){this._package=e,this.path=t}async load(){this.rels=await this._package.loadRelationships(this.path);const e=await this._package.load(this.path),t=this._package.parseXmlDocument(e);this._package.options.keepOrigin&&(this._xmlDocument=t),this.parseXml(t.firstElementChild)}save(){this._package.update(this.path,Me(this._xmlDocument))}parseXml(e){}}const Re={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function Te(c,e){return e.elements(c).map(t=>Fe(t,e))}function Fe(c,e){let t={name:e.attr(c,"name"),embedFontRefs:[]};for(let r of e.elements(c))switch(r.localName){case"family":t.family=e.attr(r,"val");break;case"altName":t.altName=e.attr(r,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":t.embedFontRefs.push(Ie(r,e));break}return t}function Ie(c,e){return{id:e.attr(c,"id"),key:e.attr(c,"fontKey"),type:Re[c.localName]}}class Oe extends yt{parseXml(e){this.fonts=Te(e,this._package.xmlParser)}}function De(c){return c==null?void 0:c.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function Ot(c){let e=c.lastIndexOf("/")+1,t=e==0?"":c.substring(0,e),r=e==0?c:c.substring(e);return[t,r]}function Ut(c,e){try{const t="http://docx/";return new URL(c,t+e).toString().substring(t.length)}catch{return`${e}${c}`}}function xt(c,e){return c.reduce((t,r)=>(t[e(r)]=r,t),{})}function Le(c){return new Promise((e,t)=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=()=>t(),r.readAsDataURL(c)})}function Wt(c){return c&&typeof c=="object"&&!Array.isArray(c)}function je(c){return typeof c=="string"||c instanceof String}function Lt(c,...e){if(!e.length)return c;const t=e.shift();if(Wt(c)&&Wt(t))for(const r in t)if(Wt(t[r])){const n=c[r]??(c[r]={});Lt(n,t[r])}else c[r]=t[r];return Lt(c,...e)}function Nt(c){return Array.isArray(c)?c:[c]}class Zt{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new ue}get(e){return this._zip.files[Ue(e)]}update(e,t){this._zip.file(e,t)}static async load(e,t){const r=await Pe.loadAsync(e);return new Zt(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){var r;return((r=this.get(e))==null?void 0:r.async(t))??Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(e!=null){const[n,a]=Ot(e);t=`${n}_rels/${a}.rels`}const r=await this.load(t);return r?Ae(this.parseXmlDocument(r).firstElementChild,this.xmlParser):null}parseXmlDocument(e){return Ne(e,this.options.trimXmlDeclaration)}}function Ue(c){return c.startsWith("/")?c.substr(1):c}class We extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function It(c,e){return{type:e.attr(c,"val"),color:e.attr(c,"color"),size:e.lengthAttr(c,"sz",pt.Border),offset:e.lengthAttr(c,"space",pt.Point),frame:e.boolAttr(c,"frame"),shadow:e.boolAttr(c,"shadow")}}function He(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"left":t.left=It(r,e);break;case"top":t.top=It(r,e);break;case"right":t.right=It(r,e);break;case"bottom":t.bottom=It(r,e);break}return t}var qt;(function(c){c.Continuous="continuous",c.NextPage="nextPage",c.NextColumn="nextColumn",c.EvenPage="evenPage",c.OddPage="oddPage"})(qt||(qt={}));function de(c,e=E){var t={};for(let r of e.elements(c))switch(r.localName){case"pgSz":t.pageSize={width:e.lengthAttr(r,"w"),height:e.lengthAttr(r,"h"),orientation:e.attr(r,"orient")};break;case"type":t.type=e.attr(r,"val");break;case"pgMar":t.pageMargins={left:e.lengthAttr(r,"left"),right:e.lengthAttr(r,"right"),top:e.lengthAttr(r,"top"),bottom:e.lengthAttr(r,"bottom"),header:e.lengthAttr(r,"header"),footer:e.lengthAttr(r,"footer"),gutter:e.lengthAttr(r,"gutter")};break;case"cols":t.columns=$e(r,e);break;case"headerReference":(t.headerRefs??(t.headerRefs=[])).push(Jt(r,e));break;case"footerReference":(t.footerRefs??(t.footerRefs=[])).push(Jt(r,e));break;case"titlePg":t.titlePage=e.boolAttr(r,"val",!0);break;case"pgBorders":t.pageBorders=He(r,e);break;case"pgNumType":t.pageNumber=Ze(r,e);break}return t}function $e(c,e){return{numberOfColumns:e.intAttr(c,"num"),space:e.lengthAttr(c,"space"),separator:e.boolAttr(c,"sep"),equalWidth:e.boolAttr(c,"equalWidth",!0),columns:e.elements(c,"col").map(t=>({width:e.lengthAttr(t,"w"),space:e.lengthAttr(t,"space")}))}}function Ze(c,e){return{chapSep:e.attr(c,"chapSep"),chapStyle:e.attr(c,"chapStyle"),format:e.attr(c,"fmt"),start:e.intAttr(c,"start")}}function Jt(c,e){return{id:e.attr(c,"id"),type:e.attr(c,"type")}}function Ve(c,e){return{before:e.lengthAttr(c,"before"),after:e.lengthAttr(c,"after"),line:e.intAttr(c,"line"),lineRule:e.attr(c,"lineRule")}}function Vt(c,e){let t={};for(let r of e.elements(c))Xe(r,t,e);return t}function Xe(c,e,t){return!!he(c,e,t)}function fe(c,e){let t={};for(let r of e.elements(c))pe(r,t,e);return t}function pe(c,e,t){if(c.namespaceURI!=le.wordml)return!1;if(he(c,e,t))return!0;switch(c.localName){case"tabs":e.tabs=Ge(c,t);break;case"sectPr":e.sectionProps=de(c,t);break;case"numPr":e.numbering=Ke(c,t);break;case"spacing":return e.lineSpacing=Ve(c,t),!1;case"textAlignment":return e.textAlignment=t.attr(c,"val"),!1;case"keepLines":e.keepLines=t.boolAttr(c,"val",!0);break;case"keepNext":e.keepNext=t.boolAttr(c,"val",!0);break;case"pageBreakBefore":e.pageBreakBefore=t.boolAttr(c,"val",!0);break;case"outlineLvl":e.outlineLevel=t.intAttr(c,"val");break;case"pStyle":e.styleName=t.attr(c,"val");break;case"rPr":e.runProps=Vt(c,t);break;default:return!1}return!0}function Ge(c,e){return e.elements(c,"tab").map(t=>({position:e.lengthAttr(t,"pos"),leader:e.attr(t,"leader"),style:e.attr(t,"val")}))}function Ke(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"numId":t.id=e.attr(r,"val");break;case"ilvl":t.level=e.intAttr(r,"val");break}return t}function Ye(c,e){let t={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let r of e.elements(c))switch(r.localName){case"num":t.numberings.push(qe(r,e));break;case"abstractNum":t.abstractNumberings.push(Je(r,e));break;case"numPicBullet":t.bulletPictures.push(tr(r,e));break}return t}function qe(c,e){let t={id:e.attr(c,"numId"),overrides:[]};for(let r of e.elements(c))switch(r.localName){case"abstractNumId":t.abstractId=e.attr(r,"val");break;case"lvlOverride":t.overrides.push(Qe(r,e));break}return t}function Je(c,e){let t={id:e.attr(c,"abstractNumId"),levels:[]};for(let r of e.elements(c))switch(r.localName){case"name":t.name=e.attr(r,"val");break;case"multiLevelType":t.multiLevelType=e.attr(r,"val");break;case"numStyleLink":t.numberingStyleLink=e.attr(r,"val");break;case"styleLink":t.styleLink=e.attr(r,"val");break;case"lvl":t.levels.push(me(r,e));break}return t}function me(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))switch(r.localName){case"start":t.start=e.attr(r,"val");break;case"lvlRestart":t.restart=e.intAttr(r,"val");break;case"numFmt":t.format=e.attr(r,"val");break;case"lvlText":t.text=e.attr(r,"val");break;case"lvlJc":t.justification=e.attr(r,"val");break;case"lvlPicBulletId":t.bulletPictureId=e.attr(r,"val");break;case"pStyle":t.paragraphStyle=e.attr(r,"val");break;case"pPr":t.paragraphProps=fe(r,e);break;case"rPr":t.runProps=Vt(r,e);break}return t}function Qe(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))switch(r.localName){case"startOverride":t.start=e.intAttr(r,"val");break;case"lvl":t.numberingLevel=me(r,e);break}return t}function tr(c,e){var t=e.element(c,"pict"),r=t&&e.element(t,"shape"),n=r&&e.element(r,"imagedata");return n?{id:e.attr(c,"numPicBulletId"),referenceId:e.attr(n,"id"),style:e.attr(r,"style")}:null}class er extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,Ye(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class rr extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}var R;(function(c){c.Document="document",c.Paragraph="paragraph",c.Run="run",c.Break="break",c.NoBreakHyphen="noBreakHyphen",c.Table="table",c.Row="row",c.Cell="cell",c.Hyperlink="hyperlink",c.Drawing="drawing",c.Image="image",c.Text="text",c.Tab="tab",c.Symbol="symbol",c.BookmarkStart="bookmarkStart",c.BookmarkEnd="bookmarkEnd",c.Footer="footer",c.Header="header",c.FootnoteReference="footnoteReference",c.EndnoteReference="endnoteReference",c.Footnote="footnote",c.Endnote="endnote",c.SimpleField="simpleField",c.ComplexField="complexField",c.Instruction="instruction",c.VmlPicture="vmlPicture",c.MmlMath="mmlMath",c.MmlMathParagraph="mmlMathParagraph",c.MmlFraction="mmlFraction",c.MmlFunction="mmlFunction",c.MmlFunctionName="mmlFunctionName",c.MmlNumerator="mmlNumerator",c.MmlDenominator="mmlDenominator",c.MmlRadical="mmlRadical",c.MmlBase="mmlBase",c.MmlDegree="mmlDegree",c.MmlSuperscript="mmlSuperscript",c.MmlSubscript="mmlSubscript",c.MmlPreSubSuper="mmlPreSubSuper",c.MmlSubArgument="mmlSubArgument",c.MmlSuperArgument="mmlSuperArgument",c.MmlNary="mmlNary",c.MmlDelimiter="mmlDelimiter",c.MmlRun="mmlRun",c.MmlEquationArray="mmlEquationArray",c.MmlLimit="mmlLimit",c.MmlLimitLower="mmlLimitLower",c.MmlMatrix="mmlMatrix",c.MmlMatrixRow="mmlMatrixRow",c.MmlBox="mmlBox",c.MmlBar="mmlBar",c.MmlGroupChar="mmlGroupChar",c.VmlElement="vmlElement",c.Inserted="inserted",c.Deleted="deleted",c.DeletedText="deletedText"})(R||(R={}));class Xt{constructor(){this.children=[],this.cssStyle={}}}class ar extends Xt{constructor(){super(...arguments),this.type=R.Header}}class nr extends Xt{constructor(){super(...arguments),this.type=R.Footer}}class ge extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class sr extends ge{createRootElement(){return new ar}}class ir extends ge{createRootElement(){return new nr}}function or(c,e){const t={};for(let r of e.elements(c))switch(r.localName){case"Template":t.template=r.textContent;break;case"Pages":t.pages=zt(r.textContent);break;case"Words":t.words=zt(r.textContent);break;case"Characters":t.characters=zt(r.textContent);break;case"Application":t.application=r.textContent;break;case"Lines":t.lines=zt(r.textContent);break;case"Paragraphs":t.paragraphs=zt(r.textContent);break;case"Company":t.company=r.textContent;break;case"AppVersion":t.appVersion=r.textContent;break}return t}function zt(c){if(!(typeof c>"u"))return parseInt(c)}class lr extends yt{parseXml(e){this.props=or(e,this._package.xmlParser)}}function cr(c,e){const t={};for(let r of e.elements(c))switch(r.localName){case"title":t.title=r.textContent;break;case"description":t.description=r.textContent;break;case"subject":t.subject=r.textContent;break;case"creator":t.creator=r.textContent;break;case"keywords":t.keywords=r.textContent;break;case"language":t.language=r.textContent;break;case"lastModifiedBy":t.lastModifiedBy=r.textContent;break;case"revision":r.textContent&&(t.revision=parseInt(r.textContent));break}return t}class hr extends yt{parseXml(e){this.props=cr(e,this._package.xmlParser)}}class ur{}function dr(c,e){var t=new ur,r=e.element(c,"themeElements");for(let n of e.elements(r))switch(n.localName){case"clrScheme":t.colorScheme=fr(n,e);break;case"fontScheme":t.fontScheme=pr(n,e);break}return t}function fr(c,e){var t={name:e.attr(c,"name"),colors:{}};for(let a of e.elements(c)){var r=e.element(a,"srgbClr"),n=e.element(a,"sysClr");r?t.colors[a.localName]=e.attr(r,"val"):n&&(t.colors[a.localName]=e.attr(n,"lastClr"))}return t}function pr(c,e){var t={name:e.attr(c,"name")};for(let r of e.elements(c))switch(r.localName){case"majorFont":t.majorFont=Qt(r,e);break;case"minorFont":t.minorFont=Qt(r,e);break}return t}function Qt(c,e){return{latinTypeface:e.elementAttr(c,"latin","typeface"),eaTypeface:e.elementAttr(c,"ea","typeface"),csTypeface:e.elementAttr(c,"cs","typeface")}}class mr extends yt{constructor(e,t){super(e,t)}parseXml(e){this.theme=dr(e,this._package.xmlParser)}}class be{}class gr extends be{constructor(){super(...arguments),this.type=R.Footnote}}class br extends be{constructor(){super(...arguments),this.type=R.Endnote}}class ve extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}}class vr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",gr)}}class kr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",br)}}function yr(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"defaultTabStop":t.defaultTabStop=e.lengthAttr(r,"val");break;case"footnotePr":t.footnoteProps=te(r,e);break;case"endnotePr":t.endnoteProps=te(r,e);break;case"autoHyphenation":t.autoHyphenation=e.boolAttr(r,"val");break}return t}function te(c,e){var t={defaultNoteIds:[]};for(let r of e.elements(c))switch(r.localName){case"numFmt":t.nummeringFormat=e.attr(r,"val");break;case"footnote":case"endnote":t.defaultNoteIds.push(e.attr(r,"id"));break}return t}class _r extends yt{constructor(e,t){super(e,t)}parseXml(e){this.settings=yr(e,this._package.xmlParser)}}function wr(c,e){return e.elements(c,"property").map(t=>{const r=t.firstChild;return{formatId:e.attr(t,"fmtid"),name:e.attr(t,"name"),type:r.nodeName,value:r.textContent}})}class Sr extends yt{parseXml(e){this.props=wr(e,this._package.xmlParser)}}const xr=[{type:mt.OfficeDocument,target:"word/document.xml"},{type:mt.ExtendedProperties,target:"docProps/app.xml"},{type:mt.CoreProperties,target:"docProps/core.xml"},{type:mt.CustomProperties,target:"docProps/custom.xml"}];class Gt{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var n=new Gt;return n._options=r,n._parser=t,n._package=await Zt.load(e,r),n.rels=await n._package.loadRelationships(),await Promise.all(xr.map(a=>{const i=n.rels.find(l=>l.type===a.type)??a;return n.loadRelationshipPart(i.target,i.type)})),n}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){var n;if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let r=null;switch(t){case mt.OfficeDocument:this.documentPart=r=new We(this._package,e,this._parser);break;case mt.FontTable:this.fontTablePart=r=new Oe(this._package,e);break;case mt.Numbering:this.numberingPart=r=new er(this._package,e,this._parser);break;case mt.Styles:this.stylesPart=r=new rr(this._package,e,this._parser);break;case mt.Theme:this.themePart=r=new mr(this._package,e);break;case mt.Footnotes:this.footnotesPart=r=new vr(this._package,e,this._parser);break;case mt.Endnotes:this.endnotesPart=r=new kr(this._package,e,this._parser);break;case mt.Footer:r=new ir(this._package,e,this._parser);break;case mt.Header:r=new sr(this._package,e,this._parser);break;case mt.CoreProperties:this.corePropsPart=r=new hr(this._package,e);break;case mt.ExtendedProperties:this.extendedPropsPart=r=new lr(this._package,e);break;case mt.CustomProperties:r=new Sr(this._package,e);break;case mt.Settings:this.settingsPart=r=new _r(this._package,e);break}if(r==null)return Promise.resolve(null);if(this.partsMap[e]=r,this.parts.push(r),await r.load(),((n=r.rels)==null?void 0:n.length)>0){const[a]=Ot(r.path);await Promise.all(r.rels.map(i=>this.loadRelationshipPart(Ut(i.target,a),i.type)))}return r}async loadDocumentImage(e,t){const r=await this.loadResource(t??this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){const t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){const r=await this.loadResource(this.fontTablePart,e,"uint8array");return r&&this.blobToURL(new Blob([Cr(r,t)]))}blobToURL(e){return e?this._options.useBase64URL?Le(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find(a=>a.id==e);const n=t?Ot(t.path)[0]:"";return r?this.partsMap[Ut(r.target,n)]:null}getPathById(e,t){const r=e.rels.find(a=>a.id==t),[n]=Ot(e.path);return r?Ut(r.target,n):null}loadResource(e,t,r){const n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)}}function Cr(c,e){const r=e.replace(/{|}|-/g,""),n=new Array(16);for(let a=0;a<16;a++)n[16-a-1]=parseInt(r.substr(a*2,2),16);for(let a=0;a<32;a++)c[a]=c[a]^n[a%16];return c}function Pr(c,e){return{type:R.BookmarkStart,id:e.attr(c,"id"),name:e.attr(c,"name"),colFirst:e.intAttr(c,"colFirst"),colLast:e.intAttr(c,"colLast")}}function Ar(c,e){return{type:R.BookmarkEnd,id:e.attr(c,"id")}}class Er extends Xt{constructor(){super(...arguments),this.type=R.VmlElement,this.attrs={}}}function ke(c,e){var t=new Er;switch(c.localName){case"rect":t.tagName="rect",Object.assign(t.attrs,{width:"100%",height:"100%"});break;case"oval":t.tagName="ellipse",Object.assign(t.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":t.tagName="line";break;case"shape":t.tagName="g";break;case"textbox":t.tagName="foreignObject",Object.assign(t.attrs,{width:"100%",height:"100%"});break;default:return null}for(const r of E.attrs(c))switch(r.localName){case"style":t.cssStyleText=r.value;break;case"fillcolor":t.attrs.fill=r.value;break;case"from":const[n,a]=ee(r.value);Object.assign(t.attrs,{x1:n,y1:a});break;case"to":const[i,l]=ee(r.value);Object.assign(t.attrs,{x2:i,y2:l});break}for(const r of E.elements(c))switch(r.localName){case"stroke":Object.assign(t.attrs,Nr(r));break;case"fill":Object.assign(t.attrs,zr());break;case"imagedata":t.tagName="image",Object.assign(t.attrs,{width:"100%",height:"100%"}),t.imageHref={id:E.attr(r,"id"),title:E.attr(r,"title")};break;case"txbxContent":t.children.push(...e.parseBodyElements(r));break;default:const n=ke(r,e);n&&t.children.push(n);break}return t}function Nr(c){return{stroke:E.attr(c,"color"),"stroke-width":E.lengthAttr(c,"weight",pt.Emu)??"1px"}}function zr(c){return{}}function ee(c){return c.split(",")}var Dt={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const Br=[],re={oMath:R.MmlMath,oMathPara:R.MmlMathParagraph,f:R.MmlFraction,func:R.MmlFunction,fName:R.MmlFunctionName,num:R.MmlNumerator,den:R.MmlDenominator,rad:R.MmlRadical,deg:R.MmlDegree,e:R.MmlBase,sSup:R.MmlSuperscript,sSub:R.MmlSubscript,sPre:R.MmlPreSubSuper,sup:R.MmlSuperArgument,sub:R.MmlSubArgument,d:R.MmlDelimiter,nary:R.MmlNary,eqArr:R.MmlEquationArray,lim:R.MmlLimit,limLow:R.MmlLimitLower,m:R.MmlMatrix,mr:R.MmlMatrixRow,box:R.MmlBox,bar:R.MmlBar,groupChr:R.MmlGroupChar};class Mr{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var n=[];for(let a of E.elements(e,t)){const i=new r;i.id=E.attr(a,"id"),i.noteType=E.attr(a,"type"),i.children=this.parseBodyElements(a),n.push(i)}return n}parseDocumentFile(e){var t=E.element(e,"body"),r=E.element(e,"background"),n=E.element(t,"sectPr");return{type:R.Document,children:this.parseBodyElements(t),props:n?de(n,E):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=ht.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of E.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,n=>this.parseBodyElements(n)));break}return t}parseStylesFile(e){var t=[];return ht.foreach(e,r=>{switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r));break}}),t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return ht.foreach(e,r=>{switch(r.localName){case"rPrDefault":var n=E.element(r,"rPr");n&&t.styles.push({target:"span",values:this.parseDefaultProperties(n,{})});break;case"pPrDefault":var a=E.element(r,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})});break}}),t}parseStyle(e){var t={id:E.attr(e,"styleId"),isDefault:E.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(E.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span";break}return ht.foreach(e,r=>{switch(r.localName){case"basedOn":t.basedOn=E.attr(r,"val");break;case"name":t.name=E.attr(r,"val");break;case"link":t.linked=E.attr(r,"val");break;case"next":t.next=E.attr(r,"val");break;case"aliases":t.aliases=E.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=fe(r,E);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=Vt(r,E);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(r,{})});break;case"tblStylePr":for(let n of this.parseTableStyle(r))t.styles.push(n);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${r.localName}`)}}),t}parseTableStyle(e){var t=[],r=E.attr(e,"type"),n="",a="";switch(r){case"firstRow":a=".first-row",n="tr.first-row td";break;case"lastRow":a=".last-row",n="tr.last-row td";break;case"firstCol":a=".first-col",n="td.first-col";break;case"lastCol":a=".last-col",n="td.last-col";break;case"band1Vert":a=":not(.no-vband)",n="td.odd-col";break;case"band2Vert":a=":not(.no-vband)",n="td.even-col";break;case"band1Horz":a=":not(.no-hband)",n="tr.odd-row";break;case"band2Horz":a=":not(.no-hband)",n="tr.even-row";break;default:return[]}return ht.foreach(e,i=>{switch(i.localName){case"pPr":t.push({target:`${n} p`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"rPr":t.push({target:`${n} span`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"tblPr":case"tcPr":t.push({target:n,mod:a,values:this.parseDefaultProperties(i,{})});break}}),t}parseNumberingFile(e){var t=[],r={},n=[];return ht.foreach(e,a=>{switch(a.localName){case"abstractNum":this.parseAbstractNumbering(a,n).forEach(h=>t.push(h));break;case"numPicBullet":n.push(this.parseNumberingPicBullet(a));break;case"num":var i=E.attr(a,"numId"),l=E.elementAttr(a,"abstractNumId","val");r[l]=i;break}}),t.forEach(a=>a.id=r[a.id]),t}parseNumberingPicBullet(e){var t=E.element(e,"pict"),r=t&&E.element(t,"shape"),n=r&&E.element(r,"imagedata");return n?{id:E.intAttr(e,"numPicBulletId"),src:E.attr(n,"id"),style:E.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],n=E.attr(e,"abstractNumId");return ht.foreach(e,a=>{switch(a.localName){case"lvl":r.push(this.parseNumberingLevel(n,a,t));break}}),r}parseNumberingLevel(e,t,r){var n={id:e,level:E.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return ht.foreach(t,a=>{switch(a.localName){case"start":n.start=E.intAttr(a,"val");break;case"pPr":this.parseDefaultProperties(a,n.pStyle);break;case"rPr":this.parseDefaultProperties(a,n.rStyle);break;case"lvlPicBulletId":var i=E.intAttr(a,"val");n.bullet=r.find(l=>l.id==i);break;case"lvlText":n.levelText=E.attr(a,"val");break;case"pStyle":n.pStyleName=E.attr(a,"val");break;case"numFmt":n.format=E.attr(a,"val");break;case"suff":n.suff=E.attr(a,"val");break}}),n}parseSdt(e,t){const r=E.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){var r;return{type:R.Inserted,children:((r=t(e))==null?void 0:r.children)??[]}}parseDeleted(e,t){var r;return{type:R.Deleted,children:((r=t(e))==null?void 0:r.children)??[]}}parseParagraph(e){var t={type:R.Paragraph,children:[]};for(let r of E.elements(e))switch(r.localName){case"pPr":this.parseParagraphProperties(r,t);break;case"r":t.children.push(this.parseRun(r,t));break;case"hyperlink":t.children.push(this.parseHyperlink(r,t));break;case"bookmarkStart":t.children.push(Pr(r,E));break;case"bookmarkEnd":t.children.push(Ar(r,E));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(r));break;case"sdt":t.children.push(...this.parseSdt(r,n=>this.parseParagraph(n).children));break;case"ins":t.children.push(this.parseInserted(r,n=>this.parseParagraph(n)));break;case"del":t.children.push(this.parseDeleted(r,n=>this.parseParagraph(n)));break}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{if(pe(r,t,E))return!0;switch(r.localName){case"pStyle":t.styleName=E.attr(r,"val");break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;case"framePr":this.parseFrame(r,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){var r=E.attr(e,"dropCap");r=="drop"&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:R.Hyperlink,parent:t,children:[]},n=E.attr(e,"anchor"),a=E.attr(e,"id");return n&&(r.href="#"+n),a&&(r.id=a),ht.foreach(e,i=>{switch(i.localName){case"r":r.children.push(this.parseRun(i,r));break}}),r}parseRun(e,t){var r={type:R.Run,parent:t,children:[]};return ht.foreach(e,n=>{switch(n=this.checkAlternateContent(n),n.localName){case"t":r.children.push({type:R.Text,text:n.textContent});break;case"delText":r.children.push({type:R.DeletedText,text:n.textContent});break;case"fldSimple":r.children.push({type:R.SimpleField,instruction:E.attr(n,"instr"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:R.Instruction,text:n.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:R.ComplexField,charType:E.attr(n,"fldCharType"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:R.NoBreakHyphen});break;case"br":r.children.push({type:R.Break,break:E.attr(n,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:R.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:R.Symbol,font:E.attr(n,"font"),char:E.attr(n,"char")});break;case"tab":r.children.push({type:R.Tab});break;case"footnoteReference":r.children.push({type:R.FootnoteReference,id:E.attr(n,"id")});break;case"endnoteReference":r.children.push({type:R.EndnoteReference,id:E.attr(n,"id")});break;case"drawing":let a=this.parseDrawing(n);a&&(r.children=[a]);break;case"pict":r.children.push(this.parseVmlPicture(n));break;case"rPr":this.parseRunProperties(n,r);break}}),r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:re[e.localName],children:[]};for(const a of E.elements(e))if(re[a.localName])r.children.push(this.parseMathElement(a));else if(a.localName=="r"){var n=this.parseRun(a);n.type=R.MmlRun,r.children.push(n)}else a.localName==t&&(r.props=this.parseMathProperies(a));return r}parseMathProperies(e){const t={};for(const r of E.elements(e))switch(r.localName){case"chr":t.char=E.attr(r,"val");break;case"vertJc":t.verticalJustification=E.attr(r,"val");break;case"pos":t.position=E.attr(r,"val");break;case"degHide":t.hideDegree=E.boolAttr(r,"val");break;case"begChr":t.beginChar=E.attr(r,"val");break;case"endChr":t.endChar=E.attr(r,"val");break}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{switch(r.localName){case"rStyle":t.styleName=E.attr(r,"val");break;case"vertAlign":t.verticalAlign=lt.valueOfVertAlign(r,!0);break;default:return!1}return!0})}parseVmlPicture(e){const t={type:R.VmlPicture,children:[]};for(const r of E.elements(e)){const n=ke(r,this);n&&t.children.push(n)}return t}checkAlternateContent(e){var a;if(e.localName!="AlternateContent")return e;var t=E.element(e,"Choice");if(t){var r=E.attr(t,"Requires"),n=e.lookupNamespaceURI(r);if(Br.includes(n))return t.firstElementChild}return(a=E.element(e,"Fallback"))==null?void 0:a.firstElementChild}parseDrawing(e){for(var t of E.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:R.Drawing,children:[],cssStyle:{}},r=e.localName=="anchor";let n=null,a=E.boolAttr(e,"simplePos"),i={relative:"page",align:"left",offset:"0"},l={relative:"page",align:"top",offset:"0"};for(var h of E.elements(e))switch(h.localName){case"simplePos":a&&(i.offset=E.lengthAttr(h,"x",pt.Emu),l.offset=E.lengthAttr(h,"y",pt.Emu));break;case"extent":t.cssStyle.width=E.lengthAttr(h,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(h,"cy",pt.Emu);break;case"positionH":case"positionV":if(!a){let _=h.localName=="positionH"?i:l;var k=E.element(h,"align"),w=E.element(h,"posOffset");_.relative=E.attr(h,"relativeFrom")??_.relative,k&&(_.align=k.textContent),w&&(_.offset=ht.sizeValue(w,pt.Emu))}break;case"wrapTopAndBottom":n="wrapTopAndBottom";break;case"wrapNone":n="wrapNone";break;case"graphic":var y=this.parseGraphic(h);y&&t.children.push(y);break}return n=="wrapTopAndBottom"?(t.cssStyle.display="block",i.align&&(t.cssStyle["text-align"]=i.align,t.cssStyle.width="100%")):n=="wrapNone"?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",i.offset&&(t.cssStyle.left=i.offset),l.offset&&(t.cssStyle.top=l.offset)):r&&(i.align=="left"||i.align=="right")&&(t.cssStyle.float=i.align),t}parseGraphic(e){var t=E.element(e,"graphicData");for(let r of E.elements(t))switch(r.localName){case"pic":return this.parsePicture(r)}return null}parsePicture(e){var t={type:R.Image,src:"",cssStyle:{}},r=E.element(e,"blipFill"),n=E.element(r,"blip");t.src=E.attr(n,"embed");var a=E.element(e,"spPr"),i=E.element(a,"xfrm");t.cssStyle.position="relative";for(var l of E.elements(i))switch(l.localName){case"ext":t.cssStyle.width=E.lengthAttr(l,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(l,"cy",pt.Emu);break;case"off":t.cssStyle.left=E.lengthAttr(l,"x",pt.Emu),t.cssStyle.top=E.lengthAttr(l,"y",pt.Emu);break}return t}parseTable(e){var t={type:R.Table,children:[]};return ht.foreach(e,r=>{switch(r.localName){case"tr":t.children.push(this.parseTableRow(r));break;case"tblGrid":t.columns=this.parseTableColumns(r);break;case"tblPr":this.parseTableProperties(r,t);break}}),t}parseTableColumns(e){var t=[];return ht.foreach(e,r=>{switch(r.localName){case"gridCol":t.push({width:E.lengthAttr(r,"w")});break}}),t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,r=>{switch(r.localName){case"tblStyle":t.styleName=E.attr(r,"val");break;case"tblLook":t.className=lt.classNameOftblLook(r);break;case"tblpPr":this.parseTablePosition(r,t);break;case"tblStyleColBandSize":t.colBandSize=E.intAttr(r,"val");break;case"tblStyleRowBandSize":t.rowBandSize=E.intAttr(r,"val");break;default:return!1}return!0}),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto";break}}parseTablePosition(e,t){var r=E.lengthAttr(e,"topFromText"),n=E.lengthAttr(e,"bottomFromText"),a=E.lengthAttr(e,"rightFromText"),i=E.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=lt.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=lt.addSize(t.cssStyle["margin-left"],i),t.cssStyle["margin-right"]=lt.addSize(t.cssStyle["margin-right"],a),t.cssStyle["margin-top"]=lt.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:R.Row,children:[]};return ht.foreach(e,r=>{switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":this.parseTableRowProperties(r,t);break}}),t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{switch(r.localName){case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;case"tblHeader":t.isHeader=E.boolAttr(r,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:R.Cell,children:[]};return ht.foreach(e,r=>{switch(r.localName){case"tbl":t.children.push(this.parseTable(r));break;case"p":t.children.push(this.parseParagraph(r));break;case"tcPr":this.parseTableCellProperties(r,t);break}}),t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{switch(r.localName){case"gridSpan":t.span=E.intAttr(r,"val",null);break;case"vMerge":t.verticalMerge=E.attr(r,"val")??"continue";break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;default:return!1}return!0})}parseDefaultProperties(e,t=null,r=null,n=null){return t=t||{},ht.foreach(e,a=>{if(!(n!=null&&n(a)))switch(a.localName){case"jc":t["text-align"]=lt.valueOfJc(a);break;case"textAlignment":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"color":t.color=ht.colorAttr(a,"val",null,Dt.color);break;case"sz":t["font-size"]=t["min-height"]=E.lengthAttr(a,"val",pt.FontSize);break;case"shd":t["background-color"]=ht.colorAttr(a,"fill",null,Dt.shd);break;case"highlight":t["background-color"]=ht.colorAttr(a,"val",null,Dt.highlight);break;case"vertAlign":break;case"position":t.verticalAlign=E.lengthAttr(a,"val",pt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=lt.valueOfSize(a,"w");break;case"trHeight":this.parseTrHeight(a,t);break;case"strike":t["text-decoration"]=E.boolAttr(a,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=E.boolAttr(a,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=E.boolAttr(a,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=E.boolAttr(a,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=E.boolAttr(a,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(a,t);break;case"ind":case"tblInd":this.parseIndentation(a,t);break;case"rFonts":this.parseFont(a,t);break;case"tblBorders":this.parseBorderProperties(a,r||t);break;case"tblCellSpacing":t["border-spacing"]=lt.valueOfMargin(a),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(a,t);break;case"bdr":t.border=lt.valueOfBorder(a);break;case"tcBorders":this.parseBorderProperties(a,t);break;case"vanish":E.boolAttr(a,"val",!0)&&(t.display="none");break;case"kern":break;case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(a,r||t);break;case"tblLayout":t["table-layout"]=lt.valueOfTblLayout(a);break;case"vAlign":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"spacing":e.localName=="pPr"&&this.parseSpacing(a,t);break;case"wordWrap":E.boolAttr(a,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=E.boolAttr(a,"val",!0)?"none":"auto";break;case"lang":t.$lang=E.attr(a,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${a.localName}`);break}}),t}parseUnderline(e,t){var r=E.attr(e,"val");if(r!=null){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"words":t["text-decoration"]="underline";break;case"none":t["text-decoration"]="none";break}var n=ht.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}}parseFont(e,t){var r=E.attr(e,"ascii"),n=lt.themeValue(e,"asciiTheme"),a=[r,n].filter(i=>i).join(", ");a.length>0&&(t["font-family"]=a)}parseIndentation(e,t){var r=E.lengthAttr(e,"firstLine"),n=E.lengthAttr(e,"hanging"),a=E.lengthAttr(e,"left"),i=E.lengthAttr(e,"start"),l=E.lengthAttr(e,"right"),h=E.lengthAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]=`-${n}`),(a||i)&&(t["margin-left"]=a||i),(l||h)&&(t["margin-right"]=l||h)}parseSpacing(e,t){var r=E.lengthAttr(e,"before"),n=E.lengthAttr(e,"after"),a=E.intAttr(e,"line",null),i=E.attr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),a!==null)switch(i){case"auto":t["line-height"]=`${(a/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${a/20}pt)`;break;default:t["line-height"]=t["min-height"]=`${a/20}pt`;break}}parseMarginProperties(e,t){ht.foreach(e,r=>{switch(r.localName){case"left":t["padding-left"]=lt.valueOfMargin(r);break;case"right":t["padding-right"]=lt.valueOfMargin(r);break;case"top":t["padding-top"]=lt.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=lt.valueOfMargin(r);break}})}parseTrHeight(e,t){switch(E.attr(e,"hRule")){case"exact":t.height=E.lengthAttr(e,"val");break;case"atLeast":default:t.height=E.lengthAttr(e,"val");break}}parseBorderProperties(e,t){ht.foreach(e,r=>{switch(r.localName){case"start":case"left":t["border-left"]=lt.valueOfBorder(r);break;case"end":case"right":t["border-right"]=lt.valueOfBorder(r);break;case"top":t["border-top"]=lt.valueOfBorder(r);break;case"bottom":t["border-bottom"]=lt.valueOfBorder(r);break}})}}const Rr=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class ht{static foreach(e,t){for(var r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];n.nodeType==Node.ELEMENT_NODE&&t(n)}}static colorAttr(e,t,r=null,n="black"){var a=E.attr(e,t);if(a)return a=="auto"?n:Rr.includes(a)?a:`#${a}`;var i=E.attr(e,"themeColor");return i?`var(--docx-${i}-color)`:r}static sizeValue(e,t=pt.Dxa){return ce(e.textContent,t)}}class lt{static themeValue(e,t){var r=E.attr(e,t);return r?`var(--docx-${r}-font)`:null}static valueOfSize(e,t){var r=pt.Dxa;switch(E.attr(e,"type")){case"dxa":break;case"pct":r=pt.Percent;break;case"auto":return"auto"}return E.lengthAttr(e,t,r)}static valueOfMargin(e){return E.lengthAttr(e,"w")}static valueOfBorder(e){var t=E.attr(e,"val");if(t=="nil")return"none";var r=ht.colorAttr(e,"color"),n=E.lengthAttr(e,"sz",pt.Border);return`${n} solid ${r=="auto"?Dt.borderColor:r}`}static valueOfTblLayout(e){var t=E.attr(e,"val");return t=="fixed"?"fixed":"auto"}static classNameOfCnfStyle(e){const t=E.attr(e,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter((n,a)=>t[a]=="1").join(" ")}static valueOfJc(e){var t=E.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=E.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=E.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return e==null?t:t==null?e:`calc(${e} + ${t})`}static classNameOftblLook(e){const t=E.hexAttr(e,"val",0);let r="";return(E.boolAttr(e,"firstRow")||t&32)&&(r+=" first-row"),(E.boolAttr(e,"lastRow")||t&64)&&(r+=" last-row"),(E.boolAttr(e,"firstColumn")||t&128)&&(r+=" first-col"),(E.boolAttr(e,"lastColumn")||t&256)&&(r+=" last-col"),(E.boolAttr(e,"noHBand")||t&512)&&(r+=" no-hband"),(E.boolAttr(e,"noVBand")||t&1024)&&(r+=" no-vband"),r.trim()}}const ae={pos:0,leader:"none",style:"left"},Tr=50;function Fr(c=document.body){const e=document.createElement("div");e.style.width="100pt",c.appendChild(e);const t=100/e.offsetWidth;return c.removeChild(e),t}function Ir(c,e,t,r=72/96){const n=c.closest("p"),a=c.getBoundingClientRect(),i=n.getBoundingClientRect(),l=getComputedStyle(n),h=(e==null?void 0:e.length)>0?e.map(b=>({pos:ne(b.position),leader:b.leader,style:b.style})).sort((b,x)=>b.pos-x.pos):[ae],k=h[h.length-1],w=i.width*r,y=ne(t);let _=k.pos+y;if(_<w)for(;_<w&&h.length<Tr;_+=y)h.push({...ae,pos:_});const d=parseFloat(l.marginLeft),v=i.left+d,u=(a.left-v)*r,m=h.find(b=>b.style!="clear"&&b.pos>u);if(m==null)return;let f=1;if(m.style=="right"||m.style=="center"){const b=Array.from(n.querySelectorAll(`.${c.className}`)),x=b.indexOf(c)+1,A=document.createRange();A.setStart(c,1),x<b.length?A.setEndBefore(b[x]):A.setEndAfter(n);const P=m.style=="center"?.5:1,D=A.getBoundingClientRect(),F=D.left+P*D.width-(i.left-d);f=m.pos-F*r}else f=m.pos-u;switch(c.innerHTML="&nbsp;",c.style.textDecoration="inherit",c.style.wordSpacing=`${f.toFixed(0)}pt`,m.leader){case"dot":case"middleDot":c.style.textDecoration="underline",c.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":c.style.textDecoration="underline";break}}function ne(c){return parseFloat(c)}const at={svg:"http://www.w3.org/2000/svg",mathML:"http://www.w3.org/1998/Math/MathML"};class Or{constructor(e){this.htmlDocument=e,this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.tabsTimeout=0,this.tasks=[],this.createElement=Ht}render(e,t,r=null,n){var i;this.document=e,this.options=n,this.className=n.className,this.rootSelector=n.inWrapper?`.${this.className}-wrapper`:":root",this.styleMap=null,this.tasks=[],r=r||t,ie(r),ie(t),Bt(r,"docxjs library predefined styles"),r.appendChild(this.renderDefaultStyle()),e.themePart&&(Bt(r,"docxjs document theme values"),this.renderTheme(e.themePart,r)),e.stylesPart!=null&&(this.styleMap=this.processStyles(e.stylesPart.styles),Bt(r,"docxjs document styles"),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),Bt(r,"docxjs document numbering styles"),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),e.footnotesPart&&(this.footnoteMap=xt(e.footnotesPart.notes,l=>l.id)),e.endnotesPart&&(this.endnoteMap=xt(e.endnotesPart.notes,l=>l.id)),e.settingsPart&&(this.defaultTabSize=(i=e.settingsPart.settings)==null?void 0:i.defaultTabStop),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var a=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(a)):$t(t,a),this.refreshTabStops()}renderTheme(e,t){var l,h;const r={},n=(l=e.theme)==null?void 0:l.fontScheme;n&&(n.majorFont&&(r["--docx-majorHAnsi-font"]=n.majorFont.latinTypeface),n.minorFont&&(r["--docx-minorHAnsi-font"]=n.minorFont.latinTypeface));const a=(h=e.theme)==null?void 0:h.colorScheme;if(a)for(let[k,w]of Object.entries(a.colors))r[`--docx-${k}-color`]=`#${w}`;const i=this.styleToString(`.${this.className}`,r);t.appendChild(Ct(i))}renderFontTable(e,t){for(let r of e.fonts)for(let n of r.embedFontRefs)this.tasks.push(this.document.loadFont(n.id,n.key).then(a=>{const i={"font-family":r.name,src:`url(${a})`};(n.type=="bold"||n.type=="boldItalic")&&(i["font-weight"]="bold"),(n.type=="italic"||n.type=="boldItalic")&&(i["font-style"]="italic"),Bt(t,`docxjs ${r.name} font`);const l=this.styleToString("@font-face",i);t.appendChild(Ct(l)),this.refreshTabStops()}))}processStyleName(e){return e?`${this.className}_${De(e)}`:this.className}processStyles(e){const t=xt(e.filter(n=>n.id!=null),n=>n.id);for(const n of e.filter(a=>a.basedOn)){var r=t[n.basedOn];if(r){n.paragraphProps=Lt(n.paragraphProps,r.paragraphProps),n.runProps=Lt(n.runProps,r.runProps);for(const a of r.styles){const i=n.styles.find(l=>l.target==a.target);i?this.copyStyleProperties(a.values,i.values):n.styles.push({...a,values:{...a.values}})}}else this.options.debug&&console.warn(`Can't find base style ${n.basedOn}`)}for(let n of e)n.cssName=this.processStyleName(n.id);return t}prodessNumberings(e){var t;for(let r of e.filter(n=>n.pStyleName)){const n=this.findStyle(r.pStyleName);(t=n==null?void 0:n.paragraphProps)!=null&&t.numbering&&(n.paragraphProps.numbering.level=r.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==R.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;t==null&&(t={}),r==null&&(r=Object.getOwnPropertyNames(e));for(var n of r)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n]);return t}createSection(e,t){var r=this.createElement("section",{className:e});return t&&(t.pageMargins&&(r.style.paddingLeft=t.pageMargins.left,r.style.paddingRight=t.pageMargins.right,r.style.paddingTop=t.pageMargins.top,r.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(r.style.width=t.pageSize.width),this.options.ignoreHeight||(r.style.minHeight=t.pageSize.height)),t.columns&&t.columns.numberOfColumns&&(r.style.columnCount=`${t.columns.numberOfColumns}`,r.style.columnGap=t.columns.space,t.columns.separator&&(r.style.columnRule="1px solid black"))),r}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children);let n=null;for(let i=0,l=r.length;i<l;i++){this.currentFootnoteIds=[];const h=r[i],k=h.sectProps||e.props,w=this.createSection(this.className,k);this.renderStyleValues(e.cssStyle,w),this.options.renderHeaders&&this.renderHeaderFooter(k.headerRefs,k,t.length,n!=k,w);var a=this.createElement("article");this.renderElements(h.elements,a),w.appendChild(a),this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,w),this.options.renderEndnotes&&i==l-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,w),this.options.renderFooters&&this.renderHeaderFooter(k.footerRefs,k,t.length,n!=k,w),t.push(w),n=k}return t}renderHeaderFooter(e,t,r,n,a){if(e){var i=(t.titlePage&&n?e.find(h=>h.type=="first"):null)??(r%2==1?e.find(h=>h.type=="even"):null)??e.find(h=>h.type=="default"),l=i&&this.document.findPartByRelId(i.id,this.document.documentPart);if(l){this.currentPart=l,this.usedHederFooterParts.includes(l.path)||(this.processElement(l.rootElement),this.usedHederFooterParts.push(l.path));const[h]=this.renderElements([l.rootElement],a);t!=null&&t.pageMargins&&(l.rootElement.type===R.Header?(h.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,h.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):l.rootElement.type===R.Footer&&(h.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,h.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type!=R.Break?!1:e.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:e.break=="page"}splitBySection(e){var w;var t={sectProps:null,elements:[]},r=[t];for(let y of e){if(y.type==R.Paragraph){const _=this.findStyle(y.styleName);(w=_==null?void 0:_.paragraphProps)!=null&&w.pageBreakBefore&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t))}if(t.elements.push(y),y.type==R.Paragraph){const _=y;var n=_.sectionProps,a=-1,i=-1;if(this.options.breakPages&&_.children&&(a=_.children.findIndex(d=>{var v;return i=((v=d.children)==null?void 0:v.findIndex(this.isPageBreakElement.bind(this)))??-1,i!=-1})),(n||a!=-1)&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t)),a!=-1){let d=_.children[a],v=i<d.children.length-1;if(a<_.children.length-1||v){var l=y.children,h={...y,children:l.slice(a)};if(y.children=l.slice(0,a),t.elements.push(h),v){let u=d.children,m={...d,children:u.slice(0,i)};y.children.push(m),d.children=u.slice(i)}}}}}let k=null;for(let y=r.length-1;y>=0;y--)r[y].sectProps==null?r[y].sectProps=k:k=r[y].sectProps;return r}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`
.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } 
.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
.${e} { color: black; hyphens: auto; text-underline-position: from-font; }
section.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
section.${e}>article { margin-bottom: auto; z-index: 1; }
section.${e}>footer { z-index: 1; }
.${e} table { border-collapse: collapse; }
.${e} table td, .${e} table th { vertical-align: top; }
.${e} p { margin: 0pt; min-height: 1em; }
.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }
.${e} a { color: inherit; text-decoration: inherit; }
`;return Ct(t)}renderNumbering(e,t){var r="",n=[];for(var a of e){var i=`p.${this.numberingClass(a.id,a.level)}`,l="none";if(a.bullet){let h=`--${this.className}-${a.bullet.src}`.toLowerCase();r+=this.styleToString(`${i}:before`,{content:"' '",display:"inline-block",background:`var(${h})`},a.bullet.style),this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then(k=>{var w=`${this.rootSelector} { ${h}: url(${k}) }`;t.appendChild(Ct(w))}))}else if(a.levelText){let h=this.numberingCounter(a.id,a.level);const k=h+" "+(a.start-1);a.level>0&&(r+=this.styleToString(`p.${this.numberingClass(a.id,a.level-1)}`,{"counter-reset":k})),n.push(k),r+=this.styleToString(`${i}:before`,{content:this.levelTextToContent(a.levelText,a.suff,a.id,this.numFormatToCssValue(a.format)),"counter-increment":h,...a.rStyle})}else l=this.numFormatToCssValue(a.format);r+=this.styleToString(i,{display:"list-item","list-style-position":"inside","list-style-type":l,...a.pStyle})}return n.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":n.join(" ")})),Ct(r)}renderStyles(e){var t="";const r=this.styleMap,n=xt(e.filter(h=>h.isDefault),h=>h.target);for(const h of e){var a=h.styles;if(h.linked){var i=h.linked&&r[h.linked];i?a=a.concat(i.styles):this.options.debug&&console.warn(`Can't find linked style ${h.linked}`)}for(const k of a){var l=`${h.target??""}.${h.cssName}`;h.target!=k.target&&(l+=` ${k.target}`),n[h.target]==h&&(l=`.${this.className} ${h.target}, `+l),t+=this.styleToString(l,k.values)}}return Ct(t)}renderNotes(e,t,r){var n=e.map(i=>t[i]).filter(i=>i);if(n.length>0){var a=this.createElement("ol",null,this.renderElements(n));r.appendChild(a)}}renderElement(e){switch(e.type){case R.Paragraph:return this.renderParagraph(e);case R.BookmarkStart:return this.renderBookmarkStart(e);case R.BookmarkEnd:return null;case R.Run:return this.renderRun(e);case R.Table:return this.renderTable(e);case R.Row:return this.renderTableRow(e);case R.Cell:return this.renderTableCell(e);case R.Hyperlink:return this.renderHyperlink(e);case R.Drawing:return this.renderDrawing(e);case R.Image:return this.renderImage(e);case R.Text:return this.renderText(e);case R.Text:return this.renderText(e);case R.DeletedText:return this.renderDeletedText(e);case R.Tab:return this.renderTab(e);case R.Symbol:return this.renderSymbol(e);case R.Break:return this.renderBreak(e);case R.Footer:return this.renderContainer(e,"footer");case R.Header:return this.renderContainer(e,"header");case R.Footnote:case R.Endnote:return this.renderContainer(e,"li");case R.FootnoteReference:return this.renderFootnoteReference(e);case R.EndnoteReference:return this.renderEndnoteReference(e);case R.NoBreakHyphen:return this.createElement("wbr");case R.VmlPicture:return this.renderVmlPicture(e);case R.VmlElement:return this.renderVmlElement(e);case R.MmlMath:return this.renderContainerNS(e,at.mathML,"math",{xmlns:at.mathML});case R.MmlMathParagraph:return this.renderContainer(e,"span");case R.MmlFraction:return this.renderContainerNS(e,at.mathML,"mfrac");case R.MmlBase:return this.renderContainerNS(e,at.mathML,e.parent.type==R.MmlMatrixRow?"mtd":"mrow");case R.MmlNumerator:case R.MmlDenominator:case R.MmlFunction:case R.MmlLimit:case R.MmlBox:return this.renderContainerNS(e,at.mathML,"mrow");case R.MmlGroupChar:return this.renderMmlGroupChar(e);case R.MmlLimitLower:return this.renderContainerNS(e,at.mathML,"munder");case R.MmlMatrix:return this.renderContainerNS(e,at.mathML,"mtable");case R.MmlMatrixRow:return this.renderContainerNS(e,at.mathML,"mtr");case R.MmlRadical:return this.renderMmlRadical(e);case R.MmlSuperscript:return this.renderContainerNS(e,at.mathML,"msup");case R.MmlSubscript:return this.renderContainerNS(e,at.mathML,"msub");case R.MmlDegree:case R.MmlSuperArgument:case R.MmlSubArgument:return this.renderContainerNS(e,at.mathML,"mn");case R.MmlFunctionName:return this.renderContainerNS(e,at.mathML,"ms");case R.MmlDelimiter:return this.renderMmlDelimiter(e);case R.MmlRun:return this.renderMmlRun(e);case R.MmlNary:return this.renderMmlNary(e);case R.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case R.MmlBar:return this.renderMmlBar(e);case R.MmlEquationArray:return this.renderMllList(e);case R.Inserted:return this.renderInserted(e);case R.Deleted:return this.renderDeleted(e)}return null}renderChildren(e,t){return this.renderElements(e.children,t)}renderElements(e,t){if(e==null)return null;var r=e.flatMap(n=>this.renderElement(n)).filter(n=>n!=null);return t&&$t(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderChildren(e))}renderContainerNS(e,t,r,n){return ct(t,r,n,this.renderChildren(e))}renderParagraph(e){var a,i;var t=this.createElement("p");const r=this.findStyle(e.styleName);e.tabs??(e.tabs=(a=r==null?void 0:r.paragraphProps)==null?void 0:a.tabs),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const n=e.numbering??((i=r==null?void 0:r.paragraphProps)==null?void 0:i.numbering);return n&&t.classList.add(this.numberingClass(n.id,n.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){t!=null&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=t.fontSize))}renderHyperlink(e){var t=this.createElement("a");if(this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href)t.href=e.href;else if(e.id){const r=this.document.documentPart.rels.find(n=>n.id==e.id&&n.targetMode==="External");t.href=r==null?void 0:r.target}return t}renderDrawing(e){var t=this.createElement("div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(r=>{t.src=r})),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderEndnotes?this.htmlDocument.createTextNode(e.text):null}renderBreak(e){return e.break=="textWrapping"?this.createElement("br"):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,"ins"):this.renderChildren(e)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,"del"):null}renderSymbol(e){var t=this.createElement("span");return t.style.fontFamily=e.font,t.innerHTML=`&#x${e.char};`,t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent=`${this.currentEndnoteIds.length}`,t}renderTab(e){var n;var t=this.createElement("span");if(t.innerHTML="&emsp;",this.options.experimental){t.className=this.tabStopClass();var r=(n=Dr(e,R.Paragraph))==null?void 0:n.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){var t=this.createElement("span");return t.id=e.name,t}renderRun(e){if(e.fieldRun)return null;const t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){const r=this.createElement(e.verticalAlign);this.renderChildren(e,r),t.appendChild(r)}else this.renderChildren(e,t);return t}renderTable(e){let t=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement("colgroup");for(let r of e){let n=this.createElement("col");r.width&&(n.style.width=r.width),t.appendChild(n)}return t}renderTableRow(e){let t=this.createElement("tr");return this.currentCellPosition.col=0,this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.currentCellPosition.row++,t}renderTableCell(e){let t=this.createElement("td");const r=this.currentCellPosition.col;return e.verticalMerge?e.verticalMerge=="restart"?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){var t=Ht("div");return this.renderChildren(e,t),t}renderVmlElement(e){var n,a;var t=se("svg");t.setAttribute("style",e.cssStyleText);const r=this.renderVmlChildElement(e);return(n=e.imageHref)!=null&&n.id&&this.tasks.push((a=this.document)==null?void 0:a.loadDocumentImage(e.imageHref.id,this.currentPart).then(i=>r.setAttribute("href",i))),t.appendChild(r),requestAnimationFrame(()=>{const i=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(i.x+i.width)}`),t.setAttribute("height",`${Math.ceil(i.y+i.height)}`)}),t}renderVmlChildElement(e){const t=se(e.tagName);Object.entries(e.attrs).forEach(([r,n])=>t.setAttribute(r,n));for(let r of e.children)r.type==R.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...Nt(this.renderElement(r)));return t}renderMmlRadical(e){var n;const t=e.children.find(a=>a.type==R.MmlBase);if((n=e.props)!=null&&n.hideDegree)return ct(at.mathML,"msqrt",null,this.renderElements([t]));const r=e.children.find(a=>a.type==R.MmlDegree);return ct(at.mathML,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){const t=[];return t.push(ct(at.mathML,"mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(ct(at.mathML,"mo",null,[e.props.endChar??")"])),ct(at.mathML,"mrow",null,t)}renderMmlNary(e){var k;const t=[],r=xt(e.children,w=>w.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,l=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,h=ct(at.mathML,"mo",null,[((k=e.props)==null?void 0:k.char)??"∫"]);return i||l?t.push(ct(at.mathML,"munderover",null,[h,l,i])):i?t.push(ct(at.mathML,"mover",null,[h,i])):l?t.push(ct(at.mathML,"munder",null,[h,l])):t.push(h),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=xt(e.children,k=>k.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,l=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,h=ct(at.mathML,"mo",null);return t.push(ct(at.mathML,"msubsup",null,[h,l,i])),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlGroupChar(e){const t=e.props.verticalJustification==="bot"?"mover":"munder",r=this.renderContainerNS(e,at.mathML,t);return e.props.char&&r.appendChild(ct(at.mathML,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,at.mathML,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline";break}return t}renderMmlRun(e){const t=ct(at.mathML,"ms");return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e,t),t}renderMllList(e){const t=ct(at.mathML,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e);for(let r of this.renderChildren(e))t.appendChild(ct(at.mathML,"mtr",null,[ct(at.mathML,"mtd",null,[r])]));return t}renderStyleValues(e,t){for(let r in e)r.startsWith("$")?t.setAttribute(r.slice(1),e[r]):t.style[r]=e[r]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){var t;return e&&((t=this.styleMap)==null?void 0:t[e])}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let n=`${e} {\r
`;for(const a in t)a.startsWith("$")||(n+=`  ${a}: ${t[a]};\r
`);return r&&(n+=r),n+`}\r
`}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,n){const a={tab:"\\9",space:"\\a0"};var i=e.replace(/%\d*/g,l=>{let h=parseInt(l.substring(1),10)-1;return`"counter(${this.numberingCounter(r,h)}, ${n})"`});return`"${i}${a[t]??""}"`}numFormatToCssValue(e){var t={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"};return t[e]??e}refreshTabStops(){this.options.experimental&&(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{const e=Fr();for(let t of this.currentTabs)Ir(t.span,t.stops,this.defaultTabSize,e)},500))}}function Ht(c,e,t){return ct(void 0,c,e,t)}function se(c,e,t){return ct(at.svg,c,e,t)}function ct(c,e,t,r){var n=c?document.createElementNS(c,e):document.createElement(e);return Object.assign(n,t),r&&$t(n,r),n}function ie(c){c.innerHTML=""}function $t(c,e){e.forEach(t=>c.appendChild(je(t)?document.createTextNode(t):t))}function Ct(c){return Ht("style",{innerHTML:c})}function Bt(c,e){c.appendChild(document.createComment(e))}function Dr(c,e){for(var t=c.parent;t!=null&&t.type!=e;)t=t.parent;return t}const ye={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1};function Lr(c,e){const t={...ye,...e};return Gt.load(c,new Mr(t),t)}async function jr(c,e,t,r){const n={...ye,...r},a=new Or(window.document);return a.render(c,e,t,n),Promise.allSettled(a.tasks.filter(i=>i))}async function Hr(c,e,t,r){const n=await Lr(c,r);return await jr(n,e,t,r),n}export{ye as defaultOptions,Lr as praseAsync,Hr as renderAsync,jr as renderDocument};
