選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

97 行
173KB

  1. var Pe=(fe,pe,T)=>new Promise((M,E)=>{var x=r=>{try{e(T.next(r))}catch(s){E(s)}},v=r=>{try{e(T.throw(r))}catch(s){E(s)}},e=r=>r.done?M(r.value):Promise.resolve(r.value).then(x,v);e((T=T.apply(fe,pe)).next())});import{j as _e,d as Oe,r as Re,o as ze,c as Ie,k as Fe,g as Me}from"./index.551f5afa.js";import{d as Ce}from"./uploadAction.69ee4a64.js";var Ee={exports:{}};function ke(fe){throw new Error('Could not dynamically require "'+fe+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xe={exports:{}};/*!
  2. JSZip v3.10.1 - A JavaScript class for generating and reading zip files
  3. <http://stuartk.com/jszip>
  4. (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
  5. Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
  6. JSZip uses the library pako released under the MIT license :
  7. https://github.com/nodeca/pako/blob/main/LICENSE
  8. */var Te;function Le(){return Te||(Te=1,function(fe,pe){(function(T){fe.exports=T()})(function(){return function T(M,E,x){function v(s,m){if(!E[s]){if(!M[s]){var p=typeof ke=="function"&&ke;if(!m&&p)return p(s,!0);if(e)return e(s,!0);var n=new Error("Cannot find module '"+s+"'");throw n.code="MODULE_NOT_FOUND",n}var i=E[s]={exports:{}};M[s][0].call(i.exports,function(y){var h=M[s][1][y];return v(h||y)},i,i.exports,T,M,E,x)}return E[s].exports}for(var e=typeof ke=="function"&&ke,r=0;r<x.length;r++)v(x[r]);return v}({1:[function(T,M,E){var x=T("./utils"),v=T("./support"),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";E.encode=function(r){for(var s,m,p,n,i,y,h,d=[],f=0,g=r.length,S=g,C=x.getTypeOf(r)!=="string";f<r.length;)S=g-f,p=C?(s=r[f++],m=f<g?r[f++]:0,f<g?r[f++]:0):(s=r.charCodeAt(f++),m=f<g?r.charCodeAt(f++):0,f<g?r.charCodeAt(f++):0),n=s>>2,i=(3&s)<<4|m>>4,y=1<S?(15&m)<<2|p>>6:64,h=2<S?63&p:64,d.push(e.charAt(n)+e.charAt(i)+e.charAt(y)+e.charAt(h));return d.join("")},E.decode=function(r){var s,m,p,n,i,y,h=0,d=0,f="data:";if(r.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var g,S=3*(r=r.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(r.charAt(r.length-1)===e.charAt(64)&&S--,r.charAt(r.length-2)===e.charAt(64)&&S--,S%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=v.uint8array?new Uint8Array(0|S):new Array(0|S);h<r.length;)s=e.indexOf(r.charAt(h++))<<2|(n=e.indexOf(r.charAt(h++)))>>4,m=(15&n)<<4|(i=e.indexOf(r.charAt(h++)))>>2,p=(3&i)<<6|(y=e.indexOf(r.charAt(h++))),g[d++]=s,i!==64&&(g[d++]=m),y!==64&&(g[d++]=p);return g}},{"./support":30,"./utils":32}],2:[function(T,M,E){var x=T("./external"),v=T("./stream/DataWorker"),e=T("./stream/Crc32Probe"),r=T("./stream/DataLengthProbe");function s(m,p,n,i,y){this.compressedSize=m,this.uncompressedSize=p,this.crc32=n,this.compression=i,this.compressedContent=y}s.prototype={getContentWorker:function(){var m=new v(x.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),p=this;return m.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new v(x.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(m,p,n){return m.pipe(new e).pipe(new r("uncompressedSize")).pipe(p.compressWorker(n)).pipe(new r("compressedSize")).withStreamInfo("compression",p)},M.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(T,M,E){var x=T("./stream/GenericWorker");E.STORE={magic:"\0\0",compressWorker:function(){return new x("STORE compression")},uncompressWorker:function(){return new x("STORE decompression")}},E.DEFLATE=T("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(T,M,E){var x=T("./utils"),v=function(){for(var e,r=[],s=0;s<256;s++){e=s;for(var m=0;m<8;m++)e=1&e?3988292384^e>>>1:e>>>1;r[s]=e}return r}();M.exports=function(e,r){return e!==void 0&&e.length?x.getTypeOf(e)!=="string"?function(s,m,p,n){var i=v,y=n+p;s^=-1;for(var h=n;h<y;h++)s=s>>>8^i[255&(s^m[h])];return-1^s}(0|r,e,e.length,0):function(s,m,p,n){var i=v,y=n+p;s^=-1;for(var h=n;h<y;h++)s=s>>>8^i[255&(s^m.charCodeAt(h))];return-1^s}(0|r,e,e.length,0):0}},{"./utils":32}],5:[function(T,M,E){E.base64=!1,E.binary=!1,E.dir=!1,E.createFolders=!0,E.date=null,E.compression=null,E.compressionOptions=null,E.comment=null,E.unixPermissions=null,E.dosPermissions=null},{}],6:[function(T,M,E){var x=null;x=typeof Promise!="undefined"?Promise:T("lie"),M.exports={Promise:x}},{lie:37}],7:[function(T,M,E){var x=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",v=T("pako"),e=T("./utils"),r=T("./stream/GenericWorker"),s=x?"uint8array":"array";function m(p,n){r.call(this,"FlateWorker/"+p),this._pako=null,this._pakoAction=p,this._pakoOptions=n,this.meta={}}E.magic="\b\0",e.inherits(m,r),m.prototype.processChunk=function(p){this.meta=p.meta,this._pako===null&&this._createPako(),this._pako.push(e.transformTo(s,p.data),!1)},m.prototype.flush=function(){r.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new v[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var p=this;this._pako.onData=function(n){p.push({data:n,meta:p.meta})}},E.compressWorker=function(p){return new m("Deflate",p)},E.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(T,M,E){function x(i,y){var h,d="";for(h=0;h<y;h++)d+=String.fromCharCode(255&i),i>>>=8;return d}function v(i,y,h,d,f,g){var S,C,a=i.file,l=i.compression,t=g!==s.utf8encode,o=e.transformTo("string",g(a.name)),b=e.transformTo("string",s.utf8encode(a.name)),k=a.comment,D=e.transformTo("string",g(k)),_=e.transformTo("string",s.utf8encode(k)),P=b.length!==a.name.length,u=_.length!==k.length,R="",G="",L="",q=a.dir,W=a.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};y&&!h||(Y.crc32=i.crc32,Y.compressedSize=i.compressedSize,Y.uncompressedSize=i.uncompressedSize);var z=0;y&&(z|=8),t||!P&&!u||(z|=2048);var O=0,J=0;q&&(O|=16),f==="UNIX"?(J=798,O|=function(Z,ne){var oe=Z;return Z||(oe=ne?16893:33204),(65535&oe)<<16}(a.unixPermissions,q)):(J=20,O|=function(Z){return 63&(Z||0)}(a.dosPermissions)),S=W.getUTCHours(),S<<=6,S|=W.getUTCMinutes(),S<<=5,S|=W.getUTCSeconds()/2,C=W.getUTCFullYear()-1980,C<<=4,C|=W.getUTCMonth()+1,C<<=5,C|=W.getUTCDate(),P&&(G=x(1,1)+x(m(o),4)+b,R+="up"+x(G.length,2)+G),u&&(L=x(1,1)+x(m(D),4)+_,R+="uc"+x(L.length,2)+L);var V="";return V+=`
  9. \0`,V+=x(z,2),V+=l.magic,V+=x(S,2),V+=x(C,2),V+=x(Y.crc32,4),V+=x(Y.compressedSize,4),V+=x(Y.uncompressedSize,4),V+=x(o.length,2),V+=x(R.length,2),{fileRecord:p.LOCAL_FILE_HEADER+V+o+R,dirRecord:p.CENTRAL_FILE_HEADER+x(J,2)+V+x(D.length,2)+"\0\0\0\0"+x(O,4)+x(d,4)+o+R+D}}var e=T("../utils"),r=T("../stream/GenericWorker"),s=T("../utf8"),m=T("../crc32"),p=T("../signature");function n(i,y,h,d){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=h,this.encodeFileName=d,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}e.inherits(n,r),n.prototype.push=function(i){var y=i.meta.percent||0,h=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,r.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:h?(y+100*(h-d-1))/h:100}}))},n.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var y=this.streamFiles&&!i.file.dir;if(y){var h=v(i,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(i){this.accumulate=!1;var y=this.streamFiles&&!i.file.dir,h=v(i,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),y)this.push({data:function(d){return p.DATA_DESCRIPTOR+x(d.crc32,4)+x(d.compressedSize,4)+x(d.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var i=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var h=this.bytesWritten-i,d=function(f,g,S,C,a){var l=e.transformTo("string",a(C));return p.CENTRAL_DIRECTORY_END+"\0\0\0\0"+x(f,2)+x(f,2)+x(g,4)+x(S,4)+x(l.length,2)+l}(this.dirRecords.length,h,i,this.zipComment,this.encodeFileName);this.push({data:d,meta:{percent:100}})},n.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},n.prototype.registerPrevious=function(i){this._sources.push(i);var y=this;return i.on("data",function(h){y.processChunk(h)}),i.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),i.on("error",function(h){y.error(h)}),this},n.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},n.prototype.error=function(i){var y=this._sources;if(!r.prototype.error.call(this,i))return!1;for(var h=0;h<y.length;h++)try{y[h].error(i)}catch(d){}return!0},n.prototype.lock=function(){r.prototype.lock.call(this);for(var i=this._sources,y=0;y<i.length;y++)i[y].lock()},M.exports=n},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(T,M,E){var x=T("../compressions"),v=T("./ZipFileWorker");E.generateWorker=function(e,r,s){var m=new v(r.streamFiles,s,r.platform,r.encodeFileName),p=0;try{e.forEach(function(n,i){p++;var y=function(g,S){var C=g||S,a=x[C];if(!a)throw new Error(C+" is not a valid compression method !");return a}(i.options.compression,r.compression),h=i.options.compressionOptions||r.compressionOptions||{},d=i.dir,f=i.date;i._compressWorker(y,h).withStreamInfo("file",{name:n,dir:d,date:f,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(m)}),m.entriesCount=p}catch(n){m.error(n)}return m}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(T,M,E){function x(){if(!(this instanceof x))return new x;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 v=new x;for(var e in this)typeof this[e]!="function"&&(v[e]=this[e]);return v}}(x.prototype=T("./object")).loadAsync=T("./load"),x.support=T("./support"),x.defaults=T("./defaults"),x.version="3.10.1",x.loadAsync=function(v,e){return new x().loadAsync(v,e)},x.external=T("./external"),M.exports=x},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(T,M,E){var x=T("./utils"),v=T("./external"),e=T("./utf8"),r=T("./zipEntries"),s=T("./stream/Crc32Probe"),m=T("./nodejsUtils");function p(n){return new v.Promise(function(i,y){var h=n.decompressed.getContentWorker().pipe(new s);h.on("error",function(d){y(d)}).on("end",function(){h.streamInfo.crc32!==n.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):i()}).resume()})}M.exports=function(n,i){var y=this;return i=x.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:e.utf8decode}),m.isNode&&m.isStream(n)?v.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):x.prepareContent("the loaded zip file",n,!0,i.optimizedBinaryString,i.base64).then(function(h){var d=new r(i);return d.load(h),d}).then(function(h){var d=[v.Promise.resolve(h)],f=h.files;if(i.checkCRC32)for(var g=0;g<f.length;g++)d.push(p(f[g]));return v.Promise.all(d)}).then(function(h){for(var d=h.shift(),f=d.files,g=0;g<f.length;g++){var S=f[g],C=S.fileNameStr,a=x.resolve(S.fileNameStr);y.file(a,S.decompressed,{binary:!0,optimizedBinaryString:!0,date:S.date,dir:S.dir,comment:S.fileCommentStr.length?S.fileCommentStr:null,unixPermissions:S.unixPermissions,dosPermissions:S.dosPermissions,createFolders:i.createFolders}),S.dir||(y.file(a).unsafeOriginalName=C)}return d.zipComment.length&&(y.comment=d.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(T,M,E){var x=T("../utils"),v=T("../stream/GenericWorker");function e(r,s){v.call(this,"Nodejs stream input adapter for "+r),this._upstreamEnded=!1,this._bindStream(s)}x.inherits(e,v),e.prototype._bindStream=function(r){var s=this;(this._stream=r).pause(),r.on("data",function(m){s.push({data:m,meta:{percent:0}})}).on("error",function(m){s.isPaused?this.generatedError=m:s.error(m)}).on("end",function(){s.isPaused?s._upstreamEnded=!0:s.end()})},e.prototype.pause=function(){return!!v.prototype.pause.call(this)&&(this._stream.pause(),!0)},e.prototype.resume=function(){return!!v.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},M.exports=e},{"../stream/GenericWorker":28,"../utils":32}],13:[function(T,M,E){var x=T("readable-stream").Readable;function v(e,r,s){x.call(this,r),this._helper=e;var m=this;e.on("data",function(p,n){m.push(p)||m._helper.pause(),s&&s(n)}).on("error",function(p){m.emit("error",p)}).on("end",function(){m.push(null)})}T("../utils").inherits(v,x),v.prototype._read=function(){this._helper.resume()},M.exports=v},{"../utils":32,"readable-stream":16}],14:[function(T,M,E){M.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(x,v){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(x,v);if(typeof x=="number")throw new Error('The "data" argument must not be a number');return new Buffer(x,v)},allocBuffer:function(x){if(Buffer.alloc)return Buffer.alloc(x);var v=new Buffer(x);return v.fill(0),v},isBuffer:function(x){return Buffer.isBuffer(x)},isStream:function(x){return x&&typeof x.on=="function"&&typeof x.pause=="function"&&typeof x.resume=="function"}}},{}],15:[function(T,M,E){function x(a,l,t){var o,b=e.getTypeOf(l),k=e.extend(t||{},m);k.date=k.date||new Date,k.compression!==null&&(k.compression=k.compression.toUpperCase()),typeof k.unixPermissions=="string"&&(k.unixPermissions=parseInt(k.unixPermissions,8)),k.unixPermissions&&16384&k.unixPermissions&&(k.dir=!0),k.dosPermissions&&16&k.dosPermissions&&(k.dir=!0),k.dir&&(a=f(a)),k.createFolders&&(o=d(a))&&g.call(this,o,!0);var D=b==="string"&&k.binary===!1&&k.base64===!1;t&&t.binary!==void 0||(k.binary=!D),(l instanceof p&&l.uncompressedSize===0||k.dir||!l||l.length===0)&&(k.base64=!1,k.binary=!0,l="",k.compression="STORE",b="string");var _=null;_=l instanceof p||l instanceof r?l:y.isNode&&y.isStream(l)?new h(a,l):e.prepareContent(a,l,k.binary,k.optimizedBinaryString,k.base64);var P=new n(a,_,k);this.files[a]=P}var v=T("./utf8"),e=T("./utils"),r=T("./stream/GenericWorker"),s=T("./stream/StreamHelper"),m=T("./defaults"),p=T("./compressedObject"),n=T("./zipObject"),i=T("./generate"),y=T("./nodejsUtils"),h=T("./nodejs/NodejsStreamInputAdapter"),d=function(a){a.slice(-1)==="/"&&(a=a.substring(0,a.length-1));var l=a.lastIndexOf("/");return 0<l?a.substring(0,l):""},f=function(a){return a.slice(-1)!=="/"&&(a+="/"),a},g=function(a,l){return l=l!==void 0?l:m.createFolders,a=f(a),this.files[a]||x.call(this,a,null,{dir:!0,createFolders:l}),this.files[a]};function S(a){return Object.prototype.toString.call(a)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(a){var l,t,o;for(l in this.files)o=this.files[l],(t=l.slice(this.root.length,l.length))&&l.slice(0,this.root.length)===this.root&&a(t,o)},filter:function(a){var l=[];return this.forEach(function(t,o){a(t,o)&&l.push(o)}),l},file:function(a,l,t){if(arguments.length!==1)return a=this.root+a,x.call(this,a,l,t),this;if(S(a)){var o=a;return this.filter(function(k,D){return!D.dir&&o.test(k)})}var b=this.files[this.root+a];return b&&!b.dir?b:null},folder:function(a){if(!a)return this;if(S(a))return this.filter(function(b,k){return k.dir&&a.test(b)});var l=this.root+a,t=g.call(this,l),o=this.clone();return o.root=t.name,o},remove:function(a){a=this.root+a;var l=this.files[a];if(l||(a.slice(-1)!=="/"&&(a+="/"),l=this.files[a]),l&&!l.dir)delete this.files[a];else for(var t=this.filter(function(b,k){return k.name.slice(0,a.length)===a}),o=0;o<t.length;o++)delete this.files[t[o].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(a){var l,t={};try{if((t=e.extend(a||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:v.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),t.type==="binarystring"&&(t.type="string"),!t.type)throw new Error("No output type specified.");e.checkSupport(t.type),t.platform!=="darwin"&&t.platform!=="freebsd"&&t.platform!=="linux"&&t.platform!=="sunos"||(t.platform="UNIX"),t.platform==="win32"&&(t.platform="DOS");var o=t.comment||this.comment||"";l=i.generateWorker(this,t,o)}catch(b){(l=new r("error")).error(b)}return new s(l,t.type||"string",t.mimeType)},generateAsync:function(a,l){return this.generateInternalStream(a).accumulate(l)},generateNodeStream:function(a,l){return(a=a||{}).type||(a.type="nodebuffer"),this.generateInternalStream(a).toNodejsStream(l)}};M.exports=C},{"./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,M,E){M.exports=T("stream")},{stream:void 0}],17:[function(T,M,E){var x=T("./DataReader");function v(e){x.call(this,e);for(var r=0;r<this.data.length;r++)e[r]=255&e[r]}T("../utils").inherits(v,x),v.prototype.byteAt=function(e){return this.data[this.zero+e]},v.prototype.lastIndexOfSignature=function(e){for(var r=e.charCodeAt(0),s=e.charCodeAt(1),m=e.charCodeAt(2),p=e.charCodeAt(3),n=this.length-4;0<=n;--n)if(this.data[n]===r&&this.data[n+1]===s&&this.data[n+2]===m&&this.data[n+3]===p)return n-this.zero;return-1},v.prototype.readAndCheckSignature=function(e){var r=e.charCodeAt(0),s=e.charCodeAt(1),m=e.charCodeAt(2),p=e.charCodeAt(3),n=this.readData(4);return r===n[0]&&s===n[1]&&m===n[2]&&p===n[3]},v.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r},M.exports=v},{"../utils":32,"./DataReader":18}],18:[function(T,M,E){var x=T("../utils");function v(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}v.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var r,s=0;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)s=(s<<8)+this.byteAt(r);return this.index+=e,s},readString:function(e){return x.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},M.exports=v},{"../utils":32}],19:[function(T,M,E){var x=T("./Uint8ArrayReader");function v(e){x.call(this,e)}T("../utils").inherits(v,x),v.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r},M.exports=v},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(T,M,E){var x=T("./DataReader");function v(e){x.call(this,e)}T("../utils").inherits(v,x),v.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},v.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},v.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},v.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r},M.exports=v},{"../utils":32,"./DataReader":18}],21:[function(T,M,E){var x=T("./ArrayReader");function v(e){x.call(this,e)}T("../utils").inherits(v,x),v.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r},M.exports=v},{"../utils":32,"./ArrayReader":17}],22:[function(T,M,E){var x=T("../utils"),v=T("../support"),e=T("./ArrayReader"),r=T("./StringReader"),s=T("./NodeBufferReader"),m=T("./Uint8ArrayReader");M.exports=function(p){var n=x.getTypeOf(p);return x.checkSupport(n),n!=="string"||v.uint8array?n==="nodebuffer"?new s(p):v.uint8array?new m(x.transformTo("uint8array",p)):new e(x.transformTo("array",p)):new r(p)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(T,M,E){E.LOCAL_FILE_HEADER="PK",E.CENTRAL_FILE_HEADER="PK",E.CENTRAL_DIRECTORY_END="PK",E.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",E.ZIP64_CENTRAL_DIRECTORY_END="PK",E.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(T,M,E){var x=T("./GenericWorker"),v=T("../utils");function e(r){x.call(this,"ConvertWorker to "+r),this.destType=r}v.inherits(e,x),e.prototype.processChunk=function(r){this.push({data:v.transformTo(this.destType,r.data),meta:r.meta})},M.exports=e},{"../utils":32,"./GenericWorker":28}],25:[function(T,M,E){var x=T("./GenericWorker"),v=T("../crc32");function e(){x.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}T("../utils").inherits(e,x),e.prototype.processChunk=function(r){this.streamInfo.crc32=v(r.data,this.streamInfo.crc32||0),this.push(r)},M.exports=e},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(T,M,E){var x=T("../utils"),v=T("./GenericWorker");function e(r){v.call(this,"DataLengthProbe for "+r),this.propName=r,this.withStreamInfo(r,0)}x.inherits(e,v),e.prototype.processChunk=function(r){if(r){var s=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=s+r.data.length}v.prototype.processChunk.call(this,r)},M.exports=e},{"../utils":32,"./GenericWorker":28}],27:[function(T,M,E){var x=T("../utils"),v=T("./GenericWorker");function e(r){v.call(this,"DataWorker");var s=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,r.then(function(m){s.dataIsReady=!0,s.data=m,s.max=m&&m.length||0,s.type=x.getTypeOf(m),s.isPaused||s._tickAndRepeat()},function(m){s.error(m)})}x.inherits(e,v),e.prototype.cleanUp=function(){v.prototype.cleanUp.call(this),this.data=null},e.prototype.resume=function(){return!!v.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,x.delay(this._tickAndRepeat,[],this)),!0)},e.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(x.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},e.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var r=null,s=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":r=this.data.substring(this.index,s);break;case"uint8array":r=this.data.subarray(this.index,s);break;case"array":case"nodebuffer":r=this.data.slice(this.index,s)}return this.index=s,this.push({data:r,meta:{percent:this.max?this.index/this.max*100:0}})},M.exports=e},{"../utils":32,"./GenericWorker":28}],28:[function(T,M,E){function x(v){this.name=v||"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}x.prototype={push:function(v){this.emit("data",v)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(v){this.emit("error",v)}return!0},error:function(v){return!this.isFinished&&(this.isPaused?this.generatedError=v:(this.isFinished=!0,this.emit("error",v),this.previous&&this.previous.error(v),this.cleanUp()),!0)},on:function(v,e){return this._listeners[v].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(v,e){if(this._listeners[v])for(var r=0;r<this._listeners[v].length;r++)this._listeners[v][r].call(this,e)},pipe:function(v){return v.registerPrevious(this)},registerPrevious:function(v){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=v.streamInfo,this.mergeStreamInfo(),this.previous=v;var e=this;return v.on("data",function(r){e.processChunk(r)}),v.on("end",function(){e.end()}),v.on("error",function(r){e.error(r)}),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 v=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),v=!0),this.previous&&this.previous.resume(),!v},flush:function(){},processChunk:function(v){this.push(v)},withStreamInfo:function(v,e){return this.extraStreamInfo[v]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var v in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,v)&&(this.streamInfo[v]=this.extraStreamInfo[v])},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 v="Worker "+this.name;return this.previous?this.previous+" -> "+v:v}},M.exports=x},{}],29:[function(T,M,E){var x=T("../utils"),v=T("./ConvertWorker"),e=T("./GenericWorker"),r=T("../base64"),s=T("../support"),m=T("../external"),p=null;if(s.nodestream)try{p=T("../nodejs/NodejsStreamOutputAdapter")}catch(y){}function n(y,h){return new m.Promise(function(d,f){var g=[],S=y._internalType,C=y._outputType,a=y._mimeType;y.on("data",function(l,t){g.push(l),h&&h(t)}).on("error",function(l){g=[],f(l)}).on("end",function(){try{var l=function(t,o,b){switch(t){case"blob":return x.newBlob(x.transformTo("arraybuffer",o),b);case"base64":return r.encode(o);default:return x.transformTo(t,o)}}(C,function(t,o){var b,k=0,D=null,_=0;for(b=0;b<o.length;b++)_+=o[b].length;switch(t){case"string":return o.join("");case"array":return Array.prototype.concat.apply([],o);case"uint8array":for(D=new Uint8Array(_),b=0;b<o.length;b++)D.set(o[b],k),k+=o[b].length;return D;case"nodebuffer":return Buffer.concat(o);default:throw new Error("concat : unsupported type '"+t+"'")}}(S,g),a);d(l)}catch(t){f(t)}g=[]}).resume()})}function i(y,h,d){var f=h;switch(h){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=h,this._mimeType=d,x.checkSupport(f),this._worker=y.pipe(new v(f)),y.lock()}catch(g){this._worker=new e("error"),this._worker.error(g)}}i.prototype={accumulate:function(y){return n(this,y)},on:function(y,h){var d=this;return y==="data"?this._worker.on(y,function(f){h.call(d,f.data,f.meta)}):this._worker.on(y,function(){x.delay(h,arguments,d)}),this},resume:function(){return x.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(x.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new p(this,{objectMode:this._outputType!=="nodebuffer"},y)}},M.exports=i},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(T,M,E){if(E.base64=!0,E.array=!0,E.string=!0,E.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",E.nodebuffer=typeof Buffer!="undefined",E.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")E.blob=!1;else{var x=new ArrayBuffer(0);try{E.blob=new Blob([x],{type:"application/zip"}).size===0}catch(e){try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);v.append(x),E.blob=v.getBlob("application/zip").size===0}catch(r){E.blob=!1}}}try{E.nodestream=!!T("readable-stream").Readable}catch(e){E.nodestream=!1}},{"readable-stream":16}],31:[function(T,M,E){for(var x=T("./utils"),v=T("./support"),e=T("./nodejsUtils"),r=T("./stream/GenericWorker"),s=new Array(256),m=0;m<256;m++)s[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;s[254]=s[254]=1;function p(){r.call(this,"utf-8 decode"),this.leftOver=null}function n(){r.call(this,"utf-8 encode")}E.utf8encode=function(i){return v.nodebuffer?e.newBufferFrom(i,"utf-8"):function(y){var h,d,f,g,S,C=y.length,a=0;for(g=0;g<C;g++)(64512&(d=y.charCodeAt(g)))==55296&&g+1<C&&(64512&(f=y.charCodeAt(g+1)))==56320&&(d=65536+(d-55296<<10)+(f-56320),g++),a+=d<128?1:d<2048?2:d<65536?3:4;for(h=v.uint8array?new Uint8Array(a):new Array(a),g=S=0;S<a;g++)(64512&(d=y.charCodeAt(g)))==55296&&g+1<C&&(64512&(f=y.charCodeAt(g+1)))==56320&&(d=65536+(d-55296<<10)+(f-56320),g++),d<128?h[S++]=d:(d<2048?h[S++]=192|d>>>6:(d<65536?h[S++]=224|d>>>12:(h[S++]=240|d>>>18,h[S++]=128|d>>>12&63),h[S++]=128|d>>>6&63),h[S++]=128|63&d);return h}(i)},E.utf8decode=function(i){return v.nodebuffer?x.transformTo("nodebuffer",i).toString("utf-8"):function(y){var h,d,f,g,S=y.length,C=new Array(2*S);for(h=d=0;h<S;)if((f=y[h++])<128)C[d++]=f;else if(4<(g=s[f]))C[d++]=65533,h+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&h<S;)f=f<<6|63&y[h++],g--;1<g?C[d++]=65533:f<65536?C[d++]=f:(f-=65536,C[d++]=55296|f>>10&1023,C[d++]=56320|1023&f)}return C.length!==d&&(C.subarray?C=C.subarray(0,d):C.length=d),x.applyFromCharCode(C)}(i=x.transformTo(v.uint8array?"uint8array":"array",i))},x.inherits(p,r),p.prototype.processChunk=function(i){var y=x.transformTo(v.uint8array?"uint8array":"array",i.data);if(this.leftOver&&this.leftOver.length){if(v.uint8array){var h=y;(y=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),y.set(h,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var d=function(g,S){var C;for((S=S||g.length)>g.length&&(S=g.length),C=S-1;0<=C&&(192&g[C])==128;)C--;return C<0||C===0?S:C+s[g[C]]>S?C:S}(y),f=y;d!==y.length&&(v.uint8array?(f=y.subarray(0,d),this.leftOver=y.subarray(d,y.length)):(f=y.slice(0,d),this.leftOver=y.slice(d,y.length))),this.push({data:E.utf8decode(f),meta:i.meta})},p.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:E.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},E.Utf8DecodeWorker=p,x.inherits(n,r),n.prototype.processChunk=function(i){this.push({data:E.utf8encode(i.data),meta:i.meta})},E.Utf8EncodeWorker=n},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(T,M,E){var x=T("./support"),v=T("./base64"),e=T("./nodejsUtils"),r=T("./external");function s(h){return h}function m(h,d){for(var f=0;f<h.length;++f)d[f]=255&h.charCodeAt(f);return d}T("setimmediate"),E.newBlob=function(h,d){E.checkSupport("blob");try{return new Blob([h],{type:d})}catch(g){try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(h),f.getBlob(d)}catch(S){throw new Error("Bug : can't construct the Blob.")}}};var p={stringifyByChunk:function(h,d,f){var g=[],S=0,C=h.length;if(C<=f)return String.fromCharCode.apply(null,h);for(;S<C;)d==="array"||d==="nodebuffer"?g.push(String.fromCharCode.apply(null,h.slice(S,Math.min(S+f,C)))):g.push(String.fromCharCode.apply(null,h.subarray(S,Math.min(S+f,C)))),S+=f;return g.join("")},stringifyByChar:function(h){for(var d="",f=0;f<h.length;f++)d+=String.fromCharCode(h[f]);return d},applyCanBeUsed:{uint8array:function(){try{return x.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(h){return!1}}(),nodebuffer:function(){try{return x.nodebuffer&&String.fromCharCode.apply(null,e.allocBuffer(1)).length===1}catch(h){return!1}}()}};function n(h){var d=65536,f=E.getTypeOf(h),g=!0;if(f==="uint8array"?g=p.applyCanBeUsed.uint8array:f==="nodebuffer"&&(g=p.applyCanBeUsed.nodebuffer),g)for(;1<d;)try{return p.stringifyByChunk(h,f,d)}catch(S){d=Math.floor(d/2)}return p.stringifyByChar(h)}function i(h,d){for(var f=0;f<h.length;f++)d[f]=h[f];return d}E.applyFromCharCode=n;var y={};y.string={string:s,array:function(h){return m(h,new Array(h.length))},arraybuffer:function(h){return y.string.uint8array(h).buffer},uint8array:function(h){return m(h,new Uint8Array(h.length))},nodebuffer:function(h){return m(h,e.allocBuffer(h.length))}},y.array={string:n,array:s,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return e.newBufferFrom(h)}},y.arraybuffer={string:function(h){return n(new Uint8Array(h))},array:function(h){return i(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:s,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return e.newBufferFrom(new Uint8Array(h))}},y.uint8array={string:n,array:function(h){return i(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:s,nodebuffer:function(h){return e.newBufferFrom(h)}},y.nodebuffer={string:n,array:function(h){return i(h,new Array(h.length))},arraybuffer:function(h){return y.nodebuffer.uint8array(h).buffer},uint8array:function(h){return i(h,new Uint8Array(h.length))},nodebuffer:s},E.transformTo=function(h,d){if(d=d||"",!h)return d;E.checkSupport(h);var f=E.getTypeOf(d);return y[f][h](d)},E.resolve=function(h){for(var d=h.split("/"),f=[],g=0;g<d.length;g++){var S=d[g];S==="."||S===""&&g!==0&&g!==d.length-1||(S===".."?f.pop():f.push(S))}return f.join("/")},E.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":x.nodebuffer&&e.isBuffer(h)?"nodebuffer":x.uint8array&&h instanceof Uint8Array?"uint8array":x.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},E.checkSupport=function(h){if(!x[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},E.MAX_VALUE_16BITS=65535,E.MAX_VALUE_32BITS=-1,E.pretty=function(h){var d,f,g="";for(f=0;f<(h||"").length;f++)g+="\\x"+((d=h.charCodeAt(f))<16?"0":"")+d.toString(16).toUpperCase();return g},E.delay=function(h,d,f){setImmediate(function(){h.apply(f||null,d||[])})},E.inherits=function(h,d){function f(){}f.prototype=d.prototype,h.prototype=new f},E.extend=function(){var h,d,f={};for(h=0;h<arguments.length;h++)for(d in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],d)&&f[d]===void 0&&(f[d]=arguments[h][d]);return f},E.prepareContent=function(h,d,f,g,S){return r.Promise.resolve(d).then(function(C){return x.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader!="undefined"?new r.Promise(function(a,l){var t=new FileReader;t.onload=function(o){a(o.target.result)},t.onerror=function(o){l(o.target.error)},t.readAsArrayBuffer(C)}):C}).then(function(C){var a=E.getTypeOf(C);return a?(a==="arraybuffer"?C=E.transformTo("uint8array",C):a==="string"&&(S?C=v.decode(C):f&&g!==!0&&(C=function(l){return m(l,x.uint8array?new Uint8Array(l.length):new Array(l.length))}(C))),C):r.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(T,M,E){var x=T("./reader/readerFor"),v=T("./utils"),e=T("./signature"),r=T("./zipEntry"),s=T("./support");function m(p){this.files=[],this.loadOptions=p}m.prototype={checkSignature:function(p){if(!this.reader.readAndCheckSignature(p)){this.reader.index-=4;var n=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+v.pretty(n)+", expected "+v.pretty(p)+")")}},isSignature:function(p,n){var i=this.reader.index;this.reader.setIndex(p);var y=this.reader.readString(4)===n;return this.reader.setIndex(i),y},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 p=this.reader.readData(this.zipCommentLength),n=s.uint8array?"uint8array":"array",i=v.transformTo(n,p);this.zipComment=this.loadOptions.decodeFileName(i)},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 p,n,i,y=this.zip64EndOfCentralSize-44;0<y;)p=this.reader.readInt(2),n=this.reader.readInt(4),i=this.reader.readData(n),this.zip64ExtensibleData[p]={id:p,length:n,value:i}},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 p,n;for(p=0;p<this.files.length;p++)n=this.files[p],this.reader.setIndex(n.localHeaderOffset),this.checkSignature(e.LOCAL_FILE_HEADER),n.readLocalPart(this.reader),n.handleUTF8(),n.processAttributes()},readCentralDir:function(){var p;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(e.CENTRAL_FILE_HEADER);)(p=new r({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(p);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 p=this.reader.lastIndexOfSignature(e.CENTRAL_DIRECTORY_END);if(p<0)throw this.isSignature(0,e.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(p);var n=p;if(this.checkSignature(e.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===v.MAX_VALUE_16BITS||this.diskWithCentralDirStart===v.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===v.MAX_VALUE_16BITS||this.centralDirRecords===v.MAX_VALUE_16BITS||this.centralDirSize===v.MAX_VALUE_32BITS||this.centralDirOffset===v.MAX_VALUE_32BITS){if(this.zip64=!0,(p=this.reader.lastIndexOfSignature(e.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(p),this.checkSignature(e.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,e.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(e.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(e.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var y=n-i;if(0<y)this.isSignature(n,e.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(p){this.reader=x(p)},load:function(p){this.prepareReader(p),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},M.exports=m},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(T,M,E){var x=T("./reader/readerFor"),v=T("./utils"),e=T("./compressedObject"),r=T("./crc32"),s=T("./utf8"),m=T("./compressions"),p=T("./support");function n(i,y){this.options=i,this.loadOptions=y}n.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(i){var y,h;if(i.skip(22),this.fileNameLength=i.readInt(2),h=i.readInt(2),this.fileName=i.readData(this.fileNameLength),i.skip(h),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((y=function(d){for(var f in m)if(Object.prototype.hasOwnProperty.call(m,f)&&m[f].magic===d)return m[f];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+v.pretty(this.compressionMethod)+" unknown (inner file : "+v.transformTo("string",this.fileName)+")");this.decompressed=new e(this.compressedSize,this.uncompressedSize,this.crc32,y,i.readData(this.compressedSize))},readCentralPart:function(i){this.versionMadeBy=i.readInt(2),i.skip(2),this.bitFlag=i.readInt(2),this.compressionMethod=i.readString(2),this.date=i.readDate(),this.crc32=i.readInt(4),this.compressedSize=i.readInt(4),this.uncompressedSize=i.readInt(4);var y=i.readInt(2);if(this.extraFieldsLength=i.readInt(2),this.fileCommentLength=i.readInt(2),this.diskNumberStart=i.readInt(2),this.internalFileAttributes=i.readInt(2),this.externalFileAttributes=i.readInt(4),this.localHeaderOffset=i.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");i.skip(y),this.readExtraFields(i),this.parseZIP64ExtraField(i),this.fileComment=i.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var i=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),i==0&&(this.dosPermissions=63&this.externalFileAttributes),i==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var i=x(this.extraFields[1].value);this.uncompressedSize===v.MAX_VALUE_32BITS&&(this.uncompressedSize=i.readInt(8)),this.compressedSize===v.MAX_VALUE_32BITS&&(this.compressedSize=i.readInt(8)),this.localHeaderOffset===v.MAX_VALUE_32BITS&&(this.localHeaderOffset=i.readInt(8)),this.diskNumberStart===v.MAX_VALUE_32BITS&&(this.diskNumberStart=i.readInt(4))}},readExtraFields:function(i){var y,h,d,f=i.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});i.index+4<f;)y=i.readInt(2),h=i.readInt(2),d=i.readData(h),this.extraFields[y]={id:y,length:h,value:d};i.setIndex(f)},handleUTF8:function(){var i=p.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var h=v.transformTo(i,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var d=this.findExtraFieldUnicodeComment();if(d!==null)this.fileCommentStr=d;else{var f=v.transformTo(i,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var i=this.extraFields[28789];if(i){var y=x(i.value);return y.readInt(1)!==1||r(this.fileName)!==y.readInt(4)?null:s.utf8decode(y.readData(i.length-5))}return null},findExtraFieldUnicodeComment:function(){var i=this.extraFields[25461];if(i){var y=x(i.value);return y.readInt(1)!==1||r(this.fileComment)!==y.readInt(4)?null:s.utf8decode(y.readData(i.length-5))}return null}},M.exports=n},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(T,M,E){function x(y,h,d){this.name=y,this.dir=d.dir,this.date=d.date,this.comment=d.comment,this.unixPermissions=d.unixPermissions,this.dosPermissions=d.dosPermissions,this._data=h,this._dataBinary=d.binary,this.options={compression:d.compression,compressionOptions:d.compressionOptions}}var v=T("./stream/StreamHelper"),e=T("./stream/DataWorker"),r=T("./utf8"),s=T("./compressedObject"),m=T("./stream/GenericWorker");x.prototype={internalStream:function(y){var h=null,d="string";try{if(!y)throw new Error("No output type specified.");var f=(d=y.toLowerCase())==="string"||d==="text";d!=="binarystring"&&d!=="text"||(d="string"),h=this._decompressWorker();var g=!this._dataBinary;g&&!f&&(h=h.pipe(new r.Utf8EncodeWorker)),!g&&f&&(h=h.pipe(new r.Utf8DecodeWorker))}catch(S){(h=new m("error")).error(S)}return new v(h,d,"")},async:function(y,h){return this.internalStream(y).accumulate(h)},nodeStream:function(y,h){return this.internalStream(y||"nodebuffer").toNodejsStream(h)},_compressWorker:function(y,h){if(this._data instanceof s&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var d=this._decompressWorker();return this._dataBinary||(d=d.pipe(new r.Utf8EncodeWorker)),s.createWorkerFrom(d,y,h)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof m?this._data:new e(this._data)}};for(var p=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],n=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},i=0;i<p.length;i++)x.prototype[p[i]]=n;M.exports=x},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(T,M,E){(function(x){var v,e,r=x.MutationObserver||x.WebKitMutationObserver;if(r){var s=0,m=new r(y),p=x.document.createTextNode("");m.observe(p,{characterData:!0}),v=function(){p.data=s=++s%2}}else if(x.setImmediate||x.MessageChannel===void 0)v="document"in x&&"onreadystatechange"in x.document.createElement("script")?function(){var h=x.document.createElement("script");h.onreadystatechange=function(){y(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},x.document.documentElement.appendChild(h)}:function(){setTimeout(y,0)};else{var n=new x.MessageChannel;n.port1.onmessage=y,v=function(){n.port2.postMessage(0)}}var i=[];function y(){var h,d;e=!0;for(var f=i.length;f;){for(d=i,i=[],h=-1;++h<f;)d[h]();f=i.length}e=!1}M.exports=function(h){i.push(h)!==1||e||v()}}).call(this,typeof _e!="undefined"?_e:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],37:[function(T,M,E){var x=T("immediate");function v(){}var e={},r=["REJECTED"],s=["FULFILLED"],m=["PENDING"];function p(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,f!==v&&h(this,f)}function n(f,g,S){this.promise=f,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof S=="function"&&(this.onRejected=S,this.callRejected=this.otherCallRejected)}function i(f,g,S){x(function(){var C;try{C=g(S)}catch(a){return e.reject(f,a)}C===f?e.reject(f,new TypeError("Cannot resolve promise with itself")):e.resolve(f,C)})}function y(f){var g=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof g=="function")return function(){g.apply(f,arguments)}}function h(f,g){var S=!1;function C(t){S||(S=!0,e.reject(f,t))}function a(t){S||(S=!0,e.resolve(f,t))}var l=d(function(){g(a,C)});l.status==="error"&&C(l.value)}function d(f,g){var S={};try{S.value=f(g),S.status="success"}catch(C){S.status="error",S.value=C}return S}(M.exports=p).prototype.finally=function(f){if(typeof f!="function")return this;var g=this.constructor;return this.then(function(S){return g.resolve(f()).then(function(){return S})},function(S){return g.resolve(f()).then(function(){throw S})})},p.prototype.catch=function(f){return this.then(null,f)},p.prototype.then=function(f,g){if(typeof f!="function"&&this.state===s||typeof g!="function"&&this.state===r)return this;var S=new this.constructor(v);return this.state!==m?i(S,this.state===s?f:g,this.outcome):this.queue.push(new n(S,f,g)),S},n.prototype.callFulfilled=function(f){e.resolve(this.promise,f)},n.prototype.otherCallFulfilled=function(f){i(this.promise,this.onFulfilled,f)},n.prototype.callRejected=function(f){e.reject(this.promise,f)},n.prototype.otherCallRejected=function(f){i(this.promise,this.onRejected,f)},e.resolve=function(f,g){var S=d(y,g);if(S.status==="error")return e.reject(f,S.value);var C=S.value;if(C)h(f,C);else{f.state=s,f.outcome=g;for(var a=-1,l=f.queue.length;++a<l;)f.queue[a].callFulfilled(g)}return f},e.reject=function(f,g){f.state=r,f.outcome=g;for(var S=-1,C=f.queue.length;++S<C;)f.queue[S].callRejected(g);return f},p.resolve=function(f){return f instanceof this?f:e.resolve(new this(v),f)},p.reject=function(f){var g=new this(v);return e.reject(g,f)},p.all=function(f){var g=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=f.length,C=!1;if(!S)return this.resolve([]);for(var a=new Array(S),l=0,t=-1,o=new this(v);++t<S;)b(f[t],t);return o;function b(k,D){g.resolve(k).then(function(_){a[D]=_,++l!==S||C||(C=!0,e.resolve(o,a))},function(_){C||(C=!0,e.reject(o,_))})}},p.race=function(f){var g=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=f.length,C=!1;if(!S)return this.resolve([]);for(var a=-1,l=new this(v);++a<S;)t=f[a],g.resolve(t).then(function(o){C||(C=!0,e.resolve(l,o))},function(o){C||(C=!0,e.reject(l,o))});var t;return l}},{immediate:36}],38:[function(T,M,E){var x={};(0,T("./lib/utils/common").assign)(x,T("./lib/deflate"),T("./lib/inflate"),T("./lib/zlib/constants")),M.exports=x},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(T,M,E){var x=T("./zlib/deflate"),v=T("./utils/common"),e=T("./utils/strings"),r=T("./zlib/messages"),s=T("./zlib/zstream"),m=Object.prototype.toString,p=0,n=-1,i=0,y=8;function h(f){if(!(this instanceof h))return new h(f);this.options=v.assign({level:n,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:i,to:""},f||{});var g=this.options;g.raw&&0<g.windowBits?g.windowBits=-g.windowBits:g.gzip&&0<g.windowBits&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var S=x.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(S!==p)throw new Error(r[S]);if(g.header&&x.deflateSetHeader(this.strm,g.header),g.dictionary){var C;if(C=typeof g.dictionary=="string"?e.string2buf(g.dictionary):m.call(g.dictionary)==="[object ArrayBuffer]"?new Uint8Array(g.dictionary):g.dictionary,(S=x.deflateSetDictionary(this.strm,C))!==p)throw new Error(r[S]);this._dict_set=!0}}function d(f,g){var S=new h(g);if(S.push(f,!0),S.err)throw S.msg||r[S.err];return S.result}h.prototype.push=function(f,g){var S,C,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;C=g===~~g?g:g===!0?4:0,typeof f=="string"?a.input=e.string2buf(f):m.call(f)==="[object ArrayBuffer]"?a.input=new Uint8Array(f):a.input=f,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new v.Buf8(l),a.next_out=0,a.avail_out=l),(S=x.deflate(a,C))!==1&&S!==p)return this.onEnd(S),!(this.ended=!0);a.avail_out!==0&&(a.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(e.buf2binstring(v.shrinkBuf(a.output,a.next_out))):this.onData(v.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||a.avail_out===0)&&S!==1);return C===4?(S=x.deflateEnd(this.strm),this.onEnd(S),this.ended=!0,S===p):C!==2||(this.onEnd(p),!(a.avail_out=0))},h.prototype.onData=function(f){this.chunks.push(f)},h.prototype.onEnd=function(f){f===p&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=v.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},E.Deflate=h,E.deflate=d,E.deflateRaw=function(f,g){return(g=g||{}).raw=!0,d(f,g)},E.gzip=function(f,g){return(g=g||{}).gzip=!0,d(f,g)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(T,M,E){var x=T("./zlib/inflate"),v=T("./utils/common"),e=T("./utils/strings"),r=T("./zlib/constants"),s=T("./zlib/messages"),m=T("./zlib/zstream"),p=T("./zlib/gzheader"),n=Object.prototype.toString;function i(h){if(!(this instanceof i))return new i(h);this.options=v.assign({chunkSize:16384,windowBits:0,to:""},h||{});var d=this.options;d.raw&&0<=d.windowBits&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),!(0<=d.windowBits&&d.windowBits<16)||h&&h.windowBits||(d.windowBits+=32),15<d.windowBits&&d.windowBits<48&&(15&d.windowBits)==0&&(d.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var f=x.inflateInit2(this.strm,d.windowBits);if(f!==r.Z_OK)throw new Error(s[f]);this.header=new p,x.inflateGetHeader(this.strm,this.header)}function y(h,d){var f=new i(d);if(f.push(h,!0),f.err)throw f.msg||s[f.err];return f.result}i.prototype.push=function(h,d){var f,g,S,C,a,l,t=this.strm,o=this.options.chunkSize,b=this.options.dictionary,k=!1;if(this.ended)return!1;g=d===~~d?d:d===!0?r.Z_FINISH:r.Z_NO_FLUSH,typeof h=="string"?t.input=e.binstring2buf(h):n.call(h)==="[object ArrayBuffer]"?t.input=new Uint8Array(h):t.input=h,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new v.Buf8(o),t.next_out=0,t.avail_out=o),(f=x.inflate(t,r.Z_NO_FLUSH))===r.Z_NEED_DICT&&b&&(l=typeof b=="string"?e.string2buf(b):n.call(b)==="[object ArrayBuffer]"?new Uint8Array(b):b,f=x.inflateSetDictionary(this.strm,l)),f===r.Z_BUF_ERROR&&k===!0&&(f=r.Z_OK,k=!1),f!==r.Z_STREAM_END&&f!==r.Z_OK)return this.onEnd(f),!(this.ended=!0);t.next_out&&(t.avail_out!==0&&f!==r.Z_STREAM_END&&(t.avail_in!==0||g!==r.Z_FINISH&&g!==r.Z_SYNC_FLUSH)||(this.options.to==="string"?(S=e.utf8border(t.output,t.next_out),C=t.next_out-S,a=e.buf2string(t.output,S),t.next_out=C,t.avail_out=o-C,C&&v.arraySet(t.output,t.output,S,C,0),this.onData(a)):this.onData(v.shrinkBuf(t.output,t.next_out)))),t.avail_in===0&&t.avail_out===0&&(k=!0)}while((0<t.avail_in||t.avail_out===0)&&f!==r.Z_STREAM_END);return f===r.Z_STREAM_END&&(g=r.Z_FINISH),g===r.Z_FINISH?(f=x.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===r.Z_OK):g!==r.Z_SYNC_FLUSH||(this.onEnd(r.Z_OK),!(t.avail_out=0))},i.prototype.onData=function(h){this.chunks.push(h)},i.prototype.onEnd=function(h){h===r.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=v.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},E.Inflate=i,E.inflate=y,E.inflateRaw=function(h,d){return(d=d||{}).raw=!0,y(h,d)},E.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(T,M,E){var x=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";E.assign=function(r){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var m=s.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var p in m)m.hasOwnProperty(p)&&(r[p]=m[p])}}return r},E.shrinkBuf=function(r,s){return r.length===s?r:r.subarray?r.subarray(0,s):(r.length=s,r)};var v={arraySet:function(r,s,m,p,n){if(s.subarray&&r.subarray)r.set(s.subarray(m,m+p),n);else for(var i=0;i<p;i++)r[n+i]=s[m+i]},flattenChunks:function(r){var s,m,p,n,i,y;for(s=p=0,m=r.length;s<m;s++)p+=r[s].length;for(y=new Uint8Array(p),s=n=0,m=r.length;s<m;s++)i=r[s],y.set(i,n),n+=i.length;return y}},e={arraySet:function(r,s,m,p,n){for(var i=0;i<p;i++)r[n+i]=s[m+i]},flattenChunks:function(r){return[].concat.apply([],r)}};E.setTyped=function(r){r?(E.Buf8=Uint8Array,E.Buf16=Uint16Array,E.Buf32=Int32Array,E.assign(E,v)):(E.Buf8=Array,E.Buf16=Array,E.Buf32=Array,E.assign(E,e))},E.setTyped(x)},{}],42:[function(T,M,E){var x=T("./common"),v=!0,e=!0;try{String.fromCharCode.apply(null,[0])}catch(p){v=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(p){e=!1}for(var r=new x.Buf8(256),s=0;s<256;s++)r[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function m(p,n){if(n<65537&&(p.subarray&&e||!p.subarray&&v))return String.fromCharCode.apply(null,x.shrinkBuf(p,n));for(var i="",y=0;y<n;y++)i+=String.fromCharCode(p[y]);return i}r[254]=r[254]=1,E.string2buf=function(p){var n,i,y,h,d,f=p.length,g=0;for(h=0;h<f;h++)(64512&(i=p.charCodeAt(h)))==55296&&h+1<f&&(64512&(y=p.charCodeAt(h+1)))==56320&&(i=65536+(i-55296<<10)+(y-56320),h++),g+=i<128?1:i<2048?2:i<65536?3:4;for(n=new x.Buf8(g),h=d=0;d<g;h++)(64512&(i=p.charCodeAt(h)))==55296&&h+1<f&&(64512&(y=p.charCodeAt(h+1)))==56320&&(i=65536+(i-55296<<10)+(y-56320),h++),i<128?n[d++]=i:(i<2048?n[d++]=192|i>>>6:(i<65536?n[d++]=224|i>>>12:(n[d++]=240|i>>>18,n[d++]=128|i>>>12&63),n[d++]=128|i>>>6&63),n[d++]=128|63&i);return n},E.buf2binstring=function(p){return m(p,p.length)},E.binstring2buf=function(p){for(var n=new x.Buf8(p.length),i=0,y=n.length;i<y;i++)n[i]=p.charCodeAt(i);return n},E.buf2string=function(p,n){var i,y,h,d,f=n||p.length,g=new Array(2*f);for(i=y=0;i<f;)if((h=p[i++])<128)g[y++]=h;else if(4<(d=r[h]))g[y++]=65533,i+=d-1;else{for(h&=d===2?31:d===3?15:7;1<d&&i<f;)h=h<<6|63&p[i++],d--;1<d?g[y++]=65533:h<65536?g[y++]=h:(h-=65536,g[y++]=55296|h>>10&1023,g[y++]=56320|1023&h)}return m(g,y)},E.utf8border=function(p,n){var i;for((n=n||p.length)>p.length&&(n=p.length),i=n-1;0<=i&&(192&p[i])==128;)i--;return i<0||i===0?n:i+r[p[i]]>n?i:n}},{"./common":41}],43:[function(T,M,E){M.exports=function(x,v,e,r){for(var s=65535&x|0,m=x>>>16&65535|0,p=0;e!==0;){for(e-=p=2e3<e?2e3:e;m=m+(s=s+v[r++]|0)|0,--p;);s%=65521,m%=65521}return s|m<<16|0}},{}],44:[function(T,M,E){M.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,M,E){var x=function(){for(var v,e=[],r=0;r<256;r++){v=r;for(var s=0;s<8;s++)v=1&v?3988292384^v>>>1:v>>>1;e[r]=v}return e}();M.exports=function(v,e,r,s){var m=x,p=s+r;v^=-1;for(var n=s;n<p;n++)v=v>>>8^m[255&(v^e[n])];return-1^v}},{}],46:[function(T,M,E){var x,v=T("../utils/common"),e=T("./trees"),r=T("./adler32"),s=T("./crc32"),m=T("./messages"),p=0,n=4,i=0,y=-2,h=-1,d=4,f=2,g=8,S=9,C=286,a=30,l=19,t=2*C+1,o=15,b=3,k=258,D=k+b+1,_=42,P=113,u=1,R=2,G=3,L=4;function q(c,F){return c.msg=m[F],F}function W(c){return(c<<1)-(4<c?9:0)}function Y(c){for(var F=c.length;0<=--F;)c[F]=0}function z(c){var F=c.state,I=F.pending;I>c.avail_out&&(I=c.avail_out),I!==0&&(v.arraySet(c.output,F.pending_buf,F.pending_out,I,c.next_out),c.next_out+=I,F.pending_out+=I,c.total_out+=I,c.avail_out-=I,F.pending-=I,F.pending===0&&(F.pending_out=0))}function O(c,F){e._tr_flush_block(c,0<=c.block_start?c.block_start:-1,c.strstart-c.block_start,F),c.block_start=c.strstart,z(c.strm)}function J(c,F){c.pending_buf[c.pending++]=F}function V(c,F){c.pending_buf[c.pending++]=F>>>8&255,c.pending_buf[c.pending++]=255&F}function Z(c,F){var I,A,w=c.max_chain_length,N=c.strstart,j=c.prev_length,U=c.nice_match,B=c.strstart>c.w_size-D?c.strstart-(c.w_size-D):0,H=c.window,X=c.w_mask,$=c.prev,K=c.strstart+k,re=H[N+j-1],ee=H[N+j];c.prev_length>=c.good_match&&(w>>=2),U>c.lookahead&&(U=c.lookahead);do if(H[(I=F)+j]===ee&&H[I+j-1]===re&&H[I]===H[N]&&H[++I]===H[N+1]){N+=2,I++;do;while(H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&H[++N]===H[++I]&&N<K);if(A=k-(K-N),N=K-k,j<A){if(c.match_start=F,U<=(j=A))break;re=H[N+j-1],ee=H[N+j]}}while((F=$[F&X])>B&&--w!=0);return j<=c.lookahead?j:c.lookahead}function ne(c){var F,I,A,w,N,j,U,B,H,X,$=c.w_size;do{if(w=c.window_size-c.lookahead-c.strstart,c.strstart>=$+($-D)){for(v.arraySet(c.window,c.window,$,$,0),c.match_start-=$,c.strstart-=$,c.block_start-=$,F=I=c.hash_size;A=c.head[--F],c.head[F]=$<=A?A-$:0,--I;);for(F=I=$;A=c.prev[--F],c.prev[F]=$<=A?A-$:0,--I;);w+=$}if(c.strm.avail_in===0)break;if(j=c.strm,U=c.window,B=c.strstart+c.lookahead,H=w,X=void 0,X=j.avail_in,H<X&&(X=H),I=X===0?0:(j.avail_in-=X,v.arraySet(U,j.input,j.next_in,X,B),j.state.wrap===1?j.adler=r(j.adler,U,X,B):j.state.wrap===2&&(j.adler=s(j.adler,U,X,B)),j.next_in+=X,j.total_in+=X,X),c.lookahead+=I,c.lookahead+c.insert>=b)for(N=c.strstart-c.insert,c.ins_h=c.window[N],c.ins_h=(c.ins_h<<c.hash_shift^c.window[N+1])&c.hash_mask;c.insert&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[N+b-1])&c.hash_mask,c.prev[N&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=N,N++,c.insert--,!(c.lookahead+c.insert<b)););}while(c.lookahead<D&&c.strm.avail_in!==0)}function oe(c,F){for(var I,A;;){if(c.lookahead<D){if(ne(c),c.lookahead<D&&F===p)return u;if(c.lookahead===0)break}if(I=0,c.lookahead>=b&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+b-1])&c.hash_mask,I=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),I!==0&&c.strstart-I<=c.w_size-D&&(c.match_length=Z(c,I)),c.match_length>=b)if(A=e._tr_tally(c,c.strstart-c.match_start,c.match_length-b),c.lookahead-=c.match_length,c.match_length<=c.max_lazy_match&&c.lookahead>=b){for(c.match_length--;c.strstart++,c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+b-1])&c.hash_mask,I=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart,--c.match_length!=0;);c.strstart++}else c.strstart+=c.match_length,c.match_length=0,c.ins_h=c.window[c.strstart],c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+1])&c.hash_mask;else A=e._tr_tally(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++;if(A&&(O(c,!1),c.strm.avail_out===0))return u}return c.insert=c.strstart<b-1?c.strstart:b-1,F===n?(O(c,!0),c.strm.avail_out===0?G:L):c.last_lit&&(O(c,!1),c.strm.avail_out===0)?u:R}function Q(c,F){for(var I,A,w;;){if(c.lookahead<D){if(ne(c),c.lookahead<D&&F===p)return u;if(c.lookahead===0)break}if(I=0,c.lookahead>=b&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+b-1])&c.hash_mask,I=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),c.prev_length=c.match_length,c.prev_match=c.match_start,c.match_length=b-1,I!==0&&c.prev_length<c.max_lazy_match&&c.strstart-I<=c.w_size-D&&(c.match_length=Z(c,I),c.match_length<=5&&(c.strategy===1||c.match_length===b&&4096<c.strstart-c.match_start)&&(c.match_length=b-1)),c.prev_length>=b&&c.match_length<=c.prev_length){for(w=c.strstart+c.lookahead-b,A=e._tr_tally(c,c.strstart-1-c.prev_match,c.prev_length-b),c.lookahead-=c.prev_length-1,c.prev_length-=2;++c.strstart<=w&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+b-1])&c.hash_mask,I=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),--c.prev_length!=0;);if(c.match_available=0,c.match_length=b-1,c.strstart++,A&&(O(c,!1),c.strm.avail_out===0))return u}else if(c.match_available){if((A=e._tr_tally(c,0,c.window[c.strstart-1]))&&O(c,!1),c.strstart++,c.lookahead--,c.strm.avail_out===0)return u}else c.match_available=1,c.strstart++,c.lookahead--}return c.match_available&&(A=e._tr_tally(c,0,c.window[c.strstart-1]),c.match_available=0),c.insert=c.strstart<b-1?c.strstart:b-1,F===n?(O(c,!0),c.strm.avail_out===0?G:L):c.last_lit&&(O(c,!1),c.strm.avail_out===0)?u:R}function te(c,F,I,A,w){this.good_length=c,this.max_lazy=F,this.nice_length=I,this.max_chain=A,this.func=w}function ie(){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=g,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 v.Buf16(2*t),this.dyn_dtree=new v.Buf16(2*(2*a+1)),this.bl_tree=new v.Buf16(2*(2*l+1)),Y(this.dyn_ltree),Y(this.dyn_dtree),Y(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new v.Buf16(o+1),this.heap=new v.Buf16(2*C+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new v.Buf16(2*C+1),Y(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 ae(c){var F;return c&&c.state?(c.total_in=c.total_out=0,c.data_type=f,(F=c.state).pending=0,F.pending_out=0,F.wrap<0&&(F.wrap=-F.wrap),F.status=F.wrap?_:P,c.adler=F.wrap===2?0:1,F.last_flush=p,e._tr_init(F),i):q(c,y)}function ue(c){var F=ae(c);return F===i&&function(I){I.window_size=2*I.w_size,Y(I.head),I.max_lazy_match=x[I.level].max_lazy,I.good_match=x[I.level].good_length,I.nice_match=x[I.level].nice_length,I.max_chain_length=x[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=b-1,I.match_available=0,I.ins_h=0}(c.state),F}function ce(c,F,I,A,w,N){if(!c)return y;var j=1;if(F===h&&(F=6),A<0?(j=0,A=-A):15<A&&(j=2,A-=16),w<1||S<w||I!==g||A<8||15<A||F<0||9<F||N<0||d<N)return q(c,y);A===8&&(A=9);var U=new ie;return(c.state=U).strm=c,U.wrap=j,U.gzhead=null,U.w_bits=A,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=w+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+b-1)/b),U.window=new v.Buf8(2*U.w_size),U.head=new v.Buf16(U.hash_size),U.prev=new v.Buf16(U.w_size),U.lit_bufsize=1<<w+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new v.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=F,U.strategy=N,U.method=I,ue(c)}x=[new te(0,0,0,0,function(c,F){var I=65535;for(I>c.pending_buf_size-5&&(I=c.pending_buf_size-5);;){if(c.lookahead<=1){if(ne(c),c.lookahead===0&&F===p)return u;if(c.lookahead===0)break}c.strstart+=c.lookahead,c.lookahead=0;var A=c.block_start+I;if((c.strstart===0||c.strstart>=A)&&(c.lookahead=c.strstart-A,c.strstart=A,O(c,!1),c.strm.avail_out===0)||c.strstart-c.block_start>=c.w_size-D&&(O(c,!1),c.strm.avail_out===0))return u}return c.insert=0,F===n?(O(c,!0),c.strm.avail_out===0?G:L):(c.strstart>c.block_start&&(O(c,!1),c.strm.avail_out),u)}),new te(4,4,8,4,oe),new te(4,5,16,8,oe),new te(4,6,32,32,oe),new te(4,4,16,16,Q),new te(8,16,32,32,Q),new te(8,16,128,128,Q),new te(8,32,128,256,Q),new te(32,128,258,1024,Q),new te(32,258,258,4096,Q)],E.deflateInit=function(c,F){return ce(c,F,g,15,8,0)},E.deflateInit2=ce,E.deflateReset=ue,E.deflateResetKeep=ae,E.deflateSetHeader=function(c,F){return c&&c.state?c.state.wrap!==2?y:(c.state.gzhead=F,i):y},E.deflate=function(c,F){var I,A,w,N;if(!c||!c.state||5<F||F<0)return c?q(c,y):y;if(A=c.state,!c.output||!c.input&&c.avail_in!==0||A.status===666&&F!==n)return q(c,c.avail_out===0?-5:y);if(A.strm=c,I=A.last_flush,A.last_flush=F,A.status===_)if(A.wrap===2)c.adler=0,J(A,31),J(A,139),J(A,8),A.gzhead?(J(A,(A.gzhead.text?1:0)+(A.gzhead.hcrc?2:0)+(A.gzhead.extra?4:0)+(A.gzhead.name?8:0)+(A.gzhead.comment?16:0)),J(A,255&A.gzhead.time),J(A,A.gzhead.time>>8&255),J(A,A.gzhead.time>>16&255),J(A,A.gzhead.time>>24&255),J(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),J(A,255&A.gzhead.os),A.gzhead.extra&&A.gzhead.extra.length&&(J(A,255&A.gzhead.extra.length),J(A,A.gzhead.extra.length>>8&255)),A.gzhead.hcrc&&(c.adler=s(c.adler,A.pending_buf,A.pending,0)),A.gzindex=0,A.status=69):(J(A,0),J(A,0),J(A,0),J(A,0),J(A,0),J(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),J(A,3),A.status=P);else{var j=g+(A.w_bits-8<<4)<<8;j|=(2<=A.strategy||A.level<2?0:A.level<6?1:A.level===6?2:3)<<6,A.strstart!==0&&(j|=32),j+=31-j%31,A.status=P,V(A,j),A.strstart!==0&&(V(A,c.adler>>>16),V(A,65535&c.adler)),c.adler=1}if(A.status===69)if(A.gzhead.extra){for(w=A.pending;A.gzindex<(65535&A.gzhead.extra.length)&&(A.pending!==A.pending_buf_size||(A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),z(c),w=A.pending,A.pending!==A.pending_buf_size));)J(A,255&A.gzhead.extra[A.gzindex]),A.gzindex++;A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),A.gzindex===A.gzhead.extra.length&&(A.gzindex=0,A.status=73)}else A.status=73;if(A.status===73)if(A.gzhead.name){w=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),z(c),w=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.name.length?255&A.gzhead.name.charCodeAt(A.gzindex++):0,J(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),N===0&&(A.gzindex=0,A.status=91)}else A.status=91;if(A.status===91)if(A.gzhead.comment){w=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),z(c),w=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.comment.length?255&A.gzhead.comment.charCodeAt(A.gzindex++):0,J(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>w&&(c.adler=s(c.adler,A.pending_buf,A.pending-w,w)),N===0&&(A.status=103)}else A.status=103;if(A.status===103&&(A.gzhead.hcrc?(A.pending+2>A.pending_buf_size&&z(c),A.pending+2<=A.pending_buf_size&&(J(A,255&c.adler),J(A,c.adler>>8&255),c.adler=0,A.status=P)):A.status=P),A.pending!==0){if(z(c),c.avail_out===0)return A.last_flush=-1,i}else if(c.avail_in===0&&W(F)<=W(I)&&F!==n)return q(c,-5);if(A.status===666&&c.avail_in!==0)return q(c,-5);if(c.avail_in!==0||A.lookahead!==0||F!==p&&A.status!==666){var U=A.strategy===2?function(B,H){for(var X;;){if(B.lookahead===0&&(ne(B),B.lookahead===0)){if(H===p)return u;break}if(B.match_length=0,X=e._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++,X&&(O(B,!1),B.strm.avail_out===0))return u}return B.insert=0,H===n?(O(B,!0),B.strm.avail_out===0?G:L):B.last_lit&&(O(B,!1),B.strm.avail_out===0)?u:R}(A,F):A.strategy===3?function(B,H){for(var X,$,K,re,ee=B.window;;){if(B.lookahead<=k){if(ne(B),B.lookahead<=k&&H===p)return u;if(B.lookahead===0)break}if(B.match_length=0,B.lookahead>=b&&0<B.strstart&&($=ee[K=B.strstart-1])===ee[++K]&&$===ee[++K]&&$===ee[++K]){re=B.strstart+k;do;while($===ee[++K]&&$===ee[++K]&&$===ee[++K]&&$===ee[++K]&&$===ee[++K]&&$===ee[++K]&&$===ee[++K]&&$===ee[++K]&&K<re);B.match_length=k-(re-K),B.match_length>B.lookahead&&(B.match_length=B.lookahead)}if(B.match_length>=b?(X=e._tr_tally(B,1,B.match_length-b),B.lookahead-=B.match_length,B.strstart+=B.match_length,B.match_length=0):(X=e._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++),X&&(O(B,!1),B.strm.avail_out===0))return u}return B.insert=0,H===n?(O(B,!0),B.strm.avail_out===0?G:L):B.last_lit&&(O(B,!1),B.strm.avail_out===0)?u:R}(A,F):x[A.level].func(A,F);if(U!==G&&U!==L||(A.status=666),U===u||U===G)return c.avail_out===0&&(A.last_flush=-1),i;if(U===R&&(F===1?e._tr_align(A):F!==5&&(e._tr_stored_block(A,0,0,!1),F===3&&(Y(A.head),A.lookahead===0&&(A.strstart=0,A.block_start=0,A.insert=0))),z(c),c.avail_out===0))return A.last_flush=-1,i}return F!==n?i:A.wrap<=0?1:(A.wrap===2?(J(A,255&c.adler),J(A,c.adler>>8&255),J(A,c.adler>>16&255),J(A,c.adler>>24&255),J(A,255&c.total_in),J(A,c.total_in>>8&255),J(A,c.total_in>>16&255),J(A,c.total_in>>24&255)):(V(A,c.adler>>>16),V(A,65535&c.adler)),z(c),0<A.wrap&&(A.wrap=-A.wrap),A.pending!==0?i:1)},E.deflateEnd=function(c){var F;return c&&c.state?(F=c.state.status)!==_&&F!==69&&F!==73&&F!==91&&F!==103&&F!==P&&F!==666?q(c,y):(c.state=null,F===P?q(c,-3):i):y},E.deflateSetDictionary=function(c,F){var I,A,w,N,j,U,B,H,X=F.length;if(!c||!c.state||(N=(I=c.state).wrap)===2||N===1&&I.status!==_||I.lookahead)return y;for(N===1&&(c.adler=r(c.adler,F,X,0)),I.wrap=0,X>=I.w_size&&(N===0&&(Y(I.head),I.strstart=0,I.block_start=0,I.insert=0),H=new v.Buf8(I.w_size),v.arraySet(H,F,X-I.w_size,I.w_size,0),F=H,X=I.w_size),j=c.avail_in,U=c.next_in,B=c.input,c.avail_in=X,c.next_in=0,c.input=F,ne(I);I.lookahead>=b;){for(A=I.strstart,w=I.lookahead-(b-1);I.ins_h=(I.ins_h<<I.hash_shift^I.window[A+b-1])&I.hash_mask,I.prev[A&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=A,A++,--w;);I.strstart=A,I.lookahead=b-1,ne(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=b-1,I.match_available=0,c.next_in=U,c.input=B,c.avail_in=j,I.wrap=N,i},E.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(T,M,E){M.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,M,E){M.exports=function(x,v){var e,r,s,m,p,n,i,y,h,d,f,g,S,C,a,l,t,o,b,k,D,_,P,u,R;e=x.state,r=x.next_in,u=x.input,s=r+(x.avail_in-5),m=x.next_out,R=x.output,p=m-(v-x.avail_out),n=m+(x.avail_out-257),i=e.dmax,y=e.wsize,h=e.whave,d=e.wnext,f=e.window,g=e.hold,S=e.bits,C=e.lencode,a=e.distcode,l=(1<<e.lenbits)-1,t=(1<<e.distbits)-1;e:do{S<15&&(g+=u[r++]<<S,S+=8,g+=u[r++]<<S,S+=8),o=C[g&l];t:for(;;){if(g>>>=b=o>>>24,S-=b,(b=o>>>16&255)===0)R[m++]=65535&o;else{if(!(16&b)){if((64&b)==0){o=C[(65535&o)+(g&(1<<b)-1)];continue t}if(32&b){e.mode=12;break e}x.msg="invalid literal/length code",e.mode=30;break e}k=65535&o,(b&=15)&&(S<b&&(g+=u[r++]<<S,S+=8),k+=g&(1<<b)-1,g>>>=b,S-=b),S<15&&(g+=u[r++]<<S,S+=8,g+=u[r++]<<S,S+=8),o=a[g&t];r:for(;;){if(g>>>=b=o>>>24,S-=b,!(16&(b=o>>>16&255))){if((64&b)==0){o=a[(65535&o)+(g&(1<<b)-1)];continue r}x.msg="invalid distance code",e.mode=30;break e}if(D=65535&o,S<(b&=15)&&(g+=u[r++]<<S,(S+=8)<b&&(g+=u[r++]<<S,S+=8)),i<(D+=g&(1<<b)-1)){x.msg="invalid distance too far back",e.mode=30;break e}if(g>>>=b,S-=b,(b=m-p)<D){if(h<(b=D-b)&&e.sane){x.msg="invalid distance too far back",e.mode=30;break e}if(P=f,(_=0)===d){if(_+=y-b,b<k){for(k-=b;R[m++]=f[_++],--b;);_=m-D,P=R}}else if(d<b){if(_+=y+d-b,(b-=d)<k){for(k-=b;R[m++]=f[_++],--b;);if(_=0,d<k){for(k-=b=d;R[m++]=f[_++],--b;);_=m-D,P=R}}}else if(_+=d-b,b<k){for(k-=b;R[m++]=f[_++],--b;);_=m-D,P=R}for(;2<k;)R[m++]=P[_++],R[m++]=P[_++],R[m++]=P[_++],k-=3;k&&(R[m++]=P[_++],1<k&&(R[m++]=P[_++]))}else{for(_=m-D;R[m++]=R[_++],R[m++]=R[_++],R[m++]=R[_++],2<(k-=3););k&&(R[m++]=R[_++],1<k&&(R[m++]=R[_++]))}break}}break}}while(r<s&&m<n);r-=k=S>>3,g&=(1<<(S-=k<<3))-1,x.next_in=r,x.next_out=m,x.avail_in=r<s?s-r+5:5-(r-s),x.avail_out=m<n?n-m+257:257-(m-n),e.hold=g,e.bits=S}},{}],49:[function(T,M,E){var x=T("../utils/common"),v=T("./adler32"),e=T("./crc32"),r=T("./inffast"),s=T("./inftrees"),m=1,p=2,n=0,i=-2,y=1,h=852,d=592;function f(_){return(_>>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function g(){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 x.Buf16(320),this.work=new x.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(_){var P;return _&&_.state?(P=_.state,_.total_in=_.total_out=P.total=0,_.msg="",P.wrap&&(_.adler=1&P.wrap),P.mode=y,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new x.Buf32(h),P.distcode=P.distdyn=new x.Buf32(d),P.sane=1,P.back=-1,n):i}function C(_){var P;return _&&_.state?((P=_.state).wsize=0,P.whave=0,P.wnext=0,S(_)):i}function a(_,P){var u,R;return _&&_.state?(R=_.state,P<0?(u=0,P=-P):(u=1+(P>>4),P<48&&(P&=15)),P&&(P<8||15<P)?i:(R.window!==null&&R.wbits!==P&&(R.window=null),R.wrap=u,R.wbits=P,C(_))):i}function l(_,P){var u,R;return _?(R=new g,(_.state=R).window=null,(u=a(_,P))!==n&&(_.state=null),u):i}var t,o,b=!0;function k(_){if(b){var P;for(t=new x.Buf32(512),o=new x.Buf32(32),P=0;P<144;)_.lens[P++]=8;for(;P<256;)_.lens[P++]=9;for(;P<280;)_.lens[P++]=7;for(;P<288;)_.lens[P++]=8;for(s(m,_.lens,0,288,t,0,_.work,{bits:9}),P=0;P<32;)_.lens[P++]=5;s(p,_.lens,0,32,o,0,_.work,{bits:5}),b=!1}_.lencode=t,_.lenbits=9,_.distcode=o,_.distbits=5}function D(_,P,u,R){var G,L=_.state;return L.window===null&&(L.wsize=1<<L.wbits,L.wnext=0,L.whave=0,L.window=new x.Buf8(L.wsize)),R>=L.wsize?(x.arraySet(L.window,P,u-L.wsize,L.wsize,0),L.wnext=0,L.whave=L.wsize):(R<(G=L.wsize-L.wnext)&&(G=R),x.arraySet(L.window,P,u-R,G,L.wnext),(R-=G)?(x.arraySet(L.window,P,u-R,R,0),L.wnext=R,L.whave=L.wsize):(L.wnext+=G,L.wnext===L.wsize&&(L.wnext=0),L.whave<L.wsize&&(L.whave+=G))),0}E.inflateReset=C,E.inflateReset2=a,E.inflateResetKeep=S,E.inflateInit=function(_){return l(_,15)},E.inflateInit2=l,E.inflate=function(_,P){var u,R,G,L,q,W,Y,z,O,J,V,Z,ne,oe,Q,te,ie,ae,ue,ce,c,F,I,A,w=0,N=new x.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!_||!_.state||!_.output||!_.input&&_.avail_in!==0)return i;(u=_.state).mode===12&&(u.mode=13),q=_.next_out,G=_.output,Y=_.avail_out,L=_.next_in,R=_.input,W=_.avail_in,z=u.hold,O=u.bits,J=W,V=Y,F=n;e:for(;;)switch(u.mode){case y:if(u.wrap===0){u.mode=13;break}for(;O<16;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(2&u.wrap&&z===35615){N[u.check=0]=255&z,N[1]=z>>>8&255,u.check=e(u.check,N,2,0),O=z=0,u.mode=2;break}if(u.flags=0,u.head&&(u.head.done=!1),!(1&u.wrap)||(((255&z)<<8)+(z>>8))%31){_.msg="incorrect header check",u.mode=30;break}if((15&z)!=8){_.msg="unknown compression method",u.mode=30;break}if(O-=4,c=8+(15&(z>>>=4)),u.wbits===0)u.wbits=c;else if(c>u.wbits){_.msg="invalid window size",u.mode=30;break}u.dmax=1<<c,_.adler=u.check=1,u.mode=512&z?10:12,O=z=0;break;case 2:for(;O<16;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(u.flags=z,(255&u.flags)!=8){_.msg="unknown compression method",u.mode=30;break}if(57344&u.flags){_.msg="unknown header flags set",u.mode=30;break}u.head&&(u.head.text=z>>8&1),512&u.flags&&(N[0]=255&z,N[1]=z>>>8&255,u.check=e(u.check,N,2,0)),O=z=0,u.mode=3;case 3:for(;O<32;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.head&&(u.head.time=z),512&u.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,u.check=e(u.check,N,4,0)),O=z=0,u.mode=4;case 4:for(;O<16;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.head&&(u.head.xflags=255&z,u.head.os=z>>8),512&u.flags&&(N[0]=255&z,N[1]=z>>>8&255,u.check=e(u.check,N,2,0)),O=z=0,u.mode=5;case 5:if(1024&u.flags){for(;O<16;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.length=z,u.head&&(u.head.extra_len=z),512&u.flags&&(N[0]=255&z,N[1]=z>>>8&255,u.check=e(u.check,N,2,0)),O=z=0}else u.head&&(u.head.extra=null);u.mode=6;case 6:if(1024&u.flags&&(W<(Z=u.length)&&(Z=W),Z&&(u.head&&(c=u.head.extra_len-u.length,u.head.extra||(u.head.extra=new Array(u.head.extra_len)),x.arraySet(u.head.extra,R,L,Z,c)),512&u.flags&&(u.check=e(u.check,R,Z,L)),W-=Z,L+=Z,u.length-=Z),u.length))break e;u.length=0,u.mode=7;case 7:if(2048&u.flags){if(W===0)break e;for(Z=0;c=R[L+Z++],u.head&&c&&u.length<65536&&(u.head.name+=String.fromCharCode(c)),c&&Z<W;);if(512&u.flags&&(u.check=e(u.check,R,Z,L)),W-=Z,L+=Z,c)break e}else u.head&&(u.head.name=null);u.length=0,u.mode=8;case 8:if(4096&u.flags){if(W===0)break e;for(Z=0;c=R[L+Z++],u.head&&c&&u.length<65536&&(u.head.comment+=String.fromCharCode(c)),c&&Z<W;);if(512&u.flags&&(u.check=e(u.check,R,Z,L)),W-=Z,L+=Z,c)break e}else u.head&&(u.head.comment=null);u.mode=9;case 9:if(512&u.flags){for(;O<16;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(z!==(65535&u.check)){_.msg="header crc mismatch",u.mode=30;break}O=z=0}u.head&&(u.head.hcrc=u.flags>>9&1,u.head.done=!0),_.adler=u.check=0,u.mode=12;break;case 10:for(;O<32;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}_.adler=u.check=f(z),O=z=0,u.mode=11;case 11:if(u.havedict===0)return _.next_out=q,_.avail_out=Y,_.next_in=L,_.avail_in=W,u.hold=z,u.bits=O,2;_.adler=u.check=1,u.mode=12;case 12:if(P===5||P===6)break e;case 13:if(u.last){z>>>=7&O,O-=7&O,u.mode=27;break}for(;O<3;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}switch(u.last=1&z,O-=1,3&(z>>>=1)){case 0:u.mode=14;break;case 1:if(k(u),u.mode=20,P!==6)break;z>>>=2,O-=2;break e;case 2:u.mode=17;break;case 3:_.msg="invalid block type",u.mode=30}z>>>=2,O-=2;break;case 14:for(z>>>=7&O,O-=7&O;O<32;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if((65535&z)!=(z>>>16^65535)){_.msg="invalid stored block lengths",u.mode=30;break}if(u.length=65535&z,O=z=0,u.mode=15,P===6)break e;case 15:u.mode=16;case 16:if(Z=u.length){if(W<Z&&(Z=W),Y<Z&&(Z=Y),Z===0)break e;x.arraySet(G,R,L,Z,q),W-=Z,L+=Z,Y-=Z,q+=Z,u.length-=Z;break}u.mode=12;break;case 17:for(;O<14;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(u.nlen=257+(31&z),z>>>=5,O-=5,u.ndist=1+(31&z),z>>>=5,O-=5,u.ncode=4+(15&z),z>>>=4,O-=4,286<u.nlen||30<u.ndist){_.msg="too many length or distance symbols",u.mode=30;break}u.have=0,u.mode=18;case 18:for(;u.have<u.ncode;){for(;O<3;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.lens[j[u.have++]]=7&z,z>>>=3,O-=3}for(;u.have<19;)u.lens[j[u.have++]]=0;if(u.lencode=u.lendyn,u.lenbits=7,I={bits:u.lenbits},F=s(0,u.lens,0,19,u.lencode,0,u.work,I),u.lenbits=I.bits,F){_.msg="invalid code lengths set",u.mode=30;break}u.have=0,u.mode=19;case 19:for(;u.have<u.nlen+u.ndist;){for(;te=(w=u.lencode[z&(1<<u.lenbits)-1])>>>16&255,ie=65535&w,!((Q=w>>>24)<=O);){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(ie<16)z>>>=Q,O-=Q,u.lens[u.have++]=ie;else{if(ie===16){for(A=Q+2;O<A;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(z>>>=Q,O-=Q,u.have===0){_.msg="invalid bit length repeat",u.mode=30;break}c=u.lens[u.have-1],Z=3+(3&z),z>>>=2,O-=2}else if(ie===17){for(A=Q+3;O<A;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}O-=Q,c=0,Z=3+(7&(z>>>=Q)),z>>>=3,O-=3}else{for(A=Q+7;O<A;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}O-=Q,c=0,Z=11+(127&(z>>>=Q)),z>>>=7,O-=7}if(u.have+Z>u.nlen+u.ndist){_.msg="invalid bit length repeat",u.mode=30;break}for(;Z--;)u.lens[u.have++]=c}}if(u.mode===30)break;if(u.lens[256]===0){_.msg="invalid code -- missing end-of-block",u.mode=30;break}if(u.lenbits=9,I={bits:u.lenbits},F=s(m,u.lens,0,u.nlen,u.lencode,0,u.work,I),u.lenbits=I.bits,F){_.msg="invalid literal/lengths set",u.mode=30;break}if(u.distbits=6,u.distcode=u.distdyn,I={bits:u.distbits},F=s(p,u.lens,u.nlen,u.ndist,u.distcode,0,u.work,I),u.distbits=I.bits,F){_.msg="invalid distances set",u.mode=30;break}if(u.mode=20,P===6)break e;case 20:u.mode=21;case 21:if(6<=W&&258<=Y){_.next_out=q,_.avail_out=Y,_.next_in=L,_.avail_in=W,u.hold=z,u.bits=O,r(_,V),q=_.next_out,G=_.output,Y=_.avail_out,L=_.next_in,R=_.input,W=_.avail_in,z=u.hold,O=u.bits,u.mode===12&&(u.back=-1);break}for(u.back=0;te=(w=u.lencode[z&(1<<u.lenbits)-1])>>>16&255,ie=65535&w,!((Q=w>>>24)<=O);){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(te&&(240&te)==0){for(ae=Q,ue=te,ce=ie;te=(w=u.lencode[ce+((z&(1<<ae+ue)-1)>>ae)])>>>16&255,ie=65535&w,!(ae+(Q=w>>>24)<=O);){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}z>>>=ae,O-=ae,u.back+=ae}if(z>>>=Q,O-=Q,u.back+=Q,u.length=ie,te===0){u.mode=26;break}if(32&te){u.back=-1,u.mode=12;break}if(64&te){_.msg="invalid literal/length code",u.mode=30;break}u.extra=15&te,u.mode=22;case 22:if(u.extra){for(A=u.extra;O<A;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.length+=z&(1<<u.extra)-1,z>>>=u.extra,O-=u.extra,u.back+=u.extra}u.was=u.length,u.mode=23;case 23:for(;te=(w=u.distcode[z&(1<<u.distbits)-1])>>>16&255,ie=65535&w,!((Q=w>>>24)<=O);){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if((240&te)==0){for(ae=Q,ue=te,ce=ie;te=(w=u.distcode[ce+((z&(1<<ae+ue)-1)>>ae)])>>>16&255,ie=65535&w,!(ae+(Q=w>>>24)<=O);){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}z>>>=ae,O-=ae,u.back+=ae}if(z>>>=Q,O-=Q,u.back+=Q,64&te){_.msg="invalid distance code",u.mode=30;break}u.offset=ie,u.extra=15&te,u.mode=24;case 24:if(u.extra){for(A=u.extra;O<A;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}u.offset+=z&(1<<u.extra)-1,z>>>=u.extra,O-=u.extra,u.back+=u.extra}if(u.offset>u.dmax){_.msg="invalid distance too far back",u.mode=30;break}u.mode=25;case 25:if(Y===0)break e;if(Z=V-Y,u.offset>Z){if((Z=u.offset-Z)>u.whave&&u.sane){_.msg="invalid distance too far back",u.mode=30;break}ne=Z>u.wnext?(Z-=u.wnext,u.wsize-Z):u.wnext-Z,Z>u.length&&(Z=u.length),oe=u.window}else oe=G,ne=q-u.offset,Z=u.length;for(Y<Z&&(Z=Y),Y-=Z,u.length-=Z;G[q++]=oe[ne++],--Z;);u.length===0&&(u.mode=21);break;case 26:if(Y===0)break e;G[q++]=u.length,Y--,u.mode=21;break;case 27:if(u.wrap){for(;O<32;){if(W===0)break e;W--,z|=R[L++]<<O,O+=8}if(V-=Y,_.total_out+=V,u.total+=V,V&&(_.adler=u.check=u.flags?e(u.check,G,V,q-V):v(u.check,G,V,q-V)),V=Y,(u.flags?z:f(z))!==u.check){_.msg="incorrect data check",u.mode=30;break}O=z=0}u.mode=28;case 28:if(u.wrap&&u.flags){for(;O<32;){if(W===0)break e;W--,z+=R[L++]<<O,O+=8}if(z!==(4294967295&u.total)){_.msg="incorrect length check",u.mode=30;break}O=z=0}u.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return-4;case 32:default:return i}return _.next_out=q,_.avail_out=Y,_.next_in=L,_.avail_in=W,u.hold=z,u.bits=O,(u.wsize||V!==_.avail_out&&u.mode<30&&(u.mode<27||P!==4))&&D(_,_.output,_.next_out,V-_.avail_out)?(u.mode=31,-4):(J-=_.avail_in,V-=_.avail_out,_.total_in+=J,_.total_out+=V,u.total+=V,u.wrap&&V&&(_.adler=u.check=u.flags?e(u.check,G,V,_.next_out-V):v(u.check,G,V,_.next_out-V)),_.data_type=u.bits+(u.last?64:0)+(u.mode===12?128:0)+(u.mode===20||u.mode===15?256:0),(J==0&&V===0||P===4)&&F===n&&(F=-5),F)},E.inflateEnd=function(_){if(!_||!_.state)return i;var P=_.state;return P.window&&(P.window=null),_.state=null,n},E.inflateGetHeader=function(_,P){var u;return _&&_.state?(2&(u=_.state).wrap)==0?i:((u.head=P).done=!1,n):i},E.inflateSetDictionary=function(_,P){var u,R=P.length;return _&&_.state?(u=_.state).wrap!==0&&u.mode!==11?i:u.mode===11&&v(1,P,R,0)!==u.check?-3:D(_,P,R,R)?(u.mode=31,-4):(u.havedict=1,n):i},E.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(T,M,E){var x=T("../utils/common"),v=[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],e=[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],r=[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],s=[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];M.exports=function(m,p,n,i,y,h,d,f){var g,S,C,a,l,t,o,b,k,D=f.bits,_=0,P=0,u=0,R=0,G=0,L=0,q=0,W=0,Y=0,z=0,O=null,J=0,V=new x.Buf16(16),Z=new x.Buf16(16),ne=null,oe=0;for(_=0;_<=15;_++)V[_]=0;for(P=0;P<i;P++)V[p[n+P]]++;for(G=D,R=15;1<=R&&V[R]===0;R--);if(R<G&&(G=R),R===0)return y[h++]=20971520,y[h++]=20971520,f.bits=1,0;for(u=1;u<R&&V[u]===0;u++);for(G<u&&(G=u),_=W=1;_<=15;_++)if(W<<=1,(W-=V[_])<0)return-1;if(0<W&&(m===0||R!==1))return-1;for(Z[1]=0,_=1;_<15;_++)Z[_+1]=Z[_]+V[_];for(P=0;P<i;P++)p[n+P]!==0&&(d[Z[p[n+P]]++]=P);if(t=m===0?(O=ne=d,19):m===1?(O=v,J-=257,ne=e,oe-=257,256):(O=r,ne=s,-1),_=u,l=h,q=P=z=0,C=-1,a=(Y=1<<(L=G))-1,m===1&&852<Y||m===2&&592<Y)return 1;for(;;){for(o=_-q,k=d[P]<t?(b=0,d[P]):d[P]>t?(b=ne[oe+d[P]],O[J+d[P]]):(b=96,0),g=1<<_-q,u=S=1<<L;y[l+(z>>q)+(S-=g)]=o<<24|b<<16|k|0,S!==0;);for(g=1<<_-1;z&g;)g>>=1;if(g!==0?(z&=g-1,z+=g):z=0,P++,--V[_]==0){if(_===R)break;_=p[n+d[P]]}if(G<_&&(z&a)!==C){for(q===0&&(q=G),l+=u,W=1<<(L=_-q);L+q<R&&!((W-=V[L+q])<=0);)L++,W<<=1;if(Y+=1<<L,m===1&&852<Y||m===2&&592<Y)return 1;y[C=z&a]=G<<24|L<<16|l-h|0}}return z!==0&&(y[l+z]=_-q<<24|64<<16|0),f.bits=G,0}},{"../utils/common":41}],51:[function(T,M,E){M.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,M,E){var x=T("../utils/common"),v=0,e=1;function r(w){for(var N=w.length;0<=--N;)w[N]=0}var s=0,m=29,p=256,n=p+1+m,i=30,y=19,h=2*n+1,d=15,f=16,g=7,S=256,C=16,a=17,l=18,t=[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],o=[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],b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=new Array(2*(n+2));r(D);var _=new Array(2*i);r(_);var P=new Array(512);r(P);var u=new Array(256);r(u);var R=new Array(m);r(R);var G,L,q,W=new Array(i);function Y(w,N,j,U,B){this.static_tree=w,this.extra_bits=N,this.extra_base=j,this.elems=U,this.max_length=B,this.has_stree=w&&w.length}function z(w,N){this.dyn_tree=w,this.max_code=0,this.stat_desc=N}function O(w){return w<256?P[w]:P[256+(w>>>7)]}function J(w,N){w.pending_buf[w.pending++]=255&N,w.pending_buf[w.pending++]=N>>>8&255}function V(w,N,j){w.bi_valid>f-j?(w.bi_buf|=N<<w.bi_valid&65535,J(w,w.bi_buf),w.bi_buf=N>>f-w.bi_valid,w.bi_valid+=j-f):(w.bi_buf|=N<<w.bi_valid&65535,w.bi_valid+=j)}function Z(w,N,j){V(w,j[2*N],j[2*N+1])}function ne(w,N){for(var j=0;j|=1&w,w>>>=1,j<<=1,0<--N;);return j>>>1}function oe(w,N,j){var U,B,H=new Array(d+1),X=0;for(U=1;U<=d;U++)H[U]=X=X+j[U-1]<<1;for(B=0;B<=N;B++){var $=w[2*B+1];$!==0&&(w[2*B]=ne(H[$]++,$))}}function Q(w){var N;for(N=0;N<n;N++)w.dyn_ltree[2*N]=0;for(N=0;N<i;N++)w.dyn_dtree[2*N]=0;for(N=0;N<y;N++)w.bl_tree[2*N]=0;w.dyn_ltree[2*S]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function te(w){8<w.bi_valid?J(w,w.bi_buf):0<w.bi_valid&&(w.pending_buf[w.pending++]=w.bi_buf),w.bi_buf=0,w.bi_valid=0}function ie(w,N,j,U){var B=2*N,H=2*j;return w[B]<w[H]||w[B]===w[H]&&U[N]<=U[j]}function ae(w,N,j){for(var U=w.heap[j],B=j<<1;B<=w.heap_len&&(B<w.heap_len&&ie(N,w.heap[B+1],w.heap[B],w.depth)&&B++,!ie(N,U,w.heap[B],w.depth));)w.heap[j]=w.heap[B],j=B,B<<=1;w.heap[j]=U}function ue(w,N,j){var U,B,H,X,$=0;if(w.last_lit!==0)for(;U=w.pending_buf[w.d_buf+2*$]<<8|w.pending_buf[w.d_buf+2*$+1],B=w.pending_buf[w.l_buf+$],$++,U===0?Z(w,B,N):(Z(w,(H=u[B])+p+1,N),(X=t[H])!==0&&V(w,B-=R[H],X),Z(w,H=O(--U),j),(X=o[H])!==0&&V(w,U-=W[H],X)),$<w.last_lit;);Z(w,S,N)}function ce(w,N){var j,U,B,H=N.dyn_tree,X=N.stat_desc.static_tree,$=N.stat_desc.has_stree,K=N.stat_desc.elems,re=-1;for(w.heap_len=0,w.heap_max=h,j=0;j<K;j++)H[2*j]!==0?(w.heap[++w.heap_len]=re=j,w.depth[j]=0):H[2*j+1]=0;for(;w.heap_len<2;)H[2*(B=w.heap[++w.heap_len]=re<2?++re:0)]=1,w.depth[B]=0,w.opt_len--,$&&(w.static_len-=X[2*B+1]);for(N.max_code=re,j=w.heap_len>>1;1<=j;j--)ae(w,H,j);for(B=K;j=w.heap[1],w.heap[1]=w.heap[w.heap_len--],ae(w,H,1),U=w.heap[1],w.heap[--w.heap_max]=j,w.heap[--w.heap_max]=U,H[2*B]=H[2*j]+H[2*U],w.depth[B]=(w.depth[j]>=w.depth[U]?w.depth[j]:w.depth[U])+1,H[2*j+1]=H[2*U+1]=B,w.heap[1]=B++,ae(w,H,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],function(ee,le){var me,he,ge,se,ye,we,de=le.dyn_tree,Se=le.max_code,De=le.stat_desc.static_tree,Ne=le.stat_desc.has_stree,Be=le.stat_desc.extra_bits,Ae=le.stat_desc.extra_base,be=le.stat_desc.max_length,ve=0;for(se=0;se<=d;se++)ee.bl_count[se]=0;for(de[2*ee.heap[ee.heap_max]+1]=0,me=ee.heap_max+1;me<h;me++)be<(se=de[2*de[2*(he=ee.heap[me])+1]+1]+1)&&(se=be,ve++),de[2*he+1]=se,Se<he||(ee.bl_count[se]++,ye=0,Ae<=he&&(ye=Be[he-Ae]),we=de[2*he],ee.opt_len+=we*(se+ye),Ne&&(ee.static_len+=we*(De[2*he+1]+ye)));if(ve!==0){do{for(se=be-1;ee.bl_count[se]===0;)se--;ee.bl_count[se]--,ee.bl_count[se+1]+=2,ee.bl_count[be]--,ve-=2}while(0<ve);for(se=be;se!==0;se--)for(he=ee.bl_count[se];he!==0;)Se<(ge=ee.heap[--me])||(de[2*ge+1]!==se&&(ee.opt_len+=(se-de[2*ge+1])*de[2*ge],de[2*ge+1]=se),he--)}}(w,N),oe(H,re,w.bl_count)}function c(w,N,j){var U,B,H=-1,X=N[1],$=0,K=7,re=4;for(X===0&&(K=138,re=3),N[2*(j+1)+1]=65535,U=0;U<=j;U++)B=X,X=N[2*(U+1)+1],++$<K&&B===X||($<re?w.bl_tree[2*B]+=$:B!==0?(B!==H&&w.bl_tree[2*B]++,w.bl_tree[2*C]++):$<=10?w.bl_tree[2*a]++:w.bl_tree[2*l]++,H=B,re=($=0)===X?(K=138,3):B===X?(K=6,3):(K=7,4))}function F(w,N,j){var U,B,H=-1,X=N[1],$=0,K=7,re=4;for(X===0&&(K=138,re=3),U=0;U<=j;U++)if(B=X,X=N[2*(U+1)+1],!(++$<K&&B===X)){if($<re)for(;Z(w,B,w.bl_tree),--$!=0;);else B!==0?(B!==H&&(Z(w,B,w.bl_tree),$--),Z(w,C,w.bl_tree),V(w,$-3,2)):$<=10?(Z(w,a,w.bl_tree),V(w,$-3,3)):(Z(w,l,w.bl_tree),V(w,$-11,7));H=B,re=($=0)===X?(K=138,3):B===X?(K=6,3):(K=7,4)}}r(W);var I=!1;function A(w,N,j,U){V(w,(s<<1)+(U?1:0),3),function(B,H,X,$){te(B),$&&(J(B,X),J(B,~X)),x.arraySet(B.pending_buf,B.window,H,X,B.pending),B.pending+=X}(w,N,j,!0)}E._tr_init=function(w){I||(function(){var N,j,U,B,H,X=new Array(d+1);for(B=U=0;B<m-1;B++)for(R[B]=U,N=0;N<1<<t[B];N++)u[U++]=B;for(u[U-1]=B,B=H=0;B<16;B++)for(W[B]=H,N=0;N<1<<o[B];N++)P[H++]=B;for(H>>=7;B<i;B++)for(W[B]=H<<7,N=0;N<1<<o[B]-7;N++)P[256+H++]=B;for(j=0;j<=d;j++)X[j]=0;for(N=0;N<=143;)D[2*N+1]=8,N++,X[8]++;for(;N<=255;)D[2*N+1]=9,N++,X[9]++;for(;N<=279;)D[2*N+1]=7,N++,X[7]++;for(;N<=287;)D[2*N+1]=8,N++,X[8]++;for(oe(D,n+1,X),N=0;N<i;N++)_[2*N+1]=5,_[2*N]=ne(N,5);G=new Y(D,t,p+1,n,d),L=new Y(_,o,0,i,d),q=new Y(new Array(0),b,0,y,g)}(),I=!0),w.l_desc=new z(w.dyn_ltree,G),w.d_desc=new z(w.dyn_dtree,L),w.bl_desc=new z(w.bl_tree,q),w.bi_buf=0,w.bi_valid=0,Q(w)},E._tr_stored_block=A,E._tr_flush_block=function(w,N,j,U){var B,H,X=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=function($){var K,re=4093624447;for(K=0;K<=31;K++,re>>>=1)if(1&re&&$.dyn_ltree[2*K]!==0)return v;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return e;for(K=32;K<p;K++)if($.dyn_ltree[2*K]!==0)return e;return v}(w)),ce(w,w.l_desc),ce(w,w.d_desc),X=function($){var K;for(c($,$.dyn_ltree,$.l_desc.max_code),c($,$.dyn_dtree,$.d_desc.max_code),ce($,$.bl_desc),K=y-1;3<=K&&$.bl_tree[2*k[K]+1]===0;K--);return $.opt_len+=3*(K+1)+5+5+4,K}(w),B=w.opt_len+3+7>>>3,(H=w.static_len+3+7>>>3)<=B&&(B=H)):B=H=j+5,j+4<=B&&N!==-1?A(w,N,j,U):w.strategy===4||H===B?(V(w,2+(U?1:0),3),ue(w,D,_)):(V(w,4+(U?1:0),3),function($,K,re,ee){var le;for(V($,K-257,5),V($,re-1,5),V($,ee-4,4),le=0;le<ee;le++)V($,$.bl_tree[2*k[le]+1],3);F($,$.dyn_ltree,K-1),F($,$.dyn_dtree,re-1)}(w,w.l_desc.max_code+1,w.d_desc.max_code+1,X+1),ue(w,w.dyn_ltree,w.dyn_dtree)),Q(w),U&&te(w)},E._tr_tally=function(w,N,j){return w.pending_buf[w.d_buf+2*w.last_lit]=N>>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&N,w.pending_buf[w.l_buf+w.last_lit]=255&j,w.last_lit++,N===0?w.dyn_ltree[2*j]++:(w.matches++,N--,w.dyn_ltree[2*(u[j]+p+1)]++,w.dyn_dtree[2*O(N)]++),w.last_lit===w.lit_bufsize-1},E._tr_align=function(w){V(w,2,3),Z(w,S,D),function(N){N.bi_valid===16?(J(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(w)}},{"../utils/common":41}],53:[function(T,M,E){M.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,M,E){(function(x){(function(v,e){if(!v.setImmediate){var r,s,m,p,n=1,i={},y=!1,h=v.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(v);d=d&&d.setTimeout?d:v,r={}.toString.call(v.process)==="[object process]"?function(C){process.nextTick(function(){g(C)})}:function(){if(v.postMessage&&!v.importScripts){var C=!0,a=v.onmessage;return v.onmessage=function(){C=!1},v.postMessage("","*"),v.onmessage=a,C}}()?(p="setImmediate$"+Math.random()+"$",v.addEventListener?v.addEventListener("message",S,!1):v.attachEvent("onmessage",S),function(C){v.postMessage(p+C,"*")}):v.MessageChannel?((m=new MessageChannel).port1.onmessage=function(C){g(C.data)},function(C){m.port2.postMessage(C)}):h&&"onreadystatechange"in h.createElement("script")?(s=h.documentElement,function(C){var a=h.createElement("script");a.onreadystatechange=function(){g(C),a.onreadystatechange=null,s.removeChild(a),a=null},s.appendChild(a)}):function(C){setTimeout(g,0,C)},d.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var a=new Array(arguments.length-1),l=0;l<a.length;l++)a[l]=arguments[l+1];var t={callback:C,args:a};return i[n]=t,r(n),n++},d.clearImmediate=f}function f(C){delete i[C]}function g(C){if(y)setTimeout(g,0,C);else{var a=i[C];if(a){y=!0;try{(function(l){var t=l.callback,o=l.args;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;default:t.apply(e,o)}})(a)}finally{f(C),y=!1}}}}function S(C){C.source===v&&typeof C.data=="string"&&C.data.indexOf(p)===0&&g(+C.data.slice(p.length))}})(typeof self=="undefined"?x===void 0?this:x:self)}).call(this,typeof _e!="undefined"?_e:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}]},{},[10])(10)})}(xe)),xe.exports}(function(fe,pe){(function(T,M){fe.exports=M(Le())})(globalThis,T=>(()=>{var M={438:(v,e,r)=>{r.r(e),r.d(e,{default:()=>g});var s=r(537),m=r.n(s),p=r(645),n=r.n(p),i=r(806),y=r.n(i),h=new URL(r(583),r.b),d=n()(m()),f=y()(h);d.push([v.id,'@namespace "http://www.w3.org/1998/Math/MathML";math{display:inline-block;line-height:initial}mfrac{display:inline-block;vertical-align:-50%;text-align:center}mfrac>:first-child{border-bottom:solid thin currentColor}mfrac>*{display:block}msub>:nth-child(2){font-size:smaller;vertical-align:sub}msup>:nth-child(2){font-size:smaller;vertical-align:super}munder,mover,munderover{display:inline-flex;flex-flow:column nowrap;vertical-align:middle;text-align:center}munder>:not(:first-child),mover>:not(:first-child),munderover>:not(:first-child){font-size:smaller}munderover>:last-child{order:-1}mroot,msqrt{position:relative;display:inline-block;border-top:solid thin currentColor;margin-top:.5px;vertical-align:middle;margin-left:1ch}mroot:before,msqrt:before{content:"";display:inline-block;position:absolute;width:1ch;left:-1ch;top:-1px;bottom:0;background-image:url('+f+")}","",{version:3,sources:["webpack://./src/mathml.scss"],names:[],mappings:"AAAA,+CAAA,CAEA,KACI,oBAAA,CACA,mBAAA,CAGJ,MACI,oBAAA,CACA,mBAAA,CACA,iBAAA,CAEA,mBACI,qCAAA,CAGJ,QACI,aAAA,CAKJ,mBACI,iBAAA,CACA,kBAAA,CAKJ,mBACI,iBAAA,CACA,oBAAA,CAIR,wBACI,mBAAA,CACA,uBAAA,CACA,qBAAA,CACA,iBAAA,CAEA,iFACI,iBAAA,CAKJ,uBAAA,QAAA,CAGJ,YACI,iBAAA,CACA,oBAAA,CACA,kCAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA,CAEA,0BACI,UAAA,CACA,oBAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CACA,QAAA,CACA,QAAA,CACA,wDAAA",sourcesContent:[`@namespace "http://www.w3.org/1998/Math/MathML";\r
  10. \r
  11. math {\r
  12. display: inline-block;\r
  13. line-height: initial;\r
  14. }\r
  15. \r
  16. mfrac {\r
  17. display: inline-block;\r
  18. vertical-align: -50%;\r
  19. text-align: center;\r
  20. \r
  21. &>:first-child {\r
  22. border-bottom: solid thin currentColor;\r
  23. }\r
  24. \r
  25. &>* {\r
  26. display: block;\r
  27. }\r
  28. }\r
  29. \r
  30. msub {\r
  31. &>:nth-child(2) {\r
  32. font-size: smaller;\r
  33. vertical-align: sub;\r
  34. }\r
  35. }\r
  36. \r
  37. msup {\r
  38. &>:nth-child(2) {\r
  39. font-size: smaller;\r
  40. vertical-align: super;\r
  41. }\r
  42. }\r
  43. \r
  44. munder, mover, munderover {\r
  45. display: inline-flex;\r
  46. flex-flow: column nowrap;\r
  47. vertical-align: middle;\r
  48. text-align: center;\r
  49. \r
  50. &>:not(:first-child) {\r
  51. font-size: smaller;\r
  52. }\r
  53. }\r
  54. \r
  55. munderover {\r
  56. &>:last-child { order: -1; }\r
  57. }\r
  58. \r
  59. mroot, msqrt {\r
  60. position: relative;\r
  61. display: inline-block;\r
  62. border-top: solid thin currentColor; \r
  63. margin-top: 0.5px;\r
  64. vertical-align: middle; \r
  65. margin-left: 1ch; \r
  66. \r
  67. &:before {\r
  68. content: "";\r
  69. display: inline-block;\r
  70. position: absolute;\r
  71. width: 1ch;\r
  72. left: -1ch;\r
  73. top: -1px;\r
  74. bottom: 0;\r
  75. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 100' preserveAspectRatio='none'%3E%3Cpath d='m0,75 l5,0 l5,25 l10,-100' stroke='black' fill='none' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");\r
  76. }\r
  77. }`],sourceRoot:""}]);const g=d.toString()},645:v=>{v.exports=function(e){var r=[];return r.toString=function(){return this.map(function(s){var m="",p=s[5]!==void 0;return s[4]&&(m+="@supports (".concat(s[4],") {")),s[2]&&(m+="@media ".concat(s[2]," {")),p&&(m+="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {")),m+=e(s),p&&(m+="}"),s[2]&&(m+="}"),s[4]&&(m+="}"),m}).join("")},r.i=function(s,m,p,n,i){typeof s=="string"&&(s=[[null,s,void 0]]);var y={};if(p)for(var h=0;h<this.length;h++){var d=this[h][0];d!=null&&(y[d]=!0)}for(var f=0;f<s.length;f++){var g=[].concat(s[f]);p&&y[g[0]]||(i!==void 0&&(g[5]===void 0||(g[1]="@layer".concat(g[5].length>0?" ".concat(g[5]):""," {").concat(g[1],"}")),g[5]=i),m&&(g[2]&&(g[1]="@media ".concat(g[2]," {").concat(g[1],"}")),g[2]=m),n&&(g[4]?(g[1]="@supports (".concat(g[4],") {").concat(g[1],"}"),g[4]=n):g[4]="".concat(n)),r.push(g))}},r}},806:v=>{v.exports=function(e,r){return r||(r={}),e&&(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),r.hash&&(e+=r.hash),/["'() \t\n]|(%20)/.test(e)||r.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},537:v=>{v.exports=function(e){var r=e[1],s=e[3];if(!s)return r;if(typeof btoa=="function"){var m=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(m),n="/*# ".concat(p," */"),i=s.sources.map(function(y){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(y," */")});return[r].concat(i).concat([n]).join(`
  78. `)}return[r].join(`
  79. `)}},522:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OpenXmlPackage=void 0;const s=r(626),m=r(472),p=r(593),n=r(461);class i{constructor(h,d){this._zip=h,this.options=d,this.xmlParser=new m.XmlParser}get(h){return this._zip.files[function(d){return d.startsWith("/")?d.substr(1):d}(h)]}update(h,d){this._zip.file(h,d)}static load(h,d){return s.loadAsync(h).then(f=>new i(f,d))}save(h="blob"){return this._zip.generateAsync({type:h})}load(h,d="string"){var f,g;return(g=(f=this.get(h))===null||f===void 0?void 0:f.async(d))!==null&&g!==void 0?g:Promise.resolve(null)}loadRelationships(h=null){let d="_rels/.rels";if(h!=null){const[f,g]=(0,p.splitPath)(h);d=`${f}_rels/${g}.rels`}return this.load(d).then(f=>f?(0,n.parseRelationships)(this.parseXmlDocument(f).firstElementChild,this.xmlParser):null)}parseXmlDocument(h){return(0,m.parseXmlString)(h,this.options.trimXmlDeclaration)}}e.OpenXmlPackage=i},530:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Part=void 0;const s=r(472);e.Part=class{constructor(m,p){this._package=m,this.path=p}load(){return Promise.all([this._package.loadRelationships(this.path).then(m=>{this.rels=m}),this._package.load(this.path).then(m=>{const p=this._package.parseXmlDocument(m);this._package.options.keepOrigin&&(this._xmlDocument=p),this.parseXml(p.firstElementChild)})])}save(){this._package.update(this.path,(0,s.serializeXmlString)(this._xmlDocument))}parseXml(m){}}},461:(v,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.parseRelationships=e.RelationshipTypes=void 0,(r=e.RelationshipTypes||(e.RelationshipTypes={})).OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",r.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",r.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",r.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",r.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",r.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",r.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",r.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",r.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",r.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",r.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",r.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",r.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",r.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",r.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",r.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",r.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",e.parseRelationships=function(s,m){return m.elements(s).map(p=>({id:m.attr(p,"Id"),type:m.attr(p,"Type"),target:m.attr(p,"Target"),targetMode:m.attr(p,"TargetMode")}))}},168:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentParser=e.autos=void 0;const s=r(120),m=r(109),p=r(59),n=r(472),i=r(488),y=r(172),h=r(149),d=r(320);e.autos={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const f=[],g={oMath:s.DomType.MmlMath,oMathPara:s.DomType.MmlMathParagraph,f:s.DomType.MmlFraction,num:s.DomType.MmlNumerator,den:s.DomType.MmlDenominator,rad:s.DomType.MmlRadical,deg:s.DomType.MmlDegree,e:s.DomType.MmlBase,sSup:s.DomType.MmlSuperscript,sSub:s.DomType.MmlSubscript,sup:s.DomType.MmlSuperArgument,sub:s.DomType.MmlSubArgument,d:s.DomType.MmlDelimiter,nary:s.DomType.MmlNary};e.DocumentParser=class{constructor(l){this.options=Object.assign({ignoreWidth:!1,debug:!1},l)}parseNotes(l,t,o){var b=[];for(let k of n.default.elements(l,t)){const D=new o;D.id=n.default.attr(k,"id"),D.noteType=n.default.attr(k,"type"),D.children=this.parseBodyElements(k),b.push(D)}return b}parseDocumentFile(l){var t=n.default.element(l,"body"),o=n.default.element(l,"background"),b=n.default.element(t,"sectPr");return{type:s.DomType.Document,children:this.parseBodyElements(t),props:b?(0,p.parseSectionProperties)(b,n.default):null,cssStyle:o?this.parseBackground(o):{}}}parseBackground(l){var t={},o=C.colorAttr(l,"color");return o&&(t["background-color"]=o),t}parseBodyElements(l){var t=[];for(let o of n.default.elements(l))switch(o.localName){case"p":t.push(this.parseParagraph(o));break;case"tbl":t.push(this.parseTable(o));break;case"sdt":t.push(...this.parseSdt(o,b=>this.parseBodyElements(b)))}return t}parseStylesFile(l){var t=[];return C.foreach(l,o=>{switch(o.localName){case"style":t.push(this.parseStyle(o));break;case"docDefaults":t.push(this.parseDefaultStyles(o))}}),t}parseDefaultStyles(l){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return C.foreach(l,o=>{switch(o.localName){case"rPrDefault":var b=n.default.element(o,"rPr");b&&t.styles.push({target:"span",values:this.parseDefaultProperties(b,{})});break;case"pPrDefault":var k=n.default.element(o,"pPr");k&&t.styles.push({target:"p",values:this.parseDefaultProperties(k,{})})}}),t}parseStyle(l){var t={id:n.default.attr(l,"styleId"),isDefault:n.default.boolAttr(l,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(n.default.attr(l,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span"}return C.foreach(l,o=>{switch(o.localName){case"basedOn":t.basedOn=n.default.attr(o,"val");break;case"name":t.name=n.default.attr(o,"val");break;case"link":t.linked=n.default.attr(o,"val");break;case"next":t.next=n.default.attr(o,"val");break;case"aliases":t.aliases=n.default.attr(o,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(o,{})}),t.paragraphProps=(0,m.parseParagraphProperties)(o,n.default);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(o,{})}),t.runProps=(0,i.parseRunProperties)(o,n.default);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(o,{})});break;case"tblStylePr":for(let b of this.parseTableStyle(o))t.styles.push(b);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: ${o.localName}`)}}),t}parseTableStyle(l){var t=[],o=n.default.attr(l,"type"),b="",k="";switch(o){case"firstRow":k=".first-row",b="tr.first-row td";break;case"lastRow":k=".last-row",b="tr.last-row td";break;case"firstCol":k=".first-col",b="td.first-col";break;case"lastCol":k=".last-col",b="td.last-col";break;case"band1Vert":k=":not(.no-vband)",b="td.odd-col";break;case"band2Vert":k=":not(.no-vband)",b="td.even-col";break;case"band1Horz":k=":not(.no-hband)",b="tr.odd-row";break;case"band2Horz":k=":not(.no-hband)",b="tr.even-row";break;default:return[]}return C.foreach(l,D=>{switch(D.localName){case"pPr":t.push({target:`${b} p`,mod:k,values:this.parseDefaultProperties(D,{})});break;case"rPr":t.push({target:`${b} span`,mod:k,values:this.parseDefaultProperties(D,{})});break;case"tblPr":case"tcPr":t.push({target:b,mod:k,values:this.parseDefaultProperties(D,{})})}}),t}parseNumberingFile(l){var t=[],o={},b=[];return C.foreach(l,k=>{switch(k.localName){case"abstractNum":this.parseAbstractNumbering(k,b).forEach(P=>t.push(P));break;case"numPicBullet":b.push(this.parseNumberingPicBullet(k));break;case"num":var D=n.default.attr(k,"numId"),_=n.default.elementAttr(k,"abstractNumId","val");o[_]=D}}),t.forEach(k=>k.id=o[k.id]),t}parseNumberingPicBullet(l){var t=n.default.element(l,"pict"),o=t&&n.default.element(t,"shape"),b=o&&n.default.element(o,"imagedata");return b?{id:n.default.intAttr(l,"numPicBulletId"),src:n.default.attr(b,"id"),style:n.default.attr(o,"style")}:null}parseAbstractNumbering(l,t){var o=[],b=n.default.attr(l,"abstractNumId");return C.foreach(l,k=>{k.localName==="lvl"&&o.push(this.parseNumberingLevel(b,k,t))}),o}parseNumberingLevel(l,t,o){var b={id:l,level:n.default.intAttr(t,"ilvl"),pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return C.foreach(t,k=>{switch(k.localName){case"pPr":this.parseDefaultProperties(k,b.pStyle);break;case"rPr":this.parseDefaultProperties(k,b.rStyle);break;case"lvlPicBulletId":var D=n.default.intAttr(k,"val");b.bullet=o.find(_=>_.id==D);break;case"lvlText":b.levelText=n.default.attr(k,"val");break;case"pStyle":b.pStyleName=n.default.attr(k,"val");break;case"numFmt":b.format=n.default.attr(k,"val");break;case"suff":b.suff=n.default.attr(k,"val")}}),b}parseSdt(l,t){const o=n.default.element(l,"sdtContent");return o?t(o):[]}parseInserted(l,t){var o,b;return{type:s.DomType.Inserted,children:(b=(o=t(l))===null||o===void 0?void 0:o.children)!==null&&b!==void 0?b:[]}}parseDeleted(l,t){var o,b;return{type:s.DomType.Deleted,children:(b=(o=t(l))===null||o===void 0?void 0:o.children)!==null&&b!==void 0?b:[]}}parseParagraph(l){var t={type:s.DomType.Paragraph,children:[]};for(let o of n.default.elements(l))switch(o.localName){case"pPr":this.parseParagraphProperties(o,t);break;case"r":t.children.push(this.parseRun(o,t));break;case"hyperlink":t.children.push(this.parseHyperlink(o,t));break;case"bookmarkStart":t.children.push((0,y.parseBookmarkStart)(o,n.default));break;case"bookmarkEnd":t.children.push((0,y.parseBookmarkEnd)(o,n.default));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(o));break;case"sdt":t.children.push(...this.parseSdt(o,b=>this.parseParagraph(b).children));break;case"ins":t.children.push(this.parseInserted(o,b=>this.parseParagraph(b)));break;case"del":t.children.push(this.parseDeleted(o,b=>this.parseParagraph(b)))}return t}parseParagraphProperties(l,t){this.parseDefaultProperties(l,t.cssStyle={},null,o=>{if((0,m.parseParagraphProperty)(o,t,n.default))return!0;switch(o.localName){case"pStyle":t.styleName=n.default.attr(o,"val");break;case"cnfStyle":t.className=a.classNameOfCnfStyle(o);break;case"framePr":this.parseFrame(o,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(l,t){n.default.attr(l,"dropCap")=="drop"&&(t.cssStyle.float="left")}parseHyperlink(l,t){var o={type:s.DomType.Hyperlink,parent:t,children:[]},b=n.default.attr(l,"anchor"),k=n.default.attr(l,"id");return b&&(o.href="#"+b),k&&(o.id=k),C.foreach(l,D=>{D.localName==="r"&&o.children.push(this.parseRun(D,o))}),o}parseRun(l,t){var o={type:s.DomType.Run,parent:t,children:[]};return C.foreach(l,b=>{switch((b=this.checkAlternateContent(b)).localName){case"t":o.children.push({type:s.DomType.Text,text:b.textContent});break;case"delText":o.children.push({type:s.DomType.DeletedText,text:b.textContent});break;case"fldSimple":o.children.push({type:s.DomType.SimpleField,instruction:n.default.attr(b,"instr"),lock:n.default.boolAttr(b,"lock",!1),dirty:n.default.boolAttr(b,"dirty",!1)});break;case"instrText":o.fieldRun=!0,o.children.push({type:s.DomType.Instruction,text:b.textContent});break;case"fldChar":o.fieldRun=!0,o.children.push({type:s.DomType.ComplexField,charType:n.default.attr(b,"fldCharType"),lock:n.default.boolAttr(b,"lock",!1),dirty:n.default.boolAttr(b,"dirty",!1)});break;case"noBreakHyphen":o.children.push({type:s.DomType.NoBreakHyphen});break;case"br":o.children.push({type:s.DomType.Break,break:n.default.attr(b,"type")||"textWrapping"});break;case"lastRenderedPageBreak":o.children.push({type:s.DomType.Break,break:"lastRenderedPageBreak"});break;case"sym":o.children.push({type:s.DomType.Symbol,font:n.default.attr(b,"font"),char:n.default.attr(b,"char")});break;case"tab":o.children.push({type:s.DomType.Tab});break;case"footnoteReference":o.children.push({type:s.DomType.FootnoteReference,id:n.default.attr(b,"id")});break;case"endnoteReference":o.children.push({type:s.DomType.EndnoteReference,id:n.default.attr(b,"id")});break;case"drawing":let k=this.parseDrawing(b);k&&(o.children=[k]);break;case"pict":o.children.push(this.parseVmlPicture(b));break;case"rPr":this.parseRunProperties(b,o)}}),o}parseMathElement(l){const t=`${l.localName}Pr`,o={type:g[l.localName],children:[]};for(const b of n.default.elements(l))g[b.localName]?o.children.push(this.parseMathElement(b)):b.localName=="r"?o.children.push(this.parseRun(b)):b.localName==t&&(o.props=this.parseMathProperies(b));return o}parseMathProperies(l){const t={};for(const o of n.default.elements(l))switch(o.localName){case"chr":t.char=n.default.attr(o,"val");break;case"degHide":t.hideDegree=n.default.boolAttr(o,"val");break;case"begChr":t.beginChar=n.default.attr(o,"val");break;case"endChr":t.endChar=n.default.attr(o,"val")}return t}parseRunProperties(l,t){this.parseDefaultProperties(l,t.cssStyle={},null,o=>{switch(o.localName){case"rStyle":t.styleName=n.default.attr(o,"val");break;case"vertAlign":t.verticalAlign=a.valueOfVertAlign(o,!0);break;default:return!1}return!0})}parseVmlPicture(l){const t={type:s.DomType.VmlPicture,children:[]};for(const o of n.default.elements(l)){const b=(0,d.parseVmlElement)(o);b&&t.children.push(b)}return t}checkAlternateContent(l){var t;if(l.localName!="AlternateContent")return l;var o=n.default.element(l,"Choice");if(o){var b=n.default.attr(o,"Requires"),k=l.lookupNamespaceURI(b);if(f.includes(k))return o.firstElementChild}return(t=n.default.element(l,"Fallback"))===null||t===void 0?void 0:t.firstElementChild}parseDrawing(l){for(var t of n.default.elements(l))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(l){var t,o={type:s.DomType.Drawing,children:[],cssStyle:{}},b=l.localName=="anchor";let k=null,D=n.default.boolAttr(l,"simplePos"),_={relative:"page",align:"left",offset:"0"},P={relative:"page",align:"top",offset:"0"};for(var u of n.default.elements(l))switch(u.localName){case"simplePos":D&&(_.offset=n.default.lengthAttr(u,"x",h.LengthUsage.Emu),P.offset=n.default.lengthAttr(u,"y",h.LengthUsage.Emu));break;case"extent":o.cssStyle.width=n.default.lengthAttr(u,"cx",h.LengthUsage.Emu),o.cssStyle.height=n.default.lengthAttr(u,"cy",h.LengthUsage.Emu);break;case"positionH":case"positionV":if(!D){let q=u.localName=="positionH"?_:P;var R=n.default.element(u,"align"),G=n.default.element(u,"posOffset");q.relative=(t=n.default.attr(u,"relativeFrom"))!==null&&t!==void 0?t:q.relative,R&&(q.align=R.textContent),G&&(q.offset=C.sizeValue(G,h.LengthUsage.Emu))}break;case"wrapTopAndBottom":k="wrapTopAndBottom";break;case"wrapNone":k="wrapNone";break;case"graphic":var L=this.parseGraphic(u);L&&o.children.push(L)}return k=="wrapTopAndBottom"?(o.cssStyle.display="block",_.align&&(o.cssStyle["text-align"]=_.align,o.cssStyle.width="100%")):k=="wrapNone"?(o.cssStyle.display="block",o.cssStyle.position="relative",o.cssStyle.width="0px",o.cssStyle.height="0px",_.offset&&(o.cssStyle.left=_.offset),P.offset&&(o.cssStyle.top=P.offset)):!b||_.align!="left"&&_.align!="right"||(o.cssStyle.float=_.align),o}parseGraphic(l){var t=n.default.element(l,"graphicData");for(let o of n.default.elements(t))if(o.localName==="pic")return this.parsePicture(o);return null}parsePicture(l){var t={type:s.DomType.Image,src:"",cssStyle:{}},o=n.default.element(l,"blipFill"),b=n.default.element(o,"blip");t.src=n.default.attr(b,"embed");var k=n.default.element(l,"spPr"),D=n.default.element(k,"xfrm");for(var _ of(t.cssStyle.position="relative",n.default.elements(D)))switch(_.localName){case"ext":t.cssStyle.width=n.default.lengthAttr(_,"cx",h.LengthUsage.Emu),t.cssStyle.height=n.default.lengthAttr(_,"cy",h.LengthUsage.Emu);break;case"off":t.cssStyle.left=n.default.lengthAttr(_,"x",h.LengthUsage.Emu),t.cssStyle.top=n.default.lengthAttr(_,"y",h.LengthUsage.Emu)}return t}parseTable(l){var t={type:s.DomType.Table,children:[]};return C.foreach(l,o=>{switch(o.localName){case"tr":t.children.push(this.parseTableRow(o));break;case"tblGrid":t.columns=this.parseTableColumns(o);break;case"tblPr":this.parseTableProperties(o,t)}}),t}parseTableColumns(l){var t=[];return C.foreach(l,o=>{o.localName==="gridCol"&&t.push({width:n.default.lengthAttr(o,"w")})}),t}parseTableProperties(l,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(l,t.cssStyle,t.cellStyle,o=>{switch(o.localName){case"tblStyle":t.styleName=n.default.attr(o,"val");break;case"tblLook":t.className=a.classNameOftblLook(o);break;case"tblpPr":this.parseTablePosition(o,t);break;case"tblStyleColBandSize":t.colBandSize=n.default.intAttr(o,"val");break;case"tblStyleRowBandSize":t.rowBandSize=n.default.intAttr(o,"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"}}parseTablePosition(l,t){var o=n.default.lengthAttr(l,"topFromText"),b=n.default.lengthAttr(l,"bottomFromText"),k=n.default.lengthAttr(l,"rightFromText"),D=n.default.lengthAttr(l,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=a.addSize(t.cssStyle["margin-bottom"],b),t.cssStyle["margin-left"]=a.addSize(t.cssStyle["margin-left"],D),t.cssStyle["margin-right"]=a.addSize(t.cssStyle["margin-right"],k),t.cssStyle["margin-top"]=a.addSize(t.cssStyle["margin-top"],o)}parseTableRow(l){var t={type:s.DomType.Row,children:[]};return C.foreach(l,o=>{switch(o.localName){case"tc":t.children.push(this.parseTableCell(o));break;case"trPr":this.parseTableRowProperties(o,t)}}),t}parseTableRowProperties(l,t){t.cssStyle=this.parseDefaultProperties(l,{},null,o=>{switch(o.localName){case"cnfStyle":t.className=a.classNameOfCnfStyle(o);break;case"tblHeader":t.isHeader=n.default.boolAttr(o,"val");break;default:return!1}return!0})}parseTableCell(l){var t={type:s.DomType.Cell,children:[]};return C.foreach(l,o=>{switch(o.localName){case"tbl":t.children.push(this.parseTable(o));break;case"p":t.children.push(this.parseParagraph(o));break;case"tcPr":this.parseTableCellProperties(o,t)}}),t}parseTableCellProperties(l,t){t.cssStyle=this.parseDefaultProperties(l,{},null,o=>{var b;switch(o.localName){case"gridSpan":t.span=n.default.intAttr(o,"val",null);break;case"vMerge":t.verticalMerge=(b=n.default.attr(o,"val"))!==null&&b!==void 0?b:"continue";break;case"cnfStyle":t.className=a.classNameOfCnfStyle(o);break;default:return!1}return!0})}parseDefaultProperties(l,t=null,o=null,b=null){return t=t||{},C.foreach(l,k=>{if(!(b!=null&&b(k)))switch(k.localName){case"jc":t["text-align"]=a.valueOfJc(k);break;case"textAlignment":t["vertical-align"]=a.valueOfTextAlignment(k);break;case"color":t.color=C.colorAttr(k,"val",null,e.autos.color);break;case"sz":t["font-size"]=t["min-height"]=n.default.lengthAttr(k,"val",h.LengthUsage.FontSize);break;case"shd":t["background-color"]=C.colorAttr(k,"fill",null,e.autos.shd);break;case"highlight":t["background-color"]=C.colorAttr(k,"val",null,e.autos.highlight);break;case"vertAlign":break;case"position":t.verticalAlign=n.default.lengthAttr(k,"val",h.LengthUsage.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=a.valueOfSize(k,"w");break;case"trHeight":this.parseTrHeight(k,t);break;case"strike":t["text-decoration"]=n.default.boolAttr(k,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=n.default.boolAttr(k,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=n.default.boolAttr(k,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=n.default.boolAttr(k,"val",!0)?"uppercase":"none";break;case"smallCaps":t["text-transform"]=n.default.boolAttr(k,"val",!0)?"lowercase":"none";break;case"u":this.parseUnderline(k,t);break;case"ind":case"tblInd":this.parseIndentation(k,t);break;case"rFonts":this.parseFont(k,t);break;case"tblBorders":this.parseBorderProperties(k,o||t);break;case"tblCellSpacing":t["border-spacing"]=a.valueOfMargin(k),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(k,t);break;case"bdr":t.border=a.valueOfBorder(k);break;case"tcBorders":this.parseBorderProperties(k,t);break;case"vanish":n.default.boolAttr(k,"val",!0)&&(t.display="none");break;case"kern":case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(k,o||t);break;case"tblLayout":t["table-layout"]=a.valueOfTblLayout(k);break;case"vAlign":t["vertical-align"]=a.valueOfTextAlignment(k);break;case"spacing":l.localName=="pPr"&&this.parseSpacing(k,t);break;case"wordWrap":n.default.boolAttr(k,"val")&&(t["overflow-wrap"]="break-word");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"lang":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${l.localName}.${k.localName}`)}}),t}parseUnderline(l,t){var o=n.default.attr(l,"val");if(o!=null){switch(o){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration-style"]="dashed";break;case"dotted":case"dottedHeavy":t["text-decoration-style"]="dotted";break;case"double":t["text-decoration-style"]="double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration-style"]="wavy";break;case"none":t["text-decoration"]="none"}var b=C.colorAttr(l,"color");b&&(t["text-decoration-color"]=b)}}parseFont(l,t){var o=[n.default.attr(l,"ascii"),a.themeValue(l,"asciiTheme")].filter(b=>b).join(", ");o.length>0&&(t["font-family"]=o)}parseIndentation(l,t){var o=n.default.lengthAttr(l,"firstLine"),b=n.default.lengthAttr(l,"hanging"),k=n.default.lengthAttr(l,"left"),D=n.default.lengthAttr(l,"start"),_=n.default.lengthAttr(l,"right"),P=n.default.lengthAttr(l,"end");o&&(t["text-indent"]=o),b&&(t["text-indent"]=`-${b}`),(k||D)&&(t["margin-left"]=k||D),(_||P)&&(t["margin-right"]=_||P)}parseSpacing(l,t){var o=n.default.lengthAttr(l,"before"),b=n.default.lengthAttr(l,"after"),k=n.default.intAttr(l,"line",null),D=n.default.attr(l,"lineRule");if(o&&(t["margin-top"]=o),b&&(t["margin-bottom"]=b),k!==null)switch(D){case"auto":t["line-height"]=`${(k/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${k/20}pt)`;break;default:t["line-height"]=t["min-height"]=k/20+"pt"}}parseMarginProperties(l,t){C.foreach(l,o=>{switch(o.localName){case"left":t["padding-left"]=a.valueOfMargin(o);break;case"right":t["padding-right"]=a.valueOfMargin(o);break;case"top":t["padding-top"]=a.valueOfMargin(o);break;case"bottom":t["padding-bottom"]=a.valueOfMargin(o)}})}parseTrHeight(l,t){n.default.attr(l,"hRule"),t.height=n.default.lengthAttr(l,"val")}parseBorderProperties(l,t){C.foreach(l,o=>{switch(o.localName){case"start":case"left":t["border-left"]=a.valueOfBorder(o);break;case"end":case"right":t["border-right"]=a.valueOfBorder(o);break;case"top":t["border-top"]=a.valueOfBorder(o);break;case"bottom":t["border-bottom"]=a.valueOfBorder(o)}})}};const S=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class C{static foreach(t,o){for(var b=0;b<t.childNodes.length;b++){let k=t.childNodes[b];k.nodeType==Node.ELEMENT_NODE&&o(k)}}static colorAttr(t,o,b=null,k="black"){var D=n.default.attr(t,o);if(D)return D=="auto"?k:S.includes(D)?D:`#${D}`;var _=n.default.attr(t,"themeColor");return _?`var(--docx-${_}-color)`:b}static sizeValue(t,o=h.LengthUsage.Dxa){return(0,h.convertLength)(t.textContent,o)}}class a{static themeValue(t,o){var b=n.default.attr(t,o);return b?`var(--docx-${b}-font)`:null}static valueOfSize(t,o){var b=h.LengthUsage.Dxa;switch(n.default.attr(t,"type")){case"dxa":break;case"pct":b=h.LengthUsage.Percent;break;case"auto":return"auto"}return n.default.lengthAttr(t,o,b)}static valueOfMargin(t){return n.default.lengthAttr(t,"w")}static valueOfBorder(t){if(n.default.attr(t,"val")=="nil")return"none";var o=C.colorAttr(t,"color");return`${n.default.lengthAttr(t,"sz",h.LengthUsage.Border)} solid ${o=="auto"?e.autos.borderColor:o}`}static valueOfTblLayout(t){return n.default.attr(t,"val")=="fixed"?"fixed":"auto"}static classNameOfCnfStyle(t){const o=n.default.attr(t,"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((b,k)=>o[k]=="1").join(" ")}static valueOfJc(t){var o=n.default.attr(t,"val");switch(o){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return o}static valueOfVertAlign(t,o=!1){var b=n.default.attr(t,"val");switch(b){case"subscript":return"sub";case"superscript":return o?"sup":"super"}return o?null:b}static valueOfTextAlignment(t){var o=n.default.attr(t,"val");switch(o){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return o}static addSize(t,o){return t==null?o:o==null?t:`calc(${t} + ${o})`}static classNameOftblLook(t){const o=n.default.hexAttr(t,"val",0);let b="";return(n.default.boolAttr(t,"firstRow")||32&o)&&(b+=" first-row"),(n.default.boolAttr(t,"lastRow")||64&o)&&(b+=" last-row"),(n.default.boolAttr(t,"firstColumn")||128&o)&&(b+=" first-col"),(n.default.boolAttr(t,"lastColumn")||256&o)&&(b+=" last-col"),(n.default.boolAttr(t,"noHBand")||512&o)&&(b+=" no-hband"),(n.default.boolAttr(t,"noVBand")||1024&o)&&(b+=" no-vband"),b.trim()}}},162:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CorePropsPart=void 0;const s=r(530),m=r(614);class p extends s.Part{parseXml(i){this.props=(0,m.parseCoreProps)(i,this._package.xmlParser)}}e.CorePropsPart=p},614:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseCoreProps=void 0,e.parseCoreProps=function(r,s){const m={};for(let p of s.elements(r))switch(p.localName){case"title":m.title=p.textContent;break;case"description":m.description=p.textContent;break;case"subject":m.subject=p.textContent;break;case"creator":m.creator=p.textContent;break;case"keywords":m.keywords=p.textContent;break;case"language":m.language=p.textContent;break;case"lastModifiedBy":m.lastModifiedBy=p.textContent;break;case"revision":p.textContent&&(m.revision=parseInt(p.textContent))}return m}},177:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomPropsPart=void 0;const s=r(530),m=r(821);class p extends s.Part{parseXml(i){this.props=(0,m.parseCustomProps)(i,this._package.xmlParser)}}e.CustomPropsPart=p},821:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseCustomProps=void 0,e.parseCustomProps=function(r,s){return s.elements(r,"property").map(m=>{const p=m.firstChild;return{formatId:s.attr(m,"fmtid"),name:s.attr(m,"name"),type:p.nodeName,value:p.textContent}})}},665:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedPropsPart=void 0;const s=r(530),m=r(668);class p extends s.Part{parseXml(i){this.props=(0,m.parseExtendedProps)(i,this._package.xmlParser)}}e.ExtendedPropsPart=p},668:(v,e)=>{function r(s){if(s!==void 0)return parseInt(s)}Object.defineProperty(e,"__esModule",{value:!0}),e.parseExtendedProps=void 0,e.parseExtendedProps=function(s,m){const p={};for(let n of m.elements(s))switch(n.localName){case"Template":p.template=n.textContent;break;case"Pages":p.pages=r(n.textContent);break;case"Words":p.words=r(n.textContent);break;case"Characters":p.characters=r(n.textContent);break;case"Application":p.application=n.textContent;break;case"Lines":p.lines=r(n.textContent);break;case"Paragraphs":p.paragraphs=r(n.textContent);break;case"Company":p.company=n.textContent;break;case"AppVersion":p.appVersion=n.textContent}return p}},172:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseBookmarkEnd=e.parseBookmarkStart=void 0;const s=r(120);e.parseBookmarkStart=function(m,p){return{type:s.DomType.BookmarkStart,id:p.attr(m,"id"),name:p.attr(m,"name"),colFirst:p.intAttr(m,"colFirst"),colLast:p.intAttr(m,"colLast")}},e.parseBookmarkEnd=function(m,p){return{type:s.DomType.BookmarkEnd,id:p.attr(m,"id")}}},191:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseBorders=e.parseBorder=void 0;const s=r(149);function m(p,n){return{type:n.attr(p,"val"),color:n.attr(p,"color"),size:n.lengthAttr(p,"sz",s.LengthUsage.Border),offset:n.lengthAttr(p,"space",s.LengthUsage.Point),frame:n.boolAttr(p,"frame"),shadow:n.boolAttr(p,"shadow")}}e.parseBorder=m,e.parseBorders=function(p,n){var i={};for(let y of n.elements(p))switch(y.localName){case"left":i.left=m(y,n);break;case"top":i.top=m(y,n);break;case"right":i.right=m(y,n);break;case"bottom":i.bottom=m(y,n)}return i}},149:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseCommonProperty=e.convertPercentage=e.convertBoolean=e.convertLength=e.LengthUsage=e.ns=void 0,e.ns={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"},e.LengthUsage={Dxa:{mul:.05,unit:"pt"},Emu:{mul:7874015748031496e-20,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:.004166666666666667,unit:""},VmlEmu:{mul:7874015748031496e-20,unit:""}},e.convertLength=function(r,s=e.LengthUsage.Dxa){return r==null||/.+(p[xt]|[%])$/.test(r)?r:`${(parseInt(r)*s.mul).toFixed(2)}${s.unit}`},e.convertBoolean=function(r,s=!1){switch(r){case"1":case"on":case"true":return!0;case"0":case"off":case"false":return!1;default:return s}},e.convertPercentage=function(r){return r?parseInt(r)/100:null},e.parseCommonProperty=function(r,s,m){if(r.namespaceURI!=e.ns.wordml)return!1;switch(r.localName){case"color":s.color=m.attr(r,"val");break;case"sz":s.fontSize=m.lengthAttr(r,"val",e.LengthUsage.FontSize);break;default:return!1}return!0}},448:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentPart=void 0;const s=r(530);class m extends s.Part{constructor(n,i,y){super(n,i),this._documentParser=y}parseXml(n){this.body=this._documentParser.parseDocumentFile(n)}}e.DocumentPart=m},120:(v,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DomType=void 0,(r=e.DomType||(e.DomType={})).Document="document",r.Paragraph="paragraph",r.Run="run",r.Break="break",r.NoBreakHyphen="noBreakHyphen",r.Table="table",r.Row="row",r.Cell="cell",r.Hyperlink="hyperlink",r.Drawing="drawing",r.Image="image",r.Text="text",r.Tab="tab",r.Symbol="symbol",r.BookmarkStart="bookmarkStart",r.BookmarkEnd="bookmarkEnd",r.Footer="footer",r.Header="header",r.FootnoteReference="footnoteReference",r.EndnoteReference="endnoteReference",r.Footnote="footnote",r.Endnote="endnote",r.SimpleField="simpleField",r.ComplexField="complexField",r.Instruction="instruction",r.VmlPicture="vmlPicture",r.MmlMath="mmlMath",r.MmlMathParagraph="mmlMathParagraph",r.MmlFraction="mmlFraction",r.MmlNumerator="mmlNumerator",r.MmlDenominator="mmlDenominator",r.MmlRadical="mmlRadical",r.MmlBase="mmlBase",r.MmlDegree="mmlDegree",r.MmlSuperscript="mmlSuperscript",r.MmlSubscript="mmlSubscript",r.MmlSubArgument="mmlSubArgument",r.MmlSuperArgument="mmlSuperArgument",r.MmlNary="mmlNary",r.MmlDelimiter="mmlDelimiter",r.VmlElement="vmlElement",r.Inserted="inserted",r.Deleted="deleted",r.DeletedText="deletedText"},931:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseLineSpacing=void 0,e.parseLineSpacing=function(r,s){return{before:s.lengthAttr(r,"before"),after:s.lengthAttr(r,"after"),line:s.intAttr(r,"line"),lineRule:s.attr(r,"lineRule")}}},109:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseNumbering=e.parseTabs=e.parseParagraphProperty=e.parseParagraphProperties=void 0;const s=r(149),m=r(59),p=r(931),n=r(488);function i(d,f,g){if(d.namespaceURI!=s.ns.wordml)return!1;if((0,s.parseCommonProperty)(d,f,g))return!0;switch(d.localName){case"tabs":f.tabs=y(d,g);break;case"sectPr":f.sectionProps=(0,m.parseSectionProperties)(d,g);break;case"numPr":f.numbering=h(d,g);break;case"spacing":return f.lineSpacing=(0,p.parseLineSpacing)(d,g),!1;case"textAlignment":return f.textAlignment=g.attr(d,"val"),!1;case"keepNext":f.keepLines=g.boolAttr(d,"val",!0);break;case"keepNext":f.keepNext=g.boolAttr(d,"val",!0);break;case"pageBreakBefore":f.pageBreakBefore=g.boolAttr(d,"val",!0);break;case"outlineLvl":f.outlineLevel=g.intAttr(d,"val");break;case"pStyle":f.styleName=g.attr(d,"val");break;case"rPr":f.runProps=(0,n.parseRunProperties)(d,g);break;default:return!1}return!0}function y(d,f){return f.elements(d,"tab").map(g=>({position:f.lengthAttr(g,"pos"),leader:f.attr(g,"leader"),style:f.attr(g,"val")}))}function h(d,f){var g={};for(let S of f.elements(d))switch(S.localName){case"numId":g.id=f.attr(S,"val");break;case"ilvl":g.level=f.intAttr(S,"val")}return g}e.parseParagraphProperties=function(d,f){let g={};for(let S of f.elements(d))i(S,g,f);return g},e.parseParagraphProperty=i,e.parseTabs=y,e.parseNumbering=h},488:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseRunProperty=e.parseRunProperties=void 0;const s=r(149);function m(p,n,i){return!!(0,s.parseCommonProperty)(p,n,i)}e.parseRunProperties=function(p,n){let i={};for(let y of n.elements(p))m(y,i,n);return i},e.parseRunProperty=m},59:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseSectionProperties=e.SectionType=void 0;const s=r(472),m=r(191);function p(h,d){return{numberOfColumns:d.intAttr(h,"num"),space:d.lengthAttr(h,"space"),separator:d.boolAttr(h,"sep"),equalWidth:d.boolAttr(h,"equalWidth",!0),columns:d.elements(h,"col").map(f=>({width:d.lengthAttr(f,"w"),space:d.lengthAttr(f,"space")}))}}function n(h,d){return{chapSep:d.attr(h,"chapSep"),chapStyle:d.attr(h,"chapStyle"),format:d.attr(h,"fmt"),start:d.intAttr(h,"start")}}function i(h,d){return{id:d.attr(h,"id"),type:d.attr(h,"type")}}var y;(y=e.SectionType||(e.SectionType={})).Continuous="continuous",y.NextPage="nextPage",y.NextColumn="nextColumn",y.EvenPage="evenPage",y.OddPage="oddPage",e.parseSectionProperties=function(h,d=s.default){var f,g,S={};for(let C of d.elements(h))switch(C.localName){case"pgSz":S.pageSize={width:d.lengthAttr(C,"w"),height:d.lengthAttr(C,"h"),orientation:d.attr(C,"orient")};break;case"type":S.type=d.attr(C,"val");break;case"pgMar":S.pageMargins={left:d.lengthAttr(C,"left"),right:d.lengthAttr(C,"right"),top:d.lengthAttr(C,"top"),bottom:d.lengthAttr(C,"bottom"),header:d.lengthAttr(C,"header"),footer:d.lengthAttr(C,"footer"),gutter:d.lengthAttr(C,"gutter")};break;case"cols":S.columns=p(C,d);break;case"headerReference":((f=S.headerRefs)!==null&&f!==void 0?f:S.headerRefs=[]).push(i(C,d));break;case"footerReference":((g=S.footerRefs)!==null&&g!==void 0?g:S.footerRefs=[]).push(i(C,d));break;case"titlePg":S.titlePage=d.boolAttr(C,"val",!0);break;case"pgBorders":S.pageBorders=(0,m.parseBorders)(C,d);break;case"pgNumType":S.pageNumber=n(C,d)}return S}},667:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.renderAsync=e.praseAsync=e.defaultOptions=void 0;const s=r(213),m=r(168),p=r(932);e.defaultOptions={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,useMathMLPolyfill:!1,renderChanges:!1},e.praseAsync=function(n,i=null){const y=Object.assign(Object.assign({},e.defaultOptions),i);return s.WordDocument.load(n,new m.DocumentParser(y),y)},e.renderAsync=function(n,i,y=null,h=null){const d=Object.assign(Object.assign({},e.defaultOptions),h),f=new p.HtmlRenderer(window.document);return s.WordDocument.load(n,new m.DocumentParser(d),d).then(g=>(f.render(g,i,y,d),g))}},380:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FontTablePart=void 0;const s=r(530),m=r(512);class p extends s.Part{parseXml(i){this.fonts=(0,m.parseFonts)(i,this._package.xmlParser)}}e.FontTablePart=p},512:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseEmbedFontRef=e.parseFont=e.parseFonts=void 0;const r={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function s(p,n){let i={name:n.attr(p,"name"),embedFontRefs:[]};for(let y of n.elements(p))switch(y.localName){case"family":i.family=n.attr(y,"val");break;case"altName":i.altName=n.attr(y,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":i.embedFontRefs.push(m(y,n))}return i}function m(p,n){return{id:n.attr(p,"id"),key:n.attr(p,"fontKey"),type:r[p.localName]}}e.parseFonts=function(p,n){return n.elements(p).map(i=>s(i,n))},e.parseFont=s,e.parseEmbedFontRef=m},984:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WmlFooter=e.WmlHeader=void 0;const s=r(120);e.WmlHeader=class{constructor(){this.type=s.DomType.Header,this.children=[],this.cssStyle={}}},e.WmlFooter=class{constructor(){this.type=s.DomType.Footer,this.children=[],this.cssStyle={}}}},985:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FooterPart=e.HeaderPart=e.BaseHeaderFooterPart=void 0;const s=r(530),m=r(984);class p extends s.Part{constructor(i,y,h){super(i,y),this._documentParser=h}parseXml(i){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(i)}}e.BaseHeaderFooterPart=p,e.HeaderPart=class extends p{createRootElement(){return new m.WmlHeader}},e.FooterPart=class extends p{createRootElement(){return new m.WmlFooter}}},932:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.HtmlRenderer=void 0;const s=r(120),m=r(593),p=r(630),n=r(438),i="http://www.w3.org/1998/Math/MathML";function y(a,l,t){return d(void 0,a,l,t)}function h(a,l,t){return d("http://www.w3.org/2000/svg",a,l,t)}function d(a,l,t,o){var b=a?document.createElementNS(a,l):document.createElement(l);return Object.assign(b,t),o&&g(b,o),b}function f(a){a.innerHTML=""}function g(a,l){l.forEach(t=>a.appendChild((0,m.isString)(t)?document.createTextNode(t):t))}function S(a){return y("style",{innerHTML:a})}function C(a,l){a.appendChild(document.createComment(l))}e.HtmlRenderer=class{constructor(a){this.htmlDocument=a,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.createElement=y}render(a,l,t=null,o){var b;this.document=a,this.options=o,this.className=o.className,this.rootSelector=o.inWrapper?`.${this.className}-wrapper`:":root",this.styleMap=null,f(t=t||l),f(l),C(t,"docxjs library predefined styles"),t.appendChild(this.renderDefaultStyle()),!window.MathMLElement&&o.useMathMLPolyfill&&(C(t,"docxjs mathml polyfill styles"),t.appendChild(S(n.default))),a.themePart&&(C(t,"docxjs document theme values"),this.renderTheme(a.themePart,t)),a.stylesPart!=null&&(this.styleMap=this.processStyles(a.stylesPart.styles),C(t,"docxjs document styles"),t.appendChild(this.renderStyles(a.stylesPart.styles))),a.numberingPart&&(this.prodessNumberings(a.numberingPart.domNumberings),C(t,"docxjs document numbering styles"),t.appendChild(this.renderNumbering(a.numberingPart.domNumberings,t))),a.footnotesPart&&(this.footnoteMap=(0,m.keyBy)(a.footnotesPart.notes,D=>D.id)),a.endnotesPart&&(this.endnoteMap=(0,m.keyBy)(a.endnotesPart.notes,D=>D.id)),a.settingsPart&&(this.defaultTabSize=(b=a.settingsPart.settings)===null||b===void 0?void 0:b.defaultTabStop),!o.ignoreFonts&&a.fontTablePart&&this.renderFontTable(a.fontTablePart,t);var k=this.renderSections(a.documentPart.body);this.options.inWrapper?l.appendChild(this.renderWrapper(k)):g(l,k),this.refreshTabStops()}renderTheme(a,l){var t,o;const b={},k=(t=a.theme)===null||t===void 0?void 0:t.fontScheme;k&&(k.majorFont&&(b["--docx-majorHAnsi-font"]=k.majorFont.latinTypeface),k.minorFont&&(b["--docx-minorHAnsi-font"]=k.minorFont.latinTypeface));const D=(o=a.theme)===null||o===void 0?void 0:o.colorScheme;if(D)for(let[P,u]of Object.entries(D.colors))b[`--docx-${P}-color`]=`#${u}`;const _=this.styleToString(`.${this.className}`,b);l.appendChild(S(_))}renderFontTable(a,l){for(let t of a.fonts)for(let o of t.embedFontRefs)this.document.loadFont(o.id,o.key).then(b=>{const k={"font-family":t.name,src:`url(${b})`};o.type!="bold"&&o.type!="boldItalic"||(k["font-weight"]="bold"),o.type!="italic"&&o.type!="boldItalic"||(k["font-style"]="italic"),C(l,`docxjs ${t.name} font`);const D=this.styleToString("@font-face",k);l.appendChild(S(D)),this.refreshTabStops()})}processStyleName(a){return a?`${this.className}_${(0,m.escapeClassName)(a)}`:this.className}processStyles(a){const l=(0,m.keyBy)(a.filter(o=>o.id!=null),o=>o.id);for(const o of a.filter(b=>b.basedOn)){var t=l[o.basedOn];if(t){o.paragraphProps=(0,m.mergeDeep)(o.paragraphProps,t.paragraphProps),o.runProps=(0,m.mergeDeep)(o.runProps,t.runProps);for(const b of t.styles){const k=o.styles.find(D=>D.target==b.target);k?this.copyStyleProperties(b.values,k.values):o.styles.push(Object.assign(Object.assign({},b),{values:Object.assign({},b.values)}))}}else this.options.debug&&console.warn(`Can't find base style ${o.basedOn}`)}for(let o of a)o.cssName=this.processStyleName(o.id);return l}prodessNumberings(a){var l;for(let t of a.filter(o=>o.pStyleName)){const o=this.findStyle(t.pStyleName);!((l=o==null?void 0:o.paragraphProps)===null||l===void 0)&&l.numbering&&(o.paragraphProps.numbering.level=t.level)}}processElement(a){if(a.children)for(var l of a.children)l.parent=a,l.type==s.DomType.Table?this.processTable(l):this.processElement(l)}processTable(a){for(var l of a.children)for(var t of l.children)t.cssStyle=this.copyStyleProperties(a.cellStyle,t.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(t)}copyStyleProperties(a,l,t=null){if(!a)return l;for(var o of(l==null&&(l={}),t==null&&(t=Object.getOwnPropertyNames(a)),t))a.hasOwnProperty(o)&&!l.hasOwnProperty(o)&&(l[o]=a[o]);return l}createSection(a,l){var t=this.createElement("section",{className:a});return l&&(l.pageMargins&&(t.style.paddingLeft=l.pageMargins.left,t.style.paddingRight=l.pageMargins.right,t.style.paddingTop=l.pageMargins.top,t.style.paddingBottom=l.pageMargins.bottom),l.pageSize&&(this.options.ignoreWidth||(t.style.width=l.pageSize.width),this.options.ignoreHeight||(t.style.minHeight=l.pageSize.height)),l.columns&&l.columns.numberOfColumns&&(t.style.columnCount=`${l.columns.numberOfColumns}`,t.style.columnGap=l.columns.space,l.columns.separator&&(t.style.columnRule="1px solid black"))),t}renderSections(a){const l=[];this.processElement(a);const t=this.splitBySection(a.children);let o=null;for(let k=0,D=t.length;k<D;k++){this.currentFootnoteIds=[];const _=t[k],P=_.sectProps||a.props,u=this.createSection(this.className,P);this.renderStyleValues(a.cssStyle,u),this.options.renderHeaders&&this.renderHeaderFooter(P.headerRefs,P,l.length,o!=P,u);var b=this.createElement("article");this.renderElements(_.elements,b),u.appendChild(b),this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,u),this.options.renderEndnotes&&k==D-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,u),this.options.renderFooters&&this.renderHeaderFooter(P.footerRefs,P,l.length,o!=P,u),l.push(u),o=P}return l}renderHeaderFooter(a,l,t,o,b){var k,D;if(a){var _=(D=(k=l.titlePage&&o?a.find(u=>u.type=="first"):null)!==null&&k!==void 0?k:t%2==1?a.find(u=>u.type=="even"):null)!==null&&D!==void 0?D:a.find(u=>u.type=="default"),P=_&&this.document.findPartByRelId(_.id,this.document.documentPart);P&&(this.currentPart=P,this.usedHederFooterParts.includes(P.path)||(this.processElement(P.rootElement),this.usedHederFooterParts.push(P.path)),this.renderElements([P.rootElement],b),this.currentPart=null)}}isPageBreakElement(a){return a.type==s.DomType.Break&&(a.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:a.break=="page")}splitBySection(a){var l,t={sectProps:null,elements:[]},o=[t];for(let R of a){if(R.type==s.DomType.Paragraph){const G=this.findStyle(R.styleName);!((l=G==null?void 0:G.paragraphProps)===null||l===void 0)&&l.pageBreakBefore&&(t.sectProps=b,t={sectProps:null,elements:[]},o.push(t))}if(t.elements.push(R),R.type==s.DomType.Paragraph){const G=R;var b=G.sectionProps,k=-1,D=-1;if(this.options.breakPages&&G.children&&(k=G.children.findIndex(L=>{var q,W;return(D=(W=(q=L.children)===null||q===void 0?void 0:q.findIndex(this.isPageBreakElement.bind(this)))!==null&&W!==void 0?W:-1)!=-1})),(b||k!=-1)&&(t.sectProps=b,t={sectProps:null,elements:[]},o.push(t)),k!=-1){let L=G.children[k],q=D<L.children.length-1;if(k<G.children.length-1||q){var _=R.children,P=Object.assign(Object.assign({},R),{children:_.slice(k)});if(R.children=_.slice(0,k),t.elements.push(P),q){let W=L.children,Y=Object.assign(Object.assign({},L),{children:W.slice(0,D)});R.children.push(Y),L.children=W.slice(D)}}}}}let u=null;for(let R=o.length-1;R>=0;R--)o[R].sectProps==null?o[R].sectProps=u:u=o[R].sectProps;return o}renderWrapper(a){return this.createElement("div",{className:`${this.className}-wrapper`},a)}renderDefaultStyle(){var a=this.className;return S(`
  80. .${a}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; }
  81. .${a}-wrapper>section.${a} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
  82. .${a} { color: black; }
  83. section.${a} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
  84. section.${a}>article { margin-bottom: auto; }
  85. .${a} table { border-collapse: collapse; }
  86. .${a} table td, .${a} table th { vertical-align: top; }
  87. .${a} p { margin: 0pt; min-height: 1em; }
  88. .${a} span { white-space: pre-wrap; overflow-wrap: break-word; }
  89. .${a} a { color: inherit; text-decoration: inherit; }
  90. `)}renderNumbering(a,l){var t="",o=[];for(var b of a){var k=`p.${this.numberingClass(b.id,b.level)}`,D="none";if(b.bullet){let _=`--${this.className}-${b.bullet.src}`.toLowerCase();t+=this.styleToString(`${k}:before`,{content:"' '",display:"inline-block",background:`var(${_})`},b.bullet.style),this.document.loadNumberingImage(b.bullet.src).then(P=>{var u=`${this.rootSelector} { ${_}: url(${P}) }`;l.appendChild(S(u))})}else if(b.levelText){let _=this.numberingCounter(b.id,b.level);b.level>0?t+=this.styleToString(`p.${this.numberingClass(b.id,b.level-1)}`,{"counter-reset":_}):o.push(_),t+=this.styleToString(`${k}:before`,Object.assign({content:this.levelTextToContent(b.levelText,b.suff,b.id,this.numFormatToCssValue(b.format)),"counter-increment":_},b.rStyle))}else D=this.numFormatToCssValue(b.format);t+=this.styleToString(k,Object.assign({display:"list-item","list-style-position":"inside","list-style-type":D},b.pStyle))}return o.length>0&&(t+=this.styleToString(this.rootSelector,{"counter-reset":o.join(" ")})),S(t)}renderStyles(a){var l,t="";const o=this.styleMap,b=(0,m.keyBy)(a.filter(P=>P.isDefault),P=>P.target);for(const P of a){var k=P.styles;if(P.linked){var D=P.linked&&o[P.linked];D?k=k.concat(D.styles):this.options.debug&&console.warn(`Can't find linked style ${P.linked}`)}for(const u of k){var _=`${(l=P.target)!==null&&l!==void 0?l:""}.${P.cssName}`;P.target!=u.target&&(_+=` ${u.target}`),b[P.target]==P&&(_=`.${this.className} ${P.target}, `+_),t+=this.styleToString(_,u.values)}}return S(t)}renderNotes(a,l,t){var o=a.map(k=>l[k]).filter(k=>k);if(o.length>0){var b=this.createElement("ol",null,this.renderElements(o));t.appendChild(b)}}renderElement(a){switch(a.type){case s.DomType.Paragraph:return this.renderParagraph(a);case s.DomType.BookmarkStart:return this.renderBookmarkStart(a);case s.DomType.BookmarkEnd:return null;case s.DomType.Run:return this.renderRun(a);case s.DomType.Table:return this.renderTable(a);case s.DomType.Row:return this.renderTableRow(a);case s.DomType.Cell:return this.renderTableCell(a);case s.DomType.Hyperlink:return this.renderHyperlink(a);case s.DomType.Drawing:return this.renderDrawing(a);case s.DomType.Image:return this.renderImage(a);case s.DomType.Text:case s.DomType.Text:return this.renderText(a);case s.DomType.DeletedText:return this.renderDeletedText(a);case s.DomType.Tab:return this.renderTab(a);case s.DomType.Symbol:return this.renderSymbol(a);case s.DomType.Break:return this.renderBreak(a);case s.DomType.Footer:return this.renderContainer(a,"footer");case s.DomType.Header:return this.renderContainer(a,"header");case s.DomType.Footnote:case s.DomType.Endnote:return this.renderContainer(a,"li");case s.DomType.FootnoteReference:return this.renderFootnoteReference(a);case s.DomType.EndnoteReference:return this.renderEndnoteReference(a);case s.DomType.NoBreakHyphen:return this.createElement("wbr");case s.DomType.VmlPicture:return this.renderVmlPicture(a);case s.DomType.VmlElement:return this.renderVmlElement(a);case s.DomType.MmlMath:return this.renderContainerNS(a,i,"math",{xmlns:i});case s.DomType.MmlMathParagraph:return this.renderContainer(a,"span");case s.DomType.MmlFraction:return this.renderContainerNS(a,i,"mfrac");case s.DomType.MmlNumerator:case s.DomType.MmlDenominator:return this.renderContainerNS(a,i,"mrow");case s.DomType.MmlRadical:return this.renderMmlRadical(a);case s.DomType.MmlDegree:return this.renderContainerNS(a,i,"mn");case s.DomType.MmlSuperscript:return this.renderContainerNS(a,i,"msup");case s.DomType.MmlSubscript:return this.renderContainerNS(a,i,"msub");case s.DomType.MmlBase:return this.renderContainerNS(a,i,"mrow");case s.DomType.MmlSuperArgument:case s.DomType.MmlSubArgument:return this.renderContainerNS(a,i,"mn");case s.DomType.MmlDelimiter:return this.renderMmlDelimiter(a);case s.DomType.MmlNary:return this.renderMmlNary(a);case s.DomType.Inserted:return this.renderInserted(a);case s.DomType.Deleted:return this.renderDeleted(a)}return null}renderChildren(a,l){return this.renderElements(a.children,l)}renderElements(a,l){if(a==null)return null;var t=a.flatMap(o=>this.renderElement(o)).filter(o=>o!=null);return l&&g(l,t),t}renderContainer(a,l,t){return this.createElement(l,t,this.renderChildren(a))}renderContainerNS(a,l,t,o){return d(l,t,o,this.renderChildren(a))}renderParagraph(a){var l,t,o,b,k=this.createElement("p");const D=this.findStyle(a.styleName);(l=a.tabs)!==null&&l!==void 0||(a.tabs=(t=D==null?void 0:D.paragraphProps)===null||t===void 0?void 0:t.tabs),this.renderClass(a,k),this.renderChildren(a,k),this.renderStyleValues(a.cssStyle,k),this.renderCommonProperties(k.style,a);const _=(o=a.numbering)!==null&&o!==void 0?o:(b=D==null?void 0:D.paragraphProps)===null||b===void 0?void 0:b.numbering;return _&&k.classList.add(this.numberingClass(_.id,_.level)),k}renderRunProperties(a,l){this.renderCommonProperties(a,l)}renderCommonProperties(a,l){l!=null&&(l.color&&(a.color=l.color),l.fontSize&&(a["font-size"]=l.fontSize))}renderHyperlink(a){var l=this.createElement("a");if(this.renderChildren(a,l),this.renderStyleValues(a.cssStyle,l),a.href)l.href=a.href;else if(a.id){const t=this.document.documentPart.rels.find(o=>o.id==a.id&&o.targetMode==="External");l.href=t==null?void 0:t.target}return l}renderDrawing(a){var l=this.createElement("div");return l.style.display="inline-block",l.style.position="relative",l.style.textIndent="0px",this.renderChildren(a,l),this.renderStyleValues(a.cssStyle,l),l}renderImage(a){let l=this.createElement("img");return this.renderStyleValues(a.cssStyle,l),this.document&&this.document.loadDocumentImage(a.src,this.currentPart).then(t=>{l.src=t}),l}renderText(a){return this.htmlDocument.createTextNode(a.text)}renderDeletedText(a){return this.options.renderEndnotes?this.htmlDocument.createTextNode(a.text):null}renderBreak(a){return a.break=="textWrapping"?this.createElement("br"):null}renderInserted(a){return this.options.renderChanges?this.renderContainer(a,"ins"):this.renderChildren(a)}renderDeleted(a){return this.options.renderChanges?this.renderContainer(a,"del"):null}renderSymbol(a){var l=this.createElement("span");return l.style.fontFamily=a.font,l.innerHTML=`&#x${a.char};`,l}renderFootnoteReference(a){var l=this.createElement("sup");return this.currentFootnoteIds.push(a.id),l.textContent=`${this.currentFootnoteIds.length}`,l}renderEndnoteReference(a){var l=this.createElement("sup");return this.currentEndnoteIds.push(a.id),l.textContent=`${this.currentEndnoteIds.length}`,l}renderTab(a){var l,t=this.createElement("span");if(t.innerHTML="&emsp;",this.options.experimental){t.className=this.tabStopClass();var o=(l=function(b,k){for(var D=b.parent;D!=null&&D.type!=k;)D=D.parent;return D}(a,s.DomType.Paragraph))===null||l===void 0?void 0:l.tabs;this.currentTabs.push({stops:o,span:t})}return t}renderBookmarkStart(a){var l=this.createElement("span");return l.id=a.name,l}renderRun(a){if(a.fieldRun)return null;const l=this.createElement("span");if(a.id&&(l.id=a.id),this.renderClass(a,l),this.renderStyleValues(a.cssStyle,l),a.verticalAlign){const t=this.createElement(a.verticalAlign);this.renderChildren(a,t),l.appendChild(t)}else this.renderChildren(a,l);return l}renderTable(a){let l=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},a.columns&&l.appendChild(this.renderTableColumns(a.columns)),this.renderClass(a,l),this.renderChildren(a,l),this.renderStyleValues(a.cssStyle,l),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),l}renderTableColumns(a){let l=this.createElement("colgroup");for(let t of a){let o=this.createElement("col");t.width&&(o.style.width=t.width),l.appendChild(o)}return l}renderTableRow(a){let l=this.createElement("tr");return this.currentCellPosition.col=0,this.renderClass(a,l),this.renderChildren(a,l),this.renderStyleValues(a.cssStyle,l),this.currentCellPosition.row++,l}renderTableCell(a){let l=this.createElement("td");const t=this.currentCellPosition.col;return a.verticalMerge?a.verticalMerge=="restart"?(this.currentVerticalMerge[t]=l,l.rowSpan=1):this.currentVerticalMerge[t]&&(this.currentVerticalMerge[t].rowSpan+=1,l.style.display="none"):this.currentVerticalMerge[t]=null,this.renderClass(a,l),this.renderChildren(a,l),this.renderStyleValues(a.cssStyle,l),a.span&&(l.colSpan=a.span),this.currentCellPosition.col+=l.colSpan,l}renderVmlPicture(a){var l=y("div");return this.renderChildren(a,l),l}renderVmlElement(a){var l,t,o=h("svg");o.setAttribute("style",a.cssStyleText);const b=h(a.tagName);return Object.entries(a.attrs).forEach(([k,D])=>b.setAttribute(k,D)),!((l=a.imageHref)===null||l===void 0)&&l.id&&((t=this.document)===null||t===void 0||t.loadDocumentImage(a.imageHref.id,this.currentPart).then(k=>b.setAttribute("href",k))),o.appendChild(b),setTimeout(()=>{const k=o.firstElementChild.getBBox();o.setAttribute("width",`${Math.ceil(k.x+k.width)}`),o.setAttribute("height",`${Math.ceil(k.y+k.height)}`)},0),o}renderMmlRadical(a){var l;const t=a.children.find(b=>b.type==s.DomType.MmlBase);if(!((l=a.props)===null||l===void 0)&&l.hideDegree)return d(i,"msqrt",null,this.renderElements([t]));const o=a.children.find(b=>b.type==s.DomType.MmlDegree);return d(i,"mroot",null,this.renderElements([t,o]))}renderMmlDelimiter(a){var l,t;const o=[];return o.push(d(i,"mo",null,[(l=a.props.beginChar)!==null&&l!==void 0?l:"("])),o.push(...this.renderElements(a.children)),o.push(d(i,"mo",null,[(t=a.props.endChar)!==null&&t!==void 0?t:")"])),d(i,"mrow",null,o)}renderMmlNary(a){var l;const t=[],o=(0,m.keyBy)(a.children,P=>P.type),b=o[s.DomType.MmlSuperArgument],k=o[s.DomType.MmlSubArgument],D=b?d(i,"mo",null,(0,m.asArray)(this.renderElement(b))):null,_=k?d(i,"mo",null,(0,m.asArray)(this.renderElement(k))):null;if(!((l=a.props)===null||l===void 0)&&l.char){const P=d(i,"mo",null,[a.props.char]);D||_?t.push(d(i,"munderover",null,[P,_,D])):D?t.push(d(i,"mover",null,[P,D])):_?t.push(d(i,"munder",null,[P,_])):t.push(P)}return t.push(...this.renderElements(o[s.DomType.MmlBase].children)),d(i,"mrow",null,t)}renderStyleValues(a,l){Object.assign(l.style,a)}renderClass(a,l){a.className&&(l.className=a.className),a.styleName&&l.classList.add(this.processStyleName(a.styleName))}findStyle(a){var l;return a&&((l=this.styleMap)===null||l===void 0?void 0:l[a])}numberingClass(a,l){return`${this.className}-num-${a}-${l}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(a,l,t=null){let o=`${a} {\r
  91. `;for(const b in l)o+=` ${b}: ${l[b]};\r
  92. `;return t&&(o+=t),o+`}\r
  93. `}numberingCounter(a,l){return`${this.className}-num-${a}-${l}`}levelTextToContent(a,l,t,o){var b;return`"${a.replace(/%\d*/g,k=>{let D=parseInt(k.substring(1),10)-1;return`"counter(${this.numberingCounter(t,D)}, ${o})"`})}${(b={tab:"\\9",space:"\\a0"}[l])!==null&&b!==void 0?b:""}"`}numFormatToCssValue(a){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman"}[a]||a}refreshTabStops(){this.options.experimental&&(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{const a=(0,p.computePixelToPoint)();for(let l of this.currentTabs)(0,p.updateTabStop)(l.span,l.stops,this.defaultTabSize,a)},500))}}},630:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.updateTabStop=e.computePixelToPoint=void 0;const r={pos:0,leader:"none",style:"left"};function s(m){return parseFloat(m)}e.computePixelToPoint=function(m=document.body){const p=document.createElement("div");p.style.width="100pt",m.appendChild(p);const n=100/p.offsetWidth;return m.removeChild(p),n},e.updateTabStop=function(m,p,n,i=.75){const y=m.closest("p"),h=m.getBoundingClientRect(),d=y.getBoundingClientRect(),f=getComputedStyle(y),g=(p==null?void 0:p.length)>0?p.map(_=>({pos:s(_.position),leader:_.leader,style:_.style})).sort((_,P)=>_.pos-P.pos):[r],S=g[g.length-1],C=d.width*i,a=s(n);let l=S.pos+a;if(l<C)for(;l<C&&g.length<50;l+=a)g.push(Object.assign(Object.assign({},r),{pos:l}));const t=parseFloat(f.marginLeft),o=d.left+t,b=(h.left-o)*i,k=g.find(_=>_.style!="clear"&&_.pos>b);if(k==null)return;let D=1;if(k.style=="right"||k.style=="center"){const _=Array.from(y.querySelectorAll(`.${m.className}`)),P=_.indexOf(m)+1,u=document.createRange();u.setStart(m,1),P<_.length?u.setEndBefore(_[P]):u.setEndAfter(y);const R=k.style=="center"?.5:1,G=u.getBoundingClientRect(),L=G.left+R*G.width-(d.left-t);D=k.pos-L*i}else D=k.pos-b;switch(m.innerHTML="&nbsp;",m.style.textDecoration="inherit",m.style.wordSpacing=`${D.toFixed(0)}pt`,k.leader){case"dot":case"middleDot":m.style.textDecoration="underline",m.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":m.style.textDecoration="underline"}}},881:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WmlEndnote=e.WmlFootnote=e.WmlBaseNote=void 0;const s=r(120);class m{constructor(){this.children=[],this.cssStyle={}}}e.WmlBaseNote=m,e.WmlFootnote=class extends m{constructor(){super(...arguments),this.type=s.DomType.Footnote}},e.WmlEndnote=class extends m{constructor(){super(...arguments),this.type=s.DomType.Endnote}}},735:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EndnotesPart=e.FootnotesPart=e.BaseNotePart=void 0;const s=r(530),m=r(881);class p extends s.Part{constructor(i,y,h){super(i,y),this._documentParser=h}}e.BaseNotePart=p,e.FootnotesPart=class extends p{constructor(n,i,y){super(n,i,y)}parseXml(n){this.notes=this._documentParser.parseNotes(n,"footnote",m.WmlFootnote)}},e.EndnotesPart=class extends p{constructor(n,i,y){super(n,i,y)}parseXml(n){this.notes=this._documentParser.parseNotes(n,"endnote",m.WmlEndnote)}}},527:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NumberingPart=void 0;const s=r(530),m=r(682);class p extends s.Part{constructor(i,y,h){super(i,y),this._documentParser=h}parseXml(i){Object.assign(this,(0,m.parseNumberingPart)(i,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(i)}}e.NumberingPart=p},682:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseNumberingBulletPicture=e.parseNumberingLevelOverrride=e.parseNumberingLevel=e.parseAbstractNumbering=e.parseNumbering=e.parseNumberingPart=void 0;const s=r(109),m=r(488);function p(d,f){let g={id:f.attr(d,"numId"),overrides:[]};for(let S of f.elements(d))switch(S.localName){case"abstractNumId":g.abstractId=f.attr(S,"val");break;case"lvlOverride":g.overrides.push(y(S,f))}return g}function n(d,f){let g={id:f.attr(d,"abstractNumId"),levels:[]};for(let S of f.elements(d))switch(S.localName){case"name":g.name=f.attr(S,"val");break;case"multiLevelType":g.multiLevelType=f.attr(S,"val");break;case"numStyleLink":g.numberingStyleLink=f.attr(S,"val");break;case"styleLink":g.styleLink=f.attr(S,"val");break;case"lvl":g.levels.push(i(S,f))}return g}function i(d,f){let g={level:f.intAttr(d,"ilvl")};for(let S of f.elements(d))switch(S.localName){case"start":g.start=f.attr(S,"val");break;case"lvlRestart":g.restart=f.intAttr(S,"val");break;case"numFmt":g.format=f.attr(S,"val");break;case"lvlText":g.text=f.attr(S,"val");break;case"lvlJc":g.justification=f.attr(S,"val");break;case"lvlPicBulletId":g.bulletPictureId=f.attr(S,"val");break;case"pStyle":g.paragraphStyle=f.attr(S,"val");break;case"pPr":g.paragraphProps=(0,s.parseParagraphProperties)(S,f);break;case"rPr":g.runProps=(0,m.parseRunProperties)(S,f)}return g}function y(d,f){let g={level:f.intAttr(d,"ilvl")};for(let S of f.elements(d))switch(S.localName){case"startOverride":g.start=f.intAttr(S,"val");break;case"lvl":g.numberingLevel=i(S,f)}return g}function h(d,f){var g=f.element(d,"pict"),S=g&&f.element(g,"shape"),C=S&&f.element(S,"imagedata");return C?{id:f.attr(d,"numPicBulletId"),referenceId:f.attr(C,"id"),style:f.attr(S,"style")}:null}e.parseNumberingPart=function(d,f){let g={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let S of f.elements(d))switch(S.localName){case"num":g.numberings.push(p(S,f));break;case"abstractNum":g.abstractNumberings.push(n(S,f));break;case"numPicBullet":g.bulletPictures.push(h(S,f))}return g},e.parseNumbering=p,e.parseAbstractNumbering=n,e.parseNumberingLevel=i,e.parseNumberingLevelOverrride=y,e.parseNumberingBulletPicture=h},472:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XmlParser=e.serializeXmlString=e.parseXmlString=void 0;const s=r(149);e.parseXmlString=function(n,i=!1){i&&(n=n.replace(/<[?].*[?]>/,""));const y=new DOMParser().parseFromString(n,"application/xml"),h=(d=y.getElementsByTagName("parsererror")[0])===null||d===void 0?void 0:d.textContent;var d;if(h)throw new Error(h);return y},e.serializeXmlString=function(n){return new XMLSerializer().serializeToString(n)};class m{elements(i,y=null){const h=[];for(let d=0,f=i.childNodes.length;d<f;d++){let g=i.childNodes.item(d);g.nodeType!=1||y!=null&&g.localName!=y||h.push(g)}return h}element(i,y){for(let h=0,d=i.childNodes.length;h<d;h++){let f=i.childNodes.item(h);if(f.nodeType==1&&f.localName==y)return f}return null}elementAttr(i,y,h){var d=this.element(i,y);return d?this.attr(d,h):void 0}attrs(i){return Array.from(i.attributes)}attr(i,y){for(let h=0,d=i.attributes.length;h<d;h++){let f=i.attributes.item(h);if(f.localName==y)return f.value}return null}intAttr(i,y,h=null){var d=this.attr(i,y);return d?parseInt(d):h}hexAttr(i,y,h=null){var d=this.attr(i,y);return d?parseInt(d,16):h}floatAttr(i,y,h=null){var d=this.attr(i,y);return d?parseFloat(d):h}boolAttr(i,y,h=null){return(0,s.convertBoolean)(this.attr(i,y),h)}lengthAttr(i,y,h=s.LengthUsage.Dxa){return(0,s.convertLength)(this.attr(i,y),h)}}e.XmlParser=m;const p=new m;e.default=p},287:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsPart=void 0;const s=r(530),m=r(846);class p extends s.Part{constructor(i,y){super(i,y)}parseXml(i){this.settings=(0,m.parseSettings)(i,this._package.xmlParser)}}e.SettingsPart=p},846:(v,e)=>{function r(s,m){var p={defaultNoteIds:[]};for(let n of m.elements(s))switch(n.localName){case"numFmt":p.nummeringFormat=m.attr(n,"val");break;case"footnote":case"endnote":p.defaultNoteIds.push(m.attr(n,"id"))}return p}Object.defineProperty(e,"__esModule",{value:!0}),e.parseNoteProperties=e.parseSettings=void 0,e.parseSettings=function(s,m){var p={};for(let n of m.elements(s))switch(n.localName){case"defaultTabStop":p.defaultTabStop=m.lengthAttr(n,"val");break;case"footnotePr":p.footnoteProps=r(n,m);break;case"endnotePr":p.endnoteProps=r(n,m);break;case"autoHyphenation":p.autoHyphenation=m.boolAttr(n,"val")}return p},e.parseNoteProperties=r},240:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StylesPart=void 0;const s=r(530);class m extends s.Part{constructor(n,i,y){super(n,i),this._documentParser=y}parseXml(n){this.styles=this._documentParser.parseStylesFile(n)}}e.StylesPart=m},893:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ThemePart=void 0;const s=r(530),m=r(55);class p extends s.Part{constructor(i,y){super(i,y)}parseXml(i){this.theme=(0,m.parseTheme)(i,this._package.xmlParser)}}e.ThemePart=p},55:(v,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseFontInfo=e.parseFontScheme=e.parseColorScheme=e.parseTheme=e.DmlTheme=void 0;class r{}function s(n,i){var y={name:i.attr(n,"name"),colors:{}};for(let f of i.elements(n)){var h=i.element(f,"srgbClr"),d=i.element(f,"sysClr");h?y.colors[f.localName]=i.attr(h,"val"):d&&(y.colors[f.localName]=i.attr(d,"lastClr"))}return y}function m(n,i){var y={name:i.attr(n,"name")};for(let h of i.elements(n))switch(h.localName){case"majorFont":y.majorFont=p(h,i);break;case"minorFont":y.minorFont=p(h,i)}return y}function p(n,i){return{latinTypeface:i.elementAttr(n,"latin","typeface"),eaTypeface:i.elementAttr(n,"ea","typeface"),csTypeface:i.elementAttr(n,"cs","typeface")}}e.DmlTheme=r,e.parseTheme=function(n,i){var y=new r,h=i.element(n,"themeElements");for(let d of i.elements(h))switch(d.localName){case"clrScheme":y.colorScheme=s(d,i);break;case"fontScheme":y.fontScheme=m(d,i)}return y},e.parseColorScheme=s,e.parseFontScheme=m,e.parseFontInfo=p},593:(v,e)=>{function r(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.defineProperty(e,"__esModule",{value:!0}),e.asArray=e.formatCssRules=e.parseCssRules=e.mergeDeep=e.isString=e.isObject=e.blobToBase64=e.keyBy=e.resolvePath=e.splitPath=e.escapeClassName=void 0,e.escapeClassName=function(s){return s==null?void 0:s.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()},e.splitPath=function(s){let m=s.lastIndexOf("/")+1;return[m==0?"":s.substring(0,m),m==0?s:s.substring(m)]},e.resolvePath=function(s,m){try{const p="http://docx/";return new URL(s,p+m).toString().substring(p.length)}catch(p){return`${m}${s}`}},e.keyBy=function(s,m){return s.reduce((p,n)=>(p[m(n)]=n,p),{})},e.blobToBase64=function(s){return new Promise((m,p)=>{const n=new FileReader;n.onloadend=()=>m(n.result),n.readAsDataURL(s)})},e.isObject=r,e.isString=function(s){return s&&typeof s=="string"||s instanceof String},e.mergeDeep=function s(m,...p){var n;if(!p.length)return m;const i=p.shift();if(r(m)&&r(i))for(const y in i)r(i[y])?s((n=m[y])!==null&&n!==void 0?n:m[y]={},i[y]):m[y]=i[y];return s(m,...p)},e.parseCssRules=function(s){const m={};for(const p of s.split(";")){const[n,i]=p.split(":");m[n]=i}return m},e.formatCssRules=function(s){return Object.entries(s).map((m,p)=>`${m}: ${p}`).join(";")},e.asArray=function(s){return Array.isArray(s)?s:[s]}},320:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseVmlElement=e.VmlElement=void 0;const s=r(149),m=r(120),p=r(472);class n{constructor(){this.type=m.DomType.VmlElement,this.attrs={},this.chidren=[]}}function i(h){var d;return{stroke:p.default.attr(h,"color"),"stroke-width":(d=p.default.lengthAttr(h,"weight",s.LengthUsage.Emu))!==null&&d!==void 0?d:"1px"}}function y(h){return h.split(",")}e.VmlElement=n,e.parseVmlElement=function h(d){var f=new n;switch(d.localName){case"rect":f.tagName="rect",Object.assign(f.attrs,{width:"100%",height:"100%"});break;case"oval":f.tagName="ellipse",Object.assign(f.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":f.tagName="line";break;case"shape":f.tagName="g";break;default:return null}for(const g of p.default.attrs(d))switch(g.localName){case"style":f.cssStyleText=g.value;break;case"fillcolor":f.attrs.fill=g.value;break;case"from":const[S,C]=y(g.value);Object.assign(f.attrs,{x1:S,y1:C});break;case"to":const[a,l]=y(g.value);Object.assign(f.attrs,{x2:a,y2:l})}for(const g of p.default.elements(d))switch(g.localName){case"stroke":Object.assign(f.attrs,i(g));break;case"fill":Object.assign(f.attrs,{});break;case"imagedata":f.tagName="image",Object.assign(f.attrs,{width:"100%",height:"100%"}),f.imageHref={id:p.default.attr(g,"id"),title:p.default.attr(g,"title")};break;default:const S=h(g);S&&f.chidren.push(S)}return f}},213:(v,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.deobfuscate=e.WordDocument=void 0;const s=r(461),m=r(380),p=r(522),n=r(448),i=r(593),y=r(527),h=r(240),d=r(985),f=r(665),g=r(162),S=r(893),C=r(735),a=r(287),l=r(177),t=[{type:s.RelationshipTypes.OfficeDocument,target:"word/document.xml"},{type:s.RelationshipTypes.ExtendedProperties,target:"docProps/app.xml"},{type:s.RelationshipTypes.CoreProperties,target:"docProps/core.xml"},{type:s.RelationshipTypes.CustomProperties,target:"docProps/custom.xml"}];class o{constructor(){this.parts=[],this.partsMap={}}static load(D,_,P){var u=new o;return u._options=P,u._parser=_,p.OpenXmlPackage.load(D,P).then(R=>(u._package=R,u._package.loadRelationships())).then(R=>{u.rels=R;const G=t.map(L=>{var q;const W=(q=R.find(Y=>Y.type===L.type))!==null&&q!==void 0?q:L;return u.loadRelationshipPart(W.target,W.type)});return Promise.all(G)}).then(()=>u)}save(D="blob"){return this._package.save(D)}loadRelationshipPart(D,_){if(this.partsMap[D])return Promise.resolve(this.partsMap[D]);if(!this._package.get(D))return Promise.resolve(null);let P=null;switch(_){case s.RelationshipTypes.OfficeDocument:this.documentPart=P=new n.DocumentPart(this._package,D,this._parser);break;case s.RelationshipTypes.FontTable:this.fontTablePart=P=new m.FontTablePart(this._package,D);break;case s.RelationshipTypes.Numbering:this.numberingPart=P=new y.NumberingPart(this._package,D,this._parser);break;case s.RelationshipTypes.Styles:this.stylesPart=P=new h.StylesPart(this._package,D,this._parser);break;case s.RelationshipTypes.Theme:this.themePart=P=new S.ThemePart(this._package,D);break;case s.RelationshipTypes.Footnotes:this.footnotesPart=P=new C.FootnotesPart(this._package,D,this._parser);break;case s.RelationshipTypes.Endnotes:this.endnotesPart=P=new C.EndnotesPart(this._package,D,this._parser);break;case s.RelationshipTypes.Footer:P=new d.FooterPart(this._package,D,this._parser);break;case s.RelationshipTypes.Header:P=new d.HeaderPart(this._package,D,this._parser);break;case s.RelationshipTypes.CoreProperties:this.corePropsPart=P=new g.CorePropsPart(this._package,D);break;case s.RelationshipTypes.ExtendedProperties:this.extendedPropsPart=P=new f.ExtendedPropsPart(this._package,D);break;case s.RelationshipTypes.CustomProperties:P=new l.CustomPropsPart(this._package,D);break;case s.RelationshipTypes.Settings:this.settingsPart=P=new a.SettingsPart(this._package,D)}return P==null?Promise.resolve(null):(this.partsMap[D]=P,this.parts.push(P),P.load().then(()=>{if(P.rels==null||P.rels.length==0)return P;const[u]=(0,i.splitPath)(P.path),R=P.rels.map(G=>this.loadRelationshipPart((0,i.resolvePath)(G.target,u),G.type));return Promise.all(R).then(()=>P)}))}loadDocumentImage(D,_){return this.loadResource(_!=null?_:this.documentPart,D,"blob").then(P=>this.blobToURL(P))}loadNumberingImage(D){return this.loadResource(this.numberingPart,D,"blob").then(_=>this.blobToURL(_))}loadFont(D,_){return this.loadResource(this.fontTablePart,D,"uint8array").then(P=>P&&this.blobToURL(new Blob([b(P,_)])))}blobToURL(D){return D?this._options.useBase64URL?(0,i.blobToBase64)(D):URL.createObjectURL(D):null}findPartByRelId(D,_=null){var P,u=((P=_.rels)!==null&&P!==void 0?P:this.rels).find(G=>G.id==D);const R=_?(0,i.splitPath)(_.path)[0]:"";return u?this.partsMap[(0,i.resolvePath)(u.target,R)]:null}getPathById(D,_){const P=D.rels.find(R=>R.id==_),[u]=(0,i.splitPath)(D.path);return P?(0,i.resolvePath)(P.target,u):null}loadResource(D,_,P){const u=this.getPathById(D,_);return u?this._package.load(u,P):Promise.resolve(null)}}function b(k,D){const _=D.replace(/{|}|-/g,""),P=new Array(16);for(let u=0;u<16;u++)P[16-u-1]=parseInt(_.substr(2*u,2),16);for(let u=0;u<32;u++)k[u]=k[u]^P[u%16];return k}e.WordDocument=o,e.deobfuscate=b},583:v=>{v.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 100%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27m0,75 l5,0 l5,25 l10,-100%27 stroke=%27black%27 fill=%27none%27 vector-effect=%27non-scaling-stroke%27/%3E%3C/svg%3E"},626:v=>{v.exports=T}},E={};function x(v){var e=E[v];if(e!==void 0)return e.exports;var r=E[v]={id:v,exports:{}};return M[v](r,r.exports,x),r.exports}return x.m=M,x.n=v=>{var e=v&&v.__esModule?()=>v.default:()=>v;return x.d(e,{a:e}),e},x.d=(v,e)=>{for(var r in e)x.o(e,r)&&!x.o(v,r)&&Object.defineProperty(v,r,{enumerable:!0,get:e[r]})},x.o=(v,e)=>Object.prototype.hasOwnProperty.call(v,e),x.r=v=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},x.b=document.baseURI||self.location.href,x(667)})())})(Ee);const je=Oe({name:"fileView"}),$e=Object.assign(je,{setup(fe){const pe=Fe(),T=Re();return ze(()=>Pe(this,null,function*(){const M=yield Ce(pe.query.id,!0);M.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||M.type==="application/msword"?Ee.exports.renderAsync(M,T.value):window.location.href=(yield Ce(pe.query.id)).url})),(M,E)=>(Me(),Ie("div",{ref_key:"fileRef",ref:T},null,512))}});export{$e as default};