From d8777915c1a9fa50e59724d3e5ed2ca5ac7a3224 Mon Sep 17 00:00:00 2001 From: Jodi Winters <github@kodikoscomputing.com> Date: Tue, 31 May 2016 17:05:51 +0100 Subject: [PATCH 1/4] Starting to have a stab at improvements --- _layouts/page.html | 24 ++++++++++++------------ javascripts-dev/src/ui.js | 12 +++++++----- js/lesson3/tutorial.md | 2 +- stylesheets/style.css | 4 ++++ 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/_layouts/page.html b/_layouts/page.html index ffb72ee9..db9e6a45 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -2,6 +2,7 @@ layout: default --- + <div> <article role="article"> {% if page.title %} @@ -9,6 +10,17 @@ <h1 class="entry-title">{{ page.title }}</h1> </header> {% endif %} + + {% if page.files %} + <a class="tutorial-filelist__heading" name="download-default">Files for example</a> + <ul class="tutorial-filelist__list"> + {% assign pageurl = page.url | split: '/' | pop: | join: '/' %} + {% for file in page.files %} + <li class="tutorial-filelist__file"><a href="{{ pageurl }}/{{ file }}">{{ pageurl }}/{{ file }}</a></li> + {% endfor %} + </ul> + {% endif %} + {{ content }} <footer> <a href='http://tutorials.codebar.io/'>Back to tutorials</a> @@ -20,15 +32,3 @@ <h1 class="entry-title">{{ page.title }}</h1> -{% if page.files %} -{% assign pageurl = page.url | split: '/' | pop: | join: '/' %} -{% capture files %}[{% for file in page.files %} - "{{ pageurl }}/{{ file }}"{% if forloop.last %}{% else %},{% endif %}{% endfor %} - ]{% endcapture %} -{% endif %} - -<script> - var Files = { - all : {{ files }} - } -</script> diff --git a/javascripts-dev/src/ui.js b/javascripts-dev/src/ui.js index b610a34a..82c34710 100644 --- a/javascripts-dev/src/ui.js +++ b/javascripts-dev/src/ui.js @@ -1,11 +1,11 @@ var UserInterface = { - selector: "a[href=download]" + selector: "a[href|=#download]" }; UserInterface.setup = function(zipper, downloader) { - var downloadLink = document.body.querySelector(UserInterface.selector); - + var downloadLinks = document.body.querySelector(UserInterface.selector); +console.log(downloadLinks); var createZip = function() { zipper.createZip(downloader); }; @@ -13,13 +13,15 @@ UserInterface.setup = function(zipper, downloader) { var registerListener = function(link) { link.addEventListener("click", function(event) { event.preventDefault(); +console.log('creating zip'); createZip(); }, false); }; var checkIfDownloadLinkExist = function() { - if (downloadLink) { - registerListener(downloadLink); + if (downloadLinks) { + for (each downloadLinks as linkIdx) + registerListener(downloadLinks[linkIdx]); } }; diff --git a/js/lesson3/tutorial.md b/js/lesson3/tutorial.md index addff59d..786d5d59 100644 --- a/js/lesson3/tutorial.md +++ b/js/lesson3/tutorial.md @@ -46,7 +46,7 @@ Using jQuery and JavaScript functions, we are going to build a small todo list. Download the files that you will need to work through the example -[here](download). +[here](#download-default). <!-- https://gist.github.com/despo/309f684b7a6e002aaf1f/download --> Alternatively, if you've already learned how to use git and would like diff --git a/stylesheets/style.css b/stylesheets/style.css index 61d75096..05549005 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -12,3 +12,7 @@ footer { min-width: 680px; margin: 0 auto; } + +.tutorial-filelist__list { + display: none; +} From 7bbf1f8eb3db6db2f9c6d449565bd73c89dc435a Mon Sep 17 00:00:00 2001 From: Jodi Winters <github@kodikoscomputing.com> Date: Fri, 3 Jun 2016 19:05:14 +0100 Subject: [PATCH 2/4] WIP: building up file list location --- javascripts-dev/src/ui.js | 50 +++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/javascripts-dev/src/ui.js b/javascripts-dev/src/ui.js index 82c34710..ac83f82b 100644 --- a/javascripts-dev/src/ui.js +++ b/javascripts-dev/src/ui.js @@ -1,16 +1,18 @@ var UserInterface = { - selector: "a[href|=#download]" + selector: 'a[href|="#download"]' }; UserInterface.setup = function(zipper, downloader) { - var downloadLinks = document.body.querySelector(UserInterface.selector); -console.log(downloadLinks); + var downloadLinks = document.body.querySelectorAll(UserInterface.selector); + var createZip = function() { zipper.createZip(downloader); }; var registerListener = function(link) { + console.log("adding listener to", link); + link.addEventListener("click", function(event) { event.preventDefault(); console.log('creating zip'); @@ -20,10 +22,48 @@ console.log('creating zip'); var checkIfDownloadLinkExist = function() { if (downloadLinks) { - for (each downloadLinks as linkIdx) - registerListener(downloadLinks[linkIdx]); + foreachSelector(downloadLinks, function() { + registerListener(this); + + hideAccessibleFileLinks(this); + }); } }; + var locateAnchorForDownloadLink = function(link) { + var anchorName = link.href.replace(/^[^#]*#/, ''); +console.log('looking for anchor', anchorName); + return document.body.querySelector('a[name="' + anchorName + '"') + } + + var hideAccessibleFileLinks = function(link) { + var anchor = locateAnchorForDownloadLink(link); +console.log('found anchor', anchor); + var next = getNextSiblingInDom(anchor); + console.log('found sibling', next); + }; + + function foreachSelector(nodelist, callback) { + for (var idx = 0; idx < nodelist.length; idx++) { + callback.apply(nodelist[idx]); + } + } + + function getNextSiblingInDom(element) { + var allChildrenOfParent = element.parentNode.children; + var nextSibling = false; + + foreachSelector(allChildrenOfParent, function() { + if (this === element) { + nextSibling = true; + } else { + if (nextSibling === true) { + nextSibling = this; + } + } + }); + return nextSibling; + } + checkIfDownloadLinkExist(); } From 8d02e283aee8cdb6ab44d60acba20f0005a870fb Mon Sep 17 00:00:00 2001 From: Jodi Winters <github@kodikoscomputing.com> Date: Sat, 4 Jun 2016 00:48:37 +0100 Subject: [PATCH 3/4] JS now supports accessible multiple downloads per page --- gulpfile.js | 1 + javascripts-dev/src/ui.js | 45 +++++++++++++++------------------- javascripts-dev/src/uitools.js | 32 ++++++++++++++++++++++++ javascripts-dev/src/zipper.js | 4 +-- stylesheets/style.css | 5 ++++ 5 files changed, 60 insertions(+), 27 deletions(-) create mode 100644 javascripts-dev/src/uitools.js diff --git a/gulpfile.js b/gulpfile.js index c237105c..56738b8e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,6 +11,7 @@ browsersync = require('browser-sync').create(), './javascripts-dev/vendor/FileSaver.js', './javascripts-dev/src/downloader.js', './javascripts-dev/src/zipper.js', + './javascripts-dev/src/uitools.js', './javascripts-dev/src/ui.js', './javascripts-dev/main.js', ], diff --git a/javascripts-dev/src/ui.js b/javascripts-dev/src/ui.js index ac83f82b..52c92dc4 100644 --- a/javascripts-dev/src/ui.js +++ b/javascripts-dev/src/ui.js @@ -6,8 +6,8 @@ UserInterface.setup = function(zipper, downloader) { var downloadLinks = document.body.querySelectorAll(UserInterface.selector); - var createZip = function() { - zipper.createZip(downloader); + var createZip = function(files) { + zipper.createZip(downloader, files); }; var registerListener = function(link) { @@ -15,14 +15,19 @@ UserInterface.setup = function(zipper, downloader) { link.addEventListener("click", function(event) { event.preventDefault(); + + // Get the file list on the fly + var files = getFileList(event.target); +console.log('files', files); + console.log('creating zip'); - createZip(); + createZip(files); }, false); }; var checkIfDownloadLinkExist = function() { if (downloadLinks) { - foreachSelector(downloadLinks, function() { + foreach(downloadLinks, function() { registerListener(this); hideAccessibleFileLinks(this); @@ -32,37 +37,27 @@ console.log('creating zip'); var locateAnchorForDownloadLink = function(link) { var anchorName = link.href.replace(/^[^#]*#/, ''); -console.log('looking for anchor', anchorName); return document.body.querySelector('a[name="' + anchorName + '"') } var hideAccessibleFileLinks = function(link) { var anchor = locateAnchorForDownloadLink(link); -console.log('found anchor', anchor); var next = getNextSiblingInDom(anchor); - console.log('found sibling', next); - }; - function foreachSelector(nodelist, callback) { - for (var idx = 0; idx < nodelist.length; idx++) { - callback.apply(nodelist[idx]); - } - } + addClass(anchor, 'hidden'); // could be made an expander button + addClass(next, 'hidden'); + }; - function getNextSiblingInDom(element) { - var allChildrenOfParent = element.parentNode.children; - var nextSibling = false; + var getFileList = function(link) { + var anchor = locateAnchorForDownloadLink(link); + var next = getNextSiblingInDom(anchor); - foreachSelector(allChildrenOfParent, function() { - if (this === element) { - nextSibling = true; - } else { - if (nextSibling === true) { - nextSibling = this; - } - } + var fileLinks = next.querySelectorAll('a'), + files = []; + foreach(fileLinks, function() { + files.push(this.href); }); - return nextSibling; + return files; } checkIfDownloadLinkExist(); diff --git a/javascripts-dev/src/uitools.js b/javascripts-dev/src/uitools.js new file mode 100644 index 00000000..00df724f --- /dev/null +++ b/javascripts-dev/src/uitools.js @@ -0,0 +1,32 @@ +function foreach(list, callback) { + for (var idx = 0; idx < list.length; idx++) { + if (callback.apply(list[idx]) === false) { + break; + } + } +} + +function getNextSiblingInDom(element) { + var allChildrenOfParent = element.parentNode.children, + nextSibling = false, + foundCurrent = false; + + foreach(allChildrenOfParent, function() { + if (this === element) { + foundCurrent = true; + } else { + if (foundCurrent === true) { + nextSibling = this; + return false; + } + } + }); + return nextSibling; +} + +function addClass(element, className) { + var classes = element.className.split(' '); + if (classes.indexOf(className) !== false) { + element.className += " " + className; + } +} \ No newline at end of file diff --git a/javascripts-dev/src/zipper.js b/javascripts-dev/src/zipper.js index 12ad3968..c6f4c7fa 100644 --- a/javascripts-dev/src/zipper.js +++ b/javascripts-dev/src/zipper.js @@ -2,10 +2,10 @@ var Zipper = { zip: new JSZip() }; -Zipper.createZip = function(downloader) { +Zipper.createZip = function(downloader, fileList) { var addFiles = function() { - Files.all.map(function(url) { + fileList.map(function(url) { var fileurl = url; var filename = fileurl.replace(/.*\//g, ""); Zipper.zip.file(filename, downloader.getFile(fileurl), {binary:true}); diff --git a/stylesheets/style.css b/stylesheets/style.css index 05549005..aca37678 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -16,3 +16,8 @@ footer { .tutorial-filelist__list { display: none; } + +.hidden { + display: none; + visibility: hidden; +} \ No newline at end of file From 594a2dab7c1ae6704ce6c8634eb6624677dbce67 Mon Sep 17 00:00:00 2001 From: Jodi Winters <github@kodikoscomputing.com> Date: Sun, 10 Jul 2016 16:22:43 +0100 Subject: [PATCH 4/4] Got mutliple zips basically working --- _layouts/page.html | 17 ++++++++++------- javascripts/downloader-bundle.js | 8 ++++---- js/lesson3/tutorial.md | 14 +++++++++----- stylesheets/style.css | 5 ++++- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/_layouts/page.html b/_layouts/page.html index db9e6a45..b02d00a1 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -12,13 +12,16 @@ <h1 class="entry-title">{{ page.title }}</h1> {% endif %} {% if page.files %} - <a class="tutorial-filelist__heading" name="download-default">Files for example</a> - <ul class="tutorial-filelist__list"> - {% assign pageurl = page.url | split: '/' | pop: | join: '/' %} - {% for file in page.files %} - <li class="tutorial-filelist__file"><a href="{{ pageurl }}/{{ file }}">{{ pageurl }}/{{ file }}</a></li> - {% endfor %} - </ul> + {% for zip in page.files %} + <a class="tutorial-filelist__heading" name="download-{{zip.zipname}}">Files for {{zip.zipname}}</a> + <ul class="tutorial-filelist__list compact-list"> + {% assign pageurl = page.url | split: '/' | pop: | join: '/' %} + {% assign files = zip.files %} + {% for file in files %} + <li class="tutorial-filelist__file"><a href="{{ pageurl }}/{{ file }}">{{ pageurl }}/{{ file }}</a></li> + {% endfor %} + </ul> + {% endfor %} {% endif %} {{ content }} diff --git a/javascripts/downloader-bundle.js b/javascripts/downloader-bundle.js index 56a0bb05..9ccdf0b2 100644 --- a/javascripts/downloader-bundle.js +++ b/javascripts/downloader-bundle.js @@ -1,5 +1,5 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.JSZip=t()}}(function(){var t;return function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,o,u,h,l=[],f=0,c=t.length,d=c,p="string"!==n.getTypeOf(t);f<t.length;)d=c-f,p?(e=t[f++],r=c>f?t[f++]:0,i=c>f?t[f++]:0):(e=t.charCodeAt(f++),r=c>f?t.charCodeAt(f++):0,i=c>f?t.charCodeAt(f++):0),s=e>>2,o=(3&e)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,h=d>2?63&i:64,l.push(a.charAt(s)+a.charAt(o)+a.charAt(u)+a.charAt(h));return l.join("")},r.decode=function(t){var e,r,n,s,o,u,h,l=0,f=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");var c=3*t.length/4;t.charAt(t.length-1)===a.charAt(64)&&c--,t.charAt(t.length-2)===a.charAt(64)&&c--;var d;for(d=i.uint8array?new Uint8Array(c):new Array(c);l<t.length;)s=a.indexOf(t.charAt(l++)),o=a.indexOf(t.charAt(l++)),u=a.indexOf(t.charAt(l++)),h=a.indexOf(t.charAt(l++)),e=s<<2|o>>4,r=(15&o)<<4|u>>2,n=(3&u)<<6|h,d[f++]=e,64!==u&&(d[f++]=r),64!==h&&(d[f++]=n);return d}},{"./support":27,"./utils":29}],2:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}var i=t("./external"),a=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");n.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=n},{"./external":6,"./stream/Crc32Probe":22,"./stream/DataLengthProbe":23,"./stream/DataWorker":24}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\x00\x00",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":25}],4:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e[s])];return-1^t}function a(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e.charCodeAt(s))];return-1^t}var s=t("./utils"),o=n();e.exports=function(t,e){if("undefined"==typeof t||!t.length)return 0;var r="string"!==s.getTypeOf(t);return r?i(0|e,t,t.length,0):a(0|e,t,t.length,0)}},{"./utils":29}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n=t("es6-promise").Promise;e.exports={Promise:n}},{"es6-promise":37}],7:[function(t,e,r){"use strict";function n(t,e){o.call(this,"FlateWorker/"+t),this._pako=new a[t]({raw:!0,level:e.level||-1}),this.meta={};var r=this;this._pako.onData=function(t){r.push({data:t,meta:r.meta})}}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),u=i?"uint8array":"array";r.magic="\b\x00",s.inherits(n,o),n.prototype.processChunk=function(t){this.meta=t.meta,this._pako.push(s.transformTo(u,t.data),!1)},n.prototype.flush=function(){o.prototype.flush.call(this),this._pako.push([],!0)},n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},r.compressWorker=function(t){return new n("Deflate",t)},r.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":25,"./utils":29,pako:38}],8:[function(t,e,r){"use strict";function n(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),o=t("../crc32"),u=t("../signature"),h=function(t,e){var r,n="";for(r=0;e>r;r++)n+=String.fromCharCode(255&t),t>>>=8;return n},l=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16},f=function(t,e){return 63&(t||0)},c=function(t,e,r,n,a,c){var d,p,m=t.file,_=t.compression,g=c!==s.utf8encode,v=i.transformTo("string",c(m.name)),w=i.transformTo("string",s.utf8encode(m.name)),b=m.comment,y=i.transformTo("string",c(b)),k=i.transformTo("string",s.utf8encode(b)),x=w.length!==m.name.length,S=k.length!==b.length,z="",A="",E="",C=m.dir,I=m.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var T=0;e&&(T|=8),g||!x&&!S||(T|=2048);var B=0,R=0;C&&(B|=16),"UNIX"===a?(R=798,B|=l(m.unixPermissions,C)):(R=20,B|=f(m.dosPermissions,C)),d=I.getUTCHours(),d<<=6,d|=I.getUTCMinutes(),d<<=5,d|=I.getUTCSeconds()/2,p=I.getUTCFullYear()-1980,p<<=4,p|=I.getUTCMonth()+1,p<<=5,p|=I.getUTCDate(),x&&(A=h(1,1)+h(o(v),4)+w,z+="up"+h(A.length,2)+A),S&&(E=h(1,1)+h(o(y),4)+k,z+="uc"+h(E.length,2)+E);var D="";D+="\n\x00",D+=h(T,2),D+=_.magic,D+=h(d,2),D+=h(p,2),D+=h(O.crc32,4),D+=h(O.compressedSize,4),D+=h(O.uncompressedSize,4),D+=h(v.length,2),D+=h(z.length,2);var F=u.LOCAL_FILE_HEADER+D+v+z,N=u.CENTRAL_FILE_HEADER+h(R,2)+D+h(y.length,2)+"\x00\x00\x00\x00"+h(B,4)+h(n,4)+v+z+y;return{fileRecord:F,dirRecord:N}},d=function(t,e,r,n,a){var s="",o=i.transformTo("string",a(n));return s=u.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+h(t,2)+h(t,2)+h(e,4)+h(r,4)+h(o.length,2)+o},p=function(t){var e="";return e=u.DATA_DESCRIPTOR+h(t.crc32,4)+h(t.compressedSize,4)+h(t.uncompressedSize,4)};i.inherits(n,a),n.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},n.prototype.openedSource=function(t){if(this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name,this.streamFiles&&!t.file.dir){var e=c(t,this.streamFiles,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(t){this.accumulate=!1;var e=c(t,this.streamFiles,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),this.streamFiles&&!t.file.dir)this.push({data:p(t),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,n=d(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:n,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(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},n.prototype.resume=function(){return a.prototype.resume.call(this)?!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0):!1},n.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},n.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=n},{"../crc32":4,"../signature":20,"../stream/GenericWorker":25,"../utf8":28,"../utils":29}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker"),a=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};r.generateWorker=function(t,e,r){var n=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach(function(t,r){s++;var i=a(r.options.compression,e.compression),o=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,h=r.date;r._compressWorker(i,o).withStreamInfo("file",{name:t,dir:u,date:h,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(n)}),n.entriesCount=s}catch(o){n.error(o)}return n}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}n.prototype=t("./object"),n.prototype.loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":13,"./support":27}],11:[function(t,e,r){"use strict";function n(t){return new a.Promise(function(e,r){var n=t.decompressed.getContentWorker().pipe(new u);n.on("error",function(t){r(t)}).on("end",function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}var i=t("./utils"),a=t("./external"),s=t("./utf8"),i=t("./utils"),o=t("./zipEntries"),u=t("./stream/Crc32Probe"),h=t("./nodejsUtils");e.exports=function(t,e){var r=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),h.isNode&&h.isStream(t)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var r=new o(e);return r.load(t),r}).then(function(t){var r=[a.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var s=0;s<i.length;s++)r.push(n(i[s]));return a.Promise.all(r)}).then(function(t){for(var n=t.shift(),i=n.files,a=0;a<i.length;a++){var s=i[a];r.file(s.fileNameStr,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:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r})}},{"./external":6,"./nodejsUtils":12,"./stream/Crc32Probe":22,"./utf8":28,"./utils":29,"./zipEntries":30}],12:[function(t,e,r){(function(t){"use strict";e.exports={isNode:"undefined"!=typeof t,newBuffer:function(e,r){return new t(e,r)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],13:[function(t,e,r){"use strict";function n(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var i=t("./utf8"),a=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),u=t("./defaults"),h=t("./compressedObject"),l=t("./zipObject"),f=t("./generate"),c=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),p=function(t,e,r){var n,i=a.getTypeOf(e);r=a.extend(r||{},u),r.date=r.date||new Date,null!==r.compression&&(r.compression=r.compression.toUpperCase()),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(t=_(t)),r.createFolders&&(n=m(t))&&g.call(this,n,!0);var o="string"===i&&r.binary===!1&&r.base64===!1;r.binary=!o;var f=e instanceof h&&0===e.uncompressedSize;(f||r.dir||!e||0===e.length)&&(r.base64=!1,r.binary=!0,e="",r.compression="STORE",i="string");var p=null;p=e instanceof h||e instanceof s?e:c.isNode&&c.isStream(e)?new d(t,e):a.prepareContent(t,e,r.binary,r.optimizedBinaryString,r.base64);var v=new l(t,p,r);this.files[t]=v},m=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},_=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e="undefined"!=typeof e?e:u.createFolders,t=_(t),this.files[t]||p.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]},v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],r=e.slice(this.root.length,e.length),r&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach(function(r,n){t(r,n)&&e.push(n)}),e},file:function(t,e,r){if(1===arguments.length){if(n(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var a=this.files[this.root+t];return a&&!a.dir?a:null}return t=this.root+t,p.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(n(t))return this.filter(function(e,r){return r.dir&&t.test(e)});var e=this.root+t,r=g.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(e,r){return r.name.slice(0,t.length)===t}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if(r=a.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");a.checkSupport(r.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(u){e=new s("error"),e.error(u)}return new o(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return t=t||{},t.type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":35,"./nodejsUtils":12,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28,"./utils":29,"./zipObject":32}],14:[function(t,e,r){"use strict";function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===e&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.readData(4);return e===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],15:[function(t,e,r){"use strict";function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}var i=t("../utils");n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||0>t)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":29}],16:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./Uint8ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./Uint8ArrayReader":18}],17:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){var e=this.readData(4);return t===e},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],18:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./ArrayReader":14}],19:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new u(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new s(t)}},{"../support":27,"../utils":29,"./ArrayReader":14,"./NodeBufferReader":16,"./StringReader":17,"./Uint8ArrayReader":18}],20:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],21:[function(t,e,r){"use strict";function n(t){i.call(this,"ConvertWorker to "+t),this.destType=t}var i=t("./GenericWorker"),a=t("../utils");a.inherits(n,i),n.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=n},{"../utils":29,"./GenericWorker":25}],22:[function(t,e,r){"use strict";function n(){i.call(this,"Crc32Probe")}var i=t("./GenericWorker"),a=t("../crc32"),s=t("../utils");s.inherits(n,i),n.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=n},{"../crc32":4,"../utils":29,"./GenericWorker":25}],23:[function(t,e,r){"use strict";function n(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}var i=t("../utils"),a=t("./GenericWorker");i.inherits(n,a),n.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}a.prototype.processChunk.call(this,t)},e.exports=n},{"../utils":29,"./GenericWorker":25}],24:[function(t,e,r){"use strict";function n(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}var i=t("../utils"),a=t("./GenericWorker"),s=16384;i.inherits(n,a),n.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return a.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0):!1},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=s,e=null,r=Math.min(this.max,this.index+t);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,r);break;case"uint8array":e=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":e=this.data.slice(this.index,r)}return this.index=r,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":29,"./GenericWorker":25}],25:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return this.isFinished?!1:(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],26:[function(t,e,r){(function(r){"use strict";function n(t,e,r){switch(t){case"blob":return o.newBlob(o.transformTo("arraybuffer",e),r);case"base64":return l.encode(e);default:return o.transformTo(t,e)}}function i(t,e){var n,i=0,a=null,s=0;for(n=0;n<e.length;n++)s+=e[n].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(a=new Uint8Array(s),n=0;n<e.length;n++)a.set(e[n],i),i+=e[n].length;return a;case"nodebuffer":return r.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}function a(t,e){return new c.Promise(function(r,a){var s=[],o=t._internalType,u=t._outputType,h=t._mimeType;t.on("data",function(t,r){s.push(t),e&&e(r)}).on("error",function(t){s=[],a(t)}).on("end",function(){try{var t=n(u,i(o,s),h);r(t)}catch(e){a(e)}s=[]}).resume()})}function s(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,o.checkSupport(n),this._worker=t.pipe(new u(n)),t.lock()}catch(i){this._worker=new h("error"),this._worker.error(i)}}var o=t("../utils"),u=t("./ConvertWorker"),h=t("./GenericWorker"),l=t("../base64"),f=t("../nodejs/NodejsStreamOutputAdapter"),c=t("../external");s.prototype={accumulate:function(t){return a(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta)}):this._worker.on(t,function(){o.delay(e,arguments,r)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(o.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=s}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":35,"../utils":29,"./ConvertWorker":21,"./GenericWorker":25}],27:[function(t,e,r){(function(e){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof e,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(i){try{var a=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new a;s.append(n),r.blob=0===s.getBlob("application/zip").size}catch(i){r.blob=!1}}}r.nodestream=!!t("./nodejs/NodejsStreamOutputAdapter").prototype}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"./nodejs/NodejsStreamOutputAdapter":35}],28:[function(t,e,r){"use strict";function n(){u.call(this,"utf-8 decode"),this.leftOver=null}function i(){u.call(this,"utf-8 encode")}for(var a=t("./utils"),s=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),h=new Array(256),l=0;256>l;l++)h[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;h[254]=h[254]=1;var f=function(t){var e,r,n,i,a,o=t.length,u=0;for(i=0;o>i;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=s.uint8array?new Uint8Array(u):new Array(u),a=0,i=0;u>a;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),128>r?e[a++]=r:2048>r?(e[a++]=192|r>>>6,e[a++]=128|63&r):65536>r?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},c=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+h[t[r]]>e?r:e},d=function(t){var e,r,n,i,s=t.length,o=new Array(2*s);for(r=0,e=0;s>e;)if(n=t[e++],128>n)o[r++]=n;else if(i=h[n],i>4)o[r++]=65533,e+=i-1;else{for(n&=2===i?31:3===i?15:7;i>1&&s>e;)n=n<<6|63&t[e++],i--;i>1?o[r++]=65533:65536>n?o[r++]=n:(n-=65536,o[r++]=55296|n>>10&1023,o[r++]=56320|1023&n)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),a.applyFromCharCode(o)};r.utf8encode=function(t){return s.nodebuffer?o.newBuffer(t,"utf-8"):f(t)},r.utf8decode=function(t){return s.nodebuffer?a.transformTo("nodebuffer",t).toString("utf-8"):(t=a.transformTo(s.uint8array?"uint8array":"array",t),d(t))},a.inherits(n,u),n.prototype.processChunk=function(t){var e=a.transformTo(s.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var n=e;e=new Uint8Array(n.length+this.leftOver.length),e.set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=c(e),o=e;i!==e.length&&(s.uint8array?(o=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(o=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:r.utf8decode(o),meta:t.meta})},n.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=n,a.inherits(i,u),i.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=i},{"./nodejsUtils":12,"./stream/GenericWorker":25,"./support":27,"./utils":29}],29:[function(t,e,r){"use strict";function n(t){var e=null;return e=u.uint8array?new Uint8Array(t.length):new Array(t.length),a(t,e)}function i(t){return t}function a(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}function s(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=d.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=d.applyCanBeUsed.nodebuffer),i)for(;e>1;)try{return d.stringifyByChunk(t,n,e)}catch(a){e=Math.floor(e/2)}return d.stringifyByChar(t)}function o(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}var u=t("./support"),h=t("./base64"),l=t("./nodejsUtils"),f=t("asap"),c=t("./external");r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(n){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,a=new i;return a.append(t),a.getBlob(e)}catch(n){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(t,e,r){var n=[],i=0,a=t.length;if(r>=a)return String.fromCharCode.apply(null,t);for(;a>i;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,a)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,a)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&1===String.fromCharCode.apply(null,l.newBuffer(1)).length}catch(t){return!1}}()}};r.applyFromCharCode=s;var p={};p.string={string:i,array:function(t){return a(t,new Array(t.length))},arraybuffer:function(t){return p.string.uint8array(t).buffer},uint8array:function(t){return a(t,new Uint8Array(t.length))},nodebuffer:function(t){return a(t,l.newBuffer(t.length))}},p.array={string:s,array:i,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return l.newBuffer(t)}},p.arraybuffer={string:function(t){return s(new Uint8Array(t)); -},array:function(t){return o(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:i,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return l.newBuffer(new Uint8Array(t))}},p.uint8array={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:i,nodebuffer:function(t){return l.newBuffer(t)}},p.nodebuffer={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return p.nodebuffer.uint8array(t).buffer},uint8array:function(t){return o(t,new Uint8Array(t.length))},nodebuffer:i},r.transformTo=function(t,e){if(e||(e=""),!t)return e;r.checkSupport(t);var n=r.getTypeOf(e),i=p[n][t](e);return i},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":u.nodebuffer&&l.isBuffer(t)?"nodebuffer":u.uint8array&&t instanceof Uint8Array?"uint8array":u.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){var e=u[t.toLowerCase()];if(!e)throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)e=t.charCodeAt(r),n+="\\x"+(16>e?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){f(function(){t.apply(r||null,e||[])})},r.inherits=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&"undefined"==typeof r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,i,a,s){var o=null;return o=u.blob&&e instanceof Blob&&"undefined"!=typeof FileReader?new c.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(e)}):c.Promise.resolve(e),o.then(function(e){var o=r.getTypeOf(e);return o?("arraybuffer"===o?e=r.transformTo("uint8array",e):"string"===o&&(s?e=h.decode(e):i&&a!==!0&&(e=n(e))),e):c.Promise.reject(new Error("The data of '"+t+"' is in an unsupported format !"))})}},{"./base64":1,"./external":6,"./nodejsUtils":12,"./support":27,asap:33}],30:[function(t,e,r){"use strict";function n(t){this.files=[],this.loadOptions=t}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./signature"),o=t("./zipEntry"),u=(t("./utf8"),t("./support"));n.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug : unexpected signature ("+a.pretty(e)+", expected "+a.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4),i=n===e;return this.reader.setIndex(r),i},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 t=this.reader.readData(this.zipCommentLength),e=u.uint8array?"uint8array":"array",r=a.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},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 t,e,r,n=this.zip64EndOfCentralSize-44,i=0;n>i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)t=new o({zip64:this.zip64},this.loadOptions),t.readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(0>t){var e=!this.isSignature(0,s.LOCAL_FILE_HEADER);throw e?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(t);var r=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>t)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=r-n;if(i>0)this.isSignature(r,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(0>i)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=n},{"./reader/readerFor":19,"./signature":20,"./support":27,"./utf8":28,"./utils":29,"./zipEntry":31}],31:[function(t,e,r){"use strict";function n(t,e){this.options=t,this.loadOptions=e}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),u=t("./utf8"),h=t("./compressions"),l=t("./support"),f=0,c=3,d=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null};n.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(e=d(this.compressionMethod),null===e)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),t===f&&(this.dosPermissions=63&this.externalFileAttributes),t===c&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n}},handleUTF8:function(){var t=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=a.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=a.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileName)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileComment)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null}},e.exports=n},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":19,"./support":27,"./utf8":28,"./utils":29}],32:[function(t,e,r){"use strict";var n=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),a=t("./utf8"),s=t("./compressedObject"),o=t("./stream/GenericWorker"),u=function(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};u.prototype={internalStream:function(t){var e=t.toLowerCase(),r="string"===e||"text"===e;"binarystring"!==e&&"text"!==e||(e="string");var i=this._decompressWorker(),s=!this._dataBinary;return s&&!r&&(i=i.pipe(new a.Utf8EncodeWorker)),!s&&r&&(i=i.pipe(new a.Utf8DecodeWorker)),new n(i,e,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof s&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof o?this._data:new i(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<h.length;f++)u.prototype[h[f]]=l;e.exports=u},{"./compressedObject":2,"./stream/DataWorker":24,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28}],33:[function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=o.length?o.pop():new a,e.task=t,s(e)}function a(){this.task=null}var s=t("./raw"),o=[],u=[],h=s.makeRequestCallFromTimer(n);e.exports=i,a.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),h())}finally{this.task=null,o[o.length]=this}}},{"./raw":34}],34:[function(t,e,r){(function(t){"use strict";function r(t){o.length||(s(),u=!0),o[o.length]=t}function n(){for(;h<o.length;){var t=h;if(h+=1,o[t].call(),h>l){for(var e=0,r=o.length-h;r>e;e++)o[e]=o[e+h];o.length-=h,h=0}}o.length=0,h=0,u=!1}function i(t){var e=1,r=new f(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function a(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}e.exports=r;var s,o=[],u=!1,h=0,l=1024,f=t.MutationObserver||t.WebKitMutationObserver;s="function"==typeof f?i(n):a(n),r.requestFlush=s,r.makeRequestCallFromTimer=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(t,e,r){},{}],36:[function(t,e,r){function n(){l=!1,o.length?h=o.concat(h):f=-1,h.length&&i()}function i(){if(!l){var t=setTimeout(n);l=!0;for(var e=h.length;e;){for(o=h,h=[];++f<e;)o&&o[f].run();f=-1,e=h.length}o=null,l=!1,clearTimeout(t)}}function a(t,e){this.fun=t,this.array=e}function s(){}var o,u=e.exports={},h=[],l=!1,f=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new a(t,e)),1!==h.length||l||setTimeout(i,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],37:[function(e,r,n){(function(n,i){(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){X=t}function h(t){J=t}function l(){return function(){n.nextTick(m)}}function f(){return function(){G(m)}}function c(){var t=0,e=new $(m),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=m,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(m,1)}}function m(){for(var t=0;q>t;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}q=0}function _(){try{var t=e,r=t("vertx");return G=r.runOnLoop||r.runOnContext,f()}catch(n){return p()}}function g(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function b(t){try{return t.then}catch(e){return st.error=e,st}}function y(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function k(t,e,r){J(function(t){var n=!1,i=y(r,e,function(r){n||(n=!0,e!==r?z(t,r):E(t,r))},function(e){n||(n=!0,C(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,C(t,i))},t)}function x(t,e){e._state===it?E(t,e._result):e._state===at?C(t,e._result):I(e,void 0,function(e){z(t,e)},function(e){C(t,e)})}function S(t,e){if(e.constructor===t.constructor)x(t,e);else{var r=b(e);r===st?C(t,st.error):void 0===r?E(t,e):s(r)?k(t,e,r):E(t,e)}}function z(t,e){t===e?C(t,v()):a(e)?S(t,e):E(t,e)}function A(t){t._onerror&&t._onerror(t._result),O(t)}function E(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&J(O,t))}function C(t,e){t._state===nt&&(t._state=at,t._result=e,J(A,t))}function I(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+it]=r,i[a+at]=n,0===a&&t._state&&J(O,t)}function O(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,a=t._result,s=0;s<e.length;s+=3)n=e[s],i=e[s+r],n?R(r,n,i,a):i(a);t._subscribers.length=0}}function T(){this.error=null}function B(t,e){try{return t(e)}catch(r){return ot.error=r,ot}}function R(t,e,r,n){var i,a,o,u,h=s(r);if(h){if(i=B(r,n),i===ot?(u=!0,a=i.error,i=null):o=!0,e===i)return void C(e,w())}else i=n,o=!0;e._state!==nt||(h&&o?z(e,i):u?C(e,a):t===it?E(e,i):t===at&&C(e,i))}function D(t,e){try{e(function(e){z(t,e)},function(e){C(t,e)})}catch(r){C(t,r)}}function F(t,e){var r=this;r._instanceConstructor=t,r.promise=new t(g),r._validateInput(e)?(r._input=e,r.length=e.length,r._remaining=e.length,r._init(),0===r.length?E(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&E(r.promise,r._result))):C(r.promise,r._validationError())}function N(t){return new ut(this,t).promise}function U(t){function e(t){z(i,t)}function r(t){C(i,t)}var n=this,i=new n(g);if(!K(t))return C(i,new TypeError("You must pass an array to race.")),i;for(var a=t.length,s=0;i._state===nt&&a>s;s++)I(n.resolve(t[s]),void 0,e,r);return i}function L(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(g);return z(r,t),r}function P(t){var e=this,r=new e(g);return C(r,t),r}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==t&&(s(t)||Z(),this instanceof j||W(),D(this,t))}function M(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(t.Promise=pt)}var H;H=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G,X,Y,K=H,q=0,J=({}.toString,function(t,e){rt[q]=t,rt[q+1]=e,q+=2,2===q&&(X?X(m):Y())}),V="undefined"!=typeof window?window:void 0,Q=V||{},$=Q.MutationObserver||Q.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);Y=tt?l():$?c():et?d():void 0===V&&"function"==typeof e?_():p();var nt=void 0,it=1,at=2,st=new T,ot=new T;F.prototype._validateInput=function(t){return K(t)},F.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var ut=F;F.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},F.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;o(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},F.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===at?C(i,r):n._result[e]=r),0===n._remaining&&E(i,n._result)},F.prototype._willSettleAt=function(t,e){var r=this;I(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(at,e,t)})};var ht=N,lt=U,ft=L,ct=P,dt=0,pt=j;j.all=ht,j.race=lt,j.resolve=ft,j.reject=ct,j._setScheduler=u,j._setAsap=h,j._asap=J,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===at&&!e)return this;var i=new this.constructor(g),a=r._result;if(n){var s=arguments[n-1];J(function(){R(n,i,s,a)})}else I(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var mt=M,_t={Promise:pt,polyfill:mt};"function"==typeof t&&t.amd?t(function(){return _t}):"undefined"!=typeof r&&r.exports?r.exports=_t:"undefined"!=typeof this&&(this.ES6Promise=_t),mt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:36}],38:[function(t,e,r){"use strict";var n=t("./lib/utils/common").assign,i=t("./lib/deflate"),a=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};n(o,i,a,s),e.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=u.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==m)throw new Error(l[r]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=o.deflateSetDictionary(this.strm,i),r!==m)throw new Error(l[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}function s(t,e){return e=e||{},e.gzip=!0,i(t,e)}var o=t("./zlib/deflate"),u=t("./utils/common"),h=t("./utils/strings"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=Object.prototype.toString,d=0,p=4,m=0,_=1,g=2,v=-1,w=0,b=8;n.prototype.push=function(t,e){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?p:d,"string"==typeof t?i.input=h.string2buf(t):"[object ArrayBuffer]"===c.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new u.Buf8(a),i.next_out=0,i.avail_out=a),r=o.deflate(i,n),r!==_&&r!==m)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||n!==p&&n!==g)||("string"===this.options.to?this.onData(h.buf2binstring(u.shrinkBuf(i.output,i.next_out))):this.onData(u.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==_);return n===p?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m):n===g?(this.onEnd(m),i.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===m&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=a,r.gzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=s.inflateInit2(this.strm,e.windowBits);if(r!==h.Z_OK)throw new Error(l[r]);this.header=new c,s.inflateGetHeader(this.strm,this.header)}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}var s=t("./zlib/inflate"),o=t("./utils/common"),u=t("./utils/strings"),h=t("./zlib/constants"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=t("./zlib/gzheader"),d=Object.prototype.toString;n.prototype.push=function(t,e){var r,n,i,a,l,f,c=this.strm,p=this.options.chunkSize,m=this.options.dictionary,_=!1;if(this.ended)return!1;n=e===~~e?e:e===!0?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof t?c.input=u.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new o.Buf8(p),c.next_out=0,c.avail_out=p),r=s.inflate(c,h.Z_NO_FLUSH),r===h.Z_NEED_DICT&&m&&(f="string"==typeof m?u.string2buf(m):"[object ArrayBuffer]"===d.call(m)?new Uint8Array(m):m,r=s.inflateSetDictionary(this.strm,f)),r===h.Z_BUF_ERROR&&_===!0&&(r=h.Z_OK,_=!1),r!==h.Z_STREAM_END&&r!==h.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==h.Z_STREAM_END&&(0!==c.avail_in||n!==h.Z_FINISH&&n!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(c.output,c.next_out),a=c.next_out-i,l=u.buf2string(c.output,i),c.next_out=a,c.avail_out=p-a,a&&o.arraySet(c.output,c.output,i,a,0),this.onData(l)):this.onData(o.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(_=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==h.Z_STREAM_END);return r===h.Z_STREAM_END&&(n=h.Z_FINISH),n===h.Z_FINISH?(r=s.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h.Z_OK):n===h.Z_SYNC_FLUSH?(this.onEnd(h.Z_OK),c.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=n,r.inflate=i,r.inflateRaw=a,r.ungzip=i},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,s;for(n=0,e=0,r=t.length;r>e;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;r>e;e++)a=t[e],s.set(a,i),i+=a.length;return s}},a={arraySet:function(t,e,r,n,i){for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",n=0;e>n;n++)r+=String.fromCharCode(t[n]);return r}var i=t("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var u=new i.Buf8(256),h=0;256>h;h++)u[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;u[254]=u[254]=1,r.string2buf=function(t){var e,r,n,a,s,o=t.length,u=0;for(a=0;o>a;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=new i.Buf8(u),s=0,a=0;u>s;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),128>r?e[s++]=r:2048>r?(e[s++]=192|r>>>6,e[s++]=128|63&r):65536>r?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;n>r;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,a,s,o=e||t.length,h=new Array(2*o);for(i=0,r=0;o>r;)if(a=t[r++],128>a)h[i++]=a;else if(s=u[a],s>4)h[i++]=65533,r+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&o>r;)a=a<<6|63&t[r++],s--;s>1?h[i++]=65533:65536>a?h[i++]=a:(a-=65536,h[i++]=55296|a>>10&1023,h[i++]=56320|1023&a)}return n(h,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}e.exports=n},{}],44:[function(t,e,r){"use strict";e.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,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=a,s=n+r;t^=-1;for(var o=n;s>o;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}var a=n();e.exports=i},{}],46:[function(t,e,r){"use strict";function n(t,e){return t.msg=D[e],e}function i(t){return(t<<1)-(t>4?9:0)}function a(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(O.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function o(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function l(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,O.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=B(t.adler,e,i,r):2===t.state.wrap&&(t.adler=R(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function f(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-ft?t.strstart-(t.w_size-ft):0,h=t.window,l=t.w_mask,f=t.prev,c=t.strstart+lt,d=h[a+s-1],p=h[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,h[r+s]===p&&h[r+s-1]===d&&h[r]===h[a]&&h[++r]===h[a+1]){a+=2,r++;do;while(h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&c>a);if(n=lt-(c-a),a=c-lt,n>s){if(t.match_start=e,s=n,n>=o)break;d=h[a+s-1],p=h[a+s]}}while((e=f[e&l])>u&&0!==--i);return s<=t.lookahead?s:t.lookahead}function c(t){var e,r,n,i,a,s=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ft)){O.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,r=t.hash_size,e=r;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--r);r=s,e=r;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--r);i+=s}if(0===t.strm.avail_in)break;if(r=l(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=ht)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+ht-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--, -!(t.lookahead+t.insert<ht)););}while(t.lookahead<ft&&0!==t.strm.avail_in)}function d(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(c(t),0===t.lookahead&&e===F)return bt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,o(t,!1),0===t.strm.avail_out))return bt;if(t.strstart-t.block_start>=t.w_size-ft&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?bt:bt}function p(t,e){for(var r,n;;){if(t.lookahead<ft){if(c(t),t.lookahead<ft&&e===F)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ht&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r)),t.match_length>=ht)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-ht),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ht){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=t.strstart<ht-1?t.strstart:ht-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function m(t,e){for(var r,n,i;;){if(t.lookahead<ft){if(c(t),t.lookahead<ft&&e===F)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ht&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ht-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r),t.match_length<=5&&(t.strategy===X||t.match_length===ht&&t.strstart-t.match_start>4096)&&(t.match_length=ht-1)),t.prev_length>=ht&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ht,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ht),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!==--t.prev_length);if(t.match_available=0,t.match_length=ht-1,t.strstart++,n&&(o(t,!1),0===t.strm.avail_out))return bt}else if(t.match_available){if(n=T._tr_tally(t,0,t.window[t.strstart-1]),n&&o(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return bt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=T._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ht-1?t.strstart:ht-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function _(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=lt){if(c(t),t.lookahead<=lt&&e===F)return bt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=ht&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+lt;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&a>i);t.match_length=lt-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ht?(r=T._tr_tally(t,1,t.match_length-ht),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function g(t,e){for(var r;;){if(0===t.lookahead&&(c(t),0===t.lookahead)){if(e===F)return bt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function v(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function w(t){t.window_size=2*t.w_size,a(t.head),t.max_lazy_match=I[t.level].max_lazy,t.good_match=I[t.level].good_length,t.nice_match=I[t.level].nice_length,t.max_chain_length=I[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ht-1,t.match_available=0,t.ins_h=0}function b(){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=Q,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 O.Buf16(2*ot),this.dyn_dtree=new O.Buf16(2*(2*at+1)),this.bl_tree=new O.Buf16(2*(2*st+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new O.Buf16(ut+1),this.heap=new O.Buf16(2*it+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new O.Buf16(2*it+1),a(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 y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=V,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?dt:vt,t.adler=2===e.wrap?0:1,e.last_flush=F,T._tr_init(e),Z):n(t,j)}function k(t){var e=y(t);return e===Z&&w(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?j:(t.state.gzhead=e,Z):j}function S(t,e,r,i,a,s){if(!t)return j;var o=1;if(e===G&&(e=6),0>i?(o=0,i=-i):i>15&&(o=2,i-=16),1>a||a>$||r!==Q||8>i||i>15||0>e||e>9||0>s||s>q)return n(t,j);8===i&&(i=9);var u=new b;return t.state=u,u.strm=t,u.wrap=o,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+ht-1)/ht),u.window=new O.Buf8(2*u.w_size),u.head=new O.Buf16(u.hash_size),u.prev=new O.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new O.Buf8(u.pending_buf_size),u.d_buf=u.lit_bufsize>>1,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,k(t)}function z(t,e){return S(t,e,Q,tt,et,J)}function A(t,e){var r,o,l,f;if(!t||!t.state||e>P||0>e)return t?n(t,j):j;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===wt&&e!==L)return n(t,0===t.avail_out?H:j);if(o.strm=t,r=o.last_flush,o.last_flush=e,o.status===dt)if(2===o.wrap)t.adler=0,u(o,31),u(o,139),u(o,8),o.gzhead?(u(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),u(o,255&o.gzhead.time),u(o,o.gzhead.time>>8&255),u(o,o.gzhead.time>>16&255),u(o,o.gzhead.time>>24&255),u(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),u(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(u(o,255&o.gzhead.extra.length),u(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=R(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=pt):(u(o,0),u(o,0),u(o,0),u(o,0),u(o,0),u(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),u(o,St),o.status=vt);else{var c=Q+(o.w_bits-8<<4)<<8,d=-1;d=o.strategy>=Y||o.level<2?0:o.level<6?1:6===o.level?2:3,c|=d<<6,0!==o.strstart&&(c|=ct),c+=31-c%31,o.status=vt,h(o,c),0!==o.strstart&&(h(o,t.adler>>>16),h(o,65535&t.adler)),t.adler=1}if(o.status===pt)if(o.gzhead.extra){for(l=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending!==o.pending_buf_size));)u(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=mt)}else o.status=mt;if(o.status===mt)if(o.gzhead.name){l=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),0===f&&(o.gzindex=0,o.status=_t)}else o.status=_t;if(o.status===_t)if(o.gzhead.comment){l=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),0===f&&(o.status=gt)}else o.status=gt;if(o.status===gt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(u(o,255&t.adler),u(o,t.adler>>8&255),t.adler=0,o.status=vt)):o.status=vt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,Z}else if(0===t.avail_in&&i(e)<=i(r)&&e!==L)return n(t,H);if(o.status===wt&&0!==t.avail_in)return n(t,H);if(0!==t.avail_in||0!==o.lookahead||e!==F&&o.status!==wt){var p=o.strategy===Y?g(o,e):o.strategy===K?_(o,e):I[o.level].func(o,e);if(p!==kt&&p!==xt||(o.status=wt),p===bt||p===kt)return 0===t.avail_out&&(o.last_flush=-1),Z;if(p===yt&&(e===N?T._tr_align(o):e!==P&&(T._tr_stored_block(o,0,0,!1),e===U&&(a(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,Z}return e!==L?Z:o.wrap<=0?W:(2===o.wrap?(u(o,255&t.adler),u(o,t.adler>>8&255),u(o,t.adler>>16&255),u(o,t.adler>>24&255),u(o,255&t.total_in),u(o,t.total_in>>8&255),u(o,t.total_in>>16&255),u(o,t.total_in>>24&255)):(h(o,t.adler>>>16),h(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?Z:W)}function E(t){var e;return t&&t.state?(e=t.state.status,e!==dt&&e!==pt&&e!==mt&&e!==_t&&e!==gt&&e!==vt&&e!==wt?n(t,j):(t.state=null,e===vt?n(t,M):Z)):j}function C(t,e){var r,n,i,s,o,u,h,l,f=e.length;if(!t||!t.state)return j;if(r=t.state,s=r.wrap,2===s||1===s&&r.status!==dt||r.lookahead)return j;for(1===s&&(t.adler=B(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new O.Buf8(r.w_size),O.arraySet(l,e,f-r.w_size,r.w_size,0),e=l,f=r.w_size),o=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,c(r);r.lookahead>=ht;){n=r.strstart,i=r.lookahead-(ht-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+ht-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--i);r.strstart=n,r.lookahead=ht-1,c(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ht-1,r.match_available=0,t.next_in=u,t.input=h,t.avail_in=o,r.wrap=s,Z}var I,O=t("../utils/common"),T=t("./trees"),B=t("./adler32"),R=t("./crc32"),D=t("./messages"),F=0,N=1,U=3,L=4,P=5,Z=0,W=1,j=-2,M=-3,H=-5,G=-1,X=1,Y=2,K=3,q=4,J=0,V=2,Q=8,$=9,tt=15,et=8,rt=29,nt=256,it=nt+1+rt,at=30,st=19,ot=2*it+1,ut=15,ht=3,lt=258,ft=lt+ht+1,ct=32,dt=42,pt=69,mt=73,_t=91,gt=103,vt=113,wt=666,bt=1,yt=2,kt=3,xt=4,St=3;I=[new v(0,0,0,0,d),new v(4,4,8,4,p),new v(4,5,16,8,p),new v(4,6,32,32,p),new v(4,4,16,16,m),new v(8,16,32,32,m),new v(8,16,128,128,m),new v(8,32,128,256,m),new v(32,128,258,1024,m),new v(32,258,258,4096,m)],r.deflateInit=z,r.deflateInit2=S,r.deflateReset=k,r.deflateResetKeep=y,r.deflateSetHeader=x,r.deflate=A,r.deflateEnd=E,r.deflateSetDictionary=C,r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}],48:[function(t,e,r){"use strict";var n=30,i=12;e.exports=function(t,e){var r,a,s,o,u,h,l,f,c,d,p,m,_,g,v,w,b,y,k,x,S,z,A,E,C;r=t.state,a=t.next_in,E=t.input,s=a+(t.avail_in-5),o=t.next_out,C=t.output,u=o-(e-t.avail_out),h=o+(t.avail_out-257),l=r.dmax,f=r.wsize,c=r.whave,d=r.wnext,p=r.window,m=r.hold,_=r.bits,g=r.lencode,v=r.distcode,w=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{15>_&&(m+=E[a++]<<_,_+=8,m+=E[a++]<<_,_+=8),y=g[m&w];e:for(;;){if(k=y>>>24,m>>>=k,_-=k,k=y>>>16&255,0===k)C[o++]=65535&y;else{if(!(16&k)){if(0===(64&k)){y=g[(65535&y)+(m&(1<<k)-1)];continue e}if(32&k){r.mode=i;break t}t.msg="invalid literal/length code",r.mode=n;break t}x=65535&y,k&=15,k&&(k>_&&(m+=E[a++]<<_,_+=8),x+=m&(1<<k)-1,m>>>=k,_-=k),15>_&&(m+=E[a++]<<_,_+=8,m+=E[a++]<<_,_+=8),y=v[m&b];r:for(;;){if(k=y>>>24,m>>>=k,_-=k,k=y>>>16&255,!(16&k)){if(0===(64&k)){y=v[(65535&y)+(m&(1<<k)-1)];continue r}t.msg="invalid distance code",r.mode=n;break t}if(S=65535&y,k&=15,k>_&&(m+=E[a++]<<_,_+=8,k>_&&(m+=E[a++]<<_,_+=8)),S+=m&(1<<k)-1,S>l){t.msg="invalid distance too far back",r.mode=n;break t}if(m>>>=k,_-=k,k=o-u,S>k){if(k=S-k,k>c&&r.sane){t.msg="invalid distance too far back",r.mode=n;break t}if(z=0,A=p,0===d){if(z+=f-k,x>k){x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}}else if(k>d){if(z+=f+d-k,k-=d,x>k){x-=k;do C[o++]=p[z++];while(--k);if(z=0,x>d){k=d,x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}}}else if(z+=d-k,x>k){x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}for(;x>2;)C[o++]=A[z++],C[o++]=A[z++],C[o++]=A[z++],x-=3;x&&(C[o++]=A[z++],x>1&&(C[o++]=A[z++]))}else{z=o-S;do C[o++]=C[z++],C[o++]=C[z++],C[o++]=C[z++],x-=3;while(x>2);x&&(C[o++]=C[z++],x>1&&(C[o++]=C[z++]))}break}}break}}while(s>a&&h>o);x=_>>3,a-=x,_-=x<<3,m&=(1<<_)-1,t.next_in=a,t.next_out=o,t.avail_in=s>a?5+(s-a):5-(a-s),t.avail_out=h>o?257+(h-o):257-(o-h),r.hold=m,r.bits=_}},{}],49:[function(t,e,r){"use strict";function n(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){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 v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=U,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new v.Buf32(mt),e.distcode=e.distdyn=new v.Buf32(_t),e.sane=1,e.back=-1,I):B}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,a(t)):B}function o(t,e){var r,n;return t&&t.state?(n=t.state,0>e?(r=0,e=-e):(r=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?B:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,s(t))):B}function u(t,e){var r,n;return t?(n=new i,t.state=n,n.window=null,r=o(t,e),r!==I&&(t.state=null),r):B}function h(t){return u(t,vt)}function l(t){if(wt){var e;for(_=new v.Buf32(512),g=new v.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(k(S,t.lens,0,288,_,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;k(z,t.lens,0,32,g,0,t.work,{bits:5}),wt=!1}t.lencode=_,t.lenbits=9,t.distcode=g,t.distbits=5}function f(t,e,r,n){var i,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new v.Buf8(a.wsize)),n>=a.wsize?(v.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),v.arraySet(a.window,e,r-n,i,a.wnext),n-=i,n?(v.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function c(t,e){var r,i,a,s,o,u,h,c,d,p,m,_,g,mt,_t,gt,vt,wt,bt,yt,kt,xt,St,zt,At=0,Et=new v.Buf8(4),Ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return B;r=t.state,r.mode===K&&(r.mode=q),o=t.next_out,a=t.output,h=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,c=r.hold,d=r.bits,p=u,m=h,xt=I;t:for(;;)switch(r.mode){case U:if(0===r.wrap){r.mode=q;break}for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(2&r.wrap&&35615===c){r.check=0,Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0),c=0,d=0,r.mode=L;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=ct;break}if((15&c)!==N){t.msg="unknown compression method",r.mode=ct;break}if(c>>>=4,d-=4,kt=(15&c)+8,0===r.wbits)r.wbits=kt;else if(kt>r.wbits){t.msg="invalid window size",r.mode=ct;break}r.dmax=1<<kt,t.adler=r.check=1,r.mode=512&c?X:K,c=0,d=0;break;case L:for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(r.flags=c,(255&r.flags)!==N){t.msg="unknown compression method",r.mode=ct;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=ct;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0,r.mode=P;case P:for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.head&&(r.head.time=c),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,Et[2]=c>>>16&255,Et[3]=c>>>24&255,r.check=b(r.check,Et,4,0)),c=0,d=0,r.mode=Z;case Z:for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0,r.mode=W;case W:if(1024&r.flags){for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=j;case j:if(1024&r.flags&&(_=r.length,_>u&&(_=u),_&&(r.head&&(kt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),v.arraySet(r.head.extra,i,s,_,kt)),512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,r.length-=_),r.length))break t;r.length=0,r.mode=M;case M:if(2048&r.flags){if(0===u)break t;_=0;do kt=i[s+_++],r.head&&kt&&r.length<65536&&(r.head.name+=String.fromCharCode(kt));while(kt&&u>_);if(512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,kt)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=H;case H:if(4096&r.flags){if(0===u)break t;_=0;do kt=i[s+_++],r.head&&kt&&r.length<65536&&(r.head.comment+=String.fromCharCode(kt));while(kt&&u>_);if(512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,kt)break t}else r.head&&(r.head.comment=null);r.mode=G;case G:if(512&r.flags){for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=ct;break}c=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=K;break;case X:for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}t.adler=r.check=n(c),c=0,d=0,r.mode=Y;case Y:if(0===r.havedict)return t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,T;t.adler=r.check=1,r.mode=K;case K:if(e===E||e===C)break t;case q:if(r.last){c>>>=7&d,d-=7&d,r.mode=ht;break}for(;3>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}switch(r.last=1&c,c>>>=1,d-=1,3&c){case 0:r.mode=J;break;case 1:if(l(r),r.mode=rt,e===C){c>>>=2,d-=2;break t}break;case 2:r.mode=$;break;case 3:t.msg="invalid block type",r.mode=ct}c>>>=2,d-=2;break;case J:for(c>>>=7&d,d-=7&d;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if((65535&c)!==(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ct;break}if(r.length=65535&c,c=0,d=0,r.mode=V,e===C)break t;case V:r.mode=Q;case Q:if(_=r.length){if(_>u&&(_=u),_>h&&(_=h),0===_)break t;v.arraySet(a,i,s,_,o),u-=_,s+=_,h-=_,o+=_,r.length-=_;break}r.mode=K;break;case $:for(;14>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(r.nlen=(31&c)+257,c>>>=5,d-=5,r.ndist=(31&c)+1,c>>>=5,d-=5,r.ncode=(15&c)+4,c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ct;break}r.have=0,r.mode=tt;case tt:for(;r.have<r.ncode;){for(;3>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.lens[Ct[r.have++]]=7&c,c>>>=3,d-=3}for(;r.have<19;)r.lens[Ct[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,St={bits:r.lenbits},xt=k(x,r.lens,0,19,r.lencode,0,r.work,St),r.lenbits=St.bits,xt){t.msg="invalid code lengths set",r.mode=ct;break}r.have=0,r.mode=et;case et:for(;r.have<r.nlen+r.ndist;){for(;At=r.lencode[c&(1<<r.lenbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(16>vt)c>>>=_t,d-=_t,r.lens[r.have++]=vt;else{if(16===vt){for(zt=_t+2;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c>>>=_t,d-=_t,0===r.have){t.msg="invalid bit length repeat",r.mode=ct;break}kt=r.lens[r.have-1],_=3+(3&c),c>>>=2,d-=2}else if(17===vt){for(zt=_t+3;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=_t,d-=_t,kt=0,_=3+(7&c),c>>>=3,d-=3}else{for(zt=_t+7;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=_t,d-=_t,kt=0,_=11+(127&c),c>>>=7,d-=7}if(r.have+_>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ct;break}for(;_--;)r.lens[r.have++]=kt}}if(r.mode===ct)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ct;break}if(r.lenbits=9,St={bits:r.lenbits},xt=k(S,r.lens,0,r.nlen,r.lencode,0,r.work,St),r.lenbits=St.bits,xt){t.msg="invalid literal/lengths set",r.mode=ct;break}if(r.distbits=6,r.distcode=r.distdyn,St={bits:r.distbits},xt=k(z,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,St),r.distbits=St.bits,xt){t.msg="invalid distances set",r.mode=ct;break}if(r.mode=rt,e===C)break t;case rt:r.mode=nt;case nt:if(u>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,y(t,m),o=t.next_out,a=t.output,h=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,c=r.hold,d=r.bits,r.mode===K&&(r.back=-1);break}for(r.back=0;At=r.lencode[c&(1<<r.lenbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(gt&&0===(240>)){for(wt=_t,bt=gt,yt=vt;At=r.lencode[yt+((c&(1<<wt+bt)-1)>>wt)],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=wt+_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=wt,d-=wt,r.back+=wt}if(c>>>=_t,d-=_t,r.back+=_t,r.length=vt,0===gt){r.mode=ut;break}if(32>){r.back=-1,r.mode=K;break}if(64>){t.msg="invalid literal/length code",r.mode=ct;break}r.extra=15>,r.mode=it;case it:if(r.extra){for(zt=r.extra;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=at;case at:for(;At=r.distcode[c&(1<<r.distbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(0===(240>)){for(wt=_t,bt=gt,yt=vt;At=r.distcode[yt+((c&(1<<wt+bt)-1)>>wt)],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=wt+_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=wt,d-=wt,r.back+=wt}if(c>>>=_t,d-=_t,r.back+=_t,64>){t.msg="invalid distance code",r.mode=ct;break}r.offset=vt,r.extra=15>,r.mode=st;case st:if(r.extra){for(zt=r.extra;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ct;break}r.mode=ot;case ot:if(0===h)break t;if(_=m-h,r.offset>_){if(_=r.offset-_,_>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ct;break}_>r.wnext?(_-=r.wnext,g=r.wsize-_):g=r.wnext-_,_>r.length&&(_=r.length),mt=r.window}else mt=a,g=o-r.offset,_=r.length;_>h&&(_=h),h-=_,r.length-=_;do a[o++]=mt[g++];while(--_);0===r.length&&(r.mode=nt);break;case ut:if(0===h)break t;a[o++]=r.length,h--,r.mode=nt;break;case ht:if(r.wrap){for(;32>d;){if(0===u)break t;u--,c|=i[s++]<<d,d+=8}if(m-=h,t.total_out+=m,r.total+=m,m&&(t.adler=r.check=r.flags?b(r.check,a,m,o-m):w(r.check,a,m,o-m)),m=h,(r.flags?c:n(c))!==r.check){t.msg="incorrect data check",r.mode=ct;break}c=0,d=0}r.mode=lt;case lt:if(r.wrap&&r.flags){for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=ct;break}c=0,d=0}r.mode=ft;case ft:xt=O;break t;case ct:xt=R;break t;case dt:return D;case pt:default:return B}return t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,(r.wsize||m!==t.avail_out&&r.mode<ct&&(r.mode<ht||e!==A))&&f(t,t.output,t.next_out,m-t.avail_out)?(r.mode=dt,D):(p-=t.avail_in,m-=t.avail_out,t.total_in+=p,t.total_out+=m,r.total+=m,r.wrap&&m&&(t.adler=r.check=r.flags?b(r.check,a,m,t.next_out-m):w(r.check,a,m,t.next_out-m)),t.data_type=r.bits+(r.last?64:0)+(r.mode===K?128:0)+(r.mode===rt||r.mode===V?256:0),(0===p&&0===m||e===A)&&xt===I&&(xt=F),xt)}function d(t){if(!t||!t.state)return B;var e=t.state;return e.window&&(e.window=null),t.state=null,I}function p(t,e){var r;return t&&t.state?(r=t.state,0===(2&r.wrap)?B:(r.head=e,e.done=!1,I)):B}function m(t,e){var r,n,i,a=e.length;return t&&t.state?(r=t.state,0!==r.wrap&&r.mode!==Y?B:r.mode===Y&&(n=1,n=w(n,e,a,0),n!==r.check)?R:(i=f(t,e,a,a))?(r.mode=dt,D):(r.havedict=1,I)):B}var _,g,v=t("../utils/common"),w=t("./adler32"),b=t("./crc32"),y=t("./inffast"),k=t("./inftrees"),x=0,S=1,z=2,A=4,E=5,C=6,I=0,O=1,T=2,B=-2,R=-3,D=-4,F=-5,N=8,U=1,L=2,P=3,Z=4,W=5,j=6,M=7,H=8,G=9,X=10,Y=11,K=12,q=13,J=14,V=15,Q=16,$=17,tt=18,et=19,rt=20,nt=21,it=22,at=23,st=24,ot=25,ut=26,ht=27,lt=28,ft=29,ct=30,dt=31,pt=32,mt=852,_t=592,gt=15,vt=gt,wt=!0;r.inflateReset=s,r.inflateReset2=o,r.inflateResetKeep=a,r.inflateInit=h,r.inflateInit2=u,r.inflate=c,r.inflateEnd=d,r.inflateGetHeader=p,r.inflateSetDictionary=m,r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=15,a=852,s=592,o=0,u=1,h=2,l=[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],f=[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],c=[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],d=[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];e.exports=function(t,e,r,p,m,_,g,v){var w,b,y,k,x,S,z,A,E,C=v.bits,I=0,O=0,T=0,B=0,R=0,D=0,F=0,N=0,U=0,L=0,P=null,Z=0,W=new n.Buf16(i+1),j=new n.Buf16(i+1),M=null,H=0;for(I=0;i>=I;I++)W[I]=0;for(O=0;p>O;O++)W[e[r+O]]++;for(R=C,B=i;B>=1&&0===W[B];B--);if(R>B&&(R=B),0===B)return m[_++]=20971520,m[_++]=20971520,v.bits=1,0;for(T=1;B>T&&0===W[T];T++);for(T>R&&(R=T),N=1,I=1;i>=I;I++)if(N<<=1,N-=W[I],0>N)return-1;if(N>0&&(t===o||1!==B))return-1;for(j[1]=0,I=1;i>I;I++)j[I+1]=j[I]+W[I];for(O=0;p>O;O++)0!==e[r+O]&&(g[j[e[r+O]]++]=O);if(t===o?(P=M=g,S=19):t===u?(P=l,Z-=257,M=f,H-=257,S=256):(P=c,M=d,S=-1),L=0,O=0,I=T,x=_,D=R,F=0,y=-1,U=1<<R,k=U-1,t===u&&U>a||t===h&&U>s)return 1;for(var G=0;;){G++,z=I-F,g[O]<S?(A=0,E=g[O]):g[O]>S?(A=M[H+g[O]],E=P[Z+g[O]]):(A=96,E=0),w=1<<I-F,b=1<<D,T=b;do b-=w,m[x+(L>>F)+b]=z<<24|A<<16|E|0;while(0!==b);for(w=1<<I-1;L&w;)w>>=1;if(0!==w?(L&=w-1,L+=w):L=0,O++,0===--W[I]){if(I===B)break;I=e[r+g[O]]}if(I>R&&(L&k)!==y){for(0===F&&(F=R),x+=T,D=I-F,N=1<<D;B>D+F&&(N-=W[D+F],!(0>=N));)D++,N<<=1;if(U+=1<<D,t===u&&U>a||t===h&&U>s)return 1;y=L&k,m[y]=R<<24|D<<16|x-_|0}}return 0!==L&&(m[x+L]=I-F<<24|64<<16|0),v.bits=R,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.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,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function a(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return 256>t?ut[t]:ut[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function u(t,e,r){t.bi_valid>q-r?(t.bi_buf|=e<<t.bi_valid&65535,o(t,t.bi_buf),t.bi_buf=e>>q-t.bi_valid,t.bi_valid+=r-q):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function h(t,e,r){u(t,r[2*e],r[2*e+1])}function l(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function f(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function c(t,e){var r,n,i,a,s,o,u=e.dyn_tree,h=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;K>=a;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;Y>r;r++)n=t.heap[r],a=u[2*u[2*n+1]+1]+1,a>p&&(a=p,m++),u[2*n+1]=a,n>h||(t.bl_count[a]++,s=0,n>=d&&(s=c[n-d]),o=u[2*n],t.opt_len+=o*(a+s),f&&(t.static_len+=o*(l[2*n+1]+s)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)i=t.heap[--r],i>h||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}function d(t,e,r){var n,i,a=new Array(K+1),s=0;for(n=1;K>=n;n++)a[n]=s=s+r[n-1]<<1;for(i=0;e>=i;i++){var o=t[2*i+1];0!==o&&(t[2*i]=l(a[o]++,o))}}function p(){var t,e,r,n,a,s=new Array(K+1);for(r=0,n=0;j-1>n;n++)for(lt[n]=r,t=0;t<1<<et[n];t++)ht[r++]=n;for(ht[r-1]=n,a=0,n=0;16>n;n++)for(ft[n]=a,t=0;t<1<<rt[n];t++)ut[a++]=n;for(a>>=7;G>n;n++)for(ft[n]=a<<7,t=0;t<1<<rt[n]-7;t++)ut[256+a++]=n;for(e=0;K>=e;e++)s[e]=0;for(t=0;143>=t;)st[2*t+1]=8,t++,s[8]++;for(;255>=t;)st[2*t+1]=9,t++,s[9]++;for(;279>=t;)st[2*t+1]=7,t++,s[7]++;for(;287>=t;)st[2*t+1]=8,t++,s[8]++;for(d(st,H+1,s),t=0;G>t;t++)ot[2*t+1]=5,ot[2*t]=l(t,5);ct=new i(st,et,M+1,H,K),dt=new i(ot,rt,0,G,K),pt=new i(new Array(0),nt,0,X,J)}function m(t){var e;for(e=0;H>e;e++)t.dyn_ltree[2*e]=0;for(e=0;G>e;e++)t.dyn_dtree[2*e]=0;for(e=0;X>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*V]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function _(t){t.bi_valid>8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function g(t,e,r,n){_(t),n&&(o(t,r),o(t,~r)),B.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function v(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function w(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&v(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!v(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function b(t,e,r){var n,i,a,o,l=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],i=t.pending_buf[t.l_buf+l],l++,0===n?h(t,i,e):(a=ht[i],h(t,a+M+1,e),o=et[a],0!==o&&(i-=lt[a],u(t,i,o)),n--,a=s(n),h(t,a,r),o=rt[a],0!==o&&(n-=ft[a],u(t,n,o)));while(l<t.last_lit);h(t,V,e)}function y(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,u=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=Y,r=0;u>r;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>h?++h:0,a[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)w(t,a,r);i=u;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],w(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,w(t,a,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],c(t,e),d(a,h,t.bl_count)}function k(t,e,r){var n,i,a=-1,s=e[1],o=0,u=7,h=4;for(0===s&&(u=138,h=3),e[2*(r+1)+1]=65535,n=0;r>=n;n++)i=s,s=e[2*(n+1)+1], -++o<u&&i===s||(h>o?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*Q]++):10>=o?t.bl_tree[2*$]++:t.bl_tree[2*tt]++,o=0,a=i,0===s?(u=138,h=3):i===s?(u=6,h=3):(u=7,h=4))}function x(t,e,r){var n,i,a=-1,s=e[1],o=0,l=7,f=4;for(0===s&&(l=138,f=3),n=0;r>=n;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(f>o){do h(t,i,t.bl_tree);while(0!==--o)}else 0!==i?(i!==a&&(h(t,i,t.bl_tree),o--),h(t,Q,t.bl_tree),u(t,o-3,2)):10>=o?(h(t,$,t.bl_tree),u(t,o-3,3)):(h(t,tt,t.bl_tree),u(t,o-11,7));o=0,a=i,0===s?(l=138,f=3):i===s?(l=6,f=3):(l=7,f=4)}}function S(t){var e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),y(t,t.bl_desc),e=X-1;e>=3&&0===t.bl_tree[2*it[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function z(t,e,r,n){var i;for(u(t,e-257,5),u(t,r-1,5),u(t,n-4,4),i=0;n>i;i++)u(t,t.bl_tree[2*it[i]+1],3);x(t,t.dyn_ltree,e-1),x(t,t.dyn_dtree,r-1)}function A(t){var e,r=4093624447;for(e=0;31>=e;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return D;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return F;for(e=32;M>e;e++)if(0!==t.dyn_ltree[2*e])return F;return D}function E(t){mt||(p(),mt=!0),t.l_desc=new a(t.dyn_ltree,ct),t.d_desc=new a(t.dyn_dtree,dt),t.bl_desc=new a(t.bl_tree,pt),t.bi_buf=0,t.bi_valid=0,m(t)}function C(t,e,r,n){u(t,(U<<1)+(n?1:0),3),g(t,e,r,!0)}function I(t){u(t,L<<1,3),h(t,V,st),f(t)}function O(t,e,r,n){var i,a,s=0;t.level>0?(t.strm.data_type===N&&(t.strm.data_type=A(t)),y(t,t.l_desc),y(t,t.d_desc),s=S(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,i>=a&&(i=a)):i=a=r+5,i>=r+4&&-1!==e?C(t,e,r,n):t.strategy===R||a===i?(u(t,(L<<1)+(n?1:0),3),b(t,st,ot)):(u(t,(P<<1)+(n?1:0),3),z(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),b(t,t.dyn_ltree,t.dyn_dtree)),m(t),n&&_(t)}function T(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(ht[r]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var B=t("../utils/common"),R=4,D=0,F=1,N=2,U=0,L=1,P=2,Z=3,W=258,j=29,M=256,H=M+1+j,G=30,X=19,Y=2*H+1,K=15,q=16,J=7,V=256,Q=16,$=17,tt=18,et=[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],rt=[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],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],at=512,st=new Array(2*(H+2));n(st);var ot=new Array(2*G);n(ot);var ut=new Array(at);n(ut);var ht=new Array(W-Z+1);n(ht);var lt=new Array(j);n(lt);var ft=new Array(G);n(ft);var ct,dt,pt,mt=!1;r._tr_init=E,r._tr_stored_block=C,r._tr_flush_block=O,r._tr_tally=T,r._tr_align=I},{"../utils/common":41}],53:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}]},{},[10])(10)}),!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.JSZipUtils=t():"undefined"!=typeof global?global.JSZipUtils=t():"undefined"!=typeof self&&(self.JSZipUtils=t())}(function(){return function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";function n(){try{return new window.XMLHttpRequest}catch(t){}}function i(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}var a={};a._getBinaryFromXHR=function(t){return t.response||t.responseText};var s=window.ActiveXObject?function(){return n()||i()}:n;a.getBinaryContent=function(t,e){try{var r=s();r.open("GET",t,!0),"responseType"in r&&(r.responseType="arraybuffer"),r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.onreadystatechange=function(n){var i,s;if(4===r.readyState)if(200===r.status||0===r.status){i=null,s=null;try{i=a._getBinaryFromXHR(r)}catch(o){s=new Error(o)}e(s,i)}else e(new Error("Ajax error for "+t+" : "+this.status+" "+this.statusText),null)},r.send()}catch(n){e(new Error(n),null)}},e.exports=a},{}]},{},[1])(1)});var saveAs=saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},n=t.URL||t.webkitURL||t,i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),a=!t.externalHost&&"download"in i,s=t.webkitRequestFileSystem,o=t.requestFileSystem||s||t.mozRequestFileSystem,u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},h="application/octet-stream",l=0,f=[],c=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?n.revokeObjectURL(e):e.remove()}f.length=0},d=function(t,e,r){e=[].concat(e);for(var n=e.length;n--;){var i=t["on"+e[n]];if("function"==typeof i)try{i.call(t,r||t)}catch(a){u(a)}}},p=function(n,u){var c,p,m,_=this,g=n.type,v=!1,w=function(){var t=r().createObjectURL(n);return f.push(t),t},b=function(){d(_,"writestart progress write writeend".split(" "))},y=function(){!v&&c||(c=w(n)),p?p.location.href=c:window.open(c,"_blank"),_.readyState=_.DONE,b()},k=function(t){return function(){return _.readyState!==_.DONE?t.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};if(_.readyState=_.INIT,u||(u="download"),a){c=w(n),e=t.document,i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i.href=c,i.download=u;var S=e.createEvent("MouseEvents");return S.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(S),_.readyState=_.DONE,void b()}return t.chrome&&g&&g!==h&&(m=n.slice||n.webkitSlice,n=m.call(n,0,n.size,h),v=!0),s&&"download"!==u&&(u+=".download"),(g===h||s)&&(p=t),o?(l+=n.size,void o(t.TEMPORARY,l,k(function(t){t.root.getDirectory("saved",x,k(function(t){var e=function(){t.getFile(u,x,k(function(t){t.createWriter(k(function(e){e.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),_.readyState=_.DONE,d(_,"writeend",e)},e.onerror=function(){var t=e.error;t.code!==t.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach(function(t){e["on"+t]=_["on"+t]}),e.write(n),_.abort=function(){e.abort(),_.readyState=_.DONE},_.readyState=_.WRITING}),y)}),y)};t.getFile(u,{create:!1},k(function(t){t.remove(),e()}),k(function(t){t.code===t.NOT_FOUND_ERR?e():y()}))}),y)}),y)):void y()},m=p.prototype,_=function(t,e){return new p(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",c,!1),_.unload=function(){c(),t.removeEventListener("unload",c,!1)},_}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&(module.exports=saveAs);var Downloader=Downloader||{};Downloader.getFile=function(t){var e=function(t,e,r){JSZipUtils.getBinaryContent(t,function(t,n){t?r(t):e(n)})},r=function(t){var r=window.Promise;return r||(r=JSZip.external.Promise),new r(function(r,n){e(t,r,n)})};return r(t)};var Zipper={zip:new JSZip};Zipper.createZip=function(t){var e=function(){Files.all.map(function(e){var r=e,n=r.replace(/.*\//g,"");Zipper.zip.file(n,t.getFile(r),{binary:!0})})},r=function(){Zipper.zip.generateAsync({type:"blob"}).then(function(t){saveAs(t,"files.zip")},function(t){console.log(t)})},n=function(){JSZip.support.blob?(e(),r()):console.log("Blob is not supported")};n()};var UserInterface={selector:"a[href=download]"};UserInterface.setup=function(t,e){var r=document.body.querySelector(UserInterface.selector),n=function(){t.createZip(e)},i=function(t){t.addEventListener("click",function(t){t.preventDefault(),n()},!1)},a=function(){r&&i(r)};a()},UserInterface.setup(Zipper,Downloader); +function foreach(t,e){for(var r=0;r<t.length&&e.apply(t[r])!==!1;r++);}function getNextSiblingInDom(t){var e=t.parentNode.children,r=!1,n=!1;return foreach(e,function(){if(this===t)n=!0;else if(n===!0)return r=this,!1}),r}function addClass(t,e){var r=t.className.split(" ");r.indexOf(e)!==!1&&(t.className+=" "+e)}!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.JSZip=t()}}(function(){var t;return function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,o,u,h,l=[],f=0,c=t.length,d=c,p="string"!==n.getTypeOf(t);f<t.length;)d=c-f,p?(e=t[f++],r=c>f?t[f++]:0,i=c>f?t[f++]:0):(e=t.charCodeAt(f++),r=c>f?t.charCodeAt(f++):0,i=c>f?t.charCodeAt(f++):0),s=e>>2,o=(3&e)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,h=d>2?63&i:64,l.push(a.charAt(s)+a.charAt(o)+a.charAt(u)+a.charAt(h));return l.join("")},r.decode=function(t){var e,r,n,s,o,u,h,l=0,f=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");var c=3*t.length/4;t.charAt(t.length-1)===a.charAt(64)&&c--,t.charAt(t.length-2)===a.charAt(64)&&c--;var d;for(d=i.uint8array?new Uint8Array(c):new Array(c);l<t.length;)s=a.indexOf(t.charAt(l++)),o=a.indexOf(t.charAt(l++)),u=a.indexOf(t.charAt(l++)),h=a.indexOf(t.charAt(l++)),e=s<<2|o>>4,r=(15&o)<<4|u>>2,n=(3&u)<<6|h,d[f++]=e,64!==u&&(d[f++]=r),64!==h&&(d[f++]=n);return d}},{"./support":27,"./utils":29}],2:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}var i=t("./external"),a=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");n.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=n},{"./external":6,"./stream/Crc32Probe":22,"./stream/DataLengthProbe":23,"./stream/DataWorker":24}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\x00\x00",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":25}],4:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e[s])];return-1^t}function a(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e.charCodeAt(s))];return-1^t}var s=t("./utils"),o=n();e.exports=function(t,e){if("undefined"==typeof t||!t.length)return 0;var r="string"!==s.getTypeOf(t);return r?i(0|e,t,t.length,0):a(0|e,t,t.length,0)}},{"./utils":29}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n=t("es6-promise").Promise;e.exports={Promise:n}},{"es6-promise":37}],7:[function(t,e,r){"use strict";function n(t,e){o.call(this,"FlateWorker/"+t),this._pako=new a[t]({raw:!0,level:e.level||-1}),this.meta={};var r=this;this._pako.onData=function(t){r.push({data:t,meta:r.meta})}}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),u=i?"uint8array":"array";r.magic="\b\x00",s.inherits(n,o),n.prototype.processChunk=function(t){this.meta=t.meta,this._pako.push(s.transformTo(u,t.data),!1)},n.prototype.flush=function(){o.prototype.flush.call(this),this._pako.push([],!0)},n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},r.compressWorker=function(t){return new n("Deflate",t)},r.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":25,"./utils":29,pako:38}],8:[function(t,e,r){"use strict";function n(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),o=t("../crc32"),u=t("../signature"),h=function(t,e){var r,n="";for(r=0;e>r;r++)n+=String.fromCharCode(255&t),t>>>=8;return n},l=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16},f=function(t,e){return 63&(t||0)},c=function(t,e,r,n,a,c){var d,p,m=t.file,_=t.compression,g=c!==s.utf8encode,v=i.transformTo("string",c(m.name)),w=i.transformTo("string",s.utf8encode(m.name)),b=m.comment,y=i.transformTo("string",c(b)),k=i.transformTo("string",s.utf8encode(b)),x=w.length!==m.name.length,S=k.length!==b.length,z="",A="",E="",C=m.dir,I=m.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var T=0;e&&(T|=8),g||!x&&!S||(T|=2048);var B=0,R=0;C&&(B|=16),"UNIX"===a?(R=798,B|=l(m.unixPermissions,C)):(R=20,B|=f(m.dosPermissions,C)),d=I.getUTCHours(),d<<=6,d|=I.getUTCMinutes(),d<<=5,d|=I.getUTCSeconds()/2,p=I.getUTCFullYear()-1980,p<<=4,p|=I.getUTCMonth()+1,p<<=5,p|=I.getUTCDate(),x&&(A=h(1,1)+h(o(v),4)+w,z+="up"+h(A.length,2)+A),S&&(E=h(1,1)+h(o(y),4)+k,z+="uc"+h(E.length,2)+E);var D="";D+="\n\x00",D+=h(T,2),D+=_.magic,D+=h(d,2),D+=h(p,2),D+=h(O.crc32,4),D+=h(O.compressedSize,4),D+=h(O.uncompressedSize,4),D+=h(v.length,2),D+=h(z.length,2);var F=u.LOCAL_FILE_HEADER+D+v+z,N=u.CENTRAL_FILE_HEADER+h(R,2)+D+h(y.length,2)+"\x00\x00\x00\x00"+h(B,4)+h(n,4)+v+z+y;return{fileRecord:F,dirRecord:N}},d=function(t,e,r,n,a){var s="",o=i.transformTo("string",a(n));return s=u.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+h(t,2)+h(t,2)+h(e,4)+h(r,4)+h(o.length,2)+o},p=function(t){var e="";return e=u.DATA_DESCRIPTOR+h(t.crc32,4)+h(t.compressedSize,4)+h(t.uncompressedSize,4)};i.inherits(n,a),n.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},n.prototype.openedSource=function(t){if(this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name,this.streamFiles&&!t.file.dir){var e=c(t,this.streamFiles,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(t){this.accumulate=!1;var e=c(t,this.streamFiles,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),this.streamFiles&&!t.file.dir)this.push({data:p(t),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,n=d(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:n,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(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},n.prototype.resume=function(){return a.prototype.resume.call(this)?!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0):!1},n.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},n.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=n},{"../crc32":4,"../signature":20,"../stream/GenericWorker":25,"../utf8":28,"../utils":29}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker"),a=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};r.generateWorker=function(t,e,r){var n=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach(function(t,r){s++;var i=a(r.options.compression,e.compression),o=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,h=r.date;r._compressWorker(i,o).withStreamInfo("file",{name:t,dir:u,date:h,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(n)}),n.entriesCount=s}catch(o){n.error(o)}return n}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}n.prototype=t("./object"),n.prototype.loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":13,"./support":27}],11:[function(t,e,r){"use strict";function n(t){return new a.Promise(function(e,r){var n=t.decompressed.getContentWorker().pipe(new u);n.on("error",function(t){r(t)}).on("end",function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}var i=t("./utils"),a=t("./external"),s=t("./utf8"),i=t("./utils"),o=t("./zipEntries"),u=t("./stream/Crc32Probe"),h=t("./nodejsUtils");e.exports=function(t,e){var r=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),h.isNode&&h.isStream(t)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var r=new o(e);return r.load(t),r}).then(function(t){var r=[a.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var s=0;s<i.length;s++)r.push(n(i[s]));return a.Promise.all(r)}).then(function(t){for(var n=t.shift(),i=n.files,a=0;a<i.length;a++){var s=i[a];r.file(s.fileNameStr,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:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r})}},{"./external":6,"./nodejsUtils":12,"./stream/Crc32Probe":22,"./utf8":28,"./utils":29,"./zipEntries":30}],12:[function(t,e,r){(function(t){"use strict";e.exports={isNode:"undefined"!=typeof t,newBuffer:function(e,r){return new t(e,r)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],13:[function(t,e,r){"use strict";function n(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var i=t("./utf8"),a=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),u=t("./defaults"),h=t("./compressedObject"),l=t("./zipObject"),f=t("./generate"),c=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),p=function(t,e,r){var n,i=a.getTypeOf(e);r=a.extend(r||{},u),r.date=r.date||new Date,null!==r.compression&&(r.compression=r.compression.toUpperCase()),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(t=_(t)),r.createFolders&&(n=m(t))&&g.call(this,n,!0);var o="string"===i&&r.binary===!1&&r.base64===!1;r.binary=!o;var f=e instanceof h&&0===e.uncompressedSize;(f||r.dir||!e||0===e.length)&&(r.base64=!1,r.binary=!0,e="",r.compression="STORE",i="string");var p=null;p=e instanceof h||e instanceof s?e:c.isNode&&c.isStream(e)?new d(t,e):a.prepareContent(t,e,r.binary,r.optimizedBinaryString,r.base64);var v=new l(t,p,r);this.files[t]=v},m=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},_=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e="undefined"!=typeof e?e:u.createFolders,t=_(t),this.files[t]||p.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]},v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],r=e.slice(this.root.length,e.length),r&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach(function(r,n){t(r,n)&&e.push(n)}),e},file:function(t,e,r){if(1===arguments.length){if(n(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var a=this.files[this.root+t];return a&&!a.dir?a:null}return t=this.root+t,p.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(n(t))return this.filter(function(e,r){return r.dir&&t.test(e)});var e=this.root+t,r=g.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(e,r){return r.name.slice(0,t.length)===t}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if(r=a.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");a.checkSupport(r.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(u){e=new s("error"),e.error(u)}return new o(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return t=t||{},t.type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":35,"./nodejsUtils":12,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28,"./utils":29,"./zipObject":32}],14:[function(t,e,r){"use strict";function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===e&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.readData(4);return e===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],15:[function(t,e,r){"use strict";function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}var i=t("../utils");n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||0>t)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":29}],16:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./Uint8ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./Uint8ArrayReader":18}],17:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){var e=this.readData(4);return t===e},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],18:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./ArrayReader":14}],19:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new u(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new s(t)}},{"../support":27,"../utils":29,"./ArrayReader":14,"./NodeBufferReader":16,"./StringReader":17,"./Uint8ArrayReader":18}],20:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],21:[function(t,e,r){"use strict";function n(t){i.call(this,"ConvertWorker to "+t),this.destType=t}var i=t("./GenericWorker"),a=t("../utils");a.inherits(n,i),n.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=n},{"../utils":29,"./GenericWorker":25}],22:[function(t,e,r){"use strict";function n(){i.call(this,"Crc32Probe")}var i=t("./GenericWorker"),a=t("../crc32"),s=t("../utils");s.inherits(n,i),n.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=n},{"../crc32":4,"../utils":29,"./GenericWorker":25}],23:[function(t,e,r){"use strict";function n(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}var i=t("../utils"),a=t("./GenericWorker");i.inherits(n,a),n.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}a.prototype.processChunk.call(this,t)},e.exports=n},{"../utils":29,"./GenericWorker":25}],24:[function(t,e,r){"use strict";function n(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}var i=t("../utils"),a=t("./GenericWorker"),s=16384;i.inherits(n,a),n.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return a.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0):!1},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=s,e=null,r=Math.min(this.max,this.index+t);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,r);break;case"uint8array":e=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":e=this.data.slice(this.index,r)}return this.index=r,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":29,"./GenericWorker":25}],25:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return this.isFinished?!1:(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],26:[function(t,e,r){(function(r){"use strict";function n(t,e,r){switch(t){case"blob":return o.newBlob(o.transformTo("arraybuffer",e),r);case"base64":return l.encode(e);default:return o.transformTo(t,e)}}function i(t,e){var n,i=0,a=null,s=0;for(n=0;n<e.length;n++)s+=e[n].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(a=new Uint8Array(s),n=0;n<e.length;n++)a.set(e[n],i),i+=e[n].length;return a;case"nodebuffer":return r.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}function a(t,e){return new c.Promise(function(r,a){var s=[],o=t._internalType,u=t._outputType,h=t._mimeType;t.on("data",function(t,r){s.push(t),e&&e(r)}).on("error",function(t){s=[],a(t)}).on("end",function(){try{var t=n(u,i(o,s),h);r(t)}catch(e){a(e)}s=[]}).resume()})}function s(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,o.checkSupport(n),this._worker=t.pipe(new u(n)),t.lock()}catch(i){this._worker=new h("error"),this._worker.error(i)}}var o=t("../utils"),u=t("./ConvertWorker"),h=t("./GenericWorker"),l=t("../base64"),f=t("../nodejs/NodejsStreamOutputAdapter"),c=t("../external");s.prototype={accumulate:function(t){return a(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta)}):this._worker.on(t,function(){o.delay(e,arguments,r)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(o.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=s}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":35,"../utils":29,"./ConvertWorker":21,"./GenericWorker":25}],27:[function(t,e,r){(function(e){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof e,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(i){try{var a=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new a;s.append(n),r.blob=0===s.getBlob("application/zip").size}catch(i){r.blob=!1}}}r.nodestream=!!t("./nodejs/NodejsStreamOutputAdapter").prototype}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"./nodejs/NodejsStreamOutputAdapter":35}],28:[function(t,e,r){"use strict";function n(){u.call(this,"utf-8 decode"),this.leftOver=null}function i(){u.call(this,"utf-8 encode")}for(var a=t("./utils"),s=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),h=new Array(256),l=0;256>l;l++)h[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;h[254]=h[254]=1;var f=function(t){var e,r,n,i,a,o=t.length,u=0;for(i=0;o>i;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=s.uint8array?new Uint8Array(u):new Array(u),a=0,i=0;u>a;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),128>r?e[a++]=r:2048>r?(e[a++]=192|r>>>6,e[a++]=128|63&r):65536>r?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},c=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+h[t[r]]>e?r:e},d=function(t){var e,r,n,i,s=t.length,o=new Array(2*s);for(r=0,e=0;s>e;)if(n=t[e++],128>n)o[r++]=n;else if(i=h[n],i>4)o[r++]=65533,e+=i-1;else{for(n&=2===i?31:3===i?15:7;i>1&&s>e;)n=n<<6|63&t[e++],i--;i>1?o[r++]=65533:65536>n?o[r++]=n:(n-=65536,o[r++]=55296|n>>10&1023,o[r++]=56320|1023&n)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),a.applyFromCharCode(o)};r.utf8encode=function(t){return s.nodebuffer?o.newBuffer(t,"utf-8"):f(t)},r.utf8decode=function(t){return s.nodebuffer?a.transformTo("nodebuffer",t).toString("utf-8"):(t=a.transformTo(s.uint8array?"uint8array":"array",t),d(t))},a.inherits(n,u),n.prototype.processChunk=function(t){var e=a.transformTo(s.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var n=e;e=new Uint8Array(n.length+this.leftOver.length),e.set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=c(e),o=e;i!==e.length&&(s.uint8array?(o=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(o=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:r.utf8decode(o),meta:t.meta})},n.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=n,a.inherits(i,u),i.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=i},{"./nodejsUtils":12,"./stream/GenericWorker":25,"./support":27,"./utils":29}],29:[function(t,e,r){"use strict";function n(t){var e=null;return e=u.uint8array?new Uint8Array(t.length):new Array(t.length),a(t,e)}function i(t){return t}function a(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}function s(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=d.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=d.applyCanBeUsed.nodebuffer),i)for(;e>1;)try{return d.stringifyByChunk(t,n,e)}catch(a){e=Math.floor(e/2)}return d.stringifyByChar(t)}function o(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}var u=t("./support"),h=t("./base64"),l=t("./nodejsUtils"),f=t("asap"),c=t("./external");r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(n){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,a=new i;return a.append(t),a.getBlob(e)}catch(n){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(t,e,r){var n=[],i=0,a=t.length;if(r>=a)return String.fromCharCode.apply(null,t);for(;a>i;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,a)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,a)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&1===String.fromCharCode.apply(null,l.newBuffer(1)).length}catch(t){return!1}}()}};r.applyFromCharCode=s;var p={};p.string={string:i,array:function(t){return a(t,new Array(t.length))},arraybuffer:function(t){return p.string.uint8array(t).buffer},uint8array:function(t){return a(t,new Uint8Array(t.length)); +},nodebuffer:function(t){return a(t,l.newBuffer(t.length))}},p.array={string:s,array:i,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return l.newBuffer(t)}},p.arraybuffer={string:function(t){return s(new Uint8Array(t))},array:function(t){return o(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:i,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return l.newBuffer(new Uint8Array(t))}},p.uint8array={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:i,nodebuffer:function(t){return l.newBuffer(t)}},p.nodebuffer={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return p.nodebuffer.uint8array(t).buffer},uint8array:function(t){return o(t,new Uint8Array(t.length))},nodebuffer:i},r.transformTo=function(t,e){if(e||(e=""),!t)return e;r.checkSupport(t);var n=r.getTypeOf(e),i=p[n][t](e);return i},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":u.nodebuffer&&l.isBuffer(t)?"nodebuffer":u.uint8array&&t instanceof Uint8Array?"uint8array":u.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){var e=u[t.toLowerCase()];if(!e)throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)e=t.charCodeAt(r),n+="\\x"+(16>e?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){f(function(){t.apply(r||null,e||[])})},r.inherits=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&"undefined"==typeof r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,i,a,s){var o=null;return o=u.blob&&e instanceof Blob&&"undefined"!=typeof FileReader?new c.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(e)}):c.Promise.resolve(e),o.then(function(e){var o=r.getTypeOf(e);return o?("arraybuffer"===o?e=r.transformTo("uint8array",e):"string"===o&&(s?e=h.decode(e):i&&a!==!0&&(e=n(e))),e):c.Promise.reject(new Error("The data of '"+t+"' is in an unsupported format !"))})}},{"./base64":1,"./external":6,"./nodejsUtils":12,"./support":27,asap:33}],30:[function(t,e,r){"use strict";function n(t){this.files=[],this.loadOptions=t}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./signature"),o=t("./zipEntry"),u=(t("./utf8"),t("./support"));n.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug : unexpected signature ("+a.pretty(e)+", expected "+a.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4),i=n===e;return this.reader.setIndex(r),i},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 t=this.reader.readData(this.zipCommentLength),e=u.uint8array?"uint8array":"array",r=a.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},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 t,e,r,n=this.zip64EndOfCentralSize-44,i=0;n>i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)t=new o({zip64:this.zip64},this.loadOptions),t.readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(0>t){var e=!this.isSignature(0,s.LOCAL_FILE_HEADER);throw e?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(t);var r=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>t)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=r-n;if(i>0)this.isSignature(r,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(0>i)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=n},{"./reader/readerFor":19,"./signature":20,"./support":27,"./utf8":28,"./utils":29,"./zipEntry":31}],31:[function(t,e,r){"use strict";function n(t,e){this.options=t,this.loadOptions=e}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),u=t("./utf8"),h=t("./compressions"),l=t("./support"),f=0,c=3,d=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null};n.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(e=d(this.compressionMethod),null===e)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),t===f&&(this.dosPermissions=63&this.externalFileAttributes),t===c&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n}},handleUTF8:function(){var t=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=a.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=a.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileName)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileComment)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null}},e.exports=n},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":19,"./support":27,"./utf8":28,"./utils":29}],32:[function(t,e,r){"use strict";var n=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),a=t("./utf8"),s=t("./compressedObject"),o=t("./stream/GenericWorker"),u=function(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};u.prototype={internalStream:function(t){var e=t.toLowerCase(),r="string"===e||"text"===e;"binarystring"!==e&&"text"!==e||(e="string");var i=this._decompressWorker(),s=!this._dataBinary;return s&&!r&&(i=i.pipe(new a.Utf8EncodeWorker)),!s&&r&&(i=i.pipe(new a.Utf8DecodeWorker)),new n(i,e,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof s&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof o?this._data:new i(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<h.length;f++)u.prototype[h[f]]=l;e.exports=u},{"./compressedObject":2,"./stream/DataWorker":24,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28}],33:[function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=o.length?o.pop():new a,e.task=t,s(e)}function a(){this.task=null}var s=t("./raw"),o=[],u=[],h=s.makeRequestCallFromTimer(n);e.exports=i,a.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),h())}finally{this.task=null,o[o.length]=this}}},{"./raw":34}],34:[function(t,e,r){(function(t){"use strict";function r(t){o.length||(s(),u=!0),o[o.length]=t}function n(){for(;h<o.length;){var t=h;if(h+=1,o[t].call(),h>l){for(var e=0,r=o.length-h;r>e;e++)o[e]=o[e+h];o.length-=h,h=0}}o.length=0,h=0,u=!1}function i(t){var e=1,r=new f(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function a(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}e.exports=r;var s,o=[],u=!1,h=0,l=1024,f=t.MutationObserver||t.WebKitMutationObserver;s="function"==typeof f?i(n):a(n),r.requestFlush=s,r.makeRequestCallFromTimer=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(t,e,r){},{}],36:[function(t,e,r){function n(){l=!1,o.length?h=o.concat(h):f=-1,h.length&&i()}function i(){if(!l){var t=setTimeout(n);l=!0;for(var e=h.length;e;){for(o=h,h=[];++f<e;)o&&o[f].run();f=-1,e=h.length}o=null,l=!1,clearTimeout(t)}}function a(t,e){this.fun=t,this.array=e}function s(){}var o,u=e.exports={},h=[],l=!1,f=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new a(t,e)),1!==h.length||l||setTimeout(i,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],37:[function(e,r,n){(function(n,i){(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){X=t}function h(t){J=t}function l(){return function(){n.nextTick(m)}}function f(){return function(){G(m)}}function c(){var t=0,e=new $(m),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=m,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(m,1)}}function m(){for(var t=0;q>t;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}q=0}function _(){try{var t=e,r=t("vertx");return G=r.runOnLoop||r.runOnContext,f()}catch(n){return p()}}function g(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function b(t){try{return t.then}catch(e){return st.error=e,st}}function y(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function k(t,e,r){J(function(t){var n=!1,i=y(r,e,function(r){n||(n=!0,e!==r?z(t,r):E(t,r))},function(e){n||(n=!0,C(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,C(t,i))},t)}function x(t,e){e._state===it?E(t,e._result):e._state===at?C(t,e._result):I(e,void 0,function(e){z(t,e)},function(e){C(t,e)})}function S(t,e){if(e.constructor===t.constructor)x(t,e);else{var r=b(e);r===st?C(t,st.error):void 0===r?E(t,e):s(r)?k(t,e,r):E(t,e)}}function z(t,e){t===e?C(t,v()):a(e)?S(t,e):E(t,e)}function A(t){t._onerror&&t._onerror(t._result),O(t)}function E(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&J(O,t))}function C(t,e){t._state===nt&&(t._state=at,t._result=e,J(A,t))}function I(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+it]=r,i[a+at]=n,0===a&&t._state&&J(O,t)}function O(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,a=t._result,s=0;s<e.length;s+=3)n=e[s],i=e[s+r],n?R(r,n,i,a):i(a);t._subscribers.length=0}}function T(){this.error=null}function B(t,e){try{return t(e)}catch(r){return ot.error=r,ot}}function R(t,e,r,n){var i,a,o,u,h=s(r);if(h){if(i=B(r,n),i===ot?(u=!0,a=i.error,i=null):o=!0,e===i)return void C(e,w())}else i=n,o=!0;e._state!==nt||(h&&o?z(e,i):u?C(e,a):t===it?E(e,i):t===at&&C(e,i))}function D(t,e){try{e(function(e){z(t,e)},function(e){C(t,e)})}catch(r){C(t,r)}}function F(t,e){var r=this;r._instanceConstructor=t,r.promise=new t(g),r._validateInput(e)?(r._input=e,r.length=e.length,r._remaining=e.length,r._init(),0===r.length?E(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&E(r.promise,r._result))):C(r.promise,r._validationError())}function N(t){return new ut(this,t).promise}function U(t){function e(t){z(i,t)}function r(t){C(i,t)}var n=this,i=new n(g);if(!K(t))return C(i,new TypeError("You must pass an array to race.")),i;for(var a=t.length,s=0;i._state===nt&&a>s;s++)I(n.resolve(t[s]),void 0,e,r);return i}function L(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(g);return z(r,t),r}function P(t){var e=this,r=new e(g);return C(r,t),r}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==t&&(s(t)||Z(),this instanceof j||W(),D(this,t))}function M(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(t.Promise=pt)}var H;H=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G,X,Y,K=H,q=0,J=({}.toString,function(t,e){rt[q]=t,rt[q+1]=e,q+=2,2===q&&(X?X(m):Y())}),V="undefined"!=typeof window?window:void 0,Q=V||{},$=Q.MutationObserver||Q.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);Y=tt?l():$?c():et?d():void 0===V&&"function"==typeof e?_():p();var nt=void 0,it=1,at=2,st=new T,ot=new T;F.prototype._validateInput=function(t){return K(t)},F.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var ut=F;F.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},F.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;o(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},F.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===at?C(i,r):n._result[e]=r),0===n._remaining&&E(i,n._result)},F.prototype._willSettleAt=function(t,e){var r=this;I(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(at,e,t)})};var ht=N,lt=U,ft=L,ct=P,dt=0,pt=j;j.all=ht,j.race=lt,j.resolve=ft,j.reject=ct,j._setScheduler=u,j._setAsap=h,j._asap=J,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===at&&!e)return this;var i=new this.constructor(g),a=r._result;if(n){var s=arguments[n-1];J(function(){R(n,i,s,a)})}else I(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var mt=M,_t={Promise:pt,polyfill:mt};"function"==typeof t&&t.amd?t(function(){return _t}):"undefined"!=typeof r&&r.exports?r.exports=_t:"undefined"!=typeof this&&(this.ES6Promise=_t),mt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:36}],38:[function(t,e,r){"use strict";var n=t("./lib/utils/common").assign,i=t("./lib/deflate"),a=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};n(o,i,a,s),e.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=u.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==m)throw new Error(l[r]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=o.deflateSetDictionary(this.strm,i),r!==m)throw new Error(l[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}function s(t,e){return e=e||{},e.gzip=!0,i(t,e)}var o=t("./zlib/deflate"),u=t("./utils/common"),h=t("./utils/strings"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=Object.prototype.toString,d=0,p=4,m=0,_=1,g=2,v=-1,w=0,b=8;n.prototype.push=function(t,e){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?p:d,"string"==typeof t?i.input=h.string2buf(t):"[object ArrayBuffer]"===c.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new u.Buf8(a),i.next_out=0,i.avail_out=a),r=o.deflate(i,n),r!==_&&r!==m)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||n!==p&&n!==g)||("string"===this.options.to?this.onData(h.buf2binstring(u.shrinkBuf(i.output,i.next_out))):this.onData(u.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==_);return n===p?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m):n===g?(this.onEnd(m),i.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===m&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=a,r.gzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=s.inflateInit2(this.strm,e.windowBits);if(r!==h.Z_OK)throw new Error(l[r]);this.header=new c,s.inflateGetHeader(this.strm,this.header)}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}var s=t("./zlib/inflate"),o=t("./utils/common"),u=t("./utils/strings"),h=t("./zlib/constants"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=t("./zlib/gzheader"),d=Object.prototype.toString;n.prototype.push=function(t,e){var r,n,i,a,l,f,c=this.strm,p=this.options.chunkSize,m=this.options.dictionary,_=!1;if(this.ended)return!1;n=e===~~e?e:e===!0?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof t?c.input=u.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new o.Buf8(p),c.next_out=0,c.avail_out=p),r=s.inflate(c,h.Z_NO_FLUSH),r===h.Z_NEED_DICT&&m&&(f="string"==typeof m?u.string2buf(m):"[object ArrayBuffer]"===d.call(m)?new Uint8Array(m):m,r=s.inflateSetDictionary(this.strm,f)),r===h.Z_BUF_ERROR&&_===!0&&(r=h.Z_OK,_=!1),r!==h.Z_STREAM_END&&r!==h.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==h.Z_STREAM_END&&(0!==c.avail_in||n!==h.Z_FINISH&&n!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(c.output,c.next_out),a=c.next_out-i,l=u.buf2string(c.output,i),c.next_out=a,c.avail_out=p-a,a&&o.arraySet(c.output,c.output,i,a,0),this.onData(l)):this.onData(o.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(_=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==h.Z_STREAM_END);return r===h.Z_STREAM_END&&(n=h.Z_FINISH),n===h.Z_FINISH?(r=s.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h.Z_OK):n===h.Z_SYNC_FLUSH?(this.onEnd(h.Z_OK),c.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=n,r.inflate=i,r.inflateRaw=a,r.ungzip=i},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,s;for(n=0,e=0,r=t.length;r>e;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;r>e;e++)a=t[e],s.set(a,i),i+=a.length;return s}},a={arraySet:function(t,e,r,n,i){for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",n=0;e>n;n++)r+=String.fromCharCode(t[n]);return r}var i=t("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var u=new i.Buf8(256),h=0;256>h;h++)u[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;u[254]=u[254]=1,r.string2buf=function(t){var e,r,n,a,s,o=t.length,u=0;for(a=0;o>a;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=new i.Buf8(u),s=0,a=0;u>s;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),128>r?e[s++]=r:2048>r?(e[s++]=192|r>>>6,e[s++]=128|63&r):65536>r?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;n>r;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,a,s,o=e||t.length,h=new Array(2*o);for(i=0,r=0;o>r;)if(a=t[r++],128>a)h[i++]=a;else if(s=u[a],s>4)h[i++]=65533,r+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&o>r;)a=a<<6|63&t[r++],s--;s>1?h[i++]=65533:65536>a?h[i++]=a:(a-=65536,h[i++]=55296|a>>10&1023,h[i++]=56320|1023&a)}return n(h,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}e.exports=n},{}],44:[function(t,e,r){"use strict";e.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,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=a,s=n+r;t^=-1;for(var o=n;s>o;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}var a=n();e.exports=i},{}],46:[function(t,e,r){"use strict";function n(t,e){return t.msg=D[e],e}function i(t){return(t<<1)-(t>4?9:0)}function a(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(O.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function o(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function l(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,O.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=B(t.adler,e,i,r):2===t.state.wrap&&(t.adler=R(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function f(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-ft?t.strstart-(t.w_size-ft):0,h=t.window,l=t.w_mask,f=t.prev,c=t.strstart+lt,d=h[a+s-1],p=h[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,h[r+s]===p&&h[r+s-1]===d&&h[r]===h[a]&&h[++r]===h[a+1]){a+=2,r++;do;while(h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&c>a);if(n=lt-(c-a),a=c-lt,n>s){if(t.match_start=e,s=n,n>=o)break;d=h[a+s-1],p=h[a+s]}}while((e=f[e&l])>u&&0!==--i);return s<=t.lookahead?s:t.lookahead}function c(t){var e,r,n,i,a,s=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ft)){O.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,r=t.hash_size,e=r;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--r);r=s,e=r;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--r);i+=s}if(0===t.strm.avail_in)break;if(r=l(t.strm,t.window,t.strstart+t.lookahead,i), +t.lookahead+=r,t.lookahead+t.insert>=ht)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+ht-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<ht)););}while(t.lookahead<ft&&0!==t.strm.avail_in)}function d(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(c(t),0===t.lookahead&&e===F)return bt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,o(t,!1),0===t.strm.avail_out))return bt;if(t.strstart-t.block_start>=t.w_size-ft&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?bt:bt}function p(t,e){for(var r,n;;){if(t.lookahead<ft){if(c(t),t.lookahead<ft&&e===F)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ht&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r)),t.match_length>=ht)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-ht),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ht){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=t.strstart<ht-1?t.strstart:ht-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function m(t,e){for(var r,n,i;;){if(t.lookahead<ft){if(c(t),t.lookahead<ft&&e===F)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ht&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ht-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r),t.match_length<=5&&(t.strategy===X||t.match_length===ht&&t.strstart-t.match_start>4096)&&(t.match_length=ht-1)),t.prev_length>=ht&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ht,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ht),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ht-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!==--t.prev_length);if(t.match_available=0,t.match_length=ht-1,t.strstart++,n&&(o(t,!1),0===t.strm.avail_out))return bt}else if(t.match_available){if(n=T._tr_tally(t,0,t.window[t.strstart-1]),n&&o(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return bt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=T._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ht-1?t.strstart:ht-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function _(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=lt){if(c(t),t.lookahead<=lt&&e===F)return bt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=ht&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+lt;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&a>i);t.match_length=lt-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ht?(r=T._tr_tally(t,1,t.match_length-ht),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function g(t,e){for(var r;;){if(0===t.lookahead&&(c(t),0===t.lookahead)){if(e===F)return bt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:yt}function v(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function w(t){t.window_size=2*t.w_size,a(t.head),t.max_lazy_match=I[t.level].max_lazy,t.good_match=I[t.level].good_length,t.nice_match=I[t.level].nice_length,t.max_chain_length=I[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ht-1,t.match_available=0,t.ins_h=0}function b(){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=Q,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 O.Buf16(2*ot),this.dyn_dtree=new O.Buf16(2*(2*at+1)),this.bl_tree=new O.Buf16(2*(2*st+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new O.Buf16(ut+1),this.heap=new O.Buf16(2*it+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new O.Buf16(2*it+1),a(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 y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=V,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?dt:vt,t.adler=2===e.wrap?0:1,e.last_flush=F,T._tr_init(e),Z):n(t,j)}function k(t){var e=y(t);return e===Z&&w(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?j:(t.state.gzhead=e,Z):j}function S(t,e,r,i,a,s){if(!t)return j;var o=1;if(e===G&&(e=6),0>i?(o=0,i=-i):i>15&&(o=2,i-=16),1>a||a>$||r!==Q||8>i||i>15||0>e||e>9||0>s||s>q)return n(t,j);8===i&&(i=9);var u=new b;return t.state=u,u.strm=t,u.wrap=o,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+ht-1)/ht),u.window=new O.Buf8(2*u.w_size),u.head=new O.Buf16(u.hash_size),u.prev=new O.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new O.Buf8(u.pending_buf_size),u.d_buf=u.lit_bufsize>>1,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,k(t)}function z(t,e){return S(t,e,Q,tt,et,J)}function A(t,e){var r,o,l,f;if(!t||!t.state||e>P||0>e)return t?n(t,j):j;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===wt&&e!==L)return n(t,0===t.avail_out?H:j);if(o.strm=t,r=o.last_flush,o.last_flush=e,o.status===dt)if(2===o.wrap)t.adler=0,u(o,31),u(o,139),u(o,8),o.gzhead?(u(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),u(o,255&o.gzhead.time),u(o,o.gzhead.time>>8&255),u(o,o.gzhead.time>>16&255),u(o,o.gzhead.time>>24&255),u(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),u(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(u(o,255&o.gzhead.extra.length),u(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=R(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=pt):(u(o,0),u(o,0),u(o,0),u(o,0),u(o,0),u(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),u(o,St),o.status=vt);else{var c=Q+(o.w_bits-8<<4)<<8,d=-1;d=o.strategy>=Y||o.level<2?0:o.level<6?1:6===o.level?2:3,c|=d<<6,0!==o.strstart&&(c|=ct),c+=31-c%31,o.status=vt,h(o,c),0!==o.strstart&&(h(o,t.adler>>>16),h(o,65535&t.adler)),t.adler=1}if(o.status===pt)if(o.gzhead.extra){for(l=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending!==o.pending_buf_size));)u(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=mt)}else o.status=mt;if(o.status===mt)if(o.gzhead.name){l=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),0===f&&(o.gzindex=0,o.status=_t)}else o.status=_t;if(o.status===_t)if(o.gzhead.comment){l=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),s(t),l=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>l&&(t.adler=R(t.adler,o.pending_buf,o.pending-l,l)),0===f&&(o.status=gt)}else o.status=gt;if(o.status===gt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(u(o,255&t.adler),u(o,t.adler>>8&255),t.adler=0,o.status=vt)):o.status=vt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,Z}else if(0===t.avail_in&&i(e)<=i(r)&&e!==L)return n(t,H);if(o.status===wt&&0!==t.avail_in)return n(t,H);if(0!==t.avail_in||0!==o.lookahead||e!==F&&o.status!==wt){var p=o.strategy===Y?g(o,e):o.strategy===K?_(o,e):I[o.level].func(o,e);if(p!==kt&&p!==xt||(o.status=wt),p===bt||p===kt)return 0===t.avail_out&&(o.last_flush=-1),Z;if(p===yt&&(e===N?T._tr_align(o):e!==P&&(T._tr_stored_block(o,0,0,!1),e===U&&(a(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,Z}return e!==L?Z:o.wrap<=0?W:(2===o.wrap?(u(o,255&t.adler),u(o,t.adler>>8&255),u(o,t.adler>>16&255),u(o,t.adler>>24&255),u(o,255&t.total_in),u(o,t.total_in>>8&255),u(o,t.total_in>>16&255),u(o,t.total_in>>24&255)):(h(o,t.adler>>>16),h(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?Z:W)}function E(t){var e;return t&&t.state?(e=t.state.status,e!==dt&&e!==pt&&e!==mt&&e!==_t&&e!==gt&&e!==vt&&e!==wt?n(t,j):(t.state=null,e===vt?n(t,M):Z)):j}function C(t,e){var r,n,i,s,o,u,h,l,f=e.length;if(!t||!t.state)return j;if(r=t.state,s=r.wrap,2===s||1===s&&r.status!==dt||r.lookahead)return j;for(1===s&&(t.adler=B(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new O.Buf8(r.w_size),O.arraySet(l,e,f-r.w_size,r.w_size,0),e=l,f=r.w_size),o=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,c(r);r.lookahead>=ht;){n=r.strstart,i=r.lookahead-(ht-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+ht-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--i);r.strstart=n,r.lookahead=ht-1,c(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ht-1,r.match_available=0,t.next_in=u,t.input=h,t.avail_in=o,r.wrap=s,Z}var I,O=t("../utils/common"),T=t("./trees"),B=t("./adler32"),R=t("./crc32"),D=t("./messages"),F=0,N=1,U=3,L=4,P=5,Z=0,W=1,j=-2,M=-3,H=-5,G=-1,X=1,Y=2,K=3,q=4,J=0,V=2,Q=8,$=9,tt=15,et=8,rt=29,nt=256,it=nt+1+rt,at=30,st=19,ot=2*it+1,ut=15,ht=3,lt=258,ft=lt+ht+1,ct=32,dt=42,pt=69,mt=73,_t=91,gt=103,vt=113,wt=666,bt=1,yt=2,kt=3,xt=4,St=3;I=[new v(0,0,0,0,d),new v(4,4,8,4,p),new v(4,5,16,8,p),new v(4,6,32,32,p),new v(4,4,16,16,m),new v(8,16,32,32,m),new v(8,16,128,128,m),new v(8,32,128,256,m),new v(32,128,258,1024,m),new v(32,258,258,4096,m)],r.deflateInit=z,r.deflateInit2=S,r.deflateReset=k,r.deflateResetKeep=y,r.deflateSetHeader=x,r.deflate=A,r.deflateEnd=E,r.deflateSetDictionary=C,r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}],48:[function(t,e,r){"use strict";var n=30,i=12;e.exports=function(t,e){var r,a,s,o,u,h,l,f,c,d,p,m,_,g,v,w,b,y,k,x,S,z,A,E,C;r=t.state,a=t.next_in,E=t.input,s=a+(t.avail_in-5),o=t.next_out,C=t.output,u=o-(e-t.avail_out),h=o+(t.avail_out-257),l=r.dmax,f=r.wsize,c=r.whave,d=r.wnext,p=r.window,m=r.hold,_=r.bits,g=r.lencode,v=r.distcode,w=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{15>_&&(m+=E[a++]<<_,_+=8,m+=E[a++]<<_,_+=8),y=g[m&w];e:for(;;){if(k=y>>>24,m>>>=k,_-=k,k=y>>>16&255,0===k)C[o++]=65535&y;else{if(!(16&k)){if(0===(64&k)){y=g[(65535&y)+(m&(1<<k)-1)];continue e}if(32&k){r.mode=i;break t}t.msg="invalid literal/length code",r.mode=n;break t}x=65535&y,k&=15,k&&(k>_&&(m+=E[a++]<<_,_+=8),x+=m&(1<<k)-1,m>>>=k,_-=k),15>_&&(m+=E[a++]<<_,_+=8,m+=E[a++]<<_,_+=8),y=v[m&b];r:for(;;){if(k=y>>>24,m>>>=k,_-=k,k=y>>>16&255,!(16&k)){if(0===(64&k)){y=v[(65535&y)+(m&(1<<k)-1)];continue r}t.msg="invalid distance code",r.mode=n;break t}if(S=65535&y,k&=15,k>_&&(m+=E[a++]<<_,_+=8,k>_&&(m+=E[a++]<<_,_+=8)),S+=m&(1<<k)-1,S>l){t.msg="invalid distance too far back",r.mode=n;break t}if(m>>>=k,_-=k,k=o-u,S>k){if(k=S-k,k>c&&r.sane){t.msg="invalid distance too far back",r.mode=n;break t}if(z=0,A=p,0===d){if(z+=f-k,x>k){x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}}else if(k>d){if(z+=f+d-k,k-=d,x>k){x-=k;do C[o++]=p[z++];while(--k);if(z=0,x>d){k=d,x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}}}else if(z+=d-k,x>k){x-=k;do C[o++]=p[z++];while(--k);z=o-S,A=C}for(;x>2;)C[o++]=A[z++],C[o++]=A[z++],C[o++]=A[z++],x-=3;x&&(C[o++]=A[z++],x>1&&(C[o++]=A[z++]))}else{z=o-S;do C[o++]=C[z++],C[o++]=C[z++],C[o++]=C[z++],x-=3;while(x>2);x&&(C[o++]=C[z++],x>1&&(C[o++]=C[z++]))}break}}break}}while(s>a&&h>o);x=_>>3,a-=x,_-=x<<3,m&=(1<<_)-1,t.next_in=a,t.next_out=o,t.avail_in=s>a?5+(s-a):5-(a-s),t.avail_out=h>o?257+(h-o):257-(o-h),r.hold=m,r.bits=_}},{}],49:[function(t,e,r){"use strict";function n(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){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 v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=U,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new v.Buf32(mt),e.distcode=e.distdyn=new v.Buf32(_t),e.sane=1,e.back=-1,I):B}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,a(t)):B}function o(t,e){var r,n;return t&&t.state?(n=t.state,0>e?(r=0,e=-e):(r=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?B:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,s(t))):B}function u(t,e){var r,n;return t?(n=new i,t.state=n,n.window=null,r=o(t,e),r!==I&&(t.state=null),r):B}function h(t){return u(t,vt)}function l(t){if(wt){var e;for(_=new v.Buf32(512),g=new v.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(k(S,t.lens,0,288,_,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;k(z,t.lens,0,32,g,0,t.work,{bits:5}),wt=!1}t.lencode=_,t.lenbits=9,t.distcode=g,t.distbits=5}function f(t,e,r,n){var i,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new v.Buf8(a.wsize)),n>=a.wsize?(v.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),v.arraySet(a.window,e,r-n,i,a.wnext),n-=i,n?(v.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function c(t,e){var r,i,a,s,o,u,h,c,d,p,m,_,g,mt,_t,gt,vt,wt,bt,yt,kt,xt,St,zt,At=0,Et=new v.Buf8(4),Ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return B;r=t.state,r.mode===K&&(r.mode=q),o=t.next_out,a=t.output,h=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,c=r.hold,d=r.bits,p=u,m=h,xt=I;t:for(;;)switch(r.mode){case U:if(0===r.wrap){r.mode=q;break}for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(2&r.wrap&&35615===c){r.check=0,Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0),c=0,d=0,r.mode=L;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=ct;break}if((15&c)!==N){t.msg="unknown compression method",r.mode=ct;break}if(c>>>=4,d-=4,kt=(15&c)+8,0===r.wbits)r.wbits=kt;else if(kt>r.wbits){t.msg="invalid window size",r.mode=ct;break}r.dmax=1<<kt,t.adler=r.check=1,r.mode=512&c?X:K,c=0,d=0;break;case L:for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(r.flags=c,(255&r.flags)!==N){t.msg="unknown compression method",r.mode=ct;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=ct;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0,r.mode=P;case P:for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.head&&(r.head.time=c),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,Et[2]=c>>>16&255,Et[3]=c>>>24&255,r.check=b(r.check,Et,4,0)),c=0,d=0,r.mode=Z;case Z:for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0,r.mode=W;case W:if(1024&r.flags){for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(Et[0]=255&c,Et[1]=c>>>8&255,r.check=b(r.check,Et,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=j;case j:if(1024&r.flags&&(_=r.length,_>u&&(_=u),_&&(r.head&&(kt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),v.arraySet(r.head.extra,i,s,_,kt)),512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,r.length-=_),r.length))break t;r.length=0,r.mode=M;case M:if(2048&r.flags){if(0===u)break t;_=0;do kt=i[s+_++],r.head&&kt&&r.length<65536&&(r.head.name+=String.fromCharCode(kt));while(kt&&u>_);if(512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,kt)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=H;case H:if(4096&r.flags){if(0===u)break t;_=0;do kt=i[s+_++],r.head&&kt&&r.length<65536&&(r.head.comment+=String.fromCharCode(kt));while(kt&&u>_);if(512&r.flags&&(r.check=b(r.check,i,_,s)),u-=_,s+=_,kt)break t}else r.head&&(r.head.comment=null);r.mode=G;case G:if(512&r.flags){for(;16>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=ct;break}c=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=K;break;case X:for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}t.adler=r.check=n(c),c=0,d=0,r.mode=Y;case Y:if(0===r.havedict)return t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,T;t.adler=r.check=1,r.mode=K;case K:if(e===E||e===C)break t;case q:if(r.last){c>>>=7&d,d-=7&d,r.mode=ht;break}for(;3>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}switch(r.last=1&c,c>>>=1,d-=1,3&c){case 0:r.mode=J;break;case 1:if(l(r),r.mode=rt,e===C){c>>>=2,d-=2;break t}break;case 2:r.mode=$;break;case 3:t.msg="invalid block type",r.mode=ct}c>>>=2,d-=2;break;case J:for(c>>>=7&d,d-=7&d;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if((65535&c)!==(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ct;break}if(r.length=65535&c,c=0,d=0,r.mode=V,e===C)break t;case V:r.mode=Q;case Q:if(_=r.length){if(_>u&&(_=u),_>h&&(_=h),0===_)break t;v.arraySet(a,i,s,_,o),u-=_,s+=_,h-=_,o+=_,r.length-=_;break}r.mode=K;break;case $:for(;14>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(r.nlen=(31&c)+257,c>>>=5,d-=5,r.ndist=(31&c)+1,c>>>=5,d-=5,r.ncode=(15&c)+4,c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ct;break}r.have=0,r.mode=tt;case tt:for(;r.have<r.ncode;){for(;3>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.lens[Ct[r.have++]]=7&c,c>>>=3,d-=3}for(;r.have<19;)r.lens[Ct[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,St={bits:r.lenbits},xt=k(x,r.lens,0,19,r.lencode,0,r.work,St),r.lenbits=St.bits,xt){t.msg="invalid code lengths set",r.mode=ct;break}r.have=0,r.mode=et;case et:for(;r.have<r.nlen+r.ndist;){for(;At=r.lencode[c&(1<<r.lenbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(16>vt)c>>>=_t,d-=_t,r.lens[r.have++]=vt;else{if(16===vt){for(zt=_t+2;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c>>>=_t,d-=_t,0===r.have){t.msg="invalid bit length repeat",r.mode=ct;break}kt=r.lens[r.have-1],_=3+(3&c),c>>>=2,d-=2}else if(17===vt){for(zt=_t+3;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=_t,d-=_t,kt=0,_=3+(7&c),c>>>=3,d-=3}else{for(zt=_t+7;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=_t,d-=_t,kt=0,_=11+(127&c),c>>>=7,d-=7}if(r.have+_>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ct;break}for(;_--;)r.lens[r.have++]=kt}}if(r.mode===ct)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ct;break}if(r.lenbits=9,St={bits:r.lenbits},xt=k(S,r.lens,0,r.nlen,r.lencode,0,r.work,St),r.lenbits=St.bits,xt){t.msg="invalid literal/lengths set",r.mode=ct;break}if(r.distbits=6,r.distcode=r.distdyn,St={bits:r.distbits},xt=k(z,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,St),r.distbits=St.bits,xt){t.msg="invalid distances set",r.mode=ct;break}if(r.mode=rt,e===C)break t;case rt:r.mode=nt;case nt:if(u>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,y(t,m),o=t.next_out,a=t.output,h=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,c=r.hold,d=r.bits,r.mode===K&&(r.back=-1);break}for(r.back=0;At=r.lencode[c&(1<<r.lenbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(gt&&0===(240>)){for(wt=_t,bt=gt,yt=vt;At=r.lencode[yt+((c&(1<<wt+bt)-1)>>wt)],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=wt+_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=wt,d-=wt,r.back+=wt}if(c>>>=_t,d-=_t,r.back+=_t,r.length=vt,0===gt){r.mode=ut;break}if(32>){r.back=-1,r.mode=K;break}if(64>){t.msg="invalid literal/length code",r.mode=ct;break}r.extra=15>,r.mode=it;case it:if(r.extra){for(zt=r.extra;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=at;case at:for(;At=r.distcode[c&(1<<r.distbits)-1],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(0===(240>)){for(wt=_t,bt=gt,yt=vt;At=r.distcode[yt+((c&(1<<wt+bt)-1)>>wt)],_t=At>>>24,gt=At>>>16&255,vt=65535&At,!(d>=wt+_t);){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}c>>>=wt,d-=wt,r.back+=wt}if(c>>>=_t,d-=_t,r.back+=_t,64>){t.msg="invalid distance code",r.mode=ct;break}r.offset=vt,r.extra=15>,r.mode=st;case st:if(r.extra){for(zt=r.extra;zt>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ct;break}r.mode=ot;case ot:if(0===h)break t;if(_=m-h,r.offset>_){if(_=r.offset-_,_>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ct;break}_>r.wnext?(_-=r.wnext,g=r.wsize-_):g=r.wnext-_,_>r.length&&(_=r.length),mt=r.window}else mt=a,g=o-r.offset,_=r.length;_>h&&(_=h),h-=_,r.length-=_;do a[o++]=mt[g++];while(--_);0===r.length&&(r.mode=nt);break;case ut:if(0===h)break t;a[o++]=r.length,h--,r.mode=nt;break;case ht:if(r.wrap){for(;32>d;){if(0===u)break t;u--,c|=i[s++]<<d,d+=8}if(m-=h,t.total_out+=m,r.total+=m,m&&(t.adler=r.check=r.flags?b(r.check,a,m,o-m):w(r.check,a,m,o-m)),m=h,(r.flags?c:n(c))!==r.check){t.msg="incorrect data check",r.mode=ct;break}c=0,d=0}r.mode=lt;case lt:if(r.wrap&&r.flags){for(;32>d;){if(0===u)break t;u--,c+=i[s++]<<d,d+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=ct;break}c=0,d=0}r.mode=ft;case ft:xt=O;break t;case ct:xt=R;break t;case dt:return D;case pt:default:return B}return t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=u,r.hold=c,r.bits=d,(r.wsize||m!==t.avail_out&&r.mode<ct&&(r.mode<ht||e!==A))&&f(t,t.output,t.next_out,m-t.avail_out)?(r.mode=dt,D):(p-=t.avail_in,m-=t.avail_out,t.total_in+=p,t.total_out+=m,r.total+=m,r.wrap&&m&&(t.adler=r.check=r.flags?b(r.check,a,m,t.next_out-m):w(r.check,a,m,t.next_out-m)),t.data_type=r.bits+(r.last?64:0)+(r.mode===K?128:0)+(r.mode===rt||r.mode===V?256:0),(0===p&&0===m||e===A)&&xt===I&&(xt=F),xt)}function d(t){if(!t||!t.state)return B;var e=t.state;return e.window&&(e.window=null),t.state=null,I}function p(t,e){var r;return t&&t.state?(r=t.state,0===(2&r.wrap)?B:(r.head=e,e.done=!1,I)):B}function m(t,e){var r,n,i,a=e.length;return t&&t.state?(r=t.state,0!==r.wrap&&r.mode!==Y?B:r.mode===Y&&(n=1,n=w(n,e,a,0),n!==r.check)?R:(i=f(t,e,a,a))?(r.mode=dt,D):(r.havedict=1,I)):B}var _,g,v=t("../utils/common"),w=t("./adler32"),b=t("./crc32"),y=t("./inffast"),k=t("./inftrees"),x=0,S=1,z=2,A=4,E=5,C=6,I=0,O=1,T=2,B=-2,R=-3,D=-4,F=-5,N=8,U=1,L=2,P=3,Z=4,W=5,j=6,M=7,H=8,G=9,X=10,Y=11,K=12,q=13,J=14,V=15,Q=16,$=17,tt=18,et=19,rt=20,nt=21,it=22,at=23,st=24,ot=25,ut=26,ht=27,lt=28,ft=29,ct=30,dt=31,pt=32,mt=852,_t=592,gt=15,vt=gt,wt=!0;r.inflateReset=s,r.inflateReset2=o,r.inflateResetKeep=a,r.inflateInit=h,r.inflateInit2=u,r.inflate=c,r.inflateEnd=d,r.inflateGetHeader=p,r.inflateSetDictionary=m,r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=15,a=852,s=592,o=0,u=1,h=2,l=[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],f=[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],c=[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],d=[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];e.exports=function(t,e,r,p,m,_,g,v){var w,b,y,k,x,S,z,A,E,C=v.bits,I=0,O=0,T=0,B=0,R=0,D=0,F=0,N=0,U=0,L=0,P=null,Z=0,W=new n.Buf16(i+1),j=new n.Buf16(i+1),M=null,H=0;for(I=0;i>=I;I++)W[I]=0;for(O=0;p>O;O++)W[e[r+O]]++;for(R=C,B=i;B>=1&&0===W[B];B--);if(R>B&&(R=B),0===B)return m[_++]=20971520,m[_++]=20971520,v.bits=1,0;for(T=1;B>T&&0===W[T];T++);for(T>R&&(R=T),N=1,I=1;i>=I;I++)if(N<<=1,N-=W[I],0>N)return-1;if(N>0&&(t===o||1!==B))return-1;for(j[1]=0,I=1;i>I;I++)j[I+1]=j[I]+W[I];for(O=0;p>O;O++)0!==e[r+O]&&(g[j[e[r+O]]++]=O);if(t===o?(P=M=g,S=19):t===u?(P=l,Z-=257,M=f,H-=257,S=256):(P=c,M=d,S=-1),L=0,O=0,I=T,x=_,D=R,F=0,y=-1,U=1<<R,k=U-1,t===u&&U>a||t===h&&U>s)return 1;for(var G=0;;){G++,z=I-F,g[O]<S?(A=0,E=g[O]):g[O]>S?(A=M[H+g[O]],E=P[Z+g[O]]):(A=96,E=0),w=1<<I-F,b=1<<D,T=b;do b-=w,m[x+(L>>F)+b]=z<<24|A<<16|E|0;while(0!==b);for(w=1<<I-1;L&w;)w>>=1;if(0!==w?(L&=w-1,L+=w):L=0,O++,0===--W[I]){if(I===B)break;I=e[r+g[O]]}if(I>R&&(L&k)!==y){for(0===F&&(F=R),x+=T,D=I-F,N=1<<D;B>D+F&&(N-=W[D+F],!(0>=N));)D++,N<<=1;if(U+=1<<D,t===u&&U>a||t===h&&U>s)return 1;y=L&k,m[y]=R<<24|D<<16|x-_|0}}return 0!==L&&(m[x+L]=I-F<<24|64<<16|0),v.bits=R,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.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,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function a(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return 256>t?ut[t]:ut[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function u(t,e,r){t.bi_valid>q-r?(t.bi_buf|=e<<t.bi_valid&65535,o(t,t.bi_buf),t.bi_buf=e>>q-t.bi_valid,t.bi_valid+=r-q):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function h(t,e,r){u(t,r[2*e],r[2*e+1])}function l(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function f(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function c(t,e){var r,n,i,a,s,o,u=e.dyn_tree,h=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;K>=a;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;Y>r;r++)n=t.heap[r],a=u[2*u[2*n+1]+1]+1,a>p&&(a=p,m++),u[2*n+1]=a,n>h||(t.bl_count[a]++,s=0,n>=d&&(s=c[n-d]),o=u[2*n],t.opt_len+=o*(a+s),f&&(t.static_len+=o*(l[2*n+1]+s)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)i=t.heap[--r],i>h||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}function d(t,e,r){var n,i,a=new Array(K+1),s=0;for(n=1;K>=n;n++)a[n]=s=s+r[n-1]<<1;for(i=0;e>=i;i++){var o=t[2*i+1];0!==o&&(t[2*i]=l(a[o]++,o))}}function p(){var t,e,r,n,a,s=new Array(K+1);for(r=0,n=0;j-1>n;n++)for(lt[n]=r,t=0;t<1<<et[n];t++)ht[r++]=n;for(ht[r-1]=n,a=0,n=0;16>n;n++)for(ft[n]=a,t=0;t<1<<rt[n];t++)ut[a++]=n;for(a>>=7;G>n;n++)for(ft[n]=a<<7,t=0;t<1<<rt[n]-7;t++)ut[256+a++]=n;for(e=0;K>=e;e++)s[e]=0;for(t=0;143>=t;)st[2*t+1]=8,t++,s[8]++;for(;255>=t;)st[2*t+1]=9,t++,s[9]++;for(;279>=t;)st[2*t+1]=7,t++,s[7]++;for(;287>=t;)st[2*t+1]=8,t++,s[8]++;for(d(st,H+1,s),t=0;G>t;t++)ot[2*t+1]=5,ot[2*t]=l(t,5);ct=new i(st,et,M+1,H,K),dt=new i(ot,rt,0,G,K),pt=new i(new Array(0),nt,0,X,J)}function m(t){var e;for(e=0;H>e;e++)t.dyn_ltree[2*e]=0;for(e=0;G>e;e++)t.dyn_dtree[2*e]=0;for(e=0;X>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*V]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function _(t){t.bi_valid>8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function g(t,e,r,n){_(t),n&&(o(t,r),o(t,~r)),B.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function v(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function w(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&v(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!v(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function b(t,e,r){var n,i,a,o,l=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],i=t.pending_buf[t.l_buf+l],l++,0===n?h(t,i,e):(a=ht[i],h(t,a+M+1,e),o=et[a],0!==o&&(i-=lt[a],u(t,i,o)),n--,a=s(n),h(t,a,r),o=rt[a],0!==o&&(n-=ft[a],u(t,n,o)));while(l<t.last_lit);h(t,V,e)}function y(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,u=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=Y,r=0;u>r;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>h?++h:0,a[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)w(t,a,r);i=u;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],w(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1, +a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,w(t,a,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],c(t,e),d(a,h,t.bl_count)}function k(t,e,r){var n,i,a=-1,s=e[1],o=0,u=7,h=4;for(0===s&&(u=138,h=3),e[2*(r+1)+1]=65535,n=0;r>=n;n++)i=s,s=e[2*(n+1)+1],++o<u&&i===s||(h>o?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*Q]++):10>=o?t.bl_tree[2*$]++:t.bl_tree[2*tt]++,o=0,a=i,0===s?(u=138,h=3):i===s?(u=6,h=3):(u=7,h=4))}function x(t,e,r){var n,i,a=-1,s=e[1],o=0,l=7,f=4;for(0===s&&(l=138,f=3),n=0;r>=n;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(f>o){do h(t,i,t.bl_tree);while(0!==--o)}else 0!==i?(i!==a&&(h(t,i,t.bl_tree),o--),h(t,Q,t.bl_tree),u(t,o-3,2)):10>=o?(h(t,$,t.bl_tree),u(t,o-3,3)):(h(t,tt,t.bl_tree),u(t,o-11,7));o=0,a=i,0===s?(l=138,f=3):i===s?(l=6,f=3):(l=7,f=4)}}function S(t){var e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),y(t,t.bl_desc),e=X-1;e>=3&&0===t.bl_tree[2*it[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function z(t,e,r,n){var i;for(u(t,e-257,5),u(t,r-1,5),u(t,n-4,4),i=0;n>i;i++)u(t,t.bl_tree[2*it[i]+1],3);x(t,t.dyn_ltree,e-1),x(t,t.dyn_dtree,r-1)}function A(t){var e,r=4093624447;for(e=0;31>=e;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return D;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return F;for(e=32;M>e;e++)if(0!==t.dyn_ltree[2*e])return F;return D}function E(t){mt||(p(),mt=!0),t.l_desc=new a(t.dyn_ltree,ct),t.d_desc=new a(t.dyn_dtree,dt),t.bl_desc=new a(t.bl_tree,pt),t.bi_buf=0,t.bi_valid=0,m(t)}function C(t,e,r,n){u(t,(U<<1)+(n?1:0),3),g(t,e,r,!0)}function I(t){u(t,L<<1,3),h(t,V,st),f(t)}function O(t,e,r,n){var i,a,s=0;t.level>0?(t.strm.data_type===N&&(t.strm.data_type=A(t)),y(t,t.l_desc),y(t,t.d_desc),s=S(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,i>=a&&(i=a)):i=a=r+5,i>=r+4&&-1!==e?C(t,e,r,n):t.strategy===R||a===i?(u(t,(L<<1)+(n?1:0),3),b(t,st,ot)):(u(t,(P<<1)+(n?1:0),3),z(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),b(t,t.dyn_ltree,t.dyn_dtree)),m(t),n&&_(t)}function T(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(ht[r]+M+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var B=t("../utils/common"),R=4,D=0,F=1,N=2,U=0,L=1,P=2,Z=3,W=258,j=29,M=256,H=M+1+j,G=30,X=19,Y=2*H+1,K=15,q=16,J=7,V=256,Q=16,$=17,tt=18,et=[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],rt=[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],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],at=512,st=new Array(2*(H+2));n(st);var ot=new Array(2*G);n(ot);var ut=new Array(at);n(ut);var ht=new Array(W-Z+1);n(ht);var lt=new Array(j);n(lt);var ft=new Array(G);n(ft);var ct,dt,pt,mt=!1;r._tr_init=E,r._tr_stored_block=C,r._tr_flush_block=O,r._tr_tally=T,r._tr_align=I},{"../utils/common":41}],53:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}]},{},[10])(10)}),!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):"undefined"!=typeof window?window.JSZipUtils=t():"undefined"!=typeof global?global.JSZipUtils=t():"undefined"!=typeof self&&(self.JSZipUtils=t())}(function(){return function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";function n(){try{return new window.XMLHttpRequest}catch(t){}}function i(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}var a={};a._getBinaryFromXHR=function(t){return t.response||t.responseText};var s=window.ActiveXObject?function(){return n()||i()}:n;a.getBinaryContent=function(t,e){try{var r=s();r.open("GET",t,!0),"responseType"in r&&(r.responseType="arraybuffer"),r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.onreadystatechange=function(n){var i,s;if(4===r.readyState)if(200===r.status||0===r.status){i=null,s=null;try{i=a._getBinaryFromXHR(r)}catch(o){s=new Error(o)}e(s,i)}else e(new Error("Ajax error for "+t+" : "+this.status+" "+this.statusText),null)},r.send()}catch(n){e(new Error(n),null)}},e.exports=a},{}]},{},[1])(1)});var saveAs=saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},n=t.URL||t.webkitURL||t,i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),a=!t.externalHost&&"download"in i,s=t.webkitRequestFileSystem,o=t.requestFileSystem||s||t.mozRequestFileSystem,u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},h="application/octet-stream",l=0,f=[],c=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?n.revokeObjectURL(e):e.remove()}f.length=0},d=function(t,e,r){e=[].concat(e);for(var n=e.length;n--;){var i=t["on"+e[n]];if("function"==typeof i)try{i.call(t,r||t)}catch(a){u(a)}}},p=function(n,u){var c,p,m,_=this,g=n.type,v=!1,w=function(){var t=r().createObjectURL(n);return f.push(t),t},b=function(){d(_,"writestart progress write writeend".split(" "))},y=function(){!v&&c||(c=w(n)),p?p.location.href=c:window.open(c,"_blank"),_.readyState=_.DONE,b()},k=function(t){return function(){return _.readyState!==_.DONE?t.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};if(_.readyState=_.INIT,u||(u="download"),a){c=w(n),e=t.document,i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i.href=c,i.download=u;var S=e.createEvent("MouseEvents");return S.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(S),_.readyState=_.DONE,void b()}return t.chrome&&g&&g!==h&&(m=n.slice||n.webkitSlice,n=m.call(n,0,n.size,h),v=!0),s&&"download"!==u&&(u+=".download"),(g===h||s)&&(p=t),o?(l+=n.size,void o(t.TEMPORARY,l,k(function(t){t.root.getDirectory("saved",x,k(function(t){var e=function(){t.getFile(u,x,k(function(t){t.createWriter(k(function(e){e.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),_.readyState=_.DONE,d(_,"writeend",e)},e.onerror=function(){var t=e.error;t.code!==t.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach(function(t){e["on"+t]=_["on"+t]}),e.write(n),_.abort=function(){e.abort(),_.readyState=_.DONE},_.readyState=_.WRITING}),y)}),y)};t.getFile(u,{create:!1},k(function(t){t.remove(),e()}),k(function(t){t.code===t.NOT_FOUND_ERR?e():y()}))}),y)}),y)):void y()},m=p.prototype,_=function(t,e){return new p(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",c,!1),_.unload=function(){c(),t.removeEventListener("unload",c,!1)},_}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&(module.exports=saveAs);var Downloader=Downloader||{};Downloader.getFile=function(t){var e=function(t,e,r){JSZipUtils.getBinaryContent(t,function(t,n){t?r(t):e(n)})},r=function(t){var r=window.Promise;return r||(r=JSZip.external.Promise),new r(function(r,n){e(t,r,n)})};return r(t)};var Zipper={zip:new JSZip};Zipper.createZip=function(t,e){var r=function(){e.map(function(e){var r=e,n=r.replace(/.*\//g,"");Zipper.zip.file(n,t.getFile(r),{binary:!0})})},n=function(){Zipper.zip.generateAsync({type:"blob"}).then(function(t){saveAs(t,"files.zip")},function(t){console.log(t)})},i=function(){JSZip.support.blob?(r(),n()):console.log("Blob is not supported")};i()};var UserInterface={selector:'a[href|="#download"]'};UserInterface.setup=function(t,e){var r=document.body.querySelectorAll(UserInterface.selector),n=function(r){t.createZip(e,r)},i=function(t){console.log("adding listener to",t),t.addEventListener("click",function(t){t.preventDefault();var e=u(t.target);console.log("files",e),console.log("creating zip"),n(e)},!1)},a=function(){r&&foreach(r,function(){i(this),o(this)})},s=function(t){var e=t.href.replace(/^[^#]*#/,"");return document.body.querySelector('a[name="'+e+'"')},o=function(t){var e=s(t),r=getNextSiblingInDom(e);addClass(e,"hidden"),addClass(r,"hidden")},u=function(t){var e=s(t),r=getNextSiblingInDom(e),n=r.querySelectorAll("a"),i=[];return foreach(n,function(){i.push(this.href)}),i};a()},UserInterface.setup(Zipper,Downloader); //# sourceMappingURL=downloader-bundle.js.map diff --git a/js/lesson3/tutorial.md b/js/lesson3/tutorial.md index 786d5d59..dfa79437 100644 --- a/js/lesson3/tutorial.md +++ b/js/lesson3/tutorial.md @@ -2,10 +2,14 @@ layout: page title: Introduction to jQuery files: - - files/index.html - - files/jquery.js - - files/script.js - - files/style.css + - zipname: example1 + files: + - files/index.html + - files/jquery.js + - zipname: example2 + files: + - files/script.js + - files/style.css --- @@ -46,7 +50,7 @@ Using jQuery and JavaScript functions, we are going to build a small todo list. Download the files that you will need to work through the example -[here](#download-default). +[here](#download-example1). and [example2](#download-example2) <!-- https://gist.github.com/despo/309f684b7a6e002aaf1f/download --> Alternatively, if you've already learned how to use git and would like diff --git a/stylesheets/style.css b/stylesheets/style.css index aca37678..0256ece4 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -14,10 +14,13 @@ footer { } .tutorial-filelist__list { - display: none; } .hidden { display: none; visibility: hidden; +} + +.compact-list > * { + margin: 3px 0px; } \ No newline at end of file